claude-code-templates 1.10.1 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bin/create-claude-config.js +1 -0
- package/package.json +2 -2
- package/src/analytics/core/ConversationAnalyzer.js +94 -20
- package/src/analytics/core/FileWatcher.js +146 -11
- package/src/analytics/data/DataCache.js +124 -19
- package/src/analytics/notifications/NotificationManager.js +37 -0
- package/src/analytics/notifications/WebSocketServer.js +1 -1
- package/src/analytics-web/FRONT_ARCHITECTURE.md +46 -0
- package/src/analytics-web/assets/js/{main.js → main.js.deprecated} +32 -3
- package/src/analytics-web/components/AgentsPage.js +2535 -0
- package/src/analytics-web/components/App.js +430 -0
- package/src/analytics-web/components/{Dashboard.js → Dashboard.js.deprecated} +23 -7
- package/src/analytics-web/components/DashboardPage.js +1527 -0
- package/src/analytics-web/components/Sidebar.js +197 -0
- package/src/analytics-web/components/ToolDisplay.js +539 -0
- package/src/analytics-web/index.html +3275 -1792
- package/src/analytics-web/services/DataService.js +89 -16
- package/src/analytics-web/services/StateService.js +9 -0
- package/src/analytics-web/services/WebSocketService.js +17 -5
- package/src/analytics.js +323 -35
- package/src/console-bridge.js +610 -0
- package/src/file-operations.js +143 -23
- package/src/index.js +24 -1
- package/src/templates.js +4 -0
- package/src/test-console-bridge.js +67 -0
|
@@ -39,8 +39,11 @@ class AnalyticsDashboard {
|
|
|
39
39
|
async initializeServices() {
|
|
40
40
|
console.log('🔧 Initializing services...');
|
|
41
41
|
|
|
42
|
-
// Initialize
|
|
43
|
-
this.services.
|
|
42
|
+
// Initialize WebSocketService
|
|
43
|
+
this.services.webSocket = new WebSocketService();
|
|
44
|
+
|
|
45
|
+
// Initialize DataService with WebSocket integration
|
|
46
|
+
this.services.data = new DataService(this.services.webSocket);
|
|
44
47
|
|
|
45
48
|
// Initialize StateService
|
|
46
49
|
this.services.state = new StateService();
|
|
@@ -48,7 +51,33 @@ class AnalyticsDashboard {
|
|
|
48
51
|
// Initialize Charts service (placeholder)
|
|
49
52
|
this.services.chart = new Charts(null, this.services.data, this.services.state);
|
|
50
53
|
|
|
51
|
-
//
|
|
54
|
+
// Setup DataService -> StateService integration for real-time updates
|
|
55
|
+
this.services.data.addEventListener((type, data) => {
|
|
56
|
+
switch (type) {
|
|
57
|
+
case 'new_message':
|
|
58
|
+
// Route new message events to StateService which will notify AgentsPage
|
|
59
|
+
this.services.state.notifyListeners('new_message', data);
|
|
60
|
+
break;
|
|
61
|
+
case 'conversation_state_change':
|
|
62
|
+
// Route state changes to StateService
|
|
63
|
+
this.services.state.notifyListeners('conversation_state_change', data);
|
|
64
|
+
break;
|
|
65
|
+
case 'data_refresh':
|
|
66
|
+
// Route data refresh events to StateService
|
|
67
|
+
this.services.state.notifyListeners('data_refresh', data);
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// Connect WebSocket (will fallback to polling if connection fails)
|
|
73
|
+
try {
|
|
74
|
+
await this.services.webSocket.connect();
|
|
75
|
+
console.log('✅ WebSocket connected successfully');
|
|
76
|
+
} catch (error) {
|
|
77
|
+
console.log('⚠️ WebSocket connection failed, falling back to polling');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Start periodic data refresh (will adjust based on WebSocket availability)
|
|
52
81
|
this.services.data.startPeriodicRefresh();
|
|
53
82
|
|
|
54
83
|
console.log('✅ Services initialized');
|