f4ac0cf
Support @-mentions in inline assists and when editing old agent panel messages (#29734)
Click to expand commit body
Closes #ISSUE
Co-authored-by: Bennet <bennet@zed.dev>
Release Notes:
- Added support for context `@mentions` in the inline prompt editor and
when editing past messages in the agent panel.
---------
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Cole Miller
,
Bennet Bo Fenner
, and
Ben Brandt
created
Previously, the assistant panel width was not persisted across sessions.
This meant that upon restarting the Zed editor, the panel would revert
to its default size, disrupting the user's preferred layout.
This pull request introduces persistence for the assistant panel width.
The width is now saved to the key-value store when the editor is closed
and restored on startup, ensuring a consistent UI experience across
different sessions.
Release Notes:
- agent: Add assistant panel width persistence
---------
Signed-off-by: Umesh Yadav <umesh4257@gmail.com>
Also have its description say it should only be used on request
Release Notes:
- N/A
Richard Feldman
created
acff230
agent: Ensure that web search tool is always available (#29799)
Click to expand commit body
Some changes in the LanguageModelRegistry caused the web search tool not
to show up, because the `DefaultModelChanged` event is not emitted at
startup anymore.
Release Notes:
- agent: Fixed an issue where the web search tool would not be available
after starting Zed (only when using zed.dev as a provider).
Bennet Bo Fenner
created
31d6a4e
Properly score fuzzy match queries with multiple chars in lower case (cherry-pick #29794) (#29798)
Click to expand commit body
Cherry-picked Properly score fuzzy match queries with multiple chars in
lower case (#29794)
Closes https://github.com/zed-industries/zed/issues/29526
Release Notes:
- Fixed file finder crashing for certain file names with multiple chars
in lowercase form
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
gcp-cherry-pick-bot[bot]
and
Kirill Bulatov
created
This PR makes agent previews render like any other preview in the
component preview list & pages.
Page:

List:

Release Notes:
- N/A
bc3b4c0
agent: Add animation in the edit file tool card until a diff is assigned (#29773)
Click to expand commit body
This PR prevents this edit card from being shown expanded but empty,
like this:
<img width="590" alt="Screenshot 2025-05-01 at 7 38 47 PM"
src="https://github.com/user-attachments/assets/147d3d73-05b9-4493-8145-0ee915f12cd9"
/>
Now, we will show an animation until it has a diff computed.
https://github.com/user-attachments/assets/52900cdf-ee3d-4c3b-88c7-c53377543bcf
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Max Brunsfeld
and
Danilo Leal
created
887d6bf
Fix tasks not being stopped on reruns (#29786)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/28993
* Tone down tasks' cancellation logging
* Fix task terminals' leak, disallowing to fully cancel the task by
dropping the terminal off the pane:
https://github.com/zed-industries/zed/blob/f619d5f02af100c34e286af294a42a01dcfb238c/crates/terminal_view/src/terminal_panel.rs#L1464-L1471
Release Notes:
- Fixed tasks not being stopped on reruns
7da1166
Allow `StreamingEditFileTool` to also create files (#29785)
Click to expand commit body
Refs #29733
This pull request introduces a new field to the `StreamingEditFileTool`
that lets the model create or overwrite a file in a streaming way. When
one of the `assistant.stream_edits` setting / `agent-stream-edits`
feature flag is enabled, we are going to disable the `CreateFileTool` so
that the agent model can only use `StreamingEditFileTool` for file
creation.
Release Notes:
- N/A
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Antonio Scandurra
,
Ben Brandt
, and
Oleksiy Syvokon
created
a329e67
agent: Make thread completion mode non-optional (#29772)
Click to expand commit body
This PR makes the thread completion mode non-optional.
Release Notes:
- N/A
Marshall Bowers
created
cde6c2f
agent: Do not render unnecessary lines in edit file tool card (#29766)
Click to expand commit body
This PR prevents any unnecessary lines from being rendered in the edit
file tool card in the case of small diffs.
I think this (hopefully) addresses the last remaining task from
https://github.com/zed-industries/zed/pull/29448.
| `main` | This PR |
| --- | --- |
| <img width="634" alt="main"
src="https://github.com/user-attachments/assets/7c06394e-957a-4d36-a484-5974687041e9"
/> | <img width="634" alt="PR"
src="https://github.com/user-attachments/assets/84206d5a-a93a-4a42-99ca-7cdebb0d91bb"
/> |
(The last empty line in the second image is an empty line present in the
file itself)
---
n the second commit I also preemtively disabled vertical overscrolling
for full mode editors which are sized by content. This is basically the
same fix as in https://github.com/zed-industries/zed/pull/28471.
Strictly speaking, this is not needed for the fix here, but I thought it
might be nice to have for the future to prevent any issues from occuring
due to overscroll.
Release Notes:
- agent: Improved rendering of small diffs for the edit file tool card.
Finn Evers
created
40b51c2
agent: Add design adjustments to MCP config flow (#29765)
Click to expand commit body
Mostly somewhat small UI tweaks around the MCP extension config flow and
the settings section.
Release Notes:
- N/A
Danilo Leal
created
7c56afd
agent: Render the max mode toggle using a muted color (#29763)
Click to expand commit body
This PR updates the max mode toggle to use the muted color.
This makes it fit in more with the rest of the controls.
<img width="243" alt="Screenshot 2025-05-01 at 5 24 01 PM"
src="https://github.com/user-attachments/assets/57267d29-3c7b-4ea9-b6b9-81c42f6b7e1c"
/>
Release Notes:
- agent: Adjusted the color of the max mode toggle.
Marshall Bowers
created
8e31309
Make context pills clickable while editing (#29740)
Click to expand commit body
Release Notes:
- Fixed a bug where clicking context pills switched into the "editing
message" state instead of clicking the pill.
Co-authored-by: Michael <michael@zed.dev>
Co-authored-by: Ben <ben@zed.dev>
Closes #29753
The template contains an error: `has_default_user_rules` is always
undefined and should be `has_user_rules` instead.
Release Notes:
- Fixed default user rules ignored during prompt building.
We weren't using this one anymore. We used to use it for the switch that
toggled tools on, which doesn't exist anymore.
Release Notes:
- N/A
---------
Co-authored-by: Joseph T. Lyons <josephtlyons@gmail.com>
Danilo Leal
and
Joseph T. Lyons
created
a6a94f7
context servers: Show configuration modal when extension is installed (#29309)
Bennet Bo Fenner
,
Danilo Leal
,
Danilo Leal
,
Marshall Bowers
,
Cole Miller
,
Antonio Scandurra
, and
Oleksiy Syvokon
created
9107473
Introduce a new `StreamingEditFileTool` (#29733)
Click to expand commit body
This pull request introduces a new tool for streaming edits. The
short-term goal is for this tool to replace the existing `EditFileTool`,
but we want to get this out the door as soon as possible so that we can
start testing it.
`StreamingEditFileTool` is mutually exclusive with `EditFileTool`. It
will be enabled by default for anyone who has the `agent-stream-edits`
feature flag, as well as people that set `assistant.stream_edits` to
`true` in their settings.
### Implementation
Streaming is achieved by requesting a completion while the `edit_file`
tool gets called. We invoke the model by taking the existing
conversation with the agent and appending a prompt specifically tailored
for editing. In that prompt, we ask the model to produce a stream of
`<old_text>`/`<new_text>` tags. As the model streams text in, we
incrementally parse it and start editing as soon as we can.
### Evals
Note that, as part of this pull request, I also defined some new evals
that I used to drive the behavior of the recursive LLM call. To run
them, use this command:
```bash
cargo test --package=assistant_tools --features eval -- eval_extract_handle_command_output
```
Or comment out the `#[cfg_attr(not(feature = "eval"), ignore)]` macro.
I recommend running them one at a time, because right now we don't
really have a way of orchestrating of all these evals. I think we should
invest into that effort once the new agent panel goes live.
Release Notes:
- N/A
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Antonio Scandurra
,
Nathan Sobo
,
Bennet Bo Fenner
, and
Oleksiy Syvokon
created
88bd4ee
agent: Show nav dropdown close button only on hover (#29732)
Release Notes:
- Added `open` tool for opening files or URLs.
Richard Feldman
created
6030ecb
agent: Allow adding/removing context when editing existing messages (#29698)
Click to expand commit body
Release Notes:
- agent: Support adding/removing context when editing existing message
---------
Co-authored-by: Cole Miller <m@cole-miller.net>
Co-authored-by: Cole Miller <cole@zed.dev>
Bennet Bo Fenner
,
Cole Miller
, and
Cole Miller
created
## Before

## After

Release Notes:
- Context picker and `@`-mentions now work with very large files.
e4e455a
Fix duplicate thread entries in agent navigation menu (#29672)
Click to expand commit body
Closes #ISSUE
Release Notes:
- N/A
Cole Miller
created
ff4900c
Mitigate panic in merge conflict resolution (#29678)
Click to expand commit body
We have a report of a panic when indexing into
`BufferConflicts.block_ids` using the `old_range` from the
`ConflictsUpdated` event, indicating that the `block_ids` array can get
out of sync with the underlying `ConflictSet`. This PR adds a mitigation
so that we won't panic in this situation, as a stopgap until the bug can
be reproduced in a test and fixed at the root.
Release Notes:
- N/A
Cole Miller
created
632f08d
project: Check path extension first, then worktree's (#29671)
Click to expand commit body
This fixes a bug with opening images on worktrees that contain
"extension" in the dir name, like `zed.dev`
Release Notes:
- N/A
Oleksiy Syvokon
created
5589e78
python: Do not look up venv path from source file path (#29676)
⚠️ Work in progress until all of the to-dos are knocked out:
- [x] Disable soft-wrapping
- [x] Make it foldable only after a certain number of lines
- [x] Display tool status errors
- [x] Fix horizontal scroll now that we've disabled soft-wrap
- [ ] Don't render unnecessary extra lines (will be added later, on a
follow-up PR)
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Danilo Leal
,
Agus Zubiaga
, and
Michael Sloan
created
7587340
Fix a bug that interfered with sorting of conflicted paths in the git panel (#29534)
Click to expand commit body
This PR updates the git store to not register a change in a repository's
merge heads until conflicted paths are seen.
We currently use the repository's merge heads only to decide when the
list of conflicted paths should be refreshed. Previously, the logic
looked like this:
- Whenever we see a change in the merge heads, set the list of
conflicted paths by filtering the output of `git status`.
It turns out that when a conflicting merge takes a while, we can see
this sequence of events:
1. We get an event in .git and reload statuses and merge heads.
Previously there were no merge heads, and now we have some, but git
hasn't finished figuring out which paths have conflicts, so we set the
list of conflicted paths to `[]`.
2. Git finishes computing the list of conflicted paths, and we run
another scan that picks these up from `git status`, but then we throw
them away because the merge heads are the same as in (1).
By not updating our stored merge heads until we see some conflicts in
`git status`, we delay this step until (2), and so the conflicted paths
show up in the git panel as intended.
This means that our merge heads state no longer matches what's on disk
(in particular, during a clean merge we'll never update them at all),
but that's okay because we only keep this state for the purpose of
organizing conflicts.
Release Notes:
- Fixed a bug that could cause conflicted paths to not appear in their
own section in the git panel.
Cole Miller
created
5073cba
agent: Add keybindings to open the panel's extra menu (#29663)
Click to expand commit body
Maybe "extra" isn't the best word, but I'm referring to the ellipsis
menu on the far right of the panel that holds "extra" or "additional
options". There is a known issue with context menus, at least if
implemented this way, that makes hitting enter to select an option not
work. Will leave this fix to a later PR.
Release Notes:
- N/A
This new default profile is one that doesn't use any tools; it's
completely "naked" and it shouldn't lean into trying to read things from
the current project at hand. Better suited for general topic chats with
the LLM.
PS: Still expecting some wordsmithing here before merging.
Release Notes:
- agent: Added a new default profile called "Manual" that doesn't
include any tools, for general topic chats with the LLM.
59708ef
Revert "python: Enable subroot detection for pylsp and pyright (#27364)" (#29658)
Click to expand commit body
This reverts commit e661a0afd64e3e6e1e51c981cb7bda4e0af724fd.
Closes #ISSUE
Release Notes:
- Reverted changes to Python subroot detection which could have caused
multiple python processes to be spawned when working in projects with
multiple `pyproject.toml` files.
Piotr Osiewicz
created
152ea04
chore: Move Windows dependencies to windows section (#29649)
9767033
debugger: Extract running state from DebugSession mode and remove mode field (#29646)
Click to expand commit body
DebugSession.mode is no longer needed because project::debugger::Session
manages its own state now (booting, running, terminated), and removing
mode simplifies a lot of the code that uses running state.
I used Zed AI to do a good chunk of the refactor, but I doubled-checked
everything it did and changed a good amount of its updates.
Release Notes:
- N/A
Co-authored-by: Zed AI <ai@zed.dev>
Anthony Eid
and
Zed AI
created
edf78e7
Fix token counting requests in Gemini (#29643)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
8d77efa
extensions_ui: Fix scroll to top only on refetch (#29640)
Click to expand commit body
Closes #29604
Release Notes:
- Fixes case where extension page scrolls up to the top when installing
an extension.
Smit Barmase
created
747a029
Split diagnostics markdown style out (#29637)
c8685dc
Fix eval judging missing final response (#29638)
Click to expand commit body
Fixed issue where eval thread judges were not considering the last
response in the thread.
The problem was that they were getting the full list of messages from
`last_request`, which (being a request!) did not have the response yet.
Release Notes:
- N/A