agentgui 1.0.790 → 1.0.791

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.790",
3
+ "version": "1.0.791",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
@@ -1379,9 +1379,11 @@ class AgentGUIClient {
1379
1379
  }
1380
1380
 
1381
1381
  outputEl.querySelectorAll('p.text-secondary').forEach(p => p.remove());
1382
+ const safeRole = this.escapeHtml(data.message.role || 'user');
1383
+ const safeId = this.escapeHtml(data.message.id || '');
1382
1384
  const messageHtml = `
1383
- <div class="message message-${data.message.role}" data-msg-id="${data.message.id}">
1384
- <div class="message-role">${data.message.role.charAt(0).toUpperCase() + data.message.role.slice(1)}</div>
1385
+ <div class="message message-${safeRole}" data-msg-id="${safeId}">
1386
+ <div class="message-role">${safeRole.charAt(0).toUpperCase() + safeRole.slice(1)}</div>
1385
1387
  ${this.renderMessageContent(data.message.content)}
1386
1388
  <div class="message-timestamp">${new Date(data.message.created_at).toLocaleString()}</div>
1387
1389
  </div>
@@ -1893,7 +1895,9 @@ class AgentGUIClient {
1893
1895
  const dedupedChunks = chunks.filter(c => !seenSeqs || !seenSeqs.has(c.sequence));
1894
1896
 
1895
1897
  if (dedupedChunks.length > 0) {
1896
- for (const chunk of dedupedChunks) this.renderChunk(chunk);
1898
+ for (const chunk of dedupedChunks) {
1899
+ try { this.renderChunk(chunk); } catch (chunkErr) { console.warn('Skipping bad chunk:', chunkErr.message); }
1900
+ }
1897
1901
  }
1898
1902
  } catch (e) {
1899
1903
  console.warn('Chunk recovery failed:', e.message);