tui: bash-style message history (Up/Down recall, per-session, in-memory)
On an empty prompt with the hints list closed, Up recalls the previous
submitted message and Down moves toward the most recent; Down past the newest
restores the empty draft. Like a shell history:

- InputBox owns the per-session history (capped at the 10 most recent, with
  consecutive-duplicate suppression) plus the browsing index and saved draft.
- _PromptInput._on_key enters history mode on Up only when the field is empty
  and the hints list is not open; while hints are open Up/Down still navigate
  command matches, and a non-empty field uses TextArea's multiline cursor.
- Only plain user messages are recorded — slash commands and !shell are not
  remembered (they are not messages to the agent). The raw typed text is stored.
- on_user_submitted records a plain submit; attach_session resets the history
  on session switch/resume (the history is in-memory per session, not synced
  to the server, by design).

Tests: append cap/dedup/skip-commands, up/down navigation, reset, Up-recall /
Down-draft / Up-non-empty-no-recall over pilot, submit records plain (not
/commands). Full suite: 964 passed, 1 skipped.
1 parent b36903a commit 37806958c89bf4481431583495b1b6c385db9eb0
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 13 Jul
Showing 3 changed files
View
clients/terminal/tui/tui_app.py
View
clients/terminal/tui/widgets/input_box.py
View
tests/clients/test_input_box.py