diff --git a/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx b/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx index dd80e95d78..26176ba410 100644 --- a/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx +++ b/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from 'react'; import { useRecoilValue } from 'recoil'; import { Terminal } from 'lucide-react'; +import type { ToolCallPhase } from '~/utils/toolCallPhase'; import { useProgress, useLocalize } from '~/hooks'; import ProgressText from './ProgressText'; import MarkdownLite from './MarkdownLite'; @@ -46,14 +47,22 @@ export default function CodeAnalyze({ return acc; }, ''); + /** + * The legacy assistants-endpoint card: it never receives run-step metadata, + * so it genuinely has only these two states and maps them directly rather + * than through `resolveToolCallPhase`, which needs signals this card has no + * access to. The announcement and the icon below read this same value. + */ + const phase: ToolCallPhase = progress < 1 ? 'running' : 'completed'; + return ( <> - {progress < 1 ? localize('com_ui_analyzing') : localize('com_ui_analyzing_finished')} + {phase === 'running' ? localize('com_ui_analyzing') : localize('com_ui_analyzing_finished')}