mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Move voice controls into a dedicated composer strip (#43683)
## Why Voice controls replaced the normal footer and could be truncated at narrow widths. Give them dedicated space while keeping the status line visible. ## What changed - Render voice status, `ctrl+x` mute/unmute, and `/voice stop` above the draft, with separate microphone and Codex audio history meters. - Keep control positions stable across mute states, prioritize stop at narrow widths, and hide the strip when vertical space is needed for the draft and cursor. - Reflect actual microphone capture in the recording indicator, respect reduced motion, and allow muting during connection once the audio handle is available. - Preserve speaker history when muting the microphone and clear speaker samples when playback is suppressed. ## Testing Add layout and snapshot regressions for voice states, narrow and clipped composers, recording colors, independent audio histories, and status-line visibility. Extend coverage for audio intensity scaling and spoken transcript rendering. GitOrigin-RevId: 9deb432654f4328cc8a577b8896eee088a0a1d5e
This commit is contained in:
1 parent
3caf9f9586
commit
98c7c0415b
13 files changed
+703
-103
No files matched your search
@@ -32,23 +32,6 @@ impl VoiceAmplitudeHistory {
|
||||
self.0.rotate_left(/*mid*/ 1);
|
||||
self.0[3] = level.min(/*other*/ 5);
|
||||
}
|
||||
|
||||
pub(super) fn glyphs(&self) -> String {
|
||||
const LEFT_DOTS: [u32; 6] = [0, 0x40, 0x44, 0x46, 0x47, 0x47];
|
||||
const RIGHT_DOTS: [u32; 6] = [0, 0x80, 0xa0, 0xb0, 0xb8, 0xb8];
|
||||
|
||||
self.0
|
||||
.chunks_exact(/*chunk_size*/ 2)
|
||||
.map(|levels| {
|
||||
char::from_u32(0x2800 | LEFT_DOTS[levels[0]] | RIGHT_DOTS[levels[1]])
|
||||
.unwrap_or('\u{2800}')
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub(super) fn peak(&self) -> usize {
|
||||
self.0.iter().copied().max().unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in new issue
Block a user