agentgui 1.0.658 → 1.0.659
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/package.json +1 -1
- package/static/js/ws-client.js +7 -5
package/package.json
CHANGED
package/static/js/ws-client.js
CHANGED
|
@@ -78,12 +78,14 @@ class WsClient {
|
|
|
78
78
|
|
|
79
79
|
window.WsClient = WsClient;
|
|
80
80
|
|
|
81
|
-
// Bootstrap:
|
|
81
|
+
// Bootstrap: create wsManager and wsClient synchronously so other modules can use them immediately.
|
|
82
|
+
// Codec is loaded async and upgrades encoding once ready; websocket-manager falls back to msgpackr until then.
|
|
83
|
+
window.wsManager = new WebSocketManager();
|
|
84
|
+
window.wsClient = new WsClient(window.wsManager);
|
|
85
|
+
window.wsManager.connect().catch(function() {});
|
|
86
|
+
|
|
82
87
|
import('./codec.js').then(codec => {
|
|
83
88
|
window._codec = codec;
|
|
84
|
-
window.wsManager = new WebSocketManager();
|
|
85
|
-
window.wsClient = new WsClient(window.wsManager);
|
|
86
|
-
window.wsManager.connect().catch(function() {});
|
|
87
89
|
}).catch(e => {
|
|
88
|
-
console.error('[ws-client] Failed to load codec:', e);
|
|
90
|
+
console.error('[ws-client] Failed to load codec, using msgpackr fallback:', e);
|
|
89
91
|
});
|