diff --git a/pi/files.linux/agent/settings.json b/pi/files.linux/agent/settings.json index cb327f1..611baf0 100644 --- a/pi/files.linux/agent/settings.json +++ b/pi/files.linux/agent/settings.json @@ -1,5 +1,5 @@ { - "lastChangelogVersion": "0.65.2", + "lastChangelogVersion": "0.66.1", "defaultProvider": "openai-codex", "defaultModel": "gpt-5.3-codex", "defaultThinkingLevel": "high", diff --git a/pi/files/agent/extensions/peon.ts b/pi/files/agent/extensions/peon.ts index 8d87d4d..f9fed05 100644 --- a/pi/files/agent/extensions/peon.ts +++ b/pi/files/agent/extensions/peon.ts @@ -308,9 +308,24 @@ function pickSound(categoryConfig: CategoryConfig, category: Category): Sound | // ============ SOUND PLAYBACK ============ function play(category: Category): void { - if (config.muted) return; if (!config.enabledCategories[category]) return; + const notificationMessages: Record = { + "session.start": null, + "task.acknowledge": null, + "task.complete": { title: "Pi", message: "Task complete" }, + "task.error": { title: "Pi", message: "Task failed" }, + "input.required": { title: "Pi", message: "Input required" }, + "resource.limit": { title: "Pi", message: "Rate limited" }, + }; + + const notification = notificationMessages[category]; + if (notification) { + sendNotification(notification.title, notification.message); + } + + if (config.muted) return; + const now = Date.now(); if (now - lastPlayed < DEBOUNCE_MS) { return; @@ -345,20 +360,6 @@ function play(category: Category): void { } playSound(soundPath, config.volume); - - const notificationMessages: Record = { - "session.start": null, - "task.acknowledge": null, - "task.complete": { title: "Pi", message: "Task complete" }, - "task.error": { title: "Pi", message: "Task failed" }, - "input.required": { title: "Pi", message: "Input required" }, - "resource.limit": { title: "Pi", message: "Rate limited" }, - }; - - const notification = notificationMessages[category]; - if (notification) { - sendNotification(notification.title, notification.message); - } } // ============ COMMANDS ============ @@ -814,7 +815,7 @@ async function showTestMenu(ctx: ExtensionCommandContext) { const INTERACTIVE_TOOLS = new Set(["question", "questionnaire"]); -export default function (pi: ExtensionAPI) { +export default function(pi: ExtensionAPI) { registerCommands(pi); pi.on("session_start", async (_event, ctx) => {