tui: add --resume <session_id> and print resume hint on TUI close
Closing Navi Code now tells the user the session id and the exact command to
continue it, so a session is one re-run away instead of lost to state lookup.

- cli.py: add --resume <session_id> (mutex with --new-session). Raw and TUI
  paths resolve the given id via api.get_session; a bad id is a hard error,
  not a silent new session. After app.run() returns and the terminal is
  restored, print "Session <id>" / "Resume with: navi-code --resume <id>"
  when a session is attached.
- tui_app._resolve_session: make the explicit-id branch strict — a failed
  get_session surfaces an error event and returns None instead of falling
  through to creating a new session (a --resume typo used to silently start
  a fresh session). Saved-state resume stays lenient.
- tests: resume-flag resolve/bad-id/mutex + hint format; tui strict-on-bad
  explicit id and explicit-id resume.

Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c35169b commit 387b66123a94d7ef35273eec535685fd911b2bb4
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 12 hours ago
Showing 4 changed files
View
clients/terminal/cli.py
View
clients/terminal/tui/tui_app.py
View
tests/clients/test_terminal_client.py
View
tests/clients/test_tui_app.py