* Strip thinking content so that / tags inside * the model's chain-of-thought don't get matched by parsers.
(text: string)
| 565 | * the model's chain-of-thought don't get matched by parsers. |
| 566 | */ |
| 567 | function stripThinking(text: string): string { |
| 568 | return text |
| 569 | .replace(/<thinking>[\s\S]*?<\/thinking>/g, '') |
| 570 | .replace(/<thinking>[\s\S]*$/, '') |
| 571 | } |
| 572 | |
| 573 | /** |
| 574 | * Parse XML block response: <block>yes/no</block> |
no outgoing calls
no test coverage detected