19 lines
614 B
Bash
19 lines
614 B
Bash
#!/bin/bash
|
|
# UserPromptSubmit Hook - Runs when user submits a prompt
|
|
|
|
# Log prompt submission (without actual content for privacy)
|
|
echo "[$(date '+%Y-%m-%d %H:%M:%S')] User prompt submitted" >> .claude/logs/session.log
|
|
|
|
# Optional: Show notification (requires notify-send on Linux or similar)
|
|
# notify-send "Claude Code" "Processing your request..." 2>/dev/null || true
|
|
|
|
# Optional: Track usage statistics
|
|
PROMPT_COUNT_FILE=".claude/logs/prompt_count.txt"
|
|
if [ -f "$PROMPT_COUNT_FILE" ]; then
|
|
COUNT=$(cat "$PROMPT_COUNT_FILE")
|
|
COUNT=$((COUNT + 1))
|
|
else
|
|
COUNT=1
|
|
fi
|
|
echo "$COUNT" > "$PROMPT_COUNT_FILE"
|