pub struct Config {
pub linear: LinearConfig,
pub embedding: EmbeddingConfig,
pub search: SearchConfig,
pub anthropic: AnthropicConfig,
pub triage: TriageConfig,
pub default_workspace: Option<String>,
pub workspaces: HashMap<String, WorkspaceConfig>,
}Fields§
§linear: LinearConfig§embedding: EmbeddingConfig§search: SearchConfig§anthropic: AnthropicConfig§triage: TriageConfig§default_workspace: Option<String>§workspaces: HashMap<String, WorkspaceConfig>Implementations§
Source§impl Config
impl Config
pub fn config_dir() -> Result<PathBuf>
pub fn config_path() -> Result<PathBuf>
pub fn data_dir() -> Result<PathBuf>
pub fn db_path() -> Result<PathBuf>
pub fn models_dir() -> Result<PathBuf>
pub fn load() -> Result<Self>
pub fn save(&self) -> Result<()>
pub fn linear_api_key(&self) -> Result<&str>
pub fn anthropic_api_key(&self) -> Result<&str>
Sourcepub fn workspace_config(&self, name: &str) -> Result<WorkspaceConfig>
pub fn workspace_config(&self, name: &str) -> Result<WorkspaceConfig>
Returns the workspace config by name. For “default”, falls back to the
legacy [linear] section if no explicit workspace is defined.
Sourcepub fn workspace_api_key(&self, workspace: &str) -> Result<String>
pub fn workspace_api_key(&self, workspace: &str) -> Result<String>
Gets the API key for a workspace.
Sourcepub fn workspace_default_team(&self, workspace: &str) -> Result<Option<String>>
pub fn workspace_default_team(&self, workspace: &str) -> Result<Option<String>>
Gets the default team for a workspace.
Sourcepub fn workspace_names(&self) -> Vec<String>
pub fn workspace_names(&self) -> Vec<String>
Lists all configured workspace names. Falls back to vec![“default”] if only legacy config is present.
Sourcepub fn resolve_active_workspace(&self) -> Result<String>
pub fn resolve_active_workspace(&self) -> Result<String>
Resolves the active workspace. Checks in order:
RECTILINEAR_WORKSPACEenv var- Persisted state file at
data_dir/active_workspace default_workspacefrom config- Single workspace shortcut (if exactly one workspace is configured)
- Errors with guidance if multiple workspaces exist and none is selected
Sourcepub fn set_active_workspace(name: &str) -> Result<()>
pub fn set_active_workspace(name: &str) -> Result<()>
Writes the active workspace name to data_dir/active_workspace.
Sourcepub fn get_persisted_workspace() -> Option<String>
pub fn get_persisted_workspace() -> Option<String>
Reads the persisted workspace from data_dir/active_workspace.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more