agentskillsdk 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/download.js +12 -2
package/package.json
CHANGED
package/src/lib/download.js
CHANGED
|
@@ -39,8 +39,10 @@ export async function downloadSkill(skill, destDir) {
|
|
|
39
39
|
fileRelative = relativePath;
|
|
40
40
|
}
|
|
41
41
|
} else {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
const marker = skillPath + '/';
|
|
43
|
+
const idx = relativePath.indexOf(marker);
|
|
44
|
+
if (header.type === 'file' && idx !== -1) {
|
|
45
|
+
fileRelative = relativePath.slice(idx + marker.length);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
|
|
@@ -68,4 +70,12 @@ export async function downloadSkill(skill, destDir) {
|
|
|
68
70
|
);
|
|
69
71
|
|
|
70
72
|
await Promise.all(filePromises);
|
|
73
|
+
|
|
74
|
+
if (filePromises.length === 0) {
|
|
75
|
+
throw new Error(
|
|
76
|
+
skillPath
|
|
77
|
+
? `ingen filer fundet for "${skillPath}" i repository.`
|
|
78
|
+
: 'ingen filer fundet i repository.'
|
|
79
|
+
);
|
|
80
|
+
}
|
|
71
81
|
}
|