mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-25 06:24:56 +00:00
Fixes #41776 ## Problem Old AI Text Thread sessions fail to open from History because the deserializer fails on unknown icon variants. When icons are removed or renamed in refactors, old saved threads become unloadable with errors like: ``` unknown variant `AtSign`, expected one of `Ai`, `AiAnthropic`... ``` ## Solution Added a lenient deserializer for the `icon` field in `SlashCommandOutputSection` that falls back to `IconName::Code` for unknown variants. This ensures old saved threads remain loadable even as icons are added/removed from the codebase. ## Test Plan - Added unit test for valid icon deserialization - Added unit test for unknown icon fallback to `Code` - Added unit test for various unknown icon variants - Added unit test confirming serialization unchanged - All tests pass: `cargo test -p assistant_slash_command` Release Notes: - Fixed old AI text thread sessions failing to open from History when they contain icons that were removed in previous updates. 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: MrSubidubi <finn@zed.dev> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||