Commit Graph
39175 Commits
Author SHA1 Message Date
Richard Feldman 89808f03fd Link data retention consent callout to Anthropic's policy article (#58949)
Resolves a leftover TODO from the Claude Fable 5 data-retention work:
the "Learn More" button in the data-retention consent callout pointed at
a `#link-tbd` placeholder, so it did nothing. It now opens Anthropic's
data retention practices support article.

Release Notes:

- N/A
2026-06-09 18:13:45 +00:00
Richard FeldmanandMikayla Maki 3877fad40a Add Claude Fable 5 to Anthropic BYOK (#58945)
<img width="325" height="201" alt="Screenshot 2026-06-09 at 1 38 32 PM"
src="https://github.com/user-attachments/assets/a6518073-1e17-41ff-a8fc-cb279fcd4436"
/>

Adds support for Anthropic's Claude Fable 5 model when using your own
Anthropic API key. Because Fable 5 cannot be offered under Zero Data
Retention (Anthropic retains inference logs for 30 days), this gates the
model behind an explicit data-retention consent: a new
telemetry.anthropic_retention setting (default off, surfaced in the
Privacy section of the settings UI), and a hard, non-retryable check in
the cloud completion path that raises a typed error when consent is
missing.

When Fable 5 declines a request, it transparently falls back to Claude
Opus 4.8 (matching Anthropic's server-side behavior), and the agent
panel shows a callout for the consent error with "Switch to Opus 4.8" /
"Accept" actions that resume the failed turn so the user's message
continues without retyping.

Closes AI-382

Release Notes:

- Add Claude Fable 5 to Anthropic BYOK

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2026-06-09 17:53:59 +00:00
Cole MillerandYara ef1f4df5d1 Disable profiler with feature (#58942)
Reopening @yara-blue's change to try to fix CI:

> This disables the GPUI profiler by default, it is opt in using the
feature gpui/profiler. We had one report of a possible deadlock, until
that is resolved the profiler will be disabled. By doing this with a
feature we can keep the code and fix forward on nightly post release. It
will also be useful to other GPUI users who are not using the profiler
infrastructure and now no longer need to pay the overhead (0.1%).

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

---------

Co-authored-by: Yara <git@yara.blue>
2026-06-09 16:50:25 +00:00
Oleksiy Syvokon 5cc2f84092 ep: Add more options to control split point (#58943)
The `ep split-commit --split-point` argument now accepts split point
kinds:

* fim -- next edit is right under the cursor.
* same-file-near -- next edit is close to the cursor.
* same-file-far -- next edit is more than 30-lines away from cursor.
* cross-file -- next edit is in another file.

This lets us create datasets partitioned by kind more efficiently
compared to filtering them after the fact.

Release Notes:

- N/A
2026-06-09 16:17:55 +00:00
Ayush Patil c651d4536e project: Re-resolve recent tasks against current editor context (#57380)
## Summary

Closes #55879.

When a task is run, its fully-resolved form (`ResolvedTask`, with
`$ZED_FILE`/`$ZED_STEM`/`$ZED_COLUMN`/etc. already substituted) is
cached in `Inventory::last_scheduled_tasks`. The next time the task
picker is opened, `used_and_current_resolved_tasks` returns those cached
entries as-is for the "recent" section. The "current" section *is*
re-resolved against the active editor, but the label-based dedup keeps
the stale recent entry.

The result is that `$ZED_FILE` keeps pointing at the file that was
active the first time the task ran, even after switching editors and
re-running from the picker.

This fix re-resolves each entry in the recent-tasks list against the
current `TaskContexts` using the same context-pick chain the "current"
branch already uses (item context → active worktree → other worktree →
default). If re-resolution fails for any reason, we fall back to the
cached `ResolvedTask` so behavior never regresses.

The change is localized to `previously_spawned_tasks` inside
`used_and_current_resolved_tasks`. List order, dedup, and LRU scoring
are unchanged — only the variable substitutions inside each
`ResolvedTask` are refreshed.

## Test plan

- [x] Open a project with two source files (e.g. `1.cpp`, `2.cpp`) and a
task that uses `$ZED_FILE` (e.g. `g++ $ZED_FILE -o $ZED_STEM &&
./$ZED_STEM`).
- [x] Open `1.cpp`, run the task from the picker, confirm it compiles
`1.cpp`.
- [x] Click `2.cpp`, open the task picker, pick the same task from the
"recent" section, confirm it now compiles `2.cpp` (previously: still
`1.cpp`).
- [x] Confirm the recent-task ordering and divider in the picker are
unchanged.

Release Notes:

- Fixed task variables like `$ZED_FILE` not updating when re-running a
recently used task after switching the active editor (#55879).
2026-06-09 16:01:30 +00:00
Ben Kunkle 0b2a9480f1 ep: LSP telemetry (#58925)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-09 15:52:27 +00:00
Bennet Bo FennerandRichard Feldman 8c8fe80a60 agent: Hide token usage after running /compact (#58937)
We can't compute the actual token usage until we send a new request, so
we hide the token count until you send another message. Matching the
behaviour that we have for new threads

Release Notes:

- N/A

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2026-06-09 15:10:24 +00:00
Danilo Leal f616f66e7a thread_view: Add refinements to compaction UI design (#58926)
Here are the things I tried to tackle on this PR:

- Make the compaction call stand out a bit more from other regular tool
calls
- Make text size of the compaction's markdown output be consistent with
the thread body text
- Don't show regular thread loading spinner while compaction is in
progress, given that has its own spinner
- Add a different icon than scissors for compaction and add it to the
autocomplete menu so its consistent w/ skills items

<img width="600" alt="Screenshot 2026-06-09 at 10  57@2x"
src="https://github.com/user-attachments/assets/5c3d25af-aa49-42e1-b6b6-c3f95c664456"
/>

Release Notes:

- N/A
2026-06-09 14:38:34 +00:00
Kunall Banerjee 714a12f478 editor: Register toggle inline values action (#58921)
The `ToggleInlineValues` action was added when inline value hints were
introduced, but the action was never registered, so it was not
dispatchable: it never appeared in the command palette and any
keybinding bound to it had no effect.

Follow-up to #28656.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #58890.

Release Notes:

- Fixed “editor: toggle inline values” not appearing in the command
palette or responding to keybindings
2026-06-09 13:34:42 +00:00
Victor Skvortsov 4930bb90b9 Make zed:// links clickable in terminal (#58910)
The PR makes Zed'd own `zed://` links clickable in the Zed's integrated
terminal. Previously, you had to copy and paste such links. Now you can
hover and follow the link on cmd+click:

<img width="794" height="354" alt="Screenshot 2026-06-09 at 15 25 18"
src="https://github.com/user-attachments/assets/0c9be498-ba63-4a10-8852-cf2e23fa9597"
/>

</br></br>

**Use case**

A CLI tool can output a `zed://` link, e.g. to open a remote dev
environment. If Zed's terminal makes them clickable, users can open the
remote simply by clicking on the link.

More specifically, [we're adding Zed support to
dstack](https://github.com/dstackai/dstack/pull/3947). The `dstack` CLI
allows users to launch a remote dev environment with GPU. So this PR is
needed to make the UX smooth: Users run the `dstack` CLI in the local
terminal, the CLI prints the the `zed://` link, and the users can click
the link and open a new remote Zed window.

**Implementation details**

`zed://` links are routed through the OS as other links and not
internally. One downside is that dev builds may open an installed Zed
version. Made this tradeoff to keep the diff simple.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Made `zed://` links clickable in the terminal
2026-06-09 12:52:06 +00:00
Bennet Bo Fenner 2e5ade11ae agent: Fix handoff feature flag tests (#58916)
Accidentally broke CI in #58891

Since
https://github.com/zed-industries/zed/blob/c68bc98bacb80c34df0e1b6ef4de186d763b3820/crates/feature_flags/src/store.rs#L180
defaults to true in debug mode (effectively sets staff to `true`) the
tests would fail.

We can work around this by manually disabling the feature flag for tests
in settings.

Also, since we are planning to ship to preview tomorrow these tests will
be removed soon.


Release Notes:

- N/A
2026-06-09 12:16:01 +00:00
Marshall Bowers 578152f339 cloud_api_client: Always pass up an organization ID when creating an LLM token (#58872)
This PR makes it so we always pass up an organization ID when creating
an LLM token.

We should have an organization ID in all cases.

Release Notes:

- N/A
2026-06-09 12:06:49 +00:00
Richard Feldman 4d31ea1f33 Enable handoff feature flag by default for staff (#58891)
Enables the "handoff" feature flag by default for Zed staff by removing
the `enabled_for_staff()` override on `HandoffFeatureFlag`, which falls
back to the trait default of `true`.

Closes AI-381

Release Notes:

- N/A
2026-06-09 11:39:57 +00:00
Bennet Bo Fenner 97fab606c9 agent: Improve compaction UX (#58913)
Makes it so that we show "Compaction cancelled" when the user interrupts
generation.
Also fixes another small issue where the chevron of the expanded state
would not reflect if it is expanded/collapsed while there is no summary
yet.

Release Notes:

- N/A
2026-06-09 11:34:38 +00:00
Richard FeldmanandBennet Bo Fenner df4528c941 Add auto_compact agent settings (#58883)
Adds two new agent settings nested under `auto_compact`, `enabled` and
`threshold`, which control automatic compaction of the agent's context
window as part of the handoff feature. Both surface in the settings UI
under Agent Configuration, gated behind the `handoff` feature flag so
they only appear for users on that flag.

The `threshold` accepts three forms: a percentage string ending in `%`
(e.g. `"80%"` or `"95.5%"`) measured against the model's context window,
a positive integer to compact after that many tokens have been used, or
a negative integer to compact once that many tokens remain in the
window. `0` and bare non-integer numbers are rejected. It deserializes
from either a JSON string or integer and resolves to a typed enum,
falling back to the `"80%"` default (with a logged warning) when the
configured value is invalid. In the settings UI the threshold is a
free-form text field so all three forms can be entered.

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-06-09 10:52:58 +00:00
Richard FeldmanandBennet Bo Fenner b5ad35a5fa Add built-in /compact slash command to the native agent (#58663)
<img width="851" height="315" alt="Screenshot 2026-06-09 at 2 15 51 AM"
src="https://github.com/user-attachments/assets/958f2d2f-db7d-4afb-b4b3-ed11f36b00e7"
/>

<img width="644" height="260" alt="Screenshot 2026-06-09 at 2 16 04 AM"
src="https://github.com/user-attachments/assets/e6a74c6b-aba5-4fbb-991c-25842ced5832"
/>

<img width="619" height="128" alt="Screenshot 2026-06-09 at 2 18 08 AM"
src="https://github.com/user-attachments/assets/ba7fa303-852b-4a17-b8df-ea5bd4df7c11"
/>


Adds an always-available `/compact` slash command to Zed's native agent
that forces a summary-based context compaction of the current
conversation, regardless of token usage. This reuses the agent's
existing compaction logic (always the summary strategy, never
provider-native), bypassing the automatic-compaction token threshold and
minimum-context-window guard since the user explicitly asked to compact.
The command lives entirely in `NativeAgent`/`NativeAgentConnection`, so
external (ACP) agents are untouched and keep their own `/compact`
implementations.

The command is gated behind the `handoff` feature flag, matching the
gate on automatic compaction, so it's only advertised and dispatched
when that flag is enabled. When the flag is off, typing `/compact` is
treated as an ordinary prompt.

Because the agent panel always renders the typed `/compact` as a user
message, the manual compaction records a matching zero-content user
message in the model thread (skipped when building model requests) so
that rewinding/truncating that message works instead of erroring, while
keeping the command itself out of the model's context.

The slash-command popup now groups commands into separate sections by
source — "Commands" (built-in, e.g. `/compact`), "MCP Server Commands",
and "ACP Agent Commands" — so same-named commands from different sources
show up as distinguishable duplicates. The source category travels on
each command's ACP `_meta`.

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-06-09 09:34:01 +00:00
aobatandChristopher Biscardi 9ddd1113f7 git_ui: Pass the clicked ref to git graph custom commands (#58781)
Right-clicking a ref label (branch, remote ref, or tag) in the git graph
now opens a ref-specific context menu that resolves custom git commands
with the clicked ref exposed as ZED_GIT_REF, mirroring how VS Code's git
graph offers ref-aware actions. Right-clicking elsewhere on a commit
keeps the existing commit-scoped menu.

<img width="875" height="525" alt="zed (Ubuntu) 2026_06_07 23_26_35"
src="https://github.com/user-attachments/assets/140bdcdf-6536-4b5e-ac2f-9df84f744477"
/>


releated: #55844 #56354


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Added a context menu for ref labels in the git graph that runs custom
git commands with the clicked ref available as `$ZED_GIT_REF`.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-06-09 06:30:07 +00:00
Mohit Goyal 5f32d40b9d Fix Deno test task example quoting (#58774)
Updates the Deno runnable support docs so the copied test task uses
`$ZED_FILE` without nested single quotes. With the old example, Zed's
task shell wrapper could produce a command with conflicting quotes and
fail when running `deno test`.

Testing:

- `pnpm dlx prettier@3.5.0 docs/src/languages/deno.md --check`
- `git diff --check`

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #58072

Release Notes:

- N/A
2026-06-09 04:57:31 +00:00
Helmer NordströmandChristopher Biscardi 331c5608e3 Fix indentations for expressions in C/C++ (#58740)
Indentations are not correctly handled for expressions in C/C++. To fix
this i have updated indents.scm for both C/C++, there could be more
languages which have this problem but i have only noticed it in these
languages.

Current indentation behaviour:


https://github.com/user-attachments/assets/2804d3a6-2dde-484b-b1f4-0a867801bc0c

Expected indentation behaviour:


https://github.com/user-attachments/assets/b1ebe840-7391-4f5d-bfe0-87d413f5dfe2

Release Notes:

- Improved indentation for C/C++ to be more consistent.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-06-09 03:12:17 +00:00
liamandChristopher Biscardi 4405738fab editor: Show format selections for cursor ranges (#56571)
Resolves https://github.com/zed-industries/zed/issues/56556  

This diff fixes format selections being unavailable when the selection
is a cursor range. The action was gated on having at least one non-empty
selection, which hid it even when the active formatter supported range
formatting.

With this change, cursor ranges are included when checking whether the
selected buffers support range formatting. This restores the
cursor-based `Format Selections` behavior while preserving the existing
formatter-capability gate, so the action still stays hidden for
formatters that cannot format ranges.


https://github.com/user-attachments/assets/fc2ab2b7-1af3-4849-841a-b57a685d748f

Release Notes:
- Fixed format selections not being available for cursor ranges when the
active formatter supports range formatting.

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-06-09 02:47:01 +00:00
Anthony Eid cc84a7bdd6 gpui: Free atlas tile space when removing tiles (#58874)
Partially addresses #54659

`PlatformAtlas::remove` removed the tile from `tiles_by_key` and
decremented the texture's refcount, but never returned the tile's
rectangle to the etagere allocator. Removed tiles' space could only be
reclaimed if the entire texture was dropped, which doesn't happen if
glyph/emoji share the texture. Because we don't have correct glyph/emoji
removal

I added regression tests on all three platforms to prevent this from
occurring as well.

Note: this doesn't fix glyph eviction or the nil-texture panic from
#54659; those are follow ups.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- gpui: Fix GPUI memory growing unboundedly when images are repeatedly
loaded and released
2026-06-08 23:09:47 +00:00
02275294af Limit top context identifiers and diagnostics (#58870)
- Replace full sort and truncate with a budgeted top-N approach for
context identifiers using truncate_to_bottom_n_sorted_by.
- Introduce MAX_DIAGNOSTICS = 10 and prune diagnostics to this limit
with select_nth_unstable_by_key, then sort the remainder.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


Release Notes:

- Removed small allocations on the edit_predictions critical path by
using select_nth and sort_unstable

Co-authored-by: Nathan Barry <nathanbarry474@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2026-06-08 22:43:48 +00:00
Danilo Leal 787a597c2a Make sure we display keybindings on gutter menu (#58856)
Closes https://github.com/zed-industries/zed/issues/58820

Some menu items there don't have have a bindable action and/or a default
keybinding, so they won't show anything by default. Right now, only "Set
Breakpoint" and "Set Log Breakpoint" will show something right off the
bat.

Release Notes:

- N/A
2026-06-08 22:33:10 +00:00
liamandJoseph T. Lyons 66af229b32 image_viewer: Reveal images in file manager from keyboard shortcut (#56438)
Resolves https://github.com/zed-industries/zed/issues/55617

This diff makes the standard Reveal in Finder/File Manager shortcut work
when an image tab is focused. Image tabs already expose the reveal
action from the tab context menu, but the keyboard shortcut was only
bound in the `Editor` context, so pressing `cmd-k r` on macOS or `ctrl-k
r` on Linux/Windows did nothing while focus was in the image viewer.

With this change, `ImageView` handles the existing
`editor::RevealInFileManager` action, and the default keymaps bind the
same reveal shortcut in the `ImageViewer` context. This keeps image tabs
consistent with text editor tabs while reusing the same project path
reveal path used elsewhere.

Release Notes:
- Fixed Reveal in Finder/File Manager shortcuts not working when an
image tab is focused.

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
2026-06-08 21:24:44 +00:00
Anthony Eid b379ccd62b lsp: Fix retained notification subscriptions leaking dropped language servers (#58866)
`Subscription::Notification` held a strong `Arc` to a language server's
entire notification handler map, while `Subscription::Io` already used a
`Weak`. Any subscription retained beyond the server's lifetime (e.g.
`copilot_log_subscription` in the LSP log store, which lives until the
project is closed) kept **every** handler on the dead server alive —
along with everything those closures capture, including
`Arc<CachedLspAdapter>` and `LspAdapterDelegate`s that pin full worktree
snapshots. Each server restart while such a subscription existed leaked
one server generation; on large worktrees that's tens of MB per restart.

The fix changes `Subscription::Notification` to hold a `Weak` reference,
matching the `Io` variant. Dropping a subscription still deregisters its
handler when the server is alive; if the server is already gone, there
is nothing left to clean up.

Also adds a regression test
(`test_subscription_leaks_handlers_after_server_drop`) to prevent this
from happening again

Helps with #58190 and #31461 (long-running memory growth involving
language servers), though it likely isn't the whole story for either,
the unbounded outbound message channel in `crates/lsp/src/lsp.rs`
remains a separate suspect for the extreme growth in #58190.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed a memory leak where restarting a language server could leak
memory if its notification subscriptions were still retained (e.g. while
the LSP log view was tracking it).
2026-06-08 21:24:36 +00:00
Anthony Eid 65fbeb80c5 lsp: Bound the incoming language server message queue (#58867)
The background task reading a language server's stdout pushed every
parsed message into an unbounded channel consumed on the foreground
thread. If the main thread stalled while a server kept emitting
notifications, messages accumulated at wire speed with no limit —
matching the report in #58190 of 391 GB of memory growth during a
multi-hour hang with a chatty server.

This bounds the queue at 128 messages. When full, the reader stops
reading the server's stdout, so the OS pipe applies back pressure to the
server instead of Zed buffering its output in memory. No messages are
dropped, and healthy operation is unaffected. In flight client requests
behind a full queue fail via their existing background executor
timeouts.

Adds a regression test that wedges the consumer, asserts the queue stays
bounded, then drains it and asserts no messages were lost.

Helps with #58190 and may also help with #31461.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- lsp: Improve Zed's memory usage when LSP's emitted messages faster
than the foreground thread can handle them
2026-06-08 21:23:54 +00:00
Miguel Raz Guzmán Macedo b1ba025093 Use unstable sorts if deduplicating (#58751)
# Impact

Recent Project picker, `find all references`, the sidebar's
`rebuild_contents` might get a slight speed boost.

# Reasoning

Unstable sort variants

https://doc.rust-lang.org/stable/std/primitive.slice.html#method.sort_unstable
are non-allocating but potentially destructive. Since we're
deduplicating elements anyways, use the unstable variant.

This call will use ipnsort


https://github.com/Voultapher/sort-research-rs/blob/main/writeup/unreasonable/text.md#various-generic-algorithms

I expect the speedups to be at least 30%, though it's highly input
dependent.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-06-08 19:47:30 +00:00
Tom PlancheandCole Miller a80e7d2dc6 git_ui: Add Add to .git/info/exclude option to context menus (#57044)
This is an unsolicited contribution, I hope that's ok. The feature is
small and I didn't want to open a discussion just for this.

There was no way to write to `.git/info/exclude` from Zed, so I added
one.

The "Add to .gitignore" action in the project panel and git panel
context menus is now grouped under a "Git" submenu, with a new "Add to
.git/info/exclude" action next to it.

Both actions:

- skip the write if the pattern is already there
- make sure there's a trailing newline
- show an error toast if something goes wrong
- fail gracefully on remote repositories

In the git panel both entries are disabled unless the file is untracked,
same as the gitignore action was before.

The write logic is shared via a small private helper, covered by two
unit tests.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Added `Add to .git/info/exclude` option under a new `Git` submenu in
the project panel and git panel context menus, alongside the existing
`Add to .gitignore` action.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2026-06-08 19:37:22 +00:00
Albert Bogusz 5fa0f1787b Fix stale Git UI on reftable repositories on Linux (#58719)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

The non-recursive Linux watcher causes subdirectories inside `.git/` to
need explicit watching. For repos using the reftable backend, all ref
data lives in `.git/reftable/`. Operations in the UI like uncommitting
and creating new branches only modify refs inside `.git/reftable`
without changing `.git/HEAD`'s contents, so no inotify event fires on
`.git/` itself and the git UI never refreshes.

Essentially all this change does is check if `.git/reftable/` exists and
if it does, add it to the watcher. On the recursive macOS/Windows
watchers, `FsWatcher::add` returns early safely so this *should* not be
a performance loss apart from the brief lookup.

Release Notes:

- Fixed Git UI not refreshing on Linux for repositories using the
reftable backend.
2026-06-08 18:37:40 +00:00
Danilo Leal 196b709680 Include icon guidelines in PR templates and contribution docs (#58855)
Release Notes:

- N/A
2026-06-08 17:42:34 +00:00
Smit Barmase d5bba4cc47 git_ui: Fix panic when splitting a pane containing a commit view (#58853)
Closes FR-65

Release Notes:

- Fixed a crash when splitting a pane containing a commit view.
2026-06-08 17:33:04 +00:00
Danilo Leal d3daf7cbd0 Fix Sourcehut icon SVG (#58852)
Follow up to https://github.com/zed-industries/zed/pull/58668 — the
previous PR wasn't following the icon design guidelines.

Release Notes:

- N/A
2026-06-08 17:22:53 +00:00
Danilo LealandMartin Ye 28a179639d Improve warning display UI related to skills (#58838)
This PR tackles how we communicate errors/warnings relative to skills.
It touches three major surfaces: callouts in the thread view, menu items
in the completion menu, and settings UI. These are all the places where
we display something to tell the user a skill might have a problem.

In the settings UI, we now clamp the skill description to five lines.
And if there's a warning, we show the warning icon and the description
in a tooltip when hovering it:

<img width="600" alt="Screenshot 2026-06-08 at 10  51@2x"
src="https://github.com/user-attachments/assets/1a1233b0-c24a-4082-9fe6-2ab1d00ba9fd"
/>

In the thread view, we display callouts with the warnings. I simplified
the long-description one specifically given we can click on each skill
item right there, so no need for a "manage global skills" button or
descriptions in each item:

<img width="600" alt="Screenshot 2026-06-08 at 10  52@2x"
src="https://github.com/user-attachments/assets/4b9aad23-7362-40cd-8ab5-6dfceb46badd"
/>

In the code completion menu, I removed the icon that appeared at the far
right and instead added the ability for it to render a colored warning
icon instead of the icon it'd already display in the left; I think this
simplifies it nicely:

<img width="350" alt="Screenshot 2026-06-08 at 10  53@2x"
src="https://github.com/user-attachments/assets/8d0c731a-31a0-4d30-abab-1eb40f61031e"
/>


Release Notes:

- Agent: Improved how we communicate problems relative to skills, in
both the agent panel and the settings UI.

---------

Co-authored-by: Martin Ye <martin@zed.dev>
2026-06-08 15:46:15 +00:00
Lukas Wirth b28973017c Fix TestScheduler::spawn_dedicated leaking due to cycle (#58802)
Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-08 15:44:17 +00:00
Albert BoguszandSmit Barmase 17764ce0a3 Fix error prompt darkened background exceeding window boundaries on Linux (#57608)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior (visual difference only)
- [x] Performance impact has been considered and is acceptable

I was unable to find a specific issue or PR that mentions this.

As Linux installations always use built-in prompts and ignore the `Use
System Prompts` setting (as far as I'm aware) all users using Zed (with
client-side decorations) are affected. The darkened prompt backdrop was
drawn across the full window boundary, including the transparent
decoration/shadow inset, causing it to overlap.

This PR fixes the backdrop to respect the client-side decoration inset
and only applies rounded corners on non-tiled edges. Tiled edges remain
flush, matching the rest of the client-side window decoration behavior.
I've verified it works on Wayland, X11 and causes no regressions on
macOS or Windows (with `Use System Prompts` off).

Notice the screenshots below on a white background showing the before
and after, where the faint overlap is shown broken and fixed (sorry if
you have to squint).

Before:


![Before](https://github.com/user-attachments/assets/be12fbe9-1ad9-4282-a333-0d9d6ae162d5)

After:


![After](https://github.com/user-attachments/assets/75988dc8-2e45-4214-bf14-e999d7b9e996)

Release Notes:

- Fixed prompt darkened backdrop/background rendering outside
client-decorated window boundaries on Linux.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-06-08 14:59:39 +00:00
MartinYe1234andDanilo Leal fbe923c57b settings_ui: Move skills management into settings UI (#58701)
Closes AI-344
Closes AI-342

Moves agent skills management out of the agent panel and into the
settings UI. The skill creator (previously its own crate) now lives in
`settings_ui` as a settings page, alongside the skills setup page. The
agent panel's ellipsis menu now links to the settings page instead of
hosting skill management directly.

Release Notes:

- Improved agent skills management by moving it into the settings UI

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-06-08 14:57:47 +00:00
Albert BoguszandDanilo Leal 94f8417dc7 Change "Ok" to "OK" in UI (#58744)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #58543 and extends to all instances of "Ok" button labels.

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-06-08 14:48:37 +00:00
Finn Eitreim 5b71e46f2e outline: Switch the outline search to use fuzzy_nucleo (#56477)
Nucleo tracking issue:
https://github.com/zed-industries/zed/issues/55872

This PR switches the outline picker to use `fuzzy_nucleo`. 

with that I refactored the outline fuzzy picking to take advantage of
nucleo and its multi-atom query support. The previous implementation had
a lot going on specifically to work around the lack of multiple atoms,
basically taking matters into its own hands to accomplish the same goals
within the constraints it had.

Instead of having two lists of candidates that we have to run the query
against, we just run a single query and take advantage of the fact that
nucleo chooses the matches that are the furtherest towards the end of
the haystack to implement the same ancestor/leaf filtering. It retains
the leaf only matching on single atom queries.

video:


https://github.com/user-attachments/assets/64baa8d7-fd77-452c-86d1-e08561422d85

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable



Release Notes:

- outline: switch to fuzzy_nucleo
2026-06-08 14:41:04 +00:00
Marshall Bowers a20358c831 collab: Update test database schema (#58670)
This PR updates the database schema for Collab tests.

The corresponding database schema migration has been created in the
Cloud repo and applied to the production database.

Release Notes:

- N/A
2026-06-08 13:49:13 +00:00
Ben Kunkle 28acff60d5 ep: Disable diagnostic based jumps (#58832)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-08 13:11:17 +00:00
Ben Kunkle 1575dbe27c ep: Show empty predictions in rate predictions modal (#58829)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-08 13:08:35 +00:00
Smit Barmase 53367edf64 linux: Fix Wayland clipboard reads blocking indefinitely (#58826)
Closes FR-44

Unlike X11, where Zed already times out clipboard reads, on Wayland we
had no timeout at all. We read the clipboard from a pipe the source app
writes into, and we were doing a blocking `read_to_end` on it. So if the
other app opened the pipe but never wrote anything, or stalled partway
through, the read would block forever and hang Zed.

This PR replaces it with a non-blocking read driven by `poll` with a 4s
timeout, so:

- a stalled writer fails cleanly instead of freezing us.
- a slow writer that's still making progress on a large payload keeps
working.

This roughly mirrors what the X11 path already does. I have tested
pasting text, large image, drag-n-drop, etc cases.

To Reproduce:

1. Copy text from a web page in Firefox.
2. `kill -STOP "$(pgrep -o firefox)"`
3. Paste into Zed.

Zed hangs indefinitely.

<img width="400"
src="https://github.com/user-attachments/assets/532d1c55-1500-4143-8227-127e0024efba"
/>


Release Notes:

- Fixed a freeze on Linux Wayland when reading the clipboard from a slow
or unresponsive application.
2026-06-08 12:23:04 +00:00
Lukas Wirth a9d9596054 Remove accidentally committed empty file (#58825)
This got produced by verifiying ssh askpass things a last time before
merging which with a stale cli exe piped into the prompt as a filename
...

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-06-08 11:44:38 +00:00
Ben Brandt 8c88c06390 agent: Remove experimental plan and title agent tools (#58824)
Neither really panned out, removing for now.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-06-08 11:39:49 +00:00
Yara 🏳️‍⚧️ 6fba36a554 Fix profiler breaking concurrent tests (#58813)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #58699

Release Notes:

- N/A
2026-06-08 10:07:26 +00:00
Zaenalos dd00e1800e Fix SSH askpass on Windows by invoking cli.exe directly (#52491)
On Windows, Zed generated a .ps1 askpass script and set **SSH_ASKPASS**
to 'powershell.exe -ExecutionPolicy Bypass -File ...'. SSH calls exec()
on SSH_ASKPASS which cannot exec a command string, causing:

error: ssh_askpass: exec(powershell.exe ...): No such file or directory

Fix by pointing **SSH_ASKPASS** directly to cli.exe and passing the
socket path via **ZED_ASKPASS_SOCKET** env var, which cli.exe reads
before clap parses arguments.

---
> Compiling Zed almost blew up my computer.
---

Related #29048 

Release Notes:

- Fixed some ssh issues on windows that prevented from connecting to a
remote
2026-06-08 09:37:00 +00:00
Xin ZhaoandLukas Wirth 5d2e4a78e4 auto_update: Offload update installation to background thread (#58767)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #55279

When auto-updating, Zed first downloads the update and then performs the
installation. On each platform, this installation phase runs external
commands that spawn new processes. These operations can block the thread
they run on—especially under heavy system load or when
security/antivirus software is active. (An analysis of the blockages on
Windows is documented in
https://github.com/zed-industries/zed/issues/55279#issuecomment-4638072228).

This PR moves the installation process to a background thread. This
ensures that even if process spawning block, the main UI thread remains
responsive.

Release Notes:

- Fixed a UI freeze that could occur when installing auto-updates.

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2026-06-08 09:27:15 +00:00
Veesh GoldmanandClaude Opus 4.8 576a2a3e17 agent: Don't offer feature-flag-gated tools in agent profiles (#58581)
Closes #56778

## Problem

The agent-profile tool configuration lists every built-in tool from
`agent::ALL_TOOL_NAMES`, filtering only by provider support
(`crates/agent_ui/src/agent_configuration/manage_profiles_modal.rs`).
But `Thread::enabled_tools` additionally drops feature-flag-gated tools
before they reach the model — the LSP tools (`go_to_definition`,
`find_references`, `get_code_actions`, `apply_code_action`) behind
`LspToolFeatureFlag`, `rename_symbol` behind `RenameToolFeatureFlag`,
and `create_thread` / `list_agents_and_models` / `update_plan` /
`update_title` behind their own flags.

The result: when a flag is off, a user can enable the tool in a profile,
but the agent never receives it. The picker and the runtime gate
disagreed.

## Fix

Extract the feature-flag gating into a single shared predicate,
`agent::tool_feature_flag_enabled`, and route **both**
`Thread::enabled_tools` and the profile tool picker through it. The
configuration UI can no longer offer a tool the agent would silently
drop, and the two call sites can't drift apart. Also updated the "silent
drop gates" comment in `tools.rs` to document this third gate.

This matches the behavior requested in the issue (don't list tools that
can't be used). The alternative — showing them disabled with an
explanation — is also possible; happy to switch if preferred.

## Testing

- Added `lsp_tools_are_gated_by_their_feature_flag` in
`crates/agent/src/tools.rs`.
- `cargo test -p agent`, `cargo clippy -p agent`, and `cargo fmt` are
clean.
- (`agent_ui` doesn't build in my local environment due to an unrelated
`webrtc-sys` C++ toolchain issue; the `agent_ui` change is a one-line
filter addition mirroring the adjacent provider-support check — relying
on CI to confirm.)

Release Notes:

- Fixed feature-flag-gated tools (such as the LSP tools) being listed in
agent profile configuration when they could not actually be used by the
agent.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 09:17:11 +00:00
Lukas Wirth 9d76bd1265 remote: Do not swallow ssh errors (#58780)
Release Notes:

- Fixed non-descriptive error messages when remote agent processed
disconnected
2026-06-08 08:48:09 +00:00
Albert Bogusz 11d452f8d1 Use SHORT_SHA_LENGTH for all shortened commit SHAs (#58741)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Fixes hardcoded SHA lengths not using the `SHORT_SHA_LENGTH` constant.

Release Notes:

- Reduced short commit SHAs in blame and commit tooltips from 8 to 7 -
consistent with the graph and history views.
2026-06-08 06:38:39 +00:00