(messages: readonly Message[])
| 4367 | } |
| 4368 | |
| 4369 | function collectReplIds(messages: readonly Message[]): Set<string> { |
| 4370 | const ids = new Set<string>() |
| 4371 | for (const m of messages) { |
| 4372 | if (m.type === 'assistant' && Array.isArray(m.message.content)) { |
| 4373 | for (const b of m.message.content) { |
| 4374 | if (b.type === 'tool_use' && b.name === REPL_TOOL_NAME) { |
| 4375 | ids.add(b.id) |
| 4376 | } |
| 4377 | } |
| 4378 | } |
| 4379 | } |
| 4380 | return ids |
| 4381 | } |
| 4382 | |
| 4383 | /** |
| 4384 | * For external users, make REPL invisible in the persisted transcript: strip |
no test coverage detected