From bb9e2b040395ecef28f11706ef3df20d0faa279b Mon Sep 17 00:00:00 2001 From: Agus Zubiaga Date: Fri, 30 May 2025 19:06:08 -0300 Subject: [PATCH] Fix existing CompletionMode deserialization (#31790) https://github.com/zed-industries/zed/pull/31668 renamed `CompletionMode::Max` to `CompletionMode::Burn` which is a good change, but this broke the deserialization for threads whose completion mode was stored in LMDB. This adds a deserialization alias so that both values work. We could make a full new `SerializedThread` version which migrates this value, but that seems overkill for this single change, we can batch that with more changes later. Also, people in nightly already have some v1 threads with `burn` stored, so it wouldn't quite work for everybody. Release Notes: - N/A --- crates/agent_settings/src/agent_settings.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/agent_settings/src/agent_settings.rs b/crates/agent_settings/src/agent_settings.rs index 72a1f6865cc9e5ca0930b2e110b883d0690a4e92..696b379b1218827d2c4990a504f8de94a9bf10e6 100644 --- a/crates/agent_settings/src/agent_settings.rs +++ b/crates/agent_settings/src/agent_settings.rs @@ -689,6 +689,7 @@ pub struct AgentSettingsContentV2 { pub enum CompletionMode { #[default] Normal, + #[serde(alias = "max")] Burn, }