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
This PR renames a number of constructs in the `agent` crate from the
"Assistant" terminology to "Agent".
Not comprehensive, but it's a start.
Release Notes:
- N/A
## Overview
This PR adds the minimap feature to the Zed editor, closely following
the [design from Visual Studio
Code](https://code.visualstudio.com/docs/getstarted/userinterface#_minimap).
When configured, a second instance of the editor will appear to the left
of the scrollbar. This instance is not interactive and it has a slimmed
down set of annotations, but it is otherwise just a zoomed-out version
of the main editor instance. A thumb shows the line boundaries of the
main viewport, as well as the progress through the document. Clicking on
a section of code in the minimap will jump the editor to that code.
Dragging the thumb will act like the scrollbar, moving sequentially
through the document.

## New settings
This adds a `minimap` section to the editor settings with the following
keys:
### `show`
When to show the minimap in the editor.
This setting can take three values:
1. Show the minimap if the editor's scrollbar is visible: `"auto"`
2. Always show the minimap: `"always"`
3. Never show the minimap: `"never"` (default)
### `thumb`
When to show the minimap thumb.
This setting can take two values:
1. Show the minimap thumb if the mouse is over the minimap: `"hover"`
2. Always show the minimap thumb: `"always"` (default)
### `width`
The width of the minimap in pixels.
Default: `100`
### `font_size`
The font size of the minimap in pixels.
Default: `2`
## Providing feedback
In order to keep the PR focused on development updates, please use the
discussion thread for feature suggestions and usability feedback: #26894
## Features left to add
- [x] fix scrolling performance
- [x] user settings for enable/disable, width, text size, etc.
- [x] show overview of visible lines in minimap
- [x] clicking on minimap should navigate to the corresponding section
of code
- ~[ ] more prominent highlighting in the minimap editor~
- ~[ ] override scrollbar auto setting to always when minimap is set to
always show~
Release Notes:
- Added minimap for high-level overview and quick navigation of editor
contents.
---------
Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Closes#30091
Follow-up to #29958
This PR fixes the profile menu flickering due to the documentation aside
after updating the agent dock position over the settings file.
The problem arose because the `documentation_side` could get out of sync
with the actual agent panel dock position. The `documentation_side` was
only updated whenever the user changed the agent panel position using
the UI, but not when updating the position in the settings file.
You can reproduce this easily by changing the `agent.dock` position to
the opposite site in your settings, which will make the profile menu
flicker again in some scenarios due to the de-sync.
This PR fixes this behavior by computing the position during render,
thus the actual set panel position and the documentation position can
never get out of sync
Release Notes:
- Fixed the agent profile menu flickering after updating the assistant
panel dock position in the settings.
Release Notes:
- Fixed a bug that would prevent the agent from working over SSH.
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Cole Miller <m@cole-miller.net>
This PR makes it so we send up an `x-zed-version` header with the
client's version when making a request to llm.zed.dev for edit
predictions and completions.
Release Notes:
- N/A
Release Notes:
- Fixed a bug that would cause the message composer in the agent panel
to not render when the context strip was empty.
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Right now `agent: open active thread as markdown` will always panic when
you try to use it over collab or when SSH remoting. This PR makes it log
an error instead (we should follow up by restoring full remote support).
Release Notes:
- Prevented `agent: open active thread as markdown` from panicking when
used in a non-local project.
Turns out `naive_local` doesn't actually offset a `DateTime<Utc>` to the
local timezone before creating a `NaiveDate`.
Release Notes:
- agent: Use correct timezone for thread history separators
This PR removes all of the feature flag checks related to the Agent.
Tried to do this in the least invasive way possible; we can follow up
with a full removal.
Release Notes:
- N/A
Adds a new `agent.model_parameters` setting that allows the user to
specify a custom temperature for a provider AND/OR model:
```json5
"model_parameters": [
// To set parameters for all requests to OpenAI models:
{
"provider": "openai",
"temperature": 0.5
},
// To set parameters for all requests in general:
{
"temperature": 0
},
// To set parameters for a specific provider and model:
{
"provider": "zed.dev",
"model": "claude-3-7-sonnet-latest",
"temperature": 1.0
}
],
```
Release Notes:
- agent: Allow customizing temperature by provider/model
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Supersedes: https://github.com/zed-industries/zed/pull/29936
Thanks for your contribution @imumesh18, but we had a slightly different
take on it :)
Release Notes:
- N/A
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
This PR makes it so we only show the trial upsell in the thread view.
Fixes https://github.com/zed-industries/zed/issues/30037.
Release Notes:
- Agent Beta: Changed the trial upsell to only be visible in the thread
view.
This PR makes it so we don't render the trial upsell when not using the
Zed provider.
Release Notes:
- Agent Beta: Changed Zed Pro trial upsell to only be displayed when
using a model through the Zed provider.
This PR makes it so we don't render the usage callouts when not using
the Zed provider.
Release Notes:
- Agent Beta: Changed usage callouts to only be displayed when using a
model through the Zed provider.