modifications

This commit is contained in:
Thomas G. Lopes
2026-03-02 15:31:40 +00:00
parent b8efbd579d
commit fd20fa9f13
+5 -3
View File
@@ -37,16 +37,18 @@ function notifyRemote(): void {
}
function notifyLocal(): void {
const { execFile } = require("child_process");
const { execFile, exec } = require("child_process");
if (process.platform === "darwin") {
execFile("afplay", [LOCAL_SOUND_MAC]);
} else if (process.platform === "linux") {
execFile("paplay", [LOCAL_SOUND_LINUX]);
exec("paplay /usr/share/sounds/freedesktop/stereo/window-attention.oga & notify-send -i ~/.pi/agent/extensions/assets/pi-logo.svg 'Pi' 'Done. Ready for input.'");
}
}
function sendNotification(): void {
if (isSSH() || REMOTE_HOST) {
// On Mac or SSH session: notify remote Linux
// On Linux locally: notify local
if (process.platform === "darwin" || isSSH()) {
notifyRemote();
} else {
notifyLocal();