(tool: string, state: Record<string, any>)
| 24 | } |
| 25 | |
| 26 | function buildToolPart(tool: string, state: Record<string, any>) { |
| 27 | return { |
| 28 | id: `tool-${tool}`, |
| 29 | messageID: "msg-tool", |
| 30 | sessionID: "ses_token_counting", |
| 31 | type: "tool" as const, |
| 32 | tool, |
| 33 | callID: `call-${tool}`, |
| 34 | state, |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | function assertCounted(part: Record<string, any>, expectedContents: string[]) { |
| 39 | assert.deepEqual(extractToolContent(part), expectedContents) |
no outgoing calls
no test coverage detected