MCPcopy Index your code
hub / github.com/TanStack/ai / makeCtx

Function makeCtx

packages/ai-opencode/tests/translate.test.ts:15–24  ·  view source on GitHub ↗
(overrides: Partial<TranslateContext> = {})

Source from the content-addressed store, hash-verified

13import type { StreamChunk } from '@tanstack/ai'
14
15function makeCtx(overrides: Partial<TranslateContext> = {}): TranslateContext {
16 let id = 0
17 return {
18 model: 'anthropic/claude-sonnet-4-5',
19 runId: 'run-1',
20 threadId: 'thread-1',
21 genId: () => `gen-${++id}`,
22 ...overrides,
23 }
24}
25
26async function* fromArray(
27 events: Array<OpencodeStreamEvent>,

Callers 2

collectFunction · 0.70
translate.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected