Compare commits

...

2 Commits

Author SHA1 Message Date
Michal
a1893a7578 fix(prime-agent): publish the project indicator on turn_start, not only session_start
prime-agent emits session_start from exactly one place — reload() — and never
at startup. A session_start-only handler therefore never ran on a fresh
session, and the '/mcpctl -> already on X' path returns without reloading, so
the indicator stayed blank exactly when it was most wanted.

Also guard against the no-op UI context: the runtime hands extensions
noOpUIContext until the TUI binds the real one, and every setter on it
silently discards. Publishing under it would cache a label that never
rendered.

Now published on session_start (reload), turn_start (earliest reliable point
on a fresh session), and on entering /mcpctl. Repeat calls are a no-op unless
the label changed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017BMXdb2qZbPSh8Q7XpTyjB
2026-08-08 18:38:52 +01:00
Michal
64503e8924 Merge pull request 'feat(prime-agent): filterable project picker + visible active-project indicator' (#97) from feat/prime-agent-switcher-ux into main
Some checks failed
CI/CD / lint (push) Successful in 1m4s
CI/CD / typecheck (push) Successful in 2m21s
CI/CD / test (push) Successful in 1m20s
CI/CD / smoke (push) Has started running
CI/CD / build (push) Has started running
CI/CD / publish (push) Has been cancelled
2026-08-08 18:33:30 +01:00
2 changed files with 4 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -543,6 +543,9 @@ describe('config prime-agent', () => {
expect(ext).toContain("placement: 'belowEditor'");
// Still set the status: pi's footer does render it.
expect(ext).toContain('ctx.ui.setStatus(STATUS_KEY');
// prime-agent emits session_start only from reload(), never at startup, so
// a session_start-only indicator stays blank until the first switch.
expect(ext).toContain("pi.on('turn_start'");
});
it('the installed switcher filters the project list before showing it', async () => {