fix(chat): remove loadHistory run completion inference, rely on Gateway events
loadHistory repeatedly set sending=false during server-side tool execution by incorrectly inferring run completion from message content. Run completion is now ONLY signalled by: 1. Gateway's phase 'completed' event (gateway.ts) 2. Streaming 'final' event (runtime-event-handlers.ts) 3. Safety timeout after 90s of no events Also: fully controlled graph expanded prop, stable key, card.active decoupled from streamingReplyText, suppressThinking prop. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@ interface ExecutionGraphCardProps {
|
||||
agentLabel: string;
|
||||
steps: TaskStep[];
|
||||
active: boolean;
|
||||
/** Hide the trailing "Thinking ..." indicator even when active. */
|
||||
suppressThinking?: boolean;
|
||||
/**
|
||||
* When provided, the card becomes fully controlled: the parent owns the
|
||||
* expand state (e.g. to persist across remounts) and toggling goes through
|
||||
@@ -149,6 +151,7 @@ export function ExecutionGraphCard({
|
||||
agentLabel,
|
||||
steps,
|
||||
active,
|
||||
suppressThinking = false,
|
||||
expanded: controlledExpanded,
|
||||
onExpandedChange,
|
||||
}: ExecutionGraphCardProps) {
|
||||
@@ -175,7 +178,7 @@ export function ExecutionGraphCard({
|
||||
|
||||
const toolCount = steps.filter((step) => step.kind === 'tool').length;
|
||||
const processCount = steps.length - toolCount;
|
||||
const shouldShowTrailingThinking = active;
|
||||
const shouldShowTrailingThinking = active && !suppressThinking;
|
||||
|
||||
if (!expanded) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user