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

Function latestSnapshotState

packages/ai-client/tests/generation-devtools.test.ts:119–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117 }
118
119 function latestSnapshotState() {
120 const snapshot = eventClientMock.emitted('hook:state-snapshot').at(-1)?.[1]
121 if (!isSnapshotStatePayload(snapshot)) {
122 throw new Error('Expected a hook state snapshot payload')
123 }
124 return snapshot.state
125 }
126
127 function latestGenerationRuns() {
128 const runs = latestSnapshotState().runs

Callers 2

latestGenerationRunsFunction · 0.85

Calls 1

isSnapshotStatePayloadFunction · 0.85

Tested by

no test coverage detected