添加新的工具功能和测试覆盖:

- 注册 `LsTool` 和 `BashTool` 工具,支持目录操作和命令执行
- 增强工具调用逻辑,添加日志记录以提升调试能力
- 增加 `ToolRegistry` 和 `RunLoop` 的增量累积与排序优化
- 完善单元测试覆盖新工具的执行与行为验证
This commit is contained in:
2025-12-23 17:26:27 +08:00
parent 78875ec3eb
commit 71226c255b
11 changed files with 721 additions and 25 deletions

View File

@@ -36,6 +36,8 @@ class ToolRunJob implements ShouldQueue
{
$call = ToolCall::fromArray($this->toolCall);
logger('ToolRunJob call:', $call->toArray());
if ($cancelChecker->isCanceled($this->sessionId, $call->parentRunId)) {
$sink->appendRunStatus($this->sessionId, $call->runId, 'CANCELED', [
'dedupe_key' => "run:{$call->runId}:status:CANCELED",