This PR changes the loading/generating indicator when in the "waiting
for tool call confirmation" state so that's a bit more visible and
discernible as needing your attention, as opposed to a regular
generating state.
<img width="400" alt="Screenshot 2025-11-05 at 10 46@2x"
src="https://github.com/user-attachments/assets/88adbf97-20fb-49c4-9c77-b0a3a22aa14e"
/>
Release Notes:
- agent: Improved the "waiting for confirmation" state visibility so
that you more rapidly know the agent is waiting for you to act.
Mostly just removing "thread" from all external agent menu items; I
think we can do without it and it already becomes much better/cleaner.
Release Notes:
- N/A
I am using an Azure OpenAI instance since that is what is provided at
work and with how they have it setup not all responses contain a delta,
which lead to errors and truncated responses. This is related to how
they are filtering potentially offensive requests and responses. I don't
believe this filter was made in-house, instead I believe it is provided
by Microsoft/Azure, so I suspect this fix may help other users.
Release Notes:
- N/A
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This brings the documentation on Java in line with the much changed
reality of the Java extension.
Note that the correctness of this is contingent on
https://github.com/zed-industries/extensions/pull/3745 being merged.
Release Notes:
- N/A
Closes#40632
**TL;DR:** The `wrap selections in tag` action was unavailable in ERB
files, even when the cursor was positioned in HTML content (outside of
Ruby code blocks). This happened because `syntax_layer_at()` incorrectly
returned the Ruby language for positions that were actually in HTML.
**NOTE:** I am not familiar with that part of Zed so it could be that
the fix here is completely incorrect.
Previously, `syntax_layer_at` incorrectly reported injected languages
(e.g., Ruby in ERB files) even when the cursor was in the base language
content (HTML). This broke actions like `wrap selections in tag` that
depend on language-specific configuration.
The issue had two parts:
1. Missing start boundary check: The filter only checked if a layer's
end was after the cursor (`end_byte() > offset`), not if it started
before, causing layers outside the cursor position to be included. See
the `BEFORE` video: when I click on the HTML part it reports `Ruby`
language instead of `HTML`.
2. Wrong boundary reference for injections: For injected layers with
`included_sub_ranges` (like Ruby code blocks in ERB), checking the root
node boundaries returned the entire file range instead of the actual
injection ranges.
This fix:
- Adds the containment check using half-open range semantics [start,
end) for root node boundaries. That ensures proper reporting of the
detected language when a cursor (`|`) is located right after the
injection:
```
<body>
<%= yield %>|
</body>
```
- Checks `included_sub_ranges` for injected layers to determine if the
cursor is actually within an injection
- Falls back to root node boundaries for base layers without sub-ranges.
This is the original behavior.
Fixes ERB language support where actions should be available based on
the cursor's actual language context. I think that also applies to some
other template languages like HEEX (Phoenix) and `*.pug`. On short
videos below you can see how I navigate through the ERB template and the
terminal on the right outputs the detected language if you apply the
following patch:
```diff
diff --git i/crates/editor/src/editor.rs w/crates/editor/src/editor.rs
index 15af61f5d2..54a8e0ae37 100644
--- i/crates/editor/src/editor.rs
+++ w/crates/editor/src/editor.rs
@@ -10671,6 +10671,7 @@ impl Editor {
for selection in self.selections.disjoint_anchors_arc().iter() {
if snapshot
.language_at(selection.start)
+ .inspect(|language| println!("Detected language: {:?}", language))
.and_then(|lang| lang.config().wrap_characters.as_ref())
.is_some()
{
```
**Before:**
https://github.com/user-attachments/assets/3f8358f4-d343-462e-b6b1-3f1f2e8c533d
**After:**
https://github.com/user-attachments/assets/c1b9f065-1b44-45a2-8a24-76b7d812130d
Here is the ERB template:
```
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
/* Email styles need to be inline */
</style>
</head>
<body>
<%= yield %>
</body>
</html>
```
Release Notes:
- N/A
Hi, this is a follow-up change for
https://github.com/zed-industries/zed/pull/41754 I think it important to
keep existing things working. So add notes to the Ruby extension doc
about enabling Ruby LSP for ERB files as well. Thanks!
Release Notes:
- N/A
Works around an issue, which can be reproduced in the following program:
```rs
use windows::Win32::UI::Input::KeyboardAndMouse::{GetKeyboardState, VK_CONTROL};
fn main() {
let mut keyboard_state = [0u8; 256];
unsafe {
GetKeyboardState(&mut keyboard_state).unwrap();
}
let ctrl_down = (keyboard_state[VK_CONTROL.0 as usize] & 0x80) != 0;
println!("Is Ctrl down: {ctrl_down}");
}
```
In debug mode, this program prints the correct answer. In release mode,
it always prints false. The optimizer appears to think that
`keyboard_state` isn't mutated and remains zeroed, and folds the
`modifier_down` comparisons to `false`.
Release Notes:
- N/A
As discussed with @benbrandt and @mikayla-maki:
* We now tell ACP clients we support the nonstandard `terminal-auth`
`_meta` field for terminal-based authentication
* In the future, we anticipate ACP itself supporting *some* form of
terminal-based authentication, but that hasn't been designed yet or gone
through the RFD process
* For now, this unblocks terminal-based auth
Release Notes:
- Added experimental terminal-based authentication to ACP support
This has been possible in the inline assistant for ages now and maybe
you didn't know because we didn't say anything about it! This PR fixes
that by including that you can @-mention context on it the same you can
in the agent panel.
Release Notes:
- N/A
Closes #ISSUE
More accurately map localhost to `127.0.0.1`. Previously we would
lowercase and simply replace all instances of localhost inside of the
URL string, meaning query parameters, username, password etc. could not
contain the string `localhost` or contain uppercase letters without
getting modified. Added a test ensuring the mapping logic works. The
previous implementation would fail this new test.
Release Notes:
- Improved the behavior of mapping `localhost` to `127.0.0.1` when
passing configured proxy urls to `node`
### Summary
This PR changes `gpui/build.rs` to look up the Windows SDK directory in
the registry instead of falling back to a hard-coded path.
---
### Problem
Currently, building `gpui` on Windows requires `fxc.exe` to be in `PATH`
or at a predefined location (unless `GPUI_FXC_PATH` is set). This
requires to maintain a certain build environment with proper paths/vars
or to install the specific SDK version.
It is possible to find the SDK automatically using the registry keys it
creates upon installation. Specifically in
`SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0`
branch there are:
* `InstallationFolder` telling the SDK installation location;
* `ProductVersion` telling the SDK version in use.
These keys provide enough information to locate the SDK binaries, with
added robustness:
* handles non-standard SDK installation path;
* deterministically selects the latest SDK when multiple versions are
present.
---
### Changes Made
* **Updated `crates/gpui/build.rs`**:
* added dependency on `winreg`
* introduced `find_latest_windows_sdk_binary()` helper
* updated fallback logic to use registry lookup
This PR only changes the fallback location, and does not touch the
established environment-based workflow.
Release Notes:
- N/A
---
### Impact
Reduces manual configuration needed to build GPUI on Windows.
---------
Co-authored-by: John Tur <john-tur@outlook.com>
Closes#41457#41806#41801
Copilot started using `node:sqlite` module which is an experimental
feature between node v22-v23 (stable in v24). The fix was passing in the
experimental flag when Zed starts the copilot LSP.
I tested this with v20.19.5 and v24.11.0. The fix got v20.19 working and
didn't affect v24.11 which was already working.
Release Notes:
- AI: Fix Github Copilot edit predictions failing to start
Closes#41774
Release Notes:
- settings_ui: Fixed an integer underflow panic when attempting to hit
the `-` sign on settings item that take delays in milliseconds
`ICustomDestinationList::AppendCategory` rejects an empty `IObjectArray`
and returns an `E_INVALIDARG` error. Error propagated and caused an
early-return from `update_jump_list()`.
<img width="1628" height="540" alt="image"
src="https://github.com/user-attachments/assets/f8143297-c71e-42a1-a505-66cd77dfa599"
/>
Release Notes:
- N/A
- lsp: Fix dynamic registration of diagnostic capabilities not taking
effect when an initial capability is not specified
Gist of the issue lies within use of .get_mut instead of .entry. If we
had not created any dynamic capability beforehand, we'd miss a
registration, essentially
- **Determine whether to update remote caps in a smarter manner**
Release Notes:
- Fixed document diagnostics with Ty language server.
Closes#41533
Both of the issues in the release notes that are fixed in this PR, were
caused by incorrect usage of the `window.use_state` API.
The first issue was caused by calling `window.use_state` in a render
helper, resulting in the element ID used to share state being the same
across different pages, resulting in the state being re-used when it
should have been re-created. The fix for this was to move the
`window.state` (and rendering logic) into a `impl RenderOnce` component,
so that the IDs are resolved during the render, avoiding the state
conflicts.
The second issue is caused by using a `move` closure in the
`window.use_state` call, resulting in stale closure values when the
window state is re-used.
Release Notes:
- settings_ui: Fixed an issue where some dropdown menus would show
options from a different dropdown when clicked
- settings_ui: Fixed an issue where attempting to change a setting in a
dropdown back to it's original value after changing it would do nothing
This PR implements the `zeta-cli eval` command. It will:
- Run the edit prediction model if there are no cached results
- Compute precision/recall/F1 for context retrieval at the line level:
every retrieved line of context is counted as a true positive (correct
retrieval), false positive (retrieved something that was not expected),
or false negative (didn't retrieve an expected line)
- Compute similar metrics for edit predictions
- Pretty-print results, highlighting the difference between actual and
expected when printing to tty
Other changes:
- `zeta-cli predict` accepts a `--format` argument with options `md`,
`json`, `diff`
- Code restructure
Release Notes:
- N/A
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
- Adds a new action `git::PullRebase` which adds `--rebase` in the final
command invoked by existing Git-Pull implementation.
- Includes the new action in "Fetch/Push" button in the Git Panel
(screenshot below)
- Adds key-binding for `git::PullRebase` in all three platforms,
following the existing key-binding patterns (`ctrl-g shift-down`)
- Update git docs to include the new action.
Sidenote: This is my first ever OSS contribution
Screenshot:
<img width="234" height="215" alt="image"
src="https://github.com/user-attachments/assets/713d068f-5ea5-444f-8d66-444ca65affc8"
/>
---
Release Notes:
- Git: Added `git: pull rebase` for running `git pull --rebase`.
If I understand this correctly: The `active_repo_id` uses
`get_or_insert_with`, which makes it dependent on the `RepositoryAdded`
event sequence. To ensure correct initialization of the `active_repo_id`
on the remote side, the first local `RepositoryAdded` event must
synchronously send an `UpdateRepository` to `updates_tx`.
Closes#30694
Release Notes:
- Fixed incorrect default repository selection when using remote
Update the `editor::Editor.handle_modifiers_changed` method to ensure
that the `editor::Editor.update_edit_prediction_preview` method is
called even if edit prediction preview is disabled, if there's an active
edit prediction preview.
Without this change it was possible for users to get into a state where
holding the modifiers to show the prediction were part of the modifiers
used to disable edit prediction. When that keybinding was used, edit
prediction would be disabled, but the edit prediction preview would
remain as active, so the context menu for the editor would never be
shown again, as the editor would assume it was still showing the edit
prediction preview.
Closes#40056
Release Notes:
- Fixed a bug that could cause the completions menu to stop being show
when edit predictions were disabled
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
## Add relative line numbers on wrapped lines, take 2
This is a rework of https://github.com/zed-industries/zed/pull/39268
that excludes
e7096d27a6.
This commit introduced some line number rendering issues as described in
https://github.com/zed-industries/zed/issues/41422.
While @ConradIrwin suggested we try to pass in the buffer rows from the
calling method instead of the snapshot, that
appears to have had unintended consequences and I don't think the two
calculations were intended to do the same thing. Hence, this PR has
removed those changes.
This PR also includes the migration fix originally done by @MrSubidubi
in https://github.com/zed-industries/zed/pull/41351.
## Original PR description and release notes.
**Problem:** Current relative line numbering creates a mismatch with
vim-style navigation when soft wrap is enabled. Users must mentally
calculate whether target lines are wrapped segments or logical lines,
making `<n>j/k` navigation unreliable and cognitively demanding.
**How things work today:**
- Real line navigation (`j/k` moves by logical lines): Requires
determining if visible lines are wrapped segments before jumping. Can't
jump to wrapped lines directly.
- Display line navigation (`j/k` moves by display rows): Line numbers
don't correspond to actual row distances for multi-line jumps.
**Proposed solution:** Count and number each display line (including
wrapped segments) for relative numbering. This creates direct
visual-to-navigational correspondence, where the relative number shown
always matches the `<n>j/k` distance needed.
**Benefits:**
- Eliminates mental overhead of distinguishing wrapped vs. logical lines
- Makes relative line numbers consistently actionable regardless of wrap
state
- Preserves intuitive "what you see is what you navigate" principle
- Maintains vim workflow efficiency in narrow window scenarios
Also explained and discussed in
https://github.com/zed-industries/zed/discussions/25733.
Release Notes:
- Added support for counting wrapped lines as relative lines and for
displaying line numbers for wrapped segments. Changes
`relative_line_numbers` from a boolean to an enum: `enabled`,
`disabled`, or `wrapped`.
This PR adds the ability to configure which files are considered
"hidden" in the project panel and toggle their visibility with a
keyboard shortcut. Previously, the editor hardcoded dotfiles as hidden -
now users can customize the pattern and quickly show/hide them.
### Release Notes
- Added `project_panel::ToggleHideHidden` action with keyboard shortcuts
to toggle visibility of hidden files
- Added configurable `hidden_files` setting to customize which files are
marked as hidden (defaults to `**/.*` for dotfiles)
### Motivation
This change allows users to:
1. Quickly toggle hidden file visibility with a keyboard shortcut
2. Customize which files are considered "hidden" beyond just dotfiles
3. Better organize their project panel by hiding build artifacts, logs,
or other generated files
### Usage
**Toggle hidden files:**
- **macOS:** `cmd-alt-.`
- **Linux:** `ctrl-alt-.`
- **Windows:** `ctrl-alt-.`
**Customize patterns in settings:**
```json
{
"hidden_files": ["**/.*", "**/*.tmp", "**/build/**"]
}
```
### Changes
**Core Implementation:**
- Added `hidden_files` setting (defaults to `**/.*` to match current
dotfile behavior)
- Replaced hardcoded `name.starts_with('.')` logic with configurable
pattern matching using `PathMatcher`
- Hidden status propagates through directory hierarchies (if a directory
is hidden, all children inherit that status)
**User-Facing:**
- Added `ToggleHideHidden` action in the project panel
- Added keyboard shortcuts for all platforms
- Added settings UI entry for configuring `hidden_files` patterns
**Testing:**
- Added comprehensive test coverage validating default behavior, custom
patterns, propagation, and settings changes
### Implementation Notes
- Uses `PathMatcher` for efficient glob matching
- Settings changes automatically trigger worktree re-indexing
- No breaking changes - defaults maintain current behavior (hiding
dotfiles)
---
**Disclaimer:** This was implemented with a fair amount of copy/paste
(particularly the gitignore handling), trial and error, and a healthy
dose of Claude.
### Screenshots
**Project Panel with hidden files visible:**
<img width="1368" height="935" alt="Screenshot 2025-10-30 at 3 15 53 AM"
src="https://github.com/user-attachments/assets/1cbe90ce-504c-4f9b-bca8-bef02ab961be"
/>
**Project Panel with hidden files hidden:**
<img width="1363" height="917" alt="Screenshot 2025-10-30 at 3 16 07 AM"
src="https://github.com/user-attachments/assets/9297f43e-98c7-4b19-be8f-3934589d6451"
/>
**Toggle action in command palette:**
<img width="565" height="161" alt="Screenshot 2025-10-30 at 3 17 26 AM"
src="https://github.com/user-attachments/assets/4dc9e7b6-9c29-4972-b886-88d8018905da"
/>
Release Notes:
- Added the ability to configure glob patterns for files treated as
hidden in the project panel using the `hidden_files` setting.
- Added an action `project panel: toggle hidden files` to quickly show
or hide hidden files in the project panel.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Closes#39037
Previously, the code split the `**/.env` glob in `file_scan_inclusions`
into two sources for the `PathMatcher`: `["**", "**/.env"]`. This
approach works for directories, but including `**` will match all
directories and their files. To address this, I now select the
appropriate `PathMatcher` using only `**/.env` when specifically
targeting a file to determine whether to include it in the file finder.
Release Notes:
- Fixed: respect `.gitignore` and `file_scan_inclusions` settings with
`**` in glob for file finder
---------
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
- Update `vim::object::find_mini_delimiters` in order to filter out the
ranges before calling `vim::object::cover_or_next`, ensuring that the
provided ranges are converted from multibuffer space into buffer
space.
- Remove the `range_filter` from `vim::object::cover_or_next` was the
`find_mini_delimiters` function is the only caller and no longer uses
it
Closes#41346
Release Notes:
- Fixed a crash that could occur when using `vim::MiniQuotes` and
`vim::MiniBrackets` in a multibuffer
Prior to this change we would always resolve envs when spawning a new
terminal window based on the inherited CLI environment. This works fine
as long as we open a new Zed instance in the terminal when using it
locally only. When using Zed connected to a remote server, it would not
be meaningful however. WIth this change, we correctly ping the remote
for the project-local envs and use that instead. This change should also
fix a pesky issue when updating Zed - after Zed restarts, opening a new
terminal window will not run `direnv` for example.
Release Notes:
- N/A
Related discussions #26084
Worktree creations are implemented similar to how branch creations are
handled on the branch picker (the user types a new name that's not on
the list and a new entry option appears to create a new branch with that
name).
https://github.com/user-attachments/assets/39e58983-740c-4a91-be88-57ef95aed85b
With this picker you have a few workflows:
- Open the picker and type the name of a branch that's checked out on an
existing worktree:
- Press enter to open the worktree on a new window
- Press ctrl-enter to open the worktree and replace the current window
- Open the picker and type the name of a new branch or an existing one
that's not checked out in another worktree:
- Press enter to create the worktree and open in a new window. If the
branch doesn't exists, we will create a new one based on the branch you
have currently checked out. If the branch does exists then we create a
worktree with that branch checked out.
- Press ctrl-enter to do everything on the previous point but instead,
replace the current window with the new worktre.
- Open the picker and type the name of a new branch or an existing one
that's not checked out in another worktree:
- If a default branch is detected on the repo, you can create a new
worktree based on that branch by pressing ctrl-enter or
ctrl-shift-enter. The first one will open a new window and the last one
will replace the current one.
Note: If you preffer to not use the system prompt for choosing a
directory, you can set `"use_system_path_prompts": false` in zed
settings.
Release Notes:
- Added git worktree picker to open a git worktree on a new window or
replace the current one
- Added git worktree creation action
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Making the profile management modal accessible through the agent panel
additional options menu as well. And in the process, adjusting the menu
keybinding that was getting conflicted with something else.
Release Notes:
- N/A
This PR makes the agent panel's configuration view use the icon from an
external agent that comes directly from the extension, as well as some
other clean ups.
Release Notes:
- N/A
We see `test_extension_store_with_test_extension` hang in untarring the
WASI SDK some times.
In lieu of trying to debug the problem, let's try shelling out for now
in the hope that the test becomes more reliable.
There's a bit of risk here because we're using async-tar for other
things (but probably not 300Mb tar files...)
Assisted-By: Zed AI
Closes #ISSUE
Release Notes:
- N/A
This PR adds a `zeta zeta2 predict` subcommand that takes an edit
prediction example markdown file as an argument, and performs zeta2's
prediction, showing the retrieved context and the predicted edit.
* [x] Apply uncommitted diff to get repo into the right state.
* [x] Apply edits in edit history
* [x] Display predicted edits as unified diff, regardless of model
output format
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
A user on Discord requested this feature:
https://discord.com/channels/869392257814519848/1434188637389717556/1434188637389717556
I added a scrollbar setting called `completion_menu_scrollbar` to the
completion menu and defaulted it to "Never" to match past behavior.
Release Notes:
- editor: Add `editor.completion_menu_scrollbar` setting to show a
scrollbar in the completion menu
Closes #ISSUE: reported on X by user.
Release Notes:
- Made it so that the default value for the "remove trailing whitespace
on save" setting in Markdown is false, to fix cases where the removed
trailing whitespace had syntactic meaning
Noticed this whilst testing the Docker debugger. I randomly scrolled the
console off screen and was confused briefly as to why this was the case.
Release Notes:
- The debugger query console will no longer needlessly overscroll.
One of the reasons we didn't spot that we were missing the telemetry env
vars for the production builds was that nightly (which was working) had
its own set of build steps. This re-uses those and pushes the env vars
down from the workflow to the job.
It also fixes nightly releases to upload all-in-one go so that all
platforms update in sync.
Closes#41655
Release Notes:
- N/A
The button could not be clicked whenever the editor was currently not
focused. This PR fixes this and also registers the action on a more
global level, similar to how this is done for all the other agent
actions.
Release Notes:
- Fixed an issue where the `Expand message editor` button would not work
in agent threads if the message editor was not focused.
The Ruby extension uses the `solargraph`
language server by default for Ruby files.
However, when a user opens any ERB file,
the extension automatically starts the Ruby LSP.
This affects developers because
they do not expect the Ruby LSP to be running.
Closes https://github.com/zed-extensions/ruby/issues/172
Release Notes:
- N/A
Escape special characters (&, <, >, ", ') in the title attribute of
TextThreadContext's XML output to prevent malformed XML when titles
contain these characters.
Resolves TODO at context.rs:629
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Closes https://github.com/zed-extensions/java/issues/108
Previously, when language servers dynamically register completion
capabilities with trigger characters for completions (hello JDTLS), this
would not get updated in buffers for that language server that were
already open. This change is to find open buffers for the language
server and update the trigger characters in each of them when the new
capability is being registered.
Release Notes:
- N/A
Prior we were only updating the diagnostics pane when it is either
unfocued, saved or when a disk based diagnostic run finishes (aka cargo
check). The reason for this is simple, we do not want to take away the
excerpt under the users cursor while they are typing if they manage to
fix the diagnostic. Additionally we need to prevent dropping the changed
buffer before it is saved.
Delaying updates was a simple way to work around these kind of issues,
but comes at a huge annoyance that the diagnostics pane is not actually
reflecting the current state of the world but some snapshot of it
instead making it less than ideal to work within it for languages that
do not leverage disk based diagnostics (that is not rust-analyzer, and
even for rust-analyzer its annoying).
This PR changes this. We now always live update the view but take care
to retain unsaved buffers as well as buffers that contain a cursor in
them (as well as some other "checkpoint" properties).
Release Notes:
- Improved diagnostics pane to live update when editing within its
editor
Closes#41593
From what I understand the order of captures inside tree-sitter query
files matters, and the last capture will win. `?` and `:` are captured
by both `@operator` and `@punctuation.delimiter`.So in order for the
ternary operator to win it should live after `@punctuation.delimiter`.
Before:
<img width="298" height="32" alt="Screenshot 2025-10-31 at 17 41 21"
src="https://github.com/user-attachments/assets/af376e52-88be-4f62-9e2b-a106731f8145"
/>
After:
<img width="303" height="39" alt="Screenshot 2025-10-31 at 17 41 33"
src="https://github.com/user-attachments/assets/9a754ae9-0521-4c70-9adb-90a562404ce8"
/>
Release Notes:
- Fixed an issue where the ternary operator symbols in TypeScript would
not be highlighted as operators.
Sometimes, inside the edit agent, Sonnet thinks that it's doing a tool
call and closes its response with `</parameter></invoke>` instead of
properly closing </new_text>.
A better but more labor-intensive way of fixing this would be switching
to streaming tool calls for LLMs that support it.
Closes#39921
Release Notes:
- Fixed Sonnet's regression with inserting `</parameter></invoke>`
sometimes
This PR makes it clearer that you can click on the file path to open the
corresponding file in the agent panel's "edit bar", which is the element
that shows up in the panel as soon as agent-made edits happen.
Release Notes:
- agent panel: Improved the "go to file" affordance in the edit bar.
When we introduced the ACP-based agent panel, the condition that the
"review" | "reject" | "keep" buttons observed to be displayed got
mismatched between the panel and the pane (when in the single file
review scenario). In the panel, the buttons appear as soon as there are
changed buffers, whereas in the pane, they appear when response
generation is done.
I believe that making them appear at the same time, observing the same
condition, is the desired behavior. Thus, I think the panel behavior is
more correct, because there are loads of times where agent response
generation isn't technically done (e.g., when there's a command waiting
for permission to be run) but the _file edit_ has already been performed
and is in a good state to be already accepted or rejected.
So, this is what this PR is doing; effectively removing the "generating"
state from the agent diff, and switching to `EditorState::Reviewing`
when there are changed buffers.
Release Notes:
- Improved agent edit single file reviews by making the "reject" and
"accept" buttons appear at the same time.
Some housekeeping updates:
- Update hardcoded actions/keybindings so they're pulled from the repo
- Mention settings window when useful
- Add more info about agent panel's font size
- Break sentences in individual lines
Release Notes:
- N/A
These have been migrated to the README.md
[here](https://github.com/zed-industries/release_notes). These don't
need to be public. Putting them in the same repo where we draft
(`release_notes`) means less jumping around and allows us to include
additional information we might not want to make public.
Release Notes:
- N/A
Fixes the Debugpy toolchain detection bug in #40324
When detecting what toolchain (venv) to use in the Debugpy configuration
stage, we used to only base it off of the current working directory
argument passed to the config. This is wrong behavior for cases like
mono repos, where the correct virtual environment to use is nested in
another folder.
This PR fixes this issue by adding the program and module fields as
fallbacks to check for virtual environments. We also added support for
program/module relative paths as well when cwd is not None.
Release Notes:
- debugger: Improve mono repo virtual environment detection with Debugpy
---------
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Adds a `convert-example` subcommand to the zeta cli that converts eval
examples from/to `json`, `toml`, and `md` formats.
Release Notes:
- N/A
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Release Notes:
- N/A
---
Previously, agent markdown rendering used hardcoded font sizes
(TextSize::Default and TextSize::Small) which ignored the
agent_ui_font_size and agent_buffer_font_size settings. This updates the
markdown style to respect these settings.
This pull request adds support for customizing the font size of code
blocks in agent responses, making it possible to set a distinct font
size for code within the agent panel. The changes ensure that if the new
setting is not specified, the font size will fall back to the agent UI
font size, maintaining consistent appearance.
(I am a frontend developer without any Rust knowledge so this is
co-authored with Claude Code)
**Theme settings extension:**
* Added a new `agent_buffer_code_font_size` setting to
`ThemeSettingsContent`, `ThemeSettings`, and the default settings JSON,
allowing users to specify the font size for code blocks in agent
responses.
[[1]](diffhunk://#diff-a3bba02a485aba48e8e9a9d85485332378aa4fe29a0c50d11ae801ecfa0a56a4R69-R72)
[[2]](diffhunk://#diff-aed3a9217587d27844c57ac8aff4a749f1fb1fc5d54926ef5065bf85f8fd633aR118-R119)
[[3]](diffhunk://#diff-42e01d7aacb60673842554e30970b4ddbbaee7a2ec2c6f2be1c0b08b0dd89631R82-R83)
* Updated the VSCode import logic to recognize and import the new
`agent_buffer_code_font_size` setting.
**Font size application in agent UI:**
* Modified the agent UI rendering logic in `thread_view.rs` to use the
new `agent_buffer_code_font_size` for code blocks, and to fall back to
the agent UI font size if unset.
[[1]](diffhunk://#diff-f73942e8d4f8c4d4d173d57d7c58bb653c4bb6ae7079533ee501750cdca27d98L5584-R5584)
[[2]](diffhunk://#diff-f73942e8d4f8c4d4d173d57d7c58bb653c4bb6ae7079533ee501750cdca27d98L5596-R5598)
* Implemented a helper method in `ThemeSettings` to retrieve the code
block font size, with fallback logic to ensure a value is always used.
* Updated the settings application logic to propagate the new code block
font size setting throughout the theme system.
### Example Screenshots


---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Currently Zed only displays agent notifications (e.g. when the agent
completes a task) if the user has switched apps and Zed is not in the
foreground. This adds PR supports the scenario where the agent finishes
a long-running task and the user is busy coding within Zed on something
else.
Releases Note:
- If agent notifications are turned on, they will now also be displayed
when the agent panel is hidden, in complement to them showing when the
Zed window is in the background.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Closes#41458
Dynamically position mode selector tooltip to prevent clipping.
Position tooltip on the right when panel is docked left, otherwise on
the left. This ensures the tooltip remains visible regardless of panel
position.
**Note:** The tooltip currently vertically aligns with the bottom of the
menu rather than individual items. Would be great if it can be aligned
with the option it explains. But this doesn't seem trivial to me to
implement and not sure if it's important enough atm?
Before:
<img width="431" height="248" alt="Screenshot 2025-10-30 at 22 21 09"
src="https://github.com/user-attachments/assets/073f5440-b1bf-420b-b12f-558928b627f1"
/>
After:
<img width="632" height="158" alt="Screenshot 2025-10-30 at 17 26 52"
src="https://github.com/user-attachments/assets/e999e390-bf23-435e-9df0-3126dbc14ecb"
/>
<img width="685" height="175" alt="Screenshot 2025-10-30 at 17 27 15"
src="https://github.com/user-attachments/assets/84efca94-7920-474b-bcf8-062c7b59a812"
/>
Release Notes:
- Improved the agent panel's mode selector by preventing it to go
off-screen in case the panel is docked to the left.
Currently, if a commit operation takes some time, there's no visual
feedback in the UI that anything's happening.
This PR changes the colour of the text on the button to the
`Color::Disabled` colour when a commit operation is pending.
Release Notes:
- Improved UI feedback when a commit is in progress
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Closes#38345, #34882, #33280
Debugpy has four distinct configuration scenarios, which are:
1. launch
2. attach with process id
3. attach with listen
4. attach with connect
Spawning Debugpy directly works with the first three scenarios but not
with "attach with connect". Which requires host/port arguments being
passed in both with an attach request and when starting up Debugpy. This
PR passes in the right arguments when spawning Debugpy in an attach with
connect scenario, thus fixing the bug.
The VsCode extension comment that explains this:
98f5b93ee4/src/extension/debugger/adapter/factory.ts (L43-L51)
Release Notes:
- debugger: Fix Python attach-based sessions not working with `connect`
or `port` arguments
Currently, this only applies to long-running individually selected
unstaged files in the git panel. Next up I would like to make this work
for `Stage All`/`Unstage All` however this will most likely require
pushing `PendingOperation` into `GitStore` (from the `GitPanel`).
Release Notes:
- N/A
We missed making extensions that provide agent servers fill the
`provides` field with `agent-servers`, and thus, filtering for this type
of extension in both the app and site wouldn't return anything.
Release Notes:
- N/A
Just tidying it up by removing the unnecessary eye icon buttons in all
list items and adding that action in the form of a button in the footer,
closer to all other actions. Also reordering the footer buttons so that
the likely most common action is in the far right.
Release Notes:
- N/A
Given agent servers will soon be a thing, I'm adding Claude Code, Gemini
CLI, and Codex CLI as included agents in case anyone comes first to
search them as extensions before looking up on the agent panel.
Release Notes:
- N/A
Closes#17524
This PR adds a button to the bottom right corner of the ollama settings
ui. It resets the available ollama models, also resets the "Connected"
state in the process. This means it can be used to check if the
connection is still valid as well. It's a question whether we should
clear the available models on ALL `fetch_models` calls, since these only
happen during auth anyway.
Ollama is a local model provider which means clicking the refresh button
often only flashes the "not connected" state because the latency of the
request is so low. This accentuates changes in the UI, however I don't
think there's a way around this without adding some rather cumbersome
deferred ui updates.
I've attached the refresh button to the "Connected" `ButtonLike`, since
I don't think automatic UI spacing should separate these elements. I
think this is okay because the "Connected" isn't actually something that
the user can interact with.
Before:
<img width="211" height="245" alt="image"
src="https://github.com/user-attachments/assets/ea90e24a-b603-4ee2-9212-2917e1695774"
/>
After:
<img width="211" height="250" alt="image"
src="https://github.com/user-attachments/assets/be9af950-86a2-4067-87a0-52034a80a823"
/>
Alternative approach: There was also a suggestion to simply add a entry
to the command palette, however none of the other providers have this
ability currently either so I went with this approach. The current
approach also makes it more discoverable to the user.
Release Notes:
- Added a button for refreshing available ollama models
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Closes#41478
Release Notes:
- Fixed#41478
<img width="459" height="916" alt="Screenshot 2025-10-29 at 1 31 26 PM"
src="https://github.com/user-attachments/assets/1d5b9fdf-9800-44e4-bdd5-f0964f93625f"
/>
> caused by using haiku 4.5 from the anthropic provider and then
swapping to sonnet 3.7 through zed, doing this does mess with prompt
caching but a model swap already invalidates that so it shouldn't have
any cost impact on end users
Update the behavior of the `zed_actions::agent::AddSelectionToThread`
action so that, after the selecitons are added to the current thread,
the editor automatically scrolls to the cursor's position, fixing an
issue where the inserted selection's UI component could wrap the cursor
to the next line below, leaving it outside the viewable area.
Closes#39694
Release Notes:
- Improved the `agent: add selection to thread` action so as to
automatically scroll to the cursor's position after selections are
inserted
Update `Vim::activate` to ensure that the `Vim.focused` method is only
called if the associated editor is also focused.
This ensures that the `VimEvent::Focused` event is only emitted when the
editor is actually focused, preventing a bug where, after starting Zed,
Vim's mode indicator would show that the mode was `Insert` even though
it was in `Normal` mode in the main editor.
Closes#41353
Release Notes:
- Fixed vim's mode being shown as `Inserted` right after opening Zed
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
When rerunning a task, our process id fetching seems to sometimes return
the previous terminal's process id when respawning the task, causing us
to kill the new terminal once the previous one drops as we spawn a new
one, then drop the old one. This results in rerun sometimes spawning a
blank task as the terminal immediately exits. The fix here is simple, we
actually want to kill the process running inside the terminal process,
not the terminal process itself when we exit in the terminal.
No relnotes as this was introduced yesterday in
https://github.com/zed-industries/zed/pull/41562
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes#41125
Release Notes:
- Fixed `SwitchToHelixNormalMode` to keep selection
- Added default keybinds for `SwitchToHelixNormalMode` when in Helix
mode
- Update `vim::normal::Vim.normal_replace` to work with more than one
character
- Add `vim::replace::Vim.paste_replace` to handle pasting the
clipboard's contents while in replace mode
- Update vim's handling of the `editor::actions::Paste` action so that
the `paste_replace` method is called when vim is in replace mode,
otherwise it'll just call the regular `editor::Editor.paste` method
Closes#41378
Release Notes:
- Improved pasting while in Vim's Replace mode, ensuring that the Zed
replaces the same number of characters as the length of the contents
being pasted
This PR fixes breakpoint icon alignment to also be at the end of a
rendered entry and enables editing breakpoint qualities when there's no
active session.
The alignment issue was caused by some icons being invisible, so the
layout phase always accounted for the space they would take up. Only
laying out the icons when they are visible fixed the issue.
#### Before
<img width="1014" height="316" alt="image"
src="https://github.com/user-attachments/assets/9a9ced06-e219-4d9d-8793-6bdfdaca48e8"
/>
#### After
[
<img width="502" height="167" alt="Screenshot 2025-10-30 at 3 21 17 PM"
src="https://github.com/user-attachments/assets/23744868-e354-461c-a940-9b6812e1bcf4"
/>
](url)
Release Notes:
- Breakpoint list: Allow adding conditions, logs, and hit conditions to
breakpoints when there's no active session
Closes#40360
This PR added heuristics to determine what variable/breakpoint list
entry has the longest width when rendered. I added this in so the
uniform list would correctly determine which item has the longest width
and use that to calculate the scrollbar size.
The heuristic can be off if a non-mono space font is used in the UI; in
most cases, it's more than accurate enough though.
Release Notes:
- debugger: Add horizontal scroll bars to variable list, memory view,
and breakpoint list
---------
Co-authored-by: MrSubidubi <dev@bahn.sh>
When doing a project wide search in zed on windows for `hang`, zed
starts to freeze for a couple seconds ultimately starting to error with
`Not enough quota is available to process this command.` when
dispatching windows messages. The cause for this is that we simply
overload the windows message pump due to the sheer amount of foreground
tasks we spawn when we populate the project search.
This PR is an attempt at reducing this.
Release Notes:
- Reduced hangs and stutters in large project file searches
This ensures the thread summary is treated as a tracked mention with
accessible context.
Changes:
- Fixed `MessageEditor::insert_thread_summary()` to use proper mention
URI format
- Added test coverage to verify the fix
Release Notes:
- Fixed an issue where "New From Summary" was not properly inserting
thread summaries as contextual mentions when creating new threads.
Thread summaries are now inserted as proper mention URIs.
Attempt 2 for https://github.com/zed-industries/zed/pull/40774
We were spawning the process on the foreground thread before which can
block an arbitrary amount of time. Likewise we no longer block
deserialization on the terminal loading.
Release Notes:
- Improved startup time on systems with slow process spawning
capabilities
Adds an action to open the notes for the currently selected channel in
the collab panel, which is mapped to `alt-enter` in all platforms.
Release Notes:
- collab: Add `collab_panel::OpenSelectedChannelNotes` action
(`alt-enter` by default)
Add default keybinding for `pane::SplitRight` in the `Terminal` context
for all platforms.
Closes #ISSUE
Release Notes:
- Added VS Code's terminal split keybindings (`cmd` on MacOS,
`ctrl-shift-5` on Windows and Linux)
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
I just pulled and ran a local build via `script/bundle-mac -l -i` but
found that the resulting bundle wasn't installed as expected. (me:
"ToggleAllDocks!! Wait! Where is it?!") Looking into, it looks like the
`-l` flag was removed in #41392, leaving the `$local_only` var orphaned,
which then left the `-i/$local_install` flag unreachable. I suspect that
this was unintentional, so this PR re-adds the `-l/$local_only` flag to
`script/bundle-mac`.
I ran the build again and confirmed that local install seemed to work as
expected. (ie "ToggleAllDocks!! 🎉")
While here, I also removed the last reference to `$local_arch`, because
all other references to that were removed in #41392.
/cc @osiewicz
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
We'll now perform all searches from the context model concurrently, and
combine queries for the same glob into one reducing the total number of
project searches.
For better readability, the debug context view now displays each
top-level regex alternation individually, grouped by its corresponding
glob:
<img width="1592" height="672" alt="CleanShot 2025-10-29 at 19 56 03@2x"
src="https://github.com/user-attachments/assets/f6e8408e-09d6-4e27-ba11-a739a772aa12"
/>
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/39104
This fixes an issue where the preview would not work for remote buffers
in the process.
Release Notes:
- Fixed an issue where the SVG preview would not work in remote
scenarios.
- The SVG preview will now rerender on every keypress instead of only on
saves.
Closes#41180
When using the fallback prompt renderer (default on Wayland), clicks
would bleed through into underlying windows. When the click happens to
hit a button that creates a prompt, it drops the
`RenderablePromptHandle` which is contained within `Window`, causing the
`Receiver` which returns the index of the clicked `PromptButton` to
return `Err(Canceled)` even though a button was pressed.
This bug appears in the GPUI `window.rs` example, which can be ran using
`cargo run -p gpui --example window`. MacOS has a native
`PromptRenderer` and thus needs additional code to be adjusted to be
able to reproduce the issue.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Release Notes:
- settings_ui: Added the ability to copy a link to a given setting,
allowing users to quickly open the settings window at the correct
location in a faster way.
---------
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Added a "Clear Messages" button to the ACP logs toolbar that removes all
messages.
## Motivation
When debugging ACP protocol implementations, the message list can become
cluttered with old messages. This feature allows clearing all messages
with a single click to start fresh, making it easier to focus on new
interactions without closing and reopening the ACP logs view.
Release Notes:
- N/A
This reintroduces `layer_shell` support after #32651 was reverted. On
top of that, it allows setting options for the created surface,
restricts the enum variant to the `wayland` feature, and adds an example
that renders a clock widget using the protocol.
I've renamed the `WindowKind` variant to `LayerShell` from `Overlay`,
since the protocol can also be used to render wallpapers and such, which
doesn't really fit with the word.
Things I'm still unsure of:
- We need to get the layer options types to the user somehow, but
nothing from the `platform::linux` crate was exported, I'm assuming
intentionally. I've kept the types inside the module (instead of doing
`pub use layer_shell::*` to not pollute the global namespace with
generic words like `Anchor` or `Layer` Let me know if you want to do
this differently.
- I've added the options to the `WindowKind` variant. That's the only
clean way I see to supply them when the window is created. This makes
the kind no longer implement `Copy`.
- The options don't have setter methods yet and can only be defined on
window creation. We'd have to make fallible functions for setting them,
which only work if the underlying surface is a `layer_shell` surface.
That feels un-rust-y.
CC @zeroeightysix
Thanks to @wuliuqii, whose layer-shell implementation I've also looked
at while putting this together.
Release Notes:
- Add support for the `layer_shell` protocol on wayland
---------
Co-authored-by: Ridan Vandenbergh <ridanvandenbergh@gmail.com>
Closes#41407
This solves a problem where users couldn't navigate between snippet
tabstops while the completion menu was open.
I named the action {Next, Previous}SnippetTabstop instead of Placeholder
to be more inline with the LSP spec naming convention and our codebase
names.
Release Notes:
- Editor: Add actions to move between snippet tabstop positions
Closes https://github.com/zed-industries/zed/issues/38558
The bug occurred because TabStopCursor chunk_position.1 is bounded
between 0 and 128. The fix for this was changing the bound to 0 and 127.
This also allowed me to simplify some of the tab stop cursor code to be
a bit faster (less branches and unbounded shifts).
Release Notes:
- N/A
This happens quite often with cargo based diagnostics which may spawn
several lines (sometimes the entire screen), forcing the user to scroll
up to the start of the diagnostic just to see the hover message is not
great.
Release Notes:
- Fixed diagnostics hovers not working if the diagnostic spans out of
view
Just for parity with vim. Also prevents these toggles from having both
enabled at the same time as that is a buggy state.
Release Notes:
- Added command to toggle helix mode
Closes#41422
This completely broke line numbering as described in the linked issue
and scrolling up does not have the correct numbers any more.
Release Notes:
- NOTE: The `relative_line_numbers` change
(https://github.com/zed-industries/zed/pull/39268) was reverted and did
not make the release cut!
Closes#41219
Release Notes:
- Updated docs to use `==` instead of `=` in keymap context.
Hopefully I'm not mistaken here, but I think the docs have a bug in them
Reverts zed-industries/zed#41384
The branch-protection rules work much better when there is a Job that
runs every time and can be depended on to pass, we no longer have this.
Release Notes:
- N/A
- Declare UAC support. This will prevent Windows from flagging
`auto_update_helper.exe` as a legacy setup program that needs to run as
administrator.
- Declare support for Windows 10. This will stop Windows from applying
various application compatibility profiles.
The UAC policy is not really appropriate to apply to all GPUI
applications (e.g. an installer written in GPUI may want to declare
itself as `requireAdministrator` instead of `asInvoker`). I tried
splitting this into a Zed.exe-only manifest and enabling manifest file
merging, but I ran out of my time-box. We can fix this later if this is
flagged by GPUI users.
Release Notes:
- N/A
Follow up for: #41304
Splits CI tests (cherry-picks and PRs only for now) into separate
workflows using `gh-workflow`. Includes a couple restructures to
- run more things in parallel
- remove our previous shell script based checking to filter tests based
on files changed, instead using the builtin `paths:` workflow filters
Splitting the docs/style/rust tests & checks into separate workflows
means we lose the complete summary showing all the tests in one view,
but it's possible to re-add in the future if we go back to checking what
files changed ourselves or always run everything.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Co-authored-by: Conrad <conrad@zed.dev>
Release Notes:
- Remove Windows/Linux from Getting Started
- Consolidate download & system into new Installation page
- Move Remote Dev out of Windows and into Remote Development
- Add Uninstall page
- Add updates page
- Remove addl learning materials from intro
Thread stacks in rust by default have 2 megabytes of stack which for
sumtrees (or ropes in this case) can easily be exceeded depending on the
workload.
Release Notes:
- Fixed stack overflows when constructing large ropes
This PR hides the worktree root name from the path prefix displayed when
you @-mention a file or directory in the agent panel. Given the tight UI
real state we have, I believe that having the project name in there is
redundant—the project you're in is already displayed in the title bar.
Not only it was the very first word you'd see after the file's name, but
it also made the path longer than it needs to. A bit of a design clean
up here :)
(PS: We still show the project name if there are more than one in the
same workspace.)
Release Notes:
- N/A
This PR adds a setting to prevent projects from being shared in public
channels.
This can be enabled by adding the following to the project settings
(`.zed/settings.json`):
```json
{
"prevent_sharing_in_public_channels": true
}
```
This will then disable the "Share" button when not in a private channel:
<img width="380" height="115" alt="Screenshot 2025-10-28 at 2 28 10 PM"
src="https://github.com/user-attachments/assets/6761ac34-c0d5-4451-a443-adf7a1c42bcd"
/>
Release Notes:
- collaboration: Added a `prevent_sharing_in_public_channels` project
setting for preventing projects from being shared in public channels.
Was previously sending all of the tools to the LLM on the first message
of a conversation regardless of the selected agent profile. This added
extra context, and tended to create scenarios where the LLM would
attempt to use the tool and it would fail since it was not available.
To reproduce, create a new conversation where you ask the Minimal mode
which tools it has access to, or try to write to a file.
Release Notes:
- Fixed an issue in the agent where all tools would be presented as
available even when using the `Minimal` profile
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Symbol completions in the context picker now show "SymbolName
filename.txt L123" instead of just "SymbolName". This helps distinguish
between symbols with the same name in different files.
## Motivation
I noticed that the message prompt editor only showed symbol names
without any context, making it hard to use in large projects with many
symbols sharing the same name. The inline prompt editor already includes
file context for symbol completions, so I brought that same UX
improvement to the message prompt editor. I've decided to match the
highlighting style with directory completion entries from the message
editor.
## Changes
- Extract file name from both InProject and OutsideProject symbol
locations
- Add `build_symbol_label` helper to format labels with file context
- Update test expectation for new label format
## Screenshots
Inline Prompt Editor
<img width="843" height="334" alt="Screenshot 2025-10-17 at 17 47 52"
src="https://github.com/user-attachments/assets/16752e1a-0b8c-4f58-a0b2-25ae5130f18c"
/>
Old Message Editor:
<img width="466" height="363" alt="Screenshot 2025-10-17 at 17 31 44"
src="https://github.com/user-attachments/assets/900659f3-0632-4dff-bc9a-ab2dad351964"
/>
New Message Editor:
<img width="482" height="359" alt="Screenshot 2025-10-17 at 17 31 23"
src="https://github.com/user-attachments/assets/bf382167-f88b-4f3d-ba3e-1e251a8df962"
/>
Release Notes:
- Added file names and line numbers to symbol completions in the agent
panel
To help make our GitHub Actions easier to understand, we're planning to
split the existing `ci.yml` into three separate workflows:
* run_bundling.yml (this PR)
* run_tests.yml
* make_release.yml
To avoid the duplication that this might otherwise cause, we're planning
to write the workflows with gh-workflow, and use rust instead of
encoding logic in YAML conditions.
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Closes#40884
- Make IOPub task return a `Result`
- Create a monitoring task that watches over IOPub, Control, Routing and
Shell tasks.
- If any of these tasks fail, report the error with `kernel_errored()`
(which is already used to report process crashes)
https://github.com/user-attachments/assets/3125f6c7-099a-41ca-b668-fe694ecc68b9
This is not perfect. I did not have time to look into this but:
- When such errors happen, the kernel should be shut down.
- The kernel should no longer appear as online in the UI
But at least the user is getting feedback on what went wrong.
Release Notes:
- Jupyter client errors are now surfaced in the UI (#40884)
After #38882 we were always including file/directory mentions as
`zed:///agent/file?path=a/b/c.rs`.
However, for most resource links (files/directories/symbols/selections)
we want to use a common format, so that ACP servers don't have to
implement custom handling for parsing `ResourceLink`s coming from Zed.
This is what it looks like now:
```
[@index.js](file:///Users/.../projects/reqwest/examples/wasm_github_fetch/index.js)
[@wasm](file:///Users/.../projects/reqwest/src/wasm)
[@Error](file:///Users/.../projects/reqwest/src/async_impl/client.rs?symbol=Error#L2661:2661)
[@error.rs (23:27)](file:///Users/.../projects/reqwest/src/error.rs#L23:27)
```
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Closes https://github.com/zed-industries/zed/issues/41334
This comes down to a caching issue..
Release Notes:
- Fixed an issue where the scrollbar track color would not update in
case the theme was changed.
The current Jetbrains keymap has `ctrl-shift-f12` set to
`CloseAllDocks`. On Jetbrains IDEs this hotkey actually toggles the
docks, which is very convenient: You press it once to hide all docks and
just focus on the code, and then you can press it again to toggle your
docks right back to how they were. Unlike `CloseAllDocks`, a toggle
means the editor needs to remember the previous docks state so this
necessitated some code changes.
Release Notes:
- Added a `Toggle All Docks` editor action and updated the keymaps to
use it
By default, the uninstaller will only delete files that were written by
the original installer. When users upgrade Zed, these new
OpenConsole.exe files will have been written by auto_upgrade_helper, not
the installer. Force them to be deleted on uninstall, so they do not
hang around.
Release Notes:
- N/A
The tab switcher render matches calls each workspace item's
`Item::tab_content` function that can return an element of variable
size. Because the tab switcher was using a uniform list under the hood,
this would cause spacing issues when tab_contents elements had different
sizes.
The fix is by changing the picker to use a material list under the hood.
Release Notes:
- N/A
## Description
Fixes the copy button functionality in REPL interactive mode error
output sections.
When executing Python code that produces errors in the REPL (e.g.,
`NameError`), the copy button in the error output section was
unresponsive. The stdout/stderr copy button worked correctly, but the
error traceback section copy button had no effect when clicked.
Fixes#40207
## Changes
Modified the following:
src/outputs.rs: Fixed context issues in render_output_controls by
replacing cx.listener() with simple closures, and added custom button
implementation for ErrorOutput that copies/opens the complete error
(name + message + traceback)
src/outputs/plain.rs: Made full_text() method public to allow access
from button handlers
src/outputs/user_error.rs: Added Clone derive to ErrorView struct and
removed a couple pieces of commented code
## Why This Matters
The copy button was clearly broken and it is useful to have for REPL
workflows. Users could potentially need to copy error messages for a
variety of reasons.
## Testing
See attached demo for proof that the fix is working as intended. (this
is my first ever commit, if there are additional test cases I need to
write or run, please let me know!)
https://github.com/user-attachments/assets/da158205-4119-47eb-a271-196ef8d196e4
Release Notes:
- Fixed copy button not working for REPL error output
Replace the binary search approach with a more efficient partition_point
method for checking selection overlaps. This eliminates the need to
collect and sort selection ranges separately, reducing memory allocation
and improving performance when handling multiple selections.
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
This change adds two things to our remote server build
process:
1. It now checks if all required tooling is installed before using it or installing it on demand. This includes checks for `rustup` and `cargo-zigbuild` in your `PATH`.
2. Next, if `ZED_BUILD_REMOTE_SERVER` contains `musl` and `ZED_ZSTD_MUSL_LIB`
is set, we will pass its value (the path) to `cargo-zigbuild` as `-C
link-arg=-L{path}`.
Release Notes:
- N/A
The `wrap selections in tag` action currently did not take line_mode
into account, which means when selecting lines with `shift-v`, the
start/end tags would be inserted into the middle of the selection (where
the cursor sits)
https://github.com/user-attachments/assets/a1cbf3da-d52a-42e2-aecf-1a7b6d1dbb32
This PR fixes this behaviour by checking if the selection uses line_mode
and then adjusting start and end points accordingly.
NOTE: I looked into amending the test cases for this, but I am unsure
how to express line mode with range markers. I would appreciate some
guidance on this and then I am happy to add test cases.
After:
https://github.com/user-attachments/assets/a212c41f-b0db-4f50-866f-fced7bc677ca
Release Notes:
- Fixed `Editor: wrap selection in tags` when in vim visual line mode
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Release Notes:
- Pane key context now includes 'buffer_search_deployed' identifier
The goal of this PR is to add a new identifier in the key context that
will let the user target when the BufferSearchBar is deployed even if
they are not focused on it.
requested in #36930
Same rational as #40454 this will allow users to make more flexible
keybindings, by including some additional information higher up the key
context tree.
i thought adding this context to `Pane` seemed more appropriate than
`Editor` since `Terminal` also has a `BufferSearchBar`; however, I ran
into some import issues between BufferSearchBar, Search, Pane, and
Workspace which made it difficult to implement adding this context
directly inside `Pane`'s render function.
instead i added a new method called `contributes_context` to
`ToolbarItem` which will allow any toolbar item to add additional
context to the `Pane` level, which feels like it might come in handy.
here are some screen shots of the context being displayed in the Editor
and the Terminal
<img width="1653" height="1051" alt="Screenshot 2025-10-25 at 14 34 03"
src="https://github.com/user-attachments/assets/21c5b07a-8d36-4e0b-ad09-378b12d2ea38"
/>
<img width="1444" height="1167" alt="Screenshot 2025-10-25 at 12 32 21"
src="https://github.com/user-attachments/assets/86afe72f-b238-43cd-8230-9cb59fb93b2c"
/>
**Problem:** Current relative line numbering creates a mismatch with
vim-style navigation when soft wrap is enabled. Users must mentally
calculate whether target lines are wrapped segments or logical lines,
making `<n>j/k` navigation unreliable and cognitively demanding.
**How things work today:**
- Real line navigation (`j/k` moves by logical lines): Requires
determining if visible lines are wrapped segments before jumping. Can't
jump to wrapped lines directly.
- Display line navigation (`j/k` moves by display rows): Line numbers
don't correspond to actual row distances for multi-line jumps.
**Proposed solution:** Count and number each display line (including
wrapped segments) for relative numbering. This creates direct
visual-to-navigational correspondence where the relative number shown
always matches the `<n>j/k` distance needed.
**Benefits:**
- Eliminates mental overhead of distinguishing wrapped vs. logical lines
- Makes relative line numbers consistently actionable regardless of wrap
state
- Preserves intuitive "what you see is what you navigate" principle
- Maintains vim workflow efficiency in narrow window scenarios
Also explained an discussed in
https://github.com/zed-industries/zed/discussions/25733.
Release Notes:
Release Notes:
- Added support for counting wrapped lines as relative lines and for
displaying line numbers for wrapped segments. Changes
`relative_line_numbers` from a boolean to an enum: `enabled`,
`disabled`, or `wrapped`.
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
If you set `{"basedpyright": {"analysis": {"typeCheckingMode":
"off"}}}`, you will notice that it doesn't actually work, but
`{"basedpyright.analysis": {"typeCheckingMode": "off"}}` does.
Made the change on how the default is being set.
Release Notes:
- N/A
The bug occurred because `smol::process::Command::from(_)` doesn't set
the correct fields for stdio markers. So moving the stdio configuration
after converting to a `smol` command fixed the issue.
I added the `std::process::Command::{stdout, stderr, stdin}` functions
to our disallowed list in clippy to prevent any bugs like this appearing
in the future.
Release Notes:
- N/A
This isn't quite right yet, as a proper solution would remember the
input modality at the moment of focus change, rather than at painting
time. But this gets us close enough for now.
Release Notes:
- N/A
## Summary
- Document the `stable`/`preview`/`nightly` top-level keys that let
users scope settings overrides per release channel.
- Provide an example `settings.json` snippet and call out that overrides
replace array values rather than merging them.
- Mention that UI-driven changes edit the root config so per-channel
blocks might need manual updates.
## Testing
- Not run (docs only).
Fixes#40458.
Release Notes:
- N/A
---------
Co-authored-by: MrSubidubi <finn@zed.dev>
```json
"edit_predictions": {
"codestral": {
"api_url": "https://codestral.mistral.ai",
"model": "codestral-latest",
"max_tokens": 150
}
},
```
Release Notes:
- Added support for changing the Codestral endpoint. This was discussed
at #34371.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Introduce a new `prefer_focused_window` field to the
`workspace::OpenOptions` struct that, when provided, will make it so
that Zed opens the provided path in the currently focused window.
This will now automatically be set to true when the `--wait` flag is
used with the CLI.
Closes#40551
Release Notes:
- Improved the `--wait` flag in Zed's CLI so as to always open the
provided file in the currently focused window
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Closes https://github.com/zed-industries/zed/issues/41168
This PR adds both Tailwind CSS and Ruff (linter for Python) as built-in
features; a banner mentioning this should show up now for these two when
searching for them in the extensions UI.
There will also be a corresponding zed.dev site PR adding a "Ruff is
built-in" card to the zed.dev/extensions page.
Release Notes:
- N/A
We were not actually using `paths::agent_servers` and were manually
constructing the path to the `external_agents` folder in a few places.
Release Notes:
- N/A
Using compiler explorer I saw that the compiler wasn't clever enough to
optimise away the branches in the masking code. I thought the compiler
would have a better chance if we always branched, which [turned out to
be the case](https://godbolt.org/z/PM594Pz18).
Running the benchmarks the biggest benefit I saw was:
```
push/65536 time: [2.9067 ms 2.9243 ms 2.9417 ms]
thrpt: [21.246 MiB/s 21.373 MiB/s 21.502 MiB/s]
change:
time: [-8.3452% -7.2617% -6.2009%] (p = 0.00 < 0.05)
thrpt: [+6.6108% +7.8303% +9.1050%]
Performance has improved.
```
But I did also see some regressions:
```
slice/4096 time: [66.195 µs 66.815 µs 67.448 µs]
thrpt: [57.915 MiB/s 58.464 MiB/s 59.012 MiB/s]
change:
time: [+3.7131% +5.1698% +6.6971%] (p = 0.00 < 0.05)
thrpt: [-6.2768% -4.9157% -3.5802%]
Performance has regressed.
```
Release Notes:
- N/A
Fixes https://github.com/zed-industries/zed/issues/41260
After experimenting and reading through the implementation of OpenSSH
stack on Windows, it looks like batch mode precludes use of passwords.
In the listing
b8c08ef9da/sshconnect2.c (L417),
the last field of each `Authmode` struct is a pointer to the config
value that *disables* that particular mode. In this case, `keyboard`
(interactive) and `password` modes are both disabled if batch mode is
used. We should therefore fall back to `scp` if `sftp` fails rather than
to fail outright.
Release Notes:
- N/A
Closes#40898
Release Notes:
- Fixed an issue where attempting to add or update a key binding in the
keymap editor with an empty `keymap.json` file would fail
Closes https://github.com/zed-industries/zed/issues/41267
The only downside would be the fact that a Zed window will appear behing
the version modal, but this is a limitation for all "window-less"
actions currently.
Release Notes:
- Made "About Zed" menu entry to work when all Zed windows are closed
Updates to acp crate 0.7, which allows us to send information about the
client to the Agent.
In the future, we can also use the AgentInfo on the response for
internal metrics.
Release Notes:
- N/A
Fixes a regression introduced in
https://github.com/zed-industries/zed/pull/39857. As for the exact
reason this causes this issue I am not yet sure will investigate (as per
the todos in code)
Fixes ZED-23R
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Previously, the hover popover delay was implemented using two
overlapping timers, which caused the minimum delay to always be at least
HOVER_REQUEST_DELAY_MILLIS, regardless of the hover_popover_delay
setting.
This change updates the logic to wait for hover_popover_delay only,
ensuring the total delay is always equals to hover_popover_delay . As a
result, the hover popover now appears after the intended delay, matching
the user's configuration more accurately.
Release Notes:
- Improved hover popover respecting settings delay correctly
This PR fixes some instances where we were displaying action names in
quotes instead of in backticks.
Also fixed some mentions of using an action to open the settings file,
as this has changed after the release of the settings UI.
Release Notes:
- N/A
When trying to split and clone a non clone-able workspace item we now
attempt split and move instead of doing nothing. Additionally we disable
the split menu buttons if we can't split the active item at all.
Release Notes:
- Improved handling of unsplittable panes
We only use it a handful of times and the default amount of threads
(logical cpu core number) its spawns is overkill for this. This also
gives the threads names oppose to being labeled `<unknown>`
Release Notes:
- N/A *or* Added/Fixed/Improved ...
The issues is that the closure supplied to `request_measured_layout`
could be run multiple times with differing `known_dimensions`. This in
turn will mean we truncate the font runs once, inserting a multibyte
char at the end but then in the next iteration use those truncated runs
for possible the original untruncated string which has multibyte
characters overlapping the now truncated run end resulting in a faulty
utf8 boundary index.
Solution to this is simple, truncate a clone of the runs when needed
instead of modifying the original.
Fixes https://github.com/zed-industries/zed/issues/36925
Fixed ZED-2FF
Fixes ZED-2KM
Fixes ZED-2KK
Fixes ZED-1FF
Fixes ZED-255
Fixes ZED-2JD
Fixes ZED-2FX
Fixes ZED-2K2
Fixes ZED-2JX
Fixes ZED-2GE
Fixes ZED-2FC
Fixes ZED-2GD
Fixes ZED-2HY
Fixes ZED-2HR
Fixes ZED-2FN
Fixes ZED-2GT
Fixes ZED-2FK
Fixes ZED-2EY
Fixes ZED-27E
Fixes ZED-272
Fixes ZED-2EM
Fixes ZED-2CC
Fixes ZED-29V
Fixes ZED-25B
Fixes ZED-257
Fixes ZED-24R
Fixes ZED-24Q
Fixes ZED-23Z
Fixes ZED-227
Release Notes:
- Fixed a crash in text shaping when truncating rendered text
We've been seeing a lot of weird constant rebuilds recently with
rust-anaylzer's check, either with cargo thinking build scripts are too
new timestamp wise or all fingerprints having gone missing somehow
(???). Reading through some related bug reports hints at disabling
incremental potentially working around this for now so let's test that
out
cc https://github.com/rust-lang/cargo/issues/16104
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Split out from https://github.com/zed-industries/zed/pull/40774 to
reduce the size of the reland of that PR (once I figure out the cause of
the issue)
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Adds debugger inline values support for JavaScript, TypeScript, and TSX languages.
Release Notes:
- debugger: Add inline value support for Javascript, TypeScript, and TSX
---------
Co-authored-by: Anthony <anthony@zed.dev>
1. Settings Viewed: Whenever someone opens or refocus the settings ui
via an action
2. Settings Closed: When the settings ui window is closed
3. Settings Navigation Clicked: The category and subcategory that a user
clicked on
4. Settings Error Shown: Whenever an error banner shows up
5. Settings Changed: The setting a user changed through the UI
cc: @katie-z-geer
Release Notes:
- N/A
This PR allows you to define `align="right"` for example to change the
default alignment on **HTML** table columns. This PR also refactors
where we store the alignments in order to make it so you can define it
column based instead of only row based.
See that the `Revenue` column is left aligned instead of the default
`centered`.
**Result**
<img width="1161" height="177" alt="Screenshot 2025-10-25 at 11 01 38"
src="https://github.com/user-attachments/assets/94bda4f0-00c1-4726-a3bd-99b3f2573ef5"
/>
**Code example**
```HTML
<table>
<tr>
<th rowspan="2">Region</th>
<th colspan="2" align="left">Revenue</th>
<th rowspan="2">Growth</th>
</tr>
<tr>
<th>Q2 2024</th>
<th>Q3 2024</th>
</tr>
<tr>
<td>North America</td>
<td>$2.8M</td>
<td>$2.4B</td>
<td>+85,614%</td>
</tr>
<tr>
<td>Europe</td>
<td>$1.2M</td>
<td>$1.9B</td>
<td>+158,233%</td>
</tr>
<tr>
<td>Asia-Pacific</td>
<td>$0.5M</td>
<td>$1.4B</td>
<td>+279,900%</td>
</tr>
</table>
```
Release Notes:
- markdown preview: Add support for `HTML` table column `align`
attribute
Follow-up: https://github.com/zed-industries/zed/pull/39898
Right now, we don't fill the empty column when the current row count is
less than the max row count. This PR fixes that by filling it with an
empty cell. So the table columns don't flow in the wrong direction, as
you can see inside the first screenshot.
**Before**
<img width="1095" height="182" alt="Screenshot 2025-10-24 at 16 09 02"
src="https://github.com/user-attachments/assets/e3abf24e-c190-4bd7-b43a-39f2f01ecd1c"
/>
**After**
<img width="1165" height="178" alt="Screenshot 2025-10-24 at 16 19 17"
src="https://github.com/user-attachments/assets/427c25f9-82a7-498b-a1a2-d71e4c288fe5"
/>
**Code example**
```html
<table>
<tr>
<th rowspan="2">Region</th>
<th colspan="2">Revenue</th>
<th rowspan="2">Growth</th>
</tr>
<tr>
<th>Q2 2024</th>
<th>Q3 2024</th>
</tr>
<tr>
<td>North America</td>
<td>$2.8M</td>
<td>$2.4B</td>
<td>+85,614%</td>
<td>+99%</td> // extra column here
</tr>
<tr>
<td>Europe</td>
<td>$1.2M</td>
<td>$1.9B</td>
<td>+158,233%</td>
</tr>
<tr>
<td>Asia-Pacific</td>
<td>$0.5M</td>
<td>$1.4B</td>
<td>+279,900%</td>
</tr>
</table>
```
**Note** there are no release notes, as the previous PR didn't get
released yet.
Release Notes:
- N/A
Some information in the GDScript documentation page was outdated (like
it still treats Zed if it was a macOS exclusive app) or some details
were missing.
- The `zed-gdscript` URL has been updated with the new owner.
- Pre-requisites added (with netcat included).
- Godot installation steps removed, it's now listed in the
pre-requisites.
- Setup steps simplified and reworded.
The note at the bottom was removed as I didn't see the issue in my end.
Release Notes:
- N/A
## Overview
- document how to keep a per-user debug.json so global launch tasks show
up everywhere (Fixes#39849)
- sanitize REPL terminal text before copying so error blocks can be
copied and opened in buffers (Fixes#40207)
## Design Decisions
- reused the existing user debug file (paths::debug_scenarios_file) and
pointed docs at the zed::OpenDebugTasks command to stay aligned with the
settings UX
- extract a sanitize helper inside TerminalOutput::full_text to strip
\r/null padding while keeping indentation intact, then join the cleaned
lines so clipboard and buffers get readable text
## Testing
- Not run (cargo is unavailable in this environment)
Fixes#39849.
Fixes#40207.
Add support for GithubCopilot /responses endpoint. This gives the
copilot chat provider the ability to use the new GPT-5 codex model and
any other model that lacks support for /chat/copmletions endpoint.
Closes#38858
Release Notes:
- Add support for GithubCopilot /responses endpoint.
# Added
1. copilot_response.rs that has the /response endpoint types
2. uses response endpoint if model does not support /chat/completions.
3. new into_copilot_response() to map LanguageCompletionEvents to
Request.
4. new map_stream() to map response stream event to
LanguageCompletionEvents and tests.
5. Fixed a bug where trying to parse response for non streaming for
/chat/completion was failing
# Notes
There is a pr open - https://github.com/zed-industries/zed/pull/39989
for adding /response support for OpenAi and OpenAi compatible API.
Altough they share some similarities (copilot api seems to mirror openAi
directly) ive simplified some stuff and tried to keep it the same with
the vscode-chat implementation where possible. There might be a case for
code reuse but i think keeping them separate for now should be ok.
# Tool Calls
<img width="716" height="670" alt="Screenshot from 2025-10-15 17-12-30"
src="https://github.com/user-attachments/assets/14e88a52-ba8b-4209-8f78-73d15034b1e0"
/>
# Image
<img width="923" height="494" alt="Screenshot from 2025-10-21 02-02-26"
src="https://github.com/user-attachments/assets/b96ce97c-331e-45cb-b5b1-7aa10ed387b4"
/>
Very often, when I'm testing or playing around with the zoom feature,
including the agent panel, I find myself missing one quick action that
would bring everything back to normal. That's what `ResetAllZoom` does.
If you have customized your zoom level in all areas of Zed, that action
returns everything to its default state. Similarly, if you're playing
around with zoom just in the agent panel, `ResetAgentZoom` does the same
in that context.
Release Notes:
- Added the `ResetAllZoom` and `ResetAgentZoom ` actions, allowing to
return the zoom level across the whole app and/or just in the agent
panel to its default/original value.
Closes https://github.com/zed-industries/zed/issues/41094
This PR adds the `agent_buffer_font_size` settings to be scaled in the
same proportion as the agent panel's UI font size, which was the only
setting that was being accounted for. This is something that I forgot to
do when we broke down the agent panel's font size controls into these
two values.
Release Notes:
- agent: Fixed an issue where the agent panel's buffer and UI font size
wouldn't scale proportionally.
Closes#40589
Replaced `System::new_all()` with `System::new_with_specifics` to fetch
only essential process information and exclude non-main threads from the
process list
after fix:
<img width="641" height="474" alt="image"
src="https://github.com/user-attachments/assets/32335552-2f7a-4317-8c01-f37b2eadfdc1"
/>
Release Notes:
- Fix duplicate process entries in WSL debug attach list
Update `project::buffer_store::BufferStore.save_buffer_as` in order to
correctly update the `path_to_buffer_id` hash map, ensuring that the
currently open file's path is dissociated from the buffer's id, to
prevent the new buffer from being open when trying to open the original
file.
Closes#29783
Release Notes:
- Fixed issue where using `workspace: save as` would prevent users from
opening the original file from which the new file was created
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This PR removes the behavior that the number_field changes focus to the
previous element when using the decrement button.
I mainly noticed this while decreasing the tab-size of a language, since
it there closes the page...
Please note that I am unsure what if any purpose this code has.
I was unable to find a use case and since it is not present in the
`increment_handler` I guess it should never have been here
---
Release Notes:
* Fixed wrongly focus previous element on number_field decrement
Using the cool, [recently
added](https://github.com/zed-industries/zed/pull/40940) `focus-visible`
support in some components. This will be particularly nice in the
settings UI, as it will not display the focus styles if you're
navigating it with a pointer device as opposed to the keyboard.
Release Notes:
- N/A
Just got a new Windows machine and realized that the rules library empty
state was completly busted. Ended up also adding some little UI tweaks
to make it better for both Windows and Linux.
Release Notes:
- N/A
Closes#40351
The leak mainly showed up in the appearance page because it had a lot of
dropdown menus. The problem occurred because the drop-down menus were
creating a new entity on each frame instead of using the
`window.use_state...` API.
Release Notes:
- settings ui: Fixed memory leak in UI
---------
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Set a TLS bit to skip invoking the crash handler when a detached thread
panics.
cc @P1n3appl3 - is this at odds with what we need the crash handler to
do?
May close#39289, cannot repro without a nightly build
Release Notes:
- Fixed extension panics crashing Zed on Linux
Co-authored-by: dino <dinojoaocosta@gmail.com>
Closes#40581
Release Notes:
- git: No longer save clean files when staging (to avoid triggering
unnecessary rebuilds in external file watchers like vite)
Closes https://github.com/zed-industries/zed/issues/38453
Current `Buffer` API only allows getting buffer text with `\n` line
breaks — even if the `\r\n` was used in the original file's text.
This it not correct in certain cases like LSP formatting, where language
servers need to have original document context for e.g. formatting
purposes.
Added new `Buffer` API, replaced all buffer LSP registration places with
the new one and added more tests.
Release Notes:
- Fixed ESLint linebreak-style errors by preserving line endings in LSP
communication
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Previously we had `Context` and `ContextStore` in both `agent_ui` (used
to store context for the inline assistant) and `assistant_context` (used
for text threads) which is confusing.
This PR makes it so that the `assistant_context` concepts are now called
`TextThread*`, the crate was renamed to `assistant_text_thread`
Release Notes:
- N/A
This PR does two related things:
- First, it gets rid of the undifferentiated `RepositoryEvent::Updated`
in favor of three new events that have clearer definitions:
`BranchChanged`, `StashEntriesChanged`, and `StatusesChanged`. An
implication of this is that we no longer emit a `RepositoryEvent` unless
some git state changed; previously we would emit `RepositoryUpdated`
after doing a git status scan even if no statuses changed.
- Second, it changes the subscription strategy of the project diff to
make it update more robustly. Previously, the project diff only
subscribed to the `GitStore`, so it relied on getting a `GitStoreEvent`
when some buffer's diff hunks changed, even if the git status of the
buffer's file didn't change (e.g. a second hunk in a file that was
already modified). After this PR, it also subscribes to the individual
`BufferDiff` entities for buffers that have a git status, so the
`GitStore` is freed from that responsibility. This also fixes some real
cases where the previous strategy was not effective in keeping the
project diff up to date (captured in a test).
Release Notes:
- Fixed some cases where the project diff would fail to update in
response to git events.
We still see a bunch of panics here but the default slicing panic
doesn't tell which side of the range is bad
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Before, inlay chunks were retrieved from the cache based on actualized
anchor ranges, but using an old buffer snapshot. Now, update all chunks
and snapshot to the actual before returning the applicable ones.
Follow-up of https://github.com/zed-industries/zed/pull/40183
Release Notes:
- N/A
- Added "ctrl-p" for selecting the previous menu item
- Added "ctrl-n" for selecting the next menu item
Closes#40619
Release Notes:
- Ctrl+P now moves to the previous result; Ctrl+N moves to the next.
This shrinks it from roughly a ~kilobyte to 8 byte, removing a bunch of
memmoves emitted by the compiler. Also `Arc`'s it instead of boxing as
we do clone it a couple times here and there, making that also a fair
bit cheaper
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Fixes ZED-12D
`wasmtime_wasi` might call into tokio futures (to sleep for example)
which requires access to the tokio runtime. So we are required to run
these extensions in the tokio thread pool
Release Notes:
- Fixed extensions causing zed to occasionally panic
I made three significant changes in this PR.
1. `SettingsWindow::fetch_files` now creates
`SettingsUiFile::Project(..)` for any worktree that contains no project
settings.
2. `update_settings_file` now creates an empty settings file if a
worktree doesn't contain one.
3. `open_current_settings_file` also creates a settings file if the
current one doesn't exist.
Release Notes:
- settings ui: Enable editing project settings for worktrees that don't
have a project setting file.
This PR gets the `SettingsWindow` struct to subscribe to all
`Entity<Project>` events and any future project entities that are
created. When a project emits an event that signals a worktree has been
added or removed, the settings window refetches all settings files it
can find.
This fixes a bug where the settings ui would notice some project
settings that were created or opened after the `SettingsWindow` has been
initialized.
I also renamed `LOCAL` file mask to `PROJECT` to be inline with the
`SettingsFile` naming convention.
Release Notes:
- settings ui: Fix bug where project setting files wouldn't be detected
if they were created or opened after while an active settings window is
open
Using `shlex` unconditionally is dangerous as it assumes the underlying
shell is POSIX which is not the case for PowerShell, CMD, or Nushell.
Therefore, whenever we want to quote the args we should utilise our
helper `util::shell::ShellKind::try_quote` which takes into account
which shell is being used to actually exec/spawn the invocation.
Release Notes:
- N/A
---------
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
This is a refactoring PR to simplify our environment loading code by:
- Getting rid of `EnvironmentErrorMessage` in favor of using
`anyhow::Result` everywhere, with a separate `mpsc` channel to
communicate statuses that will be shown in the activity indicator
- Inlining some functions that were only called once to reduce
indirection
- Removing the separate `direnv` module
Release Notes:
- N/A
Don't prepend the worktree root when using an absolute path from
`Worktree::which`, since that does the wrong thing when running in
wasmtime given two Windows absolute paths. Also don't pass this path to
`node`, since when npm installed it's a sh/cmd wrapper not a JS file.
Part of #39153, also needs a fix on the vscode-langservers-extracted
side (missing shebang for the vscode-html-language-server script).
Release Notes:
- Fixed Zed failing to run the HTML language server in some cases.
Just tidying this up a bit. Really have to fix this Banner component at
some point 😅 Having to add some spacing hacks to make it perfect here
that are not ideal and should be baked into the component.
Release Notes:
- N/A
Now that we have two surface areas that open as separate windows, it's
important they're consistent with one another. This PR make the settings
UI and rules library windows more similar by having them use the same
minimum window size and similar styles for their navbar given they have
fundamentally the same design (nav on the left and content on the
right).
Release Notes:
- N/A
<img width="335" height="236" alt="image"
src="https://github.com/user-attachments/assets/5e09e9ed-f0f3-48df-ac22-032edfc6c114"
/>
Release Notes:
This PR fixes inconsistent use of trailing ellipsis (…) in the MCP
Server menu.
Previously, some menu items (like Add Custom Server…) used hardcoded
ellipses even though they didn’t trigger additional dialogs or steps.
This change removes unnecessary ellipses to align with standard UI/UX
conventions used across Zed’s menus.
---------
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Follow-up: https://github.com/zed-industries/zed/pull/34655
We should use an opaque fallback color for `panel.overlay_hover`. This
helps when a custom theme doesn’t provide it, nor `element.hover`. For
example, VSCode’s default modern dark theme doesn’t include an
`element.hover` color after import.
Release Notes:
- Fixed an issue where the project panel’s sticky entry could appear
transparent on hover with certain themes.
After clicking on the file drop-down and selecting a file, both the
selected file and the first drop-down entry would be the same file name
instead of overwriting a file name.
Release Notes:
- settings ui: Fix bug where duplicate file names showed in the header
files
Release Notes:
- agent: Improved the editing previous messages UX by focusing in the
agent panel's message editor after regenerating a prompt, instead of
moving focus to the nearest regular buffer.
Closes#39172
This refactors when we resolve UI keybindings in an effort to reduce
flickering whilst painting these: Previously, we would always resolve
these upon creating the binding. This could lead to cases where the
corresponding context was not yet available and no binding could be
resolved, even if the binding was then available on the next presented
frame. Following that, on the next rerender of whatever requested this
keybinding, the keybind for that context would then be found, we would
render that and then also win a layout shift in that process, as we went
from nothing rendered to something rendered between these frames.
With these changes, this now happens less often, because we only look
for the keybinding once the context can actually be resolved in the
window.
| Before | After |
| --- | --- |
|
https://github.com/user-attachments/assets/adebf8ac-217d-4c7f-ae5a-bab3aa0b0ee8
|
https://github.com/user-attachments/assets/70a82b4b-488f-4a9f-94d7-b6d0a49aada9
|
Also reduced cloning in the keymap editor in this process, since that
requiered changing due to this anyway.
Release Notes:
- Fixed some cases where keybinds would appear with a slight delay,
causing a flicker in the process
Closes https://github.com/zed-industries/zed/issues/40047
Closes https://github.com/zed-industries/zed/issues/24798
Closes https://github.com/zed-industries/zed/issues/24788
Before, each editor, even if it's the same buffer split in 2, was
querying for inlay hints separately, and storing the whole inlay hint
twice, in `Editor`'s `display_map` and its `inlay_hint_cache` fields.
Now, instead of `inlay_hint_cache`, each editor maintains a minimal set
of metadata (which area was queried by what task) instead, and all LSP
inlay hint data had been moved into `LspStore`, both local and remote
flavors store the data.
This allows Zed, as long as a buffer is open, to reuse the inlay hint
data similar to how document colors and code lens are now stored and
reused.
Unlike other reused LSP data, inlay hints data is the first one that's
possible to query by document ranges and previous version had issue with
caching and invalidating such ranges already queried for.
The new version re-approaches this by chunking the file into row ranges,
which are queried based on the editors' visible area.
Among the corresponding refactoring, one notable difference in inlays
display are multi buffers: buffers in them are not
[registered](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_didOpen)
in the language server until a caret/selection is placed inside their
excerpts inside the multi buffer.
New inlays code does not query language servers for unregistered
buffers, as servers usually respond with empty responses or errors in
such cases.
Release Notes:
- Reworked inlay hints to be less error-prone
---------
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
In practice this just hides the web search tool when not using the Zed
provider
Release Notes:
- Fixed an issue where the web search tool would show up in the profile
selector even when not using a model via Zed Pro
Closes#40874
Release Notes:
- Fixed an issue where migrating settings after v0.208.5+ would
spuriously enable prettier. This fix only affects those who have not
updated or migrated yet. For those who have already updated to version
v0.208.5 or later, placing `"formatter": []` in your settings in the
affected languages will fix the issue.
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
This PR switches us back to the upstream version of `async-tar` and
upgrades to v0.5.1.
This version has the patch we need:
0c18195639.
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/39837
This PR adds support for `colspan` feature that is only supported for
HTML tables. I also fixed an edge case where the right side border was
not applied because it didn't match the total column count.
**Before**
<img width="725" height="179"
alt="499166907-385cc787-fc89-4e6d-bf06-c72c3c0bd775"
src="https://github.com/user-attachments/assets/69586053-9893-4c92-aa89-7830d2bc7a6d"
/>
**After**
<img width="1165" height="180" alt="Screenshot 2025-10-21 at 22 51 55"
src="https://github.com/user-attachments/assets/f40686e7-d95b-45a6-be42-e226e2f77483"
/>
```html
<table>
<tr>
<th rowspan="2">Region</th>
<th colspan="2">Revenue</th>
<th rowspan="2">Growth</th>
</tr>
<tr>
<th>Q2 2024</th>
<th>Q3 2024</th>
</tr>
<tr>
<td>North America</td>
<td>$2.8M</td>
<td>$2.4B</td>
<td>+85,614%</td>
</tr>
<tr>
<td>Europe</td>
<td>$1.2M</td>
<td>$1.9B</td>
<td>+158,233%</td>
</tr>
<tr>
<td>Asia-Pacific</td>
<td>$0.5M</td>
<td>$1.4B</td>
<td>+279,900%</td>
</tr>
</table>
```
**TODO**:
- [x] Add tests for rending logic
- [x] Test all the tables again
cc @bennetbo
Release Notes:
- Markdown: Added support for `colspan` and `rowspan` for HTML tables
---------
Co-authored-by: Zed AI <ai@zed.nl>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Hello,
I am having a great time setting up the editor, but with a few problems
related to the Emacs keymap.
In this PR I have compiled changes in the default `emacs.json` that I
believe make the onboarding smoother for incoming emacs users.
This includes points that may need further discussion and some breaking
changes, although nothing that cannot be reverted with a quick
`keymap.json` overwrite.
(Please let me know if it is better to split up the PR)
### 1. Avoid fallbacks to the default keymap
all platforms:
- `ctrl-g` activating `go_to_line::Toggle` when there is nothing to
cancel
linux / windows:
- `ctrl-x` activating `editor::Cut` on the 1 second timeout
- `ctrl-p` activating `file_finder::Toggle` when the cursor is on the
first character of the buffer
- `ctrl-n` activating `workspace::NewFile` when the cursor is on the
last character of the buffer
### 2. Make all move commands operate on full words
In the current Zed implementation some commands run on full words and
others on subwords.
Although ultimately a matter of user preference, I think it is sensible
to use full words as the default, since that is what is shipped with
emacs.
### ~~3. Cancel selections after copy/cut commands~~ Moved to #40904
Canceling the selection is the default emacs behavior, but the way to
achieve it might need some brushing.
Currently I am using `workspace::SendKeystrokes` to copy ->
cancel(`ctrl-g`), but this has the following problems:
- can only be used in the main buffer (since `editor::Cancel` would
typically close secondary buffers)
- may cause problems downstream if the user overwrites the `ctrl-g`
binding
### ~~4. Replace killring with normal cut/paste commands~~ Moved to
#40905
Ideally Zed would support emacs-like killrings (#25270 and #22490).
However, I understand that making an emacs emulator is not a project
goal, and the Zed team should have a bunch of tasks with higher
priority.
By using a unified clipboard and standard cut/paste commands, we can
provide an experience that is closer to the out-of-the-box emacs
behavior (#33351) while also avoiding some pitfalls of the current
killring implementation (#28715).
### 5. Promote some bindings to workspace commands
- `alt-x` as `command_palette::Toggle`
- `ctrl-x b` and `ctrl-x ctrl-b` as `tab_switcher::Toggle`
---
Release Notes:
- emacs: Fixed a problem where keys would fallback to their default
keymap binding on certain conditions
- emacs: Changed `alt-f` and `alt-b` to operate on full words, as in the
emacs default
- emacs: `alt-x`, `ctrl-x b`, and `ctrl-x ctrl-b` are now Workspace
bindings
Re-lands https://github.com/zed-industries/zed/pull/40719, fixes the
bugs that were discovered with it and improves some more stuff in that
area
Release Notes:
- Fixed a rare issue where the extension page would stutter while
scrolling.
---------
Co-authored-by: Agus Zubiaga <agus@zed.dev>
This PR renames the `agent::QuoteSelection` to
`agent::AddSelectionToThread` _and_ adds it as a menu item in both the
right-click context menu within regular buffers as well as the
"Selection" app menu.
We've received feedback in the past about how hard to discover this
feature is, and after watching [the Syntax podcast
crew](https://www.youtube.com/watch?v=bRK3PeVFfVE) recently struggle
with doing so—and then naturally looking for it in the context menu and
not finding it—it felt like time to push a change. I think the rename +
the availability in these places could help bringing it to surface more.
The same action can be done in Cursor through the `cmd-l` keybinding,
but in Zed, that triggers `editor::SelectLine`, which I don't want to
override by default. However, if you're using Cursor's keymap, then
`cmd-l` does trigger this action, as expected.
<img width="500" height="1812" alt="Screenshot 2025-10-22 at 12 01@2x"
src="https://github.com/user-attachments/assets/dfc2c41c-8d0a-4a1a-8ea1-1bd5d1aa1171"
/>
Release Notes:
- agent: Improves discoverability of the previously called "quote
selection" action—which allows to add a text selection in a buffer as
context within the agent panel—by renaming it to "add selection to
thread" and making it available from the right-click editor context menu
as well as the "Selection" app menu.
The suggested `→` appears tiny, and almost looks like just a dot on my
monitor, and I got quite confused for a while thinking the
`whitespace_map.tab` setting wasn't working properly.
<img width="630" height="105" alt="Image"
src="https://github.com/user-attachments/assets/98feced2-39b3-4734-83e4-b4573b4e52c2"
/>
I think it would be really helpful if `⟶` was suggested instead since
that displays properly.
<img width="625" height="104" alt="Image"
src="https://github.com/user-attachments/assets/176886ab-cf88-4079-90a8-91a8e8182092"
/>
---
I am using `Fira Code` as my font on windows, however when I remove that
config to get the default font, it also still appears the same size. So
I don't believe this is just a font issue on my machine.
Thought I am using Windows, so I would be willing to believe this a
render issue specific to windows
Release Notes:
- N/A
Reverts zed-industries/zed#40719
This unveiled some bigger issues with the UniformList size computations,
which are more crucial than what was fixed here.
Release Notes:
- NOTE: BUGFIX "Fixed a rare issue where the extension page would
stutter while scrolling." was reverted due to some other issues
This simplifies some code and is also more correct in some others (I
believe some of these might've overflowed causing panics in sentry)
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes#37726
Release Notes:
- Fixed an issue where the buffer would not regain focus when clicked
while a filename edit was in progress in the project panel.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Should be merged with
https://github.com/zed-industries/extensions/pull/3584, which adds
`slang-server` as a new language server, but should be disabled by
default due to an issue with it not initializing on Windows and being a
relatively new language server in general.
Release Notes:
- N/A
Currently running `cargo update` on Zed will break the collab crate
because the versions of sea-orm and sea-orm-macros will not match. This
results in a bunch of noisy warnings from rust-analyzer.
Release Notes:
- N/A
Fixes a bug in https://github.com/zed-industries/zed/pull/39928
The bug caused all completions to appear in bold-face
Release Notes:
- Fixed a bug where bold-face font was applied to the wrong characters
in items in the autocomplete menu
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
In remote connections, we don't detect whether trashing is possible and
generally shouldn't assume it is. This also fixes up some incomplete
logic that was attempting to do that.
Closes#39212
Release Notes:
- No longer show trash option in remote projects
In the process of adding pickers for the theme and icon themes fields in
the settings UI, I felt like there was an improvement opportunity in
regards to where some of these components are stored. The `ui_input`
crate originally was meant only for the text field-like component, which
couldn't be in the regular `ui` crate due to the dependency with
`editor`. Given we had also added the number field there—which is
similar in also having the same dependency—it made sense to think of
this crate more like a home for form-like components rather than for
only one component.
However, we were also storing some settings UI-specific stuff in that
crate, which didn't feel right. So I ended up creating a new directory
within the `settings_ui` for components and moved all the pickers and
the custom input field there. I think this makes it for a cleaner
structure.
Release Notes:
- settings_ui: Added the ability to search for theme and icon themes in
their respective fields.
Follows on from https://github.com/zed-industries/zed/pull/39949.
Again I'm not 100% sure of the intent but I think this is a fix:
`generate_random_string(rng, 4096)` would previously give you a string
of 4096 *chars* which could be anywhere between 4kB and 16kB in bytes.
This seems probably not what was intended, because Ropes generally work
in bytes not chars, including for the offsets used to index into them.
This seems to possibly cause a _regression_ in benchmark performance,
which is surprising because it should generally cause smaller test data.
But, possibly it's doing better at exercising different paths?
cc @mrnugget
Release Notes:
- N/A
This means that existence of activation scripts for venv/virtualenv will
be checked locally either on the host if editing locally, or the remote
by the remote proxy if editing a remote project.
Closes https://github.com/zed-industries/zed/issues/40263
Release Notes:
- N/A
Closes#40748
This PR improves the Centered Layout Padding in settings ui by limiting the numeric stepper to be within valid values and adding a custom schema generated to improve the JSON LSP completions and warnings when editing the setting field manually.
Release Notes:
- settings ui: limit stepper increment for centered padding between 0 and 0.4 and increment by 0.05 now
---------
Co-authored by: Anthony Eid <anthony@zed.dev>
We document the location of the log file in many places, we should just
make it easy to open directly within your file browser. The one thing
here is naming. We use dynamic naming for "reveal" actions in the
project panel, to reflect the right file manager name per OS, but for a
command palette action, I dont think we want to have dynamic code for
the action name, just going with finder at the moment.
Release Notes:
- Added a `zed: reveal log in file manager` action to the command
palette.
- Improves the UI for subfields of dynamic items
- Makes description writing more consistent (add period at the end of
every sentence, fix capitalization of proper names, ensure description
is always in sentence case)
- Other small details, mostly around spacing/padding
Release Notes:
- N/A
Hopefully, this will make the install/configure/uninstall buttons in the
right stand out a bit more and make their presence a bit more obvious
for newcomers.
| Before | After |
|--------|--------|
| <img width="1938" height="1276" alt="Screenshot 2025-10-21 at 10
58@2x"
src="https://github.com/user-attachments/assets/b76115e1-0be2-4d5b-a677-525663d86c7c"
/> | <img width="1938" height="1276" alt="Screenshot 2025-10-21 at 10
53@2x"
src="https://github.com/user-attachments/assets/9e563b71-b11a-4b69-b687-c0b469ca4eec"
/> |
Release Notes:
- Increased affordance of the download button in each extension card in
the extensions page.
Just wanted a single location to point people to for telling them where
to find their log file. I left duplicate text in GitHub Issue templates,
as it seems annoying to have to follow a link when making an issue.
Release Notes:
- N/A
Closes#40608
Release Notes:
- settings_ui: Fixed an issue where tabbing to the nav bar from the
search bar while the nav bar was scrolled would result in the first
_visible_ nav entry being selected, instead of the literal first nav
entry
- settings_ui: Fixed an issue where scrolling the selected nav entry off
screen would cause the keyboard shortcut hint for the focus nav / focus
content binding to dissapear
- settings_ui: Fixed an issue where text input controls could not be
focused via the keyboard
Release Notes:
- Improved text color in LSP document color highlight.
----
Because highlight ranges are implemented using a paint background,
there's no way to control the text color.
I've been thinking about this problem for a long time, want to solve it.
~~Today, I come up with a new idea. Re-rendering the document color text
at the top should solve this problem.~~
#### Update 10/6:
> The previous version is not good, when we have soft wrap text, that
version will not work correct.
Now use exists `bg_segments_per_row` feature to fix text color.
## Before
<img width="563" height="540" alt="image"
src="https://github.com/user-attachments/assets/99722253-0cab-4d2a-a5d1-7f28393bcaed"
/>
## After
<img width="544" height="527" alt="image"
src="https://github.com/user-attachments/assets/a1bf6cdb-0e9c-435d-b14a-6ee9159a63d9"
/>
It keeps popping up in my project searches ... This prevents that. Not
like we are planning on editing that file again.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
In an attempt to figure out what's wrong with `point_to_buffer_offset`
for crash https://github.com/zed-industries/zed/issues/40453. We want to
know which branch among these two is the bad one.
Release Notes:
- N/A
Co-authored-by: Lukas Wirth <lukas@zed.dev>
We were spawning the process on the foreground thread before which can
block an arbitrary amount of time. Likewise we no longer block
deserialization on the terminal loading.
Release Notes:
- Improved startup time on systems with slow process spawning
capabilities
The `vim::visual::Vim.visual_block_motion` method was recently updated
(https://github.com/zed-industries/zed/pull/39355) in order to jump
between buffer rows instead of display rows. However, with this now
being the case, the `break` condition was never met when the motion was
horizontal rather than vertical and soft wrapped lines were used. As
such, this commit udpates the condition to ensure it's always reached,
preventing the hanging from happening.
Release Notes:
- Fixed hang in Vim's visual block motions when updating selections
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
I noticed we had some typos that were getting through CI, but it looks
like the new version of `typos` catches them. So I updated it and fixed
them.
Release Notes:
- N/A
Adds a way to submit feedback about a zeta2 prediction from the
inspector. The telemetry event includes:
- project snapshot (git + unsaved buffer state)
- the full request and response
- user feedback kind and text
Release Notes:
- N/A
I did not bump it for Linux as some machines have smaller disks (~300GB
or so); with Mac, we have at least 1TB on all of our boxes
Release Notes:
- N/A
Following a conversation with the maintainer/owner of
kotlin-language-server, he recommended switching to the official
language server, which is better in many aspects and also more actively
maintained.
Release Notes:
- Made the official Kotlin Language Server the default language server
for Kotlin.
This fixes an issue where we would search for the hovered diff hunk
based on the mouse hit test computed during (or prior) editor paint
instead of the mouse hit test computed prior to the mouse event
invocation.
That in turn could lead to cases where moving the mouse from the editor
to the project panel and then clicking a file shortly after would expand
a diff hunk when actually nothing should happen in that case.
Release Notes:
- Fixed an issue where diff hunks would sometimes erroneously toggle
upon mouse clicks.
I maintain this repository that contains several developer tools like
- ghostty
- zig
- yazi
all of them are updated usually the same day as upstream.
Release Notes:
- N/A
Closes #ISSUE
it is was still in
[discussion](https://github.com/zed-industries/zed/discussions/37983)
Release Notes:
- Added: `--reuse` (`-r`) CLI flag to replace the workspace in an
existing window instead of opening a new one
This PR adds a new `--reuse` (`-r`) CLI flag that allows users to
replace the workspace in an existing Zed window instead of opening a new
one or adding files to the current workspace.
### What it does
The `--reuse` flag finds an available local workspace window and
replaces its workspace with the newly specified paths. This provides a
third workspace opening mode alongside the existing `--add` and `--new`
flags.
### Implementation Details
- **CLI Flag**: Added `--reuse` (`-r`) flag with proper mutual exclusion
with `--add` and `--new`
- **Window Replacement**: Uses the existing `replace_window` option in
`workspace::OpenOptions`
- **Window Selection**: Reuses the first available local workspace
window
- **Fallback Behavior**: When no existing windows are found, creates a
new window
- **Test Coverage**: Added comprehensive test for the reuse
functionality
### Behavior
- `zed -r file.txt` - Replaces the workspace in an available window with
`file.txt`
- If no windows are open, creates a new window (same as default
behavior)
- Mutually exclusive with `-a/--add` and `-n/--new` flags
- Works with multiple files and directories
### Files Changed
- `crates/cli/src/cli.rs` - Added `reuse` field to `CliRequest::Open`
- `crates/cli/src/main.rs` - Added CLI argument definition and parsing
- `crates/zed/src/zed/open_listener.rs` - Implemented reuse logic and
added tests
- `crates/zed/src/zed/windows_only_instance.rs` - Updated for Windows
compatibility
### Testing
- ✅ Unit tests pass
- ✅ Manual testing confirms expected behavior:
- Works when no windows are open
- Replaces workspace in existing window
- Maintains compatibility with existing `-a` and `-n` flags
- Proper help text display
## Manual testing
#### In this first video we do a couple of tests:
* **1**: What happens if we use the -r flag when there are no windows
open?
- works as expected. It opens the files in a new window.
* **2**: Does it work as expected if there is already a window open.
Does it overrides the workspace?
- yes it does. When opening a different file it overrides the current
window instead of creating a new one.
* **3**: Does the -n flag still works as expected?
- yes, it creates the project in a new window
* **4**: What about the -a flag?
- yes, on the last accessed page
* **5**: we do the replace command. It overrides the first opened
window, do we want this behavior?
- It is good enough that it overrides one of the opened windows with the
new project. It still makes the user automatically go to the window with
the specified files
* **6**: we use the -r command again replacing the workspace with a new
one.
- this indeed worked as expected
https://github.com/user-attachments/assets/f1cd7f4b-f4af-4da2-a755-c0be7ce96c0d
#### In here the we check how the --help flag now displays the new
command. (Description was later updated)
https://github.com/user-attachments/assets/a8a7a288-d926-431b-a9f9-a8c3d909a2ec
Closes#39901
I'm unsure as to which direction the team wants to go with this, but
this is the behavior of VSCode which is what this feature is based off
so i'm going with this.
Changes:
1. Introduced a new argument to the `new` method on the Pane called
`ignore_max_tabs` that forces the `max_tabs` to None if it's true.
2. Added a new test `test_bypass_max_tabs_limit`.
Release Notes:
- Fixed: `max_tabs` Setting affecting the terminal pane.
---------
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
This is needed for #38914 and seems generally useful to have for
contextual keybindings.
Release Notes:
- N/A
---------
Co-authored-by: David Kleingeld <davidsk@zed.dev>
Changes that I made:
- add "scrollbar.thumb.active_background" to all themes
- for dark themes: scrollbar.thumb.background is darker than hover (fg4
from palette for background and fg0 for hover)
- for light themes: scrollbar.thumb.background is lighter than hover
(fg4 for background and fg0 for hover like in dark theme case)
Those changes is consistent with VSCode gruvbox theme and other
applications.
For active_background I chose orange color, but we can use cyan color to
match vscode theme.
UPDATE: decided to use blue for active scrollbar as this color is used
as accent in other parts of gruvbox themes
Release Notes:
- Improved scrollbar colors for Gruvbox theme
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
## 🎯 Description
Adds configurable window control buttons (minimize, maximize, close)
positioning for Linux, allowing users to choose between macOS-style
(left side) or Windows-style (right side) placement.
## ✨ Features
- New `title_bar.window_controls_position` setting with `"left"` and
`"right"` options
- Left positioning: macOS style (Close → Minimize → Maximize)
- Right positioning: Windows style (Minimize → Maximize → Close)
- Fixed transparent background issues for window controls
- Maintains consistent styling with Zed's theme
## 🔧 Technical Changes
### Settings System
- Added `WindowControlsPosition` enum in `settings_content.rs`
- Extended `TitleBarSettingsContent` with `window_controls_position`
field
- Updated `TitleBarSettings` to include the new configuration
### Title Bar Layout
- Modified `platform_title_bar.rs` to use setting for layout positioning
- Added conditional logic for `justify_start()` vs `justify_between()`
based on position
- Fixed transparent container background by adding `bg(titlebar_color)`
### Window Controls
- Updated `platform_linux.rs` to reorder buttons based on position
setting
- Changed button background from `ghost_element_background` to
`title_bar_background`
- Implemented proper button sequencing for both positions
## 🧪 How to Test
1. Add to your Zed settings:
```json
{
"title_bar": {
"window_controls_position": "left"
}
}
```
or
```json
{
"title_bar": {
"window_controls_position": "right"
}
}
```
2. Restart Zed
3. Verify buttons are positioned correctly
4. Check that background is not transparent
5. Test button functionality (minimize, maximize, close)
## �� Expected Behavior
- **Left position**: Buttons appear on the left side of the title bar in
Close → Minimize → Maximize order
- **Right position**: Buttons appear on the right side of the title bar
in Minimize → Maximize → Close order
- **Background**: Solid background matching Zed's theme (no
transparency)
## 🔍 Files Changed
- `crates/settings/src/settings_content.rs` - Added enum and setting
- `crates/title_bar/src/title_bar_settings.rs` - Updated settings struct
- `crates/title_bar/src/platform_title_bar.rs` - Modified layout logic
- `crates/title_bar/src/platforms/platform_linux.rs` - Updated button
ordering and styling
## 🎨 Design Rationale
This feature provides Linux users with the flexibility to choose their
preferred window control button layout, improving the user experience by
allowing them to match their desktop environment's conventions or
personal preferences.
## ✅ Checklist
- [x] Code compiles without errors
- [x] Settings are properly serialized/deserialized
- [x] Background transparency issues resolved
- [x] Button ordering works correctly for both positions
- [x] Layout adapts properly based on configuration
- [x] No breaking changes to existing functionality
## 🔗 Related
This addresses the need for customizable window control positioning on
Linux, providing consistency with user expectations from different
desktop environments.

Closes#40608
This fixes tabbing in both the settings ui nav bar and page content
going off screen instead of scrolling the focused element into a visible
view.
The bug occurred because `gpui::list` and `gpui::uniform_list` only
render visible elements, preventing non visible elements in a view from
having their focus handle added to the element tree. Thus making the tab
stop map skip over those elements because they weren't present.
The fix for this is scrolling to reveal non visible elements and then
focus the selected element on the next frame.
Release Notes:
- settings ui: Auto scroll to reveal items in navigation bar and window
when tabbing
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
A cherry-pick of
f5188d55fb
This fixes a hard-to-reproduce crash caused excerpts removal not
updating previous snapshot data after corresponding inlay data was
removed.
Same branch has a test:
8783a9eb4f
that does not fail on `main` due to different way inlays are queried, it
will be merged later.
Release Notes:
- N/A
Closes#5294
This PR adds a line ending indicator to the status bar, hidden by
default as discussed in
https://github.com/zed-industries/zed/issues/5294.
### Changes
- 8b063a22d8700bed9c93989b9e0f6a064b2e86cf add the indicator and
`status_bar.line_endings_button` setting.
- ~~9926237b709dd4e25ce58d558fd385d63b405f3b changes
`status_bar.line_endings_button` from a boolean to an enum:~~
<details> <summary> show details </summary>
- `always` Always show line endings indicator.
- `non_native` Indicate when line endings do not match the current
platform.
- `lf_only` Indicate when using unix-style (LF) line endings only.
- `crlf_only` Indicate when using windows-style (CRLF) line endings
only.
- `never` Do not show line endings indicator.
I know this many options might be overdoing it, but I was torn between
the pleasant default of `non_native` and the simplicity of `lf_only` /
`crlf_only`.
My thinking was if one is developing on a project which exclusively uses
one line-ending style or the other, it would be nice to be able to
configure no-indicator-in-the-happy-case behavior regardless of the
platform zed is running on. But I'm not really familiar with any
projects that use exclusively CRLF line endings in practice. Is this a
scenario worth supporting or just something I dreamed up?
</details>
- 01174191e4cf337069e7a31b0f0432ae94c52515 rename the action context for
`line ending: Toggle` -> `line ending selector: Toggle`.
When running the action in the command palette with the old name I felt
surprised to be greeted with an additional menu, with the new name it
feels more predictable (plus now it matches
`language_selector::Toggle`!)
### Future work
Hidden status bar items still get padding, creating inconsistent spacing
(and it kind of stands out where I placed the line-endings button):
<img alt="the gap after the indicator is larger than for other buttons"
src="https://github.com/user-attachments/assets/24a346d4-3ff6-4f7f-bd87-64d453c2441a"
/>
I started a new follow-up PR to address that:
https://github.com/zed-industries/zed/pull/39992
Release Notes:
- Added line ending indicator to the status bar (disabled by default;
enabled by setting `status_bar.line_endings_button` to `true`)
We very frequently move this in and out of the windows slot map on
`update_window_id` calls (and we call this a lot!). This alone showed up
as `memmove`s at roughly 1% perf in Instruments when scrolling a buffer
which makes sense, `Window` itself is 4kb in size. The fix is simple,
just box the `Window` instances, moving a pointer is cheap in
comparison.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
I noticed that branch picker doesn't close until the checkout operation
is completed.
While normally it's not an issue, it becomes obvious if there are longer
running post checkout hooks. In that case selecting a branch makes it
feel like nothing has happened (there's a small indicator in the footer)
so it's possible to click it multiple times. Closing the modal before
the operation completes leads to the error modal saying `Failed to
change branch. entity released. Please try again.` even though the
checkout was successful.
The new behavior is to close the branch picker as soon as the branch is
selected. This also aligns with the existing behavior in `create_branch`
where `cx.emit(DismissEvent);` is called without waiting for
`repo.update`.
And as I mentioned before there an indicator in the footer saying `git
switch <branch_name>` with a spinner thingy.
I also added a check in the picker's `open` function where it first
checks if there's currently an active job and does not show the picker
in that case.
If this generally makes sense I can add the tests as well if needed.
P.S I checked how it works in VSCode and yes it also closes the branch
picker as soon as the branch is selected. The only difference is that
they show the loading indicator right next to the branch name (with a
new branch) but in our case the current branch and activity indicator
are located in different places.
<details><summary>Before</summary>
https://github.com/user-attachments/assets/adf08967-d908-45fa-b3f6-96f73d321262
</details>
<details><summary>After</summary>
https://github.com/user-attachments/assets/88c7ca41-7b39-42d6-a98b-3ad19da9317c
</details>
Release Notes:
- The branch picker now closes immediately after a branch is selected,
instead of waiting for the branch switch to complete.
Closes#39865
Release Notes:
- Fixed file finder display when searching for files in history if you
had several worktrees opened in a workspace. It now displays the
worktree root name to avoid confusion if you have several files with
same name in different worktrees.
---------
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Closes #ISSUE
Adds a `Maybe<T>` type to `settings_content`, that makes the distinction
between `null` and omitted settings values explicit. This unlocks a few
more settings in the settings UI
Release Notes:
- N/A *or* Added/Fixed/Improved ...
We were dropping the entities once we created the buffers, so the weak
entities could never be upgraded. This treats new locations we see the
same as we would for a read/write call and stores the entity so that we
can follow like we normally would.
Release Notes:
- acp: Fix following not working with certain tool calls.
I love keybindings.
I spend way to much time thinking about them.
I also REALLY like working in Zed.
so far, however, I have found the key context system in Zed to be less
flexible than in VSCode.
the HUGE context that is available in VSCode helps you create
keybindings for very specific targeted scenarios.
the tree like structure of the Zed key context means you loose some
information as focus moves throughout the application.
For example, it is not currently possible to create a keybinding in the
editor that will only work when one of the Docks is open, or if a
specific dock is open.
this would be useful in implementing solutions to ideas like #24222
we already have an action for moving focus to the dock, and we have an
action for opening/closing the dock, but to my knowledge (very limited
lol) we cannot determine if that dock *is open* unless we are focused on
it.
I think it is possible to create a more flexible key binding system by
adding more context information to the higher up context ancestors.
while:
```
Workspace right_dock=GitPanel
Dock
GitPanel
Editor
```
may seem redundant, it actually communicates fundamentally different
information than:
```
Workspace right_dock=GitPanel
Pane
Editor
```
the first says "the GitPanel is in the right hand dock AND IT IS
FOCUSED",
while the second means "Focus is on the Editor, and the GitPanel just
happens to be open in the right hand dock"
This change adds a new set of identifiers to the `Workspace` key_context
that will indicate which docks are open and what is the specific panel
that is currently visible in that dock.
examples:
- `left_dock=ProjectPanel`
- `bottom_dock=TerminalPanel`
- `right_dock=GitPanel`
in my testing the following types of keybindings seem to be supported
with this change:
```jsonc
// match for any value of the identifier
"context": "Workspace && bottom_dock"
"context": "Workspace && !bottom_dock"
// match only a specific value to an identifier
"context": "Workspace && bottom_dock=TerminalPanel"
// match only in a child context if the ancestor workspace has the correct identifier
"context": "Workspace && !bottom_dock=DebugPanel > Editor"
```
some screen shots of the context matching in different circumstances:
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 20 34"
src="https://github.com/user-attachments/assets/116d0575-a1ae-4577-95b9-8415cda57e52"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 20 57"
src="https://github.com/user-attachments/assets/000fdbb6-80bd-46e9-b668-f4b54ab708d2"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 21 37"
src="https://github.com/user-attachments/assets/7b1c82da-b82f-4e14-a97c-3cd0e71bbca0"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 21 52"
src="https://github.com/user-attachments/assets/1fd4b65a-09f7-47a9-a9b7-fdce4252aec3"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 22 38"
src="https://github.com/user-attachments/assets/f4c2ac5c-e6f9-4e0e-b683-522b237e3328"
/>
the persistent_name values for `ProjectPanel` and `OutlinePanel` needed
to be updated to not have a space in them in order to pass the
`Identifier` check. all the other Panels already had names that did not
include spaces, so it just makes these conform with the other ones.
I think this is a great place to start with adding more context
identifiers and i think this type of additional information will make it
possible to create really dynamic keybindings!
Release Notes:
- Workspace key context now includes the state of the 3 docks
Reduces peak stack usage in these functions and should generally be a
bit performant.
Display map benchmark results
```
To tab point/to_tab_point/1024
time: [531.40 ns 532.10 ns 532.97 ns]
change: [-2.1824% -2.0054% -1.8125%] (p = 0.00 < 0.05)
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
To fold point/to_fold_point/1024
time: [530.81 ns 531.30 ns 531.80 ns]
change: [-2.0295% -1.9054% -1.7716%] (p = 0.00 < 0.05)
Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe
```
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Continues the work from #35927 to add a git diff view for stash entries.
[Screencast From 2025-09-17
19-46-01.webm](https://github.com/user-attachments/assets/ded33782-adef-4696-8e34-3665911c09c7)
Stash entries are [represented as
commits](https://git-scm.com/docs/git-stash#_discussion) except they
have up to 3 parents:
```
.----W (this is the stash entry)
/ /|
-----H----I |
\|
U
```
Where `H` is the `HEAD` commit, `I` is a commit that records the state
of the index, and `U` is another commit that records untracked files
(when using `git stash -u`).
Given this, I modified the existing commit view struct to allow loading
stash and commits entries with git sha identifier so that we can get a
similar git diff view for both of them.
The stash diff is generated by comparing the stash commit with its
parent (`<commit>^` or `H` in the diagram) which generates the same diff
as doing `git stash show -p <stash entry>`. This *can* be
counter-intuitive since a user may expect the comparison to be made
between the stash commit and the current commit (`HEAD`), but given that
the default behavior in git cli is to compare with the stash parent, I
went for that approach.
Hoping to get some feedback from a Zed team member to see if they agree
with this approach.
Release Notes:
- Add git diff view for stash entries
- Add toolbar on git diff view for stash entries
- Prompt before executing a destructive stash action on diff view
- Fix commit view for merge commits (see #38289)
Add new `workspace::NewFileSplit` action which expects a
`SplitDirection` argument, allowing users to programmatically control
the direction of the split in keymaps, for example:
```json
{
"context": "Editor",
"bindings": {
"ctrl-s ctrl-h": ["workspace::NewFileSplit", "left"],
"ctrl-s ctrl-j": ["workspace::NewFileSplit", "down"],
"ctrl-s ctrl-k": ["workspace::NewFileSplit", "up"],
"ctrl-s ctrl-l": ["workspace::NewFileSplit", "right"]
}
}
```
Release Notes:
- Added `workspace::NewFileSplit` action, which can be used to
programmatically split the editor in the provided direction.
Co-authored-by: Rian Drake <rian.drake@rocketwerkz.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
This is an in-progress work on changing how task scheduler affects
performance of project search. Instead of relying on tasks being
executed at a discretion of the task scheduler, we want to experiment
with having a set of "agents" that prioritize driving in-progress
project search matches to completion over pushing the whole thing to
completion. This should hopefully significantly improve throughput &
latency of project search.
Release Notes:
- Improved project search performance
---------
Co-authored-by: Smit Barmase <smit@zed.dev>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Release Notes:
- Added comment language injections for builtin languages. This enables
highlighting of `TODO`s and similar notes with the comment extension
installed.
Signed-off-by: Donnie Adams <donnie@thedadams.com>
Related to #9461, inspired by #39683
`await` and `yield` both seem somewhat debatable on whether they should
be considered the be control flow keywords.
For now I went with:
- `await`: no – The control flow effect of `await` is at a level does
not seem relevant for syntax highlighting.
- `yield`: yes – `yield` directly affects the output of a generator, and
is also included for consistency with Rust (#39683).
Happy to change these either direction.
<img width="1151" height="730" alt="SCR-20251008-izus"
src="https://github.com/user-attachments/assets/533ea670-863a-4c5c-aaa5-4a9bfa0bf0dd"
/>
---
Release Notes:
- Improved granularity of keyword highlighting for JS/TS/TSX: Themes can
now specify `keyword.control` for control flow keywords like `if`,
`else`, `return`, etc.
Adding this content after seeing people ask about how to make MCP
servers installed from Zed be picked up by external agents. At the
moment, this varies depending on the agent, and felt relevant to be
documented.
Release Notes:
- N/A
- Notable change is the use of a newtype for `ReplicaId`
- Fixes `WorktreeStore::create_remote_worktree` creating a remote
worktree with the local replica id, though this is not currently used
- Fixes observing the `Agent` (that is following the agent) causing
global clocks to allocate 65535 elements
- Shrinks the size of `Global` a bit. In a local or non-collab remote
session it won't ever allocate still.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Let's say you run this:
```
cd ~/proj-a
zed ~/proj-b
```
The `zed` process will execute with `current_dir() = ~/proj-a`, but a
`worktree_root_path() = ~/proj-b`. The old detection was then checking
if the Yarn SDK was installed in `proj-a` to decide whether to set the
tsdk value or not. This was incorrect, as we should instead check for
the SDK presence inside `proj-b`.
Release Notes:
- Fixed the Yarn SDK detection when the Zed pwd is different from the
opened folder.
The page about PHP in the docs doesn’t explain how to use Xdebug. I had
a lof of trouble setting it up the first time, then recently had another
headache trying to get it to work again, because the value for `adapter`
had changed from `PHP` to `Xdebug`.
It’s likely that my example config isn’t perfect or has redundant stuff
or whatever, feel free to amend it.
I also took the liberty to set the Phpactor and Intelephense headings to
level 3 because I felt like they were part of "Choosing a language
server."
Release Notes:
- N/A
# Why
While working on recent PR I have spotted that "Stage" and "Unstage"
buttons in "Uncommited Changes" toolbar are always active, even when
there is no changes made locally.
<img width="1628" height="656" alt="Screenshot 2025-10-10 at 00 49 06"
src="https://github.com/user-attachments/assets/6bdb9ded-17c8-4f84-8649-b297162c1992"
/>
# How
Re-use already existing button states for managing the disabled state of
"Uncommited Changes" toolbar buttons when changeset is empty.
Release Notes:
- Added disabled state for "Uncommited Changes" toolbar buttons when
there are no changes present
# Preview
<img width="1728" height="772" alt="Screenshot 2025-10-10 at 08 40 14"
src="https://github.com/user-attachments/assets/ff41d852-974e-4ce1-9163-ecd30e17d5d8"
/>
Closes#37322
Uses SFTP if available, otherwise falls back to SCP for uploading files
and directories to remote. This fixes an issue on older macOS versions
where outdated SCP can throw an ambiguous target error.
Release Notes:
- Fixed an issue where extensions wouldn’t work when SSHing into a
remote from older macOS versions.
Though we ship with `basedpyright`, `ruff` and a few other laps for
python, we run them all at once.
Release Notes:
- Only enable `basedpyright` and `ruff` by default when opening Python
files. If you prefer one of the other.
Refactor the find_tab_group method to use the question mark operator for
cleaner error handling, replacing the explicit if-else pattern with a
more concise chained approach.
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
### Problem
On Windows, the right Alt key was not working in keybindings (e.g.,
`Ctrl+Right Alt+B`), while the left Alt key worked correctly. This was
due to overly aggressive AltGr detection that treated any `right Alt +
left Ctrl` combination as AltGr, even on US keyboards where AltGr
doesn't exist.
### Root Cause
Windows internally represents AltGr (Alt Graph) as `right Alt + left
Ctrl` pressed simultaneously. The previous implementation always
excluded this combination from being treated as regular modifier keys to
support international keyboards. However, this broke keybindings using
right Alt on US/UK keyboards where users expect right Alt to behave
identically to left Alt.
### Solution
Implemented keyboard layout-aware AltGr detection:
1. Added `uses_altgr()` method to `WindowsKeyboardLayout` that checks if
the current keyboard layout is known to use AltGr (German, French,
Spanish, Polish, etc.)
2. Modified `current_modifiers()` to only apply AltGr special handling
when the keyboard layout actually uses it
3. Added explicit checking for both `VK_LMENU` and `VK_RMENU` instead of
relying solely on the generic `VK_MENU`
### Behavior
- **US/UK keyboards**: Right Alt now works identically to left Alt in
keybindings. `Ctrl+Right Alt+B` triggers the same action as `Ctrl+Left
Alt+B`
- **International keyboards** (German, French, Spanish, etc.): AltGr
continues to work correctly for typing special characters and doesn't
trigger keybindings
- **All keyboards**: Both Alt keys are detected symmetrically, matching
the behavior of left/right Windows keys
### Testing
Manually tested on Windows with US keyboard layout:
- `Ctrl+Left Alt+B` triggers keybinding
- `Ctrl+Right Alt+B` triggers keybinding
- Both Alt keys work independently in keybindings
Release Notes:
- Fixed Right Alt key not working in keybindings on Windows
Release Notes:
- Fixed misplaced comma in the autoclose description from:
"when you type (, Zed will ...)"
to
"when you type, (Zed will ...)"
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
`env_logger` defaults to only showing error-level logs, but we show
info-level logs and above for the main Zed process, so I think it makes
sense for the remote server to behave the same way.
Release Notes:
- N/A
Re-applies https://github.com/zed-industries/zed/pull/30840
This PR re-applies the initial
[PR](https://github.com/zed-industries/zed/pull/30840). As it was closed
because it was hard to land, because of the many conflicts. This PR
re-applies the changes for it.
In several cases we were creating multiple display_map
snapshots within the same root-level function call.
Creating a display_map snapshot is quite slow, and in some
cases we were creating the snapshot multiple times.
Release Notes:
- N/A
We've been considering removing workspace-hack for a couple reasons:
- Lukas ran into a situation where its build script seemed to be causing
spurious rebuilds. This seems more likely to be a cargo bug than an
issue with workspace-hack itself (given that it has an empty build
script), but we don't necessarily want to take the time to hunt that
down right now.
- Marshall mentioned hakari interacts poorly with automated crate
updates (in our case provided by rennovate) because you'd need to have
`cargo hakari generate && cargo hakari manage-deps` after their changes
and we prefer to not have actions that make commits.
Currently removing workspace-hack causes our workspace to grow from
~1700 to ~2000 crates being built (depending on platform), which is
mainly a problem when you're building the whole workspace or running
tests across the the normal and remote binaries (which is where
feature-unification nets us the most sharing). It doesn't impact
incremental times noticeably when you're just iterating on `-p zed`, and
we'll hopefully get these savings back in the future when
rust-lang/cargo#14774 (which re-implements the functionality of hakari)
is finished.
Release Notes:
- N/A
A small follow-up to the settings refactor of a few weeks ago to move
all the VSCode settings imports
to one place.
This should make it easier to spot missing imports, and easier to test
the importer.
Release Notes:
- N/A
It is now possible to configure logging level of CodeLLDB adapter via
envs specified in project settings like so:
```
{
"dap": {
"CodeLLDB": {
"envs": {
"RUST_LOG": "debug"
}
}
}
}
```
Release Notes:
- N/A
`MultiBuffer::anchor_in_excerpt` currently just wraps the given text
anchor in a multibuffer anchor. This allows one to get a multibuffer
anchor that points outside its excerpt which is basically never what one
wants. This PR now does a bounds check and returns `None` if the given
text anchor is not within the bounds of the excerpt.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Closes #ISSUE
Includes the start of how we can get rid of most of the `.unimplemented`
"Edit in JSON" buttons in the settings UI. For now only Theme selection
is implemented, follow ups will add more settings
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Fixes#40034
Release Notes:
- `ctrl-c` (when you have a selection) and `ctrl-v` are now bound to
copy and paste by default in the windows terminal.
Co-authored-by: John Tur <john-tur@outlook.com>
Close#35715
Release Notes:
- Fixed to wrap long URLs in editor.
<img width="836" height="740" alt="image"
src="https://github.com/user-attachments/assets/635ce792-5f19-4c76-b131-0d270d09b103"
/>
I remember when I was working on CJK line wrapping support in the early
days, I considered making `\` a line wrapping character, but for some
reason it was on the list of characters that were not allowed to wrap.
In reference to VS Code, it looks like `&`, `/`, `?` should wrap, so I
removed all of them.
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This is a follow-up PR to
https://github.com/zed-industries/zed/pull/39609, and attempts to
address hidden status bar items still contributing to the layout and
creating extra spacing.

- 203cbd634bfb1489b8afa4952d9594615a956b77 Adds a `.none()` method to
the `gpui::Styled` helper trait, so that status items can set their
display type to none inside their `render` method.
- 249f06e3de63b0ab32814f20e7105d8e2b642f02 Applies `.none()` to all the
status items.
- ~~499f564906c88336608c81615b11ebc9ab43d832~~ At first I was adding an
`is_visible` method to the `StatusBarView` trait, which would be used to
skip status bar items which would just render an empty div anyway, but I
felt duplicating the conditions for hiding the buttons between the
status items `is_visible` and `render` methods could be an attraction
for bugs, so I tried to find another approach. This commit contains
those changes, reverted immediately (if the `is_visible` approach is
preferred I can bring it back!)
- f37cb75f0519ceea1f3e1cc4f97087a5cb34b0fd (bonus!) Adds a condition to
the vim mode indicator to avoid a leading space when there are no
pending keys.
Release Notes:
- N/A
Hello,
Thanks for the great work.
I am adding some more bindings for the emacs keymap:
- `command_palette::Toggle` as replacement for the emacs command
dispatcher
- other default aliases for existing move / delete commands
- e.g. `alt-left` to move to previous word and `alt-del` to delete it
- some missing `SelectTo` equivalents for move commands on selection
mode
Release Notes:
- Added bindings for the Emacs keymap
The built-in Tailwind language already maps `HTML+ERB` to `erb`, and it
seems that `Ruby` files work as well just from enabling the language
server, so we can remove the unnecessary mapping.
Release Notes:
- N/A
Follow-up after #40417, which should've fixed hangs.
smol::fs uses a separate threadpool, which is a bit yuck.
This PR also added a benchmark you can use to run a full worktree scan
(initial one, that is) for arbitrary worktree.. and refactored worktree
scanner to use async locks, as otherwise tests were deadlocking. :)
I've benchmarked it against Zed, Linux and Chromium and saw a ~60% drop
in initial worktree scan times across the board.
Release Notes:
- Significantly (3.3x speedup over the old implementation) improved
speed of Zed's worktree scanner, that's responsible for synchronizing
the state of your project with the state of files on hard drive.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Using a seeded PRNG to produce consistent test data and reduce
variability makes sense.
However, the way it was used previously, by always cloning the RNG,
means that every generated string is the same, and every offset is the
same. After this change, the tested value stream should still be the same on
each run of the benchmark, but the values within each run will vary.
The `generate_random_text` measured in chars also seems possibly
inconsistent with later comments about it being a number of bytes.
Release Notes:
- N/A
This caused issues with #40172, as it made Zed execute and block on tad
few more background tasks. Parker is ~cheap to create, hence we should
be ok to just create it at the time it is needed.
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Closes#40359
We were segfaulting when opening a UTF-8 file starting with a byte order
mark due to a mismatch in our UTF-16 indexing calculations caused by
Core Foundations `replace_str` stripping the BOM internally. This PR
fixes the crash by replacing one of our manual calculations by calling
the Core Foundations API to get the length of a string.
Release Notes:
- Fixed a crash on macOS when opening a file that starts with a UTF-8
byte order mark (BOM).
Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
# Why
While playing with new Settings UI I have spotted that changing font
weight requires a lot of clicks. This is also a bit more annoying due to
lack of ability to enter the desired value by hand.
# How
Adjust step values for Font Weight stepper, the default increment has
been changed from 10 to 50, to cover (defined in spec `950` weight)
which some fonts might use, small step has been changed from 5 to 10,
and large step from 50 to 100.
Release Notes:
- Adjusted default step values for number input UI element used for
changing Font Weight in Settings UI.
Closes#40334
This reverts the change made in #39983, and includes a replacement
migration that will transform formatter settings values consisting of
only `code_action` format steps into the previously deprecated
`code_actions_on_format` in an attempt to restore the behavior to what
it was before the migration that deprecated `code_actions_on_format`.
This PR will result in a modified order in the `code_actions_on_format`
setting if it existed, however the decision was made to explicitly
ignore this for now, as this PR is primarily targeting users who have
already had the deprecation migration run, and no longer have the
`code_actions_on_format` key
Release Notes:
- Fixed an issue with a settings migration that deprecated the
`code_actions_on_format` setting. The `code_actions_on_format` setting
has been un-deprecated, and affected users will have the bad migration
rolled back with an updated migration
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
`vim::Substitute` is a little different from the helix behavior, so this
PR adds helix versions. The most important difference (for my usage, at
least) is that if you're selecting whole lines then helix drops the `\n`
from the selection (much like vim's lines mode, except that helix bases
this behavior on the selection instead of having a different mode).
Release Notes:
- N/A
Closes#33637Closes#37332
and solves part of
https://github.com/zed-industries/zed/discussions/33580#discussioncomment-14195506
This improves the "C" and "alt-C" actions to work like helix.
It also adds "," which removes all but the newest cursors. In helix the
one that's left would be the primary selection, but I don't think that
has an equivalent yet, so this simulates what would be the primary
selection if it was never cycled with "(" ")".
Release Notes:
- Improved multicursor creation and deletion in helix mode
---------
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Instead of producing multiple code blocks for each edit history event,
we now produce a continuous unified diff.
Release Notes:
- N/A
---------
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Update the keybindings used in the default keymaps to better align with
VSCode's defaults, with the following changes:
* Windows & Linux
* `ctrl-enter` has been replaced by `ctrl-i` for
`assistant::InlineAssist`
* `ctrl-shift-space` maps to `editor::ShowSignatureHelp` instead of
`editor::ShowWordCompletions`
* MacOS
* `ctrl-enter` has been replaced by `cmd-i` for
`assistant::InlineAssist`
* `cmd-i` has been replaced by `cmd-shift-space` for
`editor::ShowSignatureHelp`
Closes#39278
Release Notes:
- Changed the keybinding for `assistant: inline assist` from
`ctrl-enter` to `ctrl-i` for both Linux and Windows, and `cmd-i` for
MacOS. If you'd like to restore the old behavior, update your keymap
file with:
```
{
"context": "!ContextEditor > Editor && mode == full",
"bindings": {
"ctrl-enter": "assistant::InlineAssist"
}
}
```
- Changed the action dispatched by `ctrl-shift-space` from
`editor::ShowWordCompletions` to `editor::ShowSignatureHelp` on both
Linux and Windows. If you'd like to restore the old behavior, update
your keymap file with:
``` {
"context": "Editor",
"bindings": {
"ctrl-shift-space": "editor::ShowWordCompletions"
}
}
```
- Changed the keybinding for `editor: show signature help` on MacOS from
`cmd-i` to `cmd-shift-space`. If you'd like to restore the old behavior,
update your keymap file with:
``` {
"context": "Editor",
"bindings": {
"cmd-i": "editor::ShowSignatureHelp"
}
}
```
---------
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Closes#39786
Release Notes:
- Fixed: Settings popup no longer keeps the process alive when closing
Zed on Windows
---------
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Closes#40270
Release Notes:
- Fixed an issue with the settings migration to flatten `code_actions`
format steps where comments would cause enabled code actions to be
omitted from the migrated settings. If you were effected, restoring the
settings file backup and allowing the migration to re-run will result in
a valid settings file
- Fixed an issue where automated settings and keymap file updates would
occasionally assume 4-space indentation
smol::fs uses a separate threadpool, which is a bit yuck.
This PR also added a benchmark you can use to run a full worktree scan
(initial one, that is) for arbitrary worktree.. and refactored worktree
scanner to use async locks, as otherwise tests were deadlocking. :)
I've benchmarked it against Zed, Linux and Chromium and saw a ~60% drop
in initial worktree scan times across the board.
Release Notes:
- Significantly (3.3x speedup over the old implementation) improved
speed of Zed's worktree scanner, that's responsible for synchronizing
the state of your project with the state of files on hard drive.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
- Add `skip_soft_wrap` field to both `AddSelectionAbove` and
`AddSelectionBelow` actions. When set to `true`, which is now
the default this will skip soft wrapped lines when extending the
selections.
- Move the `start_of_relative_buffer_row` function from the
`vim::motion` module to the `editor::display_map::DisplaySnapshot`
implementation as a method.
- Update the default behavior for both `editor: add selection above` and
`editor: add selection below` commands in order to skip over soft
wrapped lines by default, mirroring VS Code's default behavior.
- Update existing keymaps to specify this `skip_soft_wrap` value for
both `AddSelectionAbove` and `AddSelectionBelow` actions.
Closes#16979
Release Notes:
- Updated both the `editor: add selection above` and `editor: add
selection below` commands to ignore soft wrapped lines. If you wish to
restore the old behavior, add the following to your keymap file:
```
{
"context": "Editor",
"bindings": {
"cmd-alt-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": false
}],
"cmd-alt-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": false
}]
}
}
```
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Moves the Codex warning into the thread so that we can render it nicer,
as well as provide an option to open the folder in WSL.
Release Notes:
- N/A
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
`TaskDialogIndirect` may return `IDCANCEL` when the user quits the
dialog via escape or alt+f4, so we need to account for that.
Fixes ZED-25H
Release Notes:
- Fixed panic when hitting escape in dialogs on windows
Closes#40234
Release Notes:
- Added `open_file_on_paste` setting to configure auto opening of file
on paste in the project panel.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
### What does this PR do?
- Adds default keybindings `gt` for navigating to the next tab and `gT`
for navigating to the previous tab in markdown viewer mode
### Why do we need this change?
- While previewing markdown files, the default vim bindings (`gt` and
`gT`) do not work for navigating between tabs. These bindings work
everywhere else, which provides a non-consistent experience for the
user.
### How do we do this change?
- Update the vim mode bindings to explicitly add handling for this mode
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Release Notes:
- N/A
---
- Set `.SystemUIFont` as the GPUI default font.
- Add `Arial` to font fallback list.
- Add `Adwaita Sans` to default fallback list for Gnome.
- Move `Ubuntu` font to front of Gnome to make sure Ubuntu System takes
priority over `Ubuntu` font.
Our application get some crash report:
```
panicked at /Users/admin/.cargo/git/checkouts/zed-a70e2ad075855582/f1db3b4/crates/gpui/src/text_system.rs:150:9:
failed to resolve font 'Helvetica' or any of the fallbacks: Zed Plex Mono, Helvetica, Segoe UI, Cantarell, Ubuntu, Noto Sans, DejaVu Sans
```
This change to add `Arial` to fallback list, this font was included in
macOS and Windows.
Ref link (search "Arial"):
> Mac OS X (now known as [macOS](https://en.wikipedia.org/wiki/MacOS))
was the first Mac OS version to include Arial;
> https://en.wikipedia.org/wiki/Arial
- macOS Sequoia: https://support.apple.com/en-us/120414
- Windows 10:
https://learn.microsoft.com/en-us/typography/fonts/windows_10_font_list
- Gnome: https://developer.gnome.org/hig/guidelines/typography.html
Having the chevron to the side of the avatar is arguably unnecessary at
this point; most apps out there (Reddit, YouTube, etc.), including here
on GitHub, have the avatar without any icon, pointing to how there
doesn't seem to be a problem with knowing that there's a menu behind it.
Therefore, figured we could simplify the UI a bit more here.
This also looks better on platforms where the window controls are on the
right (Linux/Windows).
Release Notes:
- N/A
Making all triggers have the same style when the picker is open
(including changing the icon when the picker opens on top of the
trigger). Also removed the footer from the ACP model selector given
there's nothing to consider when that's the case; users can only
configure LLM providers when using Zed's built-in agent.
Release Notes:
- N/A
Updates #40212
v0.9.0 is now stable and contains the fix for the line endings bug, so
we can return to installing from the stable channel as usual. This also
bumps the minimum version on Windows to v0.9.0 so that anyone on v0.8.x
or v0.9.0-preview.4 will be upgraded automatically.
Release Notes:
- N/A
This PR improves the rendering performance of the Settings UI window by
using `gpui::list` to render only the visible contents of a settings
page, instead of rendering the full content of a page. This fixes a lag
that the editor page has in debug builds.
I also added a new field `measuring_behavior` to `ListState` that has
`Visible` and `Measured` variances. `Visible` only measures and caches
the bounds of visible items plus the overdraw pixel offset. `Measure`
will cache all items’ bounds on the first layout phase, which fixes
problems with the scrollbar size/position being miscalculated.
Release Notes:
- N/A
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
This is the first towards better logs for adapter binaries. Next up I
intend to somehow allow `codelldb` adapter in Zed to permit simple log
level so that we can pass `RUST_LOG=level` when spawning the child
process.
Release Notes:
- N/A
Makes the dropdown trigger button styling consistent with the other
buttons and allows to add a tooltip in the trigger through the popover's
`trigger_with_tooltip` method.
Release Notes:
- N/A
Currently, using cmd-f or cmd-shift-f to search while a modal is active
(e.g. after cmd-t or cmd-p) doesn't do anything — you need to first
close the modal manually before initiating a search. This PR allows
these actions to run regardless of whether a modal is active.
Some context: VSCode lets you do this too, and for me it's quite common
to do a symbol search with cmd-t immediately followed by a regular
search with cmd-shift-f if I don't find what I'm looking for, so having
to close the modal first is slightly disruptive. cmd-t followed by cmd-p
does dismiss the project symbols modal in order to display the file
search modal, so it makes sense to me to also allow search actions to
dismiss an active modal.
Maybe this blunt fix has unintended consequences? If some types of
modals shouldn't be dismissed when running cmd-f, or some actions
shouldn't dismiss a currently active modal, then we'll have to go about
it differently.
Release Notes:
- Added the ability to run search actions when a modal is currently
active
We've been seeing the occasional `cannot seek backwards` panic within
`SelectionsCollection` without means to reproduce.
I believe the cause is one of the callers of
`MutableSelectionsCollection::select` not passing a well formed
`Selection` where `start > end`, so this PR enforces the invariant in
`select` by swapping the fields and setting `reversed` as required as
the other mutator functions already do that as well.
We could also just assert this instead, but it callers usually won't
care about this so its the less user facing annoyance to just fix this
invariant up internally.
Fixes ZED-253
Fixes ZED-ZJ
Fixes ZED-23S
Fixes ZED-222
Fixes ZED-1ZV
Fixes ZED-1SN
Fixes ZED-1Z0
Fixes ZED-10E
Fixes ZED-1X0
Fixes ZED-12M
Fixes ZED-1GR
Fixes ZED-1VE
Fixes ZED-13X
Fixes ZED-1G4
Release Notes:
- Fixed occasional panics when querying selections
Adds a new `NumberedLines` format which is similar to `MarkedExcerpt`
but each line is prefixed with its line number.
Also fixes a bug where contagious snippets wouldn't get merged.
Release Notes:
- N/A
---------
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Co-authored-by: Michael <michael@zed.dev>
We were clearing the message editor too early. We only want to clear the
message editor if we are going to short circuit and return early before
submitting.
Otherwise, the agents that can handle this themselves won't have the
ability to do so.
Release Notes:
- acp: Fix /logout not working for some agents
Windows not having a default shell does not matter here, we might still
have an environment from other means (by being spawned from the cli for
example).
Release Notes:
- N/A *or* Added/Fixed/Improved ...
No need to clutter the `--help` docs with default directories for
platforms other than the current one.
Release Notes:
- N/A
Co-authored-by: David Kleingeld <davidsk@zed.dev>
Follow-up to #39248
- Correctly forward ports over SSH, including the port from the debug
scenario's `url`
- Give the companion time to start up, instead of bailing if the first
connection attempt fails
Release Notes:
- Fixed not being able to launch a browser debugging session in an SSH
project.
We automatically delete a local workspace if the folders comprising it
no longer exist.
If a local workspace points to folders in the WSL filesystem, checking
whether those folders exist will make us wait for the WSL VM and file
server to boot up. This can block Zed startup for many seconds.
Supported scenarios use remote workspaces, so delete these local
workspaces to ensure that we don't try to access their folders on the
startup path.
Release Notes:
- N/A
Retrieval stats will now use polars to build a big data frame for
references with the cartesian product of LSP declarations and retrieved
declaration candidates (with all their score components) and rebuilds
the stats summary on top of it.
This data frame is written to a `.parquet` file, which we can load into
advanced analytics tools (such as Metabase), so we can explore our
scoring distributions and find ways to improve retrieval, and then train
the decision tree.
Release Notes:
- N/A
Fix issue where Zed would unconditionally override user's custom shell
with system default from passwd entry.
Closes https://github.com/zed-industries/zed/issues/40171
Release Notes:
- Fix issue where Zed would unconditionally override user's custom shell
with system default from passwd entry.
---------
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Added a "Copy All Messages" button to the ACP logs toolbar that copies
all messages in the watched stream to the clipboard as structured JSON.
## Motivation
When troubleshooting ACP protocol implementations, it's helpful to
provide the entire message thread to an LLM for analysis. Previously, I
had to copy individual messages one at a time, which was tedious and
time-consuming. This feature allows copying the entire conversation
history in a single click.
Release Notes:
- Added: Copy All Messages button to ACP logs view
---------
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
This reverts commit f1db1f3a3c.
This seems to have affected the vertical positioning of text that
doesn't contain emojis in a way that was unintended.
Release Notes:
- N/A
Previously, if a tool call's output was just text, it would be collapsed
with no way to open it.
Now we track the collapsed cards instead of the expanded ones to allow
all tool calls to be expanded by default, and only collapse the ones
required by settings changes
Release Notes:
- acp: Fix tool call markdown output unintentionally being collapsed by
default
This moves some of the changes made in
https://github.com/zed-industries/zed/pull/39543 to the `publish_gpui`
script.
This PR also updates that script to use `gpui_` instead of `zed-` (where
possible)
Release Notes:
- N/A
This applies the same change as #39466 to the terminal codepath for
external agents.
Release Notes:
- N/A
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Fixes a bug mentioned in
https://github.com/zed-industries/zed/issues/38891
Release Notes:
- Fixed a bug where environment variables like `NODE_EXTRA_CA_CERTS`
were not loaded from the user's shell initialization scripts in WSL or
SSH remote projects.
Co-authored-by: Cole Miller <cole@zed.dev>
This PR fixes a bug where the review icon button wouldn't properly open
the review tab if you weren't focused in the agent panel's message
editor. The solution was to register the action also at the workspace
level.
Release Notes:
- agent: Fixed a bug where the review icon button wouldn't work to open
the review tab if focus weren't in the panel's message editor.
Fixes#39998
Debugpy and pylsp are installed in a Zed-global venv with pip. We need a
Python interpreter to create this venv when it doesn't exist and one of
these tools needs to be installed, and sometimes we attempt to use
`python3` from `$PATH`. This can cause issues on Windows, where out of
the box `python3` is a sort of shim that opens the Microsoft Store app.
This PR changes the debugpy installation path to create the Zed-global
venv using the Python interpreter from a venv in the project, and only
use python3 from `$PATH` if that fails. That matches how pylsp
installation already works. It also tightens up how we search for a
global Python installation by doing a basic sanity check (`python3 -c
'print(1 + 2)`) before accepting it, which should catch the Windows
shim.
Release Notes:
- windows: improved the behavior of Zed in situations where no global
Python installation exists.
Follow up for: #39983 and
https://github.com/zed-industries/zed/pull/40040#issuecomment-3393902691
Previously it was possible to have formatting done using prettier or
language server using `"formatter": "auto"` and specify code actions to
apply on format using the `"code_actions_on_format"` setting. However,
post #39983 this is no longer possible due to the removal of the
`"code_actions_on_format"` setting. To rectify this regression, this PR
makes it so that the `"auto"` and `"language_server"` strings that were
previously only allowed as top level values on the `"formatter"` key,
are now allowed as format steps like so:
```json
{
"formatter": ["auto", "language_server"]
}
```
Therefore to replicate the previous behavior using `"auto"` and
`"code_actions_on_format"` you can use the following configuration:
```json
{
"formatter": [{"code_action": ...}, "auto"]
}
```
Release Notes:
- N/A *or* Added/Fixed/Improved ...
2025-10-13 12:56:40 -04:00
1133 changed files with 71663 additions and 57250 deletions
# Arrays are merged together though. See: https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure
# The intent for this file is to configure CI build process with a divergance from Zed developers experience; for example, in this config file
# we use `-D warnings` for rustflags (which makes compilation fail in presence of warnings during build process). Placing that in developers `config.toml`
# would be incovenient.
# would be inconvenient.
# The reason for not using the RUSTFLAGS environment variable is that doing so would override all the settings in the config.toml file, even if the contents of the latter are completely nonsensical. See: https://github.com/rust-lang/cargo/issues/5376
# Here, we opted to use `[target.'cfg(all())']` instead of `[build]` because `[target.'**']` is guaranteed to be cumulative.
[target.'cfg(all())']
rustflags=["-D","warnings"]
# We don't need fullest debug information for dev stuff (tests etc.) in CI.
[profile.dev]
debug="limited"
# Use Mold on Linux, because it's faster than GNU ld and LLD.
#
# We no longer set this in the default `config.toml` so that developers can opt in to Wild, which
filter='package(worktree) and test(test_random_worktree_changes)'
priority=100
[[profile.default.overrides]]
filter='package(collab) and (test(random_project_collaboration_tests) or test(random_channel_buffer_tests) or test(test_contact_requests) or test(test_basic_following))'
priority=99
[[profile.default.overrides]]
filter='package(extension_host) and test(test_extension_store_with_test_extension)'
@@ -9,11 +9,10 @@ Welcome to Zed, a high-performance, multiplayer code editor from the creators of
### Installation
On macOS and Linux you can [download Zed directly](https://zed.dev/download) or [install Zed via your local package manager](https://zed.dev/docs/linux#installing-via-a-package-manager).
On macOS, Linux, and Windows you can [download Zed directly](https://zed.dev/download) or [install Zed via your local package manager](https://zed.dev/docs/linux#installing-via-a-package-manager).
Other platforms are not yet available:
- Windows ([tracking issue](https://github.com/zed-industries/zed/issues/5394))
- Web ([tracking issue](https://github.com/zed-industries/zed/issues/5396))
You are a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
## Communication
1. Be conversational but professional.
2. Refer to the user in the second person and yourself in the first person.
3. Format your responses in markdown. Use backticks to format file, directory, function, and class names.
4. NEVER lie or make things up.
5. Refrain from apologizing all the time when results are unexpected. Instead, just try your best to proceed or explain the circumstances to the user without apologizing.
{{#ifhas_tools}}
## Tool Use
1. Make sure to adhere to the tools schema.
2. Provide every required argument.
3. DO NOT use tools to access items that are already available in the context section.
4. Use only the tools that are currently available.
5. DO NOT use a tool that is not available just because it appears in the conversation. This means the user turned it off.
6. NEVER run commands that don't terminate on their own such as web servers (like `npm run start`, `npm run dev`, `python -m http.server`, etc) or file watchers.
7. Avoid HTML entity escaping - use plain characters instead.
## Searching and Reading
If you are unsure how to fulfill the user's request, gather more information with tool calls and/or clarifying questions.
{{! TODO: If there are files, we should mention it but otherwise omit that fact }}
If appropriate, use tool calls to explore the current project, which contains the following root directories:
{{#eachworktrees}}
- `{{abs_path}}`
{{/each}}
- Bias towards not asking the user for help if you can find the answer yourself.
- When providing paths to tools, the path should always start with the name of a project root directory listed above.
- Before you read or edit a file, you must first find the full path. DO NOT ever guess a file path!
{{#if(has_tool'grep')}}
- When looking for symbols in the project, prefer the `grep` tool.
- As you learn about the structure of the project, use that information to scope `grep` searches to targeted subtrees of the project.
- The user might specify a partial file path. If you don't know the full path, use `find_path` (not `grep`) before you read the file.
{{/if}}
{{else}}
You are being tasked with providing a response, but you have no ability to use tools or to read or write any aspect of the user's system (other than any context the user might have provided to you).
As such, if you need the user to perform any actions for you, you must request them explicitly. Bias towards giving a response to the best of your ability, and then making requests for the user to take action (e.g. to give you more context) only optionally.
The one exception to this is if the user references something you don't know about - for example, the name of a source code file, function, type, or other piece of code that you have no awareness of. In this case, you MUST NOT MAKE SOMETHING UP, or assume you know what that thing is or how it works. Instead, you must ask the user for clarification rather than giving a response.
{{/if}}
## Code Block Formatting
Whenever you mention a code block, you MUST use ONLY use the following format:
```path/to/Something.blah#L123-456
(code goes here)
```
The `#L123-456` means the line number range 123 through 456, and the path/to/Something.blah
is a path in the project. (If there is no valid path in the project, then you can use
/dev/null/path.extension for its path.) This is the ONLY valid way to format code blocks, because the Markdown parser
does not understand the more common ```language syntax, or bare ``` blocks. It only
understands this path-based syntax, and if the path is missing, then it will error and you will have to do it over again.
Just to be really clear about this, if you ever find yourself writing three backticks followed by a language name, STOP!
You have made a mistake. You can only ever put paths after triple backticks!
<example>
Based on all the information I've gathered, here's a summary of how this system works:
1. The README file is loaded into the system.
2. The system finds the first two headers, including everything in between. In this case, that would be:
```path/to/README.md#L8-12
# First Header
This is the info under the first header.
## Sub-header
```
3. Then the system finds the last header in the README:
```path/to/README.md#L27-29
## Last Header
This is the last header in the README.
```
4. Finally, it passes this information on to the next process.
</example>
<example>
In Markdown, hash marks signify headings. For example:
```/dev/null/example.md#L1-3
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</example>
Here are examples of ways you must never render code blocks:
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
```
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</bad_example_do_not_do_this>
This example is unacceptable because it does not include the path.
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
```markdown
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</bad_example_do_not_do_this>
This example is unacceptable because it has the language instead of the path.
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
# Level 1 heading
## Level 2 heading
### Level 3 heading
</bad_example_do_not_do_this>
This example is unacceptable because it uses indentation to mark the code block
instead of backticks with a path.
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
```markdown
/dev/null/example.md#L1-3
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</bad_example_do_not_do_this>
This example is unacceptable because the path is in the wrong place. The path must be directly after the opening backticks.
{{#ifhas_tools}}
## Fixing Diagnostics
1. Make 1-2 attempts at fixing diagnostics, then defer to the user.
2. Never simplify code you've written just to solve diagnostics. Complete, mostly correct code is more valuable than perfect code that doesn't solve the problem.
## Debugging
When debugging, only make code changes if you are certain that you can solve the problem.
Otherwise, follow debugging best practices:
1. Address the root cause instead of the symptoms.
2. Add descriptive logging statements and error messages to track variable and code state.
3. Add test functions and statements to isolate the problem.
{{/if}}
## Calling External APIs
1. Unless explicitly requested by the user, use the best suited external APIs and packages to solve the task. There is no need to ask the user for permission.
2. When selecting which version of an API or package to use, choose one that is compatible with the user's dependency management file(s). If no such file exists or if the package is not present, use the latest version that is in your training data.
3. If an external API requires an API Key, be sure to point this out to the user. Adhere to best security practices (e.g. DO NOT hardcode an API key in a place where it can be exposed)
## System Information
Operating System: {{os}}
Default Shell: {{shell}}
{{#if(orhas_ruleshas_user_rules)}}
## User's Custom Instructions
The following additional instructions are provided by the user, and should be followed to the best of your ability{{#ifhas_tools}} without interfering with the tool use guidelines{{/if}}.
{{#ifhas_rules}}
There are project rules that apply to these root directories:
{{#eachworktrees}}
{{#ifrules_file}}
`{{root_name}}/{{rules_file.path_in_worktree}}`:
``````
{{{rules_file.text}}}
``````
{{/if}}
{{/each}}
{{/if}}
{{#ifhas_user_rules}}
The user has specified the following rules that should be applied:
# Suppresses clippy::mutable_key_type, which is a false positive as the Eq
# and Hash impls do not use fields with interior mutability.
"agent::context::AgentContextKey"
"agent_ui::context::AgentContextKey"
]
disallowed-methods=[
{path="std::process::Command::spawn",reason="Spawning `std::process::Command` can block the current thread for an unknown duration",replacement="smol::process::Command::spawn"},
{path="std::process::Command::output",reason="Spawning `std::process::Command` can block the current thread for an unknown duration",replacement="smol::process::Command::output"},
{path="std::process::Command::status",reason="Spawning `std::process::Command` can block the current thread for an unknown duration",replacement="smol::process::Command::status"},
{path="std::process::Command::stdin",reason="`smol::process::Command::from()` does not preserve stdio configuration",replacement="smol::process::Command::stdin"},
{path="std::process::Command::stdout",reason="`smol::process::Command::from()` does not preserve stdio configuration",replacement="smol::process::Command::stdout"},
{path="std::process::Command::stderr",reason="`smol::process::Command::from()` does not preserve stdio configuration",replacement="smol::process::Command::stderr"},
{path="serde_json::from_reader",reason="Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892. Use `serde_json::from_slice` instead."},
{path="serde_json_lenient::from_reader",reason="Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892, Use `serde_json_lenient::from_slice` instead."},
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.