69fd7d5
agent: Add date separators to Thread History (#29961)
Click to expand commit body
Adds time-bucket separators to the thread history list:
https://github.com/user-attachments/assets/c9ac3ec4-b632-4ea5-8234-382b48de2bd6
Note: I'm simulating that Today is next Thursday so that I can show the
"This Week" bucket.
Release Notes:
- agent: Add date separators to Thread History
Agus Zubiaga
created
d30adff
assistant: Do not create new context on load (#29480)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/27673
Closes https://github.com/zed-industries/zed/issues/29344
Closes #29863
This PR fixes an issue where Zed was showing no language and `4:1` as a
line/column value on startup, as described in the linked issues. You can
actually see in the first issue that the user also experiences the same
issue as described in the second one, as his line/column value is
noticably also `4:1`.
https://github.com/user-attachments/assets/bb60e387-f4b8-4e05-80b3-4dadf1a01262
This issue arises because on assistant panel load, a new context is
created and its editor focused. However, the editor is not visible
despite having focus. The content for the editor for a new context is
`\n\n\n` and the cursor is inserted directly after that - this is where
the line:column position `4:1` comes from. For the assistant panel
editor, the language is intentionally hidden, this is why the language
is not shown on workspace load.
The issue is only present for as long as the user does not focus and
edit another editor, then that instance is focused and everything starts
to work properly again.
As this issue only arises with the old assistant panel, some staff
members were unable to reproduce in the linked issues. Once you set
`export ZED_DISABLE_STAFF=1` in your environment, you should also be
able to reproduce this issue consistently.
---
This PR fixes the issue by not creating a new context on assistant panel
load. This should not cause any regressions; every other code path I
checked creates a new context if no context is yet present.
Additionally, this also seems somewhat more reasonable, as users which
have the assistant panel disabled will never need a new context anyway,
so no context should be created.
In the following video, you can see this fixes the issue when the
assistant panel was not open the last time Zed was opened. If the panel
was open before Zed was closed, we will still properly focus the panel
and then the `4:1` will show again, which in that case is correct. The
assistant panel editor is focused and the missing language as well as
the line number then match what the user sees, experiences and expects.
https://github.com/user-attachments/assets/224a786b-52c7-4212-bccb-dff6d9db62c3
Release Notes:
- Fixed an issue where Zed would show no language and an incorrect
line/column value on startup.
Co-authored-by: Peter Tripp <peter@zed.dev>
Finn Evers
and
Peter Tripp
created
ac042a0
editor: Fix edit range for linked edits on do completion (cherry-pick #29650) (#29988)
Click to expand commit body
Cherry-picked editor: Fix edit range for linked edits on do completion
(#29650)
Closes #29544
Fixes an issue where accepting an HTML completion would correctly edit
the start tag but incorrectly update the end tag due to incorrect linked
edit ranges.
I want to handle multi cursor case (as it barely works now), but seems
like this should go first. As, it might need whole `do_completions`
overhaul.
Todo:
- [x] Tests for completion aceept on linked edits
Before:
https://github.com/user-attachments/assets/917f8d2a-4a0f-46e8-a004-675fde55fe3d
After:
https://github.com/user-attachments/assets/84b760b6-a5b9-45c4-85d8-b5dccf97775f
Release Notes:
- Fixes an issue where accepting an HTML completion would correctly edit
the start tag but incorrectly update the end tag.
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
gcp-cherry-pick-bot[bot]
and
Smit Barmase
created
093f953
editor: Handle more completions sort cases in Rust and Python (cherry-pick #29926) (#29990)
Click to expand commit body
Cherry-picked editor: Handle more completions sort cases in Rust and
Python (#29926)
Closes #29725
Adds 3 more tests for Rust `into` and `await` cases, and Python
`__init__` case. Tweaks sort logic to accommodate them.
Release Notes:
- Improved code completion sort order, handling more cases with Rust and
Python.
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
gcp-cherry-pick-bot[bot]
and
Smit Barmase
created
4239ab4
zed: Fix migration message sometimes showing up on other tabs (cherry-pick #29917) (#29989)
Click to expand commit body
Cherry-picked zed: Fix migration message sometimes showing up on other
tabs (#29917)
<img width="1178" alt="image"
src="https://github.com/user-attachments/assets/6b76fe7d-0621-4d61-936e-bfe4f72cc614"
/>
Release Notes:
- Fixed an issue where the keymap/settings migration message sometimes
showing up on tabs other than `settings.json` and `keymap.json`.
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
gcp-cherry-pick-bot[bot]
and
Smit Barmase
created
56c3fc6
Fix panic in update_selection_occurrence_highlights (cherry-pick #29979) (#29985)
Click to expand commit body
Cherry-picked Fix panic in update_selection_occurrence_highlights
(#29979)
Closes #ISSUE
Release Notes:
- Fixed a (rare) panic when highlighting text in the editor
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
4de9657
assistant_slash_commands: Be more precise in content type matching (#29124)
Click to expand commit body
While investigating https://github.com/zed-industries/zed/issues/28076,
I found out often times the content type header of a website comes with
more data, such as the `charset`. So instead of doing an equal
comparison, I changed to a `starts_with`.
You can see an example here:
```shell
$ curl -sS -D - https://github.com/zed-industries/zed/blob/main/Cargo.toml -o /dev/null | head -n 10
HTTP/2 200
date: Sun, 20 Apr 2025 10:19:52 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame,Accept-Encoding, Accept, X-Requested-With
etag: W/"92dabf048b34d04a1b1d94e29cae4aca"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
```
Release Notes:
- Improved Content Type matching of `/fetch` commands in Assistant
Co-authored-by: Peter Tripp <peter@zed.dev>
Eva Pace
and
Peter Tripp
created
ff44d0b
Restore original file content when rejecting an overwritten file (#29974)
Click to expand commit body
Release Notes:
- Fixed a bug that would cause rejecting a hunk from the agent to delete
the file if the agent had decided to rewrite that file from scratch.
Closes https://github.com/zed-industries/zed/issues/29821
Release Notes:
- Fixed an issue in the agent panel where OpenAI requests would fail if
the assistant begins its response with a tool call.
Cleaning up as I introduced a few regressions in this PR:
https://github.com/zed-industries/zed/pull/29866.
Release Notes:
- N/A
Danilo Leal
created
ebb04b0
Update `assistant` to `agent` in settings and keymaps (#29943)
Click to expand commit body
Closes #ISSUE
Release Notes:
- Agent Beta: Renamed the top-level `assistant` settings key to `agent`.
A migration for existing settings files is included.
- Agent Beta: Moved the `assistant::ToggleFocus`,
`assistant::ToggleModelSelector`, and `assistant::OpenRulesLibrary`
actions to the `agent` namespace. Existing keymaps that mention these
actions by their old names will continue to work.
---------
Co-authored-by: Max <max@zed.dev>
Cole Miller
and
Max
created
cd96a08
Honor the prompt field of inline assist action (#29960)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/29337
Release Notes:
- Fixed a bug where the `prompt` field was ignored on custom key
bindings for `InlineAssist`
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Max Brunsfeld
and
Michael Sloan
created
a47a8d8
Allow dragging files and tabs into the agent panel (#29959)
Click to expand commit body
Release Notes:
- Added the ability to drag files and tabs onto the new agent panel.
---------
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Max Brunsfeld
and
Michael Sloan
created
cc2d7b9
Fix profile menu hover flickering due to documentation asides (#29958)
This PR adds an upsell to try Zed Pro
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Nate Butler
and
Marshall Bowers
created
31419db
Allow the agent panel font size to be customized (#29954)
Click to expand commit body
You can set `agent_font_size` as a top-level settings key. You can also
use `zed::IncreaseBufferFontSize` and `zed::DecreaseBufferFontSize` and
`zed::ResetBufferFontSize` the agent panel is focused via the standard
bindings to adjust the agent font size. In the future, it might make
sense to rename these actions to be more general since "buffer" is now a
bit of a misnomer. 🍐'd with @mikayla-maki
Release Notes:
- N/A
---------
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Nathan Sobo
and
Mikayla Maki
created
51bfe9d
Use the same context store for all inline assists in a project (#29953)
Click to expand commit body
Release Notes:
- Made context attachments in inline assist prompts persist across
inline assist invocations.
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Max Brunsfeld
and
Michael Sloan
created
971fc5c
inline_completion_button: Show the initial usage data from the server (#29952)
Click to expand commit body
This PR updates the usage indicator for edit predictions to show the
initial usage data returned from the server.
Release Notes:
- N/A
Marshall Bowers
created
f9fa99e
Allow attaching text threads as context (#29947)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Max Brunsfeld
and
Michael Sloan
created
aae502e
Allow agent edits to be accepted/rejected before the end the turn (#29941)
WIP
- On macOS/Linux, run the command in bash instead of the user's shell
- Try to prevent the agent from running commands that expect interaction
Release Notes:
- Agent Beta: Switched to using `bash` (if available) instead of the
user's shell when calling the terminal tool.
- Agent Beta: Prevented the agent from hanging when trying to run
interactive commands.
---------
Co-authored-by: WeetHet <stas.ale66@gmail.com>
Cole Miller
and
WeetHet
created
108005f
context_store: Refactor state management (#29910)
Click to expand commit body
Because we instantiated `ContextServerManager` both in `agent` and
`assistant-context-editor`, and these two entities track the running MCP
servers separately, we were effectively running every MCP server twice.
This PR moves the `ContextServerManager` into the project crate (now
called `ContextServerStore`). The store can be accessed via a project
instance. This ensures that we only instantiate one `ContextServerStore`
per project.
Also, this PR adds a bunch of tests to ensure that the
`ContextServerStore` behaves correctly (Previously there were none).
Closes #28714
Closes #29530
Release Notes:
- N/A
Bennet Bo Fenner
created
71f7100
agent: Handle attempts to use hallucinated tools (#29946)
Click to expand commit body
This change:
1. Catches attempts to use missing tools. If this happens, we now send
Agent a message listing available tools, after which Agent can
gracefully recover. Prior behavior: thread would stop in a broken state.
Example of a hallucinated call and a message we send back:

2. Adds evals for hallucinated tool use and imagined edits
3. Adds ability to configure a profile name in evals.
Release Notes:
- N/A
To-dos:
- [x] Expose the command to defend against cases where that's just super
long
- [x] Tackle the vertical scroll conflict with panel scroll
- [x] Reduce default font-size
Release Notes:
- N/A
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Danilo Leal
,
Ben Brandt
,
Mikayla Maki
, and
Agus Zubiaga
created
The goal of this PR is to support tool calls using ollama. A lot of the
serialization work was done in
https://github.com/zed-industries/zed/pull/15803 however the abstraction
over language models always disables tools.
## Changelog:
- Use `serde_json::Value` inside `OllamaFunctionCall` just as it's used
in `OllamaFunctionCall`. This fixes deserialization of ollama tool
calls.
- Added deserialization tests using json from official ollama api docs.
- Fetch model capabilities during model enumeration from ollama provider
- Added `supports_tools` setting to manually configure if a model
supports tools
## TODO:
- [x] Fix tool call serialization/deserialization
- [x] Fetch model capabilities from ollama api
- [x] Add tests for parsing model capabilities
- [ ] Documentation for `supports_tools` field for ollama language model
config
- [ ] Convert between generic language model types
- [x] Pass tools to ollama
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
tidely
,
Antonio Scandurra
, and
Nathan Sobo
created
Completely subjective, but I just like it better.
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Nathan Sobo
,
Danilo Leal
, and
Danilo Leal
created
b577114
agent panel: Bring back search within text threads (#29934)
The tool has been deleted, but the description remained.
Release Notes:
- N/A
Richard Feldman
created
7249da1
Simplify setting font size for EditToolCard (#29925)
Click to expand commit body
Release Notes:
- N/A
Antonio Scandurra
created
3ffaf27
agent: Tweak MCP server configuration dialog (#29878)
Click to expand commit body
Tweaks the MCP configuration dialog a bit:
- Increase width of popover
- Disable soft
- Clear errors when hitting confirm
Release Notes:
- N/A
Bennet Bo Fenner
created
571db35
Show prompt usage in agent overflow menu (#29922)
Click to expand commit body
This PR adds prompt usage information, and easy access to managing your
account, to the agent overflow menu:

Currently this UI will only show after making a request. We'll work on
eagerly getting the usage info later.
Release Notes:
- Added current prompt usage information to the agent menu (`...`) for
Zed AI users
Nate Butler
created
395d4e9
Don't show deleted hunks when agent overwrites file (#29918)
Click to expand commit body
Release Notes:
- Improved display of diffs when the agent rewrites a file from scratch.
Antonio Scandurra
created
711a855
Get terminal tool working in evals (#29831)
Click to expand commit body
Bypass our terminal subsystem and just run a shell in a pty.
- [x] make sure we use the same working directory
- [x] strip control chars from the pty output (?)
- [x] tests
Release Notes:
- N/A
Cole Miller
created
298b30c
Stop generating in the Agent panel when the user edits a previous message (#29915)
Click to expand commit body
Otherwise the panel keeps scrolling as the new token comes in and it is
almost impossible to keep the scroll position in the right place.
Also, if the user is editing, it is likely that the current generated
tokens will need to be regenerated anyway, so we may as well stop the
current progress.
Release Notes:
- Agent Beta: Stop generating tokens if previous messages are edited.
Ben Brandt
created
124e420
copilot: Add support for tool_calls for gpt-4.1, gpt-4o, o4-mini (#29369)
Click to expand commit body
Github Copilot currently supports following models for agent mode with
tool calls. Currently we are only supporting anthropic models and not
openai and gemini. This PR add support for the openai models. I have
tested it and it works for all of them. For gemini models it seems there
is a issues from copilot side so not adding that in this PR as enabling
gemini model breaks it in the ask mode as well.
<img width="392" alt="image"
src="https://github.com/user-attachments/assets/fb7a4148-e48c-45c5-9ff9-c02f71217dfb"
/>
- [x] GPT-4.1
- [x] GPT-4.0
- [x] o4-mini
Release Notes:
- agent: Add tool calling support for gpt-4.1, gpt-4o, o4-mini when
using Copilot Chat as a provider
Signed-off-by: Umesh Yadav <umesh4257@gmail.com>
Umesh Yadav
created
2917845
Polish diff for the `edit_file` tool (#29911)
Click to expand commit body
I added some padding to the editor, and removed the border around each
hunk as it would overlap in weird ways with the card container.
## Before
<img width="1148" alt="image"
src="https://github.com/user-attachments/assets/2018feaa-c847-4609-bc82-522660714b9a"
/>
## After
One Light:
<img width="1148" alt="image"
src="https://github.com/user-attachments/assets/4da1a4b6-0af2-4479-afcc-02da50178fd6"
/>
One Dark:
<img width="1148" alt="image"
src="https://github.com/user-attachments/assets/0168631d-7b76-4582-8174-c6e9c1297dc8"
/>
Release Notes:
- Improved displaying of diffs when the agent edits files.
Antonio Scandurra
created
beecd17
Properly restore window position for SSH projects (cherry-pick #29904) (#29906)
Click to expand commit body
Cherry-picked Properly restore window position for SSH projects (#29904)
Release Notes:
- Fixed SSH projects not restoring their window position on reopen
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
gcp-cherry-pick-bot[bot]
and
Kirill Bulatov
created
8dc98c2
agent: Sort profiles based on relevance (#29893)
Click to expand commit body
Kinda feel like the way that makes the most sense to sort profiles in
the dropdown is by relevance/impact. "Write" is the default profile and
contains all built-in tools turned on by default, thus it should be the
first. "Ask" contains read-only tools, one step down from Write. And
"Manual" is totally empty, the least "powerful" profile, thus the last.
Release Notes:
- N/A
Danilo Leal
created
cdbd8c3
In the edit tool card, use the UI font size for the editor that we use to render the diff (#29882)
Click to expand commit body
I am currently setting the font size corrrectly by using a custom
EditorStyle and building an element. However I need to use the same
properties as a normal editor for everything but font size.
Release Notes:
- N/A