fix: Update chat UI components
Some checks failed
BotUI CI / build (push) Failing after 1s

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-03-31 19:55:34 -03:00
parent bf67e1c54b
commit b7cc7cb394
2 changed files with 16 additions and 6 deletions

View file

@ -829,9 +829,14 @@
console.log("Parsed action:", action); console.log("Parsed action:", action);
if (action.type === "invoke_tool") { if (action.type === "invoke_tool") {
// Send the display text so it shows correctly in chat // Check if tool needs parameters
// The backend will recognize this as a tool request if (action.prompt_for_params) {
window.sendMessage(sugg.text); // 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") { } else if (action.type === "send_message") {
window.sendMessage( window.sendMessage(
action.message || sugg.text, action.message || sugg.text,

View file

@ -1041,9 +1041,14 @@
console.log("Parsed action:", action); console.log("Parsed action:", action);
if (action.type === "invoke_tool") { if (action.type === "invoke_tool") {
// Send the display text so it shows correctly in chat // Check if tool needs parameters
// The backend will recognize this as a tool request if (action.prompt_for_params) {
window.sendMessage(sugg.text); // 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") { } else if (action.type === "send_message") {
window.sendMessage( window.sendMessage(
action.message || sugg.text, action.message || sugg.text,