diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-10 15:24:24 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-10 15:33:45 +0300 |
| commit | 36a1b7f86444871f0c38ff36510a6e3c2eec48c6 (patch) | |
| tree | 4a2d100eef7f26af7feaa93ce661423c3994c54e /src/detect/agents/gemini.rs | |
| parent | 8d13492926829c5cf0ea42c8613344cd65ff59fa (diff) | |
feat: distribute agent detection manifests
Diffstat (limited to 'src/detect/agents/gemini.rs')
| -rw-r--r-- | src/detect/agents/gemini.rs | 31 |
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")) - }) -} |
