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

MessagesSnapshotEvent.md

41 lines983 Bytes

1---
2id: MessagesSnapshotEvent
3title: MessagesSnapshotEvent
4---
5​
6# Interface: MessagesSnapshotEvent
7​
8Defined in: [packages/typescript/ai/src/types.ts:1107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1107)
9​
10Emitted to provide a snapshot of all messages in a conversation.
11​
12Unlike StateSnapshot (which carries arbitrary application state),
13MessagesSnapshot specifically delivers the conversation transcript.
14​
15@ag-ui/core provides: `messages` (as @ag-ui/core Message[])
16TanStack AI adds: `model?`
17​
18Note: The `messages` field uses the @ag-ui/core Message type.
19Use converters to transform to/from TanStack UIMessage format.
20​
21## Extends
22​
23- `MessagesSnapshotEvent`
24​
25## Indexable
26​
27```ts
28[k: string]: unknown
29```
30​
31## Properties
32​
33### model?
34​
35```ts
36optional model: string;
37```
38​
39Defined in: [packages/typescript/ai/src/types.ts:1109](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1109)
40​
41Model identifier for multi-model support