6f2e4b0
ep: Store cumulative and average log-probabilities of predictions (#52177)
Click to expand commit body
For now, the only source of logprobs is `./run.py infer`, which writes
them to under the `.predictions` struct. `ep score` copies these values
to `.score`. There is some duplication (same value stored in two
places), which is unfortunate, but can't be fixed without reworking how
scores are stored.
Release Notes:
- N/A
Oleksiy Syvokon
created
4b1a2f3
search: Fix focus replacement field when opening replace (Ctrl+H) (#51061)
Click to expand commit body
Previously, focus stayed on the search bar because a pre-focus check
`handle.is_focused(window)` was always false at deploy time.
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:
- Fixed: When opening find-and-replace with `Ctrl+H`, the replacement
input is now focused instead of the search bar.
Giorgi Merebashvili
created
b1e8473
git_ui: Support side-by-side diff view in clipboard selection diff (#51966)
Click to expand commit body
#### Context
Switches `TextDiffView` from using `Editor` directly to
`SplittableEditor`, enabling side-by-side diff view support for "Diff
Clipboard with Selection". The diff view now respects the user's
`diff_view_style` setting.
Split out from #51457. This PR contains only the `SplittableEditor`
wiring. The multibuffer coordinate fix for non-singleton editors will
follow in a separate PR.
Closes #50912 (partially)
#### How to Review
Small PR — all changes are in `crates/git_ui/src/text_diff_view.rs`.
Focus on:
- `new()`: `SplittableEditor::new` replaces `Editor::for_multibuffer`,
editor-specific setup goes through `rhs_editor()`
- Item trait delegation: `act_as_type`, `for_each_project_item`,
`set_nav_history` updated for `SplittableEditor`
- Tests: pinned `DiffViewStyle::Unified` and assertions go through
`rhs_editor()`
#### Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
#### Video :
[Screencast from 2026-03-19
23-11-36.webm](https://github.com/user-attachments/assets/c5a2381d-238d-43ef-ac6f-9994996c0c69)
#### Release Notes:
- Improved "Diff Clipboard with Selection" to support side-by-side diff
view style.
This PR adds `v0318`, which is just like `v0316` but with bigger blocks.
It seems to perform best so far.
It also adds heuristics to avoid placing the marker token on closing
braces, which results in much nicer blocks.
Finally, it fixes a bug with inserting `<|marker_N|>` mid-line in
`v0316` and `v0317`.
Release Notes:
- N/A
Oleksiy Syvokon
created
8b822f9
Fix regression preventing new predictions from being previewed in subtle mode (#51887)
Click to expand commit body
## Context
<!-- What does this PR do, and why? How is it expected to impact users?
Not just what changed, but what motivated it and why this approach.
Link to Linear issue (e.g., ENG-123) or GitHub issue (e.g., Closes #456)
if one exists — helps with traceability. -->
Fixes some issues with https://github.com/zed-industries/zed/pull/51842
Namely that the tests were scattered and not well organized (this PR
also makes them more thorough), and a regression where holding the
modifiers for the accept prediction keybind would not cause an incoming
prediction to be immediately previewed.
## How to Review
<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
- See the review process guidelines for comment conventions -->
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- (Preview v0.229.x only) Fixed a regression where holding the modifiers
for the accept edit prediction keybind would not immediately preview
predictions as they arrived
Ben Kunkle
created
fb1a98c
multi_workspace: Add actions to cycle workspace (#52156)
Cameron Mcloughlin
created
42e7811
sidebar: Fix highlighting "new thread" element after cmd-n (#52105)
Danilo Leal
created
87cf32a
agent: Set message editor language to markdown (#52113)
Cameron Mcloughlin
created
e8d2627
Fix incorrect rainbow bracket matching in Markdown (#52107)
Click to expand commit body
## Context
Fixes #52022.
Rainbow bracket matching could become incorrect when tree-sitter
returned ambiguous bracket pairs for the same opening delimiter. The
repair path rebuilt pairs using a shared stack across all bracket query
patterns, which let excluded delimiters like Markdown single quotes
interfere with parenthesis matching.
This change scopes that repair logic to each bracket query pattern so
ambiguous matches are rebuilt without mixing unrelated delimiter types.
It also adds a regression test for the Markdown repro from the issue.
<img width="104" height="137" alt="image"
src="https://github.com/user-attachments/assets/4318bb4d-7072-4671-8fb5-c4478a179c07"
/>
<img width="104" height="137" alt="image"
src="https://github.com/user-attachments/assets/07a8a0fc-7618-4edb-a14e-645358d8d307"
/>
## How to Review
Review `crates/language/src/buffer.rs` first, especially the fallback
repair path for bogus tree-sitter bracket matches.
Then review `crates/editor/src/bracket_colorization.rs`, which adds
regression coverage for the issue repro.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Fixed rainbow brackets in Markdown when quotes caused parentheses to
match incorrectly
Kai Kozlov
created
e126857
sidebar: Add another round of refinements (#52101)
Click to expand commit body
- Change the branch button's tooltip to be more accurate given it
displays more stuff than only branches
- Hide the worktree dropdown menu when in a non-Git repo project
- Improve provisioned title truncation
- Remove the plus icon from the "view more" item to improve sidebar's
overall feel
- Remove the always visible "new thread" button but make it visible only
when you're in an empty thread state
- Add worktree icon in the thread item and tooltip with full path
- Space out the worktree name from the branch name in the git picker in
the title bar
- Swap order of views in the git picker to "worktree | branches | stash"
- Improve the "creating worktree" loading indicator
---
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
## Context
This PR adds an `Unbind` action, as well as syntax sugar in the keymaps
for declaring it
```
{
"unbind": {
"tab: "editor::AcceptEditPrediction"
}
}
```
Is equivalent to
```
{
"bindings": {
"tab: ["zed::Unbind", "editor::AcceptEditPrediction"]
}
}
```
In the keymap, unbind is always parsed first, so that you can unbind and
rebind something in the same block.
The semantics of `Unbind` differ from `NoAction` in that `NoAction` is
treated _as an action_, `Unbind` is treated as a filter. In practice
this means that when resolving bindings, we stop searching when we hit a
`NoAction` (because we found a matching binding), but we keep looking
when we hit an `Unbind` and filter out keystroke:action pairs that match
previous unbindings. In essence `Unbind` is only an action so that it
fits cleanly in the existing logic. It is really just a storage of
deleted bindings.
The plan is to rework the edit predictions key bindings on top of this,
as well as use `Unbind` rather than `NoAction` in the keymap UI. Both
will be done in follow up PRs.
Additionally, in this initial implementation unbound actions are matched
by name only. The assumption is that actions with arguments are bound to
different keys in general. However, the current syntax allows providing
arguments to the unbound actions. Both so that copy-paste works, and so
that in the future if this functionality is added, keymaps will not
break.
## How to Review
- The dispatch logic in GPUI
- The parsing logic in `keymap_file.rs`
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Added support for unbinding key bindings from the default keymaps. You
can now remove default bindings you don't want, without having to
re-declare default bindings that use the same keys. For instance, to
unbind `tab` from `editor::AcceptEditPrediction`, you can put the
following in your `keymap.json`
```
[
{
"context": "Editor && edit_prediction",
"unbind": {
"tab": "editor::AcceptEditPrediction"
}
}
]
```
Ben Kunkle
created
0f1e8a6
agent: Fix summarization model being cleared by unrelated registry events (#52080)
Click to expand commit body
## Context
We were seeing lots of pending title generation, which should only
happen if we don't have a summarization model.
`handle_models_updated_event` unconditionally overwrote the thread's
summarization model on every registry event, even with `None`.
We should only setting if explicitly changed by the user or we haven't
set it yet, and only if we actually have one.
It is hard to reproduce this issue.. but I don't think this code was
right in the first place anyway.
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Ben Brandt
created
aabc967
Swap arrayvec crate for heapless to use LenT optimization (#47101)
Click to expand commit body
Swaps the `arrayvec` dependency for `heapless`, as the `heapless`
library allows changing the type used for the `len` field, which
`arrayvec` hard-codes to `usize`. This means that, for all the
`ArrayVec`s in Zed, we can save 7 bytes on 64 bit platforms by just
storing the length as a `u8`.
I have not benchmarked this change locally, as I don't know what
benchmarking tools are in this project.
As a small bit of context, I wrote the PR to `heapless` to add this
`LenT` generic after seeing a PR on the `arrayvec` crate that seems to
be dead now. Once I saw some of Zed's blog posts about the `rope` crate
and noticed the usage of `arrayvec`, I thought this might be a welcome
change.
Release Notes:
- N/A
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Gnome!
and
Piotr Osiewicz
created
abec0ef
ci: Run clippy for x86_64-apple-darwin target (#52036)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Finn Evers <finn@zed.dev>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Cole Miller
,
Finn Evers
, and
Jakub Konka
created
d663dbb
gpui_macos: Fix x86_64 build error in Submenu (#52059)
Click to expand commit body
Missed in #52028.
Release Notes:
- N/A
Tree Xie
created
17e4b49
livekit_client: Screensharing on Niri + NixOS (#52017)
Click to expand commit body
Release Notes:
- Fixed a weird niche interaction between niri and nixos that broke
screensharing
---------
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
## Context
Adds a tool to utilize the UI we already expose to ACP agents. Behind a
feature flag for now.
## How to Review
Mostly a tool to hook up to all of the plan plumbing we already have in
acp thread.
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Ben Brandt
created
268f1d2
Ensure that sidebar toggle button works, regardless of focus (#52045)
Click to expand commit body
Previously, the sidebar toggle worked via an action, which is dependent
on what is focused. I changed it to directly call a method.
Release Notes:
- N/A
Max Brunsfeld
created
3ee2f5b
acp: Add agent websites to the registry page (#52002)
Click to expand commit body
## Context
The registry now distinguishes between websites and repos, so we can
show either or both if available.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Ben Brandt
created
5b0af8d
sidebar: Only migrate some threads (#52018)
Click to expand commit body
## Context
We now only migrate up to 10 threads per project to the sidebar and also
ignore threads that do not have a workspace
## How to Review
<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
- See the review process guidelines for comment conventions -->
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Bennet Bo Fenner
created
22a33b7
vim: Add helix alias `reflow` for vim rewrap (#51788)
Click to expand commit body
Add support for Helix's `:reflow` command when vim or helix mode is
enabled.
Release Notes:
- Add support for helix's `:reflow` command
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
## Summary
Adds a new permission UI for terminal pipeline commands (e.g. `cargo
test | tail`) that lets users selectively always-allow individual
commands in the pipeline, rather than only offering a blanket
always-allow for the first command.
## Screenshot
<img width="464" height="293" alt="Screenshot 2026-03-18 at 3 27 48 PM"
src="https://github.com/user-attachments/assets/e027eeec-c2b3-4f73-a596-95f42a9adad2"
/>
Release notes:
- The terminal permissions UI now allows you to select individual
subcommands independently.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Eric Holk
,
Danilo Leal
, and
Ben Brandt
created
66f3b32
Allow the keymap and settings UI to be opened without an active window (#49527)
Click to expand commit body
Closes #49155.
<img width="470" height="304" alt="image"
src="https://github.com/user-attachments/assets/80d696ef-fabf-4745-b6e3-83315a84c8d0"
/>
Release Notes:
- UI: Allow the keymap and settings UI to be opened without an active
window
---------
Co-authored-by: MrSubidubi <finn@zed.dev>
Co-authored-by: Finn Evers <finn.evers@outlook.de>
claire
,
MrSubidubi
, and
Finn Evers
created
53db889
agent_ui: Smarter logic for when we drop background threads (#52016)
Click to expand commit body
## Context
Previously we were very eagerly dropping threads from memory. However,
reloading threads has a cost:
- For our agent, we have to replay events, which is lossy
- It's slower for external agents
- Some agents don't support reloading
So we keep the most recent 5 idle threads (or all threads who can't be
reloaded) and clean up our list after every insertion.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Ben Brandt
and
Bennet Bo Fenner
created
b04e7f0
gpui_macos: Fix compilation on x86_64 (#52028)
Click to expand commit body
Release Notes:
- N/A or Added/Fixed/Improved ...
Lukas Wirth
created
8f6e939
git_ui: Do not show "resolve with agent" as a collab guest (#51676)
8f0826f
acp: Set agent server cwd from project paths (#52005)
Click to expand commit body
## Context
Add Project::default_path_list and reuse it for agent session work
directories and ACP server startup so agent processes start in the
project context by default
We previously removed all cwd from this hoping to have a global process
shared, but it doesn't work for remote projects. Since we're at the
project boundary anyway, we might as well start it up in a similar spot
as a new thread.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- acp: Make sure the agent server is started in a project directory
Ben Brandt
created
073d8d7
acp_thread: Handle session info title updates (#52011)
Click to expand commit body
## Context
Clear provisional titles and emit `TitleUpdated` when an agent provides
a new title.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Ben Brandt
created
702b5dd
livekit: Remove obsolete separate thread for frame feeder (#51993)
Click to expand commit body
Release Notes:
- N/A
Jakub Konka
created
d30ceba
agent_ui: Update thread metadata on more thread events (#52010)
Click to expand commit body
## Context
Two reasons:
1. We need to update updated_at in more cases
2. We weren't refreshing the sidebar often enough with status updates.
Release Notes:
- N/A
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Ben Brandt
and
Bennet Bo Fenner
created
61c2a43
gpui: Add `disabled` state to app menu items (#44191)
Click to expand commit body
Continue #39876 to add `disabled` state to `MenuItem`.
Make this change for #44047 ready to have disabled state.
1. Add `disabled` state to `MenuItem`.
2. Add some builder methods to `Menu` and `MenuItem`.
3. Improve `set_menus` method to receive a `impl IntoIterator<Item =
Menu>`.
Release Notes:
- N/A
--
<img width="294" height="204" alt="image"
src="https://github.com/user-attachments/assets/688e0db8-6c4e-4f9b-a832-8228db0e95d8"
/>
```bash
cargo run -p gpui --example set_menus
```
Jason Lee
created
d1177dc
acp: Support terminal auth methods (#51999)
Click to expand commit body
## Context
Brings in support for the new terminal auth methods. Currently behind
AcpBeta feature flag while the RFD stabilizes
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
## Context
Closes #51955
Some super easy helix parity. I checked and helix uses these binds for
splitting the editor, given these binds are helix specific, it would be
weird to just keep them being wrong.
## How to Review
just changed the default keymap for helix mode.
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- helix: fixed binds for splitting window
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This panic stemmed from us dropping the tokio runtime before dropping
wasm tasks which then could attempt to spawn_blocking, immediately
failing and panicking on unwrap inside wasmtime.
Closes ZED-5DE
Release Notes:
- N/A or Added/Fixed/Improved ...
Lukas Wirth
created
2839676
git_ui: Fix multibuffer coordinate conversion in clipboard diff (#51985)
Click to expand commit body
## Context
Fixes the visual selection update in `TextDiffView::open` to properly
convert between buffer-local and multibuffer coordinates using
`buffer_point_to_anchor`. Previously, raw multibuffer Points were used
directly for line expansion, which produced incorrect regions when
expanded deleted diff hunks shifted multibuffer row numbers.
This provides a single unified code path for both singleton and
non-singleton multibuffers, as suggested in [#51457 review
feedback](https://github.com/zed-industries/zed/pull/51457#issuecomment-4091134303).
Follow-up to #51457.
## How to Review
Small PR - all changes are in `crates/git_ui/src/text_diff_view.rs`.
Focus on:
- `open()`: The visual selection update block now uses
`buffer_point_to_anchor` + `to_point` instead of raw multibuffer
coordinate math
- No more assumption that multibuffer Points == buffer-local Points
- Existing tests validate both singleton and non-singleton multibuffer
paths
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] The content is consistent with the UI/UX checklist
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Fixed incorrect diff region when using "Diff Clipboard with Selection"
with expanded diff hunks in the editor.
Om Chillure
created
fdf144f
language_models: Fix the partial json streaming to not blast `\` everywhere (#51976)
Click to expand commit body
## Context
This PR fixes one of the issues in #51905, where model outputs are full
of errant `\` characters.
heres the problem: As the response is streamed back to zed, we
accumulate the message chunks and and need to convert those chunks to
valid json, to do that we use `partial_json_fixer::fix_json`, when the
last character of a chunk is `\`, the `fix_json` has to escape that
backslash, because its inside of a string (if it isn't, its invalid json
and the tool call will crash) and other wise you would end up escaping
the end `"` and everything would be messed up.
why is this a problem for zed:
T_0 is the output at some step.
T_1 is the output at the next step.
the `fix_json` system is meant to be used by replacing T_0 with T_1,
however in the editor, replacing the entirety of T_0 with T_1 would be
slow/cause flickering/etc.. so we calculate the difference between T_0
and T_1 and just add it to the current buffer state. So when a chunk
ends on `\`, we end up with something like `... end of line\\"}` at the
end of T_0,
in T_1, this becomes `... end of line\n ...`. then when we add the new
chunk from T_1, it just picks up after the \n because its tracking the
length to manage the deltas.
## How to Review
utils.rs:
fix_streamed_json => remove trailing backslashes from incoming json
streams so that `partial_json_fixer::fix_json` doesn't try to escape
them.
other files: call fix_streamed_json before passing to `serde_json`
I had claude write a bunch of tests while I was working on the fix,
which I have kept in for now, but the end functionality of
fix_streamed_json is really simple now, so maybe these arent really
needed.
## Videos
Behavior Before:
https://github.com/user-attachments/assets/f23f5579-b2e1-4d71-9e24-f15ea831de52
Behavior After:
https://github.com/user-attachments/assets/40acdc23-4522-4621-be28-895965f4f262
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- language_models: fixed partial json streaming
Release Notes:
- N/A or Added/Fixed/Improved ...
---------
Co-authored-by: John Tur <john-tur@outlook.com>
Cameron Mcloughlin
and
John Tur
created
93a226d
Add an action dedicated to closing the sidebar (#51982)
Click to expand commit body
## Context
This PR adds an action that only closes the sidebar, rather than always
toggling.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [X] I've reviewed my own diff for quality, security, and reliability
- [N/A] Unsafe blocks (if any) have justifying comments
- [N/A] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [N/A ] Tests cover the new/changed behavior
- [N/A] Performance impact has been considered and is acceptable
Release Notes:
- Added a `multi workspace: close workspace sidebar` action.
## Context
- Improve how we detect when the sidebar should render the empty state.
It was previously wrong using `content.entries.is_empty`, which would
also happen if there are no search matches.
- Improved archive view keyboard nav and design. Not using the ListItem
here anymore so as to avoid confusing hover and active states.
- Move archive and open folder buttons to the bottom of the sidebar.
- Add a new flavor of the recent projects for the sidebar that only
serves as a way to _add_ projects.
- Add the ability to add (and remove) folders to a given project group
in the sidebar through a dropdown menu
---
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Danilo Leal
created
2d7c720
multiworkspace: Don't destroy workspace when git worktree is detached head (#51977)
Click to expand commit body
When a git worktree is in a detached HEAD state (e.g. after `git
checkout --detach`), the workspace for that worktree would disappear
from the sidebar UI, and if the workspace was currently open your UI
would just disappear.
This happened because `parse_worktrees_from_str` silently dropped any
worktree entries without a `branch` line in the porcelain output, which
cascaded through the `linked_worktrees` list and caused
`prune_stale_worktree_workspaces` to remove the workspace.
This PR:
- Makes `Worktree::ref_name` an `Option<SharedString>` so detached
worktrees can be represented
- Renames `Worktree::branch()` to `Worktree::display_name()`, which
returns the branch name when available or the short SHA as a fallback
(mirroring how the title bar already handles detached HEAD for
repositories)
- Updates `parse_worktrees_from_str` to include detached and bare
worktree entries instead of dropping them
- Filters detached worktrees out of the worktree picker UI, preserving
the existing product decision to only show branch-based worktrees there
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Eric Holk
created
1dfe836
Remove `settings` dependency from `anthropic` (#51979)
Click to expand commit body
Release Notes:
- N/A
-
John Tur
created
c1cbea1
Fix crash in apply text buffer operations found when opening a channel notes (#51978)
Click to expand commit body
To do
* [x] turn the operations from collab into a failing test
* [x] fix the crash
* [ ] turn the huge set of operations into a succinct test that can be
checked in on main
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Max Brunsfeld
and
Ben Kunkle
created
01fe4f6
Add screen-sharing support on Wayland/Linux (#51957)
Click to expand commit body
Release Notes:
- Added screen-sharing support on Wayland/Linux.
---------
Co-authored-by: Neel Chotai <neel@zed.dev>
Jakub Konka
and
Neel Chotai
created
55a59ca
gpui: Treat typographic apostrophes as word characters for line wrapping (#51973)
Click to expand commit body
The line wrapper's `is_word_char` function included the ASCII apostrophe
(U+0027) but not the typographic right single quotation mark `'`
(U+2019) or left single quotation mark `'` (U+2018). When Markdown
rendering produces curly quotes, words like `won't` were being split at
the apostrophe during line wrapping, producing `won` at the end of one
line and `'t` at the start of the next.
This adds both typographic quote characters to `is_word_char` so they
are treated the same as the ASCII apostrophe.
Release Notes:
- Fixed line wrapping splitting words at typographic apostrophes (e.g.
"won't" breaking as "won" / "'t").
Eric Holk
created
d344d7f
Split size check into compute + label workflows for fork PR support (#51972)
Click to expand commit body
## Context
Fork PRs receive a read-only `GITHUB_TOKEN`, causing 403 errors on all
label and comment writes
([example](https://github.com/zed-industries/zed/pull/51878)). This
splits the single workflow into two:
- **pr-size-check.yml** (`pull_request`): computes size and guided tour
detection, uploads a JSON artifact — read-only, works for forks
- **pr-size-label.yml** (`workflow_run`): downloads the artifact,
applies labels and comments — runs on the base repo with full write
access
### Security
- Artifact treated as untrusted data: fields are cast and validated
(`Number()`, `String()` + prefix check, `Boolean()`) before use
- No artifact content is executed or interpolated into shell
- Missing artifact handled gracefully (steps skip via output flag)
### Also included
- Structural guided tour detection: extracts "How to Review" section,
strips HTML comment placeholders, checks for actual author content
(fixes false positive in #51957)
- Softer confirmation: "appears to include guidance"
Tested locally end-to-end against 4 real PRs
(XL/small/medium/false-positive).
## How to Review
1. `pr-size-check.yml` — the compute half. Compare against the previous
version: all write operations removed, artifact upload added at the end.
2. `pr-size-label.yml` — new file. Download artifact, validate, apply
labels/comments. Same label logic as before, just in a `workflow_run`
context.
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
John D. Swanson
created
2051578
editor: Fix rewrapping with an empty selection (#51742)
Click to expand commit body
Closes #43043
Rewrapping logic for when there was nothing selected was desynced from
the code that handles selections.
The desired wrapping can be achieved when you selected the markdown
paragraph and use the rewrap action.
This PR moves the logic that selects lines for the case where there is
no selection further up to reuse the existing rewrapping logic
<img width="862" height="553" alt="image"
src="https://github.com/user-attachments/assets/87f7c6cb-7855-4193-b17a-f938f8c9a210"
/>
- [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:
- Fixed rewrapping paragraphs in markdown when you have nothing selected
---------
Co-authored-by: Tom Houlé <tom@tomhoule.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Kurian Jojo
,
Tom Houlé
,
Antonio Scandurra
, and
Anthony Eid
created
ff2e5d4
settings_ui: Fix edit predictions and tool permissions for narrow windows (#51878)
Click to expand commit body
Closes #51865
The Tool Permissions and Edit Prediction Providers pages have settings
that do not conform very well to the usual setup, because of this they
are specially defined in .../settings_ui/src/pages . Due to this setup,
they do not benefit from the same automatic responsive setup as the
other parts of the settings ui. This was causing issues w/ narrow
windows, where fields and text were extending past the side of the
window or just not displaying.
All that was needed to fix it was some tweaks to the structure and css
of those pages, and its smooth sailing. Maybe in the future
`render_settings_item` can be made broader and support these use cases
as well so this doesn't have to be handled manually.
Behavior Before:
https://github.com/user-attachments/assets/283df746-e1bb-4791-b259-085dc83f3292
Behavior After:
https://github.com/user-attachments/assets/154c8fcf-8a02-49c8-910a-a69dc11b144f
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:
- Settings Editor: Fixed the display issue with narrow windows on the
Edit Prediction configuration page.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Finn Eitreim
and
Danilo Leal
created
0f1f0f9
cloud_llm_client: Add derives for edit prediction fields (#51968)
Click to expand commit body
## Context
This PR adds some derives which make tracing easier on cloud side.
## Self-Review Checklist
<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Neel
created
278e81b
Improve guided tour detection to use structural check (#51969)
Click to expand commit body
## Context
Follow-up to #51964. The previous fix (stripping HTML comments) still
had a false positive: the `## How to Review` heading itself matched the
`how to review` alternative in the regex. Every PR using the template
would trigger the "guided tour detected" message.
Replace the regex with structural detection: extract the "How to Review"
section, strip template placeholders, and check if the author actually
wrote content there. Also softens the confirmation message to "appears
to include guidance."
## How to Review
- Single file: `.github/workflows/pr-size-check.yml`, lines 147-154
- The `rawBody.match(...)` extracts content between `## How to Review`
and the next `##` heading
- Confirmed: PR #51957's body returns `false`, a PR with actual content
returns `true`
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A
John D. Swanson
created
b786872
Fix guided tour false positive in PR size check (#51964)
Click to expand commit body
## Context
The size check workflow's guided tour detection matches text inside HTML
comment placeholders in the PR template (e.g., `<!-- provide a guided
tour — numbered list of files/commits to read in order -->`), producing
false positives like the one on #51957.
Fix: strip `<!-- -->` comments from the PR body before running the
regex.
## How to Review
- Single file: `.github/workflows/pr-size-check.yml`, lines 148-151
- The `.replace(/<!--[\s\S]*?-->/g, '')` runs in `actions/github-script`
JS, not shell
## Self-Review Checklist
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- N/A