mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
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:
committed by
copyberry
parent
857415f7f2
commit
26f73fba8f
@@ -135,6 +135,8 @@ impl KeybindingsSpec {
|
||||
pub struct TuiGlobalKeymap {
|
||||
/// Prefix for persistent, context-aware shortcut menus.
|
||||
pub leader: Option<KeybindingsSpec>,
|
||||
/// Change where a new conversation runs.
|
||||
pub change_host: Option<KeybindingsSpec>,
|
||||
/// Open the shared agent-session overview.
|
||||
pub open_agents: Option<KeybindingsSpec>,
|
||||
/// Open the transcript overlay.
|
||||
|
||||
@@ -872,6 +872,11 @@ impl QuickDial {
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default, JsonSchema)]
|
||||
#[schemars(deny_unknown_fields)]
|
||||
pub struct Tui {
|
||||
/// Preferred hosts for new conversations, indexed by project and local user identity.
|
||||
/// Read from the user configuration only; values are never endpoints or credentials.
|
||||
#[serde(default)]
|
||||
pub default_hosts: BTreeMap<String, BTreeMap<String, String>>,
|
||||
|
||||
#[serde(default, flatten)]
|
||||
pub notification_settings: TuiNotificationSettings,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user