mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Avoid redundant memory enable notice (#18580)
## Summary Fixes #18554. The `/experimental` menu can submit the full experimental feature state even when the user presses Enter without toggling anything. Previously, Codex showed `Memories will be enabled in the next session.` whenever the submitted updates included `Feature::MemoryTool = true`, so sessions where Memories were already enabled could show a redundant warning on a no-op save. This change records whether `Feature::MemoryTool` was enabled before applying feature updates and only emits the next-session notice when Memories actually transitions from disabled to enabled.
This commit is contained in:
committed by
GitHub
Unverified
parent
95dafbc7b5
commit
ce0e28ea6f
@@ -1423,10 +1423,12 @@ impl App {
|
||||
return;
|
||||
}
|
||||
|
||||
let memory_tool_was_enabled = self.config.features.enabled(Feature::MemoryTool);
|
||||
self.config = next_config;
|
||||
let show_memory_enable_notice = feature_updates_to_apply
|
||||
.iter()
|
||||
.any(|(feature, enabled)| *feature == Feature::MemoryTool && *enabled);
|
||||
let show_memory_enable_notice =
|
||||
feature_updates_to_apply.iter().any(|(feature, enabled)| {
|
||||
*feature == Feature::MemoryTool && *enabled && !memory_tool_was_enabled
|
||||
});
|
||||
for (feature, effective_enabled) in feature_updates_to_apply {
|
||||
self.chat_widget
|
||||
.set_feature_enabled(feature, effective_enabled);
|
||||
|
||||
Reference in New Issue
Block a user