From c80ff6066872b054b32fe83e8070ba7dd16a56ef Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Wed, 10 Dec 2025 13:07:06 +0300 Subject: Enha: catching tool call id --- bot.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bot.go') 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 == "" { -- cgit v1.2.3