diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-21 16:30:04 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-21 16:30:04 +0300 |
| commit | 3397e1ce2922c4ae9b814e8110e81de7d201de81 (patch) | |
| tree | c457a7cf0af271dea1a412474fad5a33c1b60be8 /src/detect.rs | |
| parent | 2818ff492d45d17fd4f9b15478d703c6c664a8c0 (diff) | |
feat: add persistent server-client sessions
Make herdr persistent by default.
Launching herdr now starts or reattaches to a background session
server. Clients can detach and reattach while panes and agent
processes keep running. Session mode now supports multi-client attach,
auto-detect startup, and a thin-client/headless-server split.
This also refactors the large app, ui, input, pane, config,
workspace, and persistence modules into smaller focused submodules,
while preserving behavior and colocating tests with the code they
exercise.
Upgrade notes:
- persistence mode is now the default
- in-app quit detaches the current client instead of stopping the server
- use `herdr server stop` to stop the background session
- use `--no-session` for the old single-process behavior
- default socket paths now live under the config directory
Diffstat (limited to 'src/detect.rs')
| -rw-r--r-- | src/detect.rs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/detect.rs b/src/detect.rs index df5bbae4..55a7b2a5 100644 --- a/src/detect.rs +++ b/src/detect.rs @@ -352,10 +352,6 @@ fn detect_kimi(content: &str) -> AgentState { fn detect_droid(content: &str) -> AgentState { let lower = content.to_lowercase(); - if is_droid_mission_control(content, &lower) { - return AgentState::Idle; - } - // Blocked: EXECUTE approval prompt with selection UI chrome // Primary (AND): structural keyword + chrome text = certain let has_execute = content.contains("EXECUTE"); @@ -385,20 +381,6 @@ fn detect_droid(content: &str) -> AgentState { AgentState::Idle } -fn is_droid_mission_control(content: &str, lower_content: &str) -> bool { - let has_header = lower_content.contains("mission control"); - let has_active_feature = lower_content.contains("active feature"); - let has_feature_summary = lower_content.contains("features "); - let has_mission_metrics = lower_content.contains("time ") - && lower_content.contains("input ") - && lower_content.contains("output "); - - content.contains("⛬") - && has_header - && has_active_feature - && (has_feature_summary || has_mission_metrics) -} - /// Amp (Sourcegraph) detection. /// /// Blocked approval prompts use a shared footer with options like @@ -1133,24 +1115,6 @@ mod tests { } #[test] - fn droid_mission_control_is_idle_even_with_stop_chrome() { - let screen = concat!( - "⛬ Mission Control ~/Projects/herdr-worktrees/persistence TIME 22h 40m · Input 12.6M · Cached 129.7M · Output 471.5K\n", - "● RUNNING\n", - "Active Feature fix-scrutiny-misc-followups\n", - "Features 25/28\n", - "(Press ESC to stop)\n", - ); - assert_eq!(detect_droid(screen), AgentState::Idle); - } - - #[test] - fn droid_leaves_mission_control_and_returns_to_working() { - let screen = "> how u doin\n\n⠴ Thinking... (Press ESC to stop)\n\nAuto (Off)"; - assert_eq!(detect_droid(screen), AgentState::Working); - } - - #[test] fn droid_braille_spinner_detected() { assert!(has_braille_spinner("⠴ Thinking...")); assert!(has_braille_spinner(" ⠧ Loading...")); |
