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
This commit is contained in:
Agus Zubiaga 2025-05-30 19:06:08 -03:00 committed by GitHub
parent 4f8d7f0a6b
commit bb9e2b0403
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -689,6 +689,7 @@ pub struct AgentSettingsContentV2 {
pub enum CompletionMode {
#[default]
Normal,
#[serde(alias = "max")]
Burn,
}