agentgui 1.0.157 → 1.0.158

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.157",
3
+ "version": "1.0.158",
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
@@ -2084,21 +2084,7 @@
2084
2084
  <!-- Input area: fixed at bottom -->
2085
2085
  <div class="input-section">
2086
2086
  <div class="input-wrapper">
2087
- <select class="agent-selector" data-agent-selector title="Select agent">
2088
- <option value="claude-code">Claude Code</option>
2089
- <option value="opencode">OpenCode</option>
2090
- <option value="gemini">Gemini CLI</option>
2091
- <option value="goose">Goose</option>
2092
- <option value="openhands">OpenHands</option>
2093
- <option value="augment">Augment Code</option>
2094
- <option value="cline">Cline</option>
2095
- <option value="kimi">Kimi CLI</option>
2096
- <option value="qwen">Qwen Code</option>
2097
- <option value="codex">Codex CLI</option>
2098
- <option value="mistral">Mistral Vibe</option>
2099
- <option value="kiro">Kiro CLI</option>
2100
- <option value="fast-agent">fast-agent</option>
2101
- </select>
2087
+ <select class="agent-selector" data-agent-selector title="Select agent"></select>
2102
2088
  <textarea
2103
2089
  class="message-textarea"
2104
2090
  data-message-input
@@ -1154,13 +1154,15 @@ class AgentGUIClient {
1154
1154
  const { agents } = await response.json();
1155
1155
  this.state.agents = agents;
1156
1156
 
1157
- // Populate agent selector
1157
+ // Populate agent selector with discovered (available) agents only
1158
1158
  if (this.ui.agentSelector) {
1159
1159
  this.ui.agentSelector.innerHTML = agents
1160
1160
  .map(agent => `<option value="${agent.id}">${agent.name}</option>`)
1161
1161
  .join('');
1162
1162
  }
1163
1163
 
1164
+ window.dispatchEvent(new CustomEvent('agents-loaded', { detail: { agents } }));
1165
+
1164
1166
  return agents;
1165
1167
  } catch (error) {
1166
1168
  console.error('Failed to load agents:', error);
@@ -22,13 +22,20 @@
22
22
  setupAgentSelector();
23
23
  }
24
24
 
25
+ function syncVoiceSelector() {
26
+ var voiceSelector = document.querySelector('[data-voice-agent-selector]');
27
+ var mainSelector = document.querySelector('[data-agent-selector]');
28
+ if (!voiceSelector || !mainSelector) return;
29
+ voiceSelector.innerHTML = mainSelector.innerHTML;
30
+ if (mainSelector.value) voiceSelector.value = mainSelector.value;
31
+ }
32
+
25
33
  function setupAgentSelector() {
26
34
  var voiceSelector = document.querySelector('[data-voice-agent-selector]');
27
35
  if (!voiceSelector) return;
28
36
  var mainSelector = document.querySelector('[data-agent-selector]');
29
37
  if (mainSelector) {
30
- voiceSelector.innerHTML = mainSelector.innerHTML;
31
- voiceSelector.value = mainSelector.value;
38
+ syncVoiceSelector();
32
39
  mainSelector.addEventListener('change', function() {
33
40
  voiceSelector.value = mainSelector.value;
34
41
  });
@@ -36,6 +43,7 @@
36
43
  mainSelector.value = voiceSelector.value;
37
44
  });
38
45
  }
46
+ window.addEventListener('agents-loaded', syncVoiceSelector);
39
47
  }
40
48
 
41
49
  function setupTTSToggle() {