agentgui 1.0.528 → 1.0.530

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.528",
3
+ "version": "1.0.530",
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
@@ -1143,92 +1143,6 @@
1143
1143
  scrollbar-color: #475569 transparent;
1144
1144
  }
1145
1145
 
1146
- /* ===== VOICE VIEW ===== */
1147
- .voice-container {
1148
- flex: 1;
1149
- min-height: 0;
1150
- overflow: hidden;
1151
- display: flex;
1152
- flex-direction: column;
1153
- }
1154
-
1155
- .voice-scroll {
1156
- flex: 1;
1157
- overflow-y: auto;
1158
- overflow-x: hidden;
1159
- padding: 1.5rem 2rem;
1160
- -webkit-overflow-scrolling: touch;
1161
- }
1162
-
1163
- .voice-messages {
1164
- display: flex;
1165
- flex-direction: column;
1166
- gap: 1rem;
1167
- }
1168
-
1169
- .voice-block {
1170
- padding: 1rem 1.25rem;
1171
- border-radius: 0.75rem;
1172
- background: var(--color-bg-secondary);
1173
- line-height: 1.7;
1174
- font-size: 1rem;
1175
- max-width: 85%;
1176
- margin-right: auto;
1177
- position: relative;
1178
- }
1179
-
1180
- .voice-block.speaking {
1181
- box-shadow: 0 0 0 2px var(--color-primary);
1182
- }
1183
-
1184
- .voice-block-user {
1185
- background: var(--color-primary);
1186
- color: white;
1187
- margin-left: auto;
1188
- margin-right: 0;
1189
- }
1190
-
1191
- .voice-input-section {
1192
- flex-shrink: 0;
1193
- background: var(--color-bg-primary);
1194
- padding: 0.75rem 1rem;
1195
- border-top: 1px solid var(--color-border);
1196
- }
1197
-
1198
- .voice-input-wrapper {
1199
- display: flex;
1200
- gap: 0.5rem;
1201
- align-items: center;
1202
- }
1203
-
1204
- .voice-transcript {
1205
- flex: 1;
1206
- min-height: 40px;
1207
- max-height: 100px;
1208
- padding: 0.5rem 0.875rem;
1209
- border-radius: 0.75rem;
1210
- background: var(--color-bg-secondary);
1211
- color: var(--color-text-primary);
1212
- font-size: 0.9375rem;
1213
- line-height: 1.5;
1214
- overflow-y: auto;
1215
- white-space: pre-wrap;
1216
- word-break: break-word;
1217
- font-family: inherit;
1218
- border: 1px solid var(--color-border);
1219
- resize: none;
1220
- }
1221
-
1222
- .voice-transcript::placeholder {
1223
- color: var(--color-text-secondary);
1224
- }
1225
-
1226
- .voice-transcript:focus {
1227
- outline: none;
1228
- border-color: var(--color-primary);
1229
- background: var(--color-bg-primary);
1230
- }
1231
-
1232
1146
  .voice-mic-btn {
1233
1147
  display: flex;
1234
1148
  align-items: center;
@@ -1283,121 +1197,11 @@
1283
1197
  height: 20px;
1284
1198
  }
1285
1199
 
