summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-12-18 11:53:07 +0300
committerGrail Finder <wohilas@gmail.com>2025-12-18 11:53:07 +0300
commita06cfd995f05782854844e51a71a656f70274f64 (patch)
tree8550a63a928771c758ac051f23ac12613d053f27 /bot.go
parentd73c3abd6bda8690e8b5e57342221c8cb2cc88b3 (diff)
Feat: add agent entity
Diffstat (limited to 'bot.go')
-rw-r--r--bot.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot.go b/bot.go
index 8a0ba0a..ddc6d2a 100644
--- a/bot.go
+++ b/bot.go
@@ -756,7 +756,7 @@ func findCall(msg, toolCall string, tv *tview.TextView) {
}
}
// call a func
- f, ok := fnMap[fc.Name]
+ _, ok := fnMap[fc.Name]
if !ok {
m := fc.Name + " is not implemented"
// Create tool response message with the proper tool_call_id
@@ -775,7 +775,7 @@ func findCall(msg, toolCall string, tv *tview.TextView) {
chatRound("", cfg.AssistantRole, tv, false, false)
return
}
- resp := f(fc.Args)
+ resp := callToolWithAgent(fc.Name, fc.Args)
toolMsg := string(resp) // Remove the "tool response: " prefix and %+v formatting
logger.Info("llm used tool call", "tool_resp", toolMsg, "tool_attrs", fc)
fmt.Fprintf(tv, "%s[-:-:b](%d) <%s>: [-:-:-]\n%s\n",