MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / mkHistory

Function mkHistory

test/result-aging.test.ts:7–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5const bigLog = 'line\n'.repeat(12_000) + 'ERROR: build failed at src/App.tsx:42';
6
7const mkHistory = (): Message[] => ([
8 { role: 'user', content: 'fix the build' },
9 { role: 'assistant', content: 'running build' },
10 { role: 'tool', tool_call_id: '1', name: 'shell', content: bigLog } as any,
11 { role: 'assistant', content: 'reading file' },
12 { role: 'tool', tool_call_id: '2', name: 'read_file', content: 'x'.repeat(20_000) } as any,
13 { role: 'assistant', content: 'editing' },
14 { role: 'tool', tool_call_id: '3', name: 'shell', content: 'y'.repeat(9_000) } as any,
15 { role: 'assistant', content: 'done?' },
16]);
17
18describe('ageToolResults', () => {
19 it('ages a large old shell log to a head+tail stub, preserving the trailing error', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected