We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54266b9 commit d7bfe16Copy full SHA for d7bfe16
1 file changed
apps/sim/app/api/copilot/chat/update-messages/route.test.ts
@@ -327,7 +327,35 @@ describe('Copilot Chat Update Messages API Route', () => {
327
})
328
329
expect(mockSet).toHaveBeenCalledWith({
330
- messages,
+ messages: [
331
+ {
332
+ id: 'msg-1',
333
+ role: 'user',
334
+ content: 'Hello',
335
+ timestamp: '2024-01-01T10:00:00.000Z',
336
+ },
337
338
+ id: 'msg-2',
339
+ role: 'assistant',
340
+ content: 'Hi there!',
341
+ timestamp: '2024-01-01T10:01:00.000Z',
342
+ contentBlocks: [
343
344
+ type: 'text',
345
+ content: 'Here is the weather information',
346
347
348
+ type: 'tool',
349
+ phase: 'call',
350
+ toolCall: {
351
+ id: 'tool-1',
352
+ name: 'get_weather',
353
+ state: 'pending',
354
355
356
+ ],
357
358
359
updatedAt: expect.any(Date),
360
361
0 commit comments