From 9368689a0883987bdce430dfccdc294e245cd51a Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Thu, 16 Apr 2026 00:39:23 +0200 Subject: [PATCH] fix(client): ensure tool call keys are strings Signed-off-by: Tomas Slusny --- lua/CopilotChat/client.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/CopilotChat/client.lua b/lua/CopilotChat/client.lua index e8383b8c..585e01aa 100644 --- a/lua/CopilotChat/client.lua +++ b/lua/CopilotChat/client.lua @@ -445,7 +445,7 @@ function Client:ask(opts) if out.tool_calls then for _, tool_call in ipairs(out.tool_calls) do - local key = tool_call.id or tool_call.index or tool_call.name or (#tool_calls:values() + 1) + local key = tostring(tool_call.index or tool_call.id or tool_call.name or #tool_calls:values() + 1) local existing = tool_calls:get(key) if not existing then