From 5cfe5e5e730246948b0c9428ad876b6938590aad Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Mon, 13 Jul 2026 03:26:03 +0300 Subject: feat: add configurable sidebar metadata tokens --- src/api/schema/workspaces.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/api/schema/workspaces.rs') diff --git a/src/api/schema/workspaces.rs b/src/api/schema/workspaces.rs index 6934539c..a6177982 100644 --- a/src/api/schema/workspaces.rs +++ b/src/api/schema/workspaces.rs @@ -28,6 +28,19 @@ pub struct WorkspaceMoveParams { pub insert_index: usize, } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)] +pub struct WorkspaceReportMetadataParams { + pub workspace_id: String, + pub source: String, + #[schemars(schema_with = "super::common::metadata_token_patch_schema")] + pub tokens: HashMap>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub seq: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + #[schemars(range(min = 1, max = 86_400_000))] + pub ttl_ms: Option, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)] pub struct WorkspaceInfo { pub workspace_id: String, @@ -38,6 +51,9 @@ pub struct WorkspaceInfo { pub tab_count: usize, pub active_tab_id: String, pub agent_status: AgentStatus, + #[serde(default, skip_serializing_if = "HashMap::is_empty")] + #[schemars(schema_with = "super::common::metadata_token_values_schema")] + pub tokens: HashMap, #[serde(default, skip_serializing_if = "Option::is_none")] pub worktree: Option, } -- cgit v1.2.3