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.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/detect/agents/cline.rs b/src/detect/agents/cline.rs
new file mode 100644
index 00000000..86b5ce01
--- /dev/null
+++ b/src/detect/agents/cline.rs
@@ -0,0 +1,22 @@
+use super::super::AgentState;
+
+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") {
+ return AgentState::Blocked;
+ }
+
+ // Idle
+ if lower.contains("cline is ready for your message") {
+ return AgentState::Idle;
+ }
+
+ // Cline defaults to working (unlike most agents that default to idle)
+ AgentState::Working
+}