(text: string, patterns: RegExp[])
| 258 | |
| 259 | // Helper function to check if text matches any pattern in the list |
| 260 | function matchesAnyPattern(text: string, patterns: RegExp[]): boolean { |
| 261 | return patterns.some(pattern => { |
| 262 | const match = pattern.test(text); |
| 263 | if (match) { |
| 264 | getLogger().warn(`[ExecControl] Pattern matched: ${pattern.source}`); |
| 265 | } |
| 266 | return match; |
| 267 | }); |
| 268 | } |
| 269 | |
| 270 | export function toolCallDetect( |
| 271 | toolName: string, |
no test coverage detected