This PR makes the edit tool call codeblock cards expanded by default, to
be consistent with https://github.com/zed-industries/zed/pull/30806.
Also, I am removing the collapsing behavior of Markdown codeblocks where
we'd add a gradient while capping the container's height based on an
arbitrary number of lines. Figured if they're all now initially
expanded, we could simplify how the design/code operates here
altogether.
Open for feedback, as I can see an argument where the previous Markdown
codeblock design of "collapsed but not fully; it shows a preview" should
stay as it is useful.
Release Notes:
- N/A
This PR also moves the context strip to be at the top, so it matches the
main message editor, making the arrow-up keyboard interaction to focus
on it to work the same way.
Release Notes:
- agent: Made the previous message editing UX more consistent with the
main message editor.
1. The `edit_file` tool tended to use `create_or_overwrite` a bit too
often, leading to corruption of long files. This change replaces the
boolean flag with an `EditFileMode` enum, which helps Agent make a more
deliberate choice when overwriting files.
With this change, the pass rate of the new eval increased from 10% to
100%.
2. eval: Added ability to run eval on top of an existing thread. Threads
can now be loaded from JSON files in the `SerializedThread` format,
which makes it easy to use real threads as starting points for
tests/evals.
3. Don't try to restore tool cards when running in headless or eval mode
-- we don't have a window to properly do this.
Release Notes:
- N/A
This is very basic support for them. There are a number of other TODOs
before this is really a first-class supported feature, so not adding any
release notes for it; for now, this PR just makes it so that if
read_file tries to read a PNG (which has come up in practice), it at
least correctly sends it to Anthropic instead of messing up.
This also lays the groundwork for future PRs for more first-class
support for images in tool calls across more image file formats and LLM
providers.
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
The MCP server item in the settings view has an indicator that used to
only use colors to communicate the connection status. From an
accessibility standpoint, relying on just colors is never a good idea;
there should always be a supporting element that complements color for
communicating a certain thing. In this case, I added a tooltip, when you
hover over the indicator dot, that clearly words out the status.
Release Notes:
- agent: Improved clarity of MCP server connection status in the
Settings view.
Ref: https://github.com/zed-industries/zed/pull/29919
This PR improves how inline assistants are detected and focused based on
cursor position.
### Problem
The current implementation has inconsistent behavior:
- When selecting text within an inline assistant's range, the assistant
properly focuses
- When placing a cursor on a line containing an assistant (without
selection), a new assistant is created instead of focusing the existing
one
### Solution
Enhanced the assistant detection logic to:
- Check if the cursor is anywhere within the line range of an existing
assistant
- Maintain the same behavior for both cursor placement and text
selection
- Convert both cursor position and assistant ranges to points for better
line-based comparison
This creates a more intuitive editing experience when working with
inline assistants, reducing the creation of duplicate assistants when
the user intends to interact with existing ones.
https://github.com/user-attachments/assets/55eb80d1-76a7-4d42-aac4-2702e85f13c4
Release Notes:
- agent: Improved inline assistant behavior to focus existing assistants
when cursor is placed on their line, matching selection behavior
---------
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
This is my first time contributing, so happy to make changes as needed.
## Problem
I found the LLM Provider settings to be pretty difficult to scan as I
was looking to enter my API credentials for a provider. Because all of
the provider configuration is exposed by default, providers that come at
the end of the list are pushed fairly far down and require scrolling. As
this list increases the problem only get worse.
## Solution
This is strictly a UI change.
* I put each provider configuration in a Disclosure that is closed by
default. This made scanning for my provider easy, and exposing the
configuration takes a single click. No scrolling is required to see all
providers on my 956px high laptop screen.
* I also added the success checkmark to authenticated providers to make
it even easier to find them to update a key or sign out.
* The `Start New Thread` had a class applied that was overriding the
default hover behavior of other buttons, so I removed it.
## Before

## After

