notify even when peon muted
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"lastChangelogVersion": "0.65.2",
|
||||
"lastChangelogVersion": "0.66.1",
|
||||
"defaultProvider": "openai-codex",
|
||||
"defaultModel": "gpt-5.3-codex",
|
||||
"defaultThinkingLevel": "high",
|
||||
|
||||
@@ -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<Category, { title: string; message: string } | null> = {
|
||||
"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<Category, { title: string; message: string } | null> = {
|
||||
"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 ============
|
||||
|
||||
Reference in New Issue
Block a user