MCPcopy Index your code
hub / github.com/FIND-Lab/AgentWard / matchesAnyPattern

Function matchesAnyPattern

layers/exec-control.ts:260–268  ·  view source on GitHub ↗
(text: string, patterns: RegExp[])

Source from the content-addressed store, hash-verified

258
259// Helper function to check if text matches any pattern in the list
260function 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
270export function toolCallDetect(
271 toolName: string,

Callers 1

toolCallDetectFunction · 0.85

Calls 1

getLoggerFunction · 0.90

Tested by

no test coverage detected