-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_classes.html
More file actions
80 lines (65 loc) · 2.39 KB
/
Copy pathdebug_classes.html
File metadata and controls
80 lines (65 loc) · 2.39 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
<!DOCTYPE html>
<html>
<head>
<title>Debug Classes</title>
</head>
<body>
<h1>Debug: Check if classes are loaded</h1>
<div id="output"></div>
<!-- Load the modules -->
<script src="js/core/event-bus.js"></script>
<script src="js/core/api-client.js"></script>
<script src="js/modules/plugin-manager.js"></script>
<script src="js/modules/rag-tester.js"></script>
<script src="js/modules/document-processor.js"></script>
<script>
const output = document.getElementById('output');
function log(message) {
output.innerHTML += '<p>' + message + '</p>';
console.log(message);
}
// Check if classes are available
log('Checking classes...');
if (typeof EventBus !== 'undefined') {
log('✅ EventBus loaded');
} else {
log('❌ EventBus NOT loaded');
}
if (typeof APIClient !== 'undefined') {
log('✅ APIClient loaded');
} else {
log('❌ APIClient NOT loaded');
}
if (typeof PluginManager !== 'undefined') {
log('✅ PluginManager loaded');
} else {
log('❌ PluginManager NOT loaded');
}
if (typeof RAGTester !== 'undefined') {
log('✅ RAGTester loaded');
} else {
log('❌ RAGTester NOT loaded');
}
if (typeof DocumentProcessor !== 'undefined') {
log('✅ DocumentProcessor loaded');
} else {
log('❌ DocumentProcessor NOT loaded');
}
// Try to create instances
try {
const eventBus = new EventBus();
const apiClient = new APIClient();
log('✅ Basic classes work');
const pluginManager = new PluginManager(apiClient, eventBus);
log('✅ PluginManager instantiated');
const ragTester = new RAGTester(apiClient, eventBus);
log('✅ RAGTester instantiated');
const documentProcessor = new DocumentProcessor(apiClient, eventBus);
log('✅ DocumentProcessor instantiated');
log('🎉 All classes working correctly!');
} catch (error) {
log('❌ Error: ' + error.message);
}
</script>
</body>
</html>