diff --git a/src/mind/subconscious.rs b/src/mind/subconscious.rs index d5bee34..15c8b04 100644 --- a/src/mind/subconscious.rs +++ b/src/mind/subconscious.rs @@ -20,6 +20,7 @@ use std::path::PathBuf; use std::time::{Duration, Instant}; +use crate::thalamus::idle::{hours_since_last_dream, DREAM_INTERVAL_HOURS}; /// DMN state machine. #[derive(Debug, Clone)] @@ -138,10 +139,22 @@ impl State { ) } State::Foraging => { + let dream_hint = { + let hours = hours_since_last_dream(); + if hours >= DREAM_INTERVAL_HOURS { + format!( + " You haven't dreamed in {} hours — consider running \ + ~/.consciousness/tools/dream-start.sh.", + hours + ) + } else { + String::new() + } + }; format!( "[dmn] Foraging time. {} Follow whatever catches your attention — \ - memory files, code, ideas. Call yield_to_user when you want to rest.{}", - idle_info, stuck_warning + memory files, code, ideas. Call yield_to_user when you want to rest.{}{}", + idle_info, dream_hint, stuck_warning ) } State::Resting { since } => {