agentgui 1.0.580 → 1.0.581
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/client.js +14 -0
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -753,6 +753,12 @@ class AgentGUIClient {
|
|
|
753
753
|
this._serverProcessingEstimate = 0.7 * this._serverProcessingEstimate + 0.3 * serverTime;
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
+
// Always subscribe to the session so blocks are not lost regardless of which conversation is active
|
|
757
|
+
if (this.wsManager.isConnected) {
|
|
758
|
+
this.wsManager.subscribeToSession(data.sessionId);
|
|
759
|
+
this.wsManager.sendMessage({ type: 'subscribe', conversationId: data.conversationId });
|
|
760
|
+
}
|
|
761
|
+
|
|
756
762
|
// If this streaming event is for a different conversation than what we are viewing,
|
|
757
763
|
// just track the state but do not modify the DOM or start polling
|
|
758
764
|
if (this.state.currentConversation?.id !== data.conversationId) {
|
|
@@ -760,6 +766,14 @@ class AgentGUIClient {
|
|
|
760
766
|
this.state.streamingConversations.set(data.conversationId, true);
|
|
761
767
|
this.updateBusyPromptArea(data.conversationId);
|
|
762
768
|
this.emit('streaming:start', data);
|
|
769
|
+
|
|
770
|
+
// Auto-load if no conversation is currently selected (e.g. server resumed on startup)
|
|
771
|
+
if (!this.state.currentConversation && !this._isLoadingConversation) {
|
|
772
|
+
this._isLoadingConversation = true;
|
|
773
|
+
this.loadConversationMessages(data.conversationId).finally(() => {
|
|
774
|
+
this._isLoadingConversation = false;
|
|
775
|
+
});
|
|
776
|
+
}
|
|
763
777
|
return;
|
|
764
778
|
}
|
|
765
779
|
|