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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/hud.mjs +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotmd-cli",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "description": "CLI for managing markdown documents with YAML frontmatter — index, query, validate, graph, export, Notion sync, AI summaries.",
5
5
  "type": "module",
6
6
  "license": "MIT",
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
- const dir = path.join(root, 'prompts');
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; }