From bb7e9a8171d5fa564bc2689050691dd3d7ad34c7 Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Tue, 24 Mar 2026 10:47:26 -0700 Subject: [PATCH] Increase voice space hold timeout to 1s (#15579) Increase the space-hold delay to 1 second before voice capture starts, and mirror the change in tui_app_server. --- codex-rs/tui/src/bottom_pane/chat_composer.rs | 4 ++-- codex-rs/tui_app_server/src/bottom_pane/chat_composer.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codex-rs/tui/src/bottom_pane/chat_composer.rs b/codex-rs/tui/src/bottom_pane/chat_composer.rs index cbaea91fa..7e5831ab5 100644 --- a/codex-rs/tui/src/bottom_pane/chat_composer.rs +++ b/codex-rs/tui/src/bottom_pane/chat_composer.rs @@ -3787,7 +3787,7 @@ impl ChatComposer { #[cfg(not(target_os = "linux"))] fn schedule_space_hold_timer(flag: Arc, frame: Option) { - const HOLD_DELAY_MILLIS: u64 = 500; + const HOLD_DELAY_MILLIS: u64 = 1_000; if let Ok(handle) = Handle::try_current() { let flag_clone = flag; let frame_clone = frame; @@ -3875,7 +3875,7 @@ impl ChatComposer { } } - /// Called when the 500ms space hold timeout elapses. + /// Called when the 1s space hold timeout elapses. /// /// On terminals without key-release reporting, this only transitions into voice capture if we /// observed repeated Space events while pending; otherwise the keypress is treated as a typed diff --git a/codex-rs/tui_app_server/src/bottom_pane/chat_composer.rs b/codex-rs/tui_app_server/src/bottom_pane/chat_composer.rs index 98452410b..d7dc0ae09 100644 --- a/codex-rs/tui_app_server/src/bottom_pane/chat_composer.rs +++ b/codex-rs/tui_app_server/src/bottom_pane/chat_composer.rs @@ -3802,7 +3802,7 @@ impl ChatComposer { #[cfg(not(target_os = "linux"))] fn schedule_space_hold_timer(flag: Arc, frame: Option) { - const HOLD_DELAY_MILLIS: u64 = 500; + const HOLD_DELAY_MILLIS: u64 = 1_000; if let Ok(handle) = Handle::try_current() { let flag_clone = flag; let frame_clone = frame; @@ -3890,7 +3890,7 @@ impl ChatComposer { } } - /// Called when the 500ms space hold timeout elapses. + /// Called when the 1s space hold timeout elapses. /// /// On terminals without key-release reporting, this only transitions into voice capture if we /// observed repeated Space events while pending; otherwise the keypress is treated as a typed