Files
codex/codex-rs/tui/src/onboarding/keys.rs
T
alexsong-oai f1a6f7c9b3 Add Amazon Bedrock setup to TUI onboarding (#40679)
## What changed

- Add a feature-gated Amazon Bedrock option to eligible TUI sign-in flows.
- Discover existing AWS profiles and environment credentials, with manual setup for profiles, access keys, environment variables, and Bedrock API keys.
- Collect the AWS Region, mask secrets during entry, persist the selected Bedrock configuration through the app server, and restart the embedded server when the provider changes.

## Testing

- Cover wizard eligibility, sign-in option rendering, credential discovery ordering, region entry, and secret masking.

GitOrigin-RevId: 0a49afb6aca442b88e8448efa80336777848f4ac
2026-08-25 19:30:21 +00:00

41 lines
1.4 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 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),
),
];