This PR frees up `shift-backspace` to work as it did before. Now, the
action to remove the first queued message is now assigned to the
`cmd-shfit-backspace` keybinding, whereas the action to clear the entire
message queue is assigned to `cmd-alt-backspace`.
Release Notes:
- N/A
Closes #ISSUE
Resolves some spurious warnings we were seeing in the keymap file due to
keybind declarations matching multiple possible shapes which is not
allowed with `oneOf` per the json-schema spec
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Follow-Up-For: #47243
Previously, we would detach tasks spawned to watch config files.
However, the task blocked on receiving a file event before checking if
the receiver for the updates channel was dropped, causing the task to
never exit. The fix here was to return the task explicitly, so that it
can be dropped instead of calling `.detach()` on it. There is definitely
a way to `select!` between the receiver being dropped and the next file
system event, but I couldn't figure it out in a reasonable amount of
time and decided it wasn't worth it.
Release Notes:
- Fixed an issue where a few file descriptors would be leaked each time
a project was closed
This PR adds the ability to edit a queued message, which you can now do
by hitting `cmd-e` from the message editor, which will focus the first
queued message. To pull that off, I'm also making the queued messages
render as an editor, the same way we do with regular user messages. That
way, we ensure less layout shift when focusing in and out of the queued
message for editing and gain the ability to render context
buttons/creases the same way we do in the main message editor.
https://github.com/user-attachments/assets/fb68fd48-c0cd-491f-a7d9-5065a9151b0b
Note that in the video, I show the state in which you're still editing
in the moment in which the queued message would be sent. If that
happens, your queued message won't be sent even if you unfocus the
queued message editor. In this case, you need to explicitly hit "Send
Now".
Release Notes:
- Agent: Added the ability to edit queued messages.
## Summary
Fixes crash when dragging debugger panel items
(terminal/console/variables/frames) to another pane as split view.
**Root causes:**
1. Double borrow panic - `pane_group.split()` was called synchronously
inside a `Context<Pane>` update, causing "cannot update Pane while it is
already being updated"
2. `unwrap()` calls that panic when items are in transition during drag
operations
3. `debug_assert!` in `pane_at_pixel_position` fails when `members` and
`bounding_boxes` are temporarily out of sync after deferred split
**Fixes:**
- Defer entire split+move operation via `cx.spawn_in()` to avoid double
borrow
- Replace `unwrap()` with graceful early returns in `activate_item` and
`run_in_terminal`
- Handle `members.len() != bounding_boxes.len()` gracefully in
`pane_at_pixel_position`
Closes#46784
Closes #ISSUE
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Co-authored-by: Anthony Eid <anthony@zed.dev>
This command takes raw LLM outputs (`predictions.actual_output`) that
could be generated elsewhere and parses them into a canonical unified
diff (`predictions.actual_patch`).
This is useful for simplifying the evaluation pipeline and for rerunning
the parser without having to generate LLM outputs.
Release Notes:
- N/A
This is still behind a feature flag as the registry is still WIP, but
allows downloading binary agents from the registry on github.
Release Notes:
- N/A
Closes#31351
# Diagnostics Mention in New Threads
## Overview
Adds the `@diagnostics` mention to the new Agent Panel threads so users
can inject current LSP diagnostics (errors by default) without switching
to a text thread. The diagnostics mention is fully integrated into ACP
mention parsing, the context picker, and the message-editor pipeline so
it round-trips cleanly and shows up in the standard `@` menu.
## Context
- **Request:** bring `/diagnostics` parity to the “New Thread” assistant
experience.
- **Scope:** diagnostics only; `/terminal` mention would be implemented
in a separate PR.
- **Docs:** updated Agent Panel docs + changelog.
## Implementation Details
1. **Mention plumbing**
- Added `MentionUri::Diagnostics` to `acp_thread`, including parsing
(`zed:///agent/diagnostics?include_warnings=true`) and icon/name
metadata.
- Tests ensure diagnostics links round-trip via Markdown mention
serialization.
2. **Context picker / completion**
- New `ContextPickerMode::Diagnostics` exposes an `@diagnostics` entry
in the mention menu.
- Completions turn `@diagnostics` into a fully fledged mention, reusing
the existing confirmation pipeline.
3. **Message editor + thread serialization**
- Resolving the mention calls the existing diagnostics collector from
`assistant_slash_commands`, embedding the tool output inline with other
context blocks (`<diagnostics>…</diagnostics>`).
- Thread-link handling ignores diagnostics backlinks so clicking them
doesn’t try to reopen nonexistent resources.
# How it looks
<img width="800" height="480" alt="image"
src="https://cf5gpe8lxo.ufs.sh/f/EmJ5Xl877qJO1mzC9Zrn8AmJZHeShC4RoUwvTMlF2tfPzj06"
/>
Release Notes:
- Allow mentioning diagnostics in the agent panel via `@diagnostics`
---------
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Avoids the panic in #46974
But should be solved by using `saturating_sub` on the `start_overshoot`
calculation, ref:
https://github.com/zed-industries/zed/pull/47046#issuecomment-376285578637715d5a50/crates/rope/src/chunk.rs (L403C5-L415C6)
This function gets called with PANIC = false from `slice`. But if the
offset is outside the text, `log_err_char_boundary` will still panic,
because the first `if` doesn’t bail out early.
Release Notes:
- N/A
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Follow up to https://github.com/zed-industries/zed/pull/47200, fixing an
edge case where if the heartbeat failure disconnects us we get stuck in
an unconnectable state
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes#46502
The issue here was that we were not looking into the sub page stack when
looking headers up, resulting in an out of bounds index. This PR fixes
this.
Due to me also fixing another small bug in the UI (and adding proper
support for the breadcrumbs), I had to move quite some stuff around here
to get this to work. Namely, I made the `sub_page_stack` a field on the
`SettingsWindow` and now only store the `active_language` in a global to
ensure that we store scroll positions properly for all sub pages. For
that to work with the edit prediction provider page, I had to remove the
struct there and could just move that into a method, which was a nice
side effect there I suppose.
Release Notes:
- Fixed a crash that could occur when trying to edit edit prediction
providers in the settings UI.
The recently-introduced unified Git picker was previously only available
if you reached for the branch, worktree or stash pickers through the
keybinding. Now, if you click on the title bar's branch button, you'll
also be able to quickly view the worktree and stash pickers.
Release Notes:
- N/A
Follow up to https://github.com/zed-industries/zed/pull/40570.
This PR removes the UI treatment where we collapse a terminal command
into a disclosure component if it spans more than three lines. I
initially thought having this fancy treatment in the UI would make it
sleeker but it actually feels like a counter-productive move to
arbitrarily hide command lines; they're arguably always important to see
in full, even when they're super long. I'm happy to get some feedback
here, but I think for now, I'd feel better if users could see them all
without having to manually expand/collapse them.
Release Notes:
- N/A
Closes#41832
Extends https://github.com/zed-industries/zed/pull/19455
When an internal `.editorconfig` is detected in the worktree, we
traverse parent directories up to the filesystem root looking for
additional `.editorconfig` files. All discovered external configs are
loaded and cached (shared when multiple worktrees reference the same
parent directories). When computing settings for a file, external
configs are applied first (from furthest to closest), then internal
configs.
For local projects, file watchers are set up for each external config so
changes are applied immediately. When a project is shared via collab,
external configs are sent to guests through the existing
`UpdateWorktreeSettings` proto message (with a new `outside_worktree`
field). SSH remoting works similarly.
Limitations: We don't currently take creation of new external editor
config files into account since they are loaded once on worktree add.
Release Notes:
- Added support for `.editorconfig` files outside the project directory.
Zed now traverses parent directories to find and apply EditorConfig
settings. Use `root = true` in any `.editorconfig` to stop inheriting
settings from parent directories.
This makes sure all of the new granular permission logic and ui only
applies to the zed agent and doesn't affect the UI of external agents.
Release Notes:
- N/A
Closes#18930
### Summary
- Fix fast Macbook trackpad/mouse scrolling in terminal applications
with mouse mode enabled
### The Problem
Scrolling with a trackpad in tmux, neovim, or any terminal app that
enables mouse mode was too fast. A gentle swipe would send me through
hundreds of lines, making these apps practically unusable in Zed's
terminal.
### Root Cause
When the terminal is in mouse mode, we send escape sequences to report
scroll events to the application. The bug was in `scroll_report()`:
ca47822667/crates/terminal/src/terminal.rs (L1983-L1988)
That `max(scroll_lines, 1)` meant we'd send **at least 1 scroll event
even when `scroll_lines` was 0**.
ca47822667/crates/terminal/src/mappings/mouse.rs (L96)
On macOS, trackpad gestures fire many small pixel deltas due to scroll
acceleration. Each tiny movement triggered a scroll event, even though
we hadn't accumulated enough pixels for a full line yet. This is a known
issue alacritty/alacritty#2869 - macOS sends fractional line deltas
(like 0.1) instead of whole lines.
### The Fix
Don't send mouse reports when no full line has accumulated
This aligns with Alacritty's approach - accumulate partial scroll
amounts and only report when complete lines are ready.
6ee6e53ee3/alacritty/src/input/mod.rs (L700-L730)
### Testing
Tested trackpad scrolling in:
- tmux (pane navigation, scrollback)
- neovim (buffer scrolling)
- opencode (TUI navigation)
All scroll smoothly now.
### Demo
The demo shows the behavior of the scrolling. I can go fast or I can go
slow
https://github.com/user-attachments/assets/14bfc2f4-f286-4341-bf55-4ced894d63f9
Release Notes:
- Fixed trackpad scrolling being too fast in terminal applications with
mouse mode enabled (tmux, neovim, opencode, etc.)
When focus is on a dock panel that doesn't contain a pane (e.g., project
panel), `pane::CloseActiveItem` will now close the active item in the center
pane instead of doing nothing.
This allows users to bind, for example, `cmd-w` to `pane::CloseActiveItem`
and have it work consistently regardless of whether focus is on a dock
panel or the editor.
Closes#45261
Release Notes:
- Improved `pane::CloseActiveItem` to close center pane items even when
focus is on a dock panel like the project panel or outline panel
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
Closes#46701
This ports the fixes from #46442 over to the JavaScript highlights,
which we forgot to do in that PR since the highlights are not shareable
and the fix was only applied to TSX... Hence, porting the fixes here
manually to solve the issue for good.
Release Notes:
- Fixed an issue where JSX components were highlighted too broadly,
causing normal HTML tags to be highlighted as such
The logic in `anchor_at_offset` and `to_offset` seems inverted when
checking character boundaries. `assert_char_boundary` returns `true`
when the offset IS valid, but the code was adjusting offsets when the
function returned `true` (valid) instead of `false` (invalid).
Release Notes:
- N/A
The `capture example` action now populates the markdown file with a noop
"Rejected Patch", so that you can easily specify the good and bad
output.
Release Notes:
- N/A
<img width="779" height="210" alt="SCR-20260116-qrif"
src="https://github.com/user-attachments/assets/13c84f20-8fe1-4e3a-9de6-8df1024c2c6c"
/>
In most languages, Zed will check 2-3 locations for language servers.
For instance, when opening a python file, zed looks for ruff in:
- project venv
- user's PATH
- location that zed installs language servers
The language server menu surfaces information that makes it easier to
gather data about your language server, I think offering a path for the
one being ran makes things more clear to the user.
That being said, Idk the best way to surface this. (@danilo-leal?)
Release Notes:
- Add language server path to a tooltip that is produced when hovering
on its status in the language server menu
While at it, annotate more functions that are potentially related to
language parsing in buffers.
Also, on macOS, in order to actually have callstack frames properly
recorded by Tracy, you need to manually run `dsymutil` on the binary.
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/46953
This turned out to be a pretty deep rabbit hole, ultimately landing in
how GPUI didn't restore focus nicely when swapping window activation
states.
Release Notes:
- N/A
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>