Commit Graph
34420 Commits
Author SHA1 Message Date
MostlyK cb13a19d8a repl: Add initial notebook execution + KernelSession abstraction (#43553)
Coming from discussion on #25936 and
https://github.com/zed-industries/zed/pull/19756 .
This PR introduces the KernelSession abstraction and adds basic notebook
cell execution inside NotebookEditor.

The following provides a base starter for the development on Notebooks.

What this PR includes today:

Release Notes:

- KernelSession trait extracted. Both REPL and NotebookEditor now share
the same routing mechanism.
- NotebookEditor can launch kernels, execute code cells, and display
outputs.
- Basic cell operations: run current cell, run all, move up/down, add
code/markdown blocks. Keybindings follow Jupyter defaults.


Next Steps:

- [x] Editing support for markdown and code blocks.
- Buffer integration instead of temporary cell text.
- [x] Proper focus behavior when executing or adding cells.
- Kernel control UI.

A little far fetched steps:

- Vim Support
- Cell Handling Improvement and other convenient features and design
from other editors
- Ability to have better parsing for AI Support. 


I have attached a video of showcasing some of the features:


https://github.com/user-attachments/assets/37e6f3e5-2022-45f0-a73d-2dd01ebc2932
2026-01-22 09:00:29 -06:00
Danilo Leal edf7dc3155 settings_ui: Fix font weight number field rendering (#47384)
Closes https://github.com/zed-industries/zed/issues/47353

Release Notes:

- Settings Editor: Fixed a bug with the number field rendering of the
font weight setting.
2026-01-22 10:44:31 -03:00
Danilo Leal 9aa8d1a7dd agent: Don't show inline assistant feedback buttons if setting is disabled (#47382)
Closes https://github.com/zed-industries/zed/issues/47347

Release Notes:

- Agent: Fixed a bug where the inline assistant feedback buttons where
being displayed despite the setting "Enable Feedback" was turned off.
2026-01-22 10:15:53 -03:00
Michael Barth f2f900bbd5 lsp: Skip serializing of params if unit type (#46027)
Closes #45994 

Per the JSON-RPC specification, `params` "MUST be provided as a
Structured value" or the member "MAY be omitted." See specification
here: https://www.jsonrpc.org/specification#request_object

The code was passing in unit `()` for params which serde_json was
serializing to `null` which is not valid.

This pulls request adds an `is_unit` function and annotates the `params`
fields in the `Request` and `Notification` structs with the following:
 ```rs
#[serde(default, skip_serializing_if = "is_unit")]
```

so that the field will be omitted if the type is unit. This does also introduce a `'static` bound to these structs.

> [!WARNING]
> While this seems to me like a simple change, I am not super familiar with Rust, please look at this PR with extra scrutiny. The last thing I want to do is break everyone's LSP integration.


Release Notes:
- LSP integrations: send language server shutdown requests with correct parameters
2026-01-22 15:06:02 +02:00
Ben Brandt c0baaadc05 agent: Clearer distinction that we are in Text Thread history (#47295)
Some users were a bit confused that the history between zed agent + text
threads is split up now. Making it a bit clearer for the users still
using text threads which history they are currently looking at.

Release Notes:

- N/A
2026-01-22 12:43:42 +00:00
Oleksiy Syvokon f5a2cf3124 ep: Don't log steps that took <500ms (#47371)
Release Notes:

- N/A
2026-01-22 12:17:55 +00:00
Lukas Wirth 3af858f3c7 Bump alacritty-terminal (#47372)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-22 12:09:01 +00:00
Rocky Shi a4d893c421 rust: Highlight enum variants as types (#45546)
Closes [#ISSUE](https://github.com/zed-industries/zed/issues/14489)

Release Notes:

- Fix Rust enum variants with no lower-case highlighted as constants

Screenshot:

<img width="401" height="280" alt="image"
src="https://github.com/user-attachments/assets/cd67a576-3c41-452d-9c6b-b3c259cee556"
/>
2026-01-22 12:52:14 +01:00
Haojian Wu 36cacc92fe Add missing #elifdef, #elifndef directives to C/C++ highlights (#45672)
Release Notes:

- Add missing #elifdef, #elifndef directives to C/C++ highlights.
2026-01-22 12:51:31 +01:00
Ben Brandt d3872a0891 acp: Add beta label to ACP registry (#47369)
Release Notes:

- N/A
2026-01-22 11:44:44 +00:00
Ben Brandt 94fa6982bf acp_thread: Rename resume to retry (#47370)
Changing the name to better capture what this message does and also
avoid confusion with the actual session/resume method in ACP

Release Notes:

- N/A
2026-01-22 11:39:46 +00:00
Oleksiy Syvokon 1d1bc1821b Add ep import-batch to download finsihed Anthropic batches (#47364)
Release Notes:

- N/A
2026-01-22 11:34:51 +00:00
Lukas WirthandMax Malkin cad1c3eef9 project_panel: Show Reveal in File Manager on wsl (#47288)
Assimilates https://github.com/zed-industries/zed/pull/46856 and adds
support for reveal file manager in the project panel on wsl. Closes
https://github.com/zed-industries/zed/pull/46856

Release Notes:

- Fixed "Reveal in File Manager" not working for WSL remote connections
on Windows.
- Show "Reveal in File Manager" in the project panel context menu on WSL

---------

Co-authored-by: Max Malkin <maxim_malkin@outlook.com>
2026-01-22 11:24:23 +00:00
Ben Brandt 929c5f6a74 acp: Optimize registry refresh (#47367)
Before we were checking it even if you weren't using registry agents.
Now happens less frfrequently, and only when you are actually using
registry agents.

Release Notes:

- N/A
2026-01-22 11:19:32 +00:00
Lukas Wirth aa7c61219b workspace: Add close project menu item (#47365)
cc https://github.com/zed-industries/zed/discussions/42163

Release Notes:

- Added a menu item to close the current project, going back to a clean
window state
2026-01-22 12:15:24 +01:00
Ben Brandt 000f33c116 acp: Support the session_info_update notification (#47363)
Release Notes:

- N/A
2026-01-22 11:06:13 +00:00
Lukas Wirth e4b3422b0e agent_ui: Defer spawning agents until the agent panel has been opened (#47355)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-22 10:18:13 +00:00
Piotr Osiewicz 44c68b0e1f fs: Use public-api-only tests (#47149)
This reduces time needed to build tests for fs from 1.2s to 0.6s.
Release Notes:

- N/A
2026-01-22 10:22:29 +01:00
Piotr Osiewicz 00d72f2897 worktree: Use public-api-only tests (#47152)
- **settings: Do not leak type serialization into downstream crates**
- **worktree: Separate integration tests into separate target**

Release Notes:

- N/A
2026-01-22 10:22:04 +01:00
Fabian Szabo f626504fea agent_ui: Fix message editor stealing focus from other panels (#47321)
Closes https://github.com/zed-industries/zed/issues/41278,
https://github.com/zed-industries/zed/issues/45576,
https://github.com/zed-industries/zed/issues/46513

Release Notes:

- Fixed message editor stealing focus (so the "Open Recent Project"
modal stays open)

This issue has been driving me insane haha.


_Note: This is my first code contribution to this project. Please be
kind and let me know if I have missed something. I tested this fix on my
machine and it works. Tests are passing on my device. I have agreed to
the Zed Contributor License and Feedback Agreement with my Zed Account
that's linked to the same email as this GitHub account._
2026-01-22 09:13:33 +00:00
6b8eb8fe07 git: Side-by-side diff UI (#47349)
This PR implements a UI for the side-by-side diff, using blocks to align
the two sides and adding a coherent `SplitEditorElement`.

Release Notes:

- N/A

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-22 02:31:14 -05:00
Richard FeldmanandZed Zippy 900419fde3 User-defined slash commands (#46815)
## Summary

Implements user-defined slash commands for the agent panel. Users can
create markdown files in `~/.config/zed/commands/` (user-wide) or
`.zed/commands/` (project-specific) that expand into templated text when
invoked via `/command_name` in the chat interface.

## Features

- **File-based commands**: Create `.md` files that become slash commands
- **Template expansion**: Use `$1`, `$2`, etc. for positional arguments,
or `$ARGUMENTS` for all args
- **Namespacing**: Subdirectories create namespaced commands (e.g.,
`frontend/component.md` → `/frontend:component`)
- **Project & user scopes**: Project commands in `.zed/commands/`, user
commands in config dir
- **Claude compatibility**: Can symlink `~/.claude/commands/` for
compatibility
- **Caching**: Commands are cached and watched for file changes
- **Error handling**: Graceful degradation with error display in UI

## Feature Flag

Behind `user-slash-commands` feature flag.

## Testing

52 unit/integration tests covering parsing, validation, expansion, file
loading, symlinks, and error handling.

---

Release Notes:

- N/A (behind feature flag)

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-22 01:43:55 -05:00
Finn Evers dc60a660ea extension_rollout: Add support for renaming and deleting files (#47329)
This is in preparation for removing one of the files in favor of having
just one larger one (and perhaps renaming that in the future).

Release Notes:

- N/A
2026-01-22 01:13:10 +01:00
MostlyKanddino 8f5bdfc671 Fix Visual mode flip on project search (#44284)
Previously, when project search results first appeared, vim would
incorrectly switch to Visual mode. This happened because vim settings
(including `collapse_matches`) weren't synced to an editor until it
received focus. Since the results editor wasn't focused when the first
match was selected, the selection wasn't collapsed, causing vim to
interpret it as a visual selection.

Now vim settings are synced immediately when vim activates on an editor,
ensuring `collapse_matches` is set before any selections are made.

Closes #43878

Release Notes:

- Fixed vim mode incorrectly switching to Visual mode on first project
search

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-01-22 00:11:29 +00:00
MostlyKandMrSubidubi b162fb4019 Support zooming and panning in the image viewer (#43944)
Implemented Pan and Zoom on the Image Viewer.

Demo:



https://github.com/user-attachments/assets/855bafe8-fdc2-4945-9bfb-e48382264806





Closes #9584



Release Notes:

- Add zoom in/out, reset, fit-to-view and zoom-to-actual actions 
- Support scroll-wheel zoom with modifier, click-and-drag panning 
- Renders a zoom percentage overlay. 
- ImageView Toolbar Added to control zoom in/out and fit view.

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-01-21 22:48:30 +01:00
Finn Evers 20bc0f6f67 extension_ci: Remove rollout exclusion list (#47315)
The last extension has now been migrated to the new workflows and with
that, the entire zed-extensions org now uses the centralized workflows 🎉

Given this, we can now remove the exclusion list and - as a little bonus
- also rollout changes automatically to the repository hosting the
shared workflows.

Release Notes:

- N/A
2026-01-21 21:46:38 +00:00
Smit Barmase e73c11363b prompt_store: Fix deleted rules from the rules library being restored after restart (#47323)
Closes #40648

When deleting a prompt from the rules library, we now also delete it
from the legacy V1 database tables (if they exist). Previously, the V1
data would persist and get re-migrated on the next startup.

Release Notes:

- Fixed an issue where deleted rules from the rules library were getting
restored after a restart.
2026-01-22 02:44:47 +05:30
Ben Kunkle 0764b13267 ep_cli: Chunk teacher prediction requests to Anthropic batch API (#47318)
Closes #ISSUE

We're hitting request size limits on the new larger dataset, so we need
to do pre-batching. A 16k chunk size was chosen arbitrarily but seems to
be a good tradeoff between number of chunks / within request size limit

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-21 14:52:45 -05:00
Marshall Bowers fd0ef0ef7e language_models: Remove open-ai-reponses-api feature flag (#47317)
This PR removes the `open-ai-responses-api` feature flag and makes it so
all OpenAI requests to the Zed provider use the Responses API.

We've been running this in Nightly/Preview for a week now without any
issues.

Closes CLO-104.

Release Notes:

- N/A
2026-01-21 19:35:08 +00:00
KyleBarton d5ab19d704 Pop end row if the end is equal to the starting sticky row (#47314)
Closes #47307

In markdown, the outline item for a heading actually ends on the same
row as the next outline item (see #47307 for the visual glitch). This
change makes it so that the end row calculation accounts for that, and
you don't have two different display points where content is potentially
scrolling out of view. Fixed visually:



https://github.com/user-attachments/assets/e0a7e57a-fd41-4484-87e9-ac3e51d0b927


Release Notes:

- Fixed a visual glitch with sticky scroll headers in markdown
2026-01-21 18:47:54 +00:00
Oleksiy Syvokon a948ff8812 ep: Update teacher prompt to avoid undoing user edits (#47313)
Release Notes:

- N/A
2026-01-21 18:26:19 +00:00
Joseph T. Lyons 2b681146fa Bump Zed to v0.222 (#47305)
Release Notes:

- N/A
2026-01-21 18:17:32 +00:00
Michael Benfield 743e35a7b1 Add a streaming edit file tool (#47244)
Release Notes:

- N/A
2026-01-21 09:41:03 -08:00
Danilo Leal 13f05547fd ui: Improve performance in the CopyButton component (#47292)
This PR improves the performance of the `CopyButton` component by
tracking the copied state locally through a `CopyButtonState` struct
instead of making an OS call every time the component re-renders. Also
pushing a slight improvement here by resetting the state after two
seconds so as to make the check mark go away after you clicked to copy.

Release Notes:

- N/A
2026-01-21 13:40:42 -03:00
Oleksiy Syvokon d3bba57d14 ep: Check whether predictions worsen brace balance (#47301)
Release Notes:

- N/A
2026-01-21 18:30:53 +02:00
Ben Kunkle 1ebb127371 Use arithmetic expansion instead of expr in ./script/clear-target-dir-if-larger-than (#47298)
Fixes CI failures when the target dir is 0GB in size, which causes
`expr` to output a non-zero exit code per the posix spec.

See exit status section of
https://www.man7.org/linux/man-pages/man1/expr.1p.html

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-21 11:10:18 -05:00
Danilo Leal d8d93403b9 agent_ui: Alphabetically sort edited files in the panel & review view (#47300)
This makes the ordering of files consistent with the Git diff view.

Release Notes:

- N/A
2026-01-21 13:03:33 -03:00
Danilo Leal 7130518db6 agent_ui: Improve UI for subagent calls (#47299)
- Improves spacing between consecutive calls
- Only show disclosure button (i.e., ability to expand the card) when
there's actual content
- Fix font size being bigger than the actual thread
- Add gradient overlay to communicate that you can't scroll within the
card (expanding the subagent call will allow that in the near future)

Here's the result of it all, roughly:

<img width="600" height="890" alt="Screenshot 2026-01-21 at 12  26@2x"
src="https://github.com/user-attachments/assets/e5e4a544-611d-48f5-b00d-f69e869726c5"
/>

Release Notes:

- N/A
2026-01-21 12:42:48 -03:00
Ben Brandt 5d1e65bdfb acp: Allow running NPM agents from registry (#47291)
Release Notes:

- N/A
2026-01-21 14:52:44 +00:00
Ben Brandt e5af0f1e46 agent_servers: Don't fill in unneeded fields in settings when auto-adding new agent servers (#47293)
Adding some serde magic to avoid adding a bunch of empty fields to the
settings file.

Release Notes:

- N/A
2026-01-21 14:40:31 +00:00
Mateo Kruk 658773ce3f themes: Fix One Light terminal cyan color (#45691)
Closes #45075

The cyan terminal colors in One Light were incorrectly set to the same
values as green, making them indistinguishable. This was introduced in
https://github.com/zed-industries/zed/pull/44912

Release Notes:

- Fixed terminal cyan color displaying as green in One Light theme
2026-01-21 08:14:36 -06:00
Danilo Leal c17dc773bf agent_ui: Fix keybinding conflict with editing queued messages (#47290)
This PR fixes `shift-e` being used for triggering edits in queued
messages, which breaks writing simple capital E in the editor.

Release Notes:

- N/A
2026-01-21 11:00:16 -03:00
Xin Zhao 69fb5cd472 languages: Fix poetry environment discovery on Linux (#47100)
Closes #47098 

The root cause of this issue is related to how `Poetry` (and the
upstream `pet-poetry` library) handles path hashing. While perhaps it's
an upstream behavior, we can easily fix it on the Zed side.

The related code are

https://github.com/zed-industries/zed/blob/23c7d60f1e9a1f9e4ce1502aad3bf90c8093833e/crates/languages/src/python.rs#L1181-L1211

In my debugging, I found that `worktree_root` takes the form
`/home/user/project`, but `config.workspace_directories` often ends up
as `/home/user/project/`(with a trailing slash). Normally this wouldn't
be an issue, but `Poetry` generates environment names based on the hash
of the absolute path. Since the hashes for `/home/user/project` and
`/home/user/project/` are different, `pet-poetry` fails to find the
environment.

The fix is straightforward: we just need to ensure the trailing `/` is
removed so the hashes match.

Release Notes:

- Fixed poetry environment not discovered on linux
2026-01-21 13:05:50 +00:00
Smit Barmase 4a394e5da2 project_panel: Fix "Add Folder to Project" menu hidden on remote projects (#47283)
Fixes an unintended behavioral change from #40838.

Release Notes:

- Fixed "Add Folder to Project" and "Remove from Project" menu items
being incorrectly hidden on remote projects.
2026-01-21 17:06:45 +05:30
Oleksiy Syvokon 6837d0e5b8 ep: Don't compute n-grams for regions that match exactly (#47281)
This makes delta-chrF computation ~50 faster.

Release Notes:

- N/A
2026-01-21 11:15:25 +00:00
Smit Barmase 00bfedd78b remote_server: Fix remote project search include/exclude filters for multiple worktrees (#47280)
Closes #45772

Release Notes:

- Fixed project search include/exclude filters not working correctly in
remote project with multiple folders.
2026-01-21 16:16:03 +05:30
Ben Brandt 1eb4dfbd73 acp: Filter out built-in agents from the registry (#47279)
Release Notes:

- N/A
2026-01-21 10:27:24 +00:00
fd20675dd7 onboarding: Fix theme picker always updating theme based on system appearance (#47245)
The settings store separate themes for Light and Dark modes. When the
user clicks a theme, the code uses the system appearance to decide which
to update, rather than the mode the user selected in the UI. This causes
the wrong theme to be saved when the system appearance differs from the
selected mode.

<img width="746" height="324" alt="image"
src="https://github.com/user-attachments/assets/b8f8d937-172d-4da8-b572-4f3db7f1de9a"
/>

Release Notes:

- Fixed onboarding page sometimes rendering the wrong theme

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: MrSubidubi <finn@zed.dev>
2026-01-21 10:12:29 +00:00
AeroandBennet Bo Fenner 8c42715be7 open_ai: Support reasoning content (#43662)
Support for Kimi K2 Thinking

Release Notes:

- Added support for thinking traces when using OpenAI-API-compatible AI providers

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2026-01-21 10:08:59 +00:00
Oleksiy Syvokon 524cbde492 ep: Fix in-place processing (#47274)
Release Notes:

- N/A
2026-01-21 09:47:26 +00:00