agentgui 1.0.764 → 1.0.765

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.764",
3
+ "version": "1.0.765",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
@@ -276,7 +276,8 @@
276
276
  }
277
277
 
278
278
  .conversation-item-delete,
279
- .conversation-item-archive {
279
+ .conversation-item-archive,
280
+ .conversation-item-export {
280
281
  flex-shrink: 0;
281
282
  width: 28px;
282
283
  height: 28px;
@@ -294,7 +295,8 @@
294
295
  }
295
296
 
296
297
  .conversation-item:hover .conversation-item-delete,
297
- .conversation-item:hover .conversation-item-archive {
298
+ .conversation-item:hover .conversation-item-archive,
299
+ .conversation-item:hover .conversation-item-export {
298
300
  opacity: 1;
299
301
  }
300
302
 
@@ -303,18 +305,25 @@
303
305
  color: white;
304
306
  }
305
307
 
308
+ .conversation-item-export:hover {
309
+ background-color: #3b82f6;
310
+ color: white;
311
+ }
312
+
306
313
  .conversation-item-archive:hover {
307
314
  background-color: #f59e0b;
308
315
  color: white;
309
316
  }
310
317
 
311
318
  .conversation-item.active .conversation-item-delete,
312
- .conversation-item.active .conversation-item-archive {
319
+ .conversation-item.active .conversation-item-archive,
320
+ .conversation-item.active .conversation-item-export {
313
321
  color: rgba(255,255,255,0.8);
314
322
  }
315
323
 
316
324
  .conversation-item.active .conversation-item-delete:hover,
317
- .conversation-item.active .conversation-item-archive:hover {
325
+ .conversation-item.active .conversation-item-archive:hover,
326
+ .conversation-item.active .conversation-item-export:hover {
318
327
  background-color: rgba(255,255,255,0.2);
319
328
  color: white;
320
329
  }
@@ -117,6 +117,12 @@ class ConversationManager {
117
117
 
118
118
  setupDelegatedListeners() {
119
119
  this.listEl.addEventListener('click', (e) => {
120
+ const exportBtn = e.target.closest('[data-export-conv]');
121
+ if (exportBtn) {
122
+ e.stopPropagation();
123
+ this.exportConversation(exportBtn.dataset.exportConv);
124
+ return;
125
+ }
120
126
  const archiveBtn = e.target.closest('[data-archive-conv]');
121
127
  if (archiveBtn) {
122
128
  e.stopPropagation();
@@ -483,6 +489,13 @@ class ConversationManager {
483
489
  h('div', { class: 'conversation-item-title' }, ...(badge ? [badge, title] : [title])),
484
490
  h('div', { class: 'conversation-item-meta' }, metaParts.join(' \u2022 '))
485
491
  ),
492
+ h('button', { class: 'conversation-item-export', title: 'Export as markdown', 'data-export-conv': conv.id },
493
+ h('svg', { width: '14', height: '14', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', 'stroke-width': '2' },
494
+ h('path', { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' }),
495
+ h('polyline', { points: '7 10 12 15 17 10' }),
496
+ h('line', { x1: '12', y1: '15', x2: '12', y2: '3' })
497
+ )
498
+ ),
486
499
  h('button', { class: 'conversation-item-archive', title: 'Archive conversation', 'data-archive-conv': conv.id },
487
500
  h('svg', { width: '14', height: '14', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', 'stroke-width': '2' },
488
501
  h('path', { d: 'M21 8v13H3V8' }),
@@ -597,6 +610,21 @@ class ConversationManager {
597
610
  this.render();
598
611
  }
599
612
 
613
+ async exportConversation(convId) {
614
+ try {
615
+ const result = await window.wsClient.rpc('conv.export', { id: convId, format: 'markdown' });
616
+ const blob = new Blob([result.markdown], { type: 'text/markdown' });
617
+ const url = URL.createObjectURL(blob);
618
+ const a = document.createElement('a');
619
+ a.href = url;
620
+ a.download = (result.title || 'conversation').replace(/[^a-zA-Z0-9_-]/g, '_') + '.md';
621
+ a.click();
622
+ URL.revokeObjectURL(url);
623
+ } catch (e) {
624
+ console.error('[export] Failed:', e.message);
625
+ }
626
+ }
627
+
600
628
  async archiveConversation(convId) {
601
629
  try {
602
630
  const resp = await fetch(`${window.__BASE_URL || ''}/api/conversations/${convId}/archive`, { method: 'POST' });