MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / doesFileMatchRegex

Function doesFileMatchRegex

src/core/tools/validateToolUse.ts:110–118  ·  view source on GitHub ↗
(filePath: string, pattern: string)

Source from the content-addressed store, hash-verified

108}
109
110function doesFileMatchRegex(filePath: string, pattern: string): boolean {
111 try {
112 const regex = new RegExp(pattern)
113 return regex.test(filePath)
114 } catch (error) {
115 console.error(`Invalid regex pattern: ${pattern}`, error)
116 return false
117 }
118}
119
120export function isToolAllowedForMode(
121 tool: string,

Callers 1

isToolAllowedForModeFunction · 0.85

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected