From fe0cc8bef13e17cd5ed080d8ed66be1d4c2f48af Mon Sep 17 00:00:00 2001 From: hanishkvc Date: Sun, 9 Nov 2025 00:23:40 +0530 Subject: [PATCH] SimpleChatTC:NSChatMessage: fix up initial go Allow for empty tool call results Block no content response from user role only. Also change for console.debug to console.log so people can see the blocking of empty response from user, in the browser console. --- tools/server/public_simplechat/simplechat.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/server/public_simplechat/simplechat.js b/tools/server/public_simplechat/simplechat.js index 30f9a837ab..94331d374f 100644 --- a/tools/server/public_simplechat/simplechat.js +++ b/tools/server/public_simplechat/simplechat.js @@ -1280,13 +1280,13 @@ class MultiChatUI { chat.add_system_anytime(this.elInSystem.value, chatId); let content = this.elInUser.value; - if (content.trim() == "") { - console.debug(`WARN:SimpleChat:MCUI:${chatId}:HandleUserSubmit:Ignoring empty user input...`); - return; - } if (this.elInUser.dataset.role == Roles.ToolTemp) { chat.promote_tooltemp(content) } else { + if (content.trim() == "") { + console.log(`WARN:SimpleChat:MCUI:${chatId}:HandleUserSubmit:Ignoring empty user input...`); + return; + } chat.add(new ChatMessageEx(new NSChatMessage(Roles.User, content))) } this.chat_show(chat.chatId);