use ratatui::crossterm re-exports, add event-stream feature
All crossterm imports go through ratatui::crossterm. Direct crossterm dep kept only for the event-stream feature flag (EventStream for async terminal input). Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
bacfd5f234
commit
8d045a3e6b
3 changed files with 6 additions and 6 deletions
|
|
@ -5,7 +5,7 @@
|
|||
// (agent, active tools) directly for rendering.
|
||||
|
||||
use anyhow::Result;
|
||||
use crossterm::event::{Event, EventStream, KeyEventKind};
|
||||
use ratatui::crossterm::event::{Event, EventStream, KeyEventKind};
|
||||
use futures::StreamExt;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub mod thalamus;
|
|||
|
||||
// --- TUI infrastructure (moved from tui/mod.rs) ---
|
||||
|
||||
use crossterm::{
|
||||
use ratatui::crossterm::{
|
||||
event::{EnableMouseCapture, DisableMouseCapture, KeyCode, KeyEvent, KeyModifiers, MouseEvent, MouseEventKind, MouseButton},
|
||||
terminal::{self, EnterAlternateScreen, LeaveAlternateScreen},
|
||||
ExecutableCommand,
|
||||
|
|
@ -735,10 +735,10 @@ pub async fn main() {
|
|||
}
|
||||
|
||||
if let Err(e) = crate::user::event_loop::start(cli).await {
|
||||
let _ = crossterm::terminal::disable_raw_mode();
|
||||
let _ = crossterm::execute!(
|
||||
let _ = ratatui::crossterm::terminal::disable_raw_mode();
|
||||
let _ = ratatui::crossterm::execute!(
|
||||
std::io::stdout(),
|
||||
crossterm::terminal::LeaveAlternateScreen
|
||||
ratatui::crossterm::terminal::LeaveAlternateScreen
|
||||
);
|
||||
eprintln!("Error: {:#}", e);
|
||||
std::process::exit(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue