Add host cycling and saved defaults for new TUI conversations (#59007)

## What changed

- With multi-backend support enabled, show the current host before the first submission and use `leader b` to cycle through available connections. Expose the shortcut as `tui.keymap.global.change_host`.
- Preserve the conversation name and composer draft, including cursor position, attachments, pending pastes, and literal versus shell-command interpretation of `!`.
- Save explicit host choices in user-only `tui.default_hosts`, scoped to the local project and user identity. Use the saved host for new conversations, falling back to the first available connection when it is unavailable.
- Prepare the destination and check directory trust before replacing the current conversation. Block switching during voice calls and active turns, and remove replaced blank conversations from the session overview.

## Testing

Add coverage for shortcut visibility and remapping, draft and name preservation, project/user preference isolation, unavailable-host fallback, destination trust and startup failures, and voice-call guards.

GitOrigin-RevId: def7b088951336bec8fe3962954fba9b861f91c6
This commit is contained in:
Benjamin Carlsson
2026-11-02 23:19:03 +00:00
committed by copyberry
parent 857415f7f2
commit 26f73fba8f
49 changed files with 1273 additions and 118 deletions
+5 -1
View File
@@ -822,6 +822,7 @@ mod tests {
fn fast_mode_action_filter() -> KeymapActionFilter {
KeymapActionFilter {
fast_mode_enabled: true,
..Default::default()
}
}
@@ -899,7 +900,10 @@ mod tests {
let params = build_keymap_picker_params_with_filter(
&runtime,
&TuiKeymap::default(),
fast_mode_action_filter(),
KeymapActionFilter {
multi_backend_enabled: true,
fast_mode_enabled: true,
},
);
let all_tab = selection_tab(&params, KEYMAP_ALL_TAB_ID);