Commit Graph
37399 Commits
Author SHA1 Message Date
Ben Kunkle aba82e90f1 ep: Add diagnostics teacher format (#54999)
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-04-28 09:53:00 +00:00
03c8df3547 git_graph: Align CommitDataReader with batched commit processing (#54600)
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)
- [ ] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable

Updated `CommitDataReader::read` from single SHA to batched
input/output.
`run_commit_data_reader` is designed to process requests in batches, but
`CommitDataReader::read` previously only sent one SHA per call. So in
practice, commit data was effectively processed one-by-one from the
caller path.


The temporary debug logs show that batching was not performed
previously.

before:
<img width="607" height="154" alt="image"
src="https://github.com/user-attachments/assets/4f9d9041-6209-426f-be44-f28449504c80"
/>

after:
<img width="632" height="121" alt="image"
src="https://github.com/user-attachments/assets/43b349f3-7685-4786-af1e-2a640cdf8ccd"
/>


Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-04-28 08:29:21 +00:00
John Tur 55adf85aa7 Fix process teardown deadlock on Windows (#55065)
AWS-LC registers an `atexit` handler that intentionally acquires a lock
without releasing it. AWS-LC also has `thread_local` objects which
acquire this lock in their destructor. Destructors for `thread_local`s
run under the loader lock. So, there is a race condition where, if a
thread exits after `atexit` handlers have run, the TLS destructors will
block indefinitely on this lock while holding the loader lock. Since
`ExitProcess` also requires the loader lock, process teardown will
deadlock.


Closes #54856

Release Notes:

- Fixed an issue where the Zed process wouldn't exit after closing all
windows
2026-04-28 08:19:03 +00:00
Mikayla Maki 58d3c15483 Query for window instead of capturing (#55059)
This allows us to move entities between windows without breaking all the
callbacks.

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-04-28 08:04:42 +00:00
Ben Kunkle 7ef033e53b ep: Remove old experimental provider (#55011)
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-04-28 07:41:38 +00:00
Joseph T. Lyons 28b48811dd Bump Zed to v1.1.0 (#55035)
Self-Review Checklist:

- [ ] 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)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
2026-04-27 22:22:46 +00:00
Finn EversandDanilo Leal c9e9748a7f terminal_view: Ensure reported size does not change once content becomes scrollable (#46648)
This fixes an issue where due to the scrollbar appearing, the reported
content size would shift, causing issues in the process. We now actually
always reserve space for the scrollbar appropriately as described in
https://github.com/zed-industries/zed/pull/33636 initially.

Release Notes:

- Fixed an issue where the scrollbar could cause a layout shift in the
terminal.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-04-27 22:06:01 +00:00
Richard Feldman baa0ef5427 gpui_macos: Enable gpui/test-support feature for tests (#54988)
PR #51415 introduced the `PlatformHeadlessRenderer` trait and
`PlatformWindow::render_to_image` method in `gpui`, both gated on
`#[cfg(any(test, feature = "test-support"))]`, plus corresponding impls
in `gpui_macos` (`window.rs` and `metal_renderer.rs`) gated on the same
cfg.

A dependent crate's `cfg(test)` flag does **not** propagate to its
dependencies. So when `cargo test -p gpui_macos` is run in isolation,
`gpui_macos`'s own `cfg(test)` is true (its impls get compiled) but
`gpui` is just a regular dependency without `test-support` enabled (the
trait and method don't exist), and the build fails:

```
error[E0405]: cannot find trait `PlatformHeadlessRenderer` in crate `gpui`
error[E0407]: method `render_to_image` is not a member of trait `PlatformWindow`
```

The fix is to enable `gpui/test-support` as a dev-dependency, so the
feature is on exactly when `gpui_macos`'s tests are being built.

This bug is latent on `main` — workspace-level `cargo test` typically
pulls in `gpui/test-support` transitively from other crates, masking it.
Running `cargo test -p gpui_macos` alone is what surfaces it.

Release Notes:

- N/A
2026-04-27 21:21:03 +00:00
Ben Kunkle c1aaec2371 ep: Improve copy when showing edit predictions is disabled (#54926)
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 #54809

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-04-27 14:25:22 +00:00
João Soares e88541f1a7 cli: Null stdio handles when spawning Zed on Windows (#52583)
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 #51101

Release Notes:

- Fixed issue where launching Zed from Git Bash would leave the Ctrl
modifier stuck in the terminal.

## Demo

### Before:


https://github.com/user-attachments/assets/301c73a0-768b-437d-8a88-88d7db320c15

### After:



https://github.com/user-attachments/assets/2ec75f5e-16b9-4551-86d9-d59447712e7a
2026-04-27 14:24:17 +00:00
Finn Evers 4230885f49 ci: Fix autofix workflow (#55004)
It also still does too much, but is at least faster while doing so.

Release Notes:

- N/A
2026-04-27 14:10:03 +00:00
88e10832cc deepseek: Add deepseek-v4-pro & deepseek-v4-flash (#54731)
reference: https://api-docs.deepseek.com/

Release Notes:

- Added deepseek-v4-pro and deepseek-v4-flash models

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: MrSubidubi <dev@bahn.sh>
2026-04-27 13:50:00 +00:00
Finn Evers 0ac8db01ea compliance: Fix futures dependency (#55003)
We need this nowaways outside of the octocrab feature too

Release Notes:

- N/A
2026-04-27 13:30:00 +00:00
Ben Brandt 418e5fe615 Implement tool result conversion for anyhow errors (#55001)
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-04-27 13:03:33 +00:00
Bennet Bo Fenner 6e8b8b2fbd agent: Allow tools to output multiple content parts (#54518)
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
2026-04-27 12:36:11 +00:00
Finn Evers cf8feb80da docs: Prompt extension authors to test their extension before publishing (#54998)
Release Notes:

- N/A
2026-04-27 11:38:33 +00:00
Nihal KumarandAnthony Eid 8132dc8da0 git_graph: Wire up Vim mode navigation (#53609)
Added Vim mode navigation (`j`, `k`, `gg`, `G`) to the Git Graph view.


[gitgraph-vim.webm](https://github.com/user-attachments/assets/b2dd31a5-deb0-48ab-a48d-8721ee500dad)

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 #53525 

Release Notes:

- Added vim mode navigation to git graph

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-04-27 11:14:33 +00:00
Tristan Phease a4c54e2142 Fix ESLint not starting on Windows (#54945)
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 #54093 (at least the os error 123 in the comments of that
bug)/#54901 (although the diagnosis in that bug is totally wrong)
Used process monitor to work out what that issue was:
<img width="1573" height="94" alt="image"
src="https://github.com/user-attachments/assets/2f82ad1a-8532-465d-9dcd-ba0bd092e9e7"
/>
There's actually a '\n' after node_modules there so it's an invalid
directory. Add trim() to fix.
After adding that change locally, eslint loaded fine

Release Notes:

- Fixed bug where eslint didn't start on Windows
2026-04-27 11:10:58 +00:00
Tim Vermeulen 023c6d497d editor: Fix split diff spacer calculation for non-row-aligned patch groups (#53098)
Fixes a bug in the split diff spacer calculation when a patch group
starts mid-row, sometimes causing extra spacers to be inserted.

`spacer_blocks` already explicitly handles the case where `first_point`
isn't at the start of `edit_for_first_point.old`, but the `while let
Some(source_point) = source_points.next()` loop that follows implicitly
assumes that `source_point` is at the start of `current_range`, which in
turn seems to be based on the assumption that `current_range` starts at
the beginning of a row. As it turns out, `current_range` isn't
guaranteed to start at the beginning of a row, which can sometimes lead
to incorrect spacer blocks being inserted.

This addresses that by moving the existing `if
edit_for_first_point.old.start < first_point` logic into the loop body
as `if current_edit.old.start < current_boundary` in order to handle any
non-row-aligned patch groups, not just the first one.

Here's an example of how this bug could manifest:


https://github.com/user-attachments/assets/1d3a5b4c-e4ad-4d87-804b-c4390d25f408

After:


https://github.com/user-attachments/assets/b15acc62-33fe-4154-82e5-5cdf1806ffa7

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:

- Fixed incorrect spacer blocks sometimes appearing in the split diff
view when editing the file.
2026-04-27 10:10:48 +00:00
06a255a759 git_ui: Replace commit message generation spinner with a cancel button (#49540)
When a model produces poor output during commit message generation,
there was no way to cancel it. This replaces the non-interactive spinner
with a Stop button that cancels the generation task. Partial generated
text is kept in the editor.

Partially addresses #33556


<img width="1200" height="900" alt="2026-02-18-160103_hyprshot"
src="https://github.com/user-attachments/assets/760e9681-b374-4f40-a4b1-0bb6775db17c"
/>

---

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:

- Added a button to stop commit message generation in the git panel

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2026-04-27 09:54:48 +00:00
Bennet Bo Fenner b34f5991d7 open_ai: Use responses API for all models (#54910)
From the
[docs](https://developers.openai.com/api/docs/guides/migrate-to-responses#responses-benefits):

> Better performance: Using reasoning models, like GPT-5, with Responses
will result in better model intelligence when compared to Chat
Completions. Our internal evals reveal a 3% improvement in SWE-bench
with same prompt and setup.
Agentic by default: The Responses API is an agentic loop, allowing the
model to call multiple tools, like web_search, image_generation,
file_search, code_interpreter, remote MCP servers, as well as your own
custom functions, within the span of one API request.
Lower costs: Results in lower costs due to improved cache utilization
(40% to 80% improvement when compared to Chat Completions in internal
tests).
Stateful context: Use store: true to maintain state from turn to turn,
preserving reasoning and tool context from turn-to-turn.
Flexible inputs: Pass a string with input or a list of messages; use
instructions for system-level guidance.
Encrypted reasoning: Opt-out of statefulness while still benefiting from
advanced reasoning.
Future-proof: Future-proofed for upcoming models.

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 #ISSUE

Release Notes:

- Always use Responses API for OpenAI models
2026-04-27 09:52:51 +00:00
Bruna Fernandes 63ee160dd5 pane: Fix apply formatting when new file is first created (#52692)
### Description:

Previously, formatting was only applied after manually saving the file,
once it had already been created and saved. After the fix, when creating
a new file from the editor and saving it for the first time with a
filename, formatting is automatically applied if “format on save” is
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 #22534

Release Notes:

- Fixed apply formatting when a new file is first created
2026-04-27 09:33:44 +00:00
galuis116andMarshall Bowers 88ef0d85b4 settings_ui: Fix switching icon themes from "dynamic" to "static" always selecting the dark theme (#54647)
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 #54646 

Release Notes:

- Fixed settings behavior where switching Icon Theme from "Dynamic"
(System mode) to "Static" now selects the icon theme that matches the
current OS appearance (light or dark), instead of always defaulting to
the dark variant.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2026-04-27 09:32:43 +00:00
Rocky ShiandPiotr Osiewicz 99fb4296d6 Enable edit prediction and Copilot for untitled buffers (#45764)
Closes [#45631](https://github.com/zed-industries/zed/issues/45631)

Recording:


https://github.com/user-attachments/assets/a5143eb4-fae3-42a7-9d64-fb7c42ee97c2


Release Notes:

- copilot: Edit predictions now work in temporary files

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2026-04-27 09:31:45 +00:00
SakethandJakub Konka cc2ebe1407 terminal: Bind Alt+F4 to Close Window in the terminal keymap (#53091)
Closes #52774

## Summary
- Bind Windows `Alt+F4` to `workspace::CloseWindow` in the `Terminal`
keymap context
- Add a regression test covering the built-in Windows terminal keymap
entry

## Why
When the integrated terminal is focused, `Alt+F4` should close the
window instead of falling through to terminal keystroke handling.
Handling this in the Windows `Terminal` keymap keeps the fix aligned
with the rest of the terminal shortcut overrides.

## Validation
- `cargo test -p settings
windows_terminal_keymap_closes_window_on_alt_f4`

Release Notes:

- Fixed Alt+F4 on Windows so Zed closes even when the integrated
terminal is focused.

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-04-27 09:27:26 +00:00
Marshall Bowers db2c69b5cc language_models: Fix is_authenticated state for Cloud provider (#54826)
This PR fixes an issue introduced in
https://github.com/zed-industries/zed/pull/54397 where the Zed Cloud
provider would not be reflected as "authenticated" if a connection to
Collab was attempted, but could not be established.

This was especially noticable when running Zed against a local version
of Cloud and not having Collab running.

This restores the original logic prior to that change.

Release Notes:

- N/A
2026-04-27 08:59:36 +00:00
Jakub Profota 0da495198d Enable Vim/Helix keybindings when the base keymap is set to None (#54899)
Hi! 👋 When `base_keymap` is set to `None`, it disables all the
keybindings, even if `vim_mode` or `helix_mode` is enabled. However, I
think the Vim/Helix keybindings should be applied on top of the empty
base keymap.

My use case for this is to start with the minimal set of Vim/Helix key
shortcuts and add other bindings on top of that, instead of flooding the
keymap with hundreds of predefined shortcuts from some base keymap.
2026-04-27 08:55:04 +00:00
Phillip DavisandConrad Irwin b3eb431679 Fix vim replace not escaping $ (#53277)
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 ##42292

The text inserted in the search ('\$SEARCH') and replace ('$$OTHER')
inputs of the top-panel is a little anti-aesthetic, but that seems out
of scope for this issue.

Release Notes:

- '$' in the second clause of vim-style '%s/find/replace/g' actions is
correctly escaped.

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-04-27 08:53:44 +00:00
Nathan Witmer cef0578ff6 Fix line comment rewrap in golang and C/C++ (#54931)
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 #54737.

#48752 added empty-prefix `block_comment` entries to several language
configs (Go, C, C++, JSONC, Python, JSX inner) to support the new
toggle-block-comments action.

In `Editor::rewrap_impl`, the comment-format matcher used
`buffer.contains_str_at(indent_end, &config.prefix)` to decide whether
the current line is a continuation of a block comment. When the language
is configured with an empty prefix, this is true on every line. `//`
(and `#`) line comments inside a `comment` override scope were
classified as `BlockLine("")` and never reached the line-comment
fallback. The result was that the line-comment prefix was not stripped
before wrapping and not re-prepended after, embedding `//` markers as
text in the wrapped paragraph.

Skip the BlockLine arm when the configured prefix is empty so the
matcher falls through to `line_comment_prefixes`.

I've included regression tests for both golang (which adds a new
treesitter dep to the editor package) and C/C++.

Release Notes:

- Fixed line comment rewrapping in golang and C/C++
2026-04-27 08:51:08 +00:00
Kunall BanerjeeandMarshall Bowers 986087a4ef docs: Update broken references (#48608)
I might turn this into a big PR with multiple fixes. So no, this is not
going stale. I’m updating this as and when I find broken refs or stale
content.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2026-04-27 08:48:27 +00:00
Pronsh aa2cbd685a markdown_preview: Fix Ctrl+S saving checkbox toggle state (#53236)
Changes Made:

- Adding the `Item::can_save()`, `save()`, `save_as()`, `can_save_as()`
functions to help the Editor save when a checkbox is toggled
- Small refactor to seperate checkbox toggle and refreshing preview
- Adding support for both `/...` and `\\...` for windows users. [NOTE: I
no longer own a window's machine and I am unsure if this is correct, and
will fix it immediately if this is wrong]
- Resolving preview paths, strips out the fragment, and image paths are
coalesced to None if they don't exist
- Adding Tests for the added behaviour [NOTE: would love feedback since
this is the first time I am writing tests, and had a bit of assistance
from an AI, but manually reviewed the code and ran the application and
it seemed fine]

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 #46901

Release Notes:

- Fixed Crtl+S saving while toggling checkbox in preview mode
2026-04-27 08:47:27 +00:00
moktamdandmoktamd af50eada91 dap: Support IPv6 addresses in TCP transport (#52244)
The DAP TCP transport layer was hardcoded to `Ipv4Addr`, so IPv6
addresses like `fd00::a` in a debug config's `connect.host` always
failed with `hostname must be IPv4: invalid IPv4 address syntax`.

Replaced `Ipv4Addr` with `IpAddr` and `SocketAddrV4` with `SocketAddr`
across the `task`, `dap`, `dap_adapters`, and `project` crates. The WASM
extension API still uses `u32` for the host field to avoid a breaking
WIT interface change; IPv4 round-trips through extensions as before.

Fixes #52237

Release Notes:

- Fixed DAP TCP transport rejecting IPv6 addresses when connecting to
remote debug adapters.

---------

Co-authored-by: moktamd <moktamd@users.noreply.github.com>
2026-04-27 08:42:45 +00:00
Piotr Osiewicz 650e3ffcc3 python: Respect user settings for toolchain discovery over the toolchain set in Zed (#48262)
Closes #46754

Release Notes:

- python: User settings now take precedence over toolchain set in Zed
for pyright/basedpyright
2026-04-27 08:40:41 +00:00
Danilo Leal 729484e834 Fix spinner in activity indicator (#54977)
Quick fix for a little regression I introduced in
https://github.com/zed-industries/zed/pull/54791 accidentally removing
the rotating spinner icon in the activity indicator.

Release Notes:

- N/A
2026-04-27 08:33:40 +00:00
RainandKirill Bulatov 842d0a9854 project: Use runnable kind to disambiguate between cargo and shell commands (#54011)
Found this bug while investigating why configuring nextest based on the
instructions at
https://github.com/rust-lang/rust-analyzer/issues/21137#issuecomment-4254611341
wasn't working within Zed.

Previously, we'd use `serde(untagged)`, preferring cargo over shell
commands. The problem is that every instance of a shell command is a
valid instance of a cargo command. For example, the shell command:

```json
{
    "label": "test my_test",
    "kind": "shell",
    "args": {
        "environment": {"RUSTC_TOOLCHAIN": "/path/to/toolchain"},
        "cwd": "/project",
        "program": "cargo",
        "args": ["nextest", "run", "--package", "my-crate", "--lib", "--", "my_test", "--exact", "--include-ignored"]
    }
}
```

would end up getting deserialized as a Cargo command, silently dropping
`program` and `args`.

With this fix, we now use the provided `kind` as a tag. We do have to
introduce a `#[serde(flatten)]` unfortunately, which has a few side
effects due to internal buffering, but `#[serde(untagged)]` also does
internal buffering so this doesn't make things worse.

I've manually tested this by configuring:

```json
{
    "lsp": {
        "rust-analyzer": {
            "initialization_options": {
                "runnables": {
                    "test": {
                        "overrideCommand": [
                            "cargo",
                            "nextest",
                            "run",
                            "--package",
                            "${package}",
                            "${target_arg}",
                            "${target}",
                            "--",
                            "${test_name}",
                            "${exact}",
                            "${include_ignored}"
                        ]
                    }
                }
            }
        }
    }
}
```

and ensuring that nextest is correctly invoked.

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:

- Fixed deserialization of rust-analyzer shell runnables.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-04-27 07:36:43 +00:00
illimarkangur 361766dcf2 docs: Fix a typo in themes.md (#54919)
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:

- Fixed accidental duplication of words in themes.md
2026-04-27 07:32:47 +00:00
Bing WangandBen Kunkle 930c6f08b6 terminal: Reduce flicker on resize (#47195)
Skip PTY resizes for pixel-only changes and coalesce pending resize
events.
Snap standalone terminal layout to whole device pixels to avoid subpixel
jitter.

before:


https://github.com/user-attachments/assets/0ad0db83-0099-44c8-b8d1-3dc8146b25ef


after:


https://github.com/user-attachments/assets/86278014-1c87-4263-a9e5-b58bcc1fa2ea




Release Notes:

- Fixed: Reduce terminal flicker on resize

---------

Signed-off-by: pigletfly <wangbing.adam@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-04-27 07:13:44 +00:00
Finn Eitreim 53e1473bea editor: Make editor: expand excerpts actually expand all excerpts (#54717)
Expand all excerpts had a doc comment describing it as expanding all
excerpts, but in practice it only expanded the excerpt that was the most
relevant.

I fixed that to make it expand all excerpts. 

video:


https://github.com/user-attachments/assets/9858ebda-199c-4f72-8a2f-3cd606b0eff4

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 #54651 

Release Notes:

- editor: `expand excerpts` now has correct documentation explaining its
function.
2026-04-27 06:58:07 +00:00
Kirill Bulatov 04c4b2b6cd Fix code lens id clash (#54851)
Follow-up to https://github.com/zed-industries/zed/pull/54100

Instead of relying on "line number" that could have overlapped depending
on the range we query, use hierarchical IDset: `block id -> lens #` to
ensure no clashes happen anymore.

Release Notes:

- N/A
2026-04-25 11:23:45 +00:00
Kirill Bulatov 88ed80c13e Fix offline lookup of clangd on Windows (#54781)
Closes https://github.com/zed-industries/zed/issues/54042
Part of https://github.com/zed-industries/zed/issues/9789

This binary was not found when Zed first downloads the release, and then
rerun offline on the same project.

Using a `clangd-windows-21.1.0.zip ` archive from
https://github.com/clangd/clangd/releases/tag/21.1.0

```
~/Downloads ❯ unzip -l clangd-windows-21.1.0.zip|rg clangd.exe
 46908928  08-27-2025 01:40   clangd_21.1.0/bin/clangd.exe
```

Similarly, delve releases are in
https://github.com/go-delve/delve/releases and codelldb are in
https://github.com/vadimcn/codelldb/releases

```
~/Downloads ❯ unzip -l codelldb-win32-x64.vsix|rg exe
  1014272  04-21-2026 03:05   extension/bin/codelldb-launch.exe
  4400128  04-21-2026 03:05   extension/adapter/codelldb.exe
   242176  04-14-2026 04:14   extension/lldb/bin/lldb.exe
  6272000  04-14-2026 04:14   extension/lldb/bin/lldb-server.exe
    96768  04-14-2026 01:42   extension/lldb/bin/lldb-argdumper.exe
    96768  04-14-2026 04:13   extension/lldb/lib/lldb-python/lldb/lldb-argdumper.exe
    35284  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/pygments/lexer.py
   101888  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/distlib/w64.exe
   168448  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/distlib/w64-arm.exe
    91648  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/distlib/w32.exe
   108032  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/distlib/t64.exe
   182784  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/distlib/t64-arm.exe
    97792  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/distlib/t32.exe
    12161  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/pygments/lexers/__init__.py
    74926  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py
    53448  04-14-2026 01:36   extension/lldb/lib/site-packages/pip/_vendor/pygments/lexers/python.py
```


Release Notes:

- Fixed offline lookup of clangd on Windows
2026-04-25 06:14:41 +00:00
Kirill Bulatov cecd991263 Fix whitespace rendering in Zed (#54798)
Closes https://github.com/zed-industries/zed/issues/49186

<img width="403" height="136" alt="first"
src="https://github.com/user-attachments/assets/dafaa681-b921-4411-a453-8857681e50f8"
/>

Closes https://github.com/zed-industries/zed/issues/45775

<img width="405" height="104" alt="second"
src="https://github.com/user-attachments/assets/17e3b5df-0d61-47f3-88ff-8aeeafae1425"
/>

Release Notes:

- Fixed whitespace rendering in Zed
2026-04-25 06:11:27 +00:00
Bennet Bo Fenner 83830be2b1 Revert terminal changes from #54728 (#54836)
Reverts parts of #54728, which seems to have causes scrolling issues in
the terminal

Release Notes:

- N/A
2026-04-24 22:16:20 +00:00
Bennet Bo Fenner 50d90feab4 open_ai: Add support for gpt-5.5 (#54820)
Release Notes:

- Added support for GPT 5.5 and GPT 5.5 Pro via the OpenAI provider
2026-04-24 20:26:56 +00:00
Max MalkinandKyleBarton 655f2f90e1 Fall back to empty workspace when devcontainer restore is cancelled (#54734)
Closes #47872

Release Notes:

- Fixed Zed exiting on startup when cancelling a failed devcontainer
connection. It now falls back to an empty workspace.

Co-authored-by: KyleBarton <kjb@initialcapacity.io>
2026-04-24 19:05:42 +00:00
Cole Miller d19f3684d2 Update AI rules to reflect that AsyncApp updates are now infallible (#54818)
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
2026-04-24 19:04:32 +00:00
Tom Houlé 7dcc45bbf7 agent_ui: Recognize image file extensions case insensitively (#54786)
Straightforward.

Closes https://github.com/zed-industries/zed/issues/54308

Release Notes:

- Fixed the file extension recognition logic for images in the agent UI
being case sensitive. It is now case insensitive.
2026-04-24 18:30:54 +00:00
2ab4a856a3 git: Improve handling of unsafe repositories (#43693)
These changes update Zed's Git Panel to be able to detect unsafe git
repositories, where the user running Zed doesn't own the `.git`
directory, and show a dedicated empty view in the Git Panel that not
only explains the situation but also allows the user to choose whether
to trust this directory, which will end up running `git config --global
--add safe.directory <path>`.

While testing those changes, it was noted that attempting to add or
reset files after trusting the directory would fail, as expected, but
the UI wouldn't react to the fact that those operations failed. What
this means is, if the user tried to add a file, the UI would show a
checkmark for that file and, after the operation failed, the checkmark
would remain. We now revert that, for both `git add` and `git reset`.

Some more technical notes on this change:

- Introduce `project::git_store::GitAccess` enum to express whether we
actually have access to the repository, exposed via
`git::Repository::access`, which probes the backend with a `git status`
command and classifies the result.
- On unsafe repositories,
`project::git_store::LocalRepositoryState::new` fails to spawn the git
worker, which now cleanly signals `GitAccess::No` rather than leaving
the panel in a broken state.
- Updated `git_ui::git_panel::GitPanel::render_empty_state` with a third
alternative, when `GitAccess::No`, that basically renders a view
explaining why the repository is considered unsafe, together with
buttons for git's documentation on safe directories and a button to add
the repository's folder as a safe directory
- Updated `project::git_store::GitStore` to now watch `~/.gitconfig` and
`$XDG_CONFIG_HOME/git/config`. Watching this files allows the Git Panel
to react when the git configuration is updated, which will be the case
if the user decides to trust the repository. When either changes, a
`GitStoreEvent::GlobalConfigurationUpdated` event is emitted and the
panel refetches repository state.
- Added `project::git_store::Repository::refetch_repo_state` field,
which stores a closure to allow recreating the
`Repository::repository_state` and the job sender after the repository's
directory is trusted, without requiring a project reload.
- Added a `fs::Fs::git_config` trait method, wrapping a real `git
config` invocation. In order to be able to call this, both
`git_store::GitStore::git_config` and `project::Project::git_config`
wrappers have also been introduced. Worth mentioning that this isn't yet
supported for remote projects or collab guests.
- Updated `fs::Fs::git_clone` argument order to match
`fs::Fs::git_config` and `fs::Fs::git_init`.
- Added a new
`project::git_store::pending_op::PendingOps::last_op_errored` method
that allows determining whether the last pending operation failed. This
now allows us to filter out failed operations when determining whether
`git add` or `git reset` failed, so that we can fall through to the real
git status.
- Updated `git_ui::git_panel::GitPanel::change_file_stage` to now call
`update_counts` in its error branch so the cached staged counters stay
consistent with the reverted per-entry state, seeing as we now handle
reverting the UI state if an operation fails.
- Fixed `fs::RealFs::git_init` to fall back to the provided branch name
when `git config --global --get init.defaultBranch` fails, for example,
when the user hsan't configured one.

Co-authored-by: cameron <cameron.studdstreet@gmail.com>

Closes #42286

Release Notes:

- Added a dedicated empty state in the Git Panel for unsafe
repositories, with a "Trust Directory" button that adds the repository
to `safe.directory`
- Fixed stage and unstage checkboxes in the Git Panel not reverting when
a `git add` or `git reset` command failed

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2026-04-24 17:14:24 +00:00
Bennet Bo Fenner b9839bea5d acp: Improve ACP debug view (#54769)
Adds a dropdown to the ACP logs which lets you specify which agent
connection to look at. Also adds a button to restart the connection.

<img width="710" height="1023" alt="image"
src="https://github.com/user-attachments/assets/12430175-3c1d-452f-bc45-d1ec0616b51b"
/>

Release Notes:

- N/A
2026-04-24 15:53:14 +00:00
Bennet Bo Fenner b0dabe79b4 agent_ui: Remove unused APIs (#54774)
Release Notes:

- N/A
2026-04-24 15:52:27 +00:00
Kirill Bulatov eae9741e2a Fix default.json profile and os settings not applying on startup (#54635)
When started working on "disable the profiler for all but Nightly and
Dev" users, I've tried to do that using the default OS settings and
discovered that those are ignored.

Release Notes:

- Fixed default.json profile and os settings not applying on startup
2026-04-24 15:05:52 +00:00