(toolBlock: ToolContentBlock)
| 420 | * Check if a tool is a "create new file" operation. |
| 421 | */ |
| 422 | export function isCreateFile(toolBlock: ToolContentBlock): boolean { |
| 423 | const outputStr = typeof toolBlock.output === 'string' ? toolBlock.output : '' |
| 424 | const message = extractValueForKey(outputStr, 'message') |
| 425 | return ( |
| 426 | typeof message === 'string' && |
| 427 | (message.startsWith('Created file successfully') || |
| 428 | message.startsWith('Created new file') || |
| 429 | message.startsWith('Proposed new file')) |
| 430 | ) |
| 431 | } |
| 432 | |
| 433 | function hasToolResultOutput(toolBlock: ToolContentBlock): boolean { |
| 434 | const outputStr = typeof toolBlock.output === 'string' ? toolBlock.output : '' |
no test coverage detected