From 72770305d388fd5ec247493e05a89b686c6d0026 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sat, 16 May 2026 02:26:14 +0300 Subject: feat: add hook-owned custom agent status labels --- src/api/mod.rs | 1 + src/api/schema.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) (limited to 'src/api') diff --git a/src/api/mod.rs b/src/api/mod.rs index a3bc674f..f125b156 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -941,6 +941,7 @@ impl ActiveAgentStatusChangedSubscription { workspace_id: pane.workspace_id, agent_status: current_status, agent: pane.agent, + custom_status: pane.custom_status, }), }) } diff --git a/src/api/schema.rs b/src/api/schema.rs index d2bf3ff6..bed8415a 100644 --- a/src/api/schema.rs +++ b/src/api/schema.rs @@ -211,6 +211,8 @@ pub struct PaneReportAgentParams { #[serde(default, skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(default, skip_serializing_if = "Option::is_none")] + pub custom_status: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] pub seq: Option, } @@ -546,6 +548,8 @@ pub struct PaneInfo { #[serde(default, skip_serializing_if = "Option::is_none")] pub agent: Option, pub agent_status: AgentStatus, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub custom_status: Option, pub revision: u64, } @@ -612,6 +616,8 @@ pub struct PaneAgentStatusChangedEvent { pub agent_status: AgentStatus, #[serde(default, skip_serializing_if = "Option::is_none")] pub agent: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub custom_status: Option, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -676,6 +682,8 @@ pub enum EventData { pane_id: String, workspace_id: String, agent_status: AgentStatus, + #[serde(default, skip_serializing_if = "Option::is_none")] + custom_status: Option, }, } @@ -734,6 +742,7 @@ mod tests { agent: "pi".into(), state: PaneAgentState::Working, message: Some("thinking".into()), + custom_status: Some("indexing".into()), seq: Some(42), }), }; @@ -1026,6 +1035,7 @@ mod tests { label: None, agent: None, agent_status: AgentStatus::Unknown, + custom_status: None, revision: 0, }, }, -- cgit v1.2.3