agentgui 1.0.547 → 1.0.549

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.547",
3
+ "version": "1.0.549",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -4452,7 +4452,7 @@ function recoverStaleSessions() {
4452
4452
  async function resumeInterruptedStreams() {
4453
4453
  try {
4454
4454
  const resumableConvs = queries.getResumableConversations ? queries.getResumableConversations() : [];
4455
- const toResume = resumableConvs.filter(c => c.agentType === 'claude-code');
4455
+ const toResume = resumableConvs;
4456
4456
 
4457
4457
  if (toResume.length === 0) return;
4458
4458
 
package/static/index.html CHANGED
@@ -578,16 +578,15 @@
578
578
  }
579
579
 
580
580
  .message-user {
581
- background-color: var(--color-primary);
582
- color: white;
583
581
  margin-left: auto;
584
582
  border-bottom-right-radius: 0.25rem;
583
+ color: var(--color-text-primary);
585
584
  }
586
585
 
587
586
  .message-assistant {
588
- background-color: var(--color-bg-secondary);
589
587
  margin-right: auto;
590
588
  border-bottom-left-radius: 0.25rem;
589
+ color: var(--color-text-primary);
591
590
  }
592
591
 
593
592
  /* Consecutive assistant messages: join them visually */
@@ -609,11 +608,10 @@
609
608
  text-transform: uppercase;
610
609
  letter-spacing: 0.04em;
611
610
  margin-bottom: 0.125rem;
612
- opacity: 0.7;
613
611
  }
614
612
 
615
- .message-user .message-role { color: rgba(255,255,255,0.8); }
616
- .message-assistant .message-role { color: var(--color-text-secondary); }
613
+ .message-user .message-role { color: #7a9abf; }
614
+ .message-assistant .message-role { color: #8a9a7a; }
617
615
 
618
616
  .message-content {
619
617
  font-size: 0.9rem;
@@ -625,10 +623,10 @@
625
623
  .message-timestamp {
626
624
  font-size: 0.7rem;
627
625
  margin-top: 0.25rem;
628
- opacity: 0.6;
626
+ opacity: 0.5;
629
627
  }
630
628
 
631
- .message-user .message-timestamp { color: rgba(255,255,255,0.7); }
629
+ .message-user .message-timestamp { color: var(--color-text-secondary); }
632
630
  .message-assistant .message-timestamp { color: var(--color-text-secondary); }
633
631
 
634
632
  .message-blocks {
@@ -166,6 +166,7 @@ class AgentGUIClient {
166
166
  this._subscribeToConversationUpdates();
167
167
  this._recoverMissedChunks();
168
168
  this.updateSendButtonState();
169
+ this.enablePromptArea();
169
170
  this.emit('ws:connected');
170
171
  });
171
172
 
@@ -173,6 +174,7 @@ class AgentGUIClient {
173
174
  console.log('WebSocket disconnected');
174
175
  this.updateConnectionStatus('disconnected');
175
176
  this.updateSendButtonState();
177
+ this.disablePromptArea();
176
178
  this.emit('ws:disconnected');
177
179
  });
178
180
 
@@ -1437,6 +1439,7 @@ class AgentGUIClient {
1437
1439
 
1438
1440
  this.lockAgentAndModel(agentId, model);
1439
1441
  await this.streamToConversation(conv.id, savedPrompt, agentId, model, subAgent);
1442
+ this.clearDraft(conv.id);
1440
1443
  this._confirmOptimisticMessage(pendingId);
1441
1444
  } else {
1442
1445
  const agentId = this.getCurrentAgent();
@@ -1456,6 +1459,7 @@ class AgentGUIClient {
1456
1459
  }
1457
1460
 
1458
1461
  await this.streamToConversation(conversation.id, savedPrompt, agentId, model, subAgent);
1462
+ this.clearDraft(conversation.id);
1459
1463
  this._confirmOptimisticMessage(pendingId);
1460
1464
  }
1461
1465
  } catch (error) {
@@ -2326,29 +2330,23 @@ class AgentGUIClient {
2326
2330
 
2327
2331
  /**
2328
2332
  * Disable UI controls during streaming
2333
+ * NOTE: Only disables stop button visibility. Prompt, input, and inject remain enabled.
2329
2334
  */
2330
2335
  disableControls() {
2331
- if (this.ui.messageInput) {
2332
- this.ui.messageInput.disabled = true;
2333
- }
2334
- // Send button state managed by WebSocket connection, not streaming state
2335
- const injectBtn = document.getElementById('injectBtn');
2336
+ // Prompt area and inject button are NEVER disabled during streaming
2337
+ // Only stop button behavior changes
2336
2338
  const stopBtn = document.getElementById('stopBtn');
2337
- if (injectBtn) injectBtn.disabled = true;
2338
2339
  if (stopBtn) stopBtn.disabled = false;
2339
2340
  }
2340
2341
 
2341
2342
  /**
2342
2343
  * Enable UI controls
2344
+ * NOTE: Restores stop button visibility. Prompt area always stays enabled.
2343
2345
  */
2344
2346
  enableControls() {
2345
- if (this.ui.messageInput) {
2346
- this.ui.messageInput.disabled = false;
2347
- }
2348
- // Send button state managed by WebSocket connection, not streaming state
2349
- const injectBtn = document.getElementById('injectBtn');
2347
+ // Prompt area and inject button are always enabled unless disconnected
2348
+ // Only stop button behavior changes
2350
2349
  const stopBtn = document.getElementById('stopBtn');
2351
- if (injectBtn) injectBtn.disabled = false;
2352
2350
  if (stopBtn) stopBtn.disabled = true;
2353
2351
  }
2354
2352
 
@@ -2958,6 +2956,28 @@ class AgentGUIClient {
2958
2956
  }
2959
2957
  }
2960
2958
 
2959
+ /**
2960
+ * Disable prompt area (input and inject button) only on disconnect
2961
+ */
2962
+ disablePromptArea() {
2963
+ if (this.ui.messageInput) {
2964
+ this.ui.messageInput.disabled = true;
2965
+ }
2966
+ const injectBtn = document.getElementById('injectBtn');
2967
+ if (injectBtn) injectBtn.disabled = true;
2968
+ }
2969
+
2970
+ /**
2971
+ * Enable prompt area (input and inject button) on connect
2972
+ */
2973
+ enablePromptArea() {
2974
+ if (this.ui.messageInput) {
2975
+ this.ui.messageInput.disabled = false;
2976
+ }
2977
+ const injectBtn = document.getElementById('injectBtn');
2978
+ if (injectBtn) injectBtn.disabled = false;
2979
+ }
2980
+
2961
2981
  /**
2962
2982
  * Cleanup resources
2963
2983
  */
@@ -78,6 +78,11 @@ class ConversationManager {
78
78
  return agent?.name || agentId;
79
79
  }
80
80
 
81
+ formatModelLabel(model) {
82
+ if (!model) return '';
83
+ return ' (' + model.replace(/^claude-/i, '').replace(/-\d{8,}.*$/, '').replace(/-/g, ' ') + ')';
84
+ }
85
+
81
86
  setupDelegatedListeners() {
82
87
  this.listEl.addEventListener('click', (e) => {
83
88
  const deleteBtn = e.target.closest('[data-delete-conv]');
@@ -430,7 +435,7 @@ class ConversationManager {
430
435
  const title = conv.title || `Conversation ${conv.id.slice(0, 8)}`;
431
436
  const timestamp = conv.created_at ? new Date(conv.created_at).toLocaleDateString() : 'Unknown';
432
437
  const agent = this.getAgentDisplayName(conv.agentId || conv.agentType);
433
- const modelLabel = conv.model ? ` (${conv.model})` : '';
438
+ const modelLabel = this.formatModelLabel(conv.model);
434
439
  const wd = conv.workingDirectory ? pathBasename(conv.workingDirectory) : '';
435
440
  const metaParts = [agent + modelLabel, timestamp];
436
441
  if (wd) metaParts.push(wd);
@@ -458,7 +463,7 @@ class ConversationManager {
458
463
  const title = conv.title || `Conversation ${conv.id.slice(0, 8)}`;
459
464
  const timestamp = conv.created_at ? new Date(conv.created_at).toLocaleDateString() : 'Unknown';
460
465
  const agent = this.getAgentDisplayName(conv.agentId || conv.agentType);
461
- const modelLabel = conv.model ? ` (${conv.model})` : '';
466
+ const modelLabel = this.formatModelLabel(conv.model);
462
467
  const wd = conv.workingDirectory ? pathBasename(conv.workingDirectory) : '';
463
468
  const metaParts = [agent + modelLabel, timestamp];
464
469
  if (wd) metaParts.push(wd);