SimpleChatTC:ToolCallErrPath:ToolTemp and MultiChatUIChatShow

Update the immidiate tool call triggering failure and tool call
response timeout paths to use the new ToolTemp and MultiChatUI
based chat show logics.

Actual tool call itself generating errors, is already handled
in the previous commit changes.
This commit is contained in:
hanishkvc 2025-10-28 01:43:52 +05:30
parent e79faebde1
commit 4eb3322017
1 changed files with 4 additions and 2 deletions

View File

@ -1027,11 +1027,13 @@ class MultiChatUI {
}
let toolResult = await chat.handle_toolcall(toolCallId, toolname, this.elInToolArgs.value)
if (toolResult !== undefined) {
this.elInUser.value = ChatMessageEx.createToolCallResultAllInOne(toolCallId, toolname, toolResult);
chat.add(new ChatMessageEx(Roles.ToolTemp, ChatMessageEx.createToolCallResultAllInOne(toolCallId, toolname, toolResult)))
this.chat_show(chat.chatId)
this.ui_reset_userinput(false)
} else {
this.timers.toolcallResponseTimeout = setTimeout(() => {
this.elInUser.value = ChatMessageEx.createToolCallResultAllInOne(toolCallId, toolname, `Tool/Function call ${toolname} taking too much time, aborting...`);
chat.add(new ChatMessageEx(Roles.ToolTemp, ChatMessageEx.createToolCallResultAllInOne(toolCallId, toolname, `Tool/Function call ${toolname} taking too much time, aborting...`)))
this.chat_show(chat.chatId)
this.ui_reset_userinput(false)
}, gMe.tools.toolCallResponseTimeoutMS)
}