Skip to content

Commit d773d27

Browse files
committed
Voice input can't go into code editor
1 parent 63143d2 commit d773d27

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

templates/js/voice.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,15 @@ function stopMic() {
7272
}
7373

7474
function insertVoiceText(text) {
75-
// If code editor is focused, redirect voice to chat panel instead
75+
// In interview mode, always route to chat
76+
if (isActiveTabInterview && isActiveTabInterview()) {
77+
showChatPanel();
78+
const adHoc = document.getElementById('adHocChatInput');
79+
adHoc.value += (adHoc.value ? ' ' : '') + text;
80+
adHoc.focus();
81+
return;
82+
}
83+
// If code editor is focused, redirect voice to chat panel
7684
if (lastFocusedEditorKey && editors[lastFocusedEditorKey]) {
7785
const ed = editors[lastFocusedEditorKey];
7886
if (ed.hasTextFocus()) {

0 commit comments

Comments
 (0)