mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
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.
This commit is contained in:
committed by
GitHub
Unverified
parent
66edc347ae
commit
bb7e9a8171
@@ -3787,7 +3787,7 @@ impl ChatComposer {
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
fn schedule_space_hold_timer(flag: Arc<AtomicBool>, frame: Option<FrameRequester>) {
|
||||
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
|
||||
|
||||
@@ -3802,7 +3802,7 @@ impl ChatComposer {
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
fn schedule_space_hold_timer(flag: Arc<AtomicBool>, frame: Option<FrameRequester>) {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user