agent: Make agent::addSelectionToThread use current line when no selection (#48045)
Peter Tripp
and
Bennet Bo Fenner
created
When there is no selection, make `cmd->` (`agent::addSelectionToThread`)
use the current line containing the cursor instead of doing nothing.
Supports both Zed Agent and Zed Assistant.
Works with multiple-cursors and a mix of selections and cursors.
Authored by Claude Opus 4.5, tested by me.
Release Notes:
- agent: Make `agent::addSelectionToThread` (`cmd->`) use the current
line of the cursor when there is no selection.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>