got rid of experimental_mode for configtoml (#12077)
This commit is contained in:
parent
486e60bb55
commit
189f592014
5 changed files with 3 additions and 36 deletions
|
|
@ -511,14 +511,6 @@
|
|||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ModeKind": {
|
||||
"description": "Initial collaboration mode to use when the TUI starts.",
|
||||
"enum": [
|
||||
"plan",
|
||||
"default"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ModelProviderInfo": {
|
||||
"additionalProperties": false,
|
||||
"description": "Serializable representation of a provider definition.",
|
||||
|
|
@ -1161,15 +1153,6 @@
|
|||
"description": "Enable animations (welcome screen, shimmer effects, spinners). Defaults to `true`.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimental_mode": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ModeKind"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"description": "Start the TUI in the specified collaboration mode (plan/default). Defaults to unset."
|
||||
},
|
||||
"notification_method": {
|
||||
"allOf": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ use codex_app_server_protocol::Tools;
|
|||
use codex_app_server_protocol::UserSavedConfig;
|
||||
use codex_protocol::config_types::AltScreenMode;
|
||||
use codex_protocol::config_types::ForcedLoginMethod;
|
||||
use codex_protocol::config_types::ModeKind;
|
||||
use codex_protocol::config_types::Personality;
|
||||
use codex_protocol::config_types::ReasoningSummary;
|
||||
use codex_protocol::config_types::SandboxMode;
|
||||
|
|
@ -249,7 +248,6 @@ pub struct Config {
|
|||
pub show_tooltips: bool,
|
||||
|
||||
/// Start the TUI in the specified collaboration mode (plan/default).
|
||||
pub experimental_mode: Option<ModeKind>,
|
||||
|
||||
/// Controls whether the TUI uses the terminal's alternate screen buffer.
|
||||
///
|
||||
|
|
@ -1933,7 +1931,6 @@ impl Config {
|
|||
.unwrap_or_default(),
|
||||
animations: cfg.tui.as_ref().map(|t| t.animations).unwrap_or(true),
|
||||
show_tooltips: cfg.tui.as_ref().map(|t| t.show_tooltips).unwrap_or(true),
|
||||
experimental_mode: cfg.tui.as_ref().and_then(|t| t.experimental_mode),
|
||||
tui_alternate_screen: cfg
|
||||
.tui
|
||||
.as_ref()
|
||||
|
|
@ -2234,7 +2231,6 @@ phase_2_model = "gpt-5"
|
|||
notification_method: NotificationMethod::Auto,
|
||||
animations: true,
|
||||
show_tooltips: true,
|
||||
experimental_mode: None,
|
||||
alternate_screen: AltScreenMode::Auto,
|
||||
status_line: None,
|
||||
}
|
||||
|
|
@ -4237,7 +4233,6 @@ model_verbosity = "high"
|
|||
tui_notification_method: Default::default(),
|
||||
animations: true,
|
||||
show_tooltips: true,
|
||||
experimental_mode: None,
|
||||
analytics_enabled: Some(true),
|
||||
feedback_enabled: true,
|
||||
tui_alternate_screen: AltScreenMode::Auto,
|
||||
|
|
@ -4351,7 +4346,6 @@ model_verbosity = "high"
|
|||
tui_notification_method: Default::default(),
|
||||
animations: true,
|
||||
show_tooltips: true,
|
||||
experimental_mode: None,
|
||||
analytics_enabled: Some(true),
|
||||
feedback_enabled: true,
|
||||
tui_alternate_screen: AltScreenMode::Auto,
|
||||
|
|
@ -4463,7 +4457,6 @@ model_verbosity = "high"
|
|||
tui_notification_method: Default::default(),
|
||||
animations: true,
|
||||
show_tooltips: true,
|
||||
experimental_mode: None,
|
||||
analytics_enabled: Some(false),
|
||||
feedback_enabled: true,
|
||||
tui_alternate_screen: AltScreenMode::Auto,
|
||||
|
|
@ -4561,7 +4554,6 @@ model_verbosity = "high"
|
|||
tui_notification_method: Default::default(),
|
||||
animations: true,
|
||||
show_tooltips: true,
|
||||
experimental_mode: None,
|
||||
analytics_enabled: Some(true),
|
||||
feedback_enabled: true,
|
||||
tui_alternate_screen: AltScreenMode::Auto,
|
||||
|
|
|
|||
|
|
@ -605,11 +605,6 @@ pub struct Tui {
|
|||
#[serde(default = "default_true")]
|
||||
pub show_tooltips: bool,
|
||||
|
||||
/// Start the TUI in the specified collaboration mode (plan/default).
|
||||
/// Defaults to unset.
|
||||
#[serde(default)]
|
||||
pub experimental_mode: Option<ModeKind>,
|
||||
|
||||
/// Controls whether the TUI uses the terminal's alternate screen buffer.
|
||||
///
|
||||
/// - `auto` (default): Disable alternate screen in Zellij, enable elsewhere.
|
||||
|
|
|
|||
|
|
@ -6210,10 +6210,7 @@ impl ChatWidget {
|
|||
if !config.features.enabled(Feature::CollaborationModes) {
|
||||
return None;
|
||||
}
|
||||
let mut mask = match config.experimental_mode {
|
||||
Some(kind) => collaboration_modes::mask_for_kind(models_manager, kind)?,
|
||||
None => collaboration_modes::default_mask(models_manager)?,
|
||||
};
|
||||
let mut mask = collaboration_modes::default_mask(models_manager)?;
|
||||
if let Some(model_override) = model_override {
|
||||
mask.model = Some(model_override.to_string());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3739,7 +3739,7 @@ async fn collaboration_modes_defaults_to_code_on_startup() {
|
|||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn experimental_mode_plan_applies_on_startup() {
|
||||
async fn experimental_mode_plan_is_ignored_on_startup() {
|
||||
let codex_home = tempdir().expect("tempdir");
|
||||
let cfg = ConfigBuilder::default()
|
||||
.codex_home(codex_home.path().to_path_buf())
|
||||
|
|
@ -3783,7 +3783,7 @@ async fn experimental_mode_plan_applies_on_startup() {
|
|||
};
|
||||
|
||||
let chat = ChatWidget::new(init, thread_manager);
|
||||
assert_eq!(chat.active_collaboration_mode_kind(), ModeKind::Plan);
|
||||
assert_eq!(chat.active_collaboration_mode_kind(), ModeKind::Default);
|
||||
assert_eq!(chat.current_model(), resolved_model);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue