agentgui 1.0.709 → 1.0.710

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +9 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.709",
3
+ "version": "1.0.710",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -3813,7 +3813,7 @@ async function processMessageWithStreaming(conversationId, messageId, sessionId,
3813
3813
  debugLog(`[stream] Starting: conversationId=${conversationId}, sessionId=${sessionId}`);
3814
3814
 
3815
3815
  const cwd = conv?.workingDirectory || STARTUP_CWD;
3816
- const resumeSessionId = conv?.claudeSessionId || null;
3816
+ let resumeSessionId = conv?.claudeSessionId || null;
3817
3817
 
3818
3818
  let allBlocks = [];
3819
3819
  let eventCount = 0;
@@ -3823,7 +3823,13 @@ async function processMessageWithStreaming(conversationId, messageId, sessionId,
3823
3823
  eventCount++;
3824
3824
  const entry = activeExecutions.get(conversationId);
3825
3825
  if (entry) entry.lastActivity = Date.now();
3826
- if (parsed.session_id) ownedSessionIds.add(parsed.session_id);
3826
+ if (parsed.session_id) {
3827
+ ownedSessionIds.add(parsed.session_id);
3828
+ if (!resumeSessionId || resumeSessionId !== parsed.session_id) {
3829
+ resumeSessionId = parsed.session_id;
3830
+ queries.setClaudeSessionId(conversationId, parsed.session_id, sessionId);
3831
+ }
3832
+ }
3827
3833
  debugLog(`[stream] Event ${eventCount}: type=${parsed.type}`);
3828
3834
 
3829
3835
  if (parsed.type === 'system') {
@@ -4120,10 +4126,7 @@ async function processMessageWithStreaming(conversationId, messageId, sessionId,
4120
4126
  if (claudeSessionId) ownedSessionIds.delete(claudeSessionId);
4121
4127
  debugLog(`[stream] Claude returned ${outputs.length} outputs, sessionId=${claudeSessionId}`);
4122
4128
 
4123
- // Clear claudeSessionId after successful completion so next message starts fresh
4124
- // --resume on a completed session causes "No response requested." from the gm plugin
4125
- queries.setClaudeSessionId(conversationId, null);
4126
- debugLog(`[stream] Cleared claudeSessionId after successful completion`);
4129
+ debugLog(`[stream] Keeping claudeSessionId=${claudeSessionId} for session continuity`);
4127
4130
 
4128
4131
  // Mark session as complete
4129
4132
  queries.updateSession(sessionId, {