Commit Graph
900 Commits
Author SHA1 Message Date
Mikayla Maki 5e60aa9872 Implement worktree interactions for the sidebar (#51421)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-03-12 15:34:09 -07:00
Bennet Bo FennerandDanilo Leal dd0e51ecb8 agent_ui: Disable pickers while thread is generating (#50519)
It does not make sense to enable them during the running turn and it can
lead to more confusing states if subagents are used.

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-03-12 19:24:38 -03:00
Danilo Leal 5586fbf288 agent_ui: Add UI refinements to the sidebar and archive view (#51419)
Adds a loading state to the archive view and a couple of other tiny UI
tweaks to the thread item and such.

Release Notes:

- N/A
2026-03-12 17:41:56 -03:00
Mikayla Maki 17adc40d61 Implement sidebar rendering of the configured worktrees (#51342)
Implements worktree support for the agent panel sidebar

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-03-12 17:53:38 +00:00
2ddb1e6c4d agent_ui: Add archive view to the sidebar (#51336)
This PR adds a button to the bottom of the sidebar that opens the
archive view, which at the moment, only shows the same, uncategorized
thread list available in the regular agent panel's history view.

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-12 14:05:30 -03:00
Danilo Leal 47cc0bac41 agent_ui: Add keybinding to cycle through new thread location options & settings (#51384)
This PR adds the ability to save in the settings whether new threads
should start in the current project or in a new Git worktree.
Additionally, it also adds a keybinding that allows cycling through the
menu options easily, with the ability to use cmd-click/enter to choose
which one is set as the default.

No release notes because this feature/settings depends on a feature flag
that isn't out yet.

Release Notes:

- N/A
2026-03-12 10:14:10 -03:00
Bennet Bo Fenner d28fc4e241 agent_ui: Register native agent when creating agent panel (#51379)
This ensures that in places like the inline assist we can just rely on
it being available.

Release Notes:

- N/A
2026-03-12 11:52:29 +00:00
Bennet Bo Fenner 3bcef8b1f2 agent_ui: Rename ExternalAgent to Agent (#51377)
Name is confusing, since the `NativeAgent` variant is not an external
agent

Release Notes:

- N/A
2026-03-12 11:38:35 +00:00
Cameron Mcloughlin 9e50ee040e agent: Thread switcher sticky workspace header (#51372) 2026-03-12 10:54:07 +00:00
Bennet Bo Fenner 5ebdbe2aac agent_ui: No global thread history (#51362)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-03-12 09:22:05 +00:00
Marshall Bowers becb24cd19 cloud_api_types: Add ZedBusiness variant to Plan (#51329)
This PR adds a `ZedBusiness` variant to the `Plan` enum.

Closes CLO-480.

Release Notes:

- N/A
2026-03-11 21:28:29 +00:00
Danilo Leal 3dff4c5787 agent_ui: Add timestamp to thread item in the sidebar (#51327)
Release Notes:

- N/A
2026-03-11 18:15:43 -03:00
Danilo Leal 9d2e2c859b agent_ui: Add more UI refinements to the sidebar (#51325)
Adjust the settings view and removes the new empty state from text
threads.

Release Notes:

- N/A
2026-03-11 17:34:03 -03:00
Danilo Leal 480e269097 agent_ui: Add UI refinements to the sidebar (#51307)
Release Notes:

- N/A
2026-03-11 14:21:28 -03:00
Bennet Bo Fenner dfc3a7c6e8 agent_ui: Move UI logic from ThreadHistory to separate component (#51301)
This is just a re-factor. We'll make use of this once we make thread
history non-global (storing one history per ACP connection).

Release Notes:

- N/A
2026-03-11 15:57:22 +00:00
Cameron Mcloughlin a8def21f53 agent: Add thread git stats to sidebar (#51287) 2026-03-11 14:52:57 +00:00
Bennet Bo Fenner 8d4913168c acp: Update to 0.10.2 (#51280)
Updates to `0.10.2`, most notable change is implementing
`session/close`.

Release Notes:

- N/A
2026-03-11 12:52:03 +00:00
Bennet Bo Fenner deccb78ff1 agent_ui: Fix thread summarization not working (#51259)
Release Notes:

- N/A
2026-03-11 08:49:04 +00:00
b5666319b4 Move threads sidebar into agent panel (#51241)
* [x] Put back persistence of sidebar open state
* [x] when agent panel is docked right, put sidebar on the right side
* [x] remove stale entries from `SidebarsByWindow`

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2026-03-10 23:45:55 -07:00
Danilo Leal b13a8e8fe1 agent_ui: Enable mentioning branch diff with main (#51235)
As a follow up to the possibility of sending the branch diff to an agent
review, this PR enables directly @-mentioning the content of your diff
with main to the agent. Here's a quick video of it:


https://github.com/user-attachments/assets/f27b7287-c9b9-4ccf-875e-4ac6ce4cd8ad

Release Notes:

- Agent: Enabled mentioning the branch diff with main.
2026-03-10 20:05:32 -03:00
Bennet Bo FennerandBen Brandt e4b3c0fa84 agent: Re-use ACP connections per project (#51209)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-03-10 17:32:51 +00:00
Bennet Bo Fenner f4b04af3dc agent: Allow NativeAgent to work with multiple projects (#51202)
This removes the assumption that one project <-> one native agent. The
native agent now maintains a project per session. We don't make use of
this right now, but it will come in handy once we start sharing ACP
connections globally.

Release Notes:

- N/A
2026-03-10 17:04:48 +01:00
Danilo Leal eae21de630 sidebar: Sort threads by created time (#51193)
Release Notes:

- N/A
2026-03-10 12:22:01 -03:00
Anthony Eid d18e4a75bc git: Add SSH support for removing and renaming git worktrees (#50759)
This should be the last step in implementing full git worktree support
in the `GitStore`. We still need to add UI for that allows a user to
rename a git worktree and, by extension git branches if we use the git
picker to do so.

Also, I added a helper function called `disallow_guest_request::<T>` to
the `Collab::rpc` that is used to specify a proto request isn't allowed
to be sent by a guest. This enabled me to add a regression test that
checks that a guest isn't allowed to delete a git worktree, without the
test hanging forever because it's waiting for the proto server to
respond.

Since SSH connections send the proto message directly from client to
remote host, this won't affect those requests.

Before you mark this PR as ready for review, make sure that you have:
- [x] Added solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- git: Add SSH support for removing git worktrees
2026-03-10 14:57:06 +00:00
f18567c1f0 git: Add the ability to resolve merge conflicts with the agent (#49807)
This PR adds a "Resolve with Agent" button in each merge conflict block,
as well as "Resolve Conflicts with Agents" button on a notification for
resolving conflicts across all the files that have any. When clicking on
either of these buttons, the agent panel opens up with a template prompt
auto-submitted. For the first case, the specific content of the merge
block is already attached as context for the agent to act quickly, given
it's a local and small context. For the second case (all conflicts
across the codebase), the prompt just indicates to the agent which files
have conflicts and then it's up for the agent to see them. This felt
like a simpler way to go as opposed to extracting the content for all
merge conflicts across all damaged files.

Here's how the UI looks like:

<img width="550" height="1964" alt="Screenshot 2026-02-21 at 11  04@2x"
src="https://github.com/user-attachments/assets/96815545-ba03-40e5-9cb0-db0ce9588915"
/>

---

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Git: Added the ability to quickly resolve merge conflicts with the
agent.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-10 11:19:26 -03:00
Om Chillure 01e8df43d2 agent_ui: Fix button to copy the command from terminal calls not appearing (#51191)
Fixes #51048

The "Copy Command" button uses `.visible_on_hover(group)` from GPUI to
only appear when the user hovers over its parent container. In
`render_collapsible_command` (used to render the code blocks for
terminal tool calls like "Run Command"), the parent `v_flex()` container
was missing the `.group()` assignment. This caused the copy button to
never become visible, which became apparent when an agent session was
restored from history.

This commit adds `.group(group.clone())` to the root `v_flex()`
container in `render_collapsible_command` to restore the hover
visibility for the "Copy Command" button.

Video :
[Screencast from 2026-03-10
18-06-57.webm](https://github.com/user-attachments/assets/ae931ac3-c7f1-4044-a3d8-a91a93d9c3bb)
[Screencast from 2026-03-10
18-06-01.webm](https://github.com/user-attachments/assets/5ddb8085-bafe-4e9a-bb02-74e3d860ae1a)

Release Notes:

- Agent: Fixed an issue where the "Copy Command" button would not appear
on hover for terminal tool calls.
2026-03-10 12:50:51 +00:00
Ben Brandt a5ba121909 agent_ui: Handle legacy agent enum variants during deserialization (#51125)
Add custom `Deserialize` implementations for `AgentType` and
`ExternalAgent` to map old built-in variant names to current custom
agent names, while still accepting current serialized formats.

Release Notes:

- N/A
2026-03-09 19:10:29 +01:00
Piotr Osiewicz 97421c670e Remove unreferenced dev dependencies (#51093)
This will help with test times (in some cases), as nextest cannot figure
out whether a given rdep is actually an alive edge of the build graph

Closes #ISSUE

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-03-09 13:22:12 +01:00
Danilo Leal 6b64b4c6c1 agent_ui: Add keybinding and action for worktree toggle (#51092)
This PR adds an action and keybinding to trigger the worktree dropdown
in the agent panel. This is still under a feature flag, so no release
notes yet.

Release Notes:

- N/A
2026-03-09 08:55:16 -03:00
DinoandAfonso 0a436bec17 git: Introduce restore and next action (#50324)
Add a `git::RestoreAndNext` action that restores the diff hunk at the
cursor and advances to the next hunk. In the git diff view, the default
restore keybinding (`cmd-alt-z` on macOS, `ctrl-k ctrl-r` on
Linux/Windows) is remapped to this action so users can quickly restore
hunks in sequence. Also refactor `go_to_hunk_before_or_after_position`
to accept a `wrap_around` parameter, eliminating duplicated
hunk-navigation logic in `do_stage_or_unstage_and_next` and
`restore_and_next`.

Release Notes:

- Added a `git: restore and next` action that restores the diff hunk at
  the cursor and moves to the next one. In the git diff view, the
  default restore keybinding (`cmd-alt-z` on macOS, `ctrl-k ctrl-r` on
  Linux/Windows) now triggers this action instead of `git: restore`.

---------

Co-authored-by: Afonso <4775087+afonsograca@users.noreply.github.com>
2026-03-09 10:50:43 +00:00
Danilo Leal 1dd80ac28f agent_ui: Add more refinements for v2 flag (#50968)
- Fixes message editor in empty state not consuming the whole height of
the panel
- Remove duped focused method in the `ListItem`
- Remove duped "new thread" buttons when group is empty
- Add some UI adjustments like removing labels and fading out truncated
items

Release Notes:

- N/A
2026-03-06 19:47:04 -03:00
NeelandTom Houlé dc0e41f834 Refresh LLM API token on organization change (#50931)
Emit client-side organization changed events through
`RefreshLlmTokenListener` so it produces the same `RefreshLlmTokenEvent`
used for server-pushed `UserUpdated` messages.

This keeps token refresh fan-out in one place.

Closes CLO-383.

Release Notes:

- N/A

---------

Co-authored-by: Tom Houlé <tom@tomhoule.com>
2026-03-06 19:15:21 +00:00
João Soares db6b47ab18 agent_ui: Fix agent panel focus stealing from modals (#50511)
Closes #49336

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI

checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

### Video:

https://drive.google.com/file/d/1qAwAoDr4wr8cs1dosvLocU-a4pngJZvr/view?usp=sharing

Release Notes:

- Fixed agent panel stealing keyboard focus from modals during workspace
restoration
2026-03-06 14:34:11 +00:00
Smit Barmase 84daec5d03 agent_ui: Add safeguards for deep link prompt injections (#50936)
- Show a warning asking users to review pre-filled prompts from external
links before sending.
- Strip control characters and bidi control characters from pre-filled
prompts.
- Collapse 3+ consecutive newlines in pre-filled prompts to prevent
newline padding attacks.
- API changes make it impossible to auto-submit pre-filled prompts from
external sources.

Release Notes:

- N/A
2026-03-06 19:45:03 +05:30
Ben Brandt 5db8d6d1bc agent: Only use AgentSessionInfo in history (#50933)
Previously we required AgentSessionInfo all over the place, which meant
there were lots of unnecessary fake ones created all over the place.

Made the methods and functions only take the data they need so we only
use these in history contexts now, as intended.

Release Notes:

- N/A
2026-03-06 13:13:23 +00:00
Danilo Leal 8a38d2d7b4 agent_ui: Adjust empty state for the panel for v2 (#50932)
Making the message editor take all the available space, and improving
the loading state for external agents a bit.

Release Notes:

- N/A
2026-03-06 10:04:39 -03:00
Danilo Leal 61e7032e54 agent_ui: Adjust panel toolbar design for v2 (#50927)
Adding some adjustments so the toolbar looks more like the designs we've
been working on. All that changes here are only valid for the v2 feature
flag. Haven't changed anything for today's production version.

Release Notes:

- N/A
2026-03-06 09:20:29 -03:00
Mikayla MakiandEric Holk 7040484057 Fix sidebar selections (#50900)
Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
2026-03-06 06:51:26 +00:00
Mikayla Maki a0ba509838 Fix provisional thread title (#50905)
Release Notes:

- N/A
2026-03-06 06:45:50 +00:00
Ben Brandt 90ae70874e agent: Gate agent registry refresh behind Disable AI setting (#50868)
Make sure we don't download this file if disable_ai is enabled

Release Notes:

- N/A
2026-03-05 21:13:24 +00:00
Ben Brandt 0d90751655 agent_ui: Always show smaller subagent preview (#50864)
Remove the conditional fullscreen path for subagent tool calls so
expanded content consistently renders as a capped preview with the
overlay and fixed height. Also add a pointer cursor to the maximize
control to clarify clickability.

Release Notes:

- N/A
2026-03-05 20:59:48 +00:00
Ben Brandt a8caf07684 agent_ui: Remove feature upsell banners from agent registry (#50862)
These aren't built in anymore!

Release Notes:

- N/A
2026-03-05 20:48:07 +00:00
Katie Geer f05d756913 agent: Add telemetry events for subagents (#50849)
Adds five telemetry events to track subagent lifecycle and user
interactions:

- **Subagent Started** — fires on creation or resumption, includes
parent session, subagent session, depth, and whether it was resumed
- **Subagent Completed** — fires when `SpawnAgentTool` finishes,
includes subagent session and status (completed/error)
- **Subagent Toggled** — fires when the user expands or collapses a
subagent card
- **Subagent Stopped** — fires when the user clicks Stop on a running
subagent
- **Subagent Maximized** — fires when the user clicks Maximize to
navigate into a subagent
 
Release Notes:
 - N/A
2026-03-05 12:46:53 -08:00
9afeb4e11d Implement new Multi Agent UI (#50534)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A

---------

Co-authored-by: Eric <eric@zed.dev>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: John Tur <john-tur@outlook.com>
2026-03-05 20:22:28 +00:00
Richard Feldman 1f918fb482 Remove agent git worktree feature flag (#50778)
Remove the separate `AgentGitWorktreesFeatureFlag` and replace all its
checks with the existing `AgentV2FeatureFlag`. The git worktree
functionality is now gated behind the same flag as agent v2.

Changes:
- Removed `AgentGitWorktreesFeatureFlag` from `feature_flags`
- Replaced all `has_flag::<AgentGitWorktreesFeatureFlag>()` checks with
`has_flag::<AgentV2FeatureFlag>()`
- Simplified toolbar condition that was redundantly checking both flags
- Updated tests accordingly

Closes AI-73

Release Notes:

- N/A
2026-03-05 15:04:56 -05:00
João Soares 94154aae6f picker: Prevent clicking non-selectable entries from confirming selection (#50705)
Closes #50627

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)


### Videos:
Before:

https://drive.google.com/file/d/1PahGhfx-wq9cyNqqMlctb9Np7M1Meo71/view?usp=sharing
After:

https://drive.google.com/file/d/135W6MQ9hKBurw5Z7YpHQQhoQwkh1NvUb/view?usp=sharing


Release Notes:

- Fixed clicking on non-selectable picker entries (e.g. section headers)
confirming the currently selected item.
2026-03-05 18:59:01 +00:00
Richard Feldman 33c78fad33 Use historical typewriter names for agent branch names (#50611)
Replace the auto-generated `agent-[hash]` branch naming scheme with
names based on historical typewriter models (e.g. `olivetti-a3f9b2c1`,
`selectric-7d2e4f01`).

A static list of 49 typewriter names is used as the pool. When selecting
a name, existing branch names are checked—each branch is split on its
last `-` to extract the typewriter prefix, and any taken prefixes are
excluded from the candidate set. A random name is then picked from the
remaining candidates and suffixed with an 8-character alphanumeric hash.

The name selection logic accepts injected RNG and a list of disallowed
names, making it straightforward to test deterministically with
`#[gpui::test]` and `StdRng`.

Closes AI-71

(No release notes because this is feature-flagged.)

Release Notes:

- N/A
2026-03-04 23:47:11 -05:00
Eric Holk 5418013a39 agent_ui: Add "Paste as Plain Text" to message editor context menu (#50625)
Add the existing `PasteRaw` action to the right-click context menu in
the message editor, making it more discoverable. Previously it was only
available via the keyboard shortcut (Cmd+Shift+V / Ctrl+Shift+V) or
the command palette.

Release Notes:

- Added "Paste as Plain Text" to the agent panel message editor
right-click menu
2026-03-04 15:50:48 -08:00
4668dbc83a agent: Allow for expanding the subagent thread when permissions are requested (#50684)
Previously, there was no way to view the full thread context

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: MrSubidubi <dev@bahn.sh>
2026-03-04 09:38:42 +00:00
Eric Holk 832782f6b3 Persist token count and scroll position across agent restarts (#50620)
Release Notes:

- Token counts and scroll position are restored when loading a previous
agent thread
2026-03-03 22:20:12 +00:00