feat(loop): support external CLI tools (cli-wrapper) in task management

- Fix missing i18n translations: loop.add, loop.save, loop.cancel
- Replace hardcoded validTools with dynamic tool loading from cli-tools.json
- Support external CLI wrappers (like doubao) in task creation and updates
- Add getEnabledToolsList() helper to fetch enabled tools dynamically
- Update mapIssueToolToLoopTool() to accept any string tool name
- Update validateTool() to use dynamic tool list
- Change LoopTask.tool type from specific strings to string (accepts any tool)

This allows tasks to use any enabled CLI tool from configuration,
including builtin tools, cli-wrappers, and api-endpoints, not just
the hardcoded ['bash', 'gemini', 'codex', 'qwen', 'claude'].
This commit is contained in:
catlog22
2026-01-22 12:43:37 +08:00
parent 21fbdbc55e
commit 5fa7524ad7
3 changed files with 35 additions and 8 deletions

View File

@@ -22,8 +22,8 @@ export interface LoopTask {
/** Task description (what to do) */
description: string;
/** CLI tool to use */
tool: 'bash' | 'gemini' | 'codex' | 'qwen' | 'claude';
/** CLI tool to use (bash, builtin tools, cli-wrapper, api-endpoint) */
tool: string;
/** Execution mode */
mode: 'analysis' | 'write' | 'review';