MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / endTool

Function endTool

e2e/src/clients/agent-chat-tui.ts:84–90  ·  view source on GitHub ↗
(ok: boolean, result?: string, seconds?: number)

Source from the content-addressed store, hash-verified

82};
83
84const endTool = (ok: boolean, result?: string, seconds?: number) => {
85 if (spinnerTimer) clearInterval(spinnerTimer);
86 spinnerTimer = undefined;
87 const mark = ok ? `${GREEN}✓${RESET}` : `${RED}✗ ${spinnerName}${RESET}`;
88 const took = seconds !== undefined ? `${DIM}${seconds.toFixed(1)}s${RESET} ` : "";
89 out(`${CLEAR_LINE} ${mark} ${took}${DIM}${(result ?? "").slice(0, 88)}${RESET}\n`);
90};
91
92const handle = async (event: TheaterEvent): Promise<boolean> => {
93 switch (event.type) {

Callers 1

handleFunction · 0.85

Calls 1

outFunction · 0.85

Tested by

no test coverage detected