mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: claude/guidance-control-plane-uhmR3 - Timestamp: 2026-02-02T03:51:13Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f306a13cc
commit
8f7889de97
1 file changed
+13
-7
@@ -426,15 +426,21 @@ export class ShardRetriever {
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple glob matching (supports * and **)
|
||||
* Simple glob matching (supports * and **).
|
||||
* Compiled regexes are cached per glob to avoid re-compiling on every call.
|
||||
*/
|
||||
private matchGlob(path: string, glob: string): boolean {
|
||||
const regex = glob
|
||||
.replace(/\*\*/g, '{{GLOBSTAR}}')
|
||||
.replace(/\*/g, '[^/]*')
|
||||
.replace(/{{GLOBSTAR}}/g, '.*')
|
||||
.replace(/\//g, '\\/');
|
||||
return new RegExp(`^${regex}$`).test(path);
|
||||
let re = this.globCache.get(glob);
|
||||
if (!re) {
|
||||
const pattern = glob
|
||||
.replace(/\*\*/g, '{{GLOBSTAR}}')
|
||||
.replace(/\*/g, '[^/]*')
|
||||
.replace(/{{GLOBSTAR}}/g, '.*')
|
||||
.replace(/\//g, '\\/');
|
||||
re = new RegExp(`^${pattern}$`);
|
||||
this.globCache.set(glob, re);
|
||||
}
|
||||
return re.test(path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user