Skip to content

Commit 7accf1c

Browse files
committed
feat(components): add comprehensive TodoReadWidget with advanced viewing capabilities
- Add TodoReadWidget component with multiple view modes (list, board, timeline, stats) - Implement search and filtering functionality for todo items - Add export capabilities (JSON and Markdown formats) - Include rich UI with animations, progress tracking, and interactive elements - Integrate TodoReadWidget into StreamMessage component for todoread tool support - Add status indicators, dependency tracking, and completion rate calculations
1 parent 19cf623 commit 7accf1c

File tree

2 files changed

+520
-1
lines changed

2 files changed

+520
-1
lines changed

src/components/StreamMessage.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { claudeSyntaxTheme } from "@/lib/claudeSyntaxTheme";
1515
import type { ClaudeStreamMessage } from "./AgentExecution";
1616
import {
1717
TodoWidget,
18+
TodoReadWidget,
1819
LSWidget,
1920
ReadWidget,
2021
ReadResultWidget,
@@ -205,6 +206,12 @@ const StreamMessageComponent: React.FC<StreamMessageProps> = ({ message, classNa
205206
return <TodoWidget todos={input.todos} result={toolResult} />;
206207
}
207208

209+
// TodoRead tool
210+
if (toolName === "todoread") {
211+
renderedSomething = true;
212+
return <TodoReadWidget todos={input?.todos} result={toolResult} />;
213+
}
214+
208215
// LS tool
209216
if (toolName === "ls" && input?.path) {
210217
renderedSomething = true;
@@ -368,7 +375,7 @@ const StreamMessageComponent: React.FC<StreamMessageProps> = ({ message, classNa
368375
const toolUse = prevMsg.message.content.find((c: any) => c.type === 'tool_use' && c.id === content.tool_use_id);
369376
if (toolUse) {
370377
const toolName = toolUse.name?.toLowerCase();
371-
const toolsWithWidgets = ['task','edit','multiedit','todowrite','ls','read','glob','bash','write','grep','websearch','webfetch'];
378+
const toolsWithWidgets = ['task','edit','multiedit','todowrite','todoread','ls','read','glob','bash','write','grep','websearch','webfetch'];
372379
if (toolsWithWidgets.includes(toolName) || toolUse.name?.startsWith('mcp__')) {
373380
hasCorrespondingWidget = true;
374381
}

0 commit comments

Comments
 (0)