Makes sure we can reload the last terminal, and also keeps track more
globally what your last agent type was so we can carry that over to new
workspaces
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
When truncating text at the end with an ellipsis, the truncation point
can land right after a space or punctuation character, producing results
like `"some text …"` or `"some text-…"`.
This trims trailing whitespace and ASCII punctuation from the truncated
prefix before appending the ellipsis affix, so you get clean results
like `"some text…"` instead.
Release Notes:
- Improved text truncation to avoid trailing spaces or punctuation
before the ellipsis.
Typing `@` immediately after `(`, `[`, or `{` did not open the Agent
Panel’s @-mention completion menu, so `(@file)`, `[@file]`, and
`{@file}` were unusable. This has been bothering me for quite some time
now. Overall, I believe this is a QoL improvement, albeit a small one.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] 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
- [ ] Performance impact has been considered and is acceptable
Release Notes:
- Fixed the Agent Panel’s @-mention menu not appearing when `@`
immediately follows `(`, `[`, or `{`.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
We weren't activating and focusing the right thing before.
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
Turns out we were creating an ImageDecoder on every frame (added in
#46167) when a tool returned an image as output, because we were trying
to get its dimensions. That is now cached on `ContentBlock::Image`.
Release Notes:
- N/A
This PR bumps the extension CLI version used in the extension workflows
to `2a00db06ce6d01089bfafd207b6348078e980df9`.
Release Notes:
- N/A
Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
This PR fixes a panic that could occur in the `edit_file` tool where
streaming in text could split in the middle of a multibyte character.
Closes FR-3 and [ZED-7ZX](https://zed-dev.sentry.io/issues/7480598098).
Release Notes:
- Fixed a panic that could occur when streaming in text with the
`edit_file` tool.
Closes AI-266
This PR adds a built-in skill called `create-skill`, which allows the
Zed agent to have access to a skill that teaches it how to properly
create skills for Zed. You can manually invoke it as well as just
letting the model auto-invoke it in case your prompt suggests creating a
new skill.
Release Notes:
- Agent: Added a built-in skill called `create-skill` to make the Zed
agent informed about how to do that.
---------
Co-authored-by: Richard Feldman <richard@zed.dev>
The WgpuRenderer defaults to VK_PRESENT_MODE_FIFO_KHR (vsync), which
blocks vkQueuePresentKHR until the compositor releases a buffer via
wl_surface.frame. On some Wayland compositor+driver combinations
(notably NVIDIA proprietary + Hyprland, but also observed on KDE/GNOME +
AMD RADV), these frame callbacks can be delayed or lost, stalling the
entire calloop event loop for tens of seconds.
VK_PRESENT_MODE_MAILBOX_KHR does not block on vblank: it replaces the
pending frame in a single-entry queue. This avoids the stall entirely.
The renderer already falls back to Fifo automatically if Mailbox is
unsupported by the driver.
The WgpuSurfaceConfig has had a preferred_present_mode field since
#50815 (added for Android lifecycle transitions with the same
rationale). This commit sets it to Mailbox in the Wayland window
creation path only. X11 is not affected.
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
Note on tests: This change is in the Wayland platform's window creation
path (WaylandWindowState::new). The surface configuration is delegated
to WgpuRenderer which already has test coverage for
preferred_present_mode fallback logic. A full integration test would
require a running Wayland compositor in CI. Verified manually and tested
against the renderer's unwrap_or(Fifo) safety net by inspecting
surface_caps.present_modes on both NVIDIA proprietary and Mesa RADV
drivers.
Closes: #50229Closes: #55345Closes: #39097Closes: #50734
Refs: #38497, #52009, #52403, #50574, #49961, #47750, #46203, #50195,
#50283, #42164, #39156, #39234, #35948, #32618
Release Notes:
- Fixed UI freezes on Linux (Wayland) when on certain GPU/driver
combinations
---------
Co-authored-by: Neel <neel@zed.dev>
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] No unsafe blocks
- [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#57057
Release Notes:
- N/A
---------
Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
Zed-managed npm installers were resolving a concrete latest version with
`npm info` and then installing `package@version`. That is brittle when
users
configure npm release-age filtering via `before` or `min-release-age`:
npm's
installer applies those rules during resolution, but our pinned install
target
could disagree with it, and therefore fail to install.
This changes managed npm installs to install `package@latest` and let
npm apply
its own resolver and user config. The local latest-version lookup
remains as a
best-effort cache freshness check, not as the exact install target.
Exact extension API installs remain unchanged because extensions
explicitly
request a package and version. If we want to revisit that we can.
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#53611
Release Notes:
- Fixed npm-backed tool installs to better respect npm release-age
filters.
Still behind a feature flag for now for testing with various agents.
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
Closes AI-261
This PR adds mention disambiguation in the agent panel, which works both
for regular @-mentions as well as for skills. Effectively, when you
mention files with the same name, the mention crease displays the next
path parent name, following a similar approach to common tabs in the
editor. For skills, the skill source is displayed (either global or from
some project).
<img width="500" alt="Screenshot 2026-05-15 at 6 32@2x"
src="https://github.com/user-attachments/assets/72c99480-cf32-42ac-9304-3f65167a1d94"
/>
Release Notes:
- Agent: Improved file and skill mention disambiguation in the agent
panel.
---------
Co-authored-by: Richard Feldman <richard@zed.dev>
Closes TRA-150
This PR makes the restricted mode more obvious by:
- Immediately opening the restricted mode modal upon opening an
untrusted project
- Disabling dismissing the modal on escape or click away to force
choosing one of the two options (and avoid accidentally staying in
restricted mode by simply dismissing it)
- Showing the LSP button but with communication about language servers
being disabled for untrusted projects
- Showing a banner in the project settings with the same communication
The motivation for this change was that we tried to be minimal with how
we communicate a project is untrusted, but it was so minimal that people
were confused as to why language servers and other settings weren't
working. It was easy to miss the title bar button, for some reason. The
changes in this PR makes it so acting on this decision (trust or not a
project) is mandatory in order to even start to interact with the
project. I appreciate changes here are more aggressive, but I think it's
better to make you think about this decision vs. letting you be confused
as to why you don't see LS completions or formatting.
Release Notes:
- Made restricted mode more obvious, demanding immediate action when
opening an untrusted project.
## Summary
Extends #51311 to JSX in JavaScript files, which uses the same
javascript grammar for both .js and .jsx.
## Changes
- Added (#set! rainbow.exclude) to the three angle bracket patterns in
crates/grammars/src/javascript/brackets.scm, matching the TSX fix in
#51311.
## Before / After
Before: angle brackets in JSX tags receive rainbow colors alongside
`{}`, `()`, `[]`, making every tag visually noisy.
After: only `{}`, `()`, and `[]` receive rainbow colors — angle brackets
are excluded, matching the HTML extension behavior.
Release Notes:
- Fixed angled brackets being included in rainbow bracket highlights for
JavaScript.
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 ...
Wire up the client side of the new `PATCH /client/system_settings`
endpoint added in zed-industries/cloud#2444, so we can persist the
currently selected organization on a per-system basis. This PR only adds
the request types and the client method; hooking it up to the actual
organization switcher in the editor will come next.
The endpoint requires the `x-zed-system-id` header (the server returns
400 without it), so the method does not take an Option like the other
client calls.
Release Notes:
- N/A
# What
- Replace `title.len()` with `title.chars().count()` in the commit title
length check, so the limit is measured in Unicode characters instead of
UTF-8 bytes.
- Applied in two places that share the same logic:
- `crates/git_ui/src/git_panel.rs` — Git panel's inline warning
- `crates/git_ui/src/commit_modal.rs` — commit modal's inline warning
# Why
The commit title length check used str::len(), which returns UTF-8 byte
length rather than character count. As a result, titles containing
multi-byte characters (Japanese, Chinese, emoji, etc.) triggered the
warning far below the configured commit_title_max_length — around 24
characters instead of the default 72.
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)
- Before
https://github.com/user-attachments/assets/a895530c-2f73-470c-97fa-29d9467c14e1
- After
https://github.com/user-attachments/assets/ffbe1ba2-0ccc-4b02-87f5-836da7841dd9
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes #ISSUE
Release Notes:
- Fixed commit title length check miscounting multi-byte characters as
multiple characters.
This will make CI error when we receive updates or new slash command
extensions.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
In MCP OAuth, mirror the authorization server's grant_types_supported in
the DCR registration body instead of hardcoding just authorization_code.
Logfire's auth server requires both authorization_code and refresh_token
in grant_types, and we already uses refresh tokens, so the only issue
was not advertising the capability during registration. The DCR body now
intersects our supported grant types with what the server advertises, or
sends all of ours when the server metadata omits grant_types_supported.
Without this change, the Pydantic Logfire MCP auth server refuses our
client registration.
Release Notes:
- MCP: Improve selection of the `grant_types` we send during OAuth
dynamic client registration.
In MCP OAuth, when the resource_metadata URL from the WWW-Authenticate
header from the MCP server is on the same origin, but points to a broken
endpoint (for example Pydantic Logfire doubles the path component,
producing /mcp/mcp), fall back to the RFC 9728 well-known URIs instead
of failing outright. The header URL is still tried first, as per the MCP
spec.
Release Notes:
- MCP OAuth: Handle bad URLs in WWW-Authenticate by falling back to the
well known authorization server metadata URLs.
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:
- Persist Terminal Threads across reloads
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
We were storing reasoning output inside `RedactedThinking` which causes
issues when switching mid-turn from an OpenAI to an Anthropic model.
This implementation fixes this by storing it inside `reasoning_details`,
which matches our responses implementation in `open_ai.rs`
See
https://github.com/microsoft/vscode-copilot-chat/blob/main/src/platform/endpoint/node/responsesApi.ts
For whatever reason the copilot chat extension sets `summary: []`, this
is what our implementation does too
Closes#56385
Release Notes:
- Fixed an issue where the agent would error when using Copilot as a
provider and switching between OpenAI and Anthropic models
Given the model list is dynamic now, we need a wait
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
Behind feature flag until we move RFD forward, but already working great
on codex
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
---------
Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
Registry archive agents install each version into a versioned cache
directory, but older extracted archives were left behind after updates
and
could accumulate disk usage.
After resolving the current archive cache directory, remove other
versioned
cache directories for the same registry agent while preserving the
current
version.
Release Notes:
- Fix certain ACP registry agents not cleaning up old versions
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
I tried to use google cloud to test gemma4 and compare with the result
of ollama. it had response such as
```json
{"choices":[{"delta":{"content":"Hello","reasoning_content":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null,"matched_stop":null}],"created":1778081610,"id":"KV_7adz7Ov20xN8Py-angQ8","model":"google/gemma-4-26b-a4b-it-maas","object":"chat.completion.chunk","usage":{"extra_properties":{"google":{"traffic_type":"ON_DEMAND"}}}}
```
(notice that, while "usage" is present, it does not have any of the
usual value)
Eventually, I had some more issue when parsing the response (unrelated
to this), so I decided to try the google ai endpoint, with its own set
of issue.
Those simple change should only loosen the accepted format, so no new
compatibility error are expected (but I haven’t tried with other
provider)
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
(no change)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Improved open-ai compatibility when token usage info is absent
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
Release Notes:
- Fixed context server availability updates when a new worktree is added
to or removed from a project.
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
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
Still behind a flag until RFD progresses. But also fixes one area where
we would have called delete even if we didn't have support.
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
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
cc @SomeoneToIgnore
## Summary
Follow-up to [this
discussion](https://github.com/zed-industries/zed/discussions/55352#discussioncomment-16919854).
This extracts the edit prediction and clipboard code from `editor.rs`
into `edit_prediction.rs` and `clipboard.rs`.
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
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#53604.
When `log.showSignature = true`, git prepends signature verification
lines to stdout before the `--format` output. The null-separated parsers
in `crates/git/src/repository.rs` weren't expecting that, so SHAs ended
up corrupted — the git graph detail panel showed "0 changed files" for
every commit, and file history was similarly broken.
Setting `-c log.showSignature=false` in `build_command` is the same
trick we already use for `core.fsmonitor`. It only affects
log/show/whatchanged, so other commands aren't touched.
Verified locally with an SSH-signed repo: before this change the detail
panel said "0 changed files"; after, the modified files show up
correctly.
Release Notes:
- git_graph: Fix breakage that occurs when `log.showSignature` is
enabled
---------
Co-authored-by: Anthony Eid <anthony@zed.dev>
Seems to have been introduced in
1fbe1e3512.
These settings actually mean the opposite:
> Whether to use the system provided dialogs for Open and Save As. When
set to false, Zed will use the built-in keyboard-first pickers.
> Enables the simple file dialog for opening and saving files and
folders. The simple file dialog replaces the system file dialog when
enabled.
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:
- Fixed import of VSCode setting `files.simpleDialog.enable` being
inverted
## Summary
- Changes the outer `MarkdownPreviewView` div from `.size_full()` to
`.w_full().flex_1().min_h_0()`.
- Before: preview's height stayed at 100% of the pane regardless of
toolbar size, so deploying the buffer search bar pushed the preview's
bottom 45px past the pane edge — clipped by the pane's
`overflow_hidden`.
- After: preview takes only the leftover main-axis space and shrinks as
the toolbar grows. Bottom edge stays at the pane bottom.
Verified empirically: `bounds.size.height` round-trips `952px ↔ 907px`
with the toolbar at `67 ↔ 112` (Δ = 45px = the search bar's height).
Companion to #55008 (anchor compensation). Both PRs come out of
investigating #54987 — they fix two independent bugs that surface
together when toggling the search bar.
## Test plan
- [x] Compiles with `cargo clippy -p markdown_preview -- --deny
warnings`.
- [x] Manual: `Cmd-F` in the markdown preview no longer clips bottom
content past the pane edge.
- [x] Manual: `Esc` restores the preview to full available height.
Release Notes:
- Fixed markdown preview content being clipped past the pane edge when
the buffer search bar is open
Co-authored-by: Agus Zubiaga <agus@zed.dev>
<img width="541" height="245" alt="SCR-20260515-phfs"
src="https://github.com/user-attachments/assets/30413912-5c83-49c1-8874-4f987af222d3"
/>
Might be nice to in the future, have this open a modal to allow
inputting, similar to configuring MCP servers, but this is nice quick
fix 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)
- [ ] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Now that we have per-channel docs, it'll be nice to have a method to
link to "this" channel's docs when we ship features that link out to
them.
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
Replaces the `@rule` autocomplete entry in the agent chat input with
`@skill`, since Zed Rules are being deprecated in favor of Skills.
Behavior matches the old `@rule` flow: selecting a skill inserts a Skill
mention crease that loads the skill file as context, and the entry only
appears when there are available skills.
The underlying `MentionUri::Rule` parsing/handling is left in place so
previously saved rule mentions still load correctly — only the
autocomplete surface area was migrated.
Release Notes:
- Replaced the `@rule` autocomplete entry with `@skill` in the agent
chat input.