feat(ui): added wave animation for voice mode (#26284)

This commit is contained in:
Dev Randalpura
2026-05-01 12:56:05 -05:00
committed by GitHub
parent f496354884
commit b14a29efa2
3 changed files with 63 additions and 49 deletions
@@ -23,6 +23,7 @@ import {
ScrollableList,
type ScrollableListRef,
} from './shared/ScrollableList.js';
import { ListeningIndicator } from './ListeningIndicator.js';
import { HalfLinePaddedBox } from './shared/HalfLinePaddedBox.js';
import {
type TextBuffer,
@@ -1800,7 +1801,12 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
useBackgroundColor={useBackgroundColor}
>
<Box flexGrow={1} flexDirection="row" paddingX={1}>
{isVoiceModeEnabled && <Text color={theme.text.accent}>🎤 </Text>}
{isVoiceModeEnabled &&
(isRecording ? (
<ListeningIndicator color={theme.text.accent} />
) : (
<Text color={theme.text.accent}>🎤 </Text>
))}
<Text
color={statusColor ?? theme.text.accent}
aria-label={statusText || undefined}
@@ -1825,12 +1831,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
)}{' '}
</Text>
<Box flexGrow={1} flexDirection="column" ref={innerBoxRef}>
{isRecording && (
<Box flexDirection="row" marginBottom={0}>
<Text color={theme.status.success}>Listening...</Text>
</Box>
)}
{buffer.text.length === 0 && !isRecording ? (
{buffer.text.length === 0 ? (
effectivePlaceholder ? (
showCursor ? (
<Text