diff options
| author | Adam <[email protected]> | 2025-12-16 13:34:22 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-16 15:10:43 -0600 |
| commit | 5eeba76bc52668e7d184249d5a2fbd7ad36c8ea7 (patch) | |
| tree | d27f3b08c961bc3f8b5e1ce6e85e1fab5a0fd356 /packages | |
| parent | a2c91ebc32dba43004aba31adad2b54efcf1b34a (diff) | |
| download | opencode-5eeba76bc52668e7d184249d5a2fbd7ad36c8ea7.tar.gz opencode-5eeba76bc52668e7d184249d5a2fbd7ad36c8ea7.zip | |
fix: defensive audio init
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/desktop/src/context/notification.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/desktop/src/context/notification.tsx b/packages/desktop/src/context/notification.tsx index d2c5bae4c..5ca813448 100644 --- a/packages/desktop/src/context/notification.tsx +++ b/packages/desktop/src/context/notification.tsx @@ -68,7 +68,9 @@ export const { use: useNotification, provider: NotificationProvider } = createSi const match = Binary.search(syncStore.session, sessionID, (s) => s.id) const isChild = match.found && syncStore.session[match.index].parentID if (isChild) break - idlePlayer?.play() + try { + idlePlayer?.play() + } catch {} setStore("list", store.list.length, { ...base, type: "turn-complete", @@ -84,7 +86,9 @@ export const { use: useNotification, provider: NotificationProvider } = createSi const isChild = match.found && syncStore.session[match.index].parentID if (isChild) break } - errorPlayer?.play() + try { + errorPlayer?.play() + } catch {} setStore("list", store.list.length, { ...base, type: "error", |