1286
- .voice-send-btn {
1287
- flex-shrink: 0;
1288
- }
1289
-
1290
- .voice-tts-controls {
1291
- display: flex;
1292
- align-items: center;
1293
- justify-content: space-between;
1294
- margin-top: 0.5rem;
1295
- font-size: 0.8rem;
1296
- color: var(--color-text-secondary);
1297
- }
1298
-
1299
- .voice-toggle-label {
1300
- display: flex;
1301
- align-items: center;
1302
- gap: 0.375rem;
1303
- cursor: pointer;
1304
- user-select: none;
1305
- }
1306
-
1307
- .voice-toggle-label input[type="checkbox"] {
1308
- accent-color: var(--color-primary);
1309
- }
1310
-
1311
- .voice-stop-btn {
1312
- padding: 0.25rem 0.75rem;
1313
- background: var(--color-bg-secondary);
1314
- border: 1px solid var(--color-border);
1315
- border-radius: 0.375rem;
1316
- cursor: pointer;
1317
- font-size: 0.75rem;
1318
- color: var(--color-text-secondary);
1319
- transition: all 0.15s;
1320
- }
1321
-
1322
- .voice-stop-btn:hover {
1323
- background: var(--color-error);
1324
- color: white;
1325
- border-color: var(--color-error);
1326
- }
1327
-
1328
- .voice-selector-wrapper {
1329
- display: flex;
1330
- align-items: center;
1331
- gap: 0.25rem;
1332
- }
1333
-
1334
- .voice-selector {
1335
- padding: 0.2rem 0.5rem;
1336
- border: 1px solid var(--color-border);
1337
- border-radius: 0.375rem;
1338
- background: var(--color-bg-secondary);
1339
- color: var(--color-text-primary);
1340
- font-size: 0.75rem;
1341
- cursor: pointer;
1342
- max-width: 160px;
1343
- }
1344
-
1345
- .voice-selector:focus {
1346
- outline: none;
1347
- border-color: var(--color-primary);
1348
- }
1349
-
1350
- .voice-empty {
1351
- text-align: center;
1352
- color: var(--color-text-secondary);
1353
- padding: 4rem 2rem;
1354
- font-size: 1rem;
1355
- }
1356
-
1357
- .voice-empty-icon {
1358
- font-size: 3rem;
1359
- margin-bottom: 1rem;
1360
- opacity: 0.3;
1361
- }
1362
-
1363
1200
  .conversation-messages { contain: content; }
1364
1201
  .streaming-blocks { contain: content; }
1365
1202
  .sidebar-list { contain: strict; content-visibility: auto; }
1366
1203
  .message { contain: layout style; content-visibility: auto; contain-intrinsic-size: auto 80px; }
1367
1204
 
1368
- .voice-block .voice-result-stats {
1369
- font-size: 0.8rem;
1370
- color: var(--color-text-secondary);
1371
- margin-top: 0.5rem;
1372
- padding-top: 0.5rem;
1373
- border-top: 1px solid var(--color-border);
1374
- }
1375
-
1376
- .voice-block-content {
1377
- white-space: pre-wrap;
1378
- display: block;
1379
- }
1380
-
1381
- .voice-reread-btn {
1382
- position: absolute;
1383
- top: 0.5rem;
1384
- right: 0.5rem;
1385
- background: none;
1386
- border: 1px solid var(--color-border);
1387
- border-radius: 0.25rem;
1388
- cursor: pointer;
1389
- padding: 0.25rem;
1390
- color: var(--color-text-secondary);
1391
- opacity: 0;
1392
- transition: opacity 0.15s, background-color 0.15s;
1393
- display: flex;
1394
- align-items: center;
1395
- justify-content: center;
1396
- }
1397
-
1398
- .voice-block:hover .voice-reread-btn { opacity: 1; }
1399
- .voice-reread-btn:hover { background: var(--color-bg-primary); color: var(--color-primary); }
1400
-
1401
1205
  /* ===== RESPONSIVE: TABLET ===== */
