File tree Expand file tree Collapse file tree 7 files changed +867
-157
lines changed
Expand file tree Collapse file tree 7 files changed +867
-157
lines changed Original file line number Diff line number Diff line change 4949 "command" : " git add \" $CLAUDE_TOOL_FILE_PATH\" 2>/dev/null || true"
5050 }
5151 ]
52+ },
53+ {
54+ "matcher" : " Bash" ,
55+ "hooks" : [
56+ {
57+ "type" : " command" ,
58+ "command" : " if [[ -n \" $TELEGRAM_BOT_TOKEN\" && -n \" $TELEGRAM_CHAT_ID\" && -f ~/.claude/bash_start.tmp ]]; then END_TIME=\" $(date +%s)\" ; START_TIME=\" $(cat ~/.claude/bash_start.tmp)\" ; DURATION=\" $((END_TIME - START_TIME))\" ; rm -f ~/.claude/bash_start.tmp; if [[ $DURATION -gt 30 ]]; then MINUTES=\" $((DURATION / 60))\" ; SECONDS=\" $((DURATION % 60))\" ; MESSAGE=\" ⚠️ <b>Long Bash Operation</b>%0A⏱️ Duration: ${MINUTES}m ${SECONDS}s%0A📁 Project: $(basename \" $(pwd)\" )%0A⏰ Time: $(date '+%H:%M:%S')\" ; curl -s -X POST \" https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage\" -d \" chat_id=$TELEGRAM_CHAT_ID\" -d \" text=$MESSAGE\" -d \" parse_mode=HTML\" >/dev/null 2>&1; fi; fi"
59+ }
60+ ]
5261 }
5362 ],
5463 "SessionStart" : [
64+ {
65+ "matcher" : " startup" ,
66+ "hooks" : [
67+ {
68+ "type" : " command" ,
69+ "command" : " if [[ -n \" $TELEGRAM_BOT_TOKEN\" && -n \" $TELEGRAM_CHAT_ID\" ]]; then echo \" $(date +%s)\" > ~/.claude/session_start.tmp; PROJECT_DIR=\" $(basename \" $(pwd)\" )\" && MESSAGE=\" 🚀 <b>Claude Code Session Started</b>%0A📁 Project: $PROJECT_DIR%0A⏰ Time: $(date '+%H:%M:%S')%0A📅 Date: $(date '+%Y-%m-%d')\" ; curl -s -X POST \" https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage\" -d \" chat_id=$TELEGRAM_CHAT_ID\" -d \" text=$MESSAGE\" -d \" parse_mode=HTML\" >/dev/null 2>&1; fi"
70+ }
71+ ]
72+ },
5573 {
5674 "matcher" : " startup" ,
5775 "hooks" : [
7088 "command": "if [[ -n \"$TELEGRAM_BOT_TOKEN\" && -n \"$TELEGRAM_CHAT_ID\" ]]; then END_TIME=\"$(date +%s)\"; if [[ -f ~/.claude/session_start.tmp ]]; then START_TIME=\"$(cat ~/.claude/session_start.tmp)\"; DURATION=\"$((END_TIME - START_TIME))\"; MINUTES=\"$((DURATION / 60))\"; SECONDS=\"$((DURATION % 60))\"; DURATION_TEXT=\"${MINUTES}m ${SECONDS}s\"; rm -f ~/.claude/session_start.tmp; else DURATION_TEXT=\"Unknown\"; fi; PROJECT_DIR=\"$(basename \"$(pwd)\")\"; MEMORY_MB=\"$(ps -o rss= -p $$ 2>/dev/null | awk '{print int($1/1024)}' || echo 'N/A')\"; MESSAGE=\"✅ <b>Claude Code Session Completed</b>%0A📁 Project: $PROJECT_DIR%0A⏱️ Duration: $DURATION_TEXT%0A💾 Memory Used: ${MEMORY_MB}MB%0A⏰ Finished: $(date '+%H:%M:%S')%0A📅 Date: $(date '+%Y-%m-%d')\"; curl -s -X POST \"https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage\" -d \"chat_id=$TELEGRAM_CHAT_ID\" -d \"text=$MESSAGE\" -d \"parse_mode=HTML\" >/dev/null 2>&1 || echo \"Failed to send detailed Telegram notification\"; else echo \"⚠️ Detailed Telegram notification skipped: Set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID\"; fi"
7189 }
7290 ]
91+ },
92+ {
93+ "hooks" : [
94+ {
95+ "type" : " command" ,
96+ "command": "if [[ -n \"$TELEGRAM_BOT_TOKEN\" && -n \"$TELEGRAM_CHAT_ID\" ]]; then END_TIME=\"$(date +%s)\"; if [[ -f ~/.claude/session_start.tmp ]]; then START_TIME=\"$(cat ~/.claude/session_start.tmp)\"; DURATION=\"$((END_TIME - START_TIME))\"; MINUTES=\"$((DURATION / 60))\"; SECONDS=\"$((DURATION % 60))\"; DURATION_TEXT=\"${MINUTES}m ${SECONDS}s\"; rm -f ~/.claude/session_start.tmp; else DURATION_TEXT=\"Unknown\"; fi; PROJECT_DIR=\"$(basename \"$(pwd)\")\"; MEMORY_MB=\"$(ps -o rss= -p $$ 2>/dev/null | awk '{print int($1/1024)}' || echo 'N/A')\"; MESSAGE=\"✅ <b>Claude Code Session Completed</b>%0A📁 Project: $PROJECT_DIR%0A⏱️ Duration: $DURATION_TEXT%0A💾 Memory Used: ${MEMORY_MB}MB%0A⏰ Finished: $(date '+%H:%M:%S')%0A📅 Date: $(date '+%Y-%m-%d')\"; curl -s -X POST \"https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage\" -d \"chat_id=$TELEGRAM_CHAT_ID\" -d \"text=$MESSAGE\" -d \"parse_mode=HTML\" >/dev/null 2>&1 || echo \"Failed to send detailed Telegram notification\"; else echo \"⚠️ Detailed Telegram notification skipped: Set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID\"; fi"
97+ }
98+ ]
99+ }
100+ ],
101+ "PreToolUse" : [
102+ {
103+ "matcher" : " Bash" ,
104+ "hooks" : [
105+ {
106+ "type" : " command" ,
107+ "command" : " if [[ -n \" $TELEGRAM_BOT_TOKEN\" && -n \" $TELEGRAM_CHAT_ID\" ]]; then echo \" $(date +%s)\" > ~/.claude/bash_start.tmp; fi"
108+ }
109+ ]
110+ }
111+ ],
112+ "Notification" : [
113+ {
114+ "hooks" : [
115+ {
116+ "type" : " command" ,
117+ "command" : " if [[ -n \" $TELEGRAM_BOT_TOKEN\" && -n \" $TELEGRAM_CHAT_ID\" ]]; then MESSAGE=\" 🔔 <b>Claude Code Notification</b>%0A📁 Project: $(basename \" $(pwd)\" )%0A⏰ Time: $(date '+%H:%M:%S')%0A💬 Status: Waiting for user input or permission\" ; curl -s -X POST \" https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage\" -d \" chat_id=$TELEGRAM_CHAT_ID\" -d \" text=$MESSAGE\" -d \" parse_mode=HTML\" >/dev/null 2>&1; fi"
118+ }
119+ ]
73120 }
74121 ]
75122 }
Original file line number Diff line number Diff line change 66.vercel
77.DS_Store
88.DS_Store ?
9- ._ *
9+ ._ *
10+ .vscode
11+ .vscode /*
Original file line number Diff line number Diff line change 11{
2- "CodeGPT.apiKey" : " Ollama "
2+ "CodeGPT.apiKey" : " OpenAI "
33}
You can’t perform that action at this time.
0 commit comments