mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-26 15:03:34 +08:00
Update skills.ts
This commit is contained in:
parent
4edbee9f52
commit
541b7ee0a7
@ -224,11 +224,25 @@ async function collectSkillsFromRoots(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
if (!entry.isDirectory() || entry.name.startsWith('.') || seenNames.has(entry.name)) {
|
if (
|
||||||
|
(!entry.isDirectory() && !entry.isSymbolicLink()) ||
|
||||||
|
entry.name.startsWith('.') ||
|
||||||
|
seenNames.has(entry.name)
|
||||||
|
) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
const meta = await loadSkillMeta(path.join(root, entry.name), entry.name, source)
|
const skillDir = path.join(root, entry.name)
|
||||||
|
const skillFile = path.join(skillDir, 'SKILL.md')
|
||||||
|
|
||||||
|
try {
|
||||||
|
const stat = await fs.stat(skillFile)
|
||||||
|
if (!stat.isFile()) continue
|
||||||
|
} catch {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
const meta = await loadSkillMeta(skillDir, entry.name, source)
|
||||||
if (!meta) continue
|
if (!meta) continue
|
||||||
|
|
||||||
seenNames.add(entry.name)
|
seenNames.add(entry.name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user