mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
feat(tui): make reasoning shortcuts configurable
This commit is contained in:
+6
-4
@@ -36,8 +36,9 @@ Precedence is applied in this order (highest first):
|
||||
|
||||
### Presets
|
||||
|
||||
- `latest`: moving alias for the newest preset; today `latest -> v3`
|
||||
- `v3`: current defaults, exposing `copy = "ctrl-o"` in the keymap
|
||||
- `latest`: moving alias for the newest preset; today `latest -> v4`
|
||||
- `v4`: current defaults, exposing reasoning shortcuts (`alt-,` / `alt-.`) in the keymap
|
||||
- `v3`: exposes `copy = "ctrl-o"` in the keymap
|
||||
- `v2`: restores `alt-d` as a `delete_forward_word` alias
|
||||
- `v1`: frozen initial configurable keymap defaults
|
||||
|
||||
@@ -50,8 +51,9 @@ TODO(docs): mirror this preset migration note on developers.openai.com.
|
||||
|
||||
- `global`: `open_transcript`, `open_external_editor`, `copy`, `edit_previous_message`,
|
||||
`confirm_edit_previous_message`, `submit`, `queue`, `toggle_shortcuts`,
|
||||
`toggle_vim_mode`
|
||||
- `chat`: `edit_previous_message`, `confirm_edit_previous_message`
|
||||
`toggle_vim_mode`, `reasoning_down`, `reasoning_up`
|
||||
- `chat`: `edit_previous_message`, `confirm_edit_previous_message`,
|
||||
`reasoning_down`, `reasoning_up`
|
||||
- `composer`: `submit`, `queue`, `toggle_shortcuts`
|
||||
- `editor`: `insert_newline`, `move_left`, `move_right`, `move_up`, `move_down`,
|
||||
`move_word_left`, `move_word_right`, `move_line_start`, `move_line_end`,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
[tui.keymap]
|
||||
# Preset alias for built-in defaults.
|
||||
# "latest" currently points to "v3".
|
||||
# "latest" currently points to "v4".
|
||||
preset = "latest"
|
||||
|
||||
[tui.keymap.global]
|
||||
@@ -42,11 +42,17 @@ toggle_shortcuts = ["?", "shift-?"]
|
||||
# Toggle Vim mode for the composer input.
|
||||
# Empty list keeps this unbound by default.
|
||||
toggle_vim_mode = []
|
||||
# Lower active reasoning level when possible.
|
||||
reasoning_down = "alt-,"
|
||||
# Raise active reasoning level when possible.
|
||||
reasoning_up = "alt-."
|
||||
|
||||
[tui.keymap.chat]
|
||||
# Overrides [tui.keymap.global] for chat-only behavior.
|
||||
edit_previous_message = "esc"
|
||||
confirm_edit_previous_message = "enter"
|
||||
reasoning_down = "alt-,"
|
||||
reasoning_up = "alt-."
|
||||
|
||||
[tui.keymap.composer]
|
||||
# Overrides [tui.keymap.global] for composer behavior.
|
||||
|
||||
@@ -7,14 +7,14 @@ For runtime behavior, safety invariants, and testing guidance, see
|
||||
## Preset behavior
|
||||
|
||||
- `latest` is an alias to the newest shipped preset.
|
||||
- Today, `latest -> v3`.
|
||||
- Today, `latest -> v4`.
|
||||
- To keep stable behavior over time, pin `preset = "v1"`.
|
||||
|
||||
## Precedence
|
||||
|
||||
1. `tui.keymap.<context>.<action>`
|
||||
2. `tui.keymap.global.<action>` (chat/composer fallback actions only)
|
||||
3. Preset default (`v3` today)
|
||||
3. Preset default (`v4` today)
|
||||
|
||||
## Default `v1` Compatibility Notes
|
||||
|
||||
@@ -43,11 +43,15 @@ For runtime behavior, safety invariants, and testing guidance, see
|
||||
- `queue`: queue current draft while a task is running
|
||||
- `toggle_shortcuts`: toggle composer shortcut overlay
|
||||
- `toggle_vim_mode`: toggle Vim mode for composer input
|
||||
- `reasoning_down`: lower active reasoning level when possible
|
||||
- `reasoning_up`: raise active reasoning level when possible
|
||||
|
||||
### `chat`
|
||||
|
||||
- `edit_previous_message`: chat override for edit-previous flow
|
||||
- `confirm_edit_previous_message`: chat override for edit confirmation
|
||||
- `reasoning_down`: chat override for lowering active reasoning level
|
||||
- `reasoning_up`: chat override for raising active reasoning level
|
||||
|
||||
### `composer`
|
||||
|
||||
|
||||
+2
-2
@@ -85,8 +85,8 @@ at `https://github.com/openai/codex/blob/main/docs/default-keymap.toml`.
|
||||
Preset semantics:
|
||||
|
||||
1. `latest` is an alias to the newest shipped preset.
|
||||
2. `v3` is the current baseline; `v1` and `v2` are frozen for historical behavior.
|
||||
3. Today, `latest -> v3`.
|
||||
2. `v4` is the current baseline; `v1`, `v2`, and `v3` are frozen for historical behavior.
|
||||
3. Today, `latest -> v4`.
|
||||
|
||||
User guidance:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user