agentgui 1.0.557 → 1.0.558
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 +2 -3
- package/package.json +1 -1
- package/static/js/client.js +14 -6
package/database.js
CHANGED
|
@@ -677,12 +677,11 @@ export const queries = {
|
|
|
677
677
|
|
|
678
678
|
getResumableConversations() {
|
|
679
679
|
// Get conversations with active/pending sessions that can be resumed
|
|
680
|
-
//
|
|
680
|
+
// Check sessions table directly for actual active status, don't filter by claudeSessionId
|
|
681
681
|
const stmt = prep(
|
|
682
682
|
`SELECT DISTINCT c.id, c.title, c.claudeSessionId, c.agentId, c.agentType, c.workingDirectory, c.model, c.subAgent
|
|
683
683
|
FROM conversations c
|
|
684
|
-
WHERE
|
|
685
|
-
AND EXISTS (
|
|
684
|
+
WHERE EXISTS (
|
|
686
685
|
SELECT 1 FROM sessions s
|
|
687
686
|
WHERE s.conversationId = c.id
|
|
688
687
|
AND s.status IN ('active', 'pending', 'interrupted')
|
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -2513,6 +2513,7 @@ class AgentGUIClient {
|
|
|
2513
2513
|
const cachedHasActivity = cached.conversation.messageCount > 0 || this.state.streamingConversations.has(conversationId);
|
|
2514
2514
|
this.applyAgentAndModelSelection(cached.conversation, cachedHasActivity);
|
|
2515
2515
|
this.conversationCache.delete(conversationId);
|
|
2516
|
+
this.syncPromptState(conversationId);
|
|
2516
2517
|
this.restoreScrollPosition(conversationId);
|
|
2517
2518
|
this.enableControls();
|
|
2518
2519
|
return;
|
|
@@ -2726,13 +2727,9 @@ class AgentGUIClient {
|
|
|
2726
2727
|
this.chunkPollState.lastFetchTimestamp = lastChunkTime;
|
|
2727
2728
|
this.startChunkPolling(conversationId);
|
|
2728
2729
|
this.disableControls();
|
|
2729
|
-
|
|
2730
|
-
if (this.ui.messageInput) this.ui.messageInput.disabled = true;
|
|
2730
|
+
this.syncPromptState(conversationId);
|
|
2731
2731
|
} else {
|
|
2732
|
-
|
|
2733
|
-
if (this.ui.messageInput && this.wsManager.isConnected) {
|
|
2734
|
-
this.ui.messageInput.disabled = false;
|
|
2735
|
-
}
|
|
2732
|
+
this.syncPromptState(conversationId);
|
|
2736
2733
|
}
|
|
2737
2734
|
|
|
2738
2735
|
this.restoreScrollPosition(conversationId);
|
|
@@ -2745,6 +2742,17 @@ class AgentGUIClient {
|
|
|
2745
2742
|
}
|
|
2746
2743
|
}
|
|
2747
2744
|
|
|
2745
|
+
syncPromptState(conversationId) {
|
|
2746
|
+
const isStreaming = this.state.streamingConversations.has(conversationId);
|
|
2747
|
+
if (this.ui.messageInput) {
|
|
2748
|
+
if (isStreaming) {
|
|
2749
|
+
this.ui.messageInput.disabled = true;
|
|
2750
|
+
} else {
|
|
2751
|
+
this.ui.messageInput.disabled = !this.wsManager.isConnected;
|
|
2752
|
+
}
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2748
2756
|
removeScrollUpDetection() {
|
|
2749
2757
|
const scrollContainer = document.getElementById(this.config.scrollContainerId);
|
|
2750
2758
|
if (scrollContainer && this._scrollUpHandler) {
|