pub struct Config {Show 39 fields
pub backend: CliBackend,
pub backend_order: Vec<CliBackend>,
pub commit_mode: CommitMode,
pub sparkle_mode: CommitMode,
pub provider: String,
pub model: String,
pub cli_path: String,
pub claude_path: String,
pub codex_path: String,
pub claude_model: String,
pub codex_model: String,
pub codex_provider: String,
pub gemini_path: String,
pub gemini_model: String,
pub opencode_pr_provider: String,
pub opencode_pr_model: String,
pub opencode_cheap_provider: String,
pub opencode_cheap_model: String,
pub claude_pr_model: String,
pub claude_cheap_model: String,
pub codex_pr_model: String,
pub codex_cheap_model: String,
pub codex_pr_provider: String,
pub codex_cheap_provider: String,
pub gemini_pr_model: String,
pub gemini_cheap_model: String,
pub pr_base_branch: String,
pub branch_mode: BranchMode,
pub diff_source: DiffSource,
pub max_diff_length: usize,
pub use_emojis: bool,
pub use_lower_case: bool,
pub commit_template: String,
pub languages: Vec<LanguageConfig>,
pub active_language: String,
pub show_language_selector: bool,
pub auto_update: bool,
pub refine: RefineConfig,
pub custom: CustomConfig,
}Expand description
Main configuration. All fields have defaults matching the TypeScript extension.
Fields§
§backend: CliBackend§backend_order: Vec<CliBackend>§commit_mode: CommitMode§sparkle_mode: CommitMode§provider: String§model: String§cli_path: String§claude_path: String§codex_path: String§claude_model: String§codex_model: String§codex_provider: String§gemini_path: String§gemini_model: String§opencode_pr_provider: String§opencode_pr_model: String§opencode_cheap_provider: String§opencode_cheap_model: String§claude_pr_model: String§claude_cheap_model: String§codex_pr_model: String§codex_cheap_model: String§codex_pr_provider: String§codex_cheap_provider: String§gemini_pr_model: String§gemini_cheap_model: String§pr_base_branch: String§branch_mode: BranchMode§diff_source: DiffSource§max_diff_length: usize§use_emojis: bool§use_lower_case: bool§commit_template: String§languages: Vec<LanguageConfig>§active_language: String§show_language_selector: bool§auto_update: bool§refine: RefineConfig§custom: CustomConfigImplementations§
Source§impl Config
impl Config
Sourcepub fn default_config_dir() -> Option<PathBuf>
pub fn default_config_dir() -> Option<PathBuf>
Default config directory: $XDG_CONFIG_HOME/opencodecommit
or $HOME/.config/opencodecommit.
Sourcepub fn active_language_instruction(&self) -> String
pub fn active_language_instruction(&self) -> String
Resolve the language instruction for the active language.
Sourcepub fn active_prompt_modules(&self) -> PromptModules
pub fn active_prompt_modules(&self) -> PromptModules
Resolve prompt modules for the active language. Missing fields on the active language fall back to the first language.
Sourcepub fn backend_cli_path(&self) -> &str
pub fn backend_cli_path(&self) -> &str
Return the CLI path for the current backend.
Sourcepub fn cli_path_for(&self, backend: CliBackend) -> &str
pub fn cli_path_for(&self, backend: CliBackend) -> &str
Return the CLI path for a specific backend.
Sourcepub fn effective_backend_order(&self) -> &[CliBackend]
pub fn effective_backend_order(&self) -> &[CliBackend]
Return the effective backend order for failover.
Sourcepub fn backend_model(&self) -> &str
pub fn backend_model(&self) -> &str
Return the model for the current backend.
Sourcepub fn backend_pr_model(&self) -> &str
pub fn backend_pr_model(&self) -> &str
Return the PR model for the current backend.
Sourcepub fn backend_cheap_model(&self) -> &str
pub fn backend_cheap_model(&self) -> &str
Return the cheap model for the current backend.
Sourcepub fn backend_pr_provider(&self) -> &str
pub fn backend_pr_provider(&self) -> &str
Return the PR provider for the current backend (OpenCode/Codex only).
Sourcepub fn backend_cheap_provider(&self) -> &str
pub fn backend_cheap_provider(&self) -> &str
Return the cheap provider for the current backend (OpenCode/Codex only).
Sourcepub fn default_config_path() -> Option<PathBuf>
pub fn default_config_path() -> Option<PathBuf>
Default config file path: $XDG_CONFIG_HOME/opencodecommit/config.toml
or $HOME/.config/opencodecommit/config.toml.
Sourcepub fn load(path: &Path) -> Result<Self>
pub fn load(path: &Path) -> Result<Self>
Load config from a TOML file. Missing fields get defaults.
Sourcepub fn load_or_default(explicit_path: Option<&Path>) -> Result<Self>
pub fn load_or_default(explicit_path: Option<&Path>) -> Result<Self>
Load from the default config path, or return defaults if no file exists.