agentgui 1.0.560 → 1.0.561
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/server.js +13 -2
- package/static/js/client.js +7 -0
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -4462,8 +4462,19 @@ function recoverStaleSessions() {
|
|
|
4462
4462
|
|
|
4463
4463
|
async function resumeInterruptedStreams() {
|
|
4464
4464
|
try {
|
|
4465
|
-
|
|
4466
|
-
|
|
4465
|
+
// Get conversations marked as streaming in database (isStreaming=1)
|
|
4466
|
+
// Fall back to getResumableConversations if isStreaming is not being used
|
|
4467
|
+
let toResume = [];
|
|
4468
|
+
|
|
4469
|
+
// Primary: Check database isStreaming flag for conversations still marked as active
|
|
4470
|
+
const streamingConvs = queries.getConversations().filter(c => c.isStreaming === 1);
|
|
4471
|
+
|
|
4472
|
+
if (streamingConvs.length > 0) {
|
|
4473
|
+
toResume = streamingConvs;
|
|
4474
|
+
} else {
|
|
4475
|
+
// Fallback: Use session-based resumable conversations
|
|
4476
|
+
toResume = queries.getResumableConversations ? queries.getResumableConversations() : [];
|
|
4477
|
+
}
|
|
4467
4478
|
|
|
4468
4479
|
if (toResume.length === 0) return;
|
|
4469
4480
|
|
package/static/js/client.js
CHANGED
|
@@ -2557,6 +2557,13 @@ class AgentGUIClient {
|
|
|
2557
2557
|
const shouldResumeStreaming = latestSession &&
|
|
2558
2558
|
(latestSession.status === 'active' || latestSession.status === 'pending');
|
|
2559
2559
|
|
|
2560
|
+
// IMMUTABLE: Update streaming state and disable prompt atomically
|
|
2561
|
+
if (shouldResumeStreaming) {
|
|
2562
|
+
this.state.streamingConversations.set(conversationId, true);
|
|
2563
|
+
} else {
|
|
2564
|
+
this.state.streamingConversations.delete(conversationId);
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2560
2567
|
if (this.ui.messageInput) {
|
|
2561
2568
|
this.ui.messageInput.disabled = shouldResumeStreaming;
|
|
2562
2569
|
}
|