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

Method beginRun

packages/ai-client/src/devtools.ts:1319–1333  ·  view source on GitHub ↗
(input: unknown)

Source from the content-addressed store, hash-verified

1317 // --- Run lifecycle (called by GenerationClient) -----------------------
1318
1319 beginRun(input: unknown): string {
1320 const runId = this.generateRunId()
1321 this.activeRunId = runId
1322 this.activeRunStarted = false
1323 this.upsertRun(runId, {
1324 input,
1325 result: null,
1326 preview: this.createPreview(null),
1327 progress: null,
1328 status: 'generating',
1329 isLoading: true,
1330 clearError: true,
1331 })
1332 return runId
1333 }
1334
1335 ensureRunStarted(runId: string): void {
1336 if (this.activeRunStarted && this.activeRunId === runId) return

Callers

nothing calls this directly

Calls 3

generateRunIdMethod · 0.95
upsertRunMethod · 0.95
createPreviewMethod · 0.95

Tested by

no test coverage detected