fix(vscode): address speech-to-text review findings

This commit is contained in:
marius-kilocode
2026-07-07 13:51:22 +02:00
parent 22352124d6
commit 13f00fce14
4 changed files with 12 additions and 6 deletions
@@ -20,7 +20,7 @@ export async function routeInputToolMessage(message: Msg, ctx: Ctx): Promise<boo
if (await routeAutocompleteMessage(message, ctx.post)) return true
if (message.type === "speechToTextPrewarm") {
void prewarmSpeechCapture().catch((err) => console.warn("[Kilo New] Speech capture prewarm failed:", err))
void prewarmSpeechCapture().catch((err: unknown) => console.warn("[Kilo New] Speech capture prewarm failed:", err))
return true
}
@@ -235,10 +235,10 @@ function requireActive(requestId: string): Recording {
}
async function resolveFFmpeg(): Promise<string> {
if (ffmpeg) {
const bin = await ffmpeg
const cached = ffmpeg
if (cached) {
const bin = await cached
if (!path.isAbsolute(bin) || existsSync(bin)) return bin
ffmpeg = undefined
}
const task = findFFmpeg()
@@ -13,6 +13,7 @@ type Props = {
export const SpeechToTextButton: Component<Props> = (props) => {
const unavailable = () => !!props.disabled && props.speech.state() === "idle"
const locked = () => unavailable() || props.speech.state() === "starting"
const busy = () => props.speech.state() === "starting" || props.speech.state() === "transcribing"
const label = () => {
if (props.speech.state() === "starting") return props.label("speechToText.tooltip.starting")
@@ -50,9 +51,9 @@ export const SpeechToTextButton: Component<Props> = (props) => {
variant="ghost"
size="small"
onClick={click}
disabled={unavailable()}
disabled={locked()}
aria-label={label()}
aria-disabled={unavailable() || props.speech.state() === "starting"}
aria-disabled={locked()}
aria-busy={busy()}
aria-pressed={props.speech.state() === "recording"}
class={`prompt-speech-button prompt-speech-button--${props.speech.state()}`}
@@ -654,6 +654,11 @@
}
}
.prompt-speech-button--starting {
cursor: progress;
opacity: 0.7;
}
.prompt-speech-button--recording::after {
content: "";
position: absolute;