From 9659fa32e8340353eed8c2443a50033f2bd427eb Mon Sep 17 00:00:00 2001 From: jnjpng Date: Fri, 23 Jan 2026 17:53:53 -0800 Subject: [PATCH] feat: add desktop notification hook script (#664) --- hooks/desktop-notification.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 hooks/desktop-notification.sh diff --git a/hooks/desktop-notification.sh b/hooks/desktop-notification.sh new file mode 100755 index 0000000..3722f58 --- /dev/null +++ b/hooks/desktop-notification.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Send desktop notification using osascript (macOS) + +input=$(cat) +message=$(echo "$input" | jq -r '.message') +level=$(echo "$input" | jq -r '.level') + +# Display the notification (show subtitle only for warning/error) +if [ "$level" = "error" ]; then + osascript -e "display notification \"$message\" with title \"Letta Code\" subtitle \"Error\"" +elif [ "$level" = "warning" ]; then + osascript -e "display notification \"$message\" with title \"Letta Code\" subtitle \"Warning\"" +else + osascript -e "display notification \"$message\" with title \"Letta Code\"" +fi + +exit 0