feat: integrate Radix UI and add sample component

This commit is contained in:
bipproduction
2026-02-09 16:20:27 +08:00
parent 1f03927987
commit 9cc133161c
7 changed files with 301 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -e
INPUT=$(cat)
BOT_TOKEN="${BOT_TOKEN:?BOT_TOKEN not set}"
CHAT_ID="${CHAT_ID:?CHAT_ID not set}"
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // "unknown"')
FINAL_TEXT=$(echo "$INPUT" | jq -r '.final_response.text // ""' | head -c 3500)
MESSAGE=$(cat <<EOF
✅ *Gemini Task Selesai*
🆔 Session:
\`$SESSION_ID\`
🧠 Output (ringkas):
$FINAL_TEXT
EOF
)
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
-d chat_id="$CHAT_ID" \
-d parse_mode="Markdown" \
--data-urlencode text="$MESSAGE" \
> /dev/null
# WAJIB: response JSON ke Gemini
echo '{"decision":"allow"}'

17
.gemini/settings.json Normal file
View File

@@ -0,0 +1,17 @@
{
"hooks": {
"AfterAgent": [
{
"matcher": "*",
"hooks": [
{
"name": "telegram-notify",
"type": "command",
"command": "$GEMINI_PROJECT_DIR/.gemini/hooks/telegram-notify.sh",
"timeout": 8000
}
]
}
]
}
}