From 36a1b7f86444871f0c38ff36510a6e3c2eec48c6 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Wed, 10 Jun 2026 15:24:24 +0300 Subject: feat: distribute agent detection manifests --- src/detect/agents/gemini.rs | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/detect/agents/gemini.rs (limited to 'src/detect/agents/gemini.rs') diff --git a/src/detect/agents/gemini.rs b/src/detect/agents/gemini.rs deleted file mode 100644 index 86cf3bca..00000000 --- a/src/detect/agents/gemini.rs +++ /dev/null @@ -1,31 +0,0 @@ -use super::super::AgentState; - -pub(super) fn detect(content: &str) -> AgentState { - if has_visible_blocker(content) { - return AgentState::Blocked; - } - - let lower = content.to_lowercase(); - // Working - if lower.contains("esc to cancel") { - return AgentState::Working; - } - - AgentState::Idle -} - -pub(super) fn has_visible_blocker(content: &str) -> bool { - let lower = content.to_lowercase(); - let has_choice = lower.contains("yes") || lower.contains("no"); - - content.contains("│ Apply this change") - || content.contains("│ Allow execution") - || (has_choice - && (lower.contains("waiting for user confirmation") - || content.contains("│ Do you want to proceed") - || lower.contains("do you want to proceed?"))) - || content.lines().any(|line| { - let line = line.trim().to_ascii_lowercase(); - line.starts_with("❯") && (line.contains("yes") || line.contains("allow")) - }) -} -- cgit v1.2.3