Release Notes:
- Improved Agent Panel settings view scannability by making each
provider block collapsible by default.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
The title of a (text) thread would get stuck in "Loading Summary..."
when the request to generate it failed. We now handle this case by
falling back to the default title, and letting the user manually edit
the title or retry generating it.
https://github.com/user-attachments/assets/898d26ad-d31f-4b62-9b05-519d923b1b22
Release Notes:
- agent: Handle thread title generation errors
---------
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Just a tiny patch to reduce allocations during context loading
Calling `.cloned()` on an iterator clones each element one by one, while
`into_iter().collect()` pre-allocates the resulting `Vec`
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/30411
Rendering as markdown gives us text selection and copying for free. In
the future, we may want to explore having these commands be actual
editors, allowing you to step in, change the command, and re-run it
right from there.
Release Notes:
- agent: Made the terminal command in the tool card selectable and
copyable.
Just noticed this got lost when main was merged in #29828.
Release Notes:
- agent: Fixed the rendering of added context when editing past messages
in a thread.
Closes https://github.com/zed-industries/zed/issues/30238
Release Notes:
- agent: Fixed layout shift happening in the toolbar (both in the
singleton and multibuffers) due to the "Generating" label that appeared
while the agent is still generating a response.
- Try to preserve previously selected item on update
- Do not clear list items while updating to avoid a frame with no items
rendered
Release Notes:
- agent: Preserve previously selected item in Thread History on update
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
This reverts commit 3615d6d96c.
Ultimately, we want to restore the ability to store a profile
per-thread, but for now reverting this fixes a fairly disruptive bug.
Release Notes:
- Fixed a bug causing the agent to use the wrong profile in some cases.
Reverts back to previous behavior where we update your settings so we
can load a new thread from your last configuration.
Release Notes:
- agent: Persist profile changes for new threads
This PR's main goal is to show the delete thread button when the list
item is either focused or hovered. In order to do that, we ended up
refactoring (i.e., merging) the `PastThread` and `PastContext` elements
into a single `HistoryElementEntry` that already matches to the entry
type (i.e., context or thread).
Release Notes:
- agent: Simplify the UI by showing the delete thread icon button only
on hover or focus.
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
This is similar to the `block_mouse_down` method added in #20649 (which
has a very similar motivation), but is more comprehensive in stopping
mouse events. Since I want to cherry-pick this to the releases, keeping
this change just to the agent panel. In a follow-up will replace
existing use of `block_mouse_down` to instead use this.
Release Notes:
- N/A
- Fix `ctrl-p` not working in the model selector
- Select first entry when opening the context picker
Release Notes:
- Fixed `menu::SelectPrevious` keybindings not working in the agent
panel's model selector.
Seems that `h_full` was causing it to use the height of the overall list
item for some reason.
Closes#30002
Release Notes:
- Agent Panel: Fixed text overlap for code blocks nested in lists in
agent response.
This allows us to debug the raw edits that were generated when people
report feedback, when running evals and when opening the thread as
Markdown.
Release Notes:
- Improved debug output for agent threads.
We were still using entry indexes to scroll, but the list now includes
the separators as items, so the indexes need to be translated
Release Notes:
- agent: Fix autoscrolling to history entry when navigating via keyboard
Fixes an issue introduced by #29959 which caused the message editor to
overflow from the agent panel bounds, making the bottom buttons
invisible when the editor was expanded (cmd+esc).
Fixing this required changing the base structure of the agent panel, but
things seem to work as expected:
https://github.com/user-attachments/assets/fc4c97fb-f7cb-4f54-a268-c30fbcb1649f
Release Notes:
- agent: Fix message editor's button positions when expanded
When deciding if a model supports tools or not, we weren't reading from
the configured model in a given thread.
This also stores the profile on the thread, which matches the behavior
of the Model and Max Mode, which we also already store per thread.
Hopefully this helps alleviate some confusion.
Release Notes:
- agent: Save profile selection per-Agent thread