mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: use Path.parts for hidden directory filter in skill listing
The hidden directory filter used hardcoded forward-slash strings like '/.git/' and '/.hub/' to exclude internal directories. On Windows, Path returns backslash-separated strings, so the filter never matched. This caused quarantined skills in .hub/quarantine/ to appear as installed skills and available slash commands on Windows. Replaced string-based checks with Path.parts membership test which works on both Windows and Unix.
This commit is contained in:
parent
70a0a5ff4a
commit
f93b48226c
3 changed files with 97 additions and 4 deletions
|
|
@ -196,8 +196,7 @@ def _find_all_skills() -> List[Dict[str, Any]]:
|
|||
return skills
|
||||
|
||||
for skill_md in SKILLS_DIR.rglob("SKILL.md"):
|
||||
path_str = str(skill_md)
|
||||
if '/.git/' in path_str or '/.github/' in path_str or '/.hub/' in path_str:
|
||||
if any(part in ('.git', '.github', '.hub') for part in skill_md.parts):
|
||||
continue
|
||||
|
||||
skill_dir = skill_md.parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue