diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-08 20:55:51 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-09 04:26:19 +0300 |
| commit | ee51c5e5fbaea694e65bb0a4908f75bcaf9707d1 (patch) | |
| tree | f566d2a5921d4112602a7abcffb5cf6eb04d5f24 /src/detect/agents/mod.rs | |
| parent | a7cd7806f2fa0251e2dca41ffec61ceafb6f0e18 (diff) | |
feat: use pty-first agent detection
Diffstat (limited to 'src/detect/agents/mod.rs')
| -rw-r--r-- | src/detect/agents/mod.rs | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/detect/agents/mod.rs b/src/detect/agents/mod.rs index 46a25f66..704350df 100644 --- a/src/detect/agents/mod.rs +++ b/src/detect/agents/mod.rs @@ -45,7 +45,6 @@ pub(super) fn detect(agent: Agent, screen_content: &str) -> AgentDetection { state, skip_state_update: true, visible_blocker: false, - visible_idle: false, visible_working: false, }; } @@ -54,7 +53,6 @@ pub(super) fn detect(agent: Agent, screen_content: &str) -> AgentDetection { state, skip_state_update: false, visible_blocker: has_visible_blocker(agent, screen_content, state), - visible_idle: has_visible_idle(agent, screen_content, state), visible_working: has_visible_working(agent, screen_content, state), } } @@ -79,20 +77,20 @@ fn has_visible_blocker(agent: Agent, content: &str, state: AgentState) -> bool { // is known to be structural and live. Agent::Claude => claude_code::has_visible_blocker(content), Agent::Codex => codex::has_visible_blocker(content), + Agent::Gemini => gemini::has_visible_blocker(content), + Agent::Cursor => cursor::has_visible_blocker(content), + Agent::Antigravity => antigravity::has_visible_blocker(content), + Agent::Cline => cline::has_visible_blocker(content), + Agent::OpenCode => opencode::has_visible_blocker(content), + Agent::GithubCopilot => github_copilot::has_visible_blocker(content), Agent::Kimi => kimi::has_visible_blocker(content), - _ => false, - } -} - -fn has_visible_idle(agent: Agent, content: &str, state: AgentState) -> bool { - if state != AgentState::Idle { - return false; - } - - match agent { - Agent::Claude => claude_code::has_prompt_box(content), - Agent::Codex => codex::has_prompt(content), - Agent::Kimi => kimi::has_prompt_box(content), + Agent::Kiro => kiro::has_visible_blocker(content), + Agent::Droid => droid::has_visible_blocker(content), + Agent::Amp => amp::has_visible_blocker(content), + Agent::Grok => grok::has_visible_blocker(content), + Agent::Hermes => hermes::has_visible_blocker(content), + Agent::Kilo => kilo::has_visible_blocker(content), + Agent::Qodercli => qodercli::has_visible_blocker(content), _ => false, } } |
