fix: Send tool display text instead of internal ID when clicking tools
All checks were successful
BotUI CI / build (push) Successful in 5m42s
All checks were successful
BotUI CI / build (push) Successful in 5m42s
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 <noreply@anthropic.com>
This commit is contained in:
parent
f0aba607e9
commit
a8bff4e1a7
1 changed files with 3 additions and 2 deletions
|
|
@ -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") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue