(client: ChatClient, toolCallId: string)
| 24 | } |
| 25 | |
| 26 | function findToolResultPart(client: ChatClient, toolCallId: string) { |
| 27 | for (const message of client.getMessages()) { |
| 28 | if (message.role !== 'assistant') { |
| 29 | continue |
| 30 | } |
| 31 | |
| 32 | const part = message.parts.find( |
| 33 | (messagePart) => |
| 34 | messagePart.type === 'tool-result' && |
| 35 | messagePart.toolCallId === toolCallId, |
| 36 | ) |
| 37 | if (part) { |
| 38 | return part |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | return undefined |
| 43 | } |
| 44 | |
| 45 | describe('ChatClient runtime context', () => { |
| 46 | it('passes client-local context to client tool execution without serializing it', async () => { |
no test coverage detected