MCPcopy
hub / github.com/TanStack/ai / createErrorChunks

Function createErrorChunks

packages/ai-vue/tests/use-generation.test.ts:66–76  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

64
65// Helper to create error stream chunks
66function createErrorChunks(message: string): Array<StreamChunk> {
67 return [
68 { type: 'RUN_STARTED', runId: 'run-1', timestamp: Date.now() },
69 {
70 type: 'RUN_ERROR',
71 runId: 'run-1',
72 error: { message },
73 timestamp: Date.now(),
74 },
75 ] as unknown as Array<StreamChunk>
76}
77
78/**
79 * Renders a Vue composable inside a minimal defineComponent wrapper.

Callers 1

Calls 1

nowMethod · 0.80

Tested by

no test coverage detected