fix(frontend): add toolId to agent_carousel and execution_started for deduplication

The spinner widget wasn't disappearing after operations completed because
parseToolResponse() wasn't returning toolId for agent_carousel and
execution_started types. The deduplication logic in useChatContainer
needs toolId to match completed responses with pending operation messages.
This commit is contained in:
Zamil Majdy
2026-01-27 14:47:02 -06:00
parent 6525388d81
commit 8de9af0156
2 changed files with 4 additions and 0 deletions

View File

@@ -304,6 +304,7 @@ export function parseToolResponse(
if (isAgentArray(agentsData)) {
return {
type: "agent_carousel",
toolId,
toolName: "agent_carousel",
agents: agentsData,
totalCount: parsedResult.total_count as number | undefined,
@@ -316,6 +317,7 @@ export function parseToolResponse(
if (responseType === "execution_started") {
return {
type: "execution_started",
toolId,
toolName: "execution_started",
executionId: (parsedResult.execution_id as string) || "",
agentName: (parsedResult.graph_name as string) || undefined,

View File

@@ -61,6 +61,7 @@ export type ChatMessageData =
}
| {
type: "agent_carousel";
toolId: string;
toolName: string;
agents: Array<{
id: string;
@@ -74,6 +75,7 @@ export type ChatMessageData =
}
| {
type: "execution_started";
toolId: string;
toolName: string;
executionId: string;
agentName?: string;