mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Use the shared composer in the agent command center (#42428)
## What changed - Replace the command center's single-line new-task input with the shared chat composer, including multiline editing, paste handling, Vim mode, configured keybindings, cursor behavior, and input validation. - Keep task drafts and editor state across dashboard refreshes and reconnects while separating composer focus from list, search, and rename actions. - Preserve whitespace in dispatched task prompts, block submission while offline, and restore unsent prompts after dispatch failures when the composer is still available. ## Testing - Add coverage for focus routing, draft retention, multiline pastes, custom keybindings, Vim mode, offline editing, failed-dispatch recovery, and responsive rendering. GitOrigin-RevId: a609ae95d497cbae0ebcac4cdcc50fe49d74832a
This commit is contained in:
1 parent
cac96cd7b1
commit
62f553bfd0
20 files changed
+717
-145
No files matched your search
@@ -1,10 +1,16 @@
|
||||
//! Offline editing retains the draft, with shared paste Enter handling for submission.
|
||||
//! Offline editing and event-channel rebinding retain 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(super) fn handle_paste_enter(&mut self, now: Instant) -> bool {
|
||||
pub(crate) fn handle_paste_enter(&mut self, now: Instant) -> bool {
|
||||
let in_slash_context = self.slash_commands_enabled()
|
||||
&& !self.draft.is_bash_mode
|
||||
&& (matches!(self.popups.active, ActivePopup::Command(_))
|
||||
|
||||
Reference in new issue
Block a user