|
Navi Code TUI: unify session commands on shared workers; /switch hybrid
Route /new, /sessions, and /switch through shared app-side logic instead of each command reimplementing the switch path: - _open_sessions_picker(): pushes SessionsPickerScreen and wires the select callback to _switch_session_worker / _create_new_session_worker. Both /sessions and /switch (no/ambiguous arg) use it. - /new -> _create_new_session_worker (was: inline create + attach + clear). - /switch <prefix>: resolve to a single navi_code session (exact id, then prefix match) and switch directly via _switch_session_worker; no/ambiguous/ unknown arg opens the picker pre-filtered to what was typed. This removes the latent clear()-after-attach bug from the old SwitchCommand (clear erased the history that attach_session had just replayed). - SessionsPickerScreen gains initial_query to open pre-filtered. Co-Authored-By: Claude <noreply@anthropic.com> |
|---|
|
|
| clients/terminal/tui/commands/builtin.py |
|---|
| clients/terminal/tui/screens/sessions_picker.py |
|---|
| clients/terminal/tui/tui_app.py |
|---|
| tests/clients/test_sessions_picker.py |
|---|