promptgraph-mcp 2.3.3 → 2.3.4
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/github-import.js +2 -2
- package/package.json +1 -1
package/github-import.js
CHANGED
|
@@ -54,7 +54,7 @@ async function detectSkillsDirFromAPI(ownerRepo) {
|
|
|
54
54
|
const sub = await httpsGet(`https://api.github.com/repos/${ownerRepo}/contents/${dir.name}`);
|
|
55
55
|
const subEntries = JSON.parse(sub);
|
|
56
56
|
const mdCount = subEntries.filter(e => e.type === 'file' && e.name.endsWith('.md')).length;
|
|
57
|
-
if (mdCount >=
|
|
57
|
+
if (mdCount >= 1 && mdCount > bestCount) { best = dir.name; bestCount = mdCount; }
|
|
58
58
|
} catch {}
|
|
59
59
|
}
|
|
60
60
|
if (best) return { subdir: best, label: best };
|
|
@@ -132,7 +132,7 @@ function detectSkillsDirLocal(repoRoot) {
|
|
|
132
132
|
const candidate = path.join(repoRoot, dir);
|
|
133
133
|
if (fs.existsSync(candidate)) {
|
|
134
134
|
const files = globSync(`${candidate}/**/*.md`);
|
|
135
|
-
if (files.length >=
|
|
135
|
+
if (files.length >= 1) return { dir: candidate, label: dir, sparse: true };
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
return { dir: repoRoot, label: '(root)', sparse: false };
|