01d2066
agent: Make markdown code blocks uncollapsed by default (#29424)
Click to expand commit body
Seeing the markdown code stream in is actually more helpful than hiding
parts of it; parts that you may be interested in.
Release Notes:
- N/A
Danilo Leal
created
dfea962
agent: Allow to explictly disable tools when using `enable_all_context_servers` (#29414)
Click to expand commit body
Previously, all MCP tools would be completed regardless if they were
disabled/enabled for the profile. This meant that the "Write" profile
was always using all MCP tools, even if you disabled them in the
settings.
Now, when `enable_all_context_servers` is set to `true`, we will enable
all tools from all MCP servers by default but disable the ones that are
explicitly disabled for the profile.
Also fixes an issue where the tools would not show up as enabled when
using `enable_all_context_servers: true`
Release Notes:
- agent: Fix an issue where MCP tools could not be enabled/disabled
1cbdce4
assistant: Fix issue when using inline assistant with Gemini models (cherry-pick #29407) (#29409)
Click to expand commit body
Cherry-picked assistant: Fix issue when using inline assistant with
Gemini models (#29407)
Closes #29020
Release Notes:
- assistant: Fix issue when using inline assistant with Gemini models
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
gcp-cherry-pick-bot[bot]
and
Bennet Bo Fenner
created
745e7d6
language_models: Use `POST /completions` endpoint for Zed provider (#29389)
Click to expand commit body
This PR updates the Zed provider to use the `POST /completions`
endpoint.
There is no functional difference from `POST /completion`, but the
pluralized version reads better.
Release Notes:
- N/A
Marshall Bowers
created
19de45c
Bring back reload of agent context before sending message (#29385)
Click to expand commit body
Realized after merging #29233 that this behavior is desired
Release Notes:
- N/A
Michael Sloan
created
f8c3a01
Remove unnecessary fields from the tool schemas (#29381)
Click to expand commit body
This PR removes two fields from JSON schemas (`$schema` and `title`),
which are not expected by any model provider, but were spuriously
included by our JSON schema library, `schemars`.
These added noise to requests and cost wasted input tokens.
### Old
```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FetchToolInput",
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "The URL to fetch.",
"type": "string"
}
}
}
```
### New:
```json
{
"properties": {
"url": {
"description": "The URL to fetch.",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
}
```
- N/A
Simplifies the data structures involved in agent context by removing
caching and limiting the use of ContextId:
* `AssistantContext` enum is now like an ID / handle to context that
does not need to be updated. `ContextId` still exists but is only used
for generating unique `ElementId`.
* `ContextStore` has a `IndexMap<ContextSetEntry>`. Only need to keep a
`HashSet<ThreadId>` consistent with it. `ContextSetEntry` is a newtype
wrapper around `AssistantContext` which implements eq / hash on a subset
of fields.
* Thread `Message` directly stores its context.
Fixes the following bugs:
* If a context entry is removed from the strip and added again, it was
reincluded in the next message.
* Clicking file context in the thread that has been removed from the
context strip didn't jump to the file.
* Refresh of directory context didn't reflect added / removed files.
* Deleted directories would remain in the message editor context strip.
* Token counting requests didn't include image context.
* File, directory, and symbol context deduplication relied on
`ProjectPath` for identity, and so didn't handle renames.
* Symbol context line numbers didn't update when shifted
Known bugs (not fixed):
* Deleting a directory causes it to disappear from messages in threads.
Fixing this in a nice way is tricky. One easy fix is to store the
original path and show that on deletion. It's weird that deletion would
cause the name to "revert", though. Another possibility would be to
snapshot context metadata on add (ala `AddedContext`), and keep that
around despite deletion.
Release Notes:
- N/A
Michael Sloan
created
43a04dc
Treat invalid JSON in tool calls as failed tool calls (#29375)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Richard Feldman
,
Max
, and
Max Brunsfeld
created
00e92e3
Rename "Prompt Library" to "Rules Library" (#29349)
Click to expand commit body
There's probably more to do to fully make the transition, and we'll
still debate a bit internally whether this is the name, but just opening
this PR up now for visibility.
Release Notes:
- N/A
Danilo Leal
created
9e703ac
gemini: Fix issue when deserializing tool call (#29363)
Click to expand commit body
Fixes a regression introduced in #29322
Release Notes:
- N/A
Co-authored-by: Agus Zubiaga <hi@aguz.me>
This is to enable alternative streaming solutions at the application
layer. I'm not sure we really should have performed parsing of the input
at this layer. Either way I want to experiment with streaming approaches
in a separate crate on a branch, and this will help.
/cc @maxdeviant @bennetbo @rtfeldman
Closes #ISSUE
Release Notes:
- N/A
Nathan Sobo
created
44fc004
agent: Do not reuse assistant message across generations (#29360)
Click to expand commit body
#29354 introduced a bug where we would append tool uses to the last
assistant message even if it was from a previous request.
Release Notes:
- N/A
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
b85bfba
agent: Do not create user messages for tool results in thread (#29354)
Click to expand commit body
We used to insert empty user messages into the `Thread::messages` `Vec`
when tools finished running and then we would attach the results when
creating the request. This approach was very easy to mess up during
state handling, leading to empty user messages displayed in the
conversation and API failures.
Instead, we will no longer insert actual user messages for tool results
to the `Thread`, and will only do this on the fly when creating the
model request. This simplifies a lot of code and show fix the mentioned
errors.
Release Notes:
- agent: Improve reliability of LLM requests when including tool results
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Agus Zubiaga
,
Bennet Bo Fenner
, and
Oleksiy Syvokon
created
f743cdc
agent: Simplify user message design more (#29326)
Click to expand commit body
Follow-up to https://github.com/zed-industries/zed/pull/29165 where the
user message design is simplified even more. The edit button is not
visible anymore, and you can click on the whole message block to edit a
message.
Release Notes:
- N/A
Danilo Leal
created
808d9c9
Fix ctrl-enter opening inline-assistant in assistant text threads (#29313)
Click to expand commit body
Closes: https://github.com/zed-industries/zed/issues/24501
This has been broken for a while on linux (at least since Feb 8th!) for Assistant1.
It is also broken for Text Threads in Assitant2 (on macos and linux).
This should fix both.
Potentially related:
- https://github.com/zed-industries/zed/pull/29107
Release Notes:
- Fix for `ctrl-enter` shortcut in Assistant text threads incorrectly
opening inline assist instead of triggering Send.
Co-authored-by: Conrad Irwin <conrad@zed.dev>
This PR significantly improves the quality of the initial file search
that occurs when the model doesn't yet know the full path to a file it
needs to read/edit.
Previously, the assertions in file_search often failed on main as the
model attempted to guess full file paths. On this branch, it reliably
calls `find_path` (previously `path_search`) before reading files.
After getting the model to find paths first, I noticed it would try
using `grep` instead of `path_search`. This motivated renaming
`path_search` to `find_path` (continuing the analogy to unix commands)
and adding system prompt instructions about proper tool selection.
Note: I know the command is just called `find`, but that seemed too
general.
In my eval runs, the `file_search` example improved from 40% ± 10% to
98% ± 2%. The only assertion I'm seeing occasionally fail is "glob
starts with `**` or project". We can probably add some instructions in
that regard.
Release Notes:
- N/A
Agus Zubiaga
created
80bac1c
eval: New `add_arg_to_trait_method` example (#29297)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Agus Zubiaga
and
Richard Feldman
created
4171bbb
agent: Encourage model to include displayed fields first (#29308)
Click to expand commit body
Instructs the model to include the fields that we display first in the
input object, so that e.g the user can see the path of a file while the
model generates the content.
Release Notes:
- N/A
Agus Zubiaga
created
2a88867
agent: Read the user's plan from the `UserStore` (#29305)
Click to expand commit body
This PR updates the Agent panel to read the user's plan from the
`UserStore` instead of hard-coding it.
Release Notes:
- N/A
Marshall Bowers
created
9d420ae
agent: Add "copy to clipboard" button to error message popups (#29299)
Click to expand commit body
This change makes agent errors copy-able to clipboard:

Release Notes:
- N/A
Oleksiy Syvokon
created
b431886
editor: Fix broken mouse scrolling on main (#29307)
Click to expand commit body
This PR is a quick follow-up to #29234 , which unfortunately broke
scrolling with the mouse in editors on main.
The linked PR introduced the possiblilty to completely disable scrolling
for editors. Unfortunately, it also disabled scrolling for editors by
default. This PR fixes this by re-enabling it by default.
This change also needs to be backported to v0.184.x. Otherwise, mouse
scrolling in the next preview release will not work!
Release Notes:
- N/A
Finn Evers
created
43c99ad
agent: Improve feedback text and buttons wrapping (#29302)
Click to expand commit body
Just a little UI improvement here.
Release Notes:
- N/A
Danilo Leal
created
f802b56
agent: Render diffs for the edit file tool (#29234)
Click to expand commit body
This PR implements the `ToolCard` for the edit file tool, which allow us
to display an editor with a diff in the thread view with the changes
performed by the model.
- [x] Fix buffer sometimes displaying empty
- [x] Stop buffer from scrolling together with the thread
- [x] Fix multibuffer header sometimes appearing
- [x] Fix buffer height issue
- [x] Implement "full height" expand button
- [x] Add "Jump To File" functionality
- [x] Polish and refine styles
Release Notes:
- agent: Added diff preview cards in the thread view for edits performed
by the agent.
---------
Co-authored-by: João Marcos <marcospb19@hotmail.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Danilo Leal
,
João Marcos
,
Richard Feldman
,
Agus Zubiaga
, and
Conrad Irwin
created
8446005
More graceful invalid JSON handling (#29295)
Click to expand commit body
Now we're more tolerant of invalid JSON coming back from the model
(possibly because it was incomplete and we're streaming), plus if we do
end up with invalid JSON once it has all streamed back, we report what
the malformed JSON actually was:
<img width="444" alt="Screenshot 2025-04-23 at 1 49 14 PM"
src="https://github.com/user-attachments/assets/480f5da7-869b-49f3-9ffd-8f08ccddb33d"
/>
Release Notes:
- N/A
Richard Feldman
created
5b028ac
Fix relative paths not properly resolved in the terminal during cmd-click (#29289)
Click to expand commit body
Closes https://github.com/zed-industries/zed/pull/28342
Closes https://github.com/zed-industries/zed/issues/28339
Fixes
https://github.com/zed-industries/zed/pull/29274#issuecomment-2824794396
Release Notes:
- Fixed relative paths not properly resolved in the terminal during
cmd-click
19fb1e1
Fix workspace bottom obscured when bottom dock is full height (#27689)
Click to expand commit body
When dragging the pane separator of the bottom dock to full window
height, the contents at the bottom of the dock and workspace window
overflowed the screen, becoming obscured. This happened because setting
a new size in resize_bottom_dock(...) was not taking in consideration
the top bounds of the workspace window, which caused the bottom bounds
of both dock and workspace to overflow. The issue was fixed by
subtracting the workspace.bounds.top() value to the dock's new size.
Closes #12966
Release Notes:
- N/A
Bibiana André
created
f2cb6d6
collab: Add `head_commit_details` column to `project_repositories` (#29284)
Click to expand commit body
This PR adds the `head_commit_details` column to the
`project_repositories` table, since it was missed in
https://github.com/zed-industries/zed/pull/29007.
Release Notes:
- N/A
Marshall Bowers
created
822b6f8
agent: Expose web search tool to beta users (#29273)
Click to expand commit body
This gives all beta users access to the web search tool
Release Notes:
- agent: Added `web_search` tool
Bennet Bo Fenner
created
09db312
Fix panic when copying smart quotes in MarkdownElement (#29285)
Click to expand commit body
Release Notes:
- Fixed a panic that could sometimes happen when copying text in the
agent.
Antonio Scandurra
created
a320d32
Fix shift-y on empty line in vim mode (#29253)
Click to expand commit body
Release Notes:
- Fixes a regression where `shift-v up` on an empty line would appear to
have selected the line after (though in reality it did not)
Conrad Irwin
created
266c41e
collab: Add `can_use_web_search_tool` to LLM token claims (#29278)
Click to expand commit body
This PR adds a `can_use_web_search_tool` field to the LLM token claims.
Currently anyone in the `assistant2` feature flag will have access to
the web search tool.
Co-authored-by: Bennet <bennet@zed.dev>
Release Notes:
- N/A
This PR allows the `theme-importer` utility to handle comma-separated
token scopes.
Normally, a token in a VS Code theme is defined as either a string or a
string array:
```json
{
"scope": "token.debug-token",
"settings": {
"foreground": "#d55fde"
}
},
{
"name": "String interpolation",
"scope": [
"punctuation.definition.template-expression.begin",
"punctuation.definition.template-expression.end",
"punctuation.section.embedded"
],
"settings": {
"foreground": "#d55fde"
}
},
```
However, [some
themes](https://github.com/tal7aouy/theme/blob/ac85540d6494cf3b7dffd6adc8a06af6c1dd4b0d/src/variants/TokenColors.ts#L1771-L1777)
seem to use comma-separated values in a single scope string which VS
Code seems to accept as well:
```json
{
"name": "Comments",
"scope": "comment, punctuation.definition.comment",
"settings": {
"foreground": "#7f848e"
}
},
```
This PR handles these definitions by splitting scopes by commas before
trying to match them with the scopes that match Zed syntax tokens.
Release Notes:
- N/A
Variant9
created
990ca48
docs: Update macOS development instructions (#27611)
Click to expand commit body
Updating macOS development readme with some gotchas that I ran into
while getting setup.
- Linked to collab readme because that contained the steps to setup the
postgres database so integration tests pass
- Added section under troubleshooting. Recommending `cargo-nextest`
since the CI uses it and it got me past the failures I was seeing.
Release Notes:
- N/A
---------
Co-authored-by: KyleBarton <kjbarton4@gmail.com>
Peter Finn
and
KyleBarton
created
f69aeb6
Do not log unfinished tools use that are in the middle of streaming (#29275)
Click to expand commit body
Release Notes:
- N/A
Oleksiy Syvokon
created
d5f3fbd
Lookup relative paths in a worktree more robustly (#29274)
Click to expand commit body
Attempt to lookup exact relative paths before full worktree traversal,
only do the full traversal if all other methods fail.
Closes https://github.com/zed-industries/zed/issues/28407
Release Notes:
- Fixed wrong paths opening when cmd-clicking in the terminal
This adds `last.message.json` file that contains the full request plus
response (serialized as a message from assistant for consistency with
other messages).
Motivation: to capture more info and to make analysis of finished runs
easier.
Release Notes:
- N/A
Release Notes:
- Improved performance of agent checkpoint creation.
- Fixed a bug that sometimes caused accidental deletions when restoring
to a previous agent checkpoint.
- Fixed a bug that caused checkpoints to be visible in the Git history.
Antonio Scandurra
created
55ea481
Restore file to original content when rejecting file recreated by agent (#29264)
Click to expand commit body
Release Notes:
- Fixed a bug that could sometimes cause a file to be deleted when
rejecting an agent change.
Antonio Scandurra
created
5e31d86
Fix panic in vim selection restoration (#29251)
Click to expand commit body
Closes #27986
Closes #ISSUE
Release Notes:
- vim: Fixed a panic when using `gv` after `p` in visual line mode
Conrad Irwin
created
4a8f114
Fix panic when collaborating with new multibuffers (#29245)
Click to expand commit body
Before this change, when syncing a multibuffer (such as
find-all-references) to a remote, we would renumber the excerpts from 1.
This did not matter in the past because the buffers' list of excerpts
could not change. In #27876, I added the ability for excerpts to merge,
which meant that the excerpt list could change. This manifested as
people seeing "invalid excerpt id" panics when syncing.
The initial fix to this (to re-use the excerpt ids from the host) ran
into problems because `insert_excerpts_with_ids_after` assumes that you
call it in excerpt-id order. This change de-optimizes that code to
insert the excerpts 1-by-1 in excerpt-id order, but with the
insert_after set to preserve the correct UI order.
I hope to soon remove this code path and use something more like
set-excerpts-for-path for syncing, but in the meantime we should not
panic.
Release Notes:
- Fix a panic when joining a project with a multibuffer with merged
excerpts
- Support programmatic examples
([example](https://github.com/zed-industries/zed/blob/17feb260a0919e102ae4e220669c467885bf4b57/crates/eval/src/examples/file_search.rs))
- Combine data-driven example declarations into a single `.toml` file
([example](https://github.com/zed-industries/zed/blob/17feb260a0919e102ae4e220669c467885bf4b57/crates/eval/src/examples/find_and_replace_diff_card.toml))
- Run judge on individual assertions (previously called "criteria")
- Report judge and programmatic assertions in one combined table
Note: We still need to work on concept naming
<img width=400
src="https://github.com/user-attachments/assets/fc719c93-467f-412b-8d47-68821bd8a5f5">
Release Notes:
- N/A
---------
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Thomas Mickley-Doyle <tmickleydoyle@gmail.com>
Agus Zubiaga
,
Richard Feldman
,
Max Brunsfeld
, and
Thomas Mickley-Doyle
created
0d3fe47
editor: Use quantize score for code completions sort + Add code completions tests (#29182)
Click to expand commit body
Closes #27994, #29050, #27352, #27616
This PR implements new logic for code completions, which improve cases
where local variables, etc LSP based hints are not shown on top of code
completion menu. The new logic is explained in comment of code.
This new sort is similar to VSCode's completions sort where order of
sort is like:
Fuzzy > Snippet > LSP sort_key > LSP sort_text
whenever two items have same value, it proceeds to use next one as tie
breaker. Changing fuzzy score from float to int based makes it possible
for two items two have same fuzzy int score, making them get sorted by
next criteria.
Release Notes:
- Improved code completions to prioritize LSP hints, such as local
variables, so they appear at the top of the list.
Smit Barmase
created
6a009b4
debugger: Open debugger panel on session startup (#29186)
Click to expand commit body
Now all debug sessions are routed through the debug panel and are
started synchronously instead of by a task that returns a session once
the initialization process is finished. A session is `Mode::Booting`
while it's starting the debug adapter process and then transitions to
`Mode::Running` once this is completed.
This PR also added new tests for the dap logger, reverse start debugging
request, and debugging over SSH.
Release Notes:
- N/A
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Cole Miller <m@cole-miller.net>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Zed AI <ai@zed.dev>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Conrad Irwin
,
Anthony Eid
,
Anthony
,
Cole Miller
,
Cole Miller
,
Zed AI
, and
Remco Smits
created
Added default filters to `zlog`, a piece that was present in our
`simple_log` setup, but was missed when switching to `zlog`, resulting
in logspam primarily on linux.
also - more explicit precedence & precedence testing
Release Notes:
- N/A
Ben Kunkle
created
3705986
Adjust image cache APIs to enable ElementState based APIs (#29243)
Click to expand commit body
cc: @sunli829 @huacnlee @probably-neb
I really liked the earlier PR, but had an idea for how to utilize the
element state so that you don't need to construct the cache externally.
I've updated the APIs to introduce an `ImageCacheProvider` trait, and
added an example implementation of it to the image gallery :)
Release Notes:
- N/A
Mikayla Maki
created
aefb3aa
Fix handling of `--system-specs` argument so it happens before `Application::new` (#29240)
Click to expand commit body
Fixes issue described in [description of
#28683](https://github.com/zed-industries/zed/issues/28683#issue-2992849891)
Makes sure that the `--system-specs` arg is handled before
`Application::new` is called, so that it can be used even when Zed is
panicking during app initialization (e.g. Failing to create a Vulkan
context in blade)
Release Notes:
- Fixed an issue where the `--system-specs` arg wouldn't work if Zed
panicked during app initialization (e.g. When failing to create a Vulkan
context in blade)