fix(voice): sync voice-originated pipeline turns to the chat window

A learn-intent conversation driven entirely by voice never reached
ObjectiveValidationCard: the chat window's Zustand store lives in its
own isolated renderer process and only ever updated from its own
direct sessions:route-message calls, never from voice-turn results
handled in the main process. A user doing everything by voice could
never see or confirm their objective.

The main process now opens the chat window and broadcasts the voice
turn (reply/ready/draft) to it whenever intent is 'learn'; the chat
window's store applies it the same way it applies its own responses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-11-01 10:25:48 +01:00
co-authored by Claude Sonnet 5
parent ef0015fc2b
commit 4b45c4a644
6 changed files with 78 additions and 3 deletions
+6
View File
@@ -58,6 +58,12 @@ const api = {
ipcRenderer.on('session-status-changed', handler)
return () => ipcRenderer.removeListener('session-status-changed', handler)
},
onVoiceTurnSynced: (callback: (result: RouteMessageResponse) => void): (() => void) => {
const handler = (_event: Electron.IpcRendererEvent, result: RouteMessageResponse): void =>
callback(result)
ipcRenderer.on('voice-turn-synced', handler)
return () => ipcRenderer.removeListener('voice-turn-synced', handler)
},
onUpdateAvailable: (callback: () => void): (() => void) => {
const handler = (): void => callback()
ipcRenderer.on('update:available', handler)