()
| 530 | } |
| 531 | |
| 532 | function createSnapshotEvent(): HookStateSnapshotEvent { |
| 533 | return { |
| 534 | eventId: 'evt-snapshot', |
| 535 | timestamp: 2, |
| 536 | source: 'client', |
| 537 | visibility: 'client-state', |
| 538 | clientId: 'chat-1', |
| 539 | hookId: 'chat-1', |
| 540 | threadId: 'thread-1', |
| 541 | hookName: 'useChat', |
| 542 | framework: 'react', |
| 543 | outputKind: 'chat', |
| 544 | state: { |
| 545 | messages: [{ id: 'message-1', role: 'user', content: 'Hello' }], |
| 546 | status: 'ready', |
| 547 | isLoading: false, |
| 548 | }, |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | function createUnregisteredEvent(): HookUnregisteredEvent { |
| 553 | return { |