-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick-test.js
More file actions
57 lines (46 loc) Β· 1.92 KB
/
quick-test.js
File metadata and controls
57 lines (46 loc) Β· 1.92 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const fs = require('fs');
const path = require('path');
// Quick test to verify we can access workspace storage
const storageBasePath = 'c:\\Users\\lade\\AppData\\Roaming\\Code\\User\\workspaceStorage';
console.log('π Testing access to VS Code workspace storage...');
try {
if (!fs.existsSync(storageBasePath)) {
console.log('β Workspace storage path does not exist');
process.exit(1);
}
const folders = fs.readdirSync(storageBasePath);
console.log(`β
Found ${folders.length} workspace folders`);
// Check for GitHub Copilot chat data
let chatDataFound = 0;
let totalFiles = 0;
for (const folder of folders.slice(0, 5)) { // Check first 5 folders
const folderPath = path.join(storageBasePath, folder);
try {
const files = fs.readdirSync(folderPath);
totalFiles += files.length;
// Look for GitHub Copilot related files
const copilotFiles = files.filter(file =>
file.includes('copilot') ||
file.includes('chat') ||
file.includes('github.copilot')
);
if (copilotFiles.length > 0) {
chatDataFound++;
console.log(`π ${folder}: Found ${copilotFiles.length} Copilot-related files`);
}
} catch (err) {
// Skip folders we can't read
}
}
console.log(`\nπ Summary:`);
console.log(`- Total workspace folders: ${folders.length}`);
console.log(`- Folders with potential chat data: ${chatDataFound}`);
console.log(`- Total files in first 5 folders: ${totalFiles}`);
if (chatDataFound > 0) {
console.log('β
Extension should be able to find chat data!');
} else {
console.log('β οΈ No obvious chat data found in first 5 folders');
}
} catch (error) {
console.log('β Error accessing storage:', error.message);
}