agentgui 1.0.573 → 1.0.575
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 +3 -2
- package/package.json +1 -1
- package/server.js +6 -1
package/database.js
CHANGED
|
@@ -676,8 +676,9 @@ export const queries = {
|
|
|
676
676
|
},
|
|
677
677
|
|
|
678
678
|
getResumableConversations() {
|
|
679
|
-
// Get conversations with
|
|
680
|
-
//
|
|
679
|
+
// Get conversations with incomplete sessions that can be resumed.
|
|
680
|
+
// Only includes sessions with status: active, pending, interrupted.
|
|
681
|
+
// Excludes complete and error sessions - agents that finished should not be resumed.
|
|
681
682
|
const stmt = prep(
|
|
682
683
|
`SELECT DISTINCT c.id, c.title, c.claudeSessionId, c.agentId, c.agentType, c.workingDirectory, c.model, c.subAgent
|
|
683
684
|
FROM conversations c
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -4495,7 +4495,12 @@ async function resumeInterruptedStreams() {
|
|
|
4495
4495
|
let toResume = [];
|
|
4496
4496
|
|
|
4497
4497
|
// Primary: Check database isStreaming flag for conversations still marked as active
|
|
4498
|
-
|
|
4498
|
+
// Exclude conversations whose last session completed - they should not be resumed
|
|
4499
|
+
const streamingConvs = queries.getConversations().filter(c => {
|
|
4500
|
+
if (c.isStreaming !== 1) return false;
|
|
4501
|
+
const lastSession = queries.getLatestSession(c.id);
|
|
4502
|
+
return !lastSession || lastSession.status !== 'complete';
|
|
4503
|
+
});
|
|
4499
4504
|
|
|
4500
4505
|
if (streamingConvs.length > 0) {
|
|
4501
4506
|
toResume = streamingConvs;
|