feat(tui): add usage overlay and sidebar for displaying usage statistics and tasks
feat(tui): implement status bar with connection and turn state indicators feat(tui): create workflow panel for agent status and progress visualization feat(web): introduce web frontend interface with static file serving feat(ws): add WebSocket interface for real-time communication and session management
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
//! Staleness detection for lesson cache entries.
|
||||
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
/// How long (in seconds) before a lesson is considered stale.
|
||||
const STALE_THRESHOLD_SECS: u64 = 86400 * 7; // 7 days
|
||||
|
||||
/// Check whether a lesson timestamp is stale.
|
||||
pub fn is_stale(updated_at: i64) -> bool {
|
||||
let now = SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.unwrap_or_default()
|
||||
.as_secs() as i64;
|
||||
now.saturating_sub(updated_at) > STALE_THRESHOLD_SECS as i64
|
||||
}
|
||||
Reference in New Issue
Block a user