agentgui 1.0.328 → 1.0.330

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.328",
3
+ "version": "1.0.330",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -441,6 +441,16 @@ class AgentGUIClient {
441
441
  this.updateUrlForConversation(conversationId);
442
442
  this.loadConversationMessages(conversationId);
443
443
  });
444
+
445
+ // Listen for active conversation deletion
446
+ window.addEventListener('conversation-deselected', () => {
447
+ this.state.currentConversation = null;
448
+ this.updateUrlForConversation(null);
449
+ const outputEl = document.getElementById('output');
450
+ if (outputEl) outputEl.innerHTML = '';
451
+ if (this.ui.messageInput) this.ui.messageInput.value = '';
452
+ this.unlockAgentAndModel();
453
+ });
444
454
  }
445
455
 
446
456
  /**
@@ -544,8 +544,12 @@ class ConversationManager {
544
544
  }
545
545
 
546
546
  deleteConversation(convId) {
547
+ const wasActive = this.activeId === convId;
547
548
  this.conversations = this.conversations.filter(c => c.id !== convId);
548
- if (this.activeId === convId) this.activeId = null;
549
+ if (wasActive) {
550
+ this.activeId = null;
551
+ window.dispatchEvent(new CustomEvent('conversation-deselected'));
552
+ }
549
553
  this.render();
550
554
  }
551
555
 
@@ -392,12 +392,19 @@
392
392
  window.addEventListener('conversation-selected', function(e) {
393
393
  currentConversation = e.detail.conversationId;
394
394
  updateViewToggleVisibility();
395
- // If currently in files view, reload the iframe
396
395
  if (currentView === 'files') {
397
396
  switchView('files');
397
+ } else if (currentView === 'voice') {
398
+ switchView('chat');
398
399
  }
399
400
  });
400
401
 
402
+ window.addEventListener('conversation-deselected', function() {
403
+ currentConversation = null;
404
+ updateViewToggleVisibility();
405
+ switchView('chat');
406
+ });
407
+
401
408
  // Also listen for conversation created
402
409
  window.addEventListener('create-new-conversation', function() {
403
410
  // Will be updated when conversation-selected fires