diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-16 02:26:14 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-16 02:26:14 +0300 |
| commit | 72770305d388fd5ec247493e05a89b686c6d0026 (patch) | |
| tree | 44d95c9c69042ab07e27ace37853e190b6f00ba0 /src/api | |
| parent | 58c379f1f07adb4113e5f9ee673768b2e4b5be07 (diff) | |
feat: add hook-owned custom agent status labels
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/mod.rs | 1 | ||||
| -rw-r--r-- | src/api/schema.rs | 10 |
2 files changed, 11 insertions, 0 deletions
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<String>, #[serde(default, skip_serializing_if = "Option::is_none")] + pub custom_status: Option<String>, + #[serde(default, skip_serializing_if = "Option::is_none")] pub seq: Option<u64>, } @@ -546,6 +548,8 @@ pub struct PaneInfo { #[serde(default, skip_serializing_if = "Option::is_none")] pub agent: Option<String>, pub agent_status: AgentStatus, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub custom_status: Option<String>, 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<String>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub custom_status: Option<String>, } #[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<String>, }, } @@ -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, }, }, |
