feat: add desktop notification hook script (#664)

This commit is contained in:
jnjpng
2026-01-23 17:53:53 -08:00
committed by GitHub
parent 55524061ab
commit 9659fa32e8

17
hooks/desktop-notification.sh Executable file
View File

@@ -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