diff --git a/src/components/PinnedTodoList.tsx b/src/components/PinnedTodoList.tsx index 21f57d3af..2e06db5fe 100644 --- a/src/components/PinnedTodoList.tsx +++ b/src/components/PinnedTodoList.tsx @@ -27,7 +27,17 @@ export const PinnedTodoList: React.FC = ({ workspaceId }) = () => workspaceStore.getWorkspaceState(workspaceId).todos ); - if (todos.length === 0) { + // Get streaming state + const canInterrupt = useSyncExternalStore( + (callback) => workspaceStore.subscribeKey(workspaceId, callback), + () => workspaceStore.getWorkspaceState(workspaceId).canInterrupt + ); + + // When idle (not streaming), only show completed todos for clean summary + // When streaming, show all todos so user can see active work + const displayTodos = canInterrupt ? todos : todos.filter((todo) => todo.status === "completed"); + + if (displayTodos.length === 0) { return null; } @@ -47,7 +57,7 @@ export const PinnedTodoList: React.FC = ({ workspaceId }) = TODO{expanded ? ":" : ""} - {expanded && } + {expanded && } ); }; diff --git a/src/utils/tools/toolDefinitions.ts b/src/utils/tools/toolDefinitions.ts index 58fb11f81..a310d8e13 100644 --- a/src/utils/tools/toolDefinitions.ts +++ b/src/utils/tools/toolDefinitions.ts @@ -183,12 +183,17 @@ export const TOOL_DEFINITIONS = { }, status_set: { description: - "Set a status indicator to show what the agent is currently doing. " + - "The emoji appears left of the streaming indicator, and the message shows on hover. " + - "The status is set IMMEDIATELY when this tool is called, even before other tool calls complete. " + - "IMPORTANT: Always set a status at the start of each response and update it as your work progresses. " + - "The status is cleared when a new user message comes in, so you must set it again for each response. " + - "Use this to communicate ongoing activities and set a final status before completing that reflects the outcome.", + "Set a status indicator to show what Assistant is currently doing. The status is set IMMEDIATELY \n" + + "when this tool is called, even before other tool calls complete.\n" + + "\n" + + "WHEN TO SET STATUS:\n" + + "- Set status when beginning concrete work (file edits, running tests, executing commands)\n" + + "- Update status as work progresses through distinct phases\n" + + "- Set a final status before completing that reflects the outcome\n" + + "- DO NOT set status during initial exploration, file reading, or planning phases\n" + + "\n" + + "The status is cleared when a new user message comes in. Validate your approach is feasible \n" + + "before setting status - failed tool calls after setting status indicate premature commitment.", schema: z .object({ emoji: z.string().describe("A single emoji character representing the current activity"),