forked from jyjeanne/crustly
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_plan_debug.sh
More file actions
executable file
·42 lines (35 loc) · 1.2 KB
/
Copy pathcheck_plan_debug.sh
File metadata and controls
executable file
·42 lines (35 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Plan Mode Debug Script
echo "=== Crustly Plan Mode Diagnostics ==="
echo ""
echo "1. Current directory:"
pwd
echo ""
echo "2. Looking for plan JSON files:"
find /home/user -name ".crustly_plan_*.json" -type f 2>/dev/null | while read file; do
echo " Found: $file"
echo " Status: $(grep -o '"status":"[^"]*"' "$file" | cut -d'"' -f4)"
echo " Tasks: $(grep -o '"tasks":\[' "$file" -A 1 | wc -l)"
echo ""
done
if [ ! -f /home/user -name ".crustly_plan_*.json" ]; then
echo " No plan JSON files found"
fi
echo ""
echo "3. Checking Crustly database:"
DB_PATH="$HOME/.local/share/crustly/crustly.db"
if [ -f "$DB_PATH" ]; then
echo " Database exists at: $DB_PATH"
sqlite3 "$DB_PATH" "SELECT id, session_id, title, status, created_at FROM plans ORDER BY created_at DESC LIMIT 5;" 2>/dev/null || echo " (Could not query database)"
else
echo " Database not found at: $DB_PATH"
fi
echo ""
echo "4. Recent Crustly log entries (if available):"
if [ -f "$HOME/.local/share/crustly/logs/crustly.log" ]; then
tail -20 "$HOME/.local/share/crustly/logs/crustly.log" | grep -i "plan\|mode" | tail -5
else
echo " No log file found"
fi
echo ""
echo "=== End Diagnostics ==="