agentgui 1.0.543 → 1.0.545

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.543",
3
+ "version": "1.0.545",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -3360,7 +3360,7 @@ function serveFile(filePath, res, req) {
3360
3360
  'Content-Type': contentType,
3361
3361
  'Content-Length': stats.size,
3362
3362
  'ETag': etag,
3363
- 'Cache-Control': 'public, max-age=3600, must-revalidate'
3363
+ 'Cache-Control': ['.js', '.css'].includes(ext) ? 'no-cache' : 'public, max-age=3600, must-revalidate'
3364
3364
  };
3365
3365
  if (acceptsEncoding(req, 'br') && stats.size > 860) {
3366
3366
  const stream = fs.createReadStream(filePath);
@@ -190,6 +190,20 @@ class AgentGUIClient {
190
190
  const dot = document.querySelector('.connection-dot');
191
191
  if (dot) dot.classList.remove('degrading');
192
192
  });
193
+
194
+ // Preserve controls state across tab switches
195
+ window.addEventListener('view-switched', (e) => {
196
+ const view = e.detail.view;
197
+ if (view === 'chat') {
198
+ const convId = this.state.currentConversation?.id;
199
+ const isStreaming = convId && this.state.streamingConversations.has(convId);
200
+ if (isStreaming) {
201
+ this.disableControls();
202
+ } else {
203
+ this.enableControls();
204
+ }
205
+ }
206
+ });
193
207
  }
194
208
 
195
209
  /**
@@ -873,6 +873,17 @@ class StreamingRenderer {
873
873
  }
874
874
  }
875
875
 
876
+ // Handle Claude image content block arrays: [{type:"image", source:{type:"base64", data:"...", media_type:"..."}}]
877
+ if (Array.isArray(parsed) && parsed.length > 0) {
878
+ const imgParts = parsed.filter(b => b.type === 'image' && b.source && b.source.type === 'base64' && b.source.data);
879
+ if (imgParts.length > 0) {
880
+ return imgParts.map(b => {
881
+ const mime = b.source.media_type || 'image/png';
882
+ return `<div style="padding:0.5rem"><img src="data:${esc(mime)};base64,${b.source.data}" style="max-width:100%;max-height:24rem;border-radius:0.375rem"></div>`;
883
+ }).join('');
884
+ }
885
+ }
886
+
876
887
  // For other JSON, render as itemized key-value structure
877
888
  return `<div style="padding:0.5rem 0.75rem">${StreamingRenderer.renderParamsHTML(parsed, 0, esc)}</div>`;
878
889
  } catch (e) {