From a8a3707217b979900be884a99ac3706e12784d59 Mon Sep 17 00:00:00 2001 From: Ammar Date: Tue, 28 Oct 2025 22:50:48 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=A4=96=20feat:=20Hide=20completed=20T?= =?UTF-8?q?ODOs=20while=20streaming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only show completed TODOs when chat is not streaming to reduce clutter during active work. When streaming stops, completed todos reappear to provide context on what was accomplished. - Filter out completed todos in PinnedTodoList when canInterrupt is true - Pass filtered todos to TodoList component --- src/components/PinnedTodoList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PinnedTodoList.tsx b/src/components/PinnedTodoList.tsx index 21f57d3af..41be7514f 100644 --- a/src/components/PinnedTodoList.tsx +++ b/src/components/PinnedTodoList.tsx @@ -47,7 +47,7 @@ export const PinnedTodoList: React.FC = ({ workspaceId }) = TODO{expanded ? ":" : ""} - {expanded && } + {expanded && } ); }; From c88d56001426e2eb11bd1ac3a1f5caa059f6f7bc Mon Sep 17 00:00:00 2001 From: Ammar Date: Tue, 28 Oct 2025 22:55:52 +0000 Subject: [PATCH 2/5] Fix filtering logic - show all when streaming, only completed when idle --- src/components/PinnedTodoList.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/PinnedTodoList.tsx b/src/components/PinnedTodoList.tsx index 41be7514f..434ba88a2 100644 --- a/src/components/PinnedTodoList.tsx +++ b/src/components/PinnedTodoList.tsx @@ -27,7 +27,16 @@ 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 + ); + + // Filter completed todos while streaming + const displayTodos = canInterrupt ? todos.filter((todo) => todo.status !== "completed") : todos; + + if (displayTodos.length === 0) { return null; } From f75befaacd26325189f2e52774abb2f780c411ee Mon Sep 17 00:00:00 2001 From: Ammar Date: Tue, 28 Oct 2025 22:59:01 +0000 Subject: [PATCH 3/5] Fix logic: show all when streaming, only completed when idle --- src/components/PinnedTodoList.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/PinnedTodoList.tsx b/src/components/PinnedTodoList.tsx index 434ba88a2..4c324ac99 100644 --- a/src/components/PinnedTodoList.tsx +++ b/src/components/PinnedTodoList.tsx @@ -33,8 +33,11 @@ export const PinnedTodoList: React.FC = ({ workspaceId }) = () => workspaceStore.getWorkspaceState(workspaceId).canInterrupt ); - // Filter completed todos while streaming - const displayTodos = canInterrupt ? todos.filter((todo) => todo.status !== "completed") : todos; + // 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; From c4e86df531fca1d25e1a3848f034c99d2e7441aa Mon Sep 17 00:00:00 2001 From: Ammar Date: Tue, 28 Oct 2025 23:06:09 +0000 Subject: [PATCH 4/5] Update status_set description to prevent premature commitment --- src/utils/tools/toolDefinitions.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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"), From bf5eb2936609c54a095f33a21f83196d8434d817 Mon Sep 17 00:00:00 2001 From: Ammar Date: Tue, 28 Oct 2025 23:07:44 +0000 Subject: [PATCH 5/5] Run prettier --- src/components/PinnedTodoList.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/PinnedTodoList.tsx b/src/components/PinnedTodoList.tsx index 4c324ac99..2e06db5fe 100644 --- a/src/components/PinnedTodoList.tsx +++ b/src/components/PinnedTodoList.tsx @@ -35,9 +35,7 @@ export const PinnedTodoList: React.FC = ({ workspaceId }) = // 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"); + const displayTodos = canInterrupt ? todos : todos.filter((todo) => todo.status === "completed"); if (displayTodos.length === 0) { return null;