Commit graph

111 commits

Author SHA1 Message Date
Bennet Bo Fenner
9cbdc46d96
agent: Remove old edit file tool (#55612)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- agent: Improve reliability when LLM edits file
2026-05-04 09:54:39 +00:00
Lukas Wirth
c5a2807492
Remove smol as a dependency from a bunch of crates (#53603)
We aren't making use of it in these crates and it unblocks some
web-related work

Release Notes:

- N/A or Added/Fixed/Improved ...
2026-04-24 10:29:51 +00:00
Finn Evers
9b40411c6a
Fix bad GitHub merge queue merge (#54721)
No, sadly, the title is not a typo. See
https://www.githubstatus.com/incidents/zsg1lk7w13cf for the context.
I'll read with joy and popcorn through that root cause analysis.

It makes literally zero sense what happened here, but for some completly
bonkers reason GitHub completely messed up the merge queue with
https://github.com/zed-industries/zed/pull/54632.

I have no idea how it happened. It makes literally zero sense. A PR
going into the merge queue should have the same LoC when getting out of
it. GitHub obviously does not check this. GitHub causes extra work with
a feature that is supposed to save time.

Thanks, I guess.

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-04-23 23:47:30 +00:00
Danilo Leal
0ab64d6414
branch_picker: Add button to filter remote branches (#54632)
This PR brings back the button to filter remote branches when accessing
the title bar's branch picker with the mouse. It was unintentionally
removed when we introduced the new worktree picker.

Release Notes:

- N/A
2026-04-23 18:26:44 +00:00
Kirill Bulatov
5f68479937
Stop showing backtraces in default logging (#54660)
When using `.log_err()` or `.detach_and_log_err(cx)` or similar.

See also https://github.com/zed-industries/zed/pull/36404,
https://github.com/zed-industries/zed/pull/46383,
https://github.com/zed-industries/zed/pull/44896,
https://github.com/zed-industries/zed/pull/43917 and many more.

Before, a
62bd61a679/crates/languages/src/go.rs (L568)
line would show a backtrace even for `.context("no cached binary")?;`
case, same as many other usages around the code:

<img width="2032" height="1162" alt="before"
src="https://github.com/user-attachments/assets/ef2188b3-74c9-4c86-82b8-9fdaed3c26ae"
/>

After:

<img width="1896" height="157" alt="after"
src="https://github.com/user-attachments/assets/a1067d9f-61f4-4833-aeab-9f1042d2514a"
/>



To show a backtrace as before, use `log_err_with_backtrace`.

Release Notes:

- Improved Zed's log output on errors
2026-04-23 14:14:11 +00:00
Ben Brandt
58e2b7ecdd
acp: Use new Rust SDK (#52997)
Testing out Niko's new SDK design

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


Release Notes:

- N/A
2026-04-22 15:02:57 +00:00
Smit Barmase
51fc26da22
Fix agent default model not picking up after authentication resolve (#54397)
Regression in https://github.com/zed-industries/zed/pull/54125

Release Notes:

- agent: Fixed an issue where the default Zed model would not get
selected after sign-in completed

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-04-21 10:49:47 +00:00
Anders Jenbo
4a630f0725
Fix rules files not loading and config file rescan clearing tokens (#53659)
Fixes #52453
Fixes #53246

Both issues were introduced by #51208 ("Handle Linux FS Rescan Events"),
which added `PathEventKind::Rescan` handling.

## Rules files not loading (#52453)

`load_worktree_info_for_system_prompt` called `load_worktree_rules_file`
synchronously, which uses `entry_for_path()` on the current worktree
snapshot. If the background scanner hasn't finished its initial scan,
the entry doesn't exist yet and the lookup returns `None` — the code
concludes no rules file exists. This was always a latent race condition,
but became more visible after Rescan events were introduced, since they
can trigger additional `WorktreeUpdatedEntries` churn that interacts
with the refresh mechanism.

The fix awaits `scan_complete()` on local worktrees before performing
the rules file lookup, ensuring the full directory tree is indexed
first.

## Config file rescan clearing OAuth tokens (#53246)

The `Rescan` handlers in `watch_config_dir` used
`fs.load(file_path).await.unwrap_or_default()`, which turns any
file-read error into an empty string. This empty string flows to
consumers like `CopilotChat`, where `extract_oauth_token("")` returns
`None`, causing the OAuth token to be unconditionally overwritten with
`None` — triggering re-authentication.

The fix changes both Rescan handlers to skip files that fail to load
(using `if let Ok(contents) = ...`), matching the pattern already used
by the `Created`/`Changed` handler.

Release Notes:

- Fixed rules files (AGENTS.md, CLAUDE.md, .rules, etc.) sometimes not
being applied in agent threads.
- Fixed GitHub Copilot re-prompting for authentication after filesystem
rescan events.
2026-04-21 08:30:31 +00:00
Smit Barmase
68da244d37
agent: Respect favorite model settings and sync UI changes back to settings (#54318)
Closes #54313

**Before:**
- Favoriting a model only stored `provider`, `model`, and hardcoded
`enable_thinking` to `false`.
- Selecting a favorited model would not restore your preferred
`enable_thinking`, `effort`, or `speed` settings.

This means that if you'd like to use, say, GPT 5.4 your favorite model
on `xhigh` effort every single time, switching to it would set effort to
`medium` (the default for the model) instead.

**After:**
- Favoriting a model captures your current `enable_thinking`, `effort`,
and `speed` when it matches the currently-selected model. Otherwise, it
falls back to the model's own defaults, i.e. thinking-capable models are
no longer favorited with `enable_thinking` forced to `false`.
- Selecting a favorited model applies its stored thinking / effort /
speed.
- Toggling thinking, changing effort, or toggling fast mode on a
favorited model updates the favorite entry in settings (along with the
existing `default_model` setting), so the preference doesn't drift.

Release Notes:

- Agent favorite models now remember and restore per-model thinking,
effort level, and fast mode preferences.
2026-04-20 22:40:00 +05:30
Anthony Eid
e92a40a9d8
agent: Auto-select user model when there's no default (#54125)
Reimplements #36722 while fixing the race that required the revert in
#36932.

When no default model is configured, this picks an environment fallback
by authenticating all providers. It always prefers the Zed cloud
provider when it's authenticated, and waits for its models to load
before picking another provider as the fallback, so we don't flicker
from Zed models to Anthropic while sign-in is in flight.

The fallback is recomputed whenever provider state changes (via
`ProviderStateChanged`/`AddedProvider`/`RemovedProvider` events), so the
selection becomes correct as soon as cloud models arrive.

### What changed vs. the original PR

- `language_models::init` now owns `authenticate_all_providers`
(previously done in `LanguageModelPickerDelegate` and `agent`'s
`LanguageModels`).
- After all authentications settle, and on any subsequent provider state
change, `update_environment_fallback_model` recomputes the fallback.
- The fallback logic prefers Zed cloud: if the cloud provider is
authenticated, only use it (waiting for its models to load). Otherwise,
fall through to the first authenticated provider with a default or
recommended model.
- `LanguageModelRegistry::default_model()` falls back to
`environment_fallback_model` when no explicit default is set.
- Existing `Thread`s that are empty are updated to the new default when
`DefaultModelChanged` fires, so a blank thread started before sign-in
switches to Zed models once the user signs in.

Release Notes:

- agent: Automatically select a model when there's no selected model or configured default
2026-04-16 18:35:47 -04:00
Bennet Bo Fenner
ff108c89d7
acp: Fix close session not found error (#54009)
Follow up to #53999

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
2026-04-16 14:11:06 +02:00
Bennet Bo Fenner
dfe6b878bd
agent: Fix session not found error (#53999)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-04-15 18:15:37 +00:00
Mikayla Maki
2ea5644a81
Simplify draft threads (#53940)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-04-15 10:08:01 +00:00
Eric Holk
549db9fbb3
acp_thread: Make UserMessageId required in AgentConnection::prompt (#53850)
The `user_message_id` parameter on `AgentConnection::prompt` was
`Option<UserMessageId>`, but `NativeAgentConnection::prompt` immediately
called `.expect()` on it, crashing when the value was `None`.

Because the `expect` message said `UserMessageId` was required, this PR
makes the parameter not optional which makes the panic impossible.

This means we also need to unconditionally generate an ID in `send`,
where before we gated this on whether `truncate` returned `Some`.
Generating IDs unconditionally should be find, especially because the
prompt requires them.

Release Notes:

- N/A
2026-04-13 16:59:17 -07:00
Nathan Sobo
4a02367db2
Persist fast mode across new threads (#53356)
When toggling fast mode, the setting is now written to `settings.json`
under `agent.default_model.speed`, so new threads start with the same
speed. This follows the same pattern as `enable_thinking` and `effort`.

The `speed` field uses the existing `Speed` enum (`"fast"` /
`"standard"`) rather than a boolean, to leave room for future speed
tiers.

Example settings:
```json
{
  "agent": {
    "default_model": {
      "provider": "zed.dev",
      "model": "claude-sonnet-4",
      "speed": "fast"
    }
  }
}
```

cc @benbrandt

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-04-08 18:59:33 +00:00
Danilo Leal
73226701c0
agent_ui: Move fully complete plan to the thread view (#52462)
When a plan generate by the plan tool fully completes, there's no need
for that to be in the activity bar anymore. It's complete and in the
next turn, the agent may come up with another plan and the cycle
restarts. So, this PR moves a fully complete plan to the thread view, so
that it stays as part of a given turn:

<img width="600" height="1858" alt="image"
src="https://github.com/user-attachments/assets/43ad4eb0-49d0-488c-bbbf-ab7956c1dd5a"
/>

The way this PR does this is by adding a new entry to `AgentThreadEntry`
and snapshotting the completed plan so we can display it properly in the
thread.

Release Notes:

- N/A
2026-03-26 18:23:19 -03:00
Bennet Bo Fenner
9f58770392
agent: Add a regression test to ensure title updates do not loop (#52395)
## Context

Follow up to #52388 
## How to Review

<!-- Help reviewers focus their attention:
- For small PRs: note what to focus on (e.g., "error handling in
foo.rs")
- For large PRs (>400 LOC): provide a guided tour — numbered list of
files/commits to read in order. (The `large-pr` label is applied
automatically.)
     - See the review process guidelines for comment conventions -->

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-03-25 09:16:42 +00:00
Bennet Bo Fenner
b67c162ec4
agent: Fix issues when editing thread title (#52388)
## Context

Follow up to #52193

We changed this code in #52193, but moving the thread title read outside
of the spawn, causes a loop of title updated events

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-03-25 09:08:20 +01:00
Richard Feldman
2938ab95db
Fix close_session final save being a guaranteed no-op (#52030)
`close_session` removed the session from `self.sessions` before calling
`save_thread`, but `save_thread` immediately looks up the session in
`self.sessions` and returns early if it's not found. This meant the
explicit final save was always a no-op.

Additionally, when the local `session` variable was dropped at the end
of the closure, it cancelled any in-flight save from a prior observe
callback by dropping `session.pending_save`.

So on session close:
- The explicit final save was a guaranteed no-op
- Any in-flight save from an earlier observation was cancelled

**Fix:** Call `save_thread` while the session is still in the map, then
extract the `pending_save` task and return it so the caller can actually
await the save completing.

**Test:** Added `test_close_session_saves_thread` which sets a draft
prompt without a `run_until_parked()` before `close_session`, so the
only way the data gets persisted is if `close_session` itself performs
the save. Also strengthened the existing `test_save_load_thread`
similarly.

Closes AI-95

Release Notes:

- Fixed a bug where closing an agent thread could lose unsaved changes
(e.g. draft prompts) made in the same frame.
2026-03-23 11:48:00 -04:00
Ben Brandt
841ca10528
agent_ui: Don't reset provisional title if we already have one (#52193)
## Context

If you went back and edited the first message, we were resetting the
provisional title, even though the title had previously already been set
from a summarization pass.

In order to achieve this, we moved the default thread title logic up the
UI layer, and allowed AcpThreads to have an optional title.

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-03-23 12:27:12 +00:00
Ben Brandt
0f1e8a6e3d
agent: Fix summarization model being cleared by unrelated registry events (#52080)
## Context

We were seeing lots of pending title generation, which should only
happen if we don't have a summarization model.

`handle_models_updated_event` unconditionally overwrote the thread's
summarization model on every registry event, even with `None`. 

We should only setting if explicitly changed by the user or we haven't
set it yet, and only if we actually have one.

It is hard to reproduce this issue.. but I don't think this code was
right in the first place anyway.


## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-03-21 19:07:13 +01:00
Ben Brandt
b99200fbaf
agent: Add update_plan tool (#52048)
## Context

Adds a tool to utilize the UI we already expose to ACP agents. Behind a
feature flag for now.

## How to Review

Mostly a tool to hook up to all of the plan plumbing we already have in
acp thread.

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-03-20 23:03:32 +00:00
Eric Holk
f586129d2c
Terminal permissions: Per-command pipeline UI (#49547)
## Summary

Adds a new permission UI for terminal pipeline commands (e.g. `cargo
test | tail`) that lets users selectively always-allow individual
commands in the pipeline, rather than only offering a blanket
always-allow for the first command.

## Screenshot

<img width="464" height="293" alt="Screenshot 2026-03-18 at 3 27 48 PM"
src="https://github.com/user-attachments/assets/e027eeec-c2b3-4f73-a596-95f42a9adad2"
/>

Release notes:
- The terminal permissions UI now allows you to select individual
subcommands independently.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-03-20 18:55:49 +00:00
Ben Brandt
c932aa9f5b
agent: Fix project context on first thread (#51868)
We seemed to have a regression where the worktrees weren't showing up in
the system prompt on first load.

Release Notes:

- N/A
2026-03-18 23:43:44 +01:00
Ben Brandt
8a25373fb9
agent: Save threads before closing them (#51744)
Closes #46078

When we unloaded sessions, we weren't necesarily making sure we had
saved the current state. Now we save it whenever we remove it from the
session map.

Release Notes:

- Agent: Fix cases where thread state wasn't saved before closing the
thread.
2026-03-17 10:26:06 +00:00
Bennet Bo Fenner
015225196d
Store ACP thread metadata (#51657)
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: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-03-16 17:23:02 +01:00
Bennet Bo Fenner
eeb034c31c
agent: Fix race condition when loading threads (#51366)
This fixes a race condition that could occur when using the sidebar:
`Failed to launch: project state not found`

We were accessing/creating the project state before an await point,
meaning that we could remove the state if session/close was called in
the meantime.

- [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:38:54 +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
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
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
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
Mikayla Maki
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
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
Eric Holk
42ba961075
Persist unsent draft prompt across Zed restarts (#49541)
Store the user's unsent message editor text in DbThread so it survives
quitting and reloading Zed. The draft flows through Thread → AcpThread →
AcpThreadView on load, and back via a debounced observer on the message
editor for saves.

Currently works for native Zed agents only; external ACP agents will
pick this up once general ACP history persistence lands.

## Changes

- **`DbThread`** / **`Thread`**: New `draft_prompt: Option<String>`
field, included in `to_db()`/`from_db()`
- **`AcpThread`**: Bridge field with getter/setter, populated during
`register_session()`
- **`NativeAgent::save_thread()`**: Copies draft from `AcpThread` →
`Thread` before persisting
- **`AcpThreadView`**: Restores draft into `MessageEditor` on load;
syncs editor text → `AcpThread` via observer; debounced (500ms) Thread
notify triggers DB save

Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2026-03-03 00:57:15 +00:00
Ben Brandt
56ae09502a
agent: Use correct subagent thread entity to get the entries list (#50515)
Was grabbing off the Thread not the AcpThead 🤦

Release Notes:

- N/A
2026-03-02 18:27:32 +00:00
Bennet Bo Fenner
ef60143e7a
agent: Show full subagent output if no concurrent tool calls (#50478)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-03-02 13:21:26 +00:00
Bennet Bo Fenner
e80a456eb0
agent: Do not include thinking blocks in subagent output (#50473)
Release Notes:

- N/A

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-03-02 10:05:00 +00:00
Danilo Leal
1123140e40
agent_ui: Add round of improvements to subagent UI (#50357) 2026-02-27 20:35:59 -03:00
Mikayla Maki
f1c5ed324b
Add folder_paths for project grouping (#50249)
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-02-26 22:32:48 +00:00
Ben Brandt
da2bed1930
agent: Rename run_turn to send in subagent handle (#50242)
Align better with naming in thread. I grabbed the wrong function name :D

Release Notes:

- N/A
2026-02-26 20:43:34 +00:00
Ben Brandt
820774ac89
agent: Simplify subagent tool and handle (#50230)
Moves parent thread information into the environment, and also models it
as a turn on the handle rather than waiting for output.

Release Notes:

- N/A
2026-02-26 16:41:24 +00:00
Ben Brandt
8294fbb75b
agent: Subagent low context warnings (#49902)
Allow the parent agent to handle cases where the subagent is running on
of context window. Also communicates if it has completely out of
context.

Release Notes:

- N/A
2026-02-23 16:03:32 +00:00
Ben Brandt
304951a18f
agent: Remove timeout for subagent (#49898)
For the last few days, the model has never picked a good timeout value.
It seems they are better at choosing timeouts for bash commands but not
agents. Given there are some rate limits involved, I think it is hard to
estimate and we already have an upper bound of execution which is the
context window to keep it from going indefinitely.

Release Notes:

- N/A
2026-02-23 15:08:33 +00:00
Ben Brandt
9304e02b9a
agent: Allow the agent to reprompt an existing subagent (#49737)
Also fixes a regression I introduced that didn't cancel threads after
the timeout was hit

Release Notes:

- N/A
2026-02-20 18:34:38 +00:00
Ben Brandt
10a7987837
agent: Use default tool behavior for subagents (#49706)
Looking at this more, the map of tools is just for what is available and
all of the filtering happens at runtime. So we can just rely on the
current behavior for the list of tools (it was already a matching set)
and we can simplify all of the code paths again where we were adding
this filtered list.

Release Notes:

- N/A
2026-02-20 11:07:03 +00:00
Ben Brandt
85c23d0d0b
agent: Improve the subagent task structure (#49629)
Removes tool filtering since this was throwing off certain models, and
also allows for more generic task prompts that don't always require
summaries. Since the models usually provide a wrap-up message, we don't
have to wait for another turn.

This also sets us up to allow the agent to re-interact with an existing
subagent thread.

Release Notes:

- N/A

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-02-19 17:58:59 +00:00
Bennet Bo Fenner
6652c5f4b2
agent: Remove MAX_PARALLEL_SUBAGENTS (#49593)
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)

Requests will be rate-limited by our internal logic, but it will "just"
work.

Release Notes:

- N/A
2026-02-19 12:27:49 +00:00
Bennet Bo Fenner
27dffc12df
Fix cancellation issues with subagents (#49350)
This PR fixes issues with subagent cancellation, prior to this we would
still show a wait indicator for subagents that were cancelled from the
parent thread. We also removed the `stop_by_user` workaround, that code
path now uses `thread.cancel` directly

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: Ben Brandt <benjamin.j.brandt@gmail.com>
2026-02-18 18:33:11 +01:00
Ben Brandt
b4baea8f3b
acp: Enable history for external agents for all users (#49449)
Removes the feature flag around listing and loading existing sessions
for external agents.

Release Notes

- acp: Expose session history for all external agents that support it.

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-02-18 09:54:21 +00:00
Sathiyaraman M
6e33d838c9
copilot: Display cost multiplier for Github Copilot models (#44800)
### Description

Related Discussions: #44499, #35742, #31851

Display cost multiplier for GitHub Copilot models in the model selectors
(Both in Chat Panel and Inline Assistant)

<img width="436" height="800" alt="image"
src="https://github.com/user-attachments/assets/c9ebd8fa-4d55-4be8-b3e1-f46dbf1f0145"
/>


### Some technical notes

Although this PR's primary intent is to show the cost multiplier for
GitHub Copilot models alone, I have included some necessary plumbing to
allow specifying costs for other providers in future. I have introduced
an enum called `LanguageModelCostInfo` for showing cost in different
ways for different models. Now, this enum is used in `LanguageModel`
trait to get the cost info.

For now to begin with, in `LanguageModelCostInfo`, I have specified two
ways of pricing: Request-based (1 Agent request - GitHub Copilot uses
this) and Token-based (1M Input tokens / 1M Output tokens). I had
initially thought about adding a `Free` type, especially for Ollama but
didn't do it after realizing that Ollama has paid plans. Right now, only
the Request-based pricing is implemented and used for Copilot models.

Feel free to suggest changes on how to improve this design better.

Release Notes:

- Show cost multiplier for GitHub Copilot models

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-02-16 15:24:59 -03:00