Bladeren bron

Fix root context display showing // instead of /

Handle both empty string and '/' as root context in path display logic.
YAML stores root contexts as '/' but old code expected empty string.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Tobi Lutke 5 maanden geleden
bovenliggende
commit
49207c524e
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      src/qmd.ts

+ 2 - 1
src/qmd.ts

@@ -490,7 +490,8 @@ function showStatus(): void {
       if (contexts.length > 0) {
         console.log(`    ${c.dim}Contexts:${c.reset} ${contexts.length}`);
         for (const ctx of contexts) {
-          const pathDisplay = ctx.path_prefix === '' ? '/' : `/${ctx.path_prefix}`;
+          // Handle both empty string and '/' as root context
+          const pathDisplay = (ctx.path_prefix === '' || ctx.path_prefix === '/') ? '/' : `/${ctx.path_prefix}`;
           const contextPreview = ctx.context.length > 60
             ? ctx.context.substring(0, 57) + '...'
             : ctx.context;