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

Function startTool

e2e/src/clients/agent-chat-tui.ts:71–82  ·  view source on GitHub ↗
(name: string, input?: readonly string[])

Source from the content-addressed store, hash-verified

69// ⠼ running…
70// ✓ 2.3s {"ok":true,"slug":"resend","toolCount":9}
71const startTool = (name: string, input?: readonly string[]) => {
72 spinnerName = name;
73 out(`\n ${MAGENTA}⚙${RESET} ${BOLD}${name}${RESET}\n`);
74 for (const line of input ?? []) {
75 out(` ${DIM}│ ${line.slice(0, 92)}${RESET}\n`);
76 }
77 let frame = 0;
78 spinnerTimer = setInterval(() => {
79 out(`${CLEAR_LINE} ${CYAN}${SPINNER[frame % SPINNER.length]}${RESET} ${DIM}running…${RESET}`);
80 frame += 1;
81 }, 80);
82};
83
84const endTool = (ok: boolean, result?: string, seconds?: number) => {
85 if (spinnerTimer) clearInterval(spinnerTimer);

Callers 1

handleFunction · 0.85

Calls 1

outFunction · 0.85

Tested by

no test coverage detected