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:
dailz
2026-04-10 21:20:14 +08:00
parent 09e7f995fb
commit 73322138c1
3 changed files with 84 additions and 1 deletions

17
crates/tui/src/app.rs Normal file
View 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,
_ => {}
}
}
}