pub fn check_triggers(
storage: &dyn StorageBackend,
session_id: &str,
tool_name: &str,
file_path: Option<&str>,
pattern: Option<&str>,
) -> Vec<AutoInsight>Expand description
Check trigger conditions against session activity and return any auto-insights.
Three triggers are evaluated:
- Directory focus: 3+ files read from the same directory suggests deep exploration.
- Edit after read: Editing a file that was previously read indicates an informed change.
- Repeated search: Same search pattern used 2+ times suggests a recurring need.
Each trigger checks has_auto_insight() to avoid duplicate insights within the same session.