Add j/k shortcuts for scrolling and update help instructions in TUI
fixes #18
This commit is contained in:
@@ -328,10 +328,12 @@ impl ChatApp {
|
|||||||
self.mode = InputMode::Editing;
|
self.mode = InputMode::Editing;
|
||||||
self.sync_buffer_to_textarea();
|
self.sync_buffer_to_textarea();
|
||||||
}
|
}
|
||||||
(KeyCode::Up, KeyModifiers::NONE) => {
|
(KeyCode::Up, KeyModifiers::NONE)
|
||||||
|
| (KeyCode::Char('k'), KeyModifiers::NONE) => {
|
||||||
self.on_scroll(-1isize);
|
self.on_scroll(-1isize);
|
||||||
}
|
}
|
||||||
(KeyCode::Down, KeyModifiers::NONE) => {
|
(KeyCode::Down, KeyModifiers::NONE)
|
||||||
|
| (KeyCode::Char('j'), KeyModifiers::NONE) => {
|
||||||
self.on_scroll(1isize);
|
self.on_scroll(1isize);
|
||||||
}
|
}
|
||||||
(KeyCode::Esc, KeyModifiers::NONE) => {
|
(KeyCode::Esc, KeyModifiers::NONE) => {
|
||||||
|
|||||||
@@ -849,6 +849,8 @@ fn render_help(frame: &mut Frame<'_>) {
|
|||||||
Line::from(" i / Enter → start typing"),
|
Line::from(" i / Enter → start typing"),
|
||||||
Line::from(" Enter → send message"),
|
Line::from(" Enter → send message"),
|
||||||
Line::from(" Ctrl+J → newline"),
|
Line::from(" Ctrl+J → newline"),
|
||||||
|
Line::from(" j / ↓ → scroll down"),
|
||||||
|
Line::from(" k / ↑ → scroll up"),
|
||||||
Line::from(" m → select model"),
|
Line::from(" m → select model"),
|
||||||
Line::from(" n → new conversation"),
|
Line::from(" n → new conversation"),
|
||||||
Line::from(" c → clear conversation"),
|
Line::from(" c → clear conversation"),
|
||||||
|
|||||||
Reference in New Issue
Block a user