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§
Sourcefn config_path(&self) -> Option<PathBuf>
fn config_path(&self) -> Option<PathBuf>
Path of the active user configuration file, when one is resolved.
fn translation_enabled(&self) -> bool
fn set_translation_enabled(&mut self, enabled: bool)
Sourcefn audit(&mut self) -> Result<CommandConfigAuditReport, String>
fn audit(&mut self) -> Result<CommandConfigAuditReport, String>
/config status|audit|editability|editable — typed audit rows.
Sourcefn workflow_summary(&mut self) -> CommandWorkflowSummary
fn workflow_summary(&mut self) -> CommandWorkflowSummary
/config workflow / /config goal — typed effective facts.
Sourcefn subagents_status(&mut self) -> Result<CommandSubagentsReport, String>
fn subagents_status(&mut self) -> Result<CommandSubagentsReport, String>
/config subagents status — typed subagent facts.
Sourcefn subagent(&mut self, key: &str) -> ConfigReply
fn subagent(&mut self, key: &str) -> ConfigReply
/config subagents <key> — show one subagent setting.
Sourcefn set_subagent(&mut self, key: &str, value: &str, persist: bool) -> ConfigReply
fn set_subagent(&mut self, key: &str, value: &str, persist: bool) -> ConfigReply
/config subagents <key> <value> [--save].
Sourcefn search_provider_status(&mut self) -> ConfigReply
fn search_provider_status(&mut self) -> ConfigReply
/config search.provider — the current provider and source.
Sourcefn search_provider_names(&self) -> &'static str
fn search_provider_names(&self) -> &'static str
Accepted search.provider values, for the portable usage message.
Sourcefn set_search_provider(&mut self, value: &str, persist: bool) -> ConfigReply
fn set_search_provider(&mut self, value: &str, persist: bool) -> ConfigReply
/config search.provider <value> [--save].
Sourcefn notifications_status(&mut self) -> ConfigReply
fn notifications_status(&mut self) -> ConfigReply
/config notifications — the notifications report.
Sourcefn notification(&mut self, key: &str) -> ConfigReply
fn notification(&mut self, key: &str) -> ConfigReply
/config notifications <key> — show one notification setting.
Sourcefn set_notification(
&mut self,
key: &str,
value: &str,
persist: bool,
) -> ConfigReply
fn set_notification( &mut self, key: &str, value: &str, persist: bool, ) -> ConfigReply
/config notifications <key> <value> [--save].
Sourcefn apply_preset(&mut self, name: &str, persist: bool) -> ConfigReply
fn apply_preset(&mut self, name: &str, persist: bool) -> ConfigReply
/config preset <name> [--save].
Sourcefn get_value(&mut self, key: &str) -> ConfigReply
fn get_value(&mut self, key: &str) -> ConfigReply
/config <key> — show the current value.
Sourcefn set_value(&mut self, key: &str, value: &str, persist: bool) -> ConfigReply
fn set_value(&mut self, key: &str, value: &str, persist: bool) -> ConfigReply
/config <key> <value> [--save].
Sourcefn show_settings(&mut self) -> Result<CommandSettingsReport, String>
fn show_settings(&mut self) -> Result<CommandSettingsReport, String>
/settings text — typed settings facts.
Sourcefn theme_schema(&self) -> String
fn theme_schema(&self) -> String
/theme schema — the user theme JSON schema.
Sourcefn themes_dir(&self) -> Result<String, String>
fn themes_dir(&self) -> Result<String, String>
/theme path — the user themes directory, rendered for display.
Sourcefn verbose_enabled(&self) -> bool
fn verbose_enabled(&self) -> bool
Current verbose-transcript flag.
Sourcefn set_verbose_enabled(&mut self, enabled: bool)
fn set_verbose_enabled(&mut self, enabled: bool)
Set the verbose-transcript flag (the host also marks history updated).
Sourcefn screen_mode(&self) -> CommandScreenMode
fn screen_mode(&self) -> CommandScreenMode
Current terminal screen mode, for /fullscreen and /inline.
Sourcefn build_plan(&mut self) -> Option<CommandClaudePlan>
fn build_plan(&mut self) -> Option<CommandClaudePlan>
/import-claude — build the plan from the host’s home/workspace.
Sourcefn write_artifacts(
&mut self,
report: &str,
bundle: Option<&str>,
) -> CommandClaudeArtifacts
fn write_artifacts( &mut self, report: &str, bundle: Option<&str>, ) -> CommandClaudeArtifacts
/import-claude — persist the rendered report and optional bundle.
Sourcefn apply_import(
&mut self,
plan: &CommandClaudePlan,
report_path: &Path,
wrote_report: bool,
) -> CommandClaudeApplyOutcome
fn apply_import( &mut self, plan: &CommandClaudePlan, report_path: &Path, wrote_report: bool, ) -> CommandClaudeApplyOutcome
/import-claude --apply — carry over the standing instructions.
Sourcefn display_path(&self, path: &Path) -> String
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".