agentgui 1.0.556 → 1.0.557
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/database.js +10 -1
- package/package.json +1 -1
- package/static/js/client.js +9 -1
package/database.js
CHANGED
|
@@ -676,8 +676,17 @@ export const queries = {
|
|
|
676
676
|
},
|
|
677
677
|
|
|
678
678
|
getResumableConversations() {
|
|
679
|
+
// Get conversations with active/pending sessions that can be resumed
|
|
680
|
+
// Include conversations regardless of isStreaming flag - check database for actual active sessions
|
|
679
681
|
const stmt = prep(
|
|
680
|
-
|
|
682
|
+
`SELECT DISTINCT c.id, c.title, c.claudeSessionId, c.agentId, c.agentType, c.workingDirectory, c.model, c.subAgent
|
|
683
|
+
FROM conversations c
|
|
684
|
+
WHERE c.claudeSessionId IS NOT NULL AND c.claudeSessionId != ''
|
|
685
|
+
AND EXISTS (
|
|
686
|
+
SELECT 1 FROM sessions s
|
|
687
|
+
WHERE s.conversationId = c.id
|
|
688
|
+
AND s.status IN ('active', 'pending', 'interrupted')
|
|
689
|
+
)`
|
|
681
690
|
);
|
|
682
691
|
return stmt.all();
|
|
683
692
|
},
|
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -2474,7 +2474,8 @@ class AgentGUIClient {
|
|
|
2474
2474
|
if (this.ui.messageInput) {
|
|
2475
2475
|
this.ui.messageInput.value = '';
|
|
2476
2476
|
this.ui.messageInput.style.height = 'auto';
|
|
2477
|
-
|
|
2477
|
+
// Note: prompt disabled state will be set immutably based on shouldResumeStreaming
|
|
2478
|
+
// after conversation data loads, don't set here
|
|
2478
2479
|
}
|
|
2479
2480
|
|
|
2480
2481
|
if (this.ui.stopButton) this.ui.stopButton.classList.remove('visible');
|
|
@@ -2725,6 +2726,13 @@ class AgentGUIClient {
|
|
|
2725
2726
|
this.chunkPollState.lastFetchTimestamp = lastChunkTime;
|
|
2726
2727
|
this.startChunkPolling(conversationId);
|
|
2727
2728
|
this.disableControls();
|
|
2729
|
+
// IMMUTABLE STATE: Prompt is disabled during active streaming, do NOT enable
|
|
2730
|
+
if (this.ui.messageInput) this.ui.messageInput.disabled = true;
|
|
2731
|
+
} else {
|
|
2732
|
+
// IMMUTABLE STATE: Prompt is enabled when NOT streaming (only disabled on WebSocket disconnect)
|
|
2733
|
+
if (this.ui.messageInput && this.wsManager.isConnected) {
|
|
2734
|
+
this.ui.messageInput.disabled = false;
|
|
2735
|
+
}
|
|
2728
2736
|
}
|
|
2729
2737
|
|
|
2730
2738
|
this.restoreScrollPosition(conversationId);
|