opencode-gitlab-dap 1.14.0 → 1.14.1
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/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3896,9 +3896,21 @@ async function rebuildIndex(instanceUrl, token, scope, id, prefix, indexSlug) {
|
|
|
3896
3896
|
if (!dirty && added.length === 0) return currentEntries;
|
|
3897
3897
|
const kept = currentEntries.filter((e) => actual.has(e.name));
|
|
3898
3898
|
for (const name of added) {
|
|
3899
|
+
let description = "";
|
|
3900
|
+
try {
|
|
3901
|
+
const page = await getWikiPage(instanceUrl, token, scope, id, `${prefix}/${name}/SKILL`);
|
|
3902
|
+
const content = page.content ?? "";
|
|
3903
|
+
const fmMatch = content.match(/^---\s*\n[\s\S]*?description:\s*(.+)\n[\s\S]*?---/);
|
|
3904
|
+
if (fmMatch) {
|
|
3905
|
+
description = fmMatch[1].trim();
|
|
3906
|
+
} else {
|
|
3907
|
+
description = content.replace(/^---[\s\S]*?---\s*\n/, "").replace(/^#[^\n]*\n+/, "").split("\n\n")[0].replace(/\n/g, " ").trim().slice(0, 200);
|
|
3908
|
+
}
|
|
3909
|
+
} catch {
|
|
3910
|
+
}
|
|
3899
3911
|
kept.push({
|
|
3900
3912
|
name,
|
|
3901
|
-
description: "(
|
|
3913
|
+
description: description || "(no description \u2014 update with gitlab_skill_save)",
|
|
3902
3914
|
draft: prefix === DRAFTS_PREFIX
|
|
3903
3915
|
});
|
|
3904
3916
|
}
|