From 9f45d477e513eb9af9a18298738efc91529904ba Mon Sep 17 00:00:00 2001 From: easong-openai Date: Fri, 1 Aug 2025 04:34:40 -0700 Subject: [PATCH] comments --- codex-rs/tui/src/bottom_pane/chat_composer.rs | 6 ------ codex-rs/tui/src/bottom_pane/command_popup.rs | 1 - 2 files changed, 7 deletions(-) diff --git a/codex-rs/tui/src/bottom_pane/chat_composer.rs b/codex-rs/tui/src/bottom_pane/chat_composer.rs index bdd8d4bee9..1e9faeec70 100644 --- a/codex-rs/tui/src/bottom_pane/chat_composer.rs +++ b/codex-rs/tui/src/bottom_pane/chat_composer.rs @@ -43,9 +43,6 @@ pub(crate) struct ChatComposer<'a> { ctrl_c_quit_hint: bool, use_shift_enter_hint: bool, dismissed_file_popup_token: Option, - // When set, suppress reopening the slash-command popup while the first-line - // '/token' remains equal to this value. Cleared when the first line no longer - // starts with '/'. dismissed_command_popup_token: Option, current_file_query: Option, pending_pastes: Vec<(String, String)>, @@ -222,8 +219,6 @@ impl ChatComposer<'_> { (InputResult::None, true) } Input { key: Key::Esc, .. } => { - // Hide popup without modifying text. Remember current '/token' so - // we don't immediately reopen until the token changes. let first_line = self .textarea .lines() @@ -612,7 +607,6 @@ impl ChatComposer<'_> { .unwrap_or(""); let input_starts_with_slash = first_line.starts_with('/'); - // Determine the current '/token' on the first line (may be empty). let current_cmd_token: Option = if input_starts_with_slash { if let Some(stripped) = first_line.strip_prefix('/') { let token = stripped.trim_start(); diff --git a/codex-rs/tui/src/bottom_pane/command_popup.rs b/codex-rs/tui/src/bottom_pane/command_popup.rs index cb9ff38cf1..d50f60a306 100644 --- a/codex-rs/tui/src/bottom_pane/command_popup.rs +++ b/codex-rs/tui/src/bottom_pane/command_popup.rs @@ -124,7 +124,6 @@ impl CommandPopup { self.selected_idx = Some(idx + 1); } Some(_idx_last) => { - // Wrap around when moving down from the last item. self.selected_idx = Some(0); } None => {