summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-12-10 13:07:06 +0300
committerGrail Finder <wohilas@gmail.com>2025-12-10 13:07:06 +0300
commitc80ff6066872b054b32fe83e8070ba7dd16a56ef (patch)
tree6b437a095796768588a5709e65ca3763690a439e /bot.go
parent0fc70ae44134b7771d37796f680df359dde72112 (diff)
Enha: catching tool call id
Diffstat (limited to 'bot.go')
-rw-r--r--bot.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/bot.go b/bot.go
index 90fbe96..a5f5602 100644
--- a/bot.go
+++ b/bot.go
@@ -629,6 +629,13 @@ func findCall(msg, toolCall string, tv *tview.TextView) {
}
lastToolCall.Args = openAIToolMap
fc = lastToolCall
+ // Ensure lastToolCallID is set if it's available in the tool call
+ if lastToolCallID == "" && len(openAIToolMap) > 0 {
+ // Attempt to extract ID from the parsed tool call if not already set
+ if id, exists := openAIToolMap["id"]; exists {
+ lastToolCallID = id
+ }
+ }
} else {
jsStr := toolCallRE.FindString(msg)
if jsStr == "" {