mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Integrate asynchronous questions into the TUI (#42891)
## What changed - Display questions from live agent messages with a collapsed question count and an expandable answer editor. - Support navigating, answering, queueing, and skipping questions while preserving the main composer draft. Expose question navigation and skip actions in the keymap picker. - Route answers through existing input delivery and consume them only after an accepted send or queue operation. Keep questions editable while disconnected, with delivery and skipping disabled. ## Testing Add tests for answer delivery, queued answers, retained drafts, disconnected editing, Vim undo, buffered input, constrained layouts, and question shortcut descriptions. GitOrigin-RevId: 084b54dceb8c0100aefbf9f0b7897bf8d26eac47
This commit is contained in:
1 parent
6ae8dcf6e1
commit
218e8df926
26 files changed
+765
-34
No files matched your search
@@ -4,6 +4,9 @@ use super::*;
|
||||
|
||||
impl ChatWidget {
|
||||
pub(crate) fn pause_for_disconnect(&mut self) {
|
||||
if let Some(questions) = &mut self.bottom_pane.questions {
|
||||
questions.delivery_enabled = false;
|
||||
}
|
||||
self.input_queue.recovered_queue = true;
|
||||
self.input_queue.suppress_queue_autosend = true;
|
||||
self.set_initial_user_message_submit_suppressed(/*suppressed*/ true);
|
||||
@@ -61,6 +64,9 @@ impl ChatWidget {
|
||||
}
|
||||
|
||||
pub(crate) fn handle_disconnected_key(&mut self, key: KeyEvent) {
|
||||
if self.handle_question_key(key) {
|
||||
return;
|
||||
}
|
||||
if key.kind == KeyEventKind::Press && self.chat_keymap.edit_queued_message.is_pressed(key) {
|
||||
if let Some(composer) = self.pop_latest_queued_composer_state() {
|
||||
self.restore_composer_state(composer);
|
||||
|
||||
Reference in new issue
Block a user