-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_sqlite.py
More file actions
36 lines (33 loc) · 1.41 KB
/
Copy pathtest_sqlite.py
File metadata and controls
36 lines (33 loc) · 1.41 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
import sqlite3
import os
vscode_path = r'C:\Users\minht\AppData\Roaming\Code\User\globalStorage\state.vscdb'
if not os.path.exists(vscode_path):
print("WARNING: state.vscdb does not exist at", vscode_path)
else:
conn = sqlite3.connect(vscode_path)
print(f"Connected to {vscode_path}")
cursor = conn.cursor()
cursor.execute("SELECT name FROM sqlite_master WHERE type='table';")
tables = [row[0] for row in cursor.fetchall()]
print("Tables:", tables)
if 'ItemTable' in tables:
cursor.execute("SELECT key, substr(value, 1, 150) FROM ItemTable WHERE key LIKE '%chat%' OR key LIKE '%copilot%' OR key LIKE '%ai%' OR key LIKE '%codex%'")
rows = cursor.fetchall()
print("\n=== AI/Chat Keys ===")
for key, val in rows:
print(f"- {key}: {val}...")
conn.close()
# Also check workspaceStorage for AI chat files
storage_path = r'C:\Users\minht\AppData\Roaming\Code\User\workspaceStorage'
if os.path.exists(storage_path):
# Find any files related to AI memory
count = 0
for root, dirs, files in os.walk(storage_path):
for f in files:
if 'chat' in f.lower() or 'state.vscdb' in f.lower() or 'copilot' in f.lower() or 'codex' in f.lower():
print(f"Found Workspace AI File: {os.path.join(root, f)}")
count += 1
if count > 15:
break
if count > 15:
break