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.cjs
CHANGED
|
@@ -4065,9 +4065,21 @@ async function rebuildIndex(instanceUrl, token, scope, id, prefix, indexSlug) {
|
|
|
4065
4065
|
if (!dirty && added.length === 0) return currentEntries;
|
|
4066
4066
|
const kept = currentEntries.filter((e) => actual.has(e.name));
|
|
4067
4067
|
for (const name of added) {
|
|
4068
|
+
let description = "";
|
|
4069
|
+
try {
|
|
4070
|
+
const page = await getWikiPage(instanceUrl, token, scope, id, `${prefix}/${name}/SKILL`);
|
|
4071
|
+
const content = page.content ?? "";
|
|
4072
|
+
const fmMatch = content.match(/^---\s*\n[\s\S]*?description:\s*(.+)\n[\s\S]*?---/);
|
|
4073
|
+
if (fmMatch) {
|
|
4074
|
+
description = fmMatch[1].trim();
|
|
4075
|
+
} else {
|
|
4076
|
+
description = content.replace(/^---[\s\S]*?---\s*\n/, "").replace(/^#[^\n]*\n+/, "").split("\n\n")[0].replace(/\n/g, " ").trim().slice(0, 200);
|
|
4077
|
+
}
|
|
4078
|
+
} catch {
|
|
4079
|
+
}
|
|
4068
4080
|
kept.push({
|
|
4069
4081
|
name,
|
|
4070
|
-
description: "(
|
|
4082
|
+
description: description || "(no description \u2014 update with gitlab_skill_save)",
|
|
4071
4083
|
draft: prefix === DRAFTS_PREFIX
|
|
4072
4084
|
});
|
|
4073
4085
|
}
|