Have a coding mode and only show coding and plan (#9802)

This commit is contained in:
Ahmed Ibrahim
2026-01-23 19:28:49 -08:00
committed by GitHub
parent 77222492f9
commit b3127e2eeb
12 changed files with 99 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
//! Validates that the collaboration mode list endpoint returns the expected default presets.
//!
//! The test drives the app server through the MCP harness and asserts that the list response
//! includes the plan, pair programming, and execute modes with their default model and reasoning
//! includes the plan, coding, pair programming, and execute modes with their default model and reasoning
//! effort settings, which keeps the API contract visible in one place.
#![allow(clippy::unwrap_used)]
@@ -45,7 +45,12 @@ async fn list_collaboration_modes_returns_presets() -> Result<()> {
let CollaborationModeListResponse { data: items } =
to_response::<CollaborationModeListResponse>(response)?;
let expected = vec![plan_preset(), pair_programming_preset(), execute_preset()];
let expected = vec![
plan_preset(),
code_preset(),
pair_programming_preset(),
execute_preset(),
];
assert_eq!(expected, items);
Ok(())
}
@@ -74,6 +79,15 @@ fn pair_programming_preset() -> CollaborationMode {
.unwrap()
}
/// Builds the code preset that the list response is expected to return.
fn code_preset() -> CollaborationMode {
let presets = test_builtin_collaboration_mode_presets();
presets
.into_iter()
.find(|p| p.mode == ModeKind::Code)
.unwrap()
}
/// Builds the execute preset that the list response is expected to return.
///
/// The execute preset uses a different reasoning effort to capture the higher-effort