agentgui 1.0.660 → 1.0.661

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.660",
3
+ "version": "1.0.661",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/static/index.html CHANGED
@@ -3047,7 +3047,7 @@
3047
3047
  <button class="clone-cancel-btn" id="cloneCancelBtn" title="Cancel">&times;</button>
3048
3048
  </div>
3049
3049
  <ul class="sidebar-list" data-conversation-list>
3050
- <li class="sidebar-empty" data-conversation-empty>No conversations yet</li>
3050
+ <li class="sidebar-empty" data-conversation-empty>Loading...</li>
3051
3051
  </ul>
3052
3052
  <!-- PM2 Monitor Panel: hidden until active processes detected -->
3053
3053
  <div class="pm2-monitor-panel" id="pm2MonitorPanel" style="display:none">
@@ -46,13 +46,14 @@ class ConversationManager {
46
46
  async init() {
47
47
  this.newBtn?.addEventListener('click', () => this.openFolderBrowser());
48
48
  this.setupDelegatedListeners();
49
- await this.loadAgents();
50
- this.loadConversations();
49
+ this.showLoading();
51
50
  this.setupWebSocketListener();
52
51
  this.setupFolderBrowser();
53
52
  this.setupCloneUI();
54
53
  this.setupDeleteAllButton();
55
54
 
55
+ await Promise.all([this.loadAgents(), this.loadConversations()]);
56
+
56
57
  this._pollInterval = setInterval(() => this.loadConversations(), 30000);
57
58
 
58
59
  window.addEventListener('beforeunload', () => this.destroy());
@@ -67,7 +68,10 @@ class ConversationManager {
67
68
 
68
69
  async loadAgents() {
69
70
  try {
70
- const data = await window.wsClient.rpc('agent.ls');
71
+ const base = window.__BASE_URL || '/gm';
72
+ const res = await fetch(base + '/api/agents');
73
+ if (!res.ok) throw new Error('HTTP ' + res.status);
74
+ const data = await res.json();
71
75
  for (const agent of data.agents || []) {
72
76
  this.agents.set(agent.id, agent);
73
77
  }
@@ -409,9 +413,21 @@ class ConversationManager {
409
413
  }
410
414
  }
411
415
 
416
+ showLoading() {
417
+ if (!this.listEl) return;
418
+ this.listEl.innerHTML = '';
419
+ if (this.emptyEl) {
420
+ this.emptyEl.textContent = 'Loading...';
421
+ this.emptyEl.style.display = 'block';
422
+ }
423
+ }
424
+
412
425
  async loadConversations() {
413
426
  try {
414
- const data = await window.wsClient.rpc('conv.ls');
427
+ const base = window.__BASE_URL || '/gm';
428
+ const res = await fetch(base + '/api/conversations');
429
+ if (!res.ok) throw new Error('HTTP ' + res.status);
430
+ const data = await res.json();
415
431
  const convList = data.conversations || [];
416
432
 
417
433
  this._updateConversations(convList, 'poll');