Skip to content

Commit efdce1b

Browse files
committed
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.
1 parent 067f61b commit efdce1b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/server/public_simplechat/simplechat.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,11 +1027,13 @@ class MultiChatUI {
10271027
}
10281028
let toolResult = await chat.handle_toolcall(toolCallId, toolname, this.elInToolArgs.value)
10291029
if (toolResult !== undefined) {
1030-
this.elInUser.value = ChatMessageEx.createToolCallResultAllInOne(toolCallId, toolname, toolResult);
1030+
chat.add(new ChatMessageEx(Roles.ToolTemp, ChatMessageEx.createToolCallResultAllInOne(toolCallId, toolname, toolResult)))
1031+
this.chat_show(chat.chatId)
10311032
this.ui_reset_userinput(false)
10321033
} else {
10331034
this.timers.toolcallResponseTimeout = setTimeout(() => {
1034-
this.elInUser.value = ChatMessageEx.createToolCallResultAllInOne(toolCallId, toolname, `Tool/Function call ${toolname} taking too much time, aborting...`);
1035+
chat.add(new ChatMessageEx(Roles.ToolTemp, ChatMessageEx.createToolCallResultAllInOne(toolCallId, toolname, `Tool/Function call ${toolname} taking too much time, aborting...`)))
1036+
this.chat_show(chat.chatId)
10351037
this.ui_reset_userinput(false)
10361038
}, gMe.tools.toolCallResponseTimeoutMS)
10371039
}

0 commit comments

Comments
 (0)