forked from zed-industries/zed
-
Notifications
You must be signed in to change notification settings - Fork 0
Draft
Add command to pool all open tabs into a multibuffer #1
Conversation
Copilot
AI
changed the title
(削除) [WIP] Add command to pool all open tabs into a new multibuffer (削除ここまで)
(追記) Add command to pool all open tabs into a multibuffer (追記ここまで)
Oct 11, 2025
raulk
commented
Oct 11, 2025
Owner
@copilot can you check if this could be built as an extension instead?
Author
@copilot can you check if this could be built as an extension instead?
Unfortunately, this cannot be built as an extension with the current extension API. Extensions in Zed are limited to:
- Language servers
- Debuggers
- Themes/icon themes
- Slash commands (for assistant)
- MCP servers
The extension API (defined in WIT interfaces) does not currently expose:
- Workspace-level action registration
- Access to open editors or buffers
- Multibuffer creation/manipulation
- Workspace item enumeration
This feature requires direct access to the editor and workspace APIs, which are only available to core Zed code. The implementation had to be placed in crates/editor/src/editor.rs where it has access to:
workspace.items_of_type::<Editor>(cx)to enumerate editorseditor.buffer().as_singleton()to access buffersEditor::open_locations_in_multibuffer()to create the multibuffer
If you'd like to make features like this extensible in the future, the extension API would need to be enhanced to support workspace commands and provide access to workspace items.
Co-authored-by: raulk <1101242+raulk@users.noreply.github.com>
Co-authored-by: raulk <1101242+raulk@users.noreply.github.com>
raulk
force-pushed
the
copilot/add-multibuffer-command
branch
from
October 29, 2025 18:40
6ba81d3 to
51839ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Implements a new command
PoolOpenTabsIntoMultibufferthat collects all open editor tabs and displays them together in a single multibuffer view.Problem
Users working with multiple related files often need to view or search across all open tabs simultaneously. Previously, there was no built-in way to consolidate all open tabs into a single view.
Solution
Added a new workspace command that:
Usage
Users can invoke this command from the Command Palette (Cmd/Ctrl+Shift+P):
A new editor tab will appear showing all open files' contents with headers indicating each filename.
Implementation Details
The implementation follows the same pattern as the existing
OpenSelectionsInMultibuffercommand and reuses theopen_locations_in_multibufferinfrastructure that's already used by search results and other features.Changes:
crates/editor/src/actions.rscrates/editor/src/editor.rsThe implementation is minimal (34 lines), non-breaking, and follows existing code patterns in the editor.
Closes #<issue_number>
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.