summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-12-12 06:21:18 -0600
committerAdam <[email protected]>2025-12-12 06:21:31 -0600
commit3f5cd2c4a810168ed03094cbf1d3e51a4b62f261 (patch)
treeb4ad6b5738b5e8e44f22689b2430ac981d0a62dc
parenta160eb76df0e8f28b89440163d4e43848e007424 (diff)
downloadopencode-3f5cd2c4a810168ed03094cbf1d3e51a4b62f261.tar.gz
opencode-3f5cd2c4a810168ed03094cbf1d3e51a4b62f261.zip
fix(desktop): audio stuff
-rw-r--r--packages/desktop/src/context/notification.tsx26
1 files changed, 1 insertions, 25 deletions
diff --git a/packages/desktop/src/context/notification.tsx b/packages/desktop/src/context/notification.tsx
index 4e334126f..744e4fdf3 100644
--- a/packages/desktop/src/context/notification.tsx
+++ b/packages/desktop/src/context/notification.tsx
@@ -25,11 +25,6 @@ type ErrorNotification = NotificationBase & {
export type Notification = TurnCompleteNotification | ErrorNotification
-export type AudioSettings = {
- enabled: boolean
- volume: number
-}
-
export const { use: useNotification, provider: NotificationProvider } = createSimpleContext({
name: "Notification",
init: () => {
@@ -39,10 +34,6 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
const [store, setStore] = makePersisted(
createStore({
list: [] as Notification[],
- audio: {
- enabled: true,
- volume: 1,
- } as AudioSettings,
}),
{
name: "notification.v1",
@@ -64,10 +55,7 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
}
switch (event.type) {
case "session.idle": {
- if (store.audio.enabled) {
- idlePlayer.setVolume(store.audio.volume)
- idlePlayer.play()
- }
+ idlePlayer.play()
const session = event.properties.sessionID
setStore("list", store.list.length, {
...base,
@@ -113,18 +101,6 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
setStore("list", (n) => n.directory === directory, "viewed", true)
},
},
- audio: {
- get settings() {
- return store.audio
- },
- setEnabled(enabled: boolean) {
- setStore("audio", "enabled", enabled)
- },
- setVolume(volume: number) {
- const clamped = Math.max(0, Math.min(1, volume))
- setStore("audio", "volume", clamped)
- },
- },
}
},
})