diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-30 23:54:41 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-30 23:54:41 +0300 |
| commit | d477341e6af816ff4396042b084a0378ef437b4a (patch) | |
| tree | e332b6f7a0d23d9effd21c3ca8ab27698ed83444 /src/detect/agents/github_copilot.rs | |
| parent | 8df1639048529b383358000879b5ee078a90b9f9 (diff) | |
refactor: split agent detection by agent
Move screen detection into per-agent modules and keep visible-state arbitration centralized in terminal state.
Tighten Codex prompt-scoped working detection and Claude hook/screen recovery for stale blocked and idle reports.
Add a focused just recipe for single-test runs.
refs #349
refs #352
Diffstat (limited to 'src/detect/agents/github_copilot.rs')
| -rw-r--r-- | src/detect/agents/github_copilot.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/detect/agents/github_copilot.rs b/src/detect/agents/github_copilot.rs new file mode 100644 index 00000000..eed03011 --- /dev/null +++ b/src/detect/agents/github_copilot.rs @@ -0,0 +1,24 @@ +use super::super::AgentState; + +pub(super) fn detect(content: &str) -> AgentState { + let lower = content.to_lowercase(); + + // Blocked + if lower.contains("esc to cancel") + && (lower.contains("enter to select") + || lower.contains("enter to confirm") + || lower.contains("enter to submit")) + { + return AgentState::Blocked; + } + + // Working + if lower.contains("esc to cancel") + || lower.contains("esc cancel") + || lower.contains("esc again to cancel") + { + return AgentState::Working; + } + + AgentState::Idle +} |
