Add voice mute shortcut and recording activity indicators (#43651)

## What changed

- Add `Ctrl+X` to toggle the microphone for the active voice session on the current thread, with a footer hint and guards for modals, popups, and repeated key events.
- Show a recording dot in the terminal title's activity indicator while the microphone is listening, respecting title settings and clearing it when capture stops.
- Replace the microphone and speaker bars with compact Braille meters showing four recent amplitude samples.
- Briefly show `heard` when voice input interrupts speech, when animations are enabled.

## Testing

Add regression tests for shortcut routing, amplitude glyphs, interruption acknowledgment, and terminal title lifecycle, plus updated voice footer snapshots.

GitOrigin-RevId: e1dc0c1744667e646e0040e247c5a0409b416075
This commit is contained in:
Benjamin Carlsson authored and copyberry committed 2026-09-08 02:29:17 +00:00
1 parent 6fee98cc85
commit 4b0d9669cc
13 files changed
+774 -290

No files matched your search

+15 -8
View File
@@ -327,7 +327,12 @@ impl ChatWidget {
now: Instant,
) -> Option<String> {
if self.terminal_title_shows_action_required_with_selections(selections) {
return Some(self.action_required_terminal_title_text(selections, now));
let title = self.action_required_terminal_title_text(selections, now);
return Some(if self.realtime_microphone_is_listening() {
format!("● {title}")
} else {
title
});
}
let mut previous = None;
@@ -1001,15 +1006,17 @@ impl ChatWidget {
}
pub(super) fn terminal_title_spinner_text_at(&self, now: Instant) -> Option<String> {
if !self.local_settings.tui.animations {
return None;
let spinner = (self.local_settings.tui.animations
&& self.terminal_title_has_active_progress())
.then(|| self.terminal_title_spinner_frame_at(now));
if self.realtime_microphone_is_listening() {
return Some(match spinner {
Some(frame) => format!("● {frame}"),
None => "●".to_string(),
});
}
if !self.terminal_title_has_active_progress() {
return None;
}
Some(self.terminal_title_spinner_frame_at(now).to_string())
spinner.map(str::to_string)
}
pub(super) fn terminal_title_spinner_frame_at(&self, now: Instant) -> &'static str {