dotmd-cli 0.27.0 → 0.27.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/package.json +1 -1
- package/src/hud.mjs +6 -1
package/package.json
CHANGED
package/src/hud.mjs
CHANGED
|
@@ -20,9 +20,14 @@ function findPendingPrompts(config) {
|
|
|
20
20
|
const roots = config.docsRoots || (config.docsRoot ? [config.docsRoot] : []);
|
|
21
21
|
const archiveDir = config.archiveDir || 'archived';
|
|
22
22
|
const found = [];
|
|
23
|
+
const seen = new Set();
|
|
23
24
|
|
|
24
25
|
for (const root of roots) {
|
|
25
|
-
|
|
26
|
+
// A root may either contain a prompts/ subdir (the common case, e.g. root=docs)
|
|
27
|
+
// or be the prompts/ dir itself (e.g. root=docs/prompts — see #6).
|
|
28
|
+
const dir = path.basename(root) === 'prompts' ? root : path.join(root, 'prompts');
|
|
29
|
+
if (seen.has(dir)) continue;
|
|
30
|
+
seen.add(dir);
|
|
26
31
|
if (!existsSync(dir)) continue;
|
|
27
32
|
let entries;
|
|
28
33
|
try { entries = readdirSync(dir, { withFileTypes: true }); } catch { continue; }
|