agentgui 1.0.329 → 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 +1 -1
- package/static/js/client.js +10 -0
- package/static/js/conversations.js +5 -1
- package/static/js/features.js +6 -0
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -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 (
|
|
549
|
+
if (wasActive) {
|
|
550
|
+
this.activeId = null;
|
|
551
|
+
window.dispatchEvent(new CustomEvent('conversation-deselected'));
|
|
552
|
+
}
|
|
549
553
|
this.render();
|
|
550
554
|
}
|
|
551
555
|
|
package/static/js/features.js
CHANGED
|
@@ -399,6 +399,12 @@
|
|
|
399
399
|
}
|
|
400
400
|
});
|
|
401
401
|
|
|
402
|
+
window.addEventListener('conversation-deselected', function() {
|
|
403
|
+
currentConversation = null;
|
|
404
|
+
updateViewToggleVisibility();
|
|
405
|
+
switchView('chat');
|
|
406
|
+
});
|
|
407
|
+
|
|
402
408
|
// Also listen for conversation created
|
|
403
409
|
window.addEventListener('create-new-conversation', function() {
|
|
404
410
|
// Will be updated when conversation-selected fires
|