Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/components/PinnedTodoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@ export const PinnedTodoList: React.FC<PinnedTodoListProps> = ({ 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;
}

Expand All @@ -47,7 +57,7 @@ export const PinnedTodoList: React.FC<PinnedTodoListProps> = ({ workspaceId }) =
</span>
TODO{expanded ? ":" : ""}
</div>
{expanded && <TodoList todos={todos} />}
{expanded && <TodoList todos={displayTodos} />}
</div>
);
};
17 changes: 11 additions & 6 deletions src/utils/tools/toolDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down