Browse Source

wip(desktop): progress

Adam 2 months ago
parent
commit
c36f3b9dbe

+ 3 - 1
packages/desktop/src/context/notification.tsx

@@ -5,6 +5,7 @@ import { useGlobalSDK } from "./global-sdk"
 import { EventSessionError } from "@opencode-ai/sdk/v2"
 import { makeAudioPlayer } from "@solid-primitives/audio"
 import idleSound from "@opencode-ai/ui/audio/staplebops-01.aac"
+import errorSound from "@opencode-ai/ui/audio/error-3.aac"
 
 type NotificationBase = {
   directory?: string
@@ -29,6 +30,7 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
   name: "Notification",
   init: () => {
     const idlePlayer = makeAudioPlayer(idleSound)
+    const errorPlayer = makeAudioPlayer(errorSound)
     const globalSDK = useGlobalSDK()
 
     const [store, setStore] = makePersisted(
@@ -65,8 +67,8 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
           break
         }
         case "session.error": {
+          errorPlayer.play()
           const session = event.properties.sessionID ?? "global"
-          // errorPlayer.play()
           setStore("list", store.list.length, {
             ...base,
             type: "error",

BIN
packages/ui/src/assets/audio/nope-01.aac


BIN
packages/ui/src/assets/audio/nope-02.aac


BIN
packages/ui/src/assets/audio/nope-03.aac


BIN
packages/ui/src/assets/audio/nope-04.aac


BIN
packages/ui/src/assets/audio/nope-05.aac