agentgui 1.0.548 → 1.0.550

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.548",
3
+ "version": "1.0.550",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -1005,10 +1005,14 @@ const server = http.createServer(async (req, res) => {
1005
1005
 
1006
1006
  if (pathOnly === '/api/conversations' && req.method === 'GET') {
1007
1007
  const conversations = queries.getConversationsList();
1008
- // Filter out stale streaming state for conversations not in activeExecutions
1008
+ // Filter out stale streaming state: check both activeExecutions AND database active sessions
1009
1009
  for (const conv of conversations) {
1010
- if (conv.isStreaming && !activeExecutions.has(conv.id)) {
1011
- conv.isStreaming = 0;
1010
+ if (conv.isStreaming) {
1011
+ const hasActiveSession = queries.getSessionsByStatus(conv.id, 'active').length > 0 ||
1012
+ queries.getSessionsByStatus(conv.id, 'pending').length > 0;
1013
+ if (!activeExecutions.has(conv.id) && !hasActiveSession) {
1014
+ conv.isStreaming = 0;
1015
+ }
1012
1016
  }
1013
1017
  }
1014
1018
  sendJSON(req, res, 200, { conversations });
@@ -4452,7 +4456,7 @@ function recoverStaleSessions() {
4452
4456
  async function resumeInterruptedStreams() {
4453
4457
  try {
4454
4458
  const resumableConvs = queries.getResumableConversations ? queries.getResumableConversations() : [];
4455
- const toResume = resumableConvs.filter(c => c.agentType === 'claude-code');
4459
+ const toResume = resumableConvs;
4456
4460
 
4457
4461
  if (toResume.length === 0) return;
4458
4462
 
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 {
@@ -1439,6 +1439,7 @@ class AgentGUIClient {
1439
1439
 
1440
1440
  this.lockAgentAndModel(agentId, model);
1441
1441
  await this.streamToConversation(conv.id, savedPrompt, agentId, model, subAgent);
1442
+ this.clearDraft(conv.id);
1442
1443
  this._confirmOptimisticMessage(pendingId);
1443
1444
  } else {
1444
1445
  const agentId = this.getCurrentAgent();
@@ -1458,6 +1459,7 @@ class AgentGUIClient {
1458
1459
  }
1459
1460
 
1460
1461
  await this.streamToConversation(conversation.id, savedPrompt, agentId, model, subAgent);
1462
+ this.clearDraft(conversation.id);
1461
1463
  this._confirmOptimisticMessage(pendingId);
1462
1464
  }
1463
1465
  } catch (error) {
@@ -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);