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

Method ensureRunStarted

packages/ai-client/src/devtools.ts:1335–1355  ·  view source on GitHub ↗
(runId: string)

Source from the content-addressed store, hash-verified

1333 }
1334
1335 ensureRunStarted(runId: string): void {
1336 if (this.activeRunStarted && this.activeRunId === runId) return
1337
1338 if (
1339 !this.activeRunStarted &&
1340 this.activeRunId &&
1341 this.activeRunId !== runId
1342 ) {
1343 this.renameRun(this.activeRunId, runId)
1344 }
1345
1346 this.activeRunId = runId
1347 this.activeRunStarted = true
1348 this.upsertRun(runId, {
1349 status: 'generating',
1350 isLoading: true,
1351 clearError: true,
1352 })
1353 this.emitRunLifecycle('run:started', runId, 'started')
1354 this.emitState()
1355 }
1356
1357 finishRun(
1358 runId: string,

Callers 5

finishRunMethod · 0.95
generateWithFetcherMethod · 0.45
processStreamMethod · 0.45
generateMethod · 0.45
processStreamMethod · 0.45

Calls 4

renameRunMethod · 0.95
upsertRunMethod · 0.95
emitStateMethod · 0.95
emitRunLifecycleMethod · 0.45

Tested by

no test coverage detected