|
tui: let the user scroll up while the agent streams + keyboard scroll bindings
ChatPanel._sync called scroll_end on every WS event (every stream_delta), yanking the view back to the bottom on each token — impossible to scroll up and read earlier messages during a response. Stick-to-bottom: capture is_vertical_scroll_end before any DOM change and only scroll_end when the user was already at the bottom; auto-follow resumes when they scroll back. Add app-level keyboard bindings so the chat scrolls without leaving the input box: Ctrl+Shift+Up/Down (one line), Ctrl+End (jump to bottom). These keys are not claimed by TextArea (it uses shift+up/down for select and ctrl+e/end for line end), so they bubble from the input to the app. |
|---|
|
|
| clients/terminal/tui/tui_app.py |
|---|
| clients/terminal/tui/widgets/chat_panel.py |
|---|
| tests/clients/test_chat_panel.py |
|---|
| tests/clients/test_tui_app.py |
|---|