Skip to main content

codetether_agent/tui/app/watchdog/
state.rs

1//! Watchdog notification state and types.
2
3use std::time::Instant;
4
5/// Notification shown when the watchdog detects a stalled request.
6#[derive(Debug, Clone)]
7pub struct WatchdogNotification {
8    pub message: String,
9    pub detected_at: Instant,
10    pub restart_count: u32,
11}
12
13impl WatchdogNotification {
14    pub fn new(message: String, restart_count: u32) -> Self {
15        Self {
16            message,
17            detected_at: Instant::now(),
18            restart_count,
19        }
20    }
21}