fix: complete immutable message migration

This commit is contained in:
_Kerman
2026-07-28 14:15:23 +08:00
parent f5ec71f5b1
commit 350c296cff
27 changed files with 231 additions and 60 deletions

View File

@@ -367,7 +367,12 @@ describe('dsh-agent-spine-demo bundle', () => {
handle.agent.followup(createUserMessage({ content: [{ type: 'text', text: 'hi' }], source: { kind: 'user' } }))
await waitForIdle(ctx, handle.agent)
expect(adapter.requests[0]?.messages).toEqual([{ role: 'user', content: [{ type: 'text', text: 'hi' }] }])
expect(adapter.requests[0]?.messages).toEqual([{
id: expect.any(String) as unknown,
role: 'user',
content: [{ type: 'text', text: 'hi' }],
source: { kind: 'user' },
}])
await handle.dispose()
await ctx.fiber.dispose()
} finally {