agentgui 1.0.123 → 1.0.124

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.123",
3
+ "version": "1.0.124",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -451,8 +451,10 @@ class StreamingRenderer {
451
451
  });
452
452
  });
453
453
 
454
- const codeContainer = document.createElement('pre');
455
- codeContainer.innerHTML = `<code class="language-${this.escapeHtml(language)}">${this.escapeHtml(code)}</code>`;
454
+ // Use syntax highlighting instead of just escaping
455
+ const highlightedHTML = StreamingRenderer.renderCodeWithHighlight(code, this.escapeHtml.bind(this));
456
+ const codeContainer = document.createElement('div');
457
+ codeContainer.innerHTML = highlightedHTML;
456
458
 
457
459
  div.appendChild(header);
458
460
  div.appendChild(codeContainer);
@@ -1157,11 +1159,19 @@ class StreamingRenderer {
1157
1159
  const command = block.command || block.code || '';
1158
1160
  const output = block.output || '';
1159
1161
 
1160
- div.innerHTML = `
1161
- <div class="bash-command"><span class="prompt">$</span><code>${this.escapeHtml(command)}</code></div>
1162
- ${output ? `<pre class="bash-output"><code>${this.escapeHtml(output)}</code></pre>` : ''}
1163
- `;
1162
+ // For the command, use simple escaping
1163
+ let html = `<div class="bash-command"><span class="prompt">$</span><code>${this.escapeHtml(command)}</code></div>`;
1164
1164
 
1165
+ // For output, check if it looks like code and use syntax highlighting
1166
+ if (output) {
1167
+ if (StreamingRenderer.detectCodeContent(output)) {
1168
+ html += StreamingRenderer.renderCodeWithHighlight(output, this.escapeHtml.bind(this));
1169
+ } else {
1170
+ html += `<pre class="bash-output"><code>${this.escapeHtml(output)}</code></pre>`;
1171
+ }
1172
+ }
1173
+
1174
+ div.innerHTML = html;
1165
1175
  return div;
1166
1176
  }
1167
1177