The open source coding agent.
TypeScript
fix(desktop): audio stuff
Adam3f5cd2c4a810
diff --git a/packages/desktop/src/context/notification.tsx b/packages/desktop/src/context/notification.tsxindex 4e334126f34..744e4fdf3ff 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 } = createSiconst [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.sessionIDsetStore("list", store.list.length, {...base,@@ -113,18 +101,6 @@ export const { use: useNotification, provider: NotificationProvider } = createSisetStore("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)- },- },}},})