aboutsummaryrefslogtreecommitdiff
path: root/src/detect/agents/gemini.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/detect/agents/gemini.rs')
-rw-r--r--src/detect/agents/gemini.rs31
1 files changed, 0 insertions, 31 deletions
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"))
- })
-}