* Count the number of tool uses in a message (handles grouped tool uses).
(msg: RenderableMessage)
| 511 | * Count the number of tool uses in a message (handles grouped tool uses). |
| 512 | */ |
| 513 | function countToolUses(msg: RenderableMessage): number { |
| 514 | if (msg.type === 'grouped_tool_use') { |
| 515 | return msg.messages.length |
| 516 | } |
| 517 | return 1 |
| 518 | } |
| 519 | |
| 520 | /** |
| 521 | * Extract file paths from read tool inputs in a message. |
no outgoing calls
no test coverage detected