tui: load session message history into the chat panel on resume
Resuming or switching a session showed a blank chat — the past conversation
was never replayed. GET /sessions/{id} already returns the messages; the TUI
just ignored them.

- ChatModel.load_history maps persisted Message dicts back to the same
  ChatItems the live stream produces (user/assistant text, thinking, tool
  started/result, plan), skipping is_display=False (context-only user,
  summaries, compression events) so only what the user would have seen
  live is rebuilt.
- ChatPanel.load_history wraps it (clears the render cache + refresh).
- attach_session loads the messages from get_session, so resume/switch
  replays the history before the cwd/Connected banners.

Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 66213ee commit d2ac76971bb854b4bc01513c15d6025177a7e6ab
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 9 hours ago
Showing 5 changed files
View
clients/terminal/tui/chat_model.py
View
clients/terminal/tui/tui_app.py
View
clients/terminal/tui/widgets/chat_panel.py
View
tests/clients/test_chat_panel.py
View
tests/clients/test_tui_app.py