Skip to main content

codetether_agent/tui/app/watchdog/
handler.rs

1//! Cancel and retry key handlers for watchdog notifications.
2
3use crate::tui::app::state::AppState;
4
5/// Dismiss the watchdog notification and stop processing.
6pub fn handle_watchdog_cancel(state: &mut AppState) {
7    state.processing = false;
8    state.streaming_text.clear();
9    state.clear_request_timing();
10    state.watchdog_notification = None;
11    state.status = "Request cancelled.".to_string();
12}
13
14/// Dismiss the notification without stopping (restart already handled by event loop).
15pub fn handle_watchdog_dismiss(state: &mut AppState) {
16    state.watchdog_notification = None;
17}