/// Context for a workspace operation. /// /// In Tauri, this is extracted from the WebviewWindow URL. /// In CLI, this is constructed from command arguments or config. #[derive(Debug, Clone, Default)] pub struct WorkspaceContext { pub workspace_id: Option, pub environment_id: Option, pub cookie_jar_id: Option, pub request_id: Option, } impl WorkspaceContext { pub fn new() -> Self { Self::default() } pub fn with_workspace(mut self, workspace_id: impl Into) -> Self { self.workspace_id = Some(workspace_id.into()); self } pub fn with_environment(mut self, environment_id: impl Into) -> Self { self.environment_id = Some(environment_id.into()); self } pub fn with_cookie_jar(mut self, cookie_jar_id: impl Into) -> Self { self.cookie_jar_id = Some(cookie_jar_id.into()); self } pub fn with_request(mut self, request_id: impl Into) -> Self { self.request_id = Some(request_id.into()); self } }