feat: add showProject config to hide project name from statusline

Adds `display.showProject` (default: true) to control whether the
project path is displayed. When set to false, the project name and
its associated git info are hidden from both compact and expanded
layouts.
This commit is contained in:
Fredrik Averpil
2026-02-22 09:39:38 +01:00
parent 10193cc94a
commit e5467ec8df
5 changed files with 19 additions and 3 deletions

View File

@@ -141,6 +141,14 @@ test('renderSessionLine omits project name when cwd is undefined', () => {
assert.ok(line.includes('[Opus]'));
});
test('renderSessionLine omits project name when showProject is false', () => {
const ctx = baseContext();
ctx.stdin.cwd = '/Users/jarrod/my-project';
ctx.config.display.showProject = false;
const line = renderSessionLine(ctx);
assert.ok(!line.includes('my-project'), 'should not include project name when showProject is false');
});
test('renderSessionLine displays git branch when present', () => {
const ctx = baseContext();
ctx.stdin.cwd = '/tmp/my-project';