MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / insertedPrelude

Function insertedPrelude

__tests__/mcp-stale-slice.test.ts:55–68  ·  view source on GitHub ↗

45 lines of new helpers inserted at the top — shifts every symbol down.

()

Source from the content-addressed store, hash-verified

53
54/** 45 lines of new helpers inserted at the top — shifts every symbol down. */
55function insertedPrelude(): string {
56 const parts: string[] = [];
57 for (let h = 0; h < 4; h++) {
58 parts.push(`/** inserted helper ${h} */`);
59 parts.push(`export function insertedHelper${h}(x: number): number {`);
60 for (let s = 0; s < 7; s++) {
61 parts.push(` x = x + ${s};`);
62 }
63 parts.push(` return x;`);
64 parts.push(`}`);
65 }
66 parts.push('');
67 return parts.join('\n') + '\n';
68}
69
70function getText(result: { content: Array<{ type: string; text?: string }>; isError?: boolean }): string {
71 return result.content.map((c) => c.text ?? '').join('\n');

Callers 1

shiftBigFileFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected