Add a status line provider picker to /statusline (#61988)

## What changed

- Add a "Choose a statusline plugin" action when status line extensions are enabled. Discover MCP providers, show the current selection, and let users save a provider or return to the default status line.
- Preserve the highlighted row when discovery completes and start reading provider contents only after an explicit selection.
- Keep the item editor open across picker transitions and disconnects, allow switching to the default while offline, and guard transitions against repeated activation keys.
- Limit displayed numeric shortcuts to the first nine selectable rows.

## Testing

Add tests for discovery focus, stale discovery results, explicit reader activation, repeated Enter keys, disconnect handling, and numeric shortcuts. Extend the terminal integration test to switch between the default status line and an MCP provider through the picker.

GitOrigin-RevId: 76a254d7afee3a1b8cfc801617a2176893276e0e
This commit is contained in:
Joe Savona
2026-11-17 07:53:33 +00:00
committed by copyberry
parent 7fb4014d52
commit 568cccd4f5
27 changed files with 751 additions and 41 deletions
+1 -1
View File
@@ -274,7 +274,7 @@ fn layout_band<'a>(
ends.len()
}
fn sanitize_leaf(mut raw: String) -> String {
pub(crate) fn sanitize_leaf(mut raw: String) -> String {
// Directly constructed trees can bypass the wire decoder's text limit.
if raw.len() > MAX_TEXT_BYTES {
raw.truncate(raw.floor_char_boundary(MAX_TEXT_BYTES));