MCPcopy
hub / github.com/ChatGPTNextWeb/NextChat / onAfterTool

Function onAfterTool

app/store/chat.ts:488–497  ·  view source on GitHub ↗
(tool: ChatMessageTool)

Source from the content-addressed store, hash-verified

486 });
487 },
488 onAfterTool(tool: ChatMessageTool) {
489 botMessage?.tools?.forEach((t, i, tools) => {
490 if (tool.id == t.id) {
491 tools[i] = { ...tool };
492 }
493 });
494 get().updateTargetSession(session, (session) => {
495 session.messages = session.messages.concat();
496 });
497 },
498 onError(error) {
499 const isAborted = error.message?.includes?.("aborted");
500 botMessage.content +=

Callers

nothing calls this directly

Calls 1

getFunction · 0.70

Tested by

no test coverage detected