diff options
| author | Eric Yue <yue1995pro@gmail.com> | 2026-06-15 21:50:24 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-15 16:50:24 +0300 |
| commit | 07261e09be60ac0c145685fd11f94351cc0e5ba6 (patch) | |
| tree | 771b0180c7a1560189547e6d23ef004ec1cf6d5c /src/app | |
| parent | 08bb0768ae224c8db04bbe016b050353ce13eee7 (diff) | |
feat: add devin cli detection and restore support (#622)
* feat: add devin cli detection and restore support
refs #606
* fix: keep devin integration session-only
---------
Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/actions.rs | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/app/actions.rs b/src/app/actions.rs index b033b372..9df07af5 100644 --- a/src/app/actions.rs +++ b/src/app/actions.rs @@ -2767,7 +2767,7 @@ impl AppState { }), } }; - let toast = (!is_active_tab).then(&build_toast); + let toast = (!is_active_tab).then(build_toast); let client_notification = (!suppress_active_tab_notifications).then(build_toast); if toast.is_none() && client_notification.is_none() && sound.is_none() { @@ -4533,6 +4533,43 @@ mod tests { } #[test] + fn devin_state_report_refreshes_session_without_overriding_screen_state() { + let mut state = app_with_workspaces(&["active"]); + let pane_id = *state.workspaces[0].panes.keys().next().unwrap(); + let terminal_id = state.workspaces[0] + .panes + .get(&pane_id) + .unwrap() + .attached_terminal_id + .clone(); + + state.handle_app_event(AppEvent::StateChanged { + pane_id, + agent: Some(Agent::Devin), + state: AgentState::Idle, + visible_blocker: false, + visible_working: false, + process_exited: false, + observed_at: std::time::Instant::now(), + }); + state.handle_app_event(AppEvent::HookStateReported { + pane_id, + source: "herdr:devin".into(), + agent_label: "devin".into(), + state: AgentState::Working, + message: None, + custom_status: None, + seq: Some(1), + session_ref: crate::agent_resume::AgentSessionRef::id("devin-session"), + }); + + let terminal = state.terminals.get(&terminal_id).unwrap(); + assert_eq!(terminal.state, AgentState::Idle); + assert!(terminal.hook_authority.is_none()); + assert!(terminal.persisted_agent_session.is_some()); + } + + #[test] fn hidden_custom_session_ref_only_update_marks_session_dirty_without_visible_update() { let mut state = app_with_workspaces(&["active"]); let pane_id = *state.workspaces[0].panes.keys().next().unwrap(); |
