aboutsummaryrefslogtreecommitdiff
path: root/src/workspace
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-26 17:10:28 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-26 17:10:28 +0300
commit3750e0bae21c54da3947d337584f180a21d0bc67 (patch)
tree4542d8af76b4fee0c428ca5e9378a06946ef62ca /src/workspace
parent1b980eaa9d4cbc050b6b81525e4b6b72ae853be5 (diff)
feat: add pane metadata reporting
refs #36
Diffstat (limited to 'src/workspace')
-rw-r--r--src/workspace/aggregate.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/workspace/aggregate.rs b/src/workspace/aggregate.rs
index 4024f081..c9c1266d 100644
--- a/src/workspace/aggregate.rs
+++ b/src/workspace/aggregate.rs
@@ -18,6 +18,7 @@ pub struct PaneDetail {
pub state: AgentState,
pub seen: bool,
pub custom_status: Option<String>,
+ pub state_labels: HashMap<String, String>,
}
impl Tab {
@@ -36,11 +37,15 @@ impl Tab {
.filter_map(|id| {
let pane = self.panes.get(id)?;
let terminal = terminals.get(&pane.attached_terminal_id)?;
- let agent_label = terminal
+ let fallback_agent_label = terminal
.agent_name
.as_deref()
.or_else(|| terminal.effective_agent_label())?
.to_string();
+ let agent_label = terminal
+ .effective_display_agent()
+ .unwrap_or_else(|| fallback_agent_label.clone());
+ let presentation = terminal.effective_presentation();
Some(PaneDetail {
pane_id: *id,
tab_idx: self.number.saturating_sub(1),
@@ -50,7 +55,8 @@ impl Tab {
agent: terminal.effective_known_agent(),
state: terminal.state,
seen: pane.seen,
- custom_status: terminal.effective_custom_status().map(str::to_string),
+ custom_status: presentation.custom_status,
+ state_labels: presentation.state_labels,
})
})
.collect()