1002
const files: IDiscoveredFile[] = [];
1003
await Promise.all(children.map(async child => {
1005
>
1006
>
if (child.isDirectory) {
1007
>
const skillFile = joinPath(child.resource, SKILL_FILENAME);
1008
>
try {
1009
>
const skillStat = await this._fileService.resolve(skillFile, { resolveMetadata: true });
1010
>
if (skillStat.isFile && !seen.has(skillFile)) {
1011
>
seen.add(skillFile);
1012
>
files.push({ uri: skillFile, etag: skillStat.etag });
1013
>
}
1014
>
} catch {
1015
// SKILL.md missing — skip this skill directory.
1016
}
1018
}));
1019
result.push({ uri: rootUri, type: root.type, files: files.sort(compareDiscoveredFile), name: root.name, writable: true });