diff options
Diffstat (limited to 'src/detect/agents/gemini.rs')
| -rw-r--r-- | src/detect/agents/gemini.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/detect/agents/gemini.rs b/src/detect/agents/gemini.rs new file mode 100644 index 00000000..c47355c0 --- /dev/null +++ b/src/detect/agents/gemini.rs @@ -0,0 +1,28 @@ +use super::super::{has_confirmation_prompt, AgentState}; + +pub(super) fn detect(content: &str) -> AgentState { + let lower = content.to_lowercase(); + + // Blocked — explicit confirmation + if lower.contains("waiting for user confirmation") { + return AgentState::Blocked; + } + + // Blocked — box-drawing confirmation prompts + if content.contains("│ Apply this change") + || content.contains("│ Allow execution") + || content.contains("│ Do you want to proceed") + { + return AgentState::Blocked; + } + if has_confirmation_prompt(&lower) { + return AgentState::Blocked; + } + + // Working + if lower.contains("esc to cancel") { + return AgentState::Working; + } + + AgentState::Idle +} |
