Skip to main content

CommandConfigContext

Trait CommandConfigContext 

Source
pub trait CommandConfigContext {
Show 27 methods // Required methods fn config_path(&self) -> Option<PathBuf>; fn translation_enabled(&self) -> bool; fn set_translation_enabled(&mut self, enabled: bool); fn audit(&mut self) -> Result<CommandConfigAuditReport, String>; fn workflow_summary(&mut self) -> CommandWorkflowSummary; fn subagents_status(&mut self) -> Result<CommandSubagentsReport, String>; fn subagent(&mut self, key: &str) -> ConfigReply; fn set_subagent( &mut self, key: &str, value: &str, persist: bool, ) -> ConfigReply; fn search_provider_status(&mut self) -> ConfigReply; fn search_provider_names(&self) -> &'static str; fn set_search_provider(&mut self, value: &str, persist: bool) -> ConfigReply; fn notifications_status(&mut self) -> ConfigReply; fn notification(&mut self, key: &str) -> ConfigReply; fn set_notification( &mut self, key: &str, value: &str, persist: bool, ) -> ConfigReply; fn apply_preset(&mut self, name: &str, persist: bool) -> ConfigReply; fn get_value(&mut self, key: &str) -> ConfigReply; fn set_value( &mut self, key: &str, value: &str, persist: bool, ) -> ConfigReply; fn show_settings(&mut self) -> Result<CommandSettingsReport, String>; fn theme_schema(&self) -> String; fn themes_dir(&self) -> Result<String, String>; fn verbose_enabled(&self) -> bool; fn set_verbose_enabled(&mut self, enabled: bool); fn screen_mode(&self) -> CommandScreenMode; fn build_plan(&mut self) -> Option<CommandClaudePlan>; fn write_artifacts( &mut self, report: &str, bundle: Option<&str>, ) -> CommandClaudeArtifacts; fn apply_import( &mut self, plan: &CommandClaudePlan, report_path: &Path, wrote_report: bool, ) -> CommandClaudeApplyOutcome; fn display_path(&self, path: &Path) -> String;
}
Expand description

Read/write configuration, presets, the editability audit, login state and the config-owned view/display commands (/mode, /theme, /verbose, /fullscreen, /inline, /statusbar, /workbar, /import-claude).

The host owns per-key validation, normalization, persistence and the exact message; the portable handler owns argument parsing and subcommand routing. A missing facet must fail safely rather than panic.

Required Methods§

Source

fn config_path(&self) -> Option<PathBuf>

Path of the active user configuration file, when one is resolved.

Source

fn translation_enabled(&self) -> bool

Source

fn set_translation_enabled(&mut self, enabled: bool)

Source

fn audit(&mut self) -> Result<CommandConfigAuditReport, String>

/config status|audit|editability|editable — typed audit rows.

Source

fn workflow_summary(&mut self) -> CommandWorkflowSummary

/config workflow / /config goal — typed effective facts.

Source

fn subagents_status(&mut self) -> Result<CommandSubagentsReport, String>

/config subagents status — typed subagent facts.

Source

fn subagent(&mut self, key: &str) -> ConfigReply

/config subagents <key> — show one subagent setting.

Source

fn set_subagent(&mut self, key: &str, value: &str, persist: bool) -> ConfigReply

/config subagents <key> <value> [--save].

Source

fn search_provider_status(&mut self) -> ConfigReply

/config search.provider — the current provider and source.

Source

fn search_provider_names(&self) -> &'static str

Accepted search.provider values, for the portable usage message.

Source

fn set_search_provider(&mut self, value: &str, persist: bool) -> ConfigReply

/config search.provider <value> [--save].

Source

fn notifications_status(&mut self) -> ConfigReply

/config notifications — the notifications report.

Source

fn notification(&mut self, key: &str) -> ConfigReply

/config notifications <key> — show one notification setting.

Source

fn set_notification( &mut self, key: &str, value: &str, persist: bool, ) -> ConfigReply

/config notifications <key> <value> [--save].

Source

fn apply_preset(&mut self, name: &str, persist: bool) -> ConfigReply

/config preset <name> [--save].

Source

fn get_value(&mut self, key: &str) -> ConfigReply

/config <key> — show the current value.

Source

fn set_value(&mut self, key: &str, value: &str, persist: bool) -> ConfigReply

/config <key> <value> [--save].

Source

fn show_settings(&mut self) -> Result<CommandSettingsReport, String>

/settings text — typed settings facts.

Source

fn theme_schema(&self) -> String

/theme schema — the user theme JSON schema.

Source

fn themes_dir(&self) -> Result<String, String>

/theme path — the user themes directory, rendered for display.

Source

fn verbose_enabled(&self) -> bool

Current verbose-transcript flag.

Source

fn set_verbose_enabled(&mut self, enabled: bool)

Set the verbose-transcript flag (the host also marks history updated).

Source

fn screen_mode(&self) -> CommandScreenMode

Current terminal screen mode, for /fullscreen and /inline.

Source

fn build_plan(&mut self) -> Option<CommandClaudePlan>

/import-claude — build the plan from the host’s home/workspace.

Source

fn write_artifacts( &mut self, report: &str, bundle: Option<&str>, ) -> CommandClaudeArtifacts

/import-claude — persist the rendered report and optional bundle.

Source

fn apply_import( &mut self, plan: &CommandClaudePlan, report_path: &Path, wrote_report: bool, ) -> CommandClaudeApplyOutcome

/import-claude --apply — carry over the standing instructions.

Source

fn display_path(&self, path: &Path) -> String

Host display form of a path.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§