mirror of
https://github.com/openai/codex.git
synced 2026-10-26 18:38:47 +00:00
fix
This commit is contained in:
@@ -497,6 +497,9 @@ impl App {
|
||||
message,
|
||||
"feature flag config write was overridden by effective config"
|
||||
);
|
||||
self.chat_widget.add_error_message(format!(
|
||||
"Experimental feature changes were saved but not applied: {message}"
|
||||
));
|
||||
if let Some(effective_config) = self
|
||||
.read_effective_config_after_overridden_write(
|
||||
app_server,
|
||||
@@ -504,21 +507,6 @@ impl App {
|
||||
)
|
||||
.await
|
||||
{
|
||||
let guardian_approval_was_updated = feature_updates_to_apply
|
||||
.iter()
|
||||
.any(|(feature, _)| *feature == Feature::GuardianApproval);
|
||||
let guardian_disable_applied = feature_updates_to_apply
|
||||
.iter()
|
||||
.any(|(feature, enabled)| *feature == Feature::GuardianApproval && !*enabled)
|
||||
&& !feature_enabled_from_effective_config(
|
||||
&effective_config,
|
||||
Feature::GuardianApproval,
|
||||
);
|
||||
if !guardian_disable_applied {
|
||||
self.chat_widget.add_error_message(format!(
|
||||
"Experimental feature changes were saved but not applied: {message}"
|
||||
));
|
||||
}
|
||||
self.sync_feature_state_from_effective_config(
|
||||
&effective_config,
|
||||
&feature_updates_to_apply,
|
||||
@@ -531,41 +519,6 @@ impl App {
|
||||
if windows_sandbox_changed {
|
||||
self.propagate_windows_sandbox_turn_context();
|
||||
}
|
||||
if guardian_approval_was_updated
|
||||
&& !self.config.features.enabled(Feature::GuardianApproval)
|
||||
{
|
||||
self.sync_active_thread_permission_settings_to_cached_session()
|
||||
.await;
|
||||
let op = AppCommand::override_turn_context(
|
||||
/*cwd*/ None,
|
||||
/*approval_policy*/ None,
|
||||
Some(self.config.approvals_reviewer),
|
||||
/*permission_profile*/ None,
|
||||
/*active_permission_profile*/ None,
|
||||
/*windows_sandbox_level*/ None,
|
||||
/*model*/ None,
|
||||
/*effort*/ None,
|
||||
/*summary*/ None,
|
||||
/*service_tier*/ None,
|
||||
/*collaboration_mode*/ None,
|
||||
/*personality*/ None,
|
||||
);
|
||||
let replay_state_op = ThreadEventStore::op_can_change_pending_replay_state(&op)
|
||||
.then(|| op.clone());
|
||||
let submitted = self.chat_widget.submit_op(op);
|
||||
if submitted && let Some(op) = replay_state_op.as_ref() {
|
||||
self.note_active_thread_outbound_op(op).await;
|
||||
self.refresh_pending_thread_approvals().await;
|
||||
}
|
||||
}
|
||||
if guardian_disable_applied && let Some(label) = permissions_history_label {
|
||||
self.chat_widget
|
||||
.add_info_message(format!("Permissions updated to {label}"), None);
|
||||
}
|
||||
} else {
|
||||
self.chat_widget.add_error_message(format!(
|
||||
"Experimental feature changes were saved but not applied: {message}"
|
||||
));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user