From 2d8b4e2db4642dede084801c03516046f205626b Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Thu, 28 May 2026 05:06:04 +0300 Subject: feat: expose agent session refs in api --- src/api/schema.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/api') diff --git a/src/api/schema.rs b/src/api/schema.rs index aa7cbd3c..cd82f99f 100644 --- a/src/api/schema.rs +++ b/src/api/schema.rs @@ -803,6 +803,8 @@ pub struct AgentInfo { pub custom_status: Option, #[serde(default, skip_serializing_if = "HashMap::is_empty")] pub state_labels: HashMap, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub agent_session: Option, pub workspace_id: String, pub tab_id: String, pub pane_id: String, @@ -834,9 +836,19 @@ pub struct PaneInfo { pub custom_status: Option, #[serde(default, skip_serializing_if = "HashMap::is_empty")] pub state_labels: HashMap, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub agent_session: Option, pub revision: u64, } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct AgentSessionInfo { + pub source: String, + pub agent: String, + pub kind: crate::agent_resume::AgentSessionRefKind, + pub value: String, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PaneReadResult { pub pane_id: String, @@ -1402,6 +1414,7 @@ mod tests { agent_status: AgentStatus::Unknown, custom_status: None, state_labels: HashMap::new(), + agent_session: None, revision: 0, }, worktree: WorktreeInfo { @@ -1451,6 +1464,7 @@ mod tests { agent_status: AgentStatus::Unknown, custom_status: None, state_labels: HashMap::new(), + agent_session: None, revision: 0, }, }, -- cgit v1.2.3