feat(tui): ratatui skeleton with layout
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
17
crates/tui/src/app.rs
Normal file
17
crates/tui/src/app.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
pub struct App {
|
||||
pub should_quit: bool,
|
||||
}
|
||||
|
||||
impl App {
|
||||
pub fn new() -> Self {
|
||||
Self { should_quit: false }
|
||||
}
|
||||
|
||||
pub fn handle_key(&mut self, key: crossterm::event::KeyEvent) {
|
||||
match key.code {
|
||||
crossterm::event::KeyCode::Char('q') => self.should_quit = true,
|
||||
crossterm::event::KeyCode::Esc => self.should_quit = true,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user