@@ -32,29 +32,21 @@ export const MicrophoneButton: React.FC<MicrophoneButtonProps> = ({
3232} ) => {
3333 const { t } = useTranslation ( )
3434
35- // kilocode_change: Check STT availability
3635 const checkAvailability = useCallback ( ( ) => {
3736 vscode . postMessage ( { type : "stt:checkAvailability" } )
3837 } , [ ] )
3938
40- // kilocode_change: Check availability on mount
4139 useEffect ( ( ) => {
42- checkAvailability ( )
40+ checkAvailability ( ) // Check availability on mount
4341 } , [ checkAvailability ] )
4442
45- // kilocode_change: Listen for status response
4643 useEvent ( "message" , ( event : MessageEvent ) => {
4744 const message : ExtensionMessage = event . data
4845 if ( message . type === "stt:statusResponse" && message . speechToTextStatus ) {
4946 onStatusChange ?.( message . speechToTextStatus )
5047 }
5148 } )
5249
53- // kilocode_change: Check availability on hover
54- const handleMouseEnter = useCallback ( ( ) => {
55- checkAvailability ( )
56- } , [ checkAvailability ] )
57-
5850 const defaultTooltip = isRecording
5951 ? t ( "kilocode:speechToText.stopRecording" )
6052 : t ( "kilocode:speechToText.startRecording" )
@@ -66,7 +58,7 @@ export const MicrophoneButton: React.FC<MicrophoneButtonProps> = ({
6658 isRecording ? t ( "kilocode:speechToText.stopRecording" ) : t ( "kilocode:speechToText.startRecording" )
6759 }
6860 onClick = { onClick }
69- onMouseEnter = { handleMouseEnter }
61+ onMouseEnter = { checkAvailability }
7062 className = { cn (
7163 "relative inline-flex items-center justify-center" ,
7264 "bg-transparent border-none p-1.5" ,
0 commit comments