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 CHANGED
@@ -676,8 +676,9 @@ export const queries = {
676
676
  },
677
677
 
678
678
  getResumableConversations() {
679
- // Get conversations with active/pending sessions that can be resumed
680
- // Check sessions table directly for actual active status, don't filter by claudeSessionId
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.573",
3
+ "version": "1.0.575",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
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
- const streamingConvs = queries.getConversations().filter(c => c.isStreaming === 1);
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;