fix(desktop): harden cancellation, dispose, and lifecycle races across main services
Cancel pending result-popup measure timers on hideResultPopup; track CaptionService aux-model load state, stop deduplication, and refine abort epochs across restarts; forward per-call AbortSignal through VoiceModeService and LlmGateway to LocalLLMService and abort pull streams plus availability polling on dispose; clear aborted response pointers and gate stale mic start errors in VoiceConversationService; guard AudioCaptureService stopping resume against exited SoX processes and cleanup failed starts; abort LocalSTTService downloadModel polling on dispose; and fail closed when desktopCapturer.getSources rejects in caption loopback setup.
This commit is contained in:
parent
4bf0f0df12
commit
fc5d45312c
19 changed files with 922 additions and 94 deletions
|
|
@ -151,4 +151,17 @@ describe('LlmGateway 호출 단위 취소', () => {
|
|||
})
|
||||
expect(l.processText).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('processText_localBackendWithSignal_forwardsPerCallSignalToLocalAdapter', async () => {
|
||||
const controller = new AbortController()
|
||||
const l = local()
|
||||
const gw = createRoutedLlmGateway({
|
||||
getBackend: () => 'local',
|
||||
loadPremium: async () => premium(),
|
||||
getLocal: () => l,
|
||||
})
|
||||
|
||||
await gw.processText('t', 'refine', undefined, undefined, { signal: controller.signal })
|
||||
expect(l.processText).toHaveBeenCalledWith('t', 'refine', undefined, undefined, { signal: controller.signal })
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue