a42915b
Fix panic in inlay hints (#49994) (cherry-pick to preview) (#50016)
Click to expand commit body
Cherry-pick of #49994 to preview
----
We were resolving inlay hints against an old snapshot, which
occasionally led to panics
Co-Authored-By: Cole <cole@zed.dev>
Closes #ISSUE
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Fixed a (rare) panic in inlay hints
Co-authored-by: Cole <cole@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Cole <cole@zed.dev>
zed-zippy[bot]
,
Conrad Irwin
, and
Cole
created
047cad8
editor: Prevent panic when attempting to resolve a breakpoint anchor against the wrong buffer (#49893) (cherry-pick to preview) (#50005)
Click to expand commit body
Cherry-pick of #49893 to preview
----
Closes ZED-4HY
Release Notes:
- Fixed a crash when using breakpoints.
Co-authored-by: Cole Miller <cole@zed.dev>
zed-zippy[bot]
and
Cole Miller
created
84729d1
gpui: Read thermal state from window handle (#49847) (cherry-pick to preview) (#49991)
Click to expand commit body
Cherry-pick of #49847 to preview
----
Should close #49566
Inside `on_request_frame`, itβs conceptually incorrect to update the
application directly. Instead, we should read the thermal state through
the window handle, just like in the rest of the callback. That path uses
`try_borrow_mut` internally, so if the application is already being
updated elsewhere, we can safely skip checking the thermal state for
that frame and retry on the next one.
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
Co-authored-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
zed-zippy[bot]
and
Marco Mihai Condrache
created
5624e09
Narrow `.occlude()` call (#49981) (cherry-pick to preview) (#49983)
Click to expand commit body
Cherry-pick of #49981 to preview
----
Release Notes:
- N/A
Co-authored-by: John Tur <john-tur@outlook.com>
zed-zippy[bot]
and
John Tur
created
49c00e8
Fix backward compatibility for v0.0.4 GitHub extension bindings (#49858) (cherry-pick to preview) (#49966)
Click to expand commit body
Cherry-pick of #49858 to preview
----
## Summary
- Route `zed:extension/github` in `since_v0_0_4` to the `since_v0_6_0`
bindings
- Call `latest_github_release` through `since_v0_6_0` for compatibility
with the v0.0.4 extension API
Release Notes:
- Fixed backward compatibility for v0.0.4 extension API GitHub bindings.
Co-authored-by: Felix Zeller <felixazeller@gmail.com>
cb3c3df
Fix bad merge after d9b7d77d7a9c914fbf29d3007db4d550d9e75800
Bennet Bo Fenner
created
4a21935
agent: Fix slow file edits when using Opus 4.6 (#49904)
Click to expand commit body
Fixes a regression introduced in #48545 (reasoning effort selector). We
saw edit file tool calls taking a long time (loading animation was
displayed, no diff) when using Opus 4.6. This was caused by Opus 4.6.
emitting thinking tokens even when the user explicitly disabled thinking
in the UI.
<img width="289" height="67" alt="image"
src="https://github.com/user-attachments/assets/090a99f8-9b07-4d25-9058-3706f9333396"
/>
In addition to the thinking tokens causing overhead, we were slowing
down file editing even more. because changing between
thinking/non-thinking between requests causes the cache to be
invalidated
([docs](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#what-invalidates-the-cache)).
This PR ensures that we inherit the setting for enabling or disabling
thinking from the thread from which the edit tool was called.
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Fixed an issue where editing files was taking a long time when using
Opus 4.6
---------
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Bennet Bo Fenner
and
Zed Zippy
created
71511e1
text: Swap `anchor_range_between` and `anchor_range_around` (#49888) (cherry-pick to preview) (#49890)
Click to expand commit body
Cherry-pick of #49888 to preview
----
These functions had their names swapped accidentally
Follow up to https://github.com/zed-industries/zed/pull/49618
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Cherry-pick of #49803 to preview
----
The binary search insertion scheme in `highlight_text` works fine for
small numbers of elements but does not handle large amounts of ranges
well, as that will cause constant memcpying of the latter half of the
vec. Bracket colorization tends to have a huge amount of entries though,
so this can cause massive lags on the foreground thread. The better
approach here is to just collect all elements and re-sort them once.
Release Notes:
- Reduced mini-stutters occuring due to large amount of bracket
colorization in big buffers and agent diffs
Co-authored-by: Lukas Wirth <lukas@zed.dev>
zed-zippy[bot]
and
Lukas Wirth
created
67361ad
Fix certain title bar elements not being interactive on Windows (#49781) (cherry-pick to preview) (#49782)
Click to expand commit body
Cherry-pick of #49781 to preview
----
https://github.com/zed-industries/zed/pull/48330 caused the title bar to
start eating input events below these controls. We should find a way to
make the title bar handling less busted, but this will do for now.
Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects
Release Notes:
- N/A
Co-authored-by: John Tur <john-tur@outlook.com>
15107f5
git: Fix panic when unstaged diff is recalculated before its primary diff (#49753) (cherry-pick to preview) (#49767)
Click to expand commit body
Cherry-pick of #49753 to preview
----
For inverted diff APIs like `hunks_intersecting_base_text_range`, we
need a snapshot of the main buffer to use as context to compare hunk
anchors, convert anchors to points, etc. Previously, we were always
using a snapshot of the main buffer at the time when the diff was
calculated. This worked well for the hunks of the primary `BufferDiff`,
but it's not valid when the diff also has a secondary set of hunks,
because those hunks are recalculated on their own schedule--so it's
possible for the hunks of the secondary diff to contain anchors that are
newer than the original buffer snapshot that was taken at the time the
primary diff hunks were last calculated. This caused a panic when using
these anchors with the original buffer snapshot.
This PR fixes the issue by using the same approach for inverted diffs as
for non-inverted diffs at the multibuffer level: we take a snapshot of
the main buffer at the time when we snapshot the diff state (including
the diff itself), guaranteeing that that snapshot will be new enough to
resolve all the anchors included in both the primary diff and the
secondary diff.
Closes ZED-54J
Release Notes:
- Fixed a panic that could occur when using the branch diff in split
view mode.
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
zed-zippy[bot]
,
Cole Miller
, and
Antonio Scandurra
created
a81f96d
git: Prevent panic when updating excerpts in split diff (#49725) (cherry-pick to preview) (#49729)
Click to expand commit body
Cherry-pick of #49725 to preview
----
When using the split view, if the project diff inserts excerpts for the
same buffer using two different `PathKey`s, we panic inside
`LhsEditor::update_path_excerpts_from_rhs` because of an implicit
assumption that `excerpts_for_path()` and `excerpts_for_buffer()` return
the same number of values. This PR addresses that by ignoring any
excerpts for the given buffer that have a different path key from the
provided one.
Release Notes:
- Fixed a crash when using the split diff view.
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Co-authored-by: Eric <eric@zed.dev>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Co-authored-by: Eric <eric@zed.dev>
zed-zippy[bot]
,
Cole Miller
,
Jakub Konka
, and
Eric
created
e2097a4
Fix stale folded buffers in split diff view (#49699)
Click to expand commit body
When a buffer is folded in the split diff view and then removed from the
multibuffer (via `remove_excerpts_for_path`), the block map's
`folded_buffers` set retains a stale entry for that buffer ID. Later,
when the split view syncs folded state from the RHS display map to the
LHS, it tries to look up the companion mapping for this stale buffer and
fails because the companion no longer tracks a buffer that's been
removed from the multibuffer.
This originally caused a panic via `.expect()`. This PR:
1. Converts the panic into graceful handling by skipping unmapped
buffers.
2. Actively removes stale entries from `folded_buffers` so they don't
persist as ghost state β ensuring that if the same buffer is later
re-added, it won't incorrectly appear as folded.
3. Adds a regression test covering the full lifecycle: fold β remove β
split β re-add β assert both LHS and RHS report the buffer as not
folded.
Release Notes:
- Fixed a crash in split diff view when a folded buffer was removed and
re-added.
Antonio Scandurra
created
6b1d6f3
agent_ui: Fix panic in load/copy thread to/from clipboard (#49694) (cherry-pick to preview) (#49695)
Click to expand commit body
Cherry-pick of #49694 to preview
----
Fixes ZED-4VW
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Co-authored-by: Lukas Wirth <lukas@zed.dev>
f7e4668
git: Mitigate panic in split diff spacer calculation (#49674) (cherry-pick to preview) (#49677)
Click to expand commit body
Cherry-pick of #49674 to preview
----
Release Notes:
- N/A
Co-authored-by: Cole Miller <cole@zed.dev>
zed-zippy[bot]
and
Cole Miller
created
e4c951c
editor: Fix relative line numbering with deleted blocks present (#49656) (cherry-pick to preview) (#49657)
Click to expand commit body
Cherry-pick of #49656 to preview
----
This tackles another issue where we would incorrectly show two absolute
line numbers with relative line numbering enabled when it really should
only have been the current active line number.
Sadly, no tests rn for this as we would need a better test infra for
that to properly catch/test this bug. But with the refactored logic, I
think this is easier to understand at glance, so at least theres that
Release Notes:
- Fixed an issue with relative line numbers where some rows would be
missing their relative line number with deleted hunks showing.
Co-authored-by: Finn Evers <finn@zed.dev>
zed-zippy[bot]
and
Finn Evers
created
20eaa5a
Add telemetry for stack trace view (#49642) (cherry-pick to preview) (#49644)
Click to expand commit body
Cherry-pick of #49642 to preview
----
Release Notes:
- N/A
Co-authored-by: Cole Miller <cole@zed.dev>
e25c7e5
Add gemini-3.1-pro-preview model (#49622) (cherry-pick to preview) (#49635)
Click to expand commit body
Cherry-pick of #49622 to preview
----
Closes AI-48
Release Notes:
- Added support for Gemini 3.1 Pro
Co-authored-by: Richard Feldman <richard@zed.dev>
zed-zippy[bot]
and
Richard Feldman
created
3d830af
editor: Fix bracket colorization discoloring pure deletion diff hunks (#49618) (cherry-pick to preview) (#49626)
Click to expand commit body
Cherry-pick of #49618 to preview
----
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Co-authored by: Cole Miller <cole@zed.dev>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
zed-zippy[bot]
and
Lukas Wirth
created
8f2be20
Fix the panic when trying to interact with editor-like not-editors (#49608) (cherry-pick to preview) (#49612)
Click to expand commit body
Cherry-pick of #49608 to preview
----
For example, LSP log view is not a real editor but can pretend to be
one.
Release Notes:
- Fixed dev highlights view panicking when interacting with editor-like
not-editors
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
zed-zippy[bot]
and
Kirill Bulatov
created
3017afd
multi_buffer: Bring `update_path_excerpts` ordering workaround back (#49563) (cherry-pick to preview) (#49567)
Click to expand commit body
Cherry-pick of #49563 to preview
----
cc https://github.com/zed-industries/zed/pull/49290
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2c2cca0
git: Mitigate panic in split diff (#49546) (cherry-pick to preview) (#49548)
Click to expand commit body
Cherry-pick of #49546 to preview
----
Release Notes:
- N/A
Co-authored-by: Cole Miller <cole@zed.dev>
zed-zippy[bot]
and
Cole Miller
created
fe23d45
Revert "Added support for dismissing the toolchain path selector via β¦ (#49504) (cherry-pick to preview) (#49528)
Click to expand commit body
Cherry-pick of #49504 to preview
----
β¦`esc` (#48201)"
This reverts commit 174fc5115243fda191da6a526fa1f12b627c1fcd.
Select toolchain path dialog immediately dismisses upon selecting a
path, preventing the addition of new toolchains
- OpenPathDelegate emits DismissEvents in the `confirm` function too
- when the selection is confirmed, DismissEvent is emitted
- ToolchainSelector calls cancel because it receives the DismissEvent,
and it goes to the Search State
- This prevents the selected toolchain from being resolved and the
ScopePicker being presented
cc: @JosephTLyons
Release Notes:
- Fixed a regression where the toolchain path selector would immediately
dismiss upon selecting a path, preventing the addition of new
toolchains.
Co-authored-by: Kurian Jojo <67583328+polyesterswing@users.noreply.github.com>
zed-zippy[bot]
and
Kurian Jojo
created
6f71984
Revert "editor: Add `FlexClipped` block style and use it for spacer blocks" (#49508) (cherry-pick to v0.225.x) (#49511)
71ffaeb
Update AI docs for retired hosted models (#49486)
Click to expand commit body
## Summary
- Update hosted model and context-window tables in docs/src/ai/models.md
to remove retired models and list current replacements.
- Add a dated Recent Model Retirements section mapping each retired
model to its replacement.
- Update AI docs examples and references in agent-settings.md,
inline-assistant.md, agent-panel.md, and llm-providers.md to use current
model names.
- Remove stale OpenAI model references in llm-providers.md that no
longer align with currently offered hosted models.
## Validation
- ./script/prettier
- ./script/check-todos
## Suggested .rules additions
- N/A
Release Notes:
- N/A
morgankrey
created
66f7aea
agent: Disables multi workspace refresh queue for non-staff (#49496)
Click to expand commit body
Refreshing the queue was causing hangs on debug builds, so this is a
short term fix until we rework how the sidebar gets its data.
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
Anthony Eid
created
e72e9d6
editor: Some more semantic highlighting perf work (#49491)
Click to expand commit body
- Reduce some re-allocations in `text_anchors_to_visible_anchors` and
`refresh_semantic_tokens`
- Process `raw_to_buffer_semantic_tokens` work on the background thread
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Lukas Wirth
created
a1af11c
editor: Add `FlexClipped` block style and use it for spacer blocks (#49478)
Click to expand commit body
`FlexClipped` acts like `Flex`, but only allows the block to render in
the main hitbox, not the gutter. This is a visual improvement for the
spacers compared to `Sticky`.
https://github.com/user-attachments/assets/2b0aed0c-91ff-4e74-85b1-aea81f4e8a35
Release Notes:
- git: Improved the visual display for spacers in the split diff view.
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
* More conservative predictions for prose
* Explain "user accepted prediction" in the teacher prompt
* Sonnet 4.6 support
* Don't strip comments in teacher prompt's edit history
Release Notes:
- N/A
This PR removes onboarding modals for features that were announced, at
this point, a long time ago: Git v1, Debugger, and Agent Panel v1. This
cleans up the actions list a bit when you search for "onboarding". I
left the ACP and Claude Code ones, though; they were the two more recent
ones, but we should be able to remove them soon enough, too.
Release Notes:
- N/A
Seems that `SmallVec::clone` is pretty expensive in a generic case, and
specialising it improves the performance quite a bit!
Release Notes:
- Improved performance of different building blocks within the
MultiBuffer.
---------
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Adds scripts and a GitHub Action workflow for automatically suggesting
documentation updates when PRs modify user-facing code.
## Scripts
- **`script/docs-suggest`**: Analyze PRs/commits for documentation needs
using AI
- **`script/docs-suggest-publish`**: Create a PR from batched
suggestions
- **`script/docs-strip-preview-callouts`**: Remove Preview callouts when
shipping to stable
- **`script/test-docs-suggest-batch`**: Testing utility for batch
analysis
## Workflow
The GitHub Action (`.github/workflows/docs_suggestions.yml`) handles two
scenarios:
1. **PRs merged to main**: Suggestions are batched to
`docs/suggestions-pending` branch for the next Preview release
2. **Cherry-picks to release branches**: Suggestions are posted as PR
comments for immediate review
## Callout Types
The system distinguishes between:
- **Additive features** (new commands, settings, UI):
```markdown
> **Preview:** This feature is available in Zed Preview. It will be
included in the next Stable release.
```
- **Behavior modifications** (changed defaults, altered existing
behavior):
```markdown
> **Changed in Preview (v0.XXX).** See [release notes](/releases#0.XXX).
```
Both callout types are stripped by `docs-strip-preview-callouts` when
features ship to stable.
## Example Output
See PR #49190 for example documentation suggestions generated by running
this on PRs from the v0.224 preview window.
## Usage
```bash
# Analyze a PR (auto-detects batch vs immediate mode)
script/docs-suggest --pr 49100
# Dry run to see assembled context
script/docs-suggest --pr 49100 --dry-run
# Create PR from batched suggestions
script/docs-suggest-publish
# Strip callouts for stable release
script/docs-strip-preview-callouts
```
Release Notes:
- N/A
morgankrey
created
d5d49c1
acp: Update terminal tool call updates if we recieve a new one (#49456)
Click to expand commit body
This showed up mostly in agents that stream terminal output to Zed that
the title wasn't updated in time to see the command when needing to
provide permissions.
Release Notes:
- acp: Fix for ACP terminal titles not always being updated to their
latest value.
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Ben Brandt
and
Bennet Bo Fenner
created
7d80412
Reduce amount of monomorphizations from FnMut closures (#49453)
Click to expand commit body
Replaces a bunch of `impl FnMut` parameters with `&mut dyn FnMut` for
functions where this is the sole generic parameter.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Lukas Wirth
created
5305c22
ep: Encode cursor position in the predicted patch (#49450)
Click to expand commit body
Release Notes:
- N/A
Oleksiy Syvokon
created
b4baea8
acp: Enable history for external agents for all users (#49449)
Click to expand commit body
Removes the feature flag around listing and loading existing sessions
for external agents.
Release Notes
- acp: Expose session history for all external agents that support it.
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Ben Brandt
and
Bennet Bo Fenner
created
0b3a23c
sum_tree: Implement `Iterator::last` and lower bound of `Iterator::size_hint` (#49448)