Batch 工具
Batch 工具用于批处理命令(实验性)。
概述
Batch 工具允许 AI 助手批量执行多个命令。它支持:
- 并行执行
- 错误处理
- 结果汇总
定义位置
packages/opencode/src/tool/batch.ts
典型使用场景
场景 1:批量运行测试
await BatchTool.execute({
commands: [
"npm test:unit",
"npm test:integration",
],
}, ctx)
Batch 工具用于批处理命令(实验性)。
Batch 工具允许 AI 助手批量执行多个命令。它支持:
packages/opencode/src/tool/batch.tsawait BatchTool.execute({
commands: [
"npm test:unit",
"npm test:integration",
],
}, ctx)