Open History to see the last commit
1// Re-export test utilities from ai-client
2
3export {
4 createMockConnectionAdapter,
5 createTextChunks,
6 createToolCallChunks,
7} from '../../ai-client/tests/test-utils'
8
9export function createInterruptResumeSnapshot() {
10 const pendingInterrupts = [
11 {
12 id: 'staged-interrupt',
13 reason: 'confirmation',
14 metadata: {
15 'tanstack:interruptBinding': {
16 kind: 'generic' as const,
17 interruptId: 'staged-interrupt',
18 interruptedRunId: 'run-1',
19 generation: 1,
20 responseSchemaHash: 'none',
21 },
22 },
23 },
24 {
25 id: 'invalid-interrupt',
26 reason: 'confirmation',
27 metadata: {
28 'tanstack:interruptBinding': {
29 kind: 'generic' as const,
30 interruptId: 'invalid-interrupt',
31 interruptedRunId: 'run-1',
32 generation: 1,
33 responseSchemaHash: 'none',
34 },
35 },
36 },
37 ]
38
39 return {
40 resumeState: { threadId: 'thread-1', runId: 'run-1' },
41 pendingInterrupts,
42 }
43}