Phase 3: add trackReadPaths gate — skip read-path detection when disabled.
Honor skillReinject.trackReadPaths before matching read tool paths to skills. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -60,3 +60,15 @@ export function matchReadPathToSkill(
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Read-path detection only when trackReadPaths is enabled (SPEC §6.2, §3). */
|
||||||
|
export function matchReadPathToSkillWhenEnabled(
|
||||||
|
path: string,
|
||||||
|
skills: readonly SkillPathMeta[],
|
||||||
|
trackReadPaths: boolean,
|
||||||
|
): SkillPathMeta | null {
|
||||||
|
if (!trackReadPaths) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return matchReadPathToSkill(path, skills);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user