(id: string, path: string, extra: Record<string, unknown> = {})
| 3 | import type { Message } from '../src/session/store.js'; |
| 4 | |
| 5 | function readCall(id: string, path: string, extra: Record<string, unknown> = {}): Message { |
| 6 | return { |
| 7 | role: 'assistant', |
| 8 | content: null, |
| 9 | tool_calls: [{ id, type: 'function', function: { name: 'read_file', arguments: JSON.stringify({ path, ...extra }) } }], |
| 10 | }; |
| 11 | } |
| 12 | function readResult(id: string, content: string): Message { |
| 13 | return { role: 'tool', tool_call_id: id, name: 'read_file', content }; |
| 14 | } |