Skip to content

Commit 1c76eba

Browse files
committed
merge: resolve conflicts with main, re-remove showTranscriptionPreview
Main re-introduced showTranscriptionPreview in useSettings, settingsStore, and SettingsPage — removed again since the preview feature was replaced by the unified provider layout in this branch.
2 parents 6439096 + 17cf401 commit 1c76eba

20 files changed

Lines changed: 909 additions & 28 deletions

main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,9 @@ if (gotSingleInstanceLock) {
11471147
if (windowManager && isLiveWindow(windowManager.agentWindow)) {
11481148
windowManager.agentWindow.destroy();
11491149
}
1150+
if (windowManager && isLiveWindow(windowManager.transcriptionPreviewWindow)) {
1151+
windowManager.transcriptionPreviewWindow.destroy();
1152+
}
11501153
if (hotkeyManager) {
11511154
hotkeyManager.unregisterAll();
11521155
} else {

preload.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,28 @@ contextBridge.exposeInMainWorld("electronAPI", {
609609
getAgentWindowBounds: () => ipcRenderer.invoke("get-agent-window-bounds"),
610610
setAgentWindowBounds: (x, y, width, height) =>
611611
ipcRenderer.invoke("set-agent-window-bounds", x, y, width, height),
612+
onPreviewText: registerListener("preview-text", (callback) => (_event, text) => callback(text)),
613+
onPreviewAppend: registerListener(
614+
"preview-append",
615+
(callback) => (_event, text) => callback(text)
616+
),
617+
onPreviewHold: registerListener(
618+
"preview-hold",
619+
(callback) => (_event, payload) => callback(payload)
620+
),
621+
onPreviewResult: registerListener(
622+
"preview-result",
623+
(callback) => (_event, payload) => callback(payload)
624+
),
625+
onPreviewHide: registerListener("preview-hide", (callback) => () => callback()),
626+
startDictationPreview: (opts) => ipcRenderer.invoke("start-dictation-preview", opts),
627+
stopDictationPreview: (opts) => ipcRenderer.invoke("stop-dictation-preview", opts),
628+
dismissDictationPreview: () => ipcRenderer.invoke("dismiss-dictation-preview"),
629+
completeDictationPreview: (payload) => ipcRenderer.invoke("complete-dictation-preview", payload),
630+
hideDictationPreview: () => ipcRenderer.invoke("hide-dictation-preview"),
631+
resizeTranscriptionPreviewWindow: (width, height) =>
632+
ipcRenderer.invoke("resize-transcription-preview-window", width, height),
633+
sendDictationPreviewAudio: (data) => ipcRenderer.send("dictation-preview-audio", data),
612634
acquireRecordingLock: (pipeline) => ipcRenderer.invoke("acquire-recording-lock", pipeline),
613635
releaseRecordingLock: (pipeline) => ipcRenderer.invoke("release-recording-lock", pipeline),
614636

0 commit comments

Comments
 (0)