# agent_ui: Add adjustments to terminal selection as context \(\#47950\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/263e0004cefedc7cbdde24d24b971a5e03e41a60)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 263e0004cefedc7cbdde24d24b971a5e03e41a60

Requested commit: 263e0004cefedc7cbdde24d24b971a5e03e41a60

Commit: 263e0004cefedc7cbdde24d24b971a5e03e41a60

Tree: 2c37711179953bad2499ba4f8af18ebb78145bbe

Author: Danilo Leal

Committer: GitHub

## Message

```
agent_ui: Add adjustments to terminal selection as context (#47950)

Follow up to https://github.com/zed-industries/zed/pull/47637

- Removes the requirement for the terminal to be focused to use the
`cmd->` keybinding. This way, we match the behavior of buffer selections
and you can always add what's selected in the terminal inside the agent
panel
- Add number of lines selected in the mention button as well
- Make the "Selection" menu item inside the "Add Context" menu also
observe terminal selections

<img width="420" height="254" alt="Screenshot 2026-01-29 at 1  36@2x"
src="https://github.com/user-attachments/assets/25d2eb00-096f-44d9-8882-273932ca43e4"
/>

Release Notes:

- Agent: Add number of liners selected in the terminal context mention
```

## Parents

- [ad24b3f0a0a71ce0cb324a235c1f050205a2fa6b](https://git.cafe/gitcafe/zed/commit/ad24b3f0a0a71ce0cb324a235c1f050205a2fa6b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/263e0004cefedc7cbdde24d24b971a5e03e41a60?format=markdown)
