6865d80
Trust settings sync as a collab project client (#46700)
Click to expand commit body
Collab projects are considered trusted and remote clients use the
editor-related settings only. A better fix would be sync "not trusted"
indicator with the project host, and disallow clients' iteraction with
that indicator.
Release Notes:
- Fixed collab settings sync causing "not trusted" pop ups for client
Kirill Bulatov
created
0ecefe0
editor: Fix crash when pasting after copy and trim in visual line mode (#46640)
Click to expand commit body
When using the `editor::actions::CopyAndTrim` action with a multi-line
selection in vim's Visual Line mode, pasting would crash Zed.
The bug occurred because trimming splits a selection into per-line
ranges, creating multiple `editor::ClipboardSelection` entries. However,
when `is_entire_line` was true (Visual Line mode), no newline separators
were added between these entries in the clipboard text. The paste code
then assumed separators existed and read past the end of the text.
The fix ensures newline separators are always added between trimmed line
ranges, regardless of whether the original selection was in line mode.
Closes #46616
Release Notes:
- Fixed a crash when pasting after using `editor: copy and trim` in
vim's Visual Line mode
Dino
created
70da176
agent_ui: Make stopping a running terminal cancel thread generation (#46663)
Click to expand commit body
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.
Danilo Leal
created
6b1eb25
Fix a missing newline in the zeta prompt (#46677)
Click to expand commit body
Release Notes:
- N/A
Max Brunsfeld
created
d76258d
terminal_view: Fix terminal opening in / when no project is open (#46582)
Click to expand commit body
Closes #46574
The `default_working_directory()` function in
`crates/terminal_view/src/terminal_view.rs:1585` returned `None` when no
project directory was available. The code comment (now removed)
incorrectly claimed "None implies `~` on whichever machine we end up
on". However, when `None` is passed to `alacritty_terminal`, it uses the
process CWD, not the home directory. On macOS when Zed is launched from
a .`app` bundle, the CWD is `/`.
Added a fallback at the end of` default_working_directory()` that
explicitly returns the home directory when no project directory is
found: `directory.or_else(dirs::home_dir)`
This ensures:
1. `CurrentProjectDirectory` with no project open β home directory
2. `FirstProjectDirectory `with no project open β home directory
3. `AlwaysHome `β home directory (explicitly, not relying on shell
behavior)
4. Always `{ directory }` with invalid directory β home directory
Release Notes:
- Fixed terminal opening in `/` instead of home directory when no
project is open.
Max Malkin
created
271bcf6
Fix `Failed to load environment variables` error message after self-update on Linux (#46367)
Click to expand commit body
Closes #46365
The behavior I'm trying to handle here is documented in
https://man7.org/linux/man-pages/man5/proc_pid_exe.5.html.
[@merlinz01
](https://github.com/zed-industries/zed/issues/46365#issuecomment-3723996684)
points to some other alternatives but they don't seem necessary or
justified here.
# Testing
I've manually replaced the binary of a process running this build, to
simulate an update, and then opened a new tree and I don't see the error
message.
I don't know if there's a reasonable way to unit-test this? Let me know.
It seems like it would require using something like rusty-fork to spawn
a specific binary for the test, which I don't think I see already in the
Zed tree and perhaps it would be overkill to add just for this?
Release Notes:
- Fixed "Failed to load environment variables" after applying an update
Martin Pool
created
d35fee1
agent_ui: Remove Keep/Reject only with feature flag (#46656)
I like to be able to see what's happening with rust builds so I can kill
rust analyzer, see the output, etc.
Closes #ISSUE
Release Notes:
- N/A
Conrad Irwin
created
0244851
Avoid expensive re-computation of sticky header lines (#46653)
Click to expand commit body
Fixes a performance regression introduced in
https://github.com/zed-industries/zed/pull/45377
Release Notes:
- Fixed a performance regression that caused lag in large documents
Max Brunsfeld
created
1c1ab65
ollama: Save API URL and key upon confirmation (#46665)
Click to expand commit body
Closes #46626
Release Notes:
- Improved the settings configuration page for Ollama to store the
current URL value if changed when clicking on "Connect"
Finn Evers
created
90ec588
ep: Use FIM-like prompt for zeta2 (#46657)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Agus Zubiaga
and
Max Brunsfeld
created
8ab49c3
editor: Fix regression with folds and relative counting (#46658)
Click to expand commit body
Closes #46516
Release Notes:
- Fixed a regression with relative line numbering that would occur with
folds present (preview only)
Reverts the new scheduler; it's destroyed our CI
Release Notes:
- N/A
Conrad Irwin
created
6d3ea10
git: Annotate more functions and blocks with tracing spans (#46642)
Click to expand commit body
Release Notes:
- N/A
Jakub Konka
created
291611e
agent: Move thread history access behind AgentConnection trait (#46631)
Click to expand commit body
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>
Only the scheduler crate uses this currently, so we can remove this from
the long list of GPUI dependencies.
Release Notes:
- N/A
Finn Evers
created
1148773
project_symbols: Display line numbers in symbol picker (#46507)
Click to expand commit body
Some language servers return local symbols in `workspace/symbol`
responses, and languages like Julia can have multiple overloads for the
same generic function name. In these cases, symbols may appear identical
in the symbol picker, making it hard to distinguish between them. Adding
line numbers helps users identify the correct symbol.
In the future, we may also want to consider using `containerName` from
the LSP response for additional context.
> Before
<img width="671" height="573" alt="Screenshot 2026-01-10 at 19 21 08"
src="https://github.com/user-attachments/assets/838c3eb7-0e1d-46ba-9076-286e971afc2c"
/>
> After
<img width="671" height="573" alt="Screenshot 2026-01-10 at 19 43 19"
src="https://github.com/user-attachments/assets/31979d79-0169-4202-afc2-24fc7492dd47"
/>
Closes #ISSUE
Release Notes:
- Added line numbers to the project symbols picker to help distinguish
between symbols with the same name
---------
Co-authored-by: Matt Miller <mattrx@gmail.com>
Shuhei Kadowaki
and
Matt Miller
created
3b67868
Add diff review button in git diff views (#46326)
Click to expand commit body
Adds a very simple diff review button behind a feature flag, which
appears in the gutter of people who have the flag (currently just me;
it's not even enabled for staff, since it doesn't do anything yet).
Mostly this PR just adds the feature flag, the button, and tests.
Release Notes:
- N/A
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>
Richard Feldman
and
Amp
created
816e5f5
Fix panic when using RealtimeAudio priority (#46635)
Click to expand commit body
The scheduler integration (#44810) removed the special handling for
realtime audio tasks that spawn them on a dedicated thread. This caused
a panic in the Mac dispatcher when RealtimeAudio priority was passed to
the regular dispatch path.
This restores the original behavior: RealtimeAudio tasks are spawned on
a dedicated thread via dispatcher.spawn_realtime(), using a bounded
channel to send runnables to it.
Release Notes:
- N/A
Antonio Scandurra
created
7853589
ep: Use non-chat completions for /predict/raw (#46633)
Add permission checking to the remaining 7 tools that require granular
permissions:
- `edit_file`: Checks path against permission rules
- `delete_path`: Checks path against permission rules
- `move_path`: Checks both source and destination paths
- `create_directory`: Checks path against permission rules
- `save_file`: Checks all paths, denies if any are blocked
- `fetch`: Checks URL against permission rules
- `web_search`: Checks query against permission rules
Each tool follows the pattern established in PR #46155 (terminal tool):
- `Allow` = proceed without prompting
- `Deny` = return error immediately
- `Confirm` = prompt user for confirmation
The deny > confirm > allow precedence is enforced by the
`decide_permission_from_settings()` function.
Release Notes:
- N/A
---------
Co-authored-by: Amp <amp@ampcode.com>
Richard Feldman
and
Amp
created
8a1cf4d
Add structured outline for Markdown (#45643)
Click to expand commit body
Just make outline of markdown to be structured:
<img width="282" height="144" alt="image"
src="https://github.com/user-attachments/assets/6c7e5d5f-ae09-47a9-965a-6f9f9b731ce6"
/>
Release Notes:
- Added structured outline for Markdown.
- Also fixed the breadcrumb display in Issue
[#45663](https://github.com/zed-industries/zed/issues/45663).
Yuantian Ding
created
b9de700
git_ui: Unify branch, worktree, and stash pickers in one (#46621)
Click to expand commit body
This PR creates a unified picker for all the Git-related pickers:
branch, worktree and stash. The main motivation for this is to bring
awareness and ease of access for the worktree and stash pickers that
were previously (and arguably) hidden amidst the sea of commands in the
command palette. As worktrees in particular become more relevant for
AI-related flows, having an easier way to reach for its picker will be
beneficial.
Note that the actions/commands remain the same; you can still look for
`git: worktree` or `git: view stash`. The difference is that these
actions will take you to the unified picker with the correct
corresponding active view.
https://github.com/user-attachments/assets/99d1cd6f-a19d-47d3-9bca-d7257e7ed5b8
Release Notes:
- Git: Unify the branch, worktree, and stash pickers into one, making it
easier to find and access them from one another.
Danilo Leal
created
bf3cab6
Fix worktree trust not applied on window reuse (#46623)
Click to expand commit body
New workspace/window creates a different `WeakEntity<WorktreeStore>` for
the same path, which was not considered before.
Closes https://github.com/zed-industries/zed/issues/46318
Release Notes:
- Fixed worktree trust not applied in window reuse
Kirill Bulatov
created
cbb6e2f
ep: Fix applying patch to text without a trailing newline (#46471)
Click to expand commit body
Release Notes:
- N/A
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Oleksiy Syvokon
and
Agus Zubiaga
created
37b0560
gpui(windows): Force a paint message when running out foreground budget (#46609)
Click to expand commit body
Release Notes:
- Fixed zed no longer rendering on windows in a timely manner if it gets
overloaded with foreground work
Co-authored-by: John Tur <john-tur@outlook.com>
Lukas Wirth
and
John Tur
created
0eeb743
copilot: Fix double lease panic when signing out (#46619)
Click to expand commit body
Extracted out of #46618 as I wanna fast-track it to Preview.
Release Notes:
- Fixed a crash that occured when signing out of Copilot.
Piotr Osiewicz
created
2f093d2
Delete accidentally committed scheduler plan (#46601)
Click to expand commit body
Release Notes:
- N/A
Antonio Scandurra
created
38fc4ea
Properly notify all language server worktree trust listeners (#46613)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/46590
https://github.com/user-attachments/assets/8464a3b6-9258-4d15-9168-56178bf46437
`use smol::channel::{Receiver, Sender};` do not propagate the value
change to all receivers, hence only one language server received the
"worktree trusted" message.
The fix uses `watch` kind of channels instead, and cleans up its state
more eager to rely on the sender drop as another form of notification.
Release Notes:
- Fixed groups of language servers not starting after worktree trust
approval
Kirill Bulatov
created
5ddfcf0
editor: Remove unnecessary cloning of selections (#46598)
Click to expand commit body
Stumbled across this upon a PR review - `unfold_ranges` takes a slice of
Ranges and already clones the ranges itself, so we do not need to clone
the selections prior to passing these.
Release Notes:
- N/A
Finn Evers
created
819d2f7
project_symbols: Support rust-analyzer path symbol search (#46511)
Click to expand commit body
cc https://github.com/rust-lang/rust-analyzer/pull/21415
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Lukas Wirth
created
a75d3fc
Always show worktree trust, even if other title bar items are hidden with settings (#46606)
Click to expand commit body
Closes https://github.com/zed-industries/zed/discussions/46595
Release Notes:
- Fixed "show project items" keeping worktree trust title bar element
hidden
Kirill Bulatov
created
ad1251b
First-contribution autolabeler: work around a bug (#46603)
Click to expand commit body
The job was skipping first-time contributors because GitHub was
returning None as their association.
Release Notes:
- N/A
Lena
created
5c7abad
terminal: Fix IME position when cursor is hidden (#46592)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/45553
## Summary
When using applications that hide the terminal cursor (e.g., via ANSI
escape sequence `\e[?25l`), the IME candidate window appeared at the
bottom-left of the screen, and the composition text was not displayed at
all. This affects tools like Claude Code that hide the cursor during
operation.
The root cause was that cursor position calculation was skipped when the
cursor shape was `Hidden`. This fix separates cursor visibility from IME
position calculation by always computing cursor bounds for IME
positioning.
## Movies
### Zed 0.218.6
https://github.com/user-attachments/assets/a66d569a-178d-4bca-a577-fcc65e9fd2c4
### With this fix
https://github.com/user-attachments/assets/456323d1-6c18-45ea-88e8-fb5375c00f98
Release Notes:
- Fixed IME candidate window and composition text position in terminal
when cursor is hidden
`grid_view` takes an iterator of `IndexedCell`s, so we don't have to
collect this into a vec prior to passing this.
Release Notes:
- N/A
Finn Evers
created
578911d
terminal: Avoid overlapping IME marked text with terminal content (#46227)
Click to expand commit body
Closes #33157
|Before|After|
|--|--|
|<img width="922" height="158" alt="CleanShot 2026-01-07 at 12 18 21@2x"
src="https://github.com/user-attachments/assets/2ba6020f-5159-4ed8-aa2e-374ea3ea4cf5"
/>|<img width="908" height="200" alt="CleanShot 2026-01-07 at 12 19
02@2x"
src="https://github.com/user-attachments/assets/ec946c4e-3220-4944-b34a-1d8d5dcc7ae2"
/>|
Many other terminals seem to do it this way as well.
|Ghostty|Windows Terminal| Visual Studio Code|
|--|--|--|
|<img width="930" height="186" alt="CleanShot 2026-01-07 at 12 23 30@2x"
src="https://github.com/user-attachments/assets/837189aa-2f4c-4a48-b060-f3576b8777e0"
/>|<img width="1414" height="128" alt="c89e03d2d92869d5ec1b8a05ade84df0"
src="https://github.com/user-attachments/assets/8b6d69fb-b34d-4ccd-8a3a-9332487cd427"
/>|<img width="978" height="180" alt="CleanShot 2026-01-07 at 12 27
01@2x"
src="https://github.com/user-attachments/assets/dbc0acc7-3c16-499f-ac32-35e3c0cd0d97"
/>|
Release Notes:
- Fixed UI overlap between IME marked text and terminal content.
Release Notes:
- N/A
TL;DR: There was a closed issue 7 hours ago that changed ashpd version,
it needed another bump.
A dependency of gpui called ashpd has a fix in v0.12.1, GPUI has the
0.12 version. After forking zed and patching the gpui source to be mine
with 0.12.1 it was able to use GPUI as a dependency and compile the
project. The error I was getting and the recomendation to do this PR can
be seen in this [closed issue from
ashpd](https://github.com/bilelmoussaoui/ashpd/issues/325).
After changing the dependecy I hit cargo check:
```bash
Finished `dev` profile [unoptimized + debuginfo] target(s) in 4m 24s
```
And cargo run:
```bash
Compiling zed v0.220.0 (/home/user/git/xaviduds/zed/crates/zed)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 9m 44s
Running `target/debug/zed`
```
Zed compiled and opened:
<img width="1920" height="1042" alt="image"
src="https://github.com/user-attachments/assets/8bc524d1-bc4a-43f8-9da4-b02faecca30c"
/>
Eduardo de Melo Xavier
created
a87fed2
Skip worktree trust checks on Zed invisible worktrees (#46563)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/46256
Release Notes:
- Fixed worktree trust pop-up appearing on a keymap editor invication
Release Notes:
- N/A
Description:
E.g. Instead of saying:
2026-01-07T09:08:42-06:00 ERROR [crates/snippet_provider/src/lib.rs:46]
failed to parse snippet
Caused by:
expected an integer
Now the logs give more valuable information like:
2026-01-07T10:47:39-06:00 ERROR [crates/snippet_provider/src/lib.rs:48]
invalid snippet in /Users/oscarvarto/Library/Application
Support/Zed/extensions/installed/django-snippets/./snippets/python.json
(re_path)
Oscar Vargas Torres
created
5ba6258
licenses: Verify validity of the symlink files (#46444)
e0b8969
editor: Fix DeleteToPreviousSubwordStart and DeleteToNextSubwordEnd interaction with newlines (#46235)
Click to expand commit body
Closes #40110
Changes:
- `DeleteToPreviousSubwordStart` now deletes `\n` separately from
preceding subwords and whitespace.
- `DeleteToNextSubwordEnd` now deletes `\n` and any following whitespace
separately from subsequent subwords.
- Added an `ignore_newlines` flag to both actions to optionally retain
the old behavior.
These modifications align the subword commands with their word
counterparts and with other popular editors like VSCode and Sublime.
Related to: https://github.com/zed-industries/zed/pull/16848
Release Notes:
- Improved `DeleteToPreviousSubwordStart` and `DeleteToNextSubwordEnd`
interactions around newlines. You can opt-in into the previous behavior
by adding `{"ignore_newlines": true}` to either action's binds in your
keymap.
---
This is my first contribution to Zed! If anything should be done
differently, please let me know. Happy to learn :)
Ruben Fricke
created
43c252c
Fix `gpui` Linux build failure due to ashpd/zbus incompatibility (#46543)
Click to expand commit body
`ashpd` 0.11 is incompatible with recent zbus/zvariant releases, causing
a compilation error in Linux. Bumping to 0.12 fixes it.
See: https://github.com/bilelmoussaoui/ashpd/issues/323
To reproduce:
```toml
[package]
name = "test-gpui"
version = "0.1.0"
edition = "2021"
[dependencies]
gpui = { git = "https://github.com/zed-industries/zed" }
```
```bash
...
Compiling ashpd v0.11.0
error[E0277]: the trait bound `AppID: Basic` is not satisfied
--> /home/neulus/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.11.0/src/documents/mod.rs:391:16
|
391 | self.0.call("Info", &(doc_id.into())).await
| ^^^^ unsatisfied trait bound
|
help: the trait `Basic` is not implemented for `AppID`
--> /home/neulus/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.11.0/src/app_id.rs:10:1
|
10 | pub struct AppID(String);
| ^^^^^^^^^^^^^^^^
= help: the following other types implement trait `Basic`:
&B
BusName<'_>
ErrorName<'_>
InterfaceName<'_>
MemberName<'_>
NonZero<i16>
NonZero<i32>
NonZero<i64>
and 35 others
= note: required for `HashMap<AppID, Vec<Permission>>` to implement `zbus::zvariant::Type`
= note: 1 redundant requirement hidden
= note: required for `(file_path::FilePath, HashMap<AppID, Vec<Permission>>)` to implement `zbus::zvariant::Type`
note: required by a bound in `proxy::Proxy::<'a>::call`
--> /home/neulus/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.11.0/src/proxy.rs:172:40
|
166 | pub(crate) async fn call<R>(
| ---- required by a bound in this associated function
...
172 | R: for<'de> Deserialize<'de> + Type,
| ^^^^ required by this bound in `Proxy::<'a>::call`
error[E0277]: the trait bound `DocumentID: Basic` is not satisfied
--> /home/neulus/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.11.0/src/documents/mod.rs:500:16
|
500 | self.0.call_versioned("GetHostPaths", &(doc_ids,), 5).await
| ^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `Basic` is not implemented for `DocumentID`
--> /home/neulus/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.11.0/src/app_id.rs:98:1
|
98 | pub struct DocumentID(String);
| ^^^^^^^^^^^^^^^^^^^^^
= help: the following other types implement trait `Basic`:
&B
BusName<'_>
ErrorName<'_>
InterfaceName<'_>
MemberName<'_>
NonZero<i16>
NonZero<i32>
NonZero<i64>
and 35 others
= note: required for `HashMap<DocumentID, file_path::FilePath>` to implement `zbus::zvariant::Type`
note: required by a bound in `proxy::Proxy::<'a>::call_versioned`
--> /home/neulus/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.11.0/src/proxy.rs:195:40
|
188 | pub(crate) async fn call_versioned<R>(
| -------------- required by a bound in this associated function
...
195 | R: for<'de> Deserialize<'de> + Type,
| ^^^^ required by this bound in `Proxy::<'a>::call_versioned`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `ashpd` (lib) due to 2 previous errors
```
Release Notes:
- N/A
Neulus
created
3f2c7c6
Use let chain to avoid `clippy::unnecessary_unwrap` (#46409)
Click to expand commit body
No bug, just shows up running the tests on `clippy 0.1.92 (ded5c06cf2
2025-12-08)`
Release Notes:
- N/A
Martin Pool
created
af6385a
Fix Windows IME composition string being displayed incorrectly (#46545)
Click to expand commit body
Previously, a new composition string was processed before a new
composition result. Thus, in the case that a keystroke creates a new
composition result and composition string, the processing of the new
result would overwrite the new string, even though they should both be
displayed. Processing them in the reverse order fixes this issue.
Fixes #42201
Additionally: while fixing this issue, I discovered that the Japanese
IME sometimes moves the cursor far away from the inserted text. WPF
works around this issue by only respecting the IME's requested cursor
position if it's adjacent to uncommitted text. So, we copy this
workaround.
Release Notes:
- N/A
John Tur
created
ecc3928
Fix cancellation regression: make edit_file_tool handle cancellation (#46527)
Click to expand commit body
PR #46306 changed cancellation to wait for tools to complete before
returning. This was correct behavior - it allows tools like terminal to
capture their output on cancellation. The real issue was that many tools
didn't check for cancellation, so they would continue running until they
finished.
## The Problem
When the user pressed Escape to cancel during a tool operation, tools
would continue running because they never checked for the cancellation
signal. The thread correctly waited for tools to complete (so terminal
could capture output), but tools like edit_file, grep, fetch, etc. would
just keep going.
## The Fix
Add cancellation handling to all tools using the same pattern as
`terminal_tool`: use `select!` to race between the tool's main work and
`event_stream.cancelled_by_user()`. When cancelled, tools break out of
their loops or return early.
## All Tools Now Cancellation-Aware
| Tool | Change |
|------|--------|
| `edit_file_tool` | Checks cancellation in edit event processing loop |
| `terminal_tool` | Already handled cancellation |
| `grep_tool` | Checks cancellation in search result iteration loop |
| `fetch_tool` | Checks cancellation during HTTP fetch |
| `web_search_tool` | Checks cancellation during web search |
| `find_path_tool` | Checks cancellation during path search |
| `read_file_tool` | Checks cancellation during buffer open |
| `copy_path_tool` | Checks cancellation during file copy |
| `move_path_tool` | Checks cancellation during file move/rename |
| `delete_path_tool` | Checks cancellation during delete operation |
| `create_directory_tool` | Checks cancellation during directory
creation |
| `save_file_tool` | Checks cancellation during buffer open and save |
| `restore_file_from_disk_tool` | Checks cancellation during buffer open
and reload |
| `open_tool` | Checks cancellation during authorization |
| `diagnostics_tool` | Checks cancellation during buffer open |
| `ContextServerTool` (MCP) | Checks cancellation during external server
calls |
**Synchronous tools (no async work, return immediately):**
- `list_directory_tool` - Reads worktree snapshot synchronously
- `now_tool` - Returns current time immediately
- `thinking_tool` - Returns immediately
## MCP Tools Automatically Handled
MCP tools (user-defined tools via context servers) are now automatically
cancellation-aware without any user action. The `ContextServerTool`
wrapper races the external server request against
`event_stream.cancelled_by_user()`.
## Testing
- Added `CancellationAwareTool` test helper that mirrors the
cancellation pattern
- Updated `test_cancellation_aware_tool_responds_to_cancellation` to
properly await the cancel task and verify the tool detected cancellation
Release Notes:
- Fixed a regression where pressing Escape wouldn't immediately cancel
in-progress tool operations
Richard Feldman
created
c6a38f2
open_ai: Use proper type for Responses API `input` (#46526)
Click to expand commit body
This PR makes it so we use a proper type for the Responses API `input`
rather than a `serde_json::Value`.
It should have never used `serde_json::Value` to begin with.
Release Notes:
- N/A
Marshall Bowers
created
73d9353
Integrate scheduler crate into GPUI (#44810)
Click to expand commit body
## 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>
Nathan Sobo
,
Antonio Scandurra
,
Claude Opus 4.5
,
Yara
, and
Zed Zippy
created