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
This commit is contained in:
@@ -15,6 +15,7 @@ import { claudeSyntaxTheme } from "@/lib/claudeSyntaxTheme";
|
||||
import type { ClaudeStreamMessage } from "./AgentExecution";
|
||||
import {
|
||||
TodoWidget,
|
||||
TodoReadWidget,
|
||||
LSWidget,
|
||||
ReadWidget,
|
||||
ReadResultWidget,
|
||||
@@ -205,6 +206,12 @@ const StreamMessageComponent: React.FC<StreamMessageProps> = ({ message, classNa
|
||||
return <TodoWidget todos={input.todos} result={toolResult} />;
|
||||
}
|
||||
|
||||
// TodoRead tool
|
||||
if (toolName === "todoread") {
|
||||
renderedSomething = true;
|
||||
return <TodoReadWidget todos={input?.todos} result={toolResult} />;
|
||||
}
|
||||
|
||||
// LS tool
|
||||
if (toolName === "ls" && input?.path) {
|
||||
renderedSomething = true;
|
||||
@@ -368,7 +375,7 @@ const StreamMessageComponent: React.FC<StreamMessageProps> = ({ message, classNa
|
||||
const toolUse = prevMsg.message.content.find((c: any) => c.type === 'tool_use' && c.id === content.tool_use_id);
|
||||
if (toolUse) {
|
||||
const toolName = toolUse.name?.toLowerCase();
|
||||
const toolsWithWidgets = ['task','edit','multiedit','todowrite','ls','read','glob','bash','write','grep','websearch','webfetch'];
|
||||
const toolsWithWidgets = ['task','edit','multiedit','todowrite','todoread','ls','read','glob','bash','write','grep','websearch','webfetch'];
|
||||
if (toolsWithWidgets.includes(toolName) || toolUse.name?.startsWith('mcp__')) {
|
||||
hasCorrespondingWidget = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user