aboutsummaryrefslogtreecommitdiff
path: root/src/pane/agent_detection.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-10 19:23:13 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-10 19:23:13 +0300
commit82468a0e03360219898ebf3735bdf559182009f8 (patch)
tree0ee5213fe041a539f23e846f9148493528249512 /src/pane/agent_detection.rs
parent36a1b7f86444871f0c38ff36510a6e3c2eec48c6 (diff)
feat: add manifest-based detection engine
Diffstat (limited to 'src/pane/agent_detection.rs')
-rw-r--r--src/pane/agent_detection.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/pane/agent_detection.rs b/src/pane/agent_detection.rs
index e6afd368..d891c284 100644
--- a/src/pane/agent_detection.rs
+++ b/src/pane/agent_detection.rs
@@ -512,11 +512,22 @@ pub(super) fn decide_screen_detection_publish(
}
}
+#[allow(dead_code)] // shim for tests; detection_update_for_publish_with_osc is the real path
pub(super) fn detection_update_for_publish(
agent: Option<Agent>,
content: &str,
process_exited: bool,
) -> Option<crate::detect::AgentDetection> {
+ detection_update_for_publish_with_osc(agent, content, "", "", process_exited)
+}
+
+pub(super) fn detection_update_for_publish_with_osc(
+ agent: Option<Agent>,
+ content: &str,
+ osc_title: &str,
+ osc_progress: &str,
+ process_exited: bool,
+) -> Option<crate::detect::AgentDetection> {
if process_exited {
return Some(crate::detect::AgentDetection {
state: AgentState::Idle,
@@ -527,7 +538,7 @@ pub(super) fn detection_update_for_publish(
});
}
- let detection = crate::detect::detect_agent(agent, content);
+ let detection = crate::detect::detect_agent_with_osc(agent, content, osc_title, osc_progress);
(!detection.skip_state_update).then_some(detection)
}