Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
⛴️ fix: Align Canary Timing Types and CI Formatting
Lia206ef476f652
diff --git a/client/src/components/Auth/TwoFactorScreen.tsx b/client/src/components/Auth/TwoFactorScreen.tsxindex 8e543a4b44..ffb8772aad 100644--- a/client/src/components/Auth/TwoFactorScreen.tsx+++ b/client/src/components/Auth/TwoFactorScreen.tsx@@ -86,7 +86,7 @@ const TwoFactorScreen: React.FC = React.memo(() => {return (<div className="mt-4"><form onSubmit={handleSubmit(onSubmit)}>- <Label className="text-text-primary flex justify-center break-keep text-center text-sm">+ <Label className="text-text-primary flex justify-center text-center text-sm break-keep">{localize('com_auth_two_factor')}</Label>{!useBackup && (diff --git a/client/src/components/Chat/Input/InterruptSteerButton.tsx b/client/src/components/Chat/Input/InterruptSteerButton.tsxindex d9f0a3741b..a206557296 100644--- a/client/src/components/Chat/Input/InterruptSteerButton.tsx+++ b/client/src/components/Chat/Input/InterruptSteerButton.tsx@@ -53,7 +53,7 @@ const InterruptSteerButton = React.memo((props: InterruptSteerButtonProps) => {disabled={disabled}onClick={onClick}className={cn(- 'size-theme-control rounded-theme-control-round border-border-light flex items-center justify-center border',+ 'border-border-light size-theme-control rounded-theme-control-round flex items-center justify-center border','text-text-secondary duration-theme-normal transition-colors','hover:bg-surface-composer-hover hover:text-text-primary','focus-visible:ring-border-xheavy focus-visible:ring-2 focus-visible:outline-hidden',diff --git a/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx b/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsxindex 02a1e2e42d..5ce6285563 100644--- a/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx+++ b/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx@@ -483,7 +483,7 @@ function FailedPeek({type="button"className={cn(TOOL_ROW_CLASSES,- 'w-full pl-6 text-left text-text-secondary hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-heavy',+ 'text-text-secondary hover:text-text-primary focus-visible:ring-border-heavy w-full pl-6 text-left focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset',)}onClick={onReveal}data-testid="activity-phase-failed-peek"@@ -492,7 +492,7 @@ function FailedPeek({<TriangleAlert size={14} /></span><span className="tool-status-text flex min-w-0 items-center gap-2">- <span className="min-w-0 max-w-full shrink-0 truncate font-medium text-status-error">+ <span className="text-status-error max-w-full min-w-0 shrink-0 truncate font-medium">{first.text}</span>{first.detail !== '' && (@@ -808,7 +808,12 @@ export default function ActivityPhaseGroup({* keyboard users with no focus indicator. The ghost variant* supplies it today; stating it here keeps the requirement with* the element that depends on it. */- className="text-text-secondary hover:text-text-primary focus-visible:ring-border-heavy flex h-auto min-h-7 w-full items-center justify-start gap-2 rounded-none bg-transparent p-0 py-1 text-left font-medium hover:bg-transparent focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-inset"+ className={cn(+ 'text-text-secondary hover:text-text-primary focus-visible:ring-border-heavy flex h-auto min-h-7 min-w-0 flex-1 items-center justify-start gap-2 rounded-none bg-transparent p-0 py-1 text-left font-medium hover:bg-transparent focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:outline-none focus-visible:ring-inset',+ /** The open card's title: the one semibold, primary-colour line+ * in the fold, so the rows under it read as its contents. */+ isExpanded && 'text-text-primary font-semibold',+ )}onClick={handleToggle}aria-expanded={isExpanded}aria-controls={panelId}diff --git a/client/src/components/Chat/Messages/Content/Part.tsx b/client/src/components/Chat/Messages/Content/Part.tsxindex 775cc1efdb..76aadac61a 100644--- a/client/src/components/Chat/Messages/Content/Part.tsx+++ b/client/src/components/Chat/Messages/Content/Part.tsx@@ -198,7 +198,7 @@ const Part = memo(function Part({const failed = part.status === 'failed' || part.status === 'partial';return (<div- className={`my-1 break-words pl-1 text-sm italic ${failed ? 'text-text-warning' : 'text-text-secondary'}`}+ className={`my-1 pl-1 text-sm break-words italic ${failed ? 'text-text-warning' : 'text-text-secondary'}`}>{display}</div>diff --git a/client/src/components/Chat/Messages/Content/ProgressText.tsx b/client/src/components/Chat/Messages/Content/ProgressText.tsxindex 99bb484a0b..7a37b93cac 100644--- a/client/src/components/Chat/Messages/Content/ProgressText.tsx+++ b/client/src/components/Chat/Messages/Content/ProgressText.tsx@@ -213,12 +213,24 @@ export default function ProgressText({</span>)}{/* The label names the card and stays whole; a subtitle can be- arbitrary authored text (a question, a server name), so it takes- essentially all of the shrink and ellipsizes instead of pushing- the line past the message column. */}- {subtitle && (- <span className="text-text-secondary min-w-0 shrink-[100] truncate font-normal">- {subtitle}+ arbitrary authored text (a question, an error line), so it takes+ ALL of the shrink and ellipsizes instead of pushing the line past+ the message column. All, not most: a weighted share left the label+ a fraction of a pixel short of its text, and that fraction is+ enough for `truncate` to swap its last letters for an ellipsis.+ The pair sits in its own shrinking box so the verdict, the+ duration and the chevron after it never lose width: the box gives+ up the subtitle first, and a label wider than the box truncates at+ the box (`max-w-full`), not past the row. */}+ <span className="flex min-w-0 items-center gap-2">+ <span+ className={cn(+ showShimmer ? 'shimmer' : '',+ 'max-w-full min-w-0 truncate font-medium',+ subtitle && 'shrink-0',+ )}+ >+ {text}</span>{subtitle && (<span className="min-w-0 shrink truncate font-normal text-text-secondary">diff --git a/client/src/components/Chat/Messages/Content/ToolCall.tsx b/client/src/components/Chat/Messages/Content/ToolCall.tsxindex 830717e784..3fa3d84707 100644--- a/client/src/components/Chat/Messages/Content/ToolCall.tsx+++ b/client/src/components/Chat/Messages/Content/ToolCall.tsx@@ -433,7 +433,7 @@ export default function ToolCall({</div>{showOAuth && (<div className="flex w-full flex-col gap-2.5">- <div className="mb-1 mt-2">+ <div className="mt-2 mb-1"><ButtonclassName="inline-flex items-center justify-center rounded-xl px-4 py-2 text-sm font-medium"variant="default"diff --git a/client/src/components/Chat/Messages/Content/ToolCallGroup.tsx b/client/src/components/Chat/Messages/Content/ToolCallGroup.tsxindex d9a976e9a5..96d9980063 100644--- a/client/src/components/Chat/Messages/Content/ToolCallGroup.tsx+++ b/client/src/components/Chat/Messages/Content/ToolCallGroup.tsx@@ -515,25 +515,66 @@ export default function ToolCallGroup({return (<div className="mt-1 mb-2" ref={rootRef}>- <Button- variant="ghost"- type="button"- className="text-text-secondary hover:text-text-secondary focus-visible:ring-border-heavy inline-flex h-auto w-full items-center justify-start gap-2 rounded-none bg-transparent p-0 py-1 hover:bg-transparent focus-visible:ring-2 focus-visible:ring-offset-0"- onClick={handleToggle}- aria-expanded={isExpanded}- aria-label={groupAriaLabel}- >- {iconStatus == null && (allSubagents || allAskQuestions) ? (- /** Homogeneous category groups get a single category glyph instead- * of StackedToolIcons' generic wrenches: a Users glyph for- * subagents, a question glyph for ask_user_question — matching- * their individual card headers and reading as the category- * rather than "tools". */- <div+ <div className="flex w-full items-center gap-2">+ <button+ type="button"+ className={cn(+ 'text-text-secondary hover:text-text-secondary focus-visible:ring-border-heavy inline-flex h-auto min-w-0 flex-1 items-center justify-start gap-2 rounded-none bg-transparent p-0 py-1 hover:bg-transparent focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:outline-none',+ /** An open header is the title of the rows under it, so it is the+ * one line in the fold set in the primary colour. */+ isExpanded && 'text-text-primary hover:text-text-primary',+ )}+ onClick={handleToggle}+ aria-expanded={isExpanded}+ aria-label={groupAriaLabel}+ >+ {iconStatus == null && (allSubagents || allAskQuestions || allTaskChecks) ? (+ /** Homogeneous categories keep the same glyph as their individual+ * cards instead of stacking identical tool icons. */+ <div+ className={cn(+ ROW_GLYPH_SLOT,+ 'text-text-secondary',+ isGroupLive && 'text-text-primary animate-pulse',+ )}+ aria-hidden="true"+ >+ <CategoryIcon size={14} />+ </div>+ ) : (+ <div className={ROW_GLYPH_SLOT} aria-hidden="true">+ <StackedToolIcons+ toolNames={iconToolNames}+ mcpIconMap={mcpIconMap}+ maxIcons={4}+ sourceDomains={sourceDomains}+ status={iconStatus}+ isAnimating={isGroupLive}+ />+ </div>+ )}+ <span+ className={cn(+ 'tool-status-text min-w-0 truncate font-medium',+ activityFailed && 'text-text-warning',+ )}+ role="status"+ title={groupLabel}+ >+ {groupLabel}+ </span>+ {visibleGroupDetail && (+ <span+ className="text-text-secondary max-w-[40%] min-w-0 truncate text-xs font-normal"+ title={visibleGroupDetail}+ >+ · {visibleGroupDetail}+ </span>+ )}+ <ChevronDownclassName={cn(- ROW_GLYPH_SLOT,- 'text-text-secondary',- isGroupLive && 'text-text-primary animate-pulse',+ 'text-text-secondary size-4 shrink-0 transition-transform duration-200 ease-out',+ isExpanded && 'rotate-180',)}aria-hidden="true"/>diff --git a/client/src/components/Chat/Messages/Content/reveal.tsx b/client/src/components/Chat/Messages/Content/reveal.tsxindex b436fd6506..f9d4c1f4c2 100644--- a/client/src/components/Chat/Messages/Content/reveal.tsx+++ b/client/src/components/Chat/Messages/Content/reveal.tsx@@ -127,7 +127,7 @@ export function FailedRevealPill({<buttontype="button"className={cn(- 'bg-status-error-subtle text-status-error inline-flex h-5 shrink-0 items-center gap-1 rounded-full border border-transparent px-2 text-xs font-semibold leading-none',+ 'bg-status-error-subtle text-status-error inline-flex h-5 shrink-0 items-center gap-1 rounded-full border border-transparent px-2 text-xs leading-none font-semibold','hover:border-status-error-border focus-visible:border-status-error focus-visible:outline-none',className,)}diff --git a/client/src/components/SidePanel/Agents/MCPToolItem.tsx b/client/src/components/SidePanel/Agents/MCPToolItem.tsxindex e11ab936c2..a496e9cfc5 100644--- a/client/src/components/SidePanel/Agents/MCPToolItem.tsx+++ b/client/src/components/SidePanel/Agents/MCPToolItem.tsx@@ -162,7 +162,7 @@ export default function MCPToolItem({expanded ? 'opacity-100' : 'opacity-0',)}>- <p className="text-text-secondary max-h-44 overflow-y-auto whitespace-pre-wrap text-xs leading-relaxed">+ <p className="text-text-secondary max-h-44 overflow-y-auto text-xs leading-relaxed whitespace-pre-wrap">{description || localize('com_ui_mcp_no_description')}</p></div>diff --git a/client/src/components/SidePanel/Agents/Tools/ItemDialog/sections/McpSection.tsx b/client/src/components/SidePanel/Agents/Tools/ItemDialog/sections/McpSection.tsxindex 8c13d1237f..44796ed4c7 100644--- a/client/src/components/SidePanel/Agents/Tools/ItemDialog/sections/McpSection.tsx+++ b/client/src/components/SidePanel/Agents/Tools/ItemDialog/sections/McpSection.tsx@@ -440,7 +440,7 @@ export default function McpSection({ item }: Props) {return (<div className="flex flex-col gap-5">{item.description && (- <p className="text-text-secondary max-h-40 overflow-y-auto whitespace-pre-wrap text-sm leading-relaxed">+ <p className="text-text-secondary max-h-40 overflow-y-auto text-sm leading-relaxed whitespace-pre-wrap">{item.description}</p>)}@@ -489,7 +489,7 @@ export default function McpSection({ item }: Props) {<div className="flex flex-col gap-2"><div className="flex min-h-7 items-center justify-between">- <span className="text-text-secondary text-[11px] font-medium uppercase tracking-wide">+ <span className="text-text-secondary text-[11px] font-medium tracking-wide uppercase">{localize('com_ui_tools_mcp_tools_section')}</span>{(hasTools || runtimeToolsAvailable) && (diff --git a/client/src/hooks/SSE/__tests__/steps.spec.ts b/client/src/hooks/SSE/__tests__/steps.spec.tsindex 00279a944a..3a4a6057a7 100644--- a/client/src/hooks/SSE/__tests__/steps.spec.ts+++ b/client/src/hooks/SSE/__tests__/steps.spec.ts@@ -457,6 +457,90 @@ describe('steps', () => {expect(replayed.message.content).toEqual(closed.content);});+ it('retains existing timing metadata when a delta and closure omit new timing', () => {+ const stamps = { toolPreparationStartedAt: 1_000, toolDispatchedAt: 1_100 };+ const opened = applyToolCallsStep(createResponse(), search, 0, () => stamps).message;+ const streamed = applyToolCallDelta(+ opened,+ search,+ argsDelta(search.id, '{}'),+ 'call-1',+ 0,+ ) as TMessage;+ const closed = applyRunStepClosed(+ streamed,+ search,+ {+ id: search.id,+ index: 1,+ type: StepTypes.TOOL_CALLS,+ status: 'completed',+ created_at: 1_000,+ closed_at: 1_250,+ },+ 0,+ );+ expect(closed?.content?.[1]).toMatchObject({+ tool_call: {+ ...stamps,+ args: '{}',+ runStepStatus: 'completed',+ runStepDurationMs: 250,+ runStepClosedAt: 1_250,+ },+ });+ expect(closed?.content?.[1]).not.toHaveProperty('tool_call.toolPreparationDurationMs');+ expect(closed?.content?.[1]).not.toHaveProperty('tool_call.toolExecutionDurationMs');+ });++ it('preserves tool timing through completion and settled-step replay', () => {+ const getTiming = () => ({ toolPreparationStartedAt: 1_000, toolDispatchedAt: 1_100 });+ const opened = applyToolCallsStep(createResponse(), search, 0, getTiming).message;+ const streamed = applyToolCallDelta(+ opened,+ search,+ argsDelta(search.id, '{}'),+ 'call-1',+ 0,+ getTiming,+ ) as TMessage;+ const completed = applyToolCallCompleted(+ streamed,+ search,+ toolEnd(search.id, { id: 'call-1', name: 'search', output: 'done' }),+ 0,+ );+ const closed = applyRunStepClosed(+ completed,+ search,+ {+ id: search.id,+ index: 1,+ type: StepTypes.TOOL_CALLS,+ status: 'completed',+ created_at: 1_000,+ closed_at: 1_250,+ },+ 0,+ { toolPreparationDurationMs: 100, toolExecutionDurationMs: 150 },+ ) as TMessage;+ expect(closed.content?.[1]).toMatchObject({+ tool_call: {+ args: '{}',+ output: 'done',+ progress: 1,+ toolPreparationStartedAt: 1_000,+ toolDispatchedAt: 1_100,+ toolPreparationDurationMs: 100,+ toolExecutionDurationMs: 150,+ runStepDurationMs: 250,+ },+ });+ expect(applyToolCallsStep(closed, search, 0, getTiming).message.content).toEqual(+ closed.content,+ );+ });+it('keeps streamed args when the completion omits them', () => {const opened = applyToolCallsStep(createResponse(), search, 0).message;const streamed = applyToolCallDelta(opened, search, argsDelta(search.id, '{}'), 'call-1', 0);diff --git a/client/src/hooks/SSE/steps/content.ts b/client/src/hooks/SSE/steps/content.tsindex fc2b7cd311..021584e8a1 100644--- a/client/src/hooks/SSE/steps/content.ts+++ b/client/src/hooks/SSE/steps/content.ts@@ -299,7 +299,9 @@ export function updateContent(};} else if (contentType === ContentTypes.TOOL_CALL && 'tool_call' in contentPart) {const existingContent = updatedContent[index] as Agents.ToolCallContent | undefined;- const existingToolCall = existingContent?.tool_call;+ const existingToolCall = existingContent?.tool_call as+ | (Agents.ToolCall & PartMetadata)+ | undefined;const toolCallArgs = (contentPart.tool_call as Agents.ToolCall).args;/** When args are a valid object, they are likely already invoked */let args =diff --git a/client/src/hooks/SSE/steps/tools.ts b/client/src/hooks/SSE/steps/tools.tsindex 09462d23bd..20240a090b 100644--- a/client/src/hooks/SSE/steps/tools.ts+++ b/client/src/hooks/SSE/steps/tools.ts@@ -2,6 +2,11 @@ import { StepTypes, ContentTypes, getRunStepDurationMs } from 'librechat-data-primport type { Agents, TMessage, PartMetadata } from 'librechat-data-provider';import { getStepMetadata, updateContent } from './content';+type ToolTimingLookup = (+ callId: string,+ index?: number,+) => Pick<PartMetadata, 'toolPreparationStartedAt' | 'toolDispatchedAt'>;+/** Mirrors `SKILL_FILE_PREFIX` in `@librechat/api` file-authoring handlers. */const SKILL_FILE_PREFIX = 'skills/';const FILE_AUTHORING_TOOLS = new Set(['create_file', 'edit_file']);@@ -150,6 +155,7 @@ export function applyRunStepClosed(runStep: Agents.RunStep,closed: Agents.RunStepClosedEvent,editPrefixOffset: number,+ timing: Pick<PartMetadata, 'toolPreparationDurationMs' | 'toolExecutionDurationMs'> = {},): TMessage | undefined {const index = runStep.index + editPrefixOffset;const existing = message.content?.[index];