1402
1206
  @media (min-width: 769px) and (max-width: 1024px) {
1403
1207
  :root { --sidebar-width: 260px; }
@@ -3170,7 +2974,6 @@
3170
2974
  <div class="view-toggle-bar" id="viewToggleBar">
3171
2975
  <button class="view-toggle-btn active" data-view="chat" title="Chat"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg></button>
3172
2976
  <button class="view-toggle-btn" data-view="files" title="Files"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg></button>
3173
- <button class="view-toggle-btn" data-view="voice" id="voiceTabBtn" style="display:none;" title="Voice"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg></button>
3174
2977
  <button class="view-toggle-btn" data-view="terminal" id="terminalTabBtn" title="Terminal"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg></button>
3175
2978
  </div>
3176
2979
 
@@ -3197,45 +3000,6 @@
3197
3000
  <div id="terminalOutput" class="terminal-output"></div>
3198
3001
  </div>
3199
3002
 
3200
- <!-- Voice STT/TTS view -->
3201
- <div id="voiceContainer" class="voice-container" style="display:none;">
3202
- <div id="voiceScroll" class="voice-scroll">
3203
- <div class="voice-messages" id="voiceMessages"></div>
3204
- </div>
3205
- <div class="voice-input-section">
3206
- <div class="voice-input-wrapper">
3207
- <select class="agent-selector voice-agent-selector" data-voice-agent-selector title="Select agent"></select>
3208
- <select class="agent-selector voice-cli-selector" data-voice-cli-selector title="Select CLI tool"></select>
3209
- <select class="agent-selector voice-model-selector" data-voice-model-selector title="Select model"></select>
3210
- <textarea class="voice-transcript" id="voiceTranscript" placeholder="Type or tap mic and speak..." spellcheck="true"></textarea>
3211
- <button class="voice-mic-btn" id="voiceMicBtn" title="Toggle recording" aria-label="Voice input">
3212
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3213
- <path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"/>
3214
- <path d="M19 10v2a7 7 0 0 1-14 0v-2"/>
3215
- <line x1="12" y1="19" x2="12" y2="23"/>
3216
- <line x1="8" y1="23" x2="16" y2="23"/>
3217
- </svg>
3218
- </button>
3219
- <button class="send-btn voice-send-btn" id="voiceSendBtn" title="Send message" aria-label="Send message">
3220
- <svg viewBox="0 0 24 24" fill="currentColor">
3221
- <path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/>
3222
- </svg>
3223
- </button>
3224
- </div>
3225
- <div class="voice-tts-controls">
3226
- <label class="voice-toggle-label">
3227
- <input type="checkbox" id="voiceTTSToggle" checked>
3228
- <span>Auto-speak responses</span>
3229
- </label>
3230
- <div class="voice-selector-wrapper">
3231
- <select class="voice-selector" id="voiceSelector" title="Select voice">
3232
- <option value="default">Default</option>
3233
- </select>
3234
- </div>
3235
- <button class="voice-stop-btn" id="voiceStopSpeaking" title="Stop speaking">Stop</button>
3236
- </div>
3237
- </div>
3238
- </div>
3239
3003
 
3240
3004
  <!-- Input area: fixed at bottom -->
3241
3005
  <div class="input-section">
@@ -3316,8 +3080,8 @@
3316
3080
  <script defer src="/gm/js/script-runner.js"></script>
3317
3081
  <script defer src="/gm/js/tools-manager.js"></script>
3318
3082
  <script defer src="/gm/js/stt-handler.js"></script>
3083
+ <script defer src="/gm/js/voice.js"></script>
3319
3084
  <script defer src="/gm/js/client.js"></script>
3320
- <script type="module" src="/gm/js/voice.js"></script>
3321
3085
  <script defer src="/gm/js/features.js"></script>
3322
3086
  <script defer src="/gm/js/agent-auth.js"></script>
3323
3087
 
@@ -362,8 +362,6 @@ class AgentGUIClient {
362
362
  this.ui.cliSelector = document.querySelector('[data-cli-selector]');
363
363
  this.ui.agentSelector = document.querySelector('[data-agent-selector]');
364
364
  this.ui.modelSelector = document.querySelector('[data-model-selector]');
365
- this.ui.voiceCliSelector = document.querySelector('[data-voice-cli-selector]');
366
- this.ui.voiceModelSelector = document.querySelector('[data-voice-model-selector]');
367
365
 
368
366
  if (this.ui.cliSelector) {
369
367
  this.ui.cliSelector.addEventListener('change', () => {
@@ -606,9 +604,6 @@ class AgentGUIClient {
606
604
  case 'model_download_progress':
607
605
  this._handleModelDownloadProgress(data.progress || data);
608
606
  break;
609
- case 'stt_progress':
610
- this._handleSTTProgress(data);
611
- break;
612
607
  case 'tts_setup_progress':
613
608
  this._handleTTSSetupProgress(data);
614
609
  break;
@@ -2215,23 +2210,6 @@ class AgentGUIClient {
2215
2210
  }
2216
2211
  }
2217
2212
 
2218
- _handleSTTProgress(data) {
2219
- const el = document.getElementById('voiceTranscript');
2220
- if (!el) return;
2221
-
2222
- if (data.status === 'transcribing') {
2223
- el.textContent = 'Transcribing...';
2224
- el.classList.add('transcribing');
2225
- } else if (data.status === 'completed') {
2226
- el.textContent = data.transcript || '';
2227
- el.setAttribute('data-final', data.transcript || '');
2228
- el.classList.remove('transcribing');
2229
- } else if (data.status === 'failed') {
2230
- el.textContent = 'Transcription failed: ' + (data.error || 'unknown error');
2231
- el.classList.remove('transcribing');
2232
- }
2233
- }
2234
-
2235
2213
  _handleTTSSetupProgress(data) {
2236
2214
  if (data.step && data.status) {
2237
2215
  console.log('[TTS Setup]', data.step, ':', data.status, data.message || '');
@@ -2753,22 +2731,6 @@ class AgentGUIClient {
2753
2731
  };
2754
2732
  }
2755
2733
 
2756
- _handleSTTProgress(data) {
2757
- if (!data) return;
2758
- const transcriptEl = document.getElementById('voiceTranscript');
2759
- if (!transcriptEl) return;
2760
- if (data.status === 'transcribing') {
2761
- transcriptEl.textContent = 'Transcribing...';
2762
- transcriptEl.style.color = 'var(--color-text-secondary)';
2763
- } else if (data.status === 'completed' && data.transcript) {
2764
- transcriptEl.textContent = data.transcript;
2765
- transcriptEl.style.color = 'var(--color-text-primary)';
2766
- } else if (data.status === 'failed') {
2767
- transcriptEl.textContent = 'Transcription failed: ' + (data.error || 'Unknown error');
2768
- transcriptEl.style.color = 'var(--color-error)';
2769
- }
2770
- }
2771
-
2772
2734
  /**
2773
2735
  * Cleanup resources
2774
2736
  */
@@ -93,7 +93,6 @@
93
93
  function setupModelProgressIndicator() {
94
94
  var indicator = document.getElementById('modelDlIndicator');
95
95
  var tooltip = document.getElementById('modelDlTooltip');
96
- var voiceBtn = document.getElementById('voiceTabBtn');
97
96
  var progressCircle = indicator ? indicator.querySelector('.progress') : null;
98
97
  var circumference = 62.83;
99
98
 
@@ -103,7 +102,6 @@
103
102
  var progress = data.progress || data;
104
103
  if (progress.done && progress.complete) {
105
104
  if (indicator) indicator.classList.remove('active');
106
- if (voiceBtn) voiceBtn.style.display = '';
107
105
  return;
108
106
  }
109
107
  if (progress.error || progress.status === 'failed') {
@@ -130,7 +128,6 @@
130
128
  window.wsClient.rpc('speech.status')
131
129
  .then(function(status) {
132
130
  if (status.modelsComplete) {
133
- if (voiceBtn) voiceBtn.style.display = '';
134
131
  if (indicator) indicator.classList.remove('active');
135
132
  } else if (status.modelsDownloading) {
136
133
  if (indicator) indicator.classList.add('active');
@@ -147,7 +144,6 @@
147
144
  var execPanel = document.querySelector('.input-section');
148
145
  var fileBrowser = document.getElementById('fileBrowserContainer');
149
146
  var fileIframe = document.getElementById('fileBrowserIframe');
150
- var voiceContainer = document.getElementById('voiceContainer');
151
147
  var terminalContainer = document.getElementById('terminalContainer');
152
148
  if (!bar) return;
153
149
  bar.querySelectorAll('.view-toggle-btn').forEach(function(btn) {
@@ -156,14 +152,11 @@
156
152
  if (chatArea) chatArea.style.display = view === 'chat' ? '' : 'none';
157
153
  if (execPanel) execPanel.style.display = view === 'chat' ? '' : 'none';
158
154
  if (fileBrowser) fileBrowser.style.display = view === 'files' ? 'flex' : 'none';
159
- if (voiceContainer) voiceContainer.style.display = view === 'voice' ? 'flex' : 'none';
160
155
  if (terminalContainer) terminalContainer.style.display = view === 'terminal' ? 'flex' : 'none';
161
156
  if (view === 'files' && fileIframe && currentConversation) {
162
157
  var src = BASE + '/files/' + currentConversation + '/';
163
158
  if (fileIframe.src !== location.origin + src) fileIframe.src = src;
164
159
  }
165
- if (view === 'voice' && window.voiceModule) window.voiceModule.activate();
166
- else if (view !== 'voice' && window.voiceModule) window.voiceModule.deactivate();
167
160
  window.dispatchEvent(new CustomEvent('view-switched', { detail: { view: view } }));
168
161
  }
169
162
 
@@ -178,7 +171,6 @@
178
171
  currentConversation = e.detail.conversationId;
179
172
  updateViewToggleVisibility();
180
173
  if (currentView === 'files') switchView('files');
181
- else if (currentView === 'voice') switchView('chat');
182
174
  });
183
175
  window.addEventListener('conversation-deselected', function() {
184
176
  currentConversation = null;