fix: update slash command count and add /setup assertion in test

- Update slash_command_specs().len() assertion from 139 to 140.
  The /setup command added by this PR increased the spec count by 1
  but the test's expected count was not updated, causing CI failure.

- Add assert!(help.contains("/setup")) to the
  renders_help_from_shared_specs test so the new command is
  verified in the help output.

  Fixes CI Build  and Test  on #3218.
This commit is contained in:
TheArchitectit
2026-06-03 14:24:41 -05:00
committed by Your Name
parent 3845040b9d
commit d58197cca4
3 changed files with 40 additions and 31 deletions

View File

@ -167,6 +167,29 @@ pub struct RuntimeFeatureConfig {
/// Controls which external AI coding framework rules are imported into the system prompt.
#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub enum RulesImportConfig {
/// Import from all supported frameworks when files are detected.
#[default]
Auto,
/// Do not import external framework rules; keep Claw instruction files only.
None,
/// Import only the named frameworks.
List(Vec<String>),
}
impl RulesImportConfig {
#[must_use]
pub fn should_import(&self, framework: &str) -> bool {
match self {
Self::Auto => true,
Self::None => false,
Self::List(frameworks) => frameworks
.iter()
.any(|candidate| candidate.eq_ignore_ascii_case(framework)),
}
}
}
/// Stored provider configuration from the setup wizard.
///
/// Represents the `provider` section in `~/.claw/settings.json`, used as a
@ -202,29 +225,6 @@ impl RuntimeProviderConfig {
}
}
pub enum RulesImportConfig {
/// Import from all supported frameworks when files are detected.
#[default]
Auto,
/// Do not import external framework rules; keep Claw instruction files only.
None,
/// Import only the named frameworks.
List(Vec<String>),
}
impl RulesImportConfig {
#[must_use]
pub fn should_import(&self, framework: &str) -> bool {
match self {
Self::Auto => true,
Self::None => false,
Self::List(frameworks) => frameworks
.iter()
.any(|candidate| candidate.eq_ignore_ascii_case(framework)),
}
}
}
/// Ordered chain of fallback model identifiers used when the primary
/// provider returns a retryable failure (429/500/503/etc.). The chain is
/// strict: each entry is tried in order until one succeeds.
@ -915,6 +915,11 @@ impl RuntimeConfig {
&self.feature_config.rules_import
}
#[must_use]
pub fn provider(&self) -> &RuntimeProviderConfig {
&self.feature_config.provider
}
/// Merge config-level default trusted roots with per-call roots.
///
/// Config roots are defaults and are kept first; per-call roots extend the