From b7cc7cb39430758072eb1eda40c64e3974fc9582 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Tue, 31 Mar 2026 19:55:34 -0300 Subject: [PATCH] fix: Update chat UI components --- ui/suite/chat/chat.html | 11 ++++++++--- ui/suite/partials/chat.html | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ui/suite/chat/chat.html b/ui/suite/chat/chat.html index 224ebc6..83f4f8f 100644 --- a/ui/suite/chat/chat.html +++ b/ui/suite/chat/chat.html @@ -829,9 +829,14 @@ console.log("Parsed action:", action); if (action.type === "invoke_tool") { - // Send the display text so it shows correctly in chat - // The backend will recognize this as a tool request - window.sendMessage(sugg.text); + // Check if tool needs parameters + if (action.prompt_for_params) { + // Need parameters, send text as message + window.sendMessage(sugg.text); + } else { + // No params needed - invoke tool directly + window.sendMessage("/tool " + action.tool); + } } else if (action.type === "send_message") { window.sendMessage( action.message || sugg.text, diff --git a/ui/suite/partials/chat.html b/ui/suite/partials/chat.html index 183691c..84065f6 100644 --- a/ui/suite/partials/chat.html +++ b/ui/suite/partials/chat.html @@ -1041,9 +1041,14 @@ console.log("Parsed action:", action); if (action.type === "invoke_tool") { - // Send the display text so it shows correctly in chat - // The backend will recognize this as a tool request - window.sendMessage(sugg.text); + // Check if tool needs parameters + if (action.prompt_for_params) { + // Need parameters, send text as message + window.sendMessage(sugg.text); + } else { + // No params needed - invoke tool directly + window.sendMessage("/tool " + action.tool); + } } else if (action.type === "send_message") { window.sendMessage( action.message || sugg.text,