f6fd673
language_models: Apply JSON schema subset transform to xAI (#51835)
Click to expand commit body
The conversations on Grok 4 were failing right away on the first message
in a conversation when using Zed provided model directly, but not the
xAI API directly.
The reason we were seeing this is that when sending the JSON schemas for
built-in tools to the cloud API, we didn't use the transform we use for
xAI in a BYOK context. The xAI API doesn't support the full JSON schema
spec, and specifically for the spawn_agent tool, we were generating a
`oneOf` type for a field. Applying that transformation in the cloud case
too fixes the issue.
Release Notes:
- Fixed broken (failing on first message) xAI models over the Zed
provider on profiles using the spawn_agent tool, including the default
Ask and Write profiles.
Co-authored-by: Neel <neel@zed.dev>
Tom Houlé
and
Neel
created
c44f13c
git_ui: Improve delete branch tests to verify underlying repository state (#51825)
Click to expand commit body
While fixing the tests in the previous PR (#48338), I noticed that the
`delete_branch` tests only verified the UI state changes rather than the
actual state of the underlying repository.
Currently, if `delete_branch` were a no-op that returned Ok(), the tests
would still pass incorrectly. This PR addresses that gap by ensuring the
branch is actually removed from the repository.
|Before|After|
|--|--|
|<img width="3476" height="2564" alt="图片"
src="https://github.com/user-attachments/assets/f5c4c5c4-64fe-4074-9fff-fb166d160d77"
/>|<img width="3476" height="2564" alt="CleanShot 2026-03-18 at 17 51
36@2x"
src="https://github.com/user-attachments/assets/47419d37-5051-4139-969e-65a1347bf555"
/>|
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes #17090
Hello! This is a feature that I really wanted, so I've created an
implementation of it. Hope u guys like it.
It was alto mentioned at [this
discussion](https://github.com/zed-industries/zed/discussions/30473)
The use cases were based on the [vscode
extension](https://marketplace.visualstudio.com/items?itemName=yo1dog.cursor-align)
(only spaces case was implemented)
- The algorithm is O(n + m × 2k), where:
- n = total cursors (for initial analysis, to understand how many
alignments will be performed)
- m = number of alignment columns
- k = number of alignment rows (first time to get the most-right
occurrence, the next one to create the `Vec` of edits)
Release Notes:
- Added `editor: align selections` command

<br>
Thank you for creating zed!
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Tiago Lobão
and
Kirill Bulatov
created
be3a5e2
open_ai: Support structured OpenAI tool output content (#51832)
Click to expand commit body
Allow function call outputs to carry either plain text or a list
of input content items, so image tool results are serialized as
image content instead of a raw base64 string.
Release Notes:
- N/A
Ben Brandt
created
eba7cea
sidebar: Load archived threads in the correct window (#51831)
Click to expand commit body
Make sure we don't create a duplicate workspace if it is already open in
another window.
Release Notes:
- N/A
---------
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Ben Brandt
and
cameron
created
3af7b64
vim: Fix visual block Shift-I jumping to original cursor after Ctrl-D scroll (#50822)
Click to expand commit body
Ensure that the `vim::visual::Vim::visual_block_motion` method is called
when `scroll_editor` is called while in Visual Block mode. This fixes an
issue where, after getting into `Visual Block` mode, if the user used
`ctrl-d` or `ctrl-u` to scroll half of the page, the wrong selection
would be made and, if `shift-i` was used to start inserting at the start
of the line, a single cursor would be placed at the cursor position
where the selection was started, instead of one cursor per each of the
selected lines.
These changes ensure that we now match Neovim's behavior for the same
flow.
---------
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Xiaobo Liu
and
dino
created
30d3467
extension_ci: Switch back to upstream action (#51829)
Click to expand commit body
This switches the action back to the upstream one where the changes were
merged (thanks @\huacnlee for the quick action)
Aside from that, it does some minor fixes: It adds the bumper as an
assignee on the extensions PR and also ensures we do not try to bump
here in the repo for the test extensions.
Release Notes:
- N/A
77425aa
agent: Fix `@mention` menu placement (#51817)
Cameron Mcloughlin
created
d3f0510
auto_update: Strip pre-release and build metadata from release notes URL (#48570)
Click to expand commit body
Without this fix, the zed.dev server doesn't recognize the version with
metadata and redirects to /releases, which
defaults to the Stable channel, so Preview users end up seeing Stable
release notes.
Closes #47539
Changes:
- Strip pre and build metadata from the semver version in
release_notes_url before constructing the path, so the URL
becomes /releases/preview/0.218.0 instead of
/releases/preview/0.218.0-beta.1+preview.131.68e98a53.
- Standardized the ordering of pre/build clearing to pre-first across
all 4 call sites (2 were build-first).
Open question: With this fix, the URL now points to the specific version
you're running (e.g.
/releases/preview/0.218.0). An alternative would be to link to
/releases/preview (no version) so users can see all
Preview releases, including ones newer than what they have installed. I
went with per-version linking since it matches
the existing intent of the code, but happy to change it if the team
prefers the other approach.
Release Notes:
- Fixed "View Release Notes" in Preview/Stable opening the wrong release
channel page due to build metadata in the URL.
Closes #48256
It appears that the current git remotes support was implemented in
#42819, following the design described in
https://github.com/zed-industries/zed/pull/42486#issuecomment-3524092306.
That design does not include an interaction for deleting remotes, but
the delete remote branch action was mistakenly implemented as deleting
the remote itself.
After this PR, there should be no code paths that use `remove_remote`
anymore. I've kept it for now though, as it may be useful when we
introduce the corresponding interaction in the future.
Release Notes:
- Fixed a bug where deleting a remote branch from the branch picker
would incorrectly remove the entire remote configuration
solution for #43004
Release Notes:
- Added workspace::FocusCenterPane
The `editor::ToggleFocus` action not working really drives me bonkers,
and it also doesn't really make sense, because it doesn't toggle
anything. it moves focus, but doesn't move focus back anywhere if you
run it again so 'ToggleFocus' seems misleading.
Here we have added an action that just moves focus to the most recent
center pane: `workspace::FocusCenterPane`
this action correctly moves the focus to the center pane from any dock,
even if the center pane is the project diff, branch diff, terminal, or
keymap editor, etc.
i'm not sure if this would be considered a 'replacement' for
`editor::ToggleFocus` but i do think this is probably more in line with
what most users would consider the expected behavior.
Josh P.
created
46596a2
python: Upgrade `pet` to improve toolchain discovery in WSL (#51749)
Click to expand commit body
This PR updates the pet dependency to incorporate performance
improvements from upstream.
Related Upstream Changes:
- Issue: microsoft/python-environment-tools#369
- PR: microsoft/python-environment-tools#370
Updating pet reduces toolchain discovery time in WSL environments,
specifically when Conda is installed on the host Windows system. In my
testing, the time from clicking the toolchain button to the list
appearing was reduced by approximately 2 seconds.
While this is a notable improvement, discovery in WSL remains slightly
slower than in native development or remote Linux environments, where
toolchains are typically loaded near-instantaneously.
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing (no need)
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Improved python toolchain discovery under WSL environment
Xin Zhao
created
0c9b8fd
git_ui: Avoid blocking main thread during stage/unstage (#47806)
Click to expand commit body
With a large number of files in the git status, pressing stage/unstage
could cause a noticeable freeze. The async performance profiler showed
that the task spawned inside `change_all_files_stage` blocked the main
thread for 300ms+, resulting in a clear and visible UI stall. The main
cause was the need to traverse all entries to determine what to stage or
unstage, which becomes expensive for large change sets.
Same repro as: #47800
Release Notes:
- Improved latency of stage/unstage operations
Marco Mihai Condrache
created
e6939ad
languages: Recognize module interface file as C++ file (#45968)
Click to expand commit body
https://clang.llvm.org/docs/StandardCPlusPlusModules.html#file-name-requirements,
`.cppm`, '.ccm', ".cxxm" files are C++20 module interface files.
Release Notes:
- Recognize module interface file as C++ file.
Remove old multiworkspace commands and fix a bug where multiworkspaces
wouldn't be deserialized from the DB
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
---------
Co-authored-by: eric <eric@zed.dev>
Mikayla Maki
and
eric
created
8c9fc9f
agent: Fix scrolling selection out of view causes panel to close while zoomed (#51806)
Click to expand commit body
Release Notes:
- Fixed an issue in the agent panel where scrolling a selection out of
view would cause the panel to close while zoomed
Ben Kunkle
created
d04a60e
sidebar: Add some more improvements (#51799)
Click to expand commit body
Follow up to https://github.com/zed-industries/zed/pull/51763
Release Notes:
- N/A
- In the project header, arrow keys left and right expand/collapse the
group
- Enter and space in any thread list item selects the item
- Arrow key down from the search editor moves focus to the the list
- Arrow key up from the first list item puts focus back to the editor
- At any moment while focus on the list, cmd-f moves focus back to the
search editor
- Made the `FocusWorkspaceSidebar` action always reset focus back to the
search editor
Release Notes:
- N/A
Danilo Leal
created
9f3e3be
agent: Improve sidebar design and behavior (#51763)
Click to expand commit body
- Selection/focus improvements (reduces flickers, move selection more
correctly throughout the list)
- Adds open folder button in the sidebar header
- Fixes sidebar header design, including the thread view one, too
- Fixes behavior of cmd-n when focused in the sidebar
- Changes the design for the "new thread" button in the sidebar and adds
a preview of the prompt on it
- Rename items in the "start thread in" dropdown
Release Notes:
- N/A
---------
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Switch python_env_kernel_specifications to a buffered stream (using
buffer_unordered(4) and filter_map) to run discovery concurrently with a
bounded parallelism and skip None results.
Closes #50988
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
MostlyK
created
38b7c76
open_ai: Fix tool output for /responses endpoint (#51789)
Click to expand commit body
We were sending the raw tool debug output as JSON to the model rather
than whatever the tool intended as content for the model.
Which meant we were sending unneeded information to the model, which
matters in the edit tool case.
Release Notes:
- N/A
Release Notes:
- Fixed segfault at runtime on aarch64-linux when running static
constructors.
Jakub Konka
created
29403ee
client: Respect the default organization ID from the server (#51777)
Click to expand commit body
This PR updates the `UserStore` to use the `default_organization_id`
returned from the server to set the default organization rather than
always picking the first one.
Closes CLO-530.
Release Notes:
- N/A
83adaa5
task: Expose current buffer language as $ZED_LANGUAGE variable (#51614)
Click to expand commit body
Closes #12628
Adds a `$ZED_LANGUAGE` task variable that resolves to the language name
of the active buffer (e.g., "Rust", "Python", "Shell Script"). This lets
tasks adapt behavior based on language without parsing file extensions.
Use cases from the issue:
- Pass syntax highlighting language to external tools (e.g., `rg --type
$ZED_LANGUAGE`)
- Adjust comment wrapping width per language
- Handle extensionless files and untitled buffers that have a language
assigned
VS Code provides equivalent functionality via
`${command:activeEditorLanguageId}`. Neovim exposes it as `&filetype`.
## Changes
- Added `Language` variant to `VariableName` in
`crates/task/src/task.rs`
- Populated from `buffer.language().name()` in
`BasicContextProvider::build_context`
(`crates/project/src/task_inventory.rs`), following the same pattern as
`File` and `Stem`
- Updated test fixtures in `crates/tasks_ui/src/tasks_ui.rs` to include
the new variable
- Added `ZED_LANGUAGE` to the variable list in `docs/src/tasks.md`
## Testing
Updated the existing `test_task_variables` test in `tasks_ui` to verify
`ZED_LANGUAGE` resolves to "Rust" and "TypeScript" for the respective
test buffers.
This contribution was developed with AI assistance (Claude Code).
Release Notes:
- Added `$ZED_LANGUAGE` task variable that exposes the current buffer's
language name
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Matt Van Horn
,
Matt Van Horn
, and
Kirill Bulatov
created
546c70a
agent: Allow all settings in the thread to apply immediately (#51762)
Click to expand commit body
Before we kind of had it mixed: you could change thinking but not model
etc. We brute forced a solution by disabling, but it seems better to
just allow all of them to be updated whenever we would build the
request.
Release Notes:
- N/A
Ben Brandt
created
ef40f21
agent_ui: Only create ThreadHistory if agent supports it (#51759)
Click to expand commit body
Rather than always having a ThreadHistory with an internal option,
changed it to be an Option<ThreadHistory> so we can better distingiuish
between an empty list and unsupported
Release Notes:
- N/A
Closes #ISSUE
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Ben Kunkle
created
b453b6e
editor: Fix selection direction reversal in `SelectLargeSyntaxNode` with multiple cursors (#51752)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/47737
Regressed by https://github.com/zed-industries/zed/pull/27295
Release Notes:
- Fixed an issue where using the `SelectLargeSyntaxNode` action with
multiple cursors could reverse the selection direction for the last
cursor.
Smit Barmase
created
234c705
Fix settings file restored to both panes after restart (#50842)
Click to expand commit body
Closes #35947
## Summary
When a settings file was moved to a second pane and Zed restarted, the
file appeared in both panes. Closing it in one pane would close it in
the other.
## Root cause
`Editor::deserialize` restored standalone files (like settings.json) by
calling `workspace.open_abs_path()`, which routes through
`open_path_preview` → `pane.open_item()`, adding the editor to the
workspace's default pane. The caller (`SerializedPane::deserialize_to`)
then also adds the item to the target pane, so it ends up in two panes.
This also caused the SQL constraint violations @MrSubidubi noted: the
`items` table has `PRIMARY KEY(item_id, workspace_id)`, so the duplicate
triggers errors on the next serialisation cycle.
## Fix
Replace `workspace.open_abs_path()` with `project.open_local_buffer()`,
which opens the buffer without touching any pane. Pane placement is left
to `deserialize_to`.
https://github.com/user-attachments/assets/68d3c5b4-d002-429f-b907-ec21cb0019ec
## Test plan
- [x] Reproduced the original bug (settings file duplicated across panes
after restart)
- [x] Verified the fix: file restores only to the correct pane
- [x] Added regression test
(`test_deserialize_non_worktree_file_does_not_add_to_pane`)
- [x] Existing `items::tests::test_deserialize` passes (all 6 cases)
- [x] `cargo clippy -p editor` clean
Release Notes:
- Fixed settings file being restored to multiple panes after restart
([#35947](https://github.com/zed-industries/zed/issues/35947)).
iam-liam
created
c59af48
agent: Fix issue where created file is not deleted after rejecting (#51745)
Release Notes:
- Fixed send failure for pasted file#line mention links
Handle `MentionUri::Selection` with a file path in
`confirm_mention_for_uri`
by resolving it to text content via existing line-range loading logic,
instead
of returning "Unsupported mention URI type for paste".
Keep untitled-buffer selections (`abs_path: None`) as an explicit
unsupported
error for now.
Add a regression test for pasting selection mentions to ensure they
resolve to
`Mention::Text` with the expected line range.
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Xiaobo Liu
created
1f442da
vim: Fix Helix mode subword motions to select traversed text (#45760)
Click to expand commit body
Update Helix's handling of the following actions in order to ensure that
selections are created when using subword motions:
* `vim::NextSubwordStart`
* `vim::NextSubwordEnd`
* `vim::PreviousSubwordStart`
* `vim::PreviousSubwordEnd`
The handling of these motions was done by
`vim::helix::Vim::helix_move_and_collapse`, which simply moved the
cursor without doing any selection. This commit updates it to correctly
use both `vim::helix::Vim::helix_find_range_forward` and
`vim::helix::Vim::helix_find_range_backward`.
The added tests have been confirmed against Helix's behavior of the following commands:
* `move_next_sub_word_start`
* `move_prev_sub_word_start`
* `move_next_sub_word_end`
* `move_prev_sub_word_end`
Closes #41767
Release Notes:
- Fix subword motions in Helix mode to select traversed text
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Max Malkin
,
Conrad Irwin
, and
dino
created
e67cf99
Add remote hostname to title bar project picker tooltip (#51616)
Click to expand commit body
Having multiple remote hosts with long project names makes the project
picker tricky to use.
Added the remote hostname to the tooltip to avoid guessing.
**truncated project + hostname (no change)**
<img width="426" height="368" alt="Screenshot 2026-03-15 at 12 16 29 PM"
src="https://github.com/user-attachments/assets/7b6b732e-cf3c-42c7-9912-1a69ee58b60e"
/>
**hostname in tooltip (multiline)**
<img width="495" height="366" alt="Screenshot 2026-03-15 at 12 16 56 PM"
src="https://github.com/user-attachments/assets/77b60b3a-b8c0-4088-b3c2-3c105a097720"
/>
**hostname in tooltip (single line)**
<img width="426" height="366" alt="Screenshot 2026-03-15 at 12 17 15 PM"
src="https://github.com/user-attachments/assets/baf4d4bd-2724-4a3e-ab29-39ff714fec0e"
/>
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Add remote hostname to title bar project picker tooltip.
Co-authored-by: Amp <amp@ampcode.com>
Casey Watson
and
Amp
created
a777605
Use split token display for xAI models (#48719)
Click to expand commit body
### Split token display for xAI
Extends the split input/output token display (introduced in #46829 for
OpenAI) to all xAI models.
Instead of the combined `48k / 1M` token counter, xAI models now show:
- **↑** input tokens used / input token limit
- **↓** output tokens used / output token limit
#### Before
<img width="513" height="128" alt="Screenshot 2026-02-08 at 11 07 13 AM"
src="https://github.com/user-attachments/assets/14e5cb4a-9b5c-4081-bbfb-407a737bf234"
/>
#### After
<img width="610" height="126" alt="Screenshot 2026-02-08 at 11 05 36 AM"
src="https://github.com/user-attachments/assets/92396dcb-8905-4f87-9b9e-d8b0f63225ba"
/>
#### Changes
- **x_ai.rs** — Override `supports_split_token_display()` to return
`true` on `XAiLanguageModel`. All built-in Grok models already implement
`max_output_tokens()`, so no additional plumbing was needed.
- **cloud.rs** — Add `XAi` to the `matches!` pattern in
`CloudLanguageModel::supports_split_token_display()` so cloud-routed xAI
models also get the split display.
#### Tests
- `test_xai_supports_split_token_display` — Verifies all built-in Grok
model variants return `true` for split token display.
- `test_xai_models_have_max_output_tokens` — Validates all built-in Grok
models report `max_output_tokens` that is `Some`, positive, and less
than `max_token_count` (required for the UI to compute the input token
limit).
- `test_split_token_display_supported_providers` — Confirms the cloud
provider match pattern includes `OpenAi` and `XAi` while excluding
`Anthropic` and `Google`.
Release Notes:
- Changed the display of tokens for xAI models to reflect the
input/output limits.
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
## Summary
When no stop tokens are provided, Zed was sending an empty array
(`"stop": []`) to Ollama. This caused Ollama to override the model's
default stop tokens (defined in its Modelfile) with nothing, resulting
in models like rnj-1:8b generating infinitely with literal stop tokens
appearing in the output.
## Problem
Models with custom stop tokens in their Modelfile (like `<|eot_id|>` for
rnj-1:8b) would generate forever because:
1. Agent thread creates request with `stop: Vec::new()` (empty)
2. Ollama provider converts this to `stop: Some(vec![])`
3. Serializes as `"stop": []` in JSON
4. Ollama interprets this as "override default stop tokens with nothing"
5. Model generates forever, outputting stop tokens as literal text
## Solution
1. In `crates/language_models/src/provider/ollama.rs`:
- Only send `stop` when explicitly provided
- When empty, use `None` so the field is omitted from JSON
2. In `crates/ollama/src/ollama.rs`:
- Add `#[serde(skip_serializing_if = "Option::is_none")]` to all
`ChatOptions` fields
- Ensures `None` values are omitted, not serialized as `null`
## Testing
Added 4 new tests in `crates/ollama/src/ollama.rs`:
- `test_chat_options_serialization`: Verifies None fields are omitted
- `test_chat_request_with_stop_tokens`: Verifies stop tokens are
serialized when provided
- `test_chat_request_without_stop_tokens_omits_field`: Verifies empty
stop is omitted
All 11 ollama tests pass, plus 1 language_models ollama test.
Fixes #47798
Release Notes:
- Fixed Ollama models with custom stop tokens generating infinitely by
not overriding model defaults when no stop tokens are specified.
little Kitchen
created
905d28c
Add stream_options.include_usage for OpenAI-compatible API token usage (#45812)
Click to expand commit body
## Summary
This PR enables token usage reporting in streaming responses for
OpenAI-compatible APIs (OpenAI, xAI/Grok, OpenRouter, etc).
## Problem
Currently, the token counter UI in the Agent Panel doesn't display usage
for some OpenAI-compatible providers because they don't return usage
data during streaming by default. According to OpenAI's API
documentation, the `stream_options.include_usage` parameter must be set
to `true` to receive usage statistics in streaming responses.
## Solution
- Added StreamOptions struct with `include_usage` field to the open_ai
crate
- Added `stream_options` field to the Request struct
- Automatically set `stream_options: { include_usage: true }` when
`stream: true`
- Updated edit_prediction requests with `stream_options: None`
(non-streaming)
## Testing
Tested with xAI Grok models - token counter now correctly shows usage
after sending a message.
## References
- [OpenAI Chat Completions API -
stream_options](https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream_options)
- [xAI API Documentation](https://docs.x.ai/api)
Elier
created
8a25373
agent: Save threads before closing them (#51744)
Click to expand commit body
Closes #46078
When we unloaded sessions, we weren't necesarily making sure we had
saved the current state. Now we save it whenever we remove it from the
session map.
Release Notes:
- Agent: Fix cases where thread state wasn't saved before closing the
thread.
Ben Brandt
created
4bc324c
copilot: Clear completions upon discard (#40185)
Click to expand commit body
Closes #37836
This behavior was already fixed for Supermaven in #37047, but is still
present in Copilot. What's actually happening:
- Receive a multi-line edit prediction
- Dismiss it with escape
- Clicking anywhere in the editor below the cursor calls
`Editor::select` which starts out by calling `Editor::hide_context_menu`
-> `Editor::update_visible_edit_prediction`, bringing back the
prediction that was just dismissed and updating the editor's display map
- The subsequent selection logic in `Editor::select` now operates using
a display map that is inconsistent with what the user saw when clicking
- If the click was anywhere where the prediction inlay used to be,
`Editor::select` thinks the user clicked on the inlay and does nothing,
and the inlay reappears
- If the click was below where the prediction inlay used to be, the
inlay is immediately removed again but the cursor is moved to the wrong
position because the inlay temporarily added a vertical offset to all
lines after it in the buffer
Ultimately, `Editor::select` should be handling the user input using the
same display map that the user saw when making the input. This can
obviously be solved in multiple ways, I chose to clear the current
completions in `CopilotCompletionProvider::discard` such that any
subsequent calls to `Editor::update_visible_edit_prediction` doesn't
immediately nullify the dismissal of the edit prediction by the user.
Note that this also changes the behavior that occurs after dismissing an
edit prediction, moving to a different position in the buffer, and then
returning: currently, this resurfaces the dismissed edit prediction
(which the `test_copilot` test exercises), and after this change it
doesn’t. This current behavior didn't seem desirable to me because it
doesn't happen when using Zeta or Supermaven, but if we want to keep it,
then we could fix the incorrect selection behavior some other way.
Release Notes:
- Fixed bug that resurfaced dismissed Copilot edit predictions when
moving the cursor around
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Tim Vermeulen
,
Piotr Osiewicz
, and
Ben Brandt
created
4e9ffa3
markdown_preview: Add ScrollToTop and ScrollToBottom actions (#50460)
Click to expand commit body
Add `gg`/`G` (vim), `cmd-up`/`cmd-down` (macOS), and
`ctrl-home`/`ctrl-end` (Linux/Windows) keybindings to scroll to the top
and bottom of the markdown preview.
The markdown preview already has page scroll (`ctrl-d`/`ctrl-u`), line
scroll (`ctrl-e`/`ctrl-y`), and item scroll (`alt-up`/`alt-down`) but
was missing top/bottom navigation. This adds two new actions —
`ScrollToTop` and `ScrollToBottom` — using the existing
`ListState::scroll_to()` infrastructure, following the same pattern as
the other scroll actions.
- [x] Done a self-review taking into account security and performance
aspects
Release Notes:
- Added scroll-to-top and scroll-to-bottom keybindings for markdown
preview (`gg`/`G` in vim mode, `cmd-up`/`cmd-down` on macOS,
`ctrl-home`/`ctrl-end` on Linux/Windows)
andrew j
created
5eb4d33
Add deleted color to project panel (#51553)
Click to expand commit body
When a file is deleted, the parent folder isn't colored which makes it
hard to know unless we look at the Git Panel.
This PR adds `Color::Deleted` to fix that.
<img width="366" height="428" alt="Screenshot 2026-03-14 at 7 56 04 PM"
src="https://github.com/user-attachments/assets/6ed3a3c7-e7e7-4b48-b89c-705a7c1ff634"
/>
Release Notes:
- Improved project panel to color folder with deleted file
Vinh Tran
created
dbe3cc7
Add `xcodebuild -runFirstLaunch` fallback for Metal toolchain installation documentation (#51631)
Click to expand commit body
When setting up on macOS 26, `xcodebuild -downloadComponent
MetalToolchain` can fail if Xcode hasn't been initialized yet. Running
`xcodebuild -runFirstLaunch` first resolves this.
Release Notes:
- N/A
Joey Carpinelli
created
5d7e10e
search: Fix project search tooltip keybinding hint disappearing (#51568)
Click to expand commit body
What
---
The keybinding hint in the Project Search status bar button tooltip
disappears shortly after the tooltip appears, while the label "Project
Search" remains. This is most reproducible with no file open.
Why
---
`SearchButton` used `Tooltip::for_action` with no stored focus handle,
so `KeyBinding::render` called `window.focused(cx)` at render time to
resolve the `pane::DeploySearch` binding. When the `Tooltip` entity
re-rendered (it subscribes to theme settings changes) and the focused
element was no longer in a `Pane` key context, the keybinding lookup
failed silently and the shortcut hint vanished.
Fix
---
Store the active pane item's `FocusHandle` in `SearchButton` via
`set_active_pane_item` and use `Tooltip::for_action_in` so the
keybinding is always resolved against a stable `Pane` context. Falls
back to `Tooltip::for_action` when no pane item is active.
Closes #51562
Test Plan
---
- [x] `cargo fmt --check`
- [ ] `cargo test --workspace`
- currently blocked by an unrelated compile error test
- tests::test_terminal_kill_allows_wait_for_exit_to_complete ... FAILED
- [x] Manual verification of:
- Try to reproduce the issue and the keyboard shortcut visible for as
long as the cursor is hovering over the button.
Release Notes
- Fixed Project Search status bar button tooltip keybinding hint
disappearing while hovering
Screenshots
---
Current:
<img width="835" height="496" alt="image"
src="https://github.com/user-attachments/assets/cb1ffdf2-7733-47f6-9030-041459c2734c"
/>
Expected:
<img width="835" height="496" alt="image"
src="https://github.com/user-attachments/assets/84cb54b9-290c-4210-b86b-7ae9f8bf9ac0"
/>
Release Notes:
- N/A
Suphachai Phetthamrong
created
a883875
sidebar: Fix subagent threads showing up (#51739)
Click to expand commit body
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
Bennet Bo Fenner
created
d84254e
agent_servers: Move agent_id constants to agent_servers crate (#51738)