aboutsummaryrefslogtreecommitdiff
path: root/src/detect/agents
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-08 21:52:48 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-09 04:26:19 +0300
commitf18bee9f5c43e56ebdcb7e5fad17f3236de4d08e (patch)
treefcff390786cbba88faac8ded8fd8535054f36d8b /src/detect/agents
parentee51c5e5fbaea694e65bb0a4908f75bcaf9707d1 (diff)
fix: smooth agent status transitions
Diffstat (limited to 'src/detect/agents')
-rw-r--r--src/detect/agents/claude_code.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/detect/agents/claude_code.rs b/src/detect/agents/claude_code.rs
index a13019a4..1336c480 100644
--- a/src/detect/agents/claude_code.rs
+++ b/src/detect/agents/claude_code.rs
@@ -59,6 +59,29 @@ pub(super) fn has_visible_blocker(content: &str) -> bool {
|| lower.contains("ctrl+e to explain"))
}
+pub(in crate::detect) fn has_idle_recap_notice(content: &str) -> bool {
+ if !has_prompt_box(content) || has_visible_blocker(content) {
+ return false;
+ }
+
+ let above_prompt = content_above_prompt_box(content);
+ let bottom_lines = bottom_non_empty_lines(above_prompt, 8);
+ let Some(last_line) = bottom_lines.last() else {
+ return false;
+ };
+ if !last_line
+ .to_ascii_lowercase()
+ .contains("(disable recaps in /config)")
+ {
+ return false;
+ }
+ let bottom = normalize_lines(&bottom_lines).to_ascii_lowercase();
+
+ bottom.contains("※ recap:")
+ && !bottom.contains("esc to interrupt")
+ && !bottom.contains("ctrl+c to interrupt")
+}
+
pub(super) fn has_working_chrome(content: &str) -> bool {
let above = content_above_prompt_box(content);
let above_lower = above.to_lowercase();