Skip to content

agent_ui: Improve adding selection as context#52860

Merged
danilo-leal merged 3 commits intomainfrom
terminal-selections
Apr 1, 2026
Merged

agent_ui: Improve adding selection as context#52860
danilo-leal merged 3 commits intomainfrom
terminal-selections

Conversation

@danilo-leal
Copy link
Copy Markdown
Member

This PR improves adding selection as context particularly for terminals, making them not depend on open buffers. It also now works adding selection from a terminal that's no in the panel but as a tab.

Also, I'm removing a behavior introduced in #48045 that turned out to be confusing, where the selection keybinding would add as context the content of the current line I'm focused on. I think we shouldn't do this given that a lot of times, particularly when adding a selection from a terminal, I'd also end up adding content from a buffer just because my cursor was previously in there, even without anything selected on it. Saw myself multiple times deleting the unwanted buffer context crease in this case. If the keybinding is about selection, we should only trigger it when there's something selected.ing not do anything if there isn't any selection.

Release Notes:

  • Agent: Improved adding selection as context particularly for terminals, making them not depend on open buffers.

@danilo-leal danilo-leal self-assigned this Mar 31, 2026
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 31, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 31, 2026
@danilo-leal danilo-leal merged commit 06dbce4 into main Apr 1, 2026
41 checks passed
@danilo-leal danilo-leal deleted the terminal-selections branch April 1, 2026 13:30
@zed-zippy zed-zippy bot added the PR state:needs review Used to label PRs that are in need of a post-merge approval label Apr 6, 2026
@MrSubidubi MrSubidubi removed the PR state:needs review Used to label PRs that are in need of a post-merge approval label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants