Commit graph

679 commits

Author SHA1 Message Date
Danilo Leal
2ccca66dc1
agent_ui: Add support for editing queued messages (#47234)
This PR adds the ability to edit a queued message, which you can now do
by hitting `cmd-e` from the message editor, which will focus the first
queued message. To pull that off, I'm also making the queued messages
render as an editor, the same way we do with regular user messages. That
way, we ensure less layout shift when focusing in and out of the queued
message for editing and gain the ability to render context
buttons/creases the same way we do in the main message editor.


https://github.com/user-attachments/assets/fb68fd48-c0cd-491f-a7d9-5065a9151b0b

Note that in the video, I show the state in which you're still editing
in the moment in which the queued message would be sent. If that
happens, your queued message won't be sent even if you unfocus the
queued message editor. In this case, you need to explicitly hit "Send
Now".

Release Notes:

- Agent: Added the ability to edit queued messages.
2026-01-20 17:26:30 -03:00
Ben Brandt
8870bd94f6
acp: Allow installing ACP agents from the registry (#47218)
This is still behind a feature flag as the registry is still WIP, but
allows downloading binary agents from the registry on github.

Release Notes:

- N/A
2026-01-20 14:06:21 +00:00
Mikhail Pertsev
d71fe4cc7f
agent_ui: Add @diagnostics mention to the thread (#42270)
Closes #31351

# Diagnostics Mention in New Threads

## Overview

Adds the `@diagnostics` mention to the new Agent Panel threads so users
can inject current LSP diagnostics (errors by default) without switching
to a text thread. The diagnostics mention is fully integrated into ACP
mention parsing, the context picker, and the message-editor pipeline so
it round-trips cleanly and shows up in the standard `@` menu.

## Context

- **Request:** bring `/diagnostics` parity to the “New Thread” assistant
experience.
- **Scope:** diagnostics only; `/terminal` mention would be implemented
in a separate PR.
- **Docs:** updated Agent Panel docs + changelog.

## Implementation Details

1. **Mention plumbing**
- Added `MentionUri::Diagnostics` to `acp_thread`, including parsing
(`zed:///agent/diagnostics?include_warnings=true`) and icon/name
metadata.
- Tests ensure diagnostics links round-trip via Markdown mention
serialization.

2. **Context picker / completion**
- New `ContextPickerMode::Diagnostics` exposes an `@diagnostics` entry
in the mention menu.
- Completions turn `@diagnostics` into a fully fledged mention, reusing
the existing confirmation pipeline.

3. **Message editor + thread serialization**
- Resolving the mention calls the existing diagnostics collector from
`assistant_slash_commands`, embedding the tool output inline with other
context blocks (`<diagnostics>…</diagnostics>`).
- Thread-link handling ignores diagnostics backlinks so clicking them
doesn’t try to reopen nonexistent resources.
   

# How it looks
<img width="800" height="480" alt="image"
src="https://cf5gpe8lxo.ufs.sh/f/EmJ5Xl877qJO1mzC9Zrn8AmJZHeShC4RoUwvTMlF2tfPzj06"
/>

Release Notes:

- Allow mentioning diagnostics in the agent panel via `@diagnostics`

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2026-01-20 13:19:24 +00:00
Mason Palmer
c1da016013
agent: Patch image format bug (#45978)
Closes #44694

Release Notes:

- Fixed images being converted to png but retaining old format

## Before:
<img width="574" height="327" alt="Screenshot 2026-01-02 at 5 34 24 PM"
src="https://github.com/user-attachments/assets/92331939-cebc-4f53-99fc-10d5181cf87e"
/>

## After:
<img width="638" height="489" alt="Screenshot 2026-01-02 at 5 34 36 PM"
src="https://github.com/user-attachments/assets/47c05906-fa56-4a53-abd4-790c42230772"
/>

---------

Co-authored-by: versecafe <147033096+versecafe@users.noreply.github.com>
Co-authored-by: MrSubidubi <finn@zed.dev>
2026-01-19 21:13:14 +00:00
Danilo Leal
adc15943fe
agent_ui: Don't fold terminal tool command lines into a disclosure (#47148)
Follow up to https://github.com/zed-industries/zed/pull/40570.

This PR removes the UI treatment where we collapse a terminal command
into a disclosure component if it spans more than three lines. I
initially thought having this fancy treatment in the UI would make it
sleeker but it actually feels like a counter-productive move to
arbitrarily hide command lines; they're arguably always important to see
in full, even when they're super long. I'm happy to get some feedback
here, but I think for now, I'd feel better if users could see them all
without having to manually expand/collapse them.

Release Notes:

- N/A
2026-01-19 12:08:17 -03:00
Ben Brandt
36873662cf
agent: Make sure ACP still gets classic tool permission UI (#47142)
This makes sure all of the new granular permission logic and ui only
applies to the zed agent and doesn't affect the UI of external agents.

Release Notes:

- N/A
2026-01-19 14:47:04 +01:00
Ben Brandt
43d5326075
acp: Support loading a session for external agents (#46992)
Release Notes:

- N/A
2026-01-16 16:05:43 +00:00
Ben Brandt
59707157af
agent: Move thread loading to the AgentConnection (#46985)
Preps for external agents being able to load a thread

Release Notes:

- N/A
2026-01-16 14:52:00 +01:00
Mikayla Maki
f1a8b05391
agent: End turn at message boundary when queue has pending messages (#46980)
This feature cost $12

Release Notes:

- Changed the behavior of queued messages to gracefully wait for the
current activity to complete.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 02:17:08 -08:00
Danilo Leal
267cf56943
agent_ui: Fix preview for images and creases in queue entries (#46964)
This PR fixes the fact that we weren't showing any @-mentions (files,
images, etc.) in the queue preview.

Release Notes:

- Agent: FIxed a bug with the message queue in the agent panel where
@-mentions weren't being displayed in the message preview within the
queue entries list.
2026-01-15 23:14:47 -03:00
Danilo Leal
d183902dc7
agent_ui: Make it easier to interrupt with message in queue (#46954)
Follow up to https://github.com/zed-industries/zed/pull/46797

When you send a message, as per the PR linked above, Zed will now queue
it by default. But if you want to fast-track it/interrupt the agent
immediately, effectively sending the first message in the queue, you can
just hit enter again and it will get sent right away.


https://github.com/user-attachments/assets/5e6230f6-c56e-4496-9bcb-8d6ffb9e19cb

Release Notes:

- Agent: Made it easier to interrupt the agent while having messages in
the queue.
2026-01-15 20:07:16 -03:00
Danilo Leal
70b0a95a22
agent_ui: Fix review buttons getting cut-off (#46948)
Closes https://github.com/zed-industries/zed/issues/46922

Release Notes:

- N/A
2026-01-15 18:39:59 -03:00
Marshall Bowers
a92df1eee4
Remove Burn Mode code (#46950)
This PR removes the code for Burn Mode, as we won't need it anymore
after the 17th.

Closes CLO-79.

Release Notes:

- N/A
2026-01-15 21:28:33 +00:00
Ben Kunkle
a2728e39a8
Split settings content into its own crate (#46845)
Closes #ISSUE

Moves the settings content definitions into their own crate, so that
they are compiled+cached separately from settings, primarily to avoid
recompiles due to changes in gpui. In that vain many gpui types such as
font weight/features, and `SharedString` were replaced in the content
crate, either with `*Content` types for font/modifier things, or
`String`/`Arc<str>` for `SharedString`. To make the conversions easy a
new trait method in the settings crate named `IntoGpui::into_gpui`
allows for `into()` like conversions to the gpui types in
`from_settings` impls.

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2026-01-15 18:10:21 +00:00
Marshall Bowers
6fcc5e9461
Remove legacy billing code (#46927)
This PR removes the code for the legacy plans.

No more users will be on this plan as of January 17th, so it's fine to
land these changes now (as they won't be released until the 21st).

Closes CLO-76.

Release Notes:

- N/A
2026-01-15 13:06:45 -05:00
Carl Jackson
1ded60a660
Implement Vim's tag stack (#46002)
Happy New Years! This PR is a second take at
https://github.com/zed-industries/zed/pull/38127 (cc @ConradIrwin)

This PR is significantly less complicated than the last attempt: while
we still keep our data on the `NavigationHistory` object, we no longer
tightly integrate it with the existing back/forward "browser history."
Instead, we keep our own stack of `(origin, target)` pairs (in a struct
to make it easy to extend with e.g., tag names in the future).

The PR is split into two separable commits. Most of the implementation
is in the second commit, which:
- Defines the stack data structure
- Implements `pane::GoToOlderTag` and `pane::GoToNewerTag` in terms of
the stack
- Hooks into `navigate_to_hover_links` to push tag stack entries

This last bit is the most fiddly. The core challenge is that we need to
keep track of the `origin` location and calculate the `target` location
across three codepaths that might involve creating a new editor and/or
splitting the pane. One thing in particular I found difficult was that
an editor's `nav_history` (an `ItemNavHistory`) seems to be populated
asynchronously. Instead of relying on it, I decided in this code to make
my own `ItemNavHistory`. I briefly tried to refactor the code in
question, but it seemed like it would significantly increase the scope
of the change.

I prefer this all-in-one tracking centered around
`navigate_to_hover_links ` to the `start/finish` approach taken in
b69a2ea200
because I find it easier to convince myself that the right data is being
populated at the right times. Of course, let me know if you think
there's a better solution.

Closes #14206

Release Notes:
- ??? I don't know what to write here! Suggestions welcome
2026-01-15 17:48:15 +00:00
Lukas Wirth
3d0222a5af
remote: Support opening builtin host files in remote workspaces on wsl (#46910)
Release Notes:

- Opening bundled files, keymap, and local release notes now opens in
remote windows instead of opening a new local zed window
- Opening the settings files, keymap files, task files, debug files and
logs will now open within wsl windows instead of opening a new local zed
window
2026-01-15 15:21:57 +00:00
Danilo Leal
39569ef27b
agent_ui: Improve icon for discarding interrupted edit (#46903)
Just swapping it from the `Trash` icon for the `Undo` one given it's
clearer.

Release Notes:

- N/A
2026-01-15 13:43:36 +00:00
Danilo Leal
78d98773d6
agent_ui: Clean UI code a bit for the tool permission controls (#46902)
Just some housekeeping here, no changes in functionality and UI.

Release Notes:

- N/A
2026-01-15 10:34:44 -03:00
Mikayla Maki
9c5fc6ecbd
Split token display for OpenAI (#46829)
This feature cost $15.

Up -> Tokens we're sending to the model
Down -> Tokens we've received from the model.

<img width="377" height="69" alt="Screenshot 2026-01-14 at 12 31 01 PM"
src="https://github.com/user-attachments/assets/fc15824f-de5d-466b-8cc1-329f3c1940bb"
/>



Release Notes:

- Changed the display of tokens for OpenAI models to reflect the
input/output limits.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 14:29:56 -08:00
Danilo Leal
b5b13d1f4d
agent_ui: Refine the subagent UI design (#46838)
This PR refines the design for the subagent card UI. Here's a quick
preview:

<img width="500" height="544" alt="Screenshot 2026-01-14 at 6  43@2x"
src="https://github.com/user-attachments/assets/a293b9ec-37cd-4098-b8ea-b321a239dea3"
/>

Release Notes:

- N/A
2026-01-14 22:01:36 +00:00
John Tur
cd41a21ca7
Allow running MCP servers on the remote server when using remote development (#46756)
Closes https://github.com/zed-industries/zed/issues/34402

Release Notes:

- MCP servers can now be run on the remote server when using remote
development. This can be enabled by setting the `"remote": true`
property in the settings entry for the MCP server.

---------

Co-authored-by: localcc <kate@zed.dev>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2026-01-14 14:41:22 -05:00
Richard Feldman
4791e1ddc4
Granular Tool Permission Buttons (#46284)
Adds buttons for confirming (and optionally persisting) granular
permissions on tool calls:

<img width="688" height="302" alt="Screenshot 2026-01-14 at 1 58 40 PM"
src="https://github.com/user-attachments/assets/3228cc39-efd5-4a73-989f-ddb28969847f"
/>
<img width="690" height="282" alt="Screenshot 2026-01-14 at 1 58 31 PM"
src="https://github.com/user-attachments/assets/8367a888-5728-4877-a502-1ff20ac929ec"
/>

## Features

### Tool Permission Settings
- **Per-tool rules** in `agent.tool_permissions.tools.<tool_name>`:
  - `default_mode`: `"allow"`, `"deny"`, or `"confirm"` (default)
  - `always_allow`: Array of regex patterns to auto-approve
  - `always_deny`: Array of regex patterns to block
  - `always_confirm`: Array of regex patterns requiring confirmation
- **Supported tools**: `terminal`, `edit_file`, `delete_path`,
`move_path`, `create_directory`, `save_file`, `copy_path`, `fetch`,
`web_search`
- **MCP tool support**: Third-party tools from context servers with
`mcp:<server>:<tool>` naming

### Smart Permission Buttons
When a tool requires confirmation, the dialog shows contextual buttons:
- **"Always allow \`<tool>\`"** - Sets `default_mode = "allow"` for the
tool
- **"Always allow \`<pattern>\`"** - Adds a pattern to `always_allow`:
  - Terminal: Command name (e.g., `cargo`, `npm`, `git`)
  - File tools: Parent directory path
  - URL tools: Domain name
- **"Allow"** / **"Deny"** - One-time decision

### Pattern Extraction
Automatically extracts meaningful patterns from tool inputs:
- Terminal commands → `^cargo\s`, `^npm\s`, etc.
- File paths → `^/Users/alice/project/src/`
- URLs → `^https?://github\.com`

### Invalid Pattern Handling
- Malformed regex patterns are detected at settings load time
- Tools with invalid patterns show an error and block execution
- Clear error messages identify which pattern failed

## Changes

### New Files
- `crates/agent/src/tool_permissions.rs` - Permission evaluation logic
- `crates/agent/src/pattern_extraction.rs` - Pattern extraction
functions

### Modified Files
- `crates/agent_settings/src/agent_settings.rs` - `ToolPermissions`,
`ToolRules` structs
- `crates/settings/src/settings_content/agent.rs` - Settings schema and
serialization
- `crates/settings/src/settings_file.rs` - Helper methods for modifying
settings
- `crates/agent/src/thread.rs` - `authorize_with_context()`,
`authorize_third_party_tool()` methods
- `crates/agent/src/tools/*.rs` - Updated all granular tools to use
permission system
- `crates/agent/src/tools/context_server_registry.rs` - MCP tool
authorization
- `crates/agent_ui/src/acp/thread_view.rs` - Permission button UI,
removed Keep/Reject buttons

## Example Configuration

```json
{
  "agent": {
    "tool_permissions": {
      "tools": {
        "terminal": {
          "default_mode": "confirm",
          "always_allow": ["^cargo\\s", "^npm\\s", "^git\\s"],
          "always_deny": ["^rm\\s+-rf", "^sudo\\s"]
        },
        "edit_file": {
          "default_mode": "allow",
          "always_deny": ["^\\.env", "^/etc/"]
        },
        "mcp:filesystem:write_file": {
          "default_mode": "confirm"
        }
      }
    }
  }
}
```

Release Notes:

- You can now set per-tool permissions when confirming/denying tool use

---------

Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Michael Benfield <mbenfield@zed.dev>
2026-01-14 19:39:04 +00:00
Richard Feldman
581e559002
Render subagents in thread (#46188)
## Summary

This PR adds the UI for displaying subagent tool calls:

### Thread view changes
- Add `expanded_subagents` state HashMap for tracking expanded cards  
- Implement `render_subagent_tool_call()` for collapsed card with label
and chevron
- Add subagent detection via `is_subagent()` and `tool_name` field
- Handle `SubagentThread` content type in tool call rendering
- Add expand/collapse toggle button for subagent cards
- Style collapsed cards similar to terminal tool calls
- Support inline image rendering in content blocks

### Agent panel changes
- Add `open_external_thread_with_server()` for testing with stubbed
servers

### Test support
- Add `acp_thread/test-support` feature to agent_ui
- Add base64 dev dependency for image tests

Release Notes:

- N/A

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-01-14 13:49:51 -05:00
Richard Feldman
415f384ff3
Diff review comments: store locally and batch submit to agent (#46669)
Doesn't support editing or deleting comments yet, but inputs work:

<img width="797" height="881" alt="Screenshot 2026-01-14 at 11 51 36 AM"
src="https://github.com/user-attachments/assets/746e085b-a919-475a-b804-ee0377e40a0b"
/>


<img width="698" height="178" alt="Screenshot 2026-01-14 at 11 47 51 AM"
src="https://github.com/user-attachments/assets/3edac0e8-62e5-4af5-a324-df2bd293f3ca"
/>

<img width="695" height="695" alt="Screenshot 2026-01-14 at 11 47 58 AM"
src="https://github.com/user-attachments/assets/64795ffd-62b4-48ea-a46c-7724221095d7"
/>


### Features implemented:
- **Local comment storage**: Comments are stored per-hunk in the Editor,
with chronological ordering
- **Expandable comments section**: Shows "N Comments" header that can
expand/collapse
- **Inline editing**: Click edit to transform a comment row into an
editable text field with confirm/cancel buttons
- **Delete functionality**: Remove individual comments
- **Send Review to Agent**: Toolbar button with badge showing comment
count, batch-submits all comments across all files/hunks to the Agent
panel
- **User avatars**: Shows the current user's avatar (from their Zed
account) next to comments, falls back to Person icon when not logged in
- **Visual tests**: Added tests for one comment, multiple comments
expanded, and comments collapsed

Note that this is behind a feature flag, so no release notes yet.

Release Notes:

- N/A

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: David Baldwin <baldwindavid@gmail.com>
2026-01-14 17:43:38 +00:00
Serhii Melnychuk
0350e0ca87
agent_ui: Add right-click menu item for copying a given agent response's content (#46529)
Release Notes:

- Agent: Added a menu item in the agent panel right-click menu for
copying a given agent's response.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-01-14 17:16:46 +00:00
Miguel Cárdenas
8150d59b27
agent: Fix terminal command truncation in confirmation dialogs (#40570)
Closes #40322

When users run multi-line terminal commands, the confirmation dialog was
only showing the first line with '- N more lines' truncated. This meant
dangerous commands like 'rm -rf' or 'sudo' operations could be hidden
from view, creating a security risk.

Now terminal commands always display in full, with scroll support for
very long commands (20+ lines) to keep the confirmation buttons visible.

Other tools continue using truncation for better UI efficiency since
they don't pose the same security concerns.

Release Notes:

- Agent: Fixed terminal command truncation in the agent panel to better
expose long commands (e.g., potentially dangerous multi-line commands
are now fully visible before execution)

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-01-14 13:40:12 -03:00
Danilo Leal
9621fac835
agent_ui: Queue prompts by default when sending them while generating (#46797)
This PR makes queueing a prompt the default behavior when sending a new
one while there's an on-going generation. You can still send a prompt
that will immediately interrupt the agent with the `cmd-shift-enter`
keybinding, though, which preserves the current behavior.

The main motivation for this change is to make the queueing not only
more discoverable, but more useful as well, as we're parting from the
assumption that most of the time, what you want is to queue it as
opposed to interrupting it (even though it's still possible to do either
through the keybinding I mentioned above or simply by stopping the
generation and sending a new one).

Here's a quick video:


https://github.com/user-attachments/assets/37f92433-70ef-459f-98ff-41ed80e3e43f

In the video, I show sending one prompt and then sending two others that
fall straight into the queue. Then, in the middle of the generation of
my first prompt, I use the `cmd-shift-enter` keybinding to send a prompt
immediately, interrupting the agent, effectively being sent in front of
the queue.

Release Notes:

- Agent: Made queueing prompts the default behavior when sending them
while there's an on-going generation.
2026-01-14 13:12:46 -03:00
Ben Brandt
cd12d45e4a
agent: Initial support for ACP session listing (#46796)
Feature flagged for now as we test this out with actual agents to see if
we need to provide any more feedback to the RFD before committing to the
current setup.

Release Notes:

- N/A
2026-01-14 14:41:31 +01:00
Ben Brandt
db2f2ad45a
agent: One Thread History (#46785)
This makes sure that all of the work we do for caching/refreshing
session history is reused everywhere we need to access the list.

Very important for external agents so we aren't rerequesting history on
every search or recent list update. Puts the reloading of history in one
place

Release Notes:

- N/A
2026-01-14 10:57:43 +00:00
Danilo Leal
1d366b39c1
agent_ui: Improve UX for discarding partial edits (#46752) 2026-01-14 07:42:24 -03:00
Conrad Irwin
4aa3cd07c3
Revert "Revert scheduler update (#46659)" (#46671)
Reland the new scheduler

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-14 07:19:13 +00:00
Michael Benfield
fd829cd2d0
agent_ui: Discard button for interrupted changes (#46735)
Release Notes:

- N/A
2026-01-13 13:41:09 -08:00
Lukas Wirth
1b416c71d6
agent_ui: Make rust-analyzer paths work with symbol completions (#46739)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-13 20:32:13 +00:00
Michael Benfield
2a83c6907c
agent_ui: No agent diff view with Agent V2 (#46710)
Release Notes:

- N/A
2026-01-13 09:42:38 -08:00
Danilo Leal
70da176353
agent_ui: Make stopping a running terminal cancel thread generation (#46663)
This makes stopping a terminal tool call in the agent panel also cancel
the thread generation:


https://github.com/user-attachments/assets/702ba078-53a8-4816-80f3-b6215e764365

Release Notes:

- Agent: Made the act of stopping a terminal tool call in the agent
panel also cancel the thread generation.
2026-01-13 11:43:45 +00:00
Michael Benfield
d35fee1cd1
agent_ui: Remove Keep/Reject only with feature flag (#46656)
Release Notes:

- N/A
2026-01-12 20:39:51 -08:00
Conrad Irwin
8b4ab260e6
Revert scheduler update (#46659)
Reverts the new scheduler; it's destroyed our CI

Release Notes:

- N/A
2026-01-12 16:46:15 -07:00
Ben Brandt
291611e3db
agent: Move thread history access behind AgentConnection trait (#46631)
This should move almost all access of the threadstore behind the trait,
which unlocks external agents supplying the list

Release Notes:

- N/A

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-12 21:42:12 +00:00
Richard Feldman
756637fef5
Subagents PR 2: Thread spawning + execution (#46187)
This PR implements the behind-the-scenes subagent execution logic:

### Core subagent execution
- Add `Thread::new_subagent()` constructor for creating subagent threads
- Implement `SubagentTool::run()` to spawn and manage subagent lifecycle
- Add `SubagentContext` for parent-child thread relationship
- Implement `submit_user_message()`, `interrupt_for_summary()`,
`request_final_summary()`
- Add timeout support and context-low detection (25% threshold)
- Propagate cancellation from parent to child threads

### Thread management
- Add `MAX_SUBAGENT_DEPTH` (4) and `MAX_PARALLEL_SUBAGENTS` (8) limits
- Add `register/unregister_running_subagent()` for tracking
- Add `restrict_tools()` for allowed_tools filtering
- Add `is_subagent()`, `depth()`, `is_turn_complete()` accessors

### Thread changes
- Add `ToolCallContent::SubagentThread` variant
- Add `ToolCallUpdateSubagentThread` for UI updates
- Add `tool_name` field for subagent detection
- Add `is_subagent()` method on `ToolCall`
- Add image support in `ContentBlock`

Release Notes:

- N/A

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-01-12 18:07:41 +00:00
Michael Benfield
c9e6238163
agent_ui: Remove Keep/Reject buttons (#46456)
Release Notes:

- N/A
2026-01-12 09:09:24 -08:00
Nathan Sobo
73d935330e
Integrate scheduler crate into GPUI (#44810)
## Motivation

This PR unifies the async execution infrastructure between GPUI and
other components that depend on the `scheduler` crate (such as our cloud
codebase). By having a scheduler that lives independently of GPUI, we
can enable deterministic testing across the entire stack - testing GPUI
applications alongside cloud services with a single, unified scheduler.

## Summary

This PR completes the integration of the `scheduler` crate into GPUI,
unifying async execution and enabling deterministic testing of GPUI
combined with other components that depend on the scheduler crate.

## Key Changes

### Scheduler Integration (Phases 1-5, previously completed)
- `TestDispatcher` now delegates to `TestScheduler` for timing, clock,
RNG, and task scheduling
- `PlatformScheduler` implements the `Scheduler` trait for production
use
- GPUI executors wrap scheduler executors, selecting `TestScheduler` or
`PlatformScheduler` based on environment
- Unified blocking logic via `Scheduler::block()`

### Dead Code Cleanup
- Deleted orphaned `crates/gpui/src/platform/platform_scheduler.rs`
(older incompatible version)

## Intentional Removals

### `spawn_labeled` and `deprioritize` removed
The `TaskLabel` system (`spawn_labeled`, `deprioritize`) was removed
during this integration. It was only used in a few places for test
ordering control.

cc @maxbrunsfeld @as-cii - The new priority-weighted scheduling in
`TestScheduler` provides similar functionality through
`Priority::High/Medium/Low`. If `deprioritize` is important for specific
test scenarios, we could add it back to the scheduler crate. Let me know
if this is blocking anything.

### `start_waiting` / `finish_waiting` debug methods removed
Replaced by `TracingWaker` in `TestScheduler` - run tests with
`PENDING_TRACES=1` to see backtraces of pending futures when parking is
forbidden.

### Realtime Priority removed
The realtime priority feature was unused in the codebase. I'd prefer to
reintroduce it when we have an actual use case, as the implementation
(bounded channel with capacity 1) could potentially block the main
thread. Having a real use case will help us validate the design.

## Testing
- All GPUI tests pass
- All scheduler tests pass
- Clippy clean

## Architecture

```
┌─────────────────────────────────────────────────────────────┐
│                          GPUI                                │
│  ┌──────────────────────┐    ┌────────────────────────────┐ │
│  │ gpui::Background-    │    │ gpui::ForegroundExecutor   │ │
│  │ Executor             │    │  - wraps scheduler::       │ │
│  │  - scheduler: Arc<   │    │    ForegroundExecutor      │ │
│  │    dyn Scheduler>    │    └────────────┬───────────────┘ │
│  └──────────┬───────────┘                 │                  │
│             │                             │                  │
│             └──────────┬──────────────────┘                  │
│                        ▼                                     │
│            ┌───────────────────────┐                         │
│            │  Arc<dyn Scheduler>   │                         │
│            └───────────┬───────────┘                         │
│         ┌──────────────┴──────────────┐                      │
│         ▼                             ▼                      │
│  ┌──────────────────┐      ┌────────────────────┐           │
│  │ PlatformScheduler│      │   TestScheduler    │           │
│  │   (production)   │      │ (deterministic)    │           │
│  └──────────────────┘      └────────────────────┘           │
└─────────────────────────────────────────────────────────────┘
```

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Yara <git@yara.blue>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-10 15:41:49 +01:00
Ben Brandt
dffed22f45
acp: Add keybindings for session config option categories (#46484)
Adds the normal mode/model keybindings for the first config option of a
given category

Release Notes:

- N/A
2026-01-09 23:04:31 +00:00
Ben Brandt
a94157714a
agent: Split up Agent and Text Thread History (#46457)
Scopes the history to the individual panes and paves the way for history
per external agent.

Release Notes:

- N/A
2026-01-09 17:13:00 +00:00
Danilo Leal
7142e6a781
agent_ui: Add per-file and total number of lines added and removed (#46454)
This PR adds the total and per-file number of lines added and removed
per thread, using the same logic to compute these as in the commit view.
Here's how they show up in the UI:

<img width="500" height="514" alt="Screenshot 2026-01-09 at 11  27@2x"
src="https://github.com/user-attachments/assets/e3a4a14f-a4ee-4e95-a77b-86d14914e9d6"
/>

Release Notes:

- Agent: Added the total and per-file number of lines added and removed
in a thread.
2026-01-09 11:45:53 -03:00
Richard Feldman
b4d69db524
Allow Escape to interrupt agent thread from conversation focus (#46410)
When focus is on the conversation part of the agent panel (not the
message editor), pressing Escape now interrupts the running thread.
Previously, Escape only worked when the message editor had focus.

Release Notes:

- Pressing Esc when the agent panel is focused now interrupts the
running thread even if the text input box is not specifically focused.
2026-01-08 22:39:06 -05:00
Mikayla Maki
06bd9005ab
agent: Add turn statistics to agent panel (#46390)
I really enjoyed this feature in Claude Code. Helps me get a sense of
how effortful something is.

Release Notes:

- Added a "show_turn_stats" setting, default to false, that shows the
timer and the number of tokens down.
2026-01-09 00:33:38 +00:00
Richard Feldman
7a0b19b6b5
Add granular tool permissions settings (#46112)
Adds granular per-tool permission settings for the Zed agent with
regex-based rules.

Release Notes:

- N/A

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-01-08 14:32:18 -08:00
Danilo Leal
fdd2dd5748
agent: Fix profiles tooltip border (#46396)
One _character_ change to fix the dividing border in the agent panel's
profile tooltip. 😬

Release Notes:

- N/A
2026-01-08 21:19:40 +00:00
Michael Benfield
1239ac53f8
Inline assistant tools: no more feature flag (#46107)
Release Notes:

- The inline assistant now has the ability to display messages and will
be less likely to insert non-code text.
2026-01-08 06:24:40 -08:00