Skip to content

Commit ae64c50

Browse files
committed
fix: lint errors in RecordingOverlay
1 parent d0dda87 commit ae64c50

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/browser/components/ChatInput/RecordingOverlay.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ export const RecordingOverlay: React.FC<RecordingOverlayProps> = (props) => {
7575
{isRecording ? (
7676
<>
7777
<span className="opacity-70">space</span> send ·{" "}
78-
<span className="opacity-70">{formatKeybind(KEYBINDS.TOGGLE_VOICE_INPUT)}</span> review ·{" "}
79-
<span className="opacity-70">esc</span> cancel
78+
<span className="opacity-70">{formatKeybind(KEYBINDS.TOGGLE_VOICE_INPUT)}</span> review
79+
· <span className="opacity-70">esc</span> cancel
8080
</>
8181
) : (
8282
"Transcribing..."
@@ -104,7 +104,7 @@ const SlidingWaveform: React.FC<SlidingWaveformProps> = (props) => {
104104
// Audio analysis refs (persist across renders)
105105
const audioContextRef = useRef<AudioContext | null>(null);
106106
const analyserRef = useRef<AnalyserNode | null>(null);
107-
const samplesRef = useRef<number[]>(new Array(NUM_SAMPLES).fill(0));
107+
const samplesRef = useRef<number[]>(new Array<number>(NUM_SAMPLES).fill(0));
108108
const animationFrameRef = useRef<number>(0);
109109
const lastSampleTimeRef = useRef<number>(0);
110110

@@ -142,11 +142,11 @@ const SlidingWaveform: React.FC<SlidingWaveformProps> = (props) => {
142142
analyserRef.current = analyser;
143143

144144
// Reset samples when starting
145-
samplesRef.current = new Array(NUM_SAMPLES).fill(0);
145+
samplesRef.current = new Array<number>(NUM_SAMPLES).fill(0);
146146
lastSampleTimeRef.current = performance.now();
147147

148148
return () => {
149-
audioContext.close();
149+
void audioContext.close();
150150
audioContextRef.current = null;
151151
analyserRef.current = null;
152152
};
@@ -171,8 +171,8 @@ const SlidingWaveform: React.FC<SlidingWaveformProps> = (props) => {
171171

172172
// Calculate RMS amplitude (0-1 range)
173173
let sum = 0;
174-
for (let i = 0; i < dataArray.length; i++) {
175-
const normalized = (dataArray[i] - 128) / 128; // -1 to 1
174+
for (const sample of dataArray) {
175+
const normalized = (sample - 128) / 128; // -1 to 1
176176
sum += normalized * normalized;
177177
}
178178
const rms = Math.sqrt(sum / dataArray.length);

0 commit comments

Comments
 (0)