Skip to content

Commit ed28b01

Browse files
authored
fix(client): ensure tool call keys are strings (#1553)
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
1 parent 1372a57 commit ed28b01

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/CopilotChat/client.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ function Client:ask(opts)
445445

446446
if out.tool_calls then
447447
for _, tool_call in ipairs(out.tool_calls) do
448-
local key = tool_call.id or tool_call.index or tool_call.name or (#tool_calls:values() + 1)
448+
local key = tostring(tool_call.index or tool_call.id or tool_call.name or #tool_calls:values() + 1)
449449
local existing = tool_calls:get(key)
450450

451451
if not existing then

0 commit comments

Comments
 (0)