diff --git a/packages/vscode-webui/src/features/tools/__stories__/new-task-tool-gallery.stories.tsx b/packages/vscode-webui/src/features/tools/__stories__/new-task-tool-gallery.stories.tsx
index 8582982526..fd6c003d3b 100644
--- a/packages/vscode-webui/src/features/tools/__stories__/new-task-tool-gallery.stories.tsx
+++ b/packages/vscode-webui/src/features/tools/__stories__/new-task-tool-gallery.stories.tsx
@@ -231,3 +231,42 @@ export const Variants: Story = {
],
},
};
+
+export const CollapsedWithTodos: Story = {
+ args: {
+ tools: [
+ {
+ ...newTaskProps1,
+ toolCallId: `${newTaskProps1.toolCallId}-collapsed-with-todos`,
+ // @ts-expect-error - Adding custom prop for Storybook
+ taskThreadSource: {
+ messages: mockMessages,
+ todos: [
+ {
+ id: "todo-1",
+ content:
+ "Search for occurrences of enablePochiModels, useEnablePochiModels, and updateEnablePochiModels in the codebase",
+ status: "completed",
+ priority: "high",
+ },
+ {
+ id: "todo-2",
+ content:
+ "Analyze the search results and extract relevant code snippets and file paths",
+ status: "completed",
+ priority: "high",
+ },
+ {
+ id: "todo-3",
+ content:
+ "Present the final findings and code snippets to the user",
+ status: "pending",
+ priority: "medium",
+ },
+ ],
+ isLoading: false,
+ },
+ },
+ ],
+ },
+};
diff --git a/packages/vscode-webui/src/features/tools/__stories__/subtask-agent.stories.tsx b/packages/vscode-webui/src/features/tools/__stories__/subtask-agent.stories.tsx
index 765d90168e..4130a5c388 100644
--- a/packages/vscode-webui/src/features/tools/__stories__/subtask-agent.stories.tsx
+++ b/packages/vscode-webui/src/features/tools/__stories__/subtask-agent.stories.tsx
@@ -89,7 +89,20 @@ const overviewMessage: Message = {
task: {
messages: subtaskMessages,
clientTaskId: "task-inline-1",
- todos: [],
+ todos: [
+ {
+ id: "todo-seq",
+ content: "Run seq 7 command to generate numbers",
+ status: "completed",
+ priority: "high",
+ },
+ {
+ id: "todo-verify",
+ content: "Verify that the numbers 1 to 7 are printed",
+ status: "completed",
+ priority: "medium",
+ },
+ ],
},
},
},
diff --git a/packages/vscode-webui/src/features/tools/components/new-task/index.tsx b/packages/vscode-webui/src/features/tools/components/new-task/index.tsx
index 2ceba1bfeb..fa2f889e5f 100644
--- a/packages/vscode-webui/src/features/tools/components/new-task/index.tsx
+++ b/packages/vscode-webui/src/features/tools/components/new-task/index.tsx
@@ -113,12 +113,26 @@ function NewTaskToolView(props: NewTaskToolViewProps) {
) : undefined;
}, [agent, showMessageList, taskThreadSource, toolCallStatusRegistryRef]);
+ const detail = useMemo(() => {
+ if (!taskThreadSource) {
+ return undefined;
+ }
+ return (
+
+ );
+ }, [taskThreadSource]);
+
if (agentType === "browser") {
return ;
}
@@ -175,6 +189,7 @@ function NewTaskToolView(props: NewTaskToolViewProps) {
diff --git a/packages/vscode-webui/src/features/tools/components/tool-container.tsx b/packages/vscode-webui/src/features/tools/components/tool-container.tsx
index a03966787f..d87046862f 100644
--- a/packages/vscode-webui/src/features/tools/components/tool-container.tsx
+++ b/packages/vscode-webui/src/features/tools/components/tool-container.tsx
@@ -102,8 +102,8 @@ export const ExpandableToolContainer: React.FC<{
/>
)}
- {showDetails && expandableDetail}
{detail}
+ {showDetails && expandableDetail}
);
};