プロトコル経由のshutdow経路

This commit is contained in:
2026-04-16 13:49:53 +09:00
parent 710220c920
commit aa138e6583
11 changed files with 183 additions and 27 deletions
+5
View File
@@ -12,6 +12,7 @@ pub struct App {
pub input: String,
pub cursor: usize,
pub quit: bool,
pub shutdown_confirm: Option<std::time::Instant>,
/// Lines waiting to be flushed to terminal via insert_before.
pub output_queue: Vec<OutputItem>,
/// Partial streaming text not yet terminated by newline.
@@ -55,6 +56,7 @@ impl App {
input: String::new(),
cursor: 0,
quit: false,
shutdown_confirm: None,
output_queue: Vec::new(),
pending_text: String::new(),
}
@@ -193,6 +195,9 @@ impl App {
self.output_queue.insert(1, OutputItem::Blank);
}
}
Event::Shutdown => {
self.quit = true;
}
}
}