-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextension-test.html
More file actions
84 lines (75 loc) · 3.62 KB
/
Copy pathextension-test.html
File metadata and controls
84 lines (75 loc) · 3.62 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
<title>Extension Test</title>
<style>
body { font-family: 'Segoe UI', Arial, sans-serif; padding: 20px; background: #1e1e1e; color: #fff; }
.test-button { background: #007acc; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; margin: 5px; }
.test-button:hover { background: #005a9e; }
.result { margin: 10px 0; padding: 10px; background: #2d2d30; border-radius: 5px; }
.success { border-left: 4px solid #4CAF50; }
.error { border-left: 4px solid #f44336; }
</style>
</head>
<body>
<h1>🧪 GitHub Copilot Chat History Analyzer - Extension Test</h1>
<p>Click the buttons below to test the extension functionality:</p>
<button class="test-button" onclick="testExtension()">🚀 Test Extension</button>
<button class="test-button" onclick="checkCommands()">📋 List Commands</button>
<button class="test-button" onclick="openCommandPalette()">🎯 Open Command Palette</button>
<div id="results"></div>
<h3>📝 Manual Testing Steps:</h3>
<ol>
<li>Press <code>Ctrl+Shift+P</code> to open Command Palette</li>
<li>Type: <strong>🧪 Test Extension</strong></li>
<li>Look for 🚀 rocket icon in Activity Bar (left sidebar)</li>
<li>Check Developer Console (F12) for debug messages</li>
</ol>
<script>
function addResult(message, type = 'info') {
const results = document.getElementById('results');
const div = document.createElement('div');
div.className = `result ${type}`;
div.innerHTML = message;
results.appendChild(div);
}
function testExtension() {
if (typeof vscode !== 'undefined') {
vscode.commands.executeCommand('github-copilot-chat-history-analyzer.test')
.then(() => addResult('✅ Test command executed successfully!', 'success'))
.catch(err => addResult(`❌ Error: ${err.message}`, 'error'));
} else {
addResult('❌ This page must be opened in VS Code Extension Development Host', 'error');
}
}
function checkCommands() {
if (typeof vscode !== 'undefined') {
vscode.commands.getCommands(true).then(commands => {
const extensionCommands = commands.filter(cmd =>
cmd.startsWith('github-copilot-chat-history-analyzer')
);
addResult(`📋 Found ${extensionCommands.length} extension commands:<br>${extensionCommands.map(cmd => '• ' + cmd).join('<br>')}`, 'success');
});
} else {
addResult('❌ This page must be opened in VS Code Extension Development Host', 'error');
}
}
function openCommandPalette() {
if (typeof vscode !== 'undefined') {
vscode.commands.executeCommand('workbench.action.showCommands');
addResult('🎯 Command Palette opened! Search for "Test Extension"', 'success');
} else {
addResult('❌ This page must be opened in VS Code Extension Development Host', 'error');
}
}
// Auto-check on load
window.onload = function() {
if (typeof vscode !== 'undefined') {
addResult('✅ VS Code API detected - Extension testing available!', 'success');
} else {
addResult('ℹ️ Open this file in VS Code Extension Development Host to test', 'info');
}
};
</script>
</body>
</html>