(content)
| 72 | } |
| 73 | |
| 74 | function isUserInterruptEvent(content) { |
| 75 | const text = flattenUserContent(content) |
| 76 | .replace(/\x1B\[[0-9;]*m/g, '') |
| 77 | .trim(); |
| 78 | if (!text) return false; |
| 79 | return /(?:^|\n)\[Request interrupted by user(?: for tool use)?\](?:\r?\n|$)/i.test(text); |
| 80 | } |
| 81 | |
| 82 | function isNonAiUserEvent(event, content) { |
| 83 | if (!event || typeof event !== 'object') return false; |
no test coverage detected