From dacbfed01ebe9d6ec7f1e969ad8a29e86b6fad28 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Thu, 9 Apr 2026 17:39:13 +0300 Subject: docs: clarify automatic detection and socket integrations --- src/detect.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/detect.rs b/src/detect.rs index eace9f54..a026ddce 100644 --- a/src/detect.rs +++ b/src/detect.rs @@ -417,7 +417,11 @@ fn has_claude_blocked_prompt(content: &str, lower_content: &str) -> bool { fn has_claude_yes_no_choice(content: &str) -> bool { content.lines().any(|line| { - let trimmed = line.trim().trim_start_matches('❯').trim_start().to_lowercase(); + let trimmed = line + .trim() + .trim_start_matches('❯') + .trim_start() + .to_lowercase(); trimmed == "yes" || trimmed == "no" || trimmed.starts_with("1. yes") @@ -700,8 +704,7 @@ mod tests { #[test] fn claude_waiting_selection_prompt() { - let screen = - "Do you want to proceed?\n❯ 1. Yes\n 2. No\n\nEsc to cancel · Tab to amend"; + let screen = "Do you want to proceed?\n❯ 1. Yes\n 2. No\n\nEsc to cancel · Tab to amend"; assert_eq!(detect_claude(screen), AgentState::Blocked); } -- cgit v1.2.3