MCPcopy Index your code
hub / github.com/garrytan/gstack / toolResultText

Function toolResultText

test/skill-e2e-first-task-scaffold.test.ts:39–50  ·  view source on GitHub ↗

Concatenated Bash tool_result text from the stream-json transcript.

(transcript: any[])

Source from the content-addressed store, hash-verified

37
38/** Concatenated Bash tool_result text from the stream-json transcript. */
39function toolResultText(transcript: any[]): string {
40 const chunks: string[] = [];
41 for (const event of transcript) {
42 if (event.type !== 'user') continue;
43 for (const item of event.message?.content ?? []) {
44 if (item.type !== 'tool_result') continue;
45 if (typeof item.content === 'string') chunks.push(item.content);
46 else for (const c of item.content ?? []) if (c.type === 'text') chunks.push(c.text);
47 }
48 }
49 return chunks.join('\n');
50}
51
52async function detectVia(workDir: string, testName: string): Promise<string> {
53 const result = await runSkillTest({

Callers 1

detectViaFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected