Add todo tools

This commit is contained in:
Alex Gleason committed 2026-01-22 00:42:01 -06:00
1 parent 87956df961
commit ec5dc6d963
8 files changed
+893 -5

No files matched your search

+5 -1
View File
@@ -44,6 +44,8 @@ import { ConfigureImageGenerationTool } from '@/lib/tools/ConfigureImageGenerati
import { WebFetchTool } from '@/lib/tools/WebFetchTool';
import { WebSearchTool } from '@/lib/tools/WebSearchTool';
import { createMCPTools } from '@/lib/tools/MCPTool';
import { TodoWriteTool } from '@/lib/tools/TodoWriteTool';
import { TodoReadTool } from '@/lib/tools/TodoReadTool';
import { ProjectPreviewConsoleError } from '@/lib/consoleMessages';
import { toolToOpenAI } from '@/lib/tools/openai-adapter';
import { Tool } from '@/lib/tools/Tool';
@@ -203,6 +205,8 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
skill: new SkillTool(fs, pluginsPath, cwd),
webfetch: new WebFetchTool({ corsProxy: config.corsProxy }),
websearch: new WebSearchTool(),
todowrite: new TodoWriteTool(fs, projectId),
todoread: new TodoReadTool(fs, projectId),
};
// Add generate_image tool if imageModel is configured
@@ -254,7 +258,7 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
}
return tools;
}, [fs, git, cwd, user, projectsPath, tmpPath, pluginsPath, config.corsProxy, settings, aiSettings, models, handleFileChanged, handleCommit]);
}, [fs, git, cwd, user, projectsPath, tmpPath, pluginsPath, config.corsProxy, settings, aiSettings, models, handleFileChanged, handleCommit, projectId]);
// MCP tools wrapped for execution
const mcpToolWrappers = useMemo(() => createMCPTools(mcpClients), [mcpClients]);