mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
Add a searchable /config preferences panel to the TUI (#52990)
## What changed - Group preferences into Appearance, Notifications, Input, Sessions, and Text selection tabs, with search and links to existing theme, status line, terminal title, and keyboard editors. - Persist preference changes to the selected local configuration file, apply supported changes immediately, and show save errors, configuration overrides, and restart requirements in the panel. - Add a delayed notification test and controls for notification timing while preserving custom event filters. - Add `tui.copy_on_select_clear_selection`, disabled by default, to clear transcript selection highlights only after confirmed automatic clipboard delivery. - Keep local configuration editors usable while disconnected and prevent held activation keys or buffered input from triggering actions across editor and reconnect transitions. ## Testing Add regression tests and rendering snapshots for panel navigation, search, dependency states, editor handoffs, offline persistence, notification timers, custom filter preservation, and confirmed-copy deselection. GitOrigin-RevId: a16d218046060fcb6e61705a803fcd9297266e6e
This commit is contained in:
@@ -47,6 +47,26 @@ pub(crate) use input::JumpTarget;
|
||||
pub(crate) use input::ViewAction;
|
||||
pub(crate) use layout::ActivityTranscriptLines;
|
||||
|
||||
/// Copy origin plus the deselection policy applied after confirmed delivery.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub(crate) enum SelectionCopy {
|
||||
Explicit,
|
||||
OnSelect { clear_selection: bool },
|
||||
}
|
||||
|
||||
impl SelectionCopy {
|
||||
fn clear_selection(self) -> bool {
|
||||
match self {
|
||||
Self::Explicit => true,
|
||||
Self::OnSelect { clear_selection } => clear_selection,
|
||||
}
|
||||
}
|
||||
|
||||
fn publishes_primary(self) -> bool {
|
||||
matches!(self, Self::OnSelect { .. })
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
enum EntryKey {
|
||||
Cell(usize),
|
||||
@@ -89,6 +109,7 @@ pub(crate) struct TranscriptView {
|
||||
pub(crate) mouse_scroll_speed: f64,
|
||||
pending_mouse_scroll: f64,
|
||||
pub(crate) copy_on_select: bool,
|
||||
pub(crate) copy_on_select_clear_selection: bool,
|
||||
pub(crate) primary_selection: bool,
|
||||
position: Position,
|
||||
follow_control: follow_control::FollowControl,
|
||||
@@ -126,6 +147,7 @@ impl Default for TranscriptView {
|
||||
mouse_scroll_speed: 1.0,
|
||||
pending_mouse_scroll: 0.0,
|
||||
copy_on_select: false,
|
||||
copy_on_select_clear_selection: false,
|
||||
primary_selection: false,
|
||||
position: Position::Latest,
|
||||
follow_control: follow_control::FollowControl::default(),
|
||||
|
||||
Reference in New Issue
Block a user