Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

StateSnapshotEvent.md

50 lines1020 Bytes

1---
2id: StateSnapshotEvent
3title: StateSnapshotEvent
4---
5​
6# Interface: StateSnapshotEvent
7​
8Defined in: [packages/typescript/ai/src/types.ts:1118](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1118)
9​
10Emitted to provide a full state snapshot.
11​
12@ag-ui/core provides: `snapshot` (any)
13TanStack AI adds: `model?`, `state?` (deprecated alias for snapshot)
14​
15## Extends
16​
17- `StateSnapshotEvent`
18​
19## Indexable
20​
21```ts
22[k: string]: unknown
23```
24​
25## Properties
26​
27### model?
28​
29```ts
30optional model: string;
31```
32​
33Defined in: [packages/typescript/ai/src/types.ts:1120](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1120)
34​
35Model identifier for multi-model support
36​
37***
38​
39### ~~state?~~
40​
41```ts
42optional state: Record<string, unknown>;
43```
44​
45Defined in: [packages/typescript/ai/src/types.ts:1125](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1125)
46​
47#### Deprecated
48​
49Use `snapshot` instead (from @ag-ui/core spec).
50Kept for backward compatibility.