diff --git a/Frontend/app.vue b/Frontend/app.vue index 8d180ff..7e1b70c 100644 --- a/Frontend/app.vue +++ b/Frontend/app.vue @@ -852,8 +852,10 @@ async function startPilotMeter(stream: MediaStream) { function appendPilotTranscript(text: string) { const next = text.trim(); - if (!next) return; - pilotInput.value = pilotInput.value.trim() ? `${pilotInput.value.trim()} ${next}` : next; + if (!next) return ""; + const merged = pilotInput.value.trim() ? `${pilotInput.value.trim()} ${next}` : next; + pilotInput.value = merged; + return merged; } function getAudioContextCtor(): typeof AudioContext { @@ -1003,11 +1005,11 @@ async function startPilotRecording() { if (audioBlob.size > 0) { const transcript = await transcribeRecordedPilotAudio(audioBlob); if (!transcript) return; - if (mode === "send" && !pilotSending.value) { - await sendPilotText(transcript); + const mergedText = appendPilotTranscript(transcript); + if (mode === "send" && !pilotSending.value && mergedText.trim()) { + await sendPilotText(mergedText); return; } - appendPilotTranscript(transcript); } }; @@ -2551,7 +2553,6 @@ async function decideFeedCard(card: FeedCard, decision: "accepted" | "rejected") v-model="pilotInput" class="pilot-input-textarea" :placeholder="pilotRecording ? 'Recording... speak, then press mic to fill or send to submit' : 'Type a message for Pilot...'" - :disabled="pilotTranscribing" @keydown.enter="handlePilotComposerEnter" />