agentgui 1.0.569 → 1.0.570

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.569",
3
+ "version": "1.0.570",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -2488,6 +2488,7 @@ class AgentGUIClient {
2488
2488
  this._previousConvAbort = new AbortController();
2489
2489
  const convSignal = this._previousConvAbort.signal;
2490
2490
 
2491
+ const prevConversationId = this.state.currentConversation?.id;
2491
2492
  this.cacheCurrentConversation();
2492
2493
  this.stopChunkPolling();
2493
2494
  this.removeScrollUpDetection();
@@ -2558,9 +2559,16 @@ class AgentGUIClient {
2558
2559
  console.warn('Conversation no longer exists:', conversationId);
2559
2560
  this.state.currentConversation = null;
2560
2561
  if (window.conversationManager) window.conversationManager.loadConversations();
2561
- const outputEl = document.getElementById('output');
2562
- if (outputEl) outputEl.innerHTML = '<p class="text-secondary" style="padding:2rem;text-align:center">Conversation not found. It may have been lost during a server restart.</p>';
2563
- this.enableControls();
2562
+ // Resume from last successful conversation if available
2563
+ if (prevConversationId && prevConversationId !== conversationId) {
2564
+ console.log('Resuming from previous conversation:', prevConversationId);
2565
+ this.showError('Conversation not found. Resuming previous conversation.');
2566
+ await this.loadConversationMessages(prevConversationId);
2567
+ } else {
2568
+ const outputEl = document.getElementById('output');
2569
+ if (outputEl) outputEl.innerHTML = '<p class="text-secondary" style="padding:2rem;text-align:center">Conversation not found. It may have been lost during a server restart.</p>';
2570
+ this.enableControls();
2571
+ }
2564
2572
  return;
2565
2573
  }
2566
2574
  throw e;
@@ -2779,7 +2787,19 @@ class AgentGUIClient {
2779
2787
  } catch (error) {
2780
2788
  if (error.name === 'AbortError') return;
2781
2789
  console.error('Failed to load conversation messages:', error);
2782
- this.showError('Failed to load conversation: ' + error.message);
2790
+ // Resume from last successful conversation if available
2791
+ if (prevConversationId && prevConversationId !== conversationId) {
2792
+ console.log('Resuming from previous conversation due to error:', prevConversationId);
2793
+ this.showError('Failed to load conversation. Resuming previous conversation.');
2794
+ try {
2795
+ await this.loadConversationMessages(prevConversationId);
2796
+ } catch (fallbackError) {
2797
+ console.error('Failed to resume previous conversation:', fallbackError);
2798
+ this.showError('Failed to load conversation: ' + error.message);
2799
+ }
2800
+ } else {
2801
+ this.showError('Failed to load conversation: ' + error.message);
2802
+ }
2783
2803
  }
2784
2804
  }
2785
2805
 
@@ -751,7 +751,6 @@ class StreamingRenderer {
751
751
  if (block.id) details.dataset.toolUseId = block.id;
752
752
  details.classList.add(this._getBlockTypeClass('tool_use'));
753
753
  details.classList.add(this._getToolColorClass(toolName));
754
- details.open = true;
755
754
  const summary = document.createElement('summary');
756
755
  summary.className = 'folded-tool-bar';
757
756
  const displayName = this.getToolUseDisplayName(toolName);