1. Remove duplicate ToolResult definition in heartbeat package - Import tools.ToolResult instead of local definition - Add nil check for handler before execution 2. Fix SpawnTool to return AsyncResult and implement AsyncTool - Add callback field and SetCallback method - Return AsyncResult instead of NewToolResult 3. Add context cancellation support to SubagentManager - Check ctx.Done() before and during task execution - Set task status to "cancelled" on cancellation - Call callback with result on completion 4. Fix data race window in CronTool.addJob - Use Lock instead of RLock for channel/chatID access - Ensure consistent snapshot during job creation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| base.go | ||
| cron.go | ||
| edit.go | ||
| edit_test.go | ||
| filesystem.go | ||
| filesystem_test.go | ||
| message.go | ||
| message_test.go | ||
| registry.go | ||
| result.go | ||
| result_test.go | ||
| shell.go | ||
| shell_test.go | ||
| spawn.go | ||
| subagent.go | ||
| subagent_tool_test.go | ||
| types.go | ||
| web.go | ||
| web_test.go | ||