Skip to content

Use Claude Code with your ChatGPT, Kimi, Cursor or Grok subscription via a local Anthropic-compatible proxy

Rust

fix monitor quit key

Raine Virta93f2f4348970
diff --git a/src/tui.rs b/src/tui.rs
index 05ebbb7..56d4e13 100644
--- a/src/tui.rs
+++ b/src/tui.rs
@@ -68,9 +68,13 @@ pub fn run_monitor(
if event::poll(Duration::from_millis(250))? {
match event::read()? {
Event::Key(key) => match key.code {
- KeyCode::Char('q') | KeyCode::Char('c')
- if key.modifiers.contains(KeyModifiers::CONTROL) =>
- {
+ KeyCode::Char('q') => {
+ if let Some(shutdown) = app.shutdown.take() {
+ let _ = shutdown.send(());
+ }
+ break;
+ }
+ KeyCode::Char('c') if key.modifiers.contains(KeyModifiers::CONTROL) => {
if let Some(shutdown) = app.shutdown.take() {
let _ = shutdown.send(());
}