mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Open new sessions directly from the command center (#45255)
## What changed - Replace the inline task composer with a session list: `n` opens a blank session in the selected checkout without sending an initial turn or interrupting running agents. - Use single-letter action shortcuts and `Enter` to open a session. `Esc` cancels search or rename without closing the list; `Ctrl+C` quits from the list. - Load destination settings for new sessions while carrying over explicit permission choices. Retain blank sessions and their drafts across navigation until the first turn. ## Testing Update tests and snapshots for command center navigation, shortcuts, blank draft restoration, destination defaults, permission carryover, and directory trust. GitOrigin-RevId: bddd04fdbe6ac2f5b7bd70293fd04f673b97ba02
This commit is contained in:
1 parent
16537b20a5
commit
516f2780fd
67 files changed
+1145
-1744
No files matched your search
@@ -2,26 +2,10 @@
|
||||
//!
|
||||
//! Only local-daemon sessions enable this shortcut. Draft contents, transient input surfaces,
|
||||
//! and explicit editor remaps take precedence over navigation.
|
||||
//! The dashboard can also leave an empty editor with Right under the same input guards.
|
||||
|
||||
use super::*;
|
||||
|
||||
impl ChatComposer {
|
||||
pub(crate) fn can_leave_empty_prompt_with_right(&self) -> bool {
|
||||
let move_right = if self.draft.textarea.is_vim_normal_mode() {
|
||||
&self.vim_normal_keymap.move_right
|
||||
} else {
|
||||
&self.editor_keymap.move_right
|
||||
};
|
||||
move_right.is_pressed(KeyCode::Right.into())
|
||||
&& self.has_focus
|
||||
&& self.draft.input_enabled
|
||||
&& self.is_empty()
|
||||
&& !self.is_in_paste_burst()
|
||||
&& !self.popup_active()
|
||||
&& !self.draft.textarea.is_vim_operator_pending()
|
||||
}
|
||||
|
||||
pub(crate) fn set_agents_navigation_enabled(&mut self, enabled: bool) {
|
||||
self.agents_navigation_enabled = enabled;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
//! Offline editing and event-channel rebinding retain the draft in place.
|
||||
//! Offline editing retains the draft in place.
|
||||
//! Paste Enter handling is shared with normal submission so buffered newlines survive both paths.
|
||||
|
||||
use super::*;
|
||||
|
||||
impl ChatComposer {
|
||||
/// Rebind retained editors after the app replaces its event channel.
|
||||
pub(crate) fn set_app_event_sender(&mut self, sender: AppEventSender) {
|
||||
self.app_event_tx = sender;
|
||||
}
|
||||
|
||||
/// Preserve Enter inside a paste burst without attempting submission.
|
||||
pub(crate) fn handle_paste_enter(&mut self, now: Instant) -> bool {
|
||||
let in_slash_context = self.slash_commands_enabled()
|
||||
|
||||
Reference in new issue
Block a user