refactor(core): rename TaskTool to AgentTool

Rename the Task tool to Agent tool for clearer semantics and better
alignment with industry terminology. This change includes:

- Rename TaskTool -> AgentTool, TaskParams -> AgentParams
- Rename TaskResultDisplay -> AgentResultDisplay
- Add 'Explore' built-in agent for read-only codebase exploration
- Add backward compatibility mappings for legacy tool names
- Improve Agent tool description with clearer usage guidelines
- Add case-insensitive agent name matching
- Fallback to built-in agents when subagent loading fails

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
tanzhenxin 2026-03-19 14:55:14 +08:00
parent 27356c1bac
commit 8891f4219d
37 changed files with 433 additions and 323 deletions

View file

@ -100,6 +100,10 @@ function formatToolDescription(
const invocation = tool.build(args);
return invocation.getDescription();
} catch {
// Fallback: use the description arg directly if available
if (typeof args['description'] === 'string') {
return args['description'];
}
return '';
}
}