Mentioned in #47258
Release Notes:
- Added hotkey options and actions for toggling light and dark theme.
- Add default keymap as `cmd/ctrl+k cmd/ctrl+shift+t`
In Helix, selecting a line with `x` creates a selection from column 0 of
the current row to column 0 of the next row. The default
`InsertEndOfLine` uses the selection head (which is on the next row) to
find the line end, placing the cursor on the wrong line.
This commit introduces a new `HelixInsertEndOfLine`, mapped by default
to `shift-a` when Helix mode is enabled, that moves left from the head
first to land on the correct line.
Release Notes:
- Fixed `shift-a` in Helix select mode placing the cursor on the wrong
line after selecting with `x`
---------
Co-authored-by: SkandaBhat <9384046+SkandaBhat@users.noreply.github.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
This PR adds the ability to save in the settings whether new threads
should start in the current project or in a new Git worktree.
Additionally, it also adds a keybinding that allows cycling through the
menu options easily, with the ability to use cmd-click/enter to choose
which one is set as the default.
No release notes because this feature/settings depends on a feature flag
that isn't out yet.
Release Notes:
- N/A
## Description:
This PR adds the missing `ctrl-shift-g` binding for
editor::UndoSelection to the JetBrains/IntelliJ keymap on macOS.
## Problem
In IntelliJ IDEA, when using multiple cursors:
- ctrl+g (macOS) adds the next occurrence to the selection
- ctrl+shift+g (macOS) removes the last added occurrence from the
selection
The current Zed JetBrains keymap has `ctrl-g` for SelectNext but is
missing the corresponding `ctrl-shift-g` for undoing/removing the last
selection.
## Reference
- Press Ctrl+G (macOS) to find and select the next occurrence
[link](https://www.jetbrains.com/help/idea/multicursor.html#multiple_words)
- To remove selection from the last selected occurrence, press
Ctrl+Shift+G (macOS)
[link](https://www.jetbrains.com/help/idea/multicursor.html#multiple_words)
This change improves parity with IntelliJ for users transitioning to
Zed.
### Demo
https://github.com/user-attachments/assets/0c7f699f-697d-4b81-a929-53f765d254d8
Closes #ISSUE
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- JetBrains macOS bindings: added the missing `ctrl-shift-g` binding for
`editor::UndoSelection`
Fixes a bug that causes the new large agent panel message editor
overrides the ctrl-enter keyboard shortcut to trigger the inline
assistant, rather than sending a message
Release Notes:
- N/A *or* Added/Fixed/Improved ...
This PR adds an action and keybinding to trigger the worktree dropdown
in the agent panel. This is still under a feature flag, so no release
notes yet.
Release Notes:
- N/A
Add a `git::RestoreAndNext` action that restores the diff hunk at the
cursor and advances to the next hunk. In the git diff view, the default
restore keybinding (`cmd-alt-z` on macOS, `ctrl-k ctrl-r` on
Linux/Windows) is remapped to this action so users can quickly restore
hunks in sequence. Also refactor `go_to_hunk_before_or_after_position`
to accept a `wrap_around` parameter, eliminating duplicated
hunk-navigation logic in `do_stage_or_unstage_and_next` and
`restore_and_next`.
Release Notes:
- Added a `git: restore and next` action that restores the diff hunk at
the cursor and moves to the next one. In the git diff view, the
default restore keybinding (`cmd-alt-z` on macOS, `ctrl-k ctrl-r` on
Linux/Windows) now triggers this action instead of `git: restore`.
---------
Co-authored-by: Afonso <4775087+afonsograca@users.noreply.github.com>
Add an explicit `Editor && mode == auto_height` context block. This
ensures that `Shift+Enter` and `Ctrl+Enter` correctly insert a newline
at the cursor position in editors like the AI Agent Panel,
preventing them from inheriting conflicting overrides (e.g., JetBrains
mapping `Shift+Enter` to `editor::NewlineBelow`).
Closes#47269
Release Notes:
- Fixed an issue where `Shift+Enter` would insert a newline at the end
of the text instead of the cursor position in the Agent Panel when using
certain keymaps.
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>
Adds the ability to delete a git worktree directly from the worktree
picker, inspired by the existing branch delete functionality.
(`cmd-shift-backspace` on macOS, `ctrl-shift-backspace` on
Linux/Windows).
Screenshot:
<img width="1288" height="466" alt="Screenshot 2026-02-24 at 16 01 05"
src="https://github.com/user-attachments/assets/6ca5048d-63fa-4295-a578-358904bb92eb"
/>
Release Notes:
- Added the ability to delete a git worktree from the worktree picker
---------
Co-authored-by: Anthony Eid <anthony@zed.dev>
I've been using
https://github.com/zed-industries/zed/issues/15046#issuecomment-3259286451
for half a year now, and it seems worthy of inclusion in the default
keymap.
Before you mark this PR as ready for review, make sure that you have:
- [ ] 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:
- Added `ctrl-enter` keybind on macOS to type a newline in search bars
This is a staff only toggle for now, since the consequences of
activating it are not obvious and quite dire (tokens costs 6 times
more).
Also, persist thinking, thinking effort and fast mode in DbThread so the
thinking mode toggle and thinking effort are persisted.
Release Notes:
- Agent: The thinking mode toggle and thinking effort are now persisted
when selecting a thread from history.
- Render the output only when needed, fixes the duplicate output that
can happen after opening a saved notebook.
- Vim in Jupyter View with j/k navigation across notebook cells
Release Notes:
- N/A
This PR adds a button in the `git: branch diff` view that allows to
quickly and easily send the entire diff to your last used agent for a
review. What this does is automatically submits a (pre-written and
generic) prompt to the last agents you were using in the agent panel
with the whole content of your diff.
<img width="750" height="1964" alt="Screenshot 2026-02-18 at 3 35@2x"
src="https://github.com/user-attachments/assets/493d8cf4-4815-4b01-91a0-6a39ad6219fe"
/>
Release Notes:
- Added a "Review Branch" button in the `git: branch diff` view so that
the whole diff can be quickly sent for review to an agent.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Closes https://github.com/zed-industries/zed/issues/39294
This PR implements the ability to undo the "reject all" action from the
agent panel (and the other places where this button is surfaced).
Effectively, this allows to recuperate the edits an agent has introduced
in case you either accidentally clicked the button or regretted the
decision to reject all.
https://github.com/user-attachments/assets/6f048b95-dd0a-4a45-8b4f-cd8f99d45cb3
Release Notes:
- Agent: Introduced the ability to undo the "reject all" action from
agent-made changes.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Follow-up to https://github.com/zed-industries/zed/pull/46641.
In the PR linked above, I had introduced a dropdown that'd show up in
the title bar when the workspace contained more than one project.
Although that helped improve the multi-project use case, it created some
quirky designs:
- The project dropdown and the recent project pickers looked too
different from one another
- The transition between the 2 project case to the 1 project scenario,
from the dropdown, was not great, because you'd be then seeing the
bigger recent projects picker
- The `workspace: switch project` action was still reachable in the
command palette even if you had one project in the workspace
So, what this PR does is essentially fixing all of this by consolidating
it all in the Recent Projects picker. If you are in a multi-project
scenario, the picker will display a section with all of the projects on
the workspace allowing you to activate each one of them. The picker also
looks simpler when you reach it by clicking on the project name in the
title bar, as opposed to through the keybinding. I've then removed the
project dropdown code as well as the action, given we don't need them
anymore due to the consolidation. Lastly, I tackled the inconsistent
wording used between "Folders", "Projects", and "Workspaces".
Here's the result:
https://github.com/user-attachments/assets/9d8ef3e3-e57b-4558-9bc0-dcc401dec469
- [x] Code Reviewed
- [x] Manual QA
Release Notes:
- Workspace: Improved the recent projects picker by making it also
display active projects in case of a multi-project workspace.
Release Notes:
- Added agent panel restoration. Now restarting your editor won't cause
your thread to be forgotten.
---------
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Cameron Mcloughlin <cameron.studdstreet@gmail.com>
This PR adds some design refinements to the thinking effort selector (to
be generally rolled out soon):
- Improved split button UI styles and consistency with other dropdowns
in the message editor
- Stopped rendering the effort selector if thinking is turned off
- Added a keybinding to trigger the effort menu
- Added a keybinding to cycle through effort options
<img width="500" height="380" alt="Screenshot 2026-02-09 at 10 18@2x"
src="https://github.com/user-attachments/assets/48d5b65c-7256-4ceb-aab2-35869f8fbf4a"
/>
---
- [x] Code Reviewed
- [x] Manual QA
Release Notes:
- N/A
It's happeningggggg
Release Notes:
- Changed the Agent Panel so that the Active Thread is restored on
restart.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Richard Feldman <richard@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
The `alt-tab` keybinding doesn’t work properly under the `AgentPanel`
context on Windows and certain Linux distros, so `alt-l` is provided as
an alternative for the same action.
In my testing, I could not trigger the `AcpThread > Editor` context, but
I added the keybinding there too just in case.
Closes#48347.
Release Notes:
- Added an alternate keybinding for `agent::CycleFavoriteModels` on
Linux and Windows to prevent conflict with global app switcher
- Keyboard navigation where you can traverse through cells using up and
down arrow
- Jupyter Logo added
- Initialize kernel as shutdown for more predictable behavior
- Ability to create .ipynb files with bare essential metadata.
- Optimize editor initialization to avoid cloning the entire notebook
and shortcuts
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Summary
This PR adds the ability to quote terminal selections into Agent
threads, similar to how editor selections can be quoted. Users can now
select text in the terminal and add it as context to their agent
conversation.
### Features
- **Context menu**: Added "Add to Agent Thread" option to the terminal's
right-click menu (only shows when text is selected)
- **Keyboard shortcut**: The existing `cmd->` / `ctrl->` shortcut now
works in the terminal
- **Collapsed display**: Terminal output appears as a collapsed
"Terminal" crease in the chat, just like code references
- **Works with both thread types**: Supports both ACP-style threads
(Claude Code) and text threads
### Implementation
- Extended `quote_selection` handler to check for terminal panel focus
after checking for editor selections
- Terminal content is formatted as ` ```terminal` code blocks via new
`insert_terminal_crease` method
- Refactored crease insertion into `insert_crease_impl` helper to
support both code snippets (with `TextSnippet` icon) and terminal output
(with `Terminal` icon)
- Added automatic detection and folding of ` ```terminal` blocks in
`set_message` so terminal content stays collapsed in sent message
history
- Terminal creases use a trailing space instead of newline so cursor
behavior matches user expectations
### Demo
1. Select text in terminal
2. Right-click → "Add to Agent Thread" (or press `cmd->`)
3. Terminal content appears as collapsed "Terminal" block in chat
4. Send message - AI receives full terminal output, but chat history
shows it collapsed
### General note
I'm new to open source and the codebase in general so let me know if
anything should be different!
I tried to stay in line with other patterns I saw.
I didn't see a way to setup an end to end test with a real terminal so I
just added a unit test for the adding of the text to the chat, if it
exists and I missed it then I think the test coverage could be improved
with a test that uses a real terminal + running the command
<img width="431" height="148" alt="image"
src="https://github.com/user-attachments/assets/854732f9-2a7f-4f31-867e-d54af068c97c"
/>
Release Notes:
- agent: Added the ability to send selections from terminals into the
Agent thread
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Add the icon to the left side of the message editor, add a new icon for
when the thinking mode is toggled on, and add a keybinding for the
action. Currently available under a feature flag-only but should be out
soon.
<img width="400" height="318" alt="Screenshot 2026-01-29 at 11 57@2x"
src="https://github.com/user-attachments/assets/e033ec83-746b-4fed-beb7-ed26e96cb60a"
/>
Release Notes:
- N/A
This PR swaps the @ icon button in the message editor for a + one, which
opens a dropdown that displays context options you can add to the agent.
Aside from removing one step if you're wanting to add context first with
the mouse (in comparison to just inserting @ in the message editor),
this menu will also house skills you've created, whenever we get to
support to that. It also works to surface images and selections in a bit
more visible way as context options. So, effectivelly, this is a bit of
foundation work for further features to come. Here's what it looks like:
<img width="500" height="586" alt="Screenshot 2026-01-27 at 11 38@2x"
src="https://github.com/user-attachments/assets/551686ba-4629-4317-9177-1e942512a23c"
/>
Note that all the options you see in the menu should also be available
through simply typing @ in the message editor.
Release Notes:
- Agent: Added a menu for inserting context more easily with the mouse
in the agent panel.
# Add "Reopen with Encoding" feature (Local/Single user)
## Summary
This PR adds a "Reopen with Encoding" feature to allow users to manually
specify an encoding and reload the active buffer.
This feature allows users to explicitly specify the encoding and reload
the file to resolve garbled text caused by incorrect detection.
## Changes
1. Added encoding picker logic to `encoding_selector`
- Implemented a modal UI accessible via the command palette, shortcuts,
or by clicking the encoding status in the status bar.
- Allows users to select from a list of supported encodings (Shift JIS,
EUC-JP, UTF-16LE, etc.).
2. Updated Buffer logic (crates/language)
- Added a `force_encoding_on_next_reload` flag to the Buffer struct.
- Updated the `reload` method to check this flag and apply the following
logic:
- **Non-Unicode (e.g., Shift JIS):** Bypasses heuristics (like BOM
checks) to force the specified encoding.
- **Unicode (e.g., UTF-8):** Performs standard BOM detection. This
ensures that the BOM is correctly handled/consumed when switching back
to UTF-8.
3. UI / Keymap
- Made the encoding status in the status bar (ActiveBufferEncoding)
clickable.
- Added default keybindings:
- macOS: cmd-k n
- Linux/Windows: ctrl-k n
- Windows: ctrl-k n
## Limitations & Scope
To ensure stability and keep the PR focused, the following scenarios are
intentionally out of scope:
1. **Collaboration and Remote Connections**
- Encoding changes are disabled when collaboration (is_shared) or SSH
remote connections (is_via_remote_server) are active.
- **Reason:** Synchronizing encoding state changes between host/guest or
handling remote reloads involves complex synchronization logic. This PR
focuses on local files only.
`Remote Connection (SSH/WSL)`
|Via status bar|Via shortcut/command|
|:---:|:---:|
|<img width="767" height="136" alt="remote_tooltip"
src="https://github.com/user-attachments/assets/6c7cb293-2486-4f6d-a3ff-2086d939398e"
width="400" />|<img width="742" height="219" alt="remote_shortcut"
src="https://github.com/user-attachments/assets/5448f199-2066-4baf-b349-a983ab2fa77a"
width="400" />|
`Collaboration Session `
|Via status bar|Via shortcut/command|
|:---:|:---:|
|<img width="734" height="86" alt="collab_tooltip"
src="https://github.com/user-attachments/assets/37de99a9-dd33-4c78-98bf-20654d41fdd0"
/>|<img width="720" height="182" alt="collab_pop"
src="https://github.com/user-attachments/assets/91d03ea7-f029-442a-8236-55234576f7ed"
/>|
2. Dirty State
- The feature is disabled if the buffer has unsaved changes to prevent
data loss during reload.
|Via status bar|Via shortcut/command|
|:---:|:---:|
|<img width="545" height="103" alt="local_dirty_tooltip"
src="https://github.com/user-attachments/assets/d9ae658e-52b3-4ecd-9873-d0ec8bd51b5d"
/>|<img width="707" height="178" alt="local_dirty_pop"
src="https://github.com/user-attachments/assets/d170ea1e-9fcb-42e7-aa3e-0555b4a19d86"
/>|
3. Files detected as Binary
Files that worktree detects as "binary" (e.g., UTF-16 files without BOM
containing non-ASCII characters) are not opened in the editor, so this
feature cannot be triggered.
**Future Work**: Fixing this would require modifying crates/worktree
heuristics or exposing a "Force Open as Text" action for InvalidItemView
to trigger. Given the scope and impact, this is deferred to a future PR.
## Test Plan
I verified the feature and BOM handling using the following scenarios:
### Preparation
Used the following test files:
-
[**test_utf8.txt**](https://github.com/user-attachments/files/24548803/test_utf8.txt):
English-only text file. No BOM.
-
[**test_utf8_bom.txt**](https://github.com/user-attachments/files/24548822/test_utf8_bom.txt):
English-only text file. With BOM.
-
[**test_utf8_jp_bom.txt**](https://github.com/user-attachments/files/24548825/test_utf8_jp_bom.txt):
UTF-8 with BOM file containing Japanese characters.
-
[**test_shiftjis_jp.txt**](https://github.com/user-attachments/files/24548827/test_shiftjis_jp.txt):
Shift-JIS file containing Japanese characters (content designed to
trigger misdetection, e.g., using only half-width katakana).
Used an external editor (VS Code or Notepad) for verification.
### Case 1: English-only file behavior
1. Open an English-only UTF-8 file (test_utf8.txt).
2. Reopen as Shift JIS.
3. **Result:**
- Text appearance remains unchanged (since ASCII is compatible).
- Status bar updates to "Shift JIS".
### Case 2: Fixing Mojibake
1. Open a Shift-JIS file (test_shiftjis_jp.txt) that causes detection
failure.
※Confirm it opens with mojibake
2. Select Shift JIS from the status bar selector.
3. **Result:**
- Mojibake is resolved, and Japanese text is displayed correctly.
- Status bar updates to "Shift JIS".
### Case 3: Unicode file with BOM behavior
1. Open an English-only UTF-8 with BOM file (test_utf8_bom.txt).
2. Reopen as `Shift JIS`.
3. **Result:**
- The BOM bytes are displayed as mojibake at the beginning of the file.
- The rest of the English text is displayed normally (ASCII
compatibility).
- Status bar updates to "Shift JIS".
### Case 4: Non-Unicode file with BOM behavior
1. Open a UTF-8 with BOM file containing Japanese
(test_utf8_jp_bom.txt).
2. Reopen as Shift JIS.
3. **Result:**
- The BOM bytes at the start are displayed as mojibake.
- The Japanese text body is displayed as mojibake (UTF-8 bytes
interpreted as Shift JIS).
- Status bar updates to "Shift JIS" (no BOM indicator).
### Case 5: Revert to Unicode
1. From the state in Case 4 (Shift JIS with mojibake), reopen as UTF-8.
2. **Result:**
- The BOM mojibake at the start disappears (consumed).
- The text returns to normal.
- Status bar updates to "UTF-8 (BOM)".
### Case 6: External BOM removal (State sync)
1. Open a UTF-8 with BOM file in Zed (test_utf8_bom.txt).
2. Open the same file in an external editor and save it as UTF-8 (No
BOM).
3. Refocus Zed.
4. **Result:**
- Text appearance remains unchanged.
- The (BOM) indicator disappears from the status bar.
- Saving in Zed and checking externally confirms the BOM is gone.
### Case 7: External BOM addition
1. From the state in Case 6 (UTF-8 No BOM), save as UTF-8 with BOM in
the external editor.
2. Refocus Zed.
3. **Result:**
- The (BOM) indicator appears in the status bar.
- Saving in Zed and checking externally confirms the BOM is present.
### Case 8: External Encoding Change (Auto-detect sync)
1. Open an English-only UTF-8 file in Zed (`test_utf8.txt`).
* *Status bar shows: "UTF-8".*
2. Open the same file in an external editor and save it as **UTF-16LE
with BOM**.
3. Refocus Zed.
4. **Result:**
* The text remains readable (no mojibake).
* **Status bar automatically updates to "UTF-16LE (BOM)".** (Verifies
that `buffer.encoding` is correctly updated during reload).
Release Notes:
- Added "Reopen with Encoding" feature (currently supported for local
files).
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
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
Implemented Pan and Zoom on the Image Viewer.
Demo:
https://github.com/user-attachments/assets/855bafe8-fdc2-4945-9bfb-e48382264806Closes#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>
This PR frees up `shift-backspace` to work as it did before. Now, the
action to remove the first queued message is now assigned to the
`cmd-shfit-backspace` keybinding, whereas the action to clear the entire
message queue is assigned to `cmd-alt-backspace`.
Release Notes:
- N/A
This PR adds the ability to edit a queued message, which you can now do
by hitting `cmd-e` from the message editor, which will focus the first
queued message. To pull that off, I'm also making the queued messages
render as an editor, the same way we do with regular user messages. That
way, we ensure less layout shift when focusing in and out of the queued
message for editing and gain the ability to render context
buttons/creases the same way we do in the main message editor.
https://github.com/user-attachments/assets/fb68fd48-c0cd-491f-a7d9-5065a9151b0b
Note that in the video, I show the state in which you're still editing
in the moment in which the queued message would be sent. If that
happens, your queued message won't be sent even if you unfocus the
queued message editor. In this case, you need to explicitly hit "Send
Now".
Release Notes:
- Agent: Added the ability to edit queued messages.
Happy New Years! This PR is a second take at
https://github.com/zed-industries/zed/pull/38127 (cc @ConradIrwin)
This PR is significantly less complicated than the last attempt: while
we still keep our data on the `NavigationHistory` object, we no longer
tightly integrate it with the existing back/forward "browser history."
Instead, we keep our own stack of `(origin, target)` pairs (in a struct
to make it easy to extend with e.g., tag names in the future).
The PR is split into two separable commits. Most of the implementation
is in the second commit, which:
- Defines the stack data structure
- Implements `pane::GoToOlderTag` and `pane::GoToNewerTag` in terms of
the stack
- Hooks into `navigate_to_hover_links` to push tag stack entries
This last bit is the most fiddly. The core challenge is that we need to
keep track of the `origin` location and calculate the `target` location
across three codepaths that might involve creating a new editor and/or
splitting the pane. One thing in particular I found difficult was that
an editor's `nav_history` (an `ItemNavHistory`) seems to be populated
asynchronously. Instead of relying on it, I decided in this code to make
my own `ItemNavHistory`. I briefly tried to refactor the code in
question, but it seemed like it would significantly increase the scope
of the change.
I prefer this all-in-one tracking centered around
`navigate_to_hover_links ` to the `start/finish` approach taken in
b69a2ea200
because I find it easier to convince myself that the right data is being
populated at the right times. Of course, let me know if you think
there's a better solution.
Closes#14206
Release Notes:
- ??? I don't know what to write here! Suggestions welcome
This PR makes queueing a prompt the default behavior when sending a new
one while there's an on-going generation. You can still send a prompt
that will immediately interrupt the agent with the `cmd-shift-enter`
keybinding, though, which preserves the current behavior.
The main motivation for this change is to make the queueing not only
more discoverable, but more useful as well, as we're parting from the
assumption that most of the time, what you want is to queue it as
opposed to interrupting it (even though it's still possible to do either
through the keybinding I mentioned above or simply by stopping the
generation and sending a new one).
Here's a quick video:
https://github.com/user-attachments/assets/37f92433-70ef-459f-98ff-41ed80e3e43f
In the video, I show sending one prompt and then sending two others that
fall straight into the queue. Then, in the middle of the generation of
my first prompt, I use the `cmd-shift-enter` keybinding to send a prompt
immediately, interrupting the agent, effectively being sent in front of
the queue.
Release Notes:
- Agent: Made queueing prompts the default behavior when sending them
while there's an on-going generation.
This PR introduces a project dropdown when working with multiple
folders/projects in one workspace. Here are some interaction details
that I hope improves the UX of working on this scenario significantly:
- The dropdown shows the currently "active" project, which is determined
by:
- Either the file you're currently editing
- Or the file you have just recently switched to
- Some example cases:
- If you are focused on file from project A but switch to project B in
the titlebar, nothing happens. However, as soon as you type on the file
from project A, the title bar will update and your active project will
return to being project A.
- If you're focused on file from project A and change tabs to a file
from project B, the title bar will update, showing project B as the
active one.
- The content you'll see in the branch picker will correspond to the
currently active project
- It's still possible to reach the "Recent Projects" picker through the
project dropdown
- It's possible to do all interactions (trigger dropdown, select active
project, and remove project from workspace) with the keyboard
https://github.com/user-attachments/assets/e2346757-74df-47c5-bf4d-6354623b6f47
Note that this entire UX is valid only for a multiple folder workspace
scenario; nothing changes for the single project case.
Release Notes:
- Workspace: Improved the UX of working with multiple projects in the
same workspace through introducing a project dropdown that more clearly
shows the currently active project as well as allowing you to change it.
This PR changes the keybinding for the `agent::RejectAll` and
`agent::KeepAll` actions. My initial goal was to free up `cmd-shift-n`
to open a new fresh window again, but that was being used for the reject
all action. Given I had to change the reject all, I figured I had to
change the keep all action, too, to keep them consistent.
Release Notes:
- Agent: Removed keybinding conflict (`cmd-shift-n`) between rejecting
all changes in the agent panel vs. opening a new fresh window.
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.
Add a `match_quotes` parameter to the `vim::Matching` action that
controls whether the `%` motion should treat quote characters (', ", `)
as matching pairs.
In Neovim, `%` only matches bracket pairs (([{}])), not quotes. Zed's
existing behavior includes quote matching, which some users prefer. To
preserve backwards compatibility while allowing users to opt into
Neovim's behavior, this PR:
1. Adds an optional `match_quotes` boolean parameter to the
`vim::Matching` action
2. Updates the default vim keymap to use ["vim::Matching", {
"match_quotes": true }], preserving Zed's current behavior
3. Users who prefer Neovim's behavior can rebind `%` in their keymap:
```
{
"context": "VimControl && !menu",
"bindings": {
"%": ["vim::Matching", { "match_quotes": false }]
}
}
```
When `match_quotes` is `false`, the `%` motion will skip over quote
characters and only match brackets/parentheses, matching Neovim's
default behavior.
Release Notes:
- vim: Added match_quotes parameter to the vim::Matching action to control
whether % matches quote characters
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>