v0.8.63: Add first-class sub-agent toggle#3327
Conversation
- Reorder set_subagents_feature to persist before updating in-memory state - Use eq_ignore_ascii_case to avoid heap allocation in value parsing
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Thanks @BovmantH for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
There was a problem hiding this comment.
Code Review
This pull request introduces first-class TUI controls and dynamic configuration support for the subagents feature flag. It allows users to check, toggle, and persist the subagents feature flag via /config subagents commands, updates the experimental configuration view to make this flag editable, and refactors the engine to support updating feature flags dynamically at runtime. Documentation has also been updated to clarify the distinction between the global subagents feature flag and the max_depth limit. Feedback suggests making the key matching in is_subagents_config_key more robust by converting the key to lowercase and supporting hyphenated variants under the features. and feature. prefixes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| fn is_subagents_config_key(key: &str) -> bool { | ||
| matches!( | ||
| key, | ||
| "subagents" | "sub-agents" | "features.subagents" | "feature.subagents" | ||
| ) | ||
| } |
There was a problem hiding this comment.
To make the key matching more robust and user-friendly, we should:
- Convert the input
keyto lowercase (usingto_ascii_lowercase()) to ensure case-insensitive matching when queried via/config(sinceshow_single_settingmight not lowercase the key). - Support hyphenated variants under the
features.andfeature.prefixes (e.g.,features.sub-agentsandfeature.sub-agents) for completeness, sincesub-agentsis already supported as a standalone key.
| fn is_subagents_config_key(key: &str) -> bool { | |
| matches!( | |
| key, | |
| "subagents" | "sub-agents" | "features.subagents" | "feature.subagents" | |
| ) | |
| } | |
| fn is_subagents_config_key(key: &str) -> bool { | |
| matches!( | |
| key.to_ascii_lowercase().as_str(), | |
| "subagents" | |
| | "sub-agents" | |
| | "features.subagents" | |
| | "features.sub-agents" | |
| | "feature.subagents" | |
| | "feature.sub-agents" | |
| ) | |
| } |
- Use to_ascii_lowercase() for case-insensitive matching - Add features.sub-agents and feature.sub-agents variants
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Summary
/config subagents on|off|statusplus/config features.subagents true|falseas first-class controls for the existingfeatures.subagentsflag.AppAction::UpdateFeaturesthroughOp::SetFeatures; persisted changes write[features] subagents = ....features.subagentseditable in the native/configExperimental section, and document the difference between the global feature flag and[subagents] max_depth = 0.Closes #3305.
Verification
cargo fmt -- --checkcargo test -p codewhale-tui --bins subagentcargo test -p codewhale-tui --bins set_features_op_emits_runtime_update_statuscargo test -p codewhale-tui --bins config_view_includes_expected_editable_rowscargo test -p codewhale-tui --bins config_view_experimental_features_show_effective_state_and_overrides