Add code_mode_only feature (#14617)

Summary
- add the code_mode_only feature flag/config schema and wire its
dependency on code_mode
- update code mode tool descriptions to list nested tools with detailed
headers
- restrict available tools for prompt and exec descriptions when
code_mode_only is enabled and test the behavior

Testing
- Not run (not requested)
This commit is contained in:
pakrym-oai
2026-03-13 13:30:19 -07:00
committed by GitHub
Unverified
parent ef37d313c6
commit 477a2dd345
10 changed files with 302 additions and 31 deletions
+10
View File
@@ -58,6 +58,16 @@ fn js_repl_is_experimental_and_user_toggleable() {
assert_eq!(Feature::JsRepl.default_enabled(), false);
}
#[test]
fn code_mode_only_requires_code_mode() {
let mut features = Features::with_defaults();
features.enable(Feature::CodeModeOnly);
features.normalize_dependencies();
assert_eq!(features.enabled(Feature::CodeModeOnly), true);
assert_eq!(features.enabled(Feature::CodeMode), true);
}
#[test]
fn guardian_approval_is_experimental_and_user_toggleable() {
let spec = Feature::GuardianApproval.info();