mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Merge 34e6280ec6 into sapling-pr-archive-bolinfest
This commit is contained in:
@@ -1633,7 +1633,7 @@ impl ChatWidget {
|
||||
description,
|
||||
is_current,
|
||||
actions,
|
||||
dismiss_on_select: true,
|
||||
dismiss_on_select: false,
|
||||
..Default::default()
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1026,6 +1026,29 @@ fn model_reasoning_selection_popup_snapshot() {
|
||||
assert_snapshot!("model_reasoning_selection_popup", popup);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reasoning_popup_escape_returns_to_model_popup() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual();
|
||||
|
||||
chat.config.model = "gpt-5".to_string();
|
||||
chat.open_model_popup();
|
||||
|
||||
let presets = builtin_model_presets(None)
|
||||
.into_iter()
|
||||
.filter(|preset| preset.model == "gpt-5-codex")
|
||||
.collect::<Vec<_>>();
|
||||
chat.open_reasoning_popup("gpt-5-codex".to_string(), presets);
|
||||
|
||||
let before_escape = render_bottom_popup(&chat, 80);
|
||||
assert!(before_escape.contains("Select Reasoning Level"));
|
||||
|
||||
chat.handle_key_event(KeyEvent::new(KeyCode::Esc, KeyModifiers::NONE));
|
||||
|
||||
let after_escape = render_bottom_popup(&chat, 80);
|
||||
assert!(after_escape.contains("Select Model"));
|
||||
assert!(!after_escape.contains("Select Reasoning Level"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn exec_history_extends_previous_when_consecutive() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual();
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
"private": true,
|
||||
"description": "Tools for repo-wide maintenance.",
|
||||
"scripts": {
|
||||
"format": "prettier --check *.json *.md .github/workflows/*.yml **/*.js",
|
||||
"format:fix": "prettier --write *.json *.md .github/workflows/*.yml **/*.js"
|
||||
"format": "prettier --check *.json *.md docs/*.md .github/workflows/*.yml **/*.js",
|
||||
"format:fix": "prettier --write *.json *.md docs/*.md .github/workflows/*.yml **/*.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.5.3"
|
||||
|
||||
Reference in New Issue
Block a user