zed/crates/copilot
Vadim Suharnikov 5505e63a0d
copilot: Fix panic in Copilot edit prediction due to anchor/snapshot mismatch (#46022)
When `trim_completion()` creates new anchors from the current buffer
state, `completion.snapshot` was not being updated, leaving it with the
older snapshot from when the prediction was initially fetched. This
caused a panic in `interpolate_edits()` when trying to resolve anchors
with Lamport timestamps newer than what the old snapshot had observed.

The fix ensures that `completion.snapshot` is updated whenever new
anchors are created in `trim_completion()`, keeping the snapshot and
anchors consistent.

Closes #45956

Release Notes:

- Fixed a panic in Copilot edit predictions caused by anchor/snapshot
version mismatch
2026-01-04 15:12:53 +01:00
..
src copilot: Fix panic in Copilot edit prediction due to anchor/snapshot mismatch (#46022) 2026-01-04 15:12:53 +01:00
Cargo.toml Update Copilot sign-up URL based on verification domain (#44085) 2025-12-16 09:48:20 +00:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00