(
blocks: Array<{ toolUseId: string; content: string }>,
)
| 86 | } |
| 87 | |
| 88 | function createToolResultMessage( |
| 89 | blocks: Array<{ toolUseId: string; content: string }>, |
| 90 | ): Message { |
| 91 | return { |
| 92 | type: 'user', |
| 93 | uuid: 'user-1', |
| 94 | message: { |
| 95 | role: 'user', |
| 96 | content: blocks.map(block => ({ |
| 97 | type: 'tool_result', |
| 98 | tool_use_id: block.toolUseId, |
| 99 | content: block.content, |
| 100 | })), |
| 101 | }, |
| 102 | } as unknown as Message |
| 103 | } |
| 104 | |
| 105 | describe('toolResultStorage message-budget contracts', () => { |
| 106 | it('persists the largest fresh result once and re-applies the cached preview on later turns', async () => { |
no outgoing calls
no test coverage detected