From a8bff4e1a7ff8512e1e2eb5368981d4c0904f41f Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Mon, 16 Feb 2026 00:04:37 +0000 Subject: [PATCH] fix: Send tool display text instead of internal ID when clicking tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed issue where clicking a tool button sent the internal ID (e.g., "03-missa") instead of the display text (e.g., "⛪ Agendar Missa") to the chat. The bug was in chat.html where invoke_tool actions were sending action.tool (the internal ID) instead of sugg.text (the user-friendly display text). Now tool buttons work correctly on the first click without sending internal IDs. Co-Authored-By: Claude Sonnet 4.5 --- ui/suite/chat/chat.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/suite/chat/chat.html b/ui/suite/chat/chat.html index eae0d4b..74e4495 100644 --- a/ui/suite/chat/chat.html +++ b/ui/suite/chat/chat.html @@ -794,8 +794,9 @@ console.log("Parsed action:", action); if (action.type === "invoke_tool") { - // Send the tool name as text - the backend will handle tool invocation - window.sendMessage(action.tool); + // Send the display text so it shows correctly in chat + // The backend will recognize this as a tool request + window.sendMessage(sugg.text); } else if (action.type === "send_message") { window.sendMessage(action.message || sugg.text); } else if (action.type === "select_context") {