mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
## What changed - Add the disabled-by-default `gateway_setup_wizard` feature to let users choose a saved custom gateway during eligible local sign-in onboarding. - Save the selection as `model_provider`, restart the embedded app server with that provider, and complete required primary authentication and gateway OAuth before starting the first chat. - Show gateway loading and configuration errors, browser sign-in links, and an OAuth retry action. Respect provider policy and launch overrides. ## Testing Add coverage for onboarding eligibility, saved gateway selection and persistence, and gateway error and OAuth screens. Add a terminal integration test verifying that the selected gateway receives the first chat with authentication. GitOrigin-RevId: 92bd2da3abd28d6c2274c91b2d7561bf359f0ca0
42 lines
1.5 KiB
Rust
42 lines
1.5 KiB
Rust
//! Fixed shortcuts used before users have had a chance to configure Codex.
|
|
|
|
use crossterm::event::KeyCode;
|
|
use crossterm::event::KeyModifiers;
|
|
|
|
use crate::key_hint;
|
|
use crate::key_hint::KeyBinding;
|
|
|
|
pub(crate) const MOVE_UP: [KeyBinding; 2] = [
|
|
key_hint::plain(KeyCode::Up),
|
|
key_hint::plain(KeyCode::Char('k')),
|
|
];
|
|
pub(crate) const MOVE_DOWN: [KeyBinding; 2] = [
|
|
key_hint::plain(KeyCode::Down),
|
|
key_hint::plain(KeyCode::Char('j')),
|
|
];
|
|
pub(crate) const SELECT_FIRST: [KeyBinding; 2] = [
|
|
key_hint::plain(KeyCode::Char('1')),
|
|
key_hint::plain(KeyCode::Char('y')),
|
|
];
|
|
pub(crate) const SELECT_SECOND: [KeyBinding; 2] = [
|
|
key_hint::plain(KeyCode::Char('2')),
|
|
key_hint::plain(KeyCode::Char('n')),
|
|
];
|
|
pub(crate) const SELECT_THIRD: [KeyBinding; 1] = [key_hint::plain(KeyCode::Char('3'))];
|
|
pub(crate) const SELECT_FOURTH: [KeyBinding; 1] = [key_hint::plain(KeyCode::Char('4'))];
|
|
pub(crate) const CONFIRM: [KeyBinding; 1] = [key_hint::plain(KeyCode::Enter)];
|
|
pub(crate) const CANCEL: [KeyBinding; 1] = [key_hint::plain(KeyCode::Esc)];
|
|
pub(crate) const COPY_LINK: [KeyBinding; 1] = [key_hint::plain(KeyCode::Char('c'))];
|
|
pub(crate) const QUIT: [KeyBinding; 3] = [
|
|
key_hint::plain(KeyCode::Char('q')),
|
|
key_hint::ctrl(KeyCode::Char('c')),
|
|
key_hint::ctrl(KeyCode::Char('d')),
|
|
];
|
|
pub(crate) const TOGGLE_ANIMATION: [KeyBinding; 2] = [
|
|
key_hint::ctrl(KeyCode::Char('.')),
|
|
KeyBinding::new(
|
|
KeyCode::Char('.'),
|
|
KeyModifiers::CONTROL.union(KeyModifiers::SHIFT),
|
|
),
|
|
];
|