zed/crates
Bennet Bo Fenner c9425f2a90
agent: Stream new_text in StreamingEditFileTool (#50240)
We now stream the new text into the buffer as soon as we receive partial
chunks of `new_text`. This is pretty much a full re-write of the way
streaming worked, which is now much closer to how the edit agent works:
- `ToolEditParser` buffers chunks as they stream in, and emits relevant
events (`OldTextChunk`,`NewTextChunk`, ...) that we use to power the
`EditSession` pipeline.
- `EditSession::process_events` takes care of consuming these events and
applying the edits incrementally as chunks stream in. `EditPipeline`
maintains the underlying state machine for each edit.
- We handle whitespace mismatches similar to the edit agent, the code is
shared by moving that logic to `reindent.rs`

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-27 13:24:57 +01:00
..
acp_thread agent_ui: Add more improvements to the subagent UI (#50260) 2026-02-27 11:04:39 +01:00
acp_tools ui: Improve performance in the CopyButton component (#47292) 2026-01-21 13:40:42 -03:00
action_log agent_ui: Add the ability to undo "reject all" (#48462) 2026-02-18 15:49:36 -03:00
activity_indicator workspace: Move the update Zed button to the title bar (#48467) 2026-02-10 16:03:46 -03:00
agent agent: Stream new_text in StreamingEditFileTool (#50240) 2026-02-27 13:24:57 +01:00
agent_servers agent_servers: Migrate all built-in agents to go via registry (#50094) 2026-02-26 12:24:39 +00:00
agent_settings Remove Agents Panel and utility panes (#49038) 2026-02-12 15:46:10 -05:00
agent_ui agent_ui: Add more improvements to the subagent UI (#50260) 2026-02-27 11:04:39 +01:00
ai_onboarding acp: Claude Code -> Claude Agent (#49345) 2026-02-17 10:41:10 +00:00
anthropic Add fast mode toggle in agent panel (#49714) 2026-02-26 21:19:41 +01:00
askpass Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
assets
assistant_slash_command Handle removed IconName variants in text thread deserialization (#47624) 2026-01-26 23:56:55 +00:00
assistant_slash_commands build: Tear up crate graph (move terminal closer to editor) (#48602) 2026-02-06 20:14:35 +01:00
assistant_text_thread Add fast mode toggle in agent panel (#49714) 2026-02-26 21:19:41 +01:00
audio Fix regression for windows-gnu build in audio (#49844) 2026-02-23 13:28:39 +01:00
auto_update auto_update: Persist custom icons across app updates on macOS (#49727) 2026-02-24 22:20:57 +00:00
auto_update_helper
auto_update_ui auto_update_ui: Add announcement toast component (#49543) 2026-02-19 10:41:16 -03:00
aws_http_client
bedrock bedrock: Add Claude Sonnet 4.6 (#49439) 2026-02-19 07:23:27 +01:00
breadcrumbs Clean up some Cargo.toml files (#48623) 2026-02-06 20:21:19 +00:00
buffer_diff git: Fix panic when unstaged diff is recalculated before its primary diff (#49753) 2026-02-20 17:11:30 -05:00
call workspace: Invert dependency on call crate by extracting into a trait (#49968) 2026-02-24 11:19:34 +00:00
channel Fix race condition in channel notes rejoin (#50034) 2026-02-25 05:48:59 +00:00
cli Reduce amount of closure monomorphizations part 2 (#49688) 2026-02-20 08:32:45 +00:00
client agent_servers: Migrate all built-in agents to go via registry (#50094) 2026-02-26 12:24:39 +00:00
clock text: Narrow insertion-relative offsets from usize to u32 (#49801) 2026-02-25 08:12:04 +01:00
cloud_api_client Sign out upon receiving an Unauthorized response when acquiring an LLM token (#49673) 2026-02-19 22:13:38 -05:00
cloud_api_types title_bar: Show organization plans (#49769) 2026-02-21 01:20:05 +00:00
cloud_llm_client Include optional model version with EP acceptance and rejection messages (#50262) 2026-02-27 01:07:37 +00:00
codestral Fix Codestral API key credentials URL mismatch (#48513) 2026-02-05 17:34:34 -05:00
collab Fix a bug where closing the workspace could skip the dirty check for other workspaces (#50105) 2026-02-25 17:33:05 +00:00
collab_ui Use title case for UI labels (#49864) 2026-02-23 10:20:31 -05:00
collections
command_palette Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
command_palette_hooks
component
component_preview gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
context_server Revert "Allow always_allow patterns for Nushell, Elvish, and Rc shells" (#48050) 2026-01-30 21:26:13 +00:00
copilot Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
copilot_chat copilot: Display cost multiplier for Github Copilot models (#44800) 2026-02-16 15:24:59 -03:00
copilot_ui Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
crashes markdown_preview: Fix panic in mermaid diagram renderer (#50176) 2026-02-26 15:41:27 +05:30
credentials_provider
dap dap: Make ProtoConversion::to_proto consume self (#47871) 2026-01-28 16:00:52 +00:00
dap_adapters util: Always use posix_spawn on macOS even with pre_exec hooks (#49090) 2026-02-13 20:16:11 +01:00
db Increase SQLite busy_timeout from 1ms to 500ms (#49039) 2026-02-12 16:26:13 +00:00
debug_adapter_extension
debugger_tools Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
debugger_ui Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
deepseek
denoise
dev_container Handle empty match list and do safe vector selection instead of slicing (#50232) 2026-02-26 17:06:24 +00:00
diagnostics Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
docs_preprocessor Reduce amount of closure monomorphizations part 2 (#49688) 2026-02-20 08:32:45 +00:00
edit_prediction Include optional model version with EP acceptance and rejection messages (#50262) 2026-02-27 01:07:37 +00:00
edit_prediction_cli Add edit prediction evals that test related excerpt usage (#50256) 2026-02-26 15:36:29 -08:00
edit_prediction_context Edit prediction: prioritize related excerpts that are referenced near the cursor (#50050) 2026-02-24 20:27:57 -08:00
edit_prediction_types Differentiate between explicit rejection and ignored in ep acceptance tracking (#48409) 2026-02-04 17:54:11 -05:00
edit_prediction_ui Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
editor Fix Cmd+click navigating to file instead of definition (#49012) 2026-02-27 12:28:34 +01:00
encoding_selector Revert PRs for landing in main (#48969) 2026-02-12 00:28:17 +00:00
etw_tracing Improve ETW profiler action (#49788) 2026-02-21 06:11:45 +00:00
eval Add fast mode toggle in agent panel (#49714) 2026-02-26 21:19:41 +01:00
eval_utils gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
explorer_command_injector
extension extension: Stream wasi-sdk download (#49679) 2026-02-20 07:25:53 +00:00
extension_api extension_api: Add digest to GithubReleaseAsset (#48413) 2026-02-05 12:13:02 +00:00
extension_cli gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
extension_host Fix backward compatibility for v0.0.4 GitHub extension bindings (#49858) 2026-02-24 10:37:16 +00:00
extensions_ui Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
feature_flags git_ui: Improve connection between the graph and commit views (#50027) 2026-02-25 10:45:14 -03:00
feedback
file_finder file_finder: Remove project's root name from the file finder history (#46957) 2026-02-13 16:05:40 +00:00
file_icons
fs git: Add diff stats in git_panel (#49519) 2026-02-25 18:32:22 +01:00
fs_benchmarks gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
fuzzy
git git: Add diff stats in git_panel (#49519) 2026-02-25 18:32:22 +01:00
git_graph git_graph: Polish UX (#50123) 2026-02-25 19:45:01 +00:00
git_hosting_providers Implement extract_pull_request for GitLab provider (#47973) 2026-01-31 21:56:34 +00:00
git_ui Add fast mode toggle in agent panel (#49714) 2026-02-26 21:19:41 +01:00
go_to_line Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
google_ai Add gemini-3.1-pro-preview model (#49622) 2026-02-19 13:19:14 -05:00
gpui gpui: Reduce amount of wasm cfgs in gpui (#50278) 2026-02-27 09:18:03 +00:00
gpui_linux GPUI on the web (#50228) 2026-02-26 18:36:50 +01:00
gpui_macos gpui: Fix send_file_drop_event holding mutex during event callback (#50173) 2026-02-26 16:58:40 +00:00
gpui_macros gpui: Add min_size and max_size style methods (#47775) 2026-01-27 15:37:22 -03:00
gpui_platform GPUI on the web (#50228) 2026-02-26 18:36:50 +01:00
gpui_tokio
gpui_util GPUI on the web (#50228) 2026-02-26 18:36:50 +01:00
gpui_web GPUI on the web (#50228) 2026-02-26 18:36:50 +01:00
gpui_wgpu Improve GPU selection on Linux (#50274) 2026-02-27 07:59:06 +00:00
gpui_windows Fix Windows build (#49665) 2026-02-19 19:15:59 -05:00
html_to_markdown
http_client gpui: Reduce amount of wasm cfgs in gpui (#50278) 2026-02-27 09:18:03 +00:00
http_client_tls
icons Add Vercel AI gateway provider integration (#50207) 2026-02-26 17:54:44 -05:00
image_viewer image_viewer: Use checkerboard from GPUI (#49575) 2026-02-24 12:56:59 +01:00
inspector_ui Reduce amount of closure monomorphizations part 2 (#49688) 2026-02-20 08:32:45 +00:00
install_cli Revert PRs for landing in main (#48969) 2026-02-12 00:28:17 +00:00
journal Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
json_schema_store Fix docs validation to detect unknown keys (#49660) 2026-02-19 20:46:21 -05:00
keymap_editor Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
language Side by side diff spacer polish (#50182) 2026-02-26 10:47:10 +00:00
language_extension lsp: Add container_name to lsp::Symbol (#46822) 2026-02-04 23:03:15 +01:00
language_model Add fast mode toggle in agent panel (#49714) 2026-02-26 21:19:41 +01:00
language_models Add Vercel AI gateway provider integration (#50207) 2026-02-26 17:54:44 -05:00
language_onboarding
language_selector language_selector: Auto-select current language when opening (#48475) 2026-02-26 15:18:25 +00:00
language_tools dev: Add Tree-sitter tokens and resolved theme keys in highlights tree view (#49197) 2026-02-26 14:53:00 +01:00
languages languages: Reorder type identifier highlights in JavaScript (#49325) 2026-02-27 03:14:40 +00:00
line_ending_selector
livekit_api Update Rust crate jsonwebtoken to v10 [SECURITY] (#48294) 2026-02-03 15:51:40 -05:00
livekit_client livekit_client: Spawn audio input with high priority (#49887) 2026-02-23 15:24:46 +01:00
lmstudio
lsp util: Always use posix_spawn on macOS even with pre_exec hooks (#49090) 2026-02-13 20:16:11 +01:00
markdown gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
markdown_preview markdown_preview: Fix panic in mermaid diagram renderer (#50176) 2026-02-26 15:41:27 +05:30
media
menu
migrator agent_servers: Migrate all built-in agents to go via registry (#50094) 2026-02-26 12:24:39 +00:00
miniprofiler_ui Support profiling remote server in the miniprofiler (#49582) 2026-02-19 10:52:53 +00:00
mistral mistral: Add x-affinity header (#48584) 2026-02-13 12:03:05 +00:00
multi_buffer Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
nc acp: Claude Code -> Claude Agent (#49345) 2026-02-17 10:41:10 +00:00
net Add ETW profile recorder action (#49712) 2026-02-20 13:36:04 +00:00
node_runtime util: Always use posix_spawn on macOS even with pre_exec hooks (#49090) 2026-02-13 20:16:11 +01:00
notifications
ollama ollama: Remove backwards compatibility for Ollama tool call IDs (#49246) 2026-02-16 14:33:29 +00:00
onboarding Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
open_ai Add GPT-5.3-Codex BYOK model under the OpenAI provider (#50122) 2026-02-25 16:29:01 -05:00
open_path_prompt Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
open_router Add user picked model to be used as a default for open router provider when generating comments and thread summary (#47475) 2026-02-12 14:02:16 +00:00
outline Revert "outline: Refactor outline render_item to reuse existing TextStyle (#49166)" (#50258) 2026-02-26 23:27:24 +00:00
outline_panel Revert "outline: Refactor outline render_item to reuse existing TextStyle (#49166)" (#50258) 2026-02-26 23:27:24 +00:00
panel build: Decouple git_ui from recent_projects (#48062) 2026-02-02 13:30:07 +01:00
paths Fix text_threads_dir() non-compliance with XDG spec (#45771) 2026-02-06 15:34:36 +00:00
picker build: Simplify build graph (#47253) 2026-01-23 18:29:20 +01:00
platform_title_bar multiworkspace: Disable sidebar if disable_ai is enabled (#50137) 2026-02-25 23:01:59 +00:00
prettier Add configurable LSP timeout setting (#44745) 2026-02-07 00:36:37 +00:00
project agent_servers: Migrate all built-in agents to go via registry (#50094) 2026-02-26 12:24:39 +00:00
project_benchmarks gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
project_panel project_panel: Fix selection not updating for already-visible gitignored files (#49521) 2026-02-25 23:35:59 +05:30
project_symbols Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
prompt_store Revert "Allow always_allow patterns for Nushell, Elvish, and Rc shells" (#48050) 2026-01-30 21:26:13 +00:00
proto git: Add diff stats in git_panel (#49519) 2026-02-25 18:32:22 +01:00
recent_projects recent_projects: Fix remote reconnect when server is not running (#49834) 2026-02-23 12:39:56 +01:00
refineable
release_channel
remote ssh: Fix IPv6 address formatting in port forward -L arguments (#49032) 2026-02-26 08:42:56 +00:00
remote_connection build: Decouple git_ui from recent_projects (#48062) 2026-02-02 13:30:07 +01:00
remote_server GPUI on the web (#50228) 2026-02-26 18:36:50 +01:00
repl repl: Fix duplicate output inside notebooks (#48616) 2026-02-26 00:15:57 +01:00
reqwest_client gpui: Reduce amount of wasm cfgs in gpui (#50278) 2026-02-27 09:18:03 +00:00
rich_text
rope editor: Optimize TabMap chunks generation (#48378) 2026-02-18 08:53:26 +01:00
rpc Support LSP document symbols in breadcrumbs and outline UI (#48780) 2026-02-11 21:30:03 +02:00
rules_library Add fast mode toggle in agent panel (#49714) 2026-02-26 21:19:41 +01:00
scheduler GPUI on the web (#50228) 2026-02-26 18:36:50 +01:00
schema_generator
search Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
session Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
settings project_panel: Add diagnostic count badges (#49802) 2026-02-25 20:39:30 +05:30
settings_content Add Vercel AI gateway provider integration (#50207) 2026-02-26 17:54:44 -05:00
settings_json
settings_macros
settings_profile_selector Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
settings_ui settings: Remove unused file_finder.git_status setting (#49889) 2026-02-26 18:53:17 +00:00
shell_command_parser Skip /dev/null redirects from terminal auto-allow command extraction (#49503) 2026-02-18 13:01:01 -05:00
sidebar Remove thread title persistence (#49929) 2026-02-23 22:58:50 +00:00
snippet
snippet_provider extension_cli: Validate that all snippets can be parsed (#47649) 2026-01-26 13:49:26 +00:00
snippets_ui Revert PRs for landing in main (#48969) 2026-02-12 00:28:17 +00:00
sqlez Reduce amount of closure monomorphizations part 2 (#49688) 2026-02-20 08:32:45 +00:00
sqlez_macros
story
storybook gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
streaming_diff
sum_tree sum_tree: Implement Iterator::last and lower bound of Iterator::size_hint (#49448) 2026-02-18 09:52:52 +00:00
supermaven util: Always use posix_spawn on macOS even with pre_exec hooks (#49090) 2026-02-13 20:16:11 +01:00
supermaven_api
svg_preview Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
system_specs
tab_switcher vim: Make :bdelete use new workspace::CloseItemInAllPanes command (#48988) 2026-02-12 12:33:51 +00:00
task Fix VSCode tasks.json parsing for tasks without explicit labels (#47754) 2026-02-12 16:30:47 +00:00
tasks_ui Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
telemetry
telemetry_events ep_cli: rated-after: query (#47906) 2026-01-28 16:36:44 -08:00
terminal terminal: Fix mouse scroll report count for negative scroll lines (#49931) 2026-02-24 10:27:22 +00:00
terminal_view Make Workspace::split infallible (#50060) 2026-02-24 23:33:34 -07:00
text text: Narrow insertion-relative offsets from usize to u32 (#49801) 2026-02-25 08:12:04 +01:00
theme vim: Add configurable yank highlight background color (#49517) 2026-02-26 12:01:57 +00:00
theme_extension
theme_importer vim: Add configurable yank highlight background color (#49517) 2026-02-26 12:01:57 +00:00
theme_selector
time_format time_format: Determine year difference based on months passed (#47687) 2026-01-28 17:05:34 +01:00
title_bar multiworkspace: Disable sidebar if disable_ai is enabled (#50137) 2026-02-25 23:01:59 +00:00
toolchain_selector Revert "Added support for dismissing the toolchain path selector via … (#49504) 2026-02-18 17:07:10 -05:00
ui agent_ui: Add some design tweaks to the subagents UI (#49938) 2026-02-23 22:46:49 -03:00
ui_input build: Decouple git_ui from recent_projects (#48062) 2026-02-02 13:30:07 +01:00
ui_macros
ui_prompt
util Add folder_paths for project grouping (#50249) 2026-02-26 22:32:48 +00:00
util_macros
vercel project: Move tests to integration layer (#47596) 2026-01-25 21:35:32 +01:00
vim vim: Add configurable yank highlight background color (#49517) 2026-02-26 12:01:57 +00:00
vim_mode_setting
watch
web_search
web_search_providers Add helper method for checking if the LLM token needs to be refreshed (#47511) 2026-01-23 20:50:50 +00:00
which_key
workspace Add folder_paths for project grouping (#50249) 2026-02-26 22:32:48 +00:00
worktree workspace: Fix read-only button tooltip for non-toggleable buffers (#48998) 2026-02-16 20:11:37 +00:00
worktree_benchmarks gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
x_ai
zed Add folder_paths for project grouping (#50249) 2026-02-26 22:32:48 +00:00
zed_actions repl: Fix duplicate output inside notebooks (#48616) 2026-02-26 00:15:57 +01:00
zed_env_vars
zeta_prompt Edit prediction: add some typescript evals, fix a teacher model failure mode (#50141) 2026-02-25 15:47:08 -08:00
zlog Relax device limits for WGPU (#50270) 2026-02-27 01:31:20 -05:00
zlog_settings
ztracing ztracing: Annotate more callsites that invoke TreeSitter (#47522) 2026-02-11 11:24:04 +00:00
ztracing_macro