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>
This commit is contained in:
Tobi Lutke 2025-12-13 11:13:12 -05:00
parent f6db87c9a5
commit 49207c524e
No known key found for this signature in database

View File

@ -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;