aboutsummaryrefslogtreecommitdiff
path: root/src/detect/agents/cline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/detect/agents/cline.rs')
-rw-r--r--src/detect/agents/cline.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/detect/agents/cline.rs b/src/detect/agents/cline.rs
index 86b5ce01..13509606 100644
--- a/src/detect/agents/cline.rs
+++ b/src/detect/agents/cline.rs
@@ -4,11 +4,7 @@ pub(super) fn detect(content: &str) -> AgentState {
let lower = content.to_lowercase();
// Blocked
- if lower.contains("let cline use this tool") {
- return AgentState::Blocked;
- }
- // [act mode] or [plan mode] followed by "yes"
- if (lower.contains("[act mode]") || lower.contains("[plan mode]")) && lower.contains("yes") {
+ if has_visible_blocker(content) {
return AgentState::Blocked;
}
@@ -20,3 +16,11 @@ pub(super) fn detect(content: &str) -> AgentState {
// Cline defaults to working (unlike most agents that default to idle)
AgentState::Working
}
+
+pub(super) fn has_visible_blocker(content: &str) -> bool {
+ let lower = content.to_lowercase();
+ lower.contains("let cline use this tool")
+ || ((lower.contains("[act mode]") || lower.contains("[plan mode]"))
+ && (lower.contains("execute command?") || lower.contains("use this tool?"))
+ && lower.contains("yes"))
+}