@xenosystem/agent-interface-ui 0.1.181 → 0.1.183

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.
Files changed (35) hide show
  1. package/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -1
  2. package/dist/adapters/agentHostPlatformBridge.js +12 -0
  3. package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
  4. package/dist/agent.css +61 -0
  5. package/dist/components/agent/AgentInterface.d.ts.map +1 -1
  6. package/dist/components/agent/AgentInterface.js +47 -11
  7. package/dist/components/agent/AgentInterface.js.map +1 -1
  8. package/dist/components/agent/AgentPreviewPanel.d.ts.map +1 -1
  9. package/dist/components/agent/AgentPreviewPanel.js +7 -0
  10. package/dist/components/agent/AgentPreviewPanel.js.map +1 -1
  11. package/dist/components/agent/AgentWorkbenchPanel.d.ts.map +1 -1
  12. package/dist/components/agent/AgentWorkbenchPanel.js +2 -1
  13. package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
  14. package/dist/components/agent/AgentsWorkspaceView.js +2 -2
  15. package/dist/components/agent/AgentsWorkspaceView.js.map +1 -1
  16. package/dist/components/agent/ArchivedConversationsDialog.d.ts +16 -0
  17. package/dist/components/agent/ArchivedConversationsDialog.d.ts.map +1 -0
  18. package/dist/components/agent/ArchivedConversationsDialog.js +17 -0
  19. package/dist/components/agent/ArchivedConversationsDialog.js.map +1 -0
  20. package/dist/components/agent/ProjectsWorkspaceView.js +2 -2
  21. package/dist/components/agent/ProjectsWorkspaceView.js.map +1 -1
  22. package/dist/components/agent/QrCode.d.ts +11 -0
  23. package/dist/components/agent/QrCode.d.ts.map +1 -0
  24. package/dist/components/agent/QrCode.js +18 -0
  25. package/dist/components/agent/QrCode.js.map +1 -0
  26. package/dist/components/agent/RemoteControlPanel.d.ts +2 -0
  27. package/dist/components/agent/RemoteControlPanel.d.ts.map +1 -0
  28. package/dist/components/agent/RemoteControlPanel.js +83 -0
  29. package/dist/components/agent/RemoteControlPanel.js.map +1 -0
  30. package/dist/components/agent/TeamsWorkspaceView.js +2 -2
  31. package/dist/components/agent/TeamsWorkspaceView.js.map +1 -1
  32. package/dist/components/agent/workbenchTools.d.ts.map +1 -1
  33. package/dist/components/agent/workbenchTools.js +1 -0
  34. package/dist/components/agent/workbenchTools.js.map +1 -1
  35. package/package.json +13 -7
package/dist/agent.css CHANGED
@@ -8794,6 +8794,21 @@ img.xa-fav { padding: 1px; background: #fff; }
8794
8794
  The dot is not animated, so it can simply own its spacing the way the icon does. This belongs
8795
8795
  in the prototype too. */
8796
8796
  .xa-dock .xa-mgrp .xa-txt.xa-down .xa-dot { margin-right: 6px; }
8797
+
8798
+ /* Dictation (decision 0008). The mic brightens with the voice it hears, so a dead microphone is visible
8799
+ before the words fail to appear. No colour: emphasis here is lightness, as everywhere in the dock. */
8800
+ .xa-dock .xa-dictation { position: relative; display: inline-flex; align-items: center; }
8801
+ .xa-dock .xa-ic.xa-mic.xa-recording { color: var(--xa-t1); background: rgba(var(--xa-ink), calc(0.08 + 0.22 * var(--xa-level, 0))); }
8802
+ .xa-dock .xa-ic.xa-mic.xa-busy { color: var(--xa-t2); }
8803
+ .xa-dock .xa-dictation-note { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30; width: max-content; max-width: 280px; padding: 5px 8px; background: var(--xa-menu); border: 1px solid var(--xa-line-menu); border-radius: 4px; font-size: 11px; color: var(--xa-t2); }
8804
+ .xa-dock .xa-dictation-menu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px; width: 280px; padding: 5px; background: var(--xa-menu); border: 1px solid var(--xa-line-menu); border-radius: 8px; }
8805
+ .xa-dock .xa-dictation-menu p { margin: 0; padding: 7px 9px 6px; font-size: 11px; line-height: 1.45; color: var(--xa-t3); }
8806
+ .xa-dock .xa-dictation-menu button { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 6px 9px; border: 0; border-radius: 4px; background: none; font: inherit; font-size: 12px; color: var(--xa-t1); text-align: left; cursor: pointer; }
8807
+ .xa-dock .xa-dictation-menu button:hover { background: var(--xa-wash-hover); }
8808
+ .xa-dock .xa-dictation-menu small { grid-column: 1 / -1; font-size: 11px; color: var(--xa-t5); }
8809
+ .xa-dock .xa-dictation-size { color: var(--xa-t4); font-variant-numeric: tabular-nums; }
8810
+ .xa-dock .xa-dictation-menu .xa-dictation-cancel { display: block; color: var(--xa-t4); }
8811
+ .xa-dock .xa-dictation-menu .xa-dictation-credit { padding: 2px 9px 4px; font-size: 10px; color: var(--xa-t6); }
8797
8812
  /* =============================================================================
8798
8813
  The agent's question, docked on the composer (QuestionPanel.tsx) — the XENO platform chat's
8799
8814
  question panel (xeno-platform `chatQuestion.css`, approved 2026-10-02), on the Agent interface's own
@@ -9410,6 +9425,9 @@ img.xa-fav { padding: 1px; background: #fff; }
9410
9425
  .bottom-0 {
9411
9426
  bottom: 0px;
9412
9427
  }
9428
+ .bottom-3 {
9429
+ bottom: 0.75rem;
9430
+ }
9413
9431
  .bottom-\[-10px\] {
9414
9432
  bottom: -10px;
9415
9433
  }
@@ -9494,6 +9512,9 @@ img.xa-fav { padding: 1px; background: #fff; }
9494
9512
  .top-2\.5 {
9495
9513
  top: 0.625rem;
9496
9514
  }
9515
+ .top-3 {
9516
+ top: 0.75rem;
9517
+ }
9497
9518
  .top-\[-6px\] {
9498
9519
  top: -6px;
9499
9520
  }
@@ -9587,6 +9608,12 @@ img.xa-fav { padding: 1px; background: #fff; }
9587
9608
  .z-\[510\] {
9588
9609
  z-index: 510;
9589
9610
  }
9611
+ .z-\[600\] {
9612
+ z-index: 600;
9613
+ }
9614
+ .z-\[60\] {
9615
+ z-index: 60;
9616
+ }
9590
9617
  .z-\[9999\] {
9591
9618
  z-index: 9999;
9592
9619
  }
@@ -9705,6 +9732,9 @@ img.xa-fav { padding: 1px; background: #fff; }
9705
9732
  .ml-5 {
9706
9733
  margin-left: 1.25rem;
9707
9734
  }
9735
+ .ml-6 {
9736
+ margin-left: 1.5rem;
9737
+ }
9708
9738
  .ml-\[18px\] {
9709
9739
  margin-left: 18px;
9710
9740
  }
@@ -10002,6 +10032,9 @@ img.xa-fav { padding: 1px; background: #fff; }
10002
10032
  .max-h-\[70px\] {
10003
10033
  max-height: 70px;
10004
10034
  }
10035
+ .max-h-\[70vh\] {
10036
+ max-height: 70vh;
10037
+ }
10005
10038
  .max-h-\[80vh\] {
10006
10039
  max-height: 80vh;
10007
10040
  }
@@ -10170,6 +10203,12 @@ img.xa-fav { padding: 1px; background: #fff; }
10170
10203
  .w-\[34\%\] {
10171
10204
  width: 34%;
10172
10205
  }
10206
+ .w-\[340px\] {
10207
+ width: 340px;
10208
+ }
10209
+ .w-\[38\%\] {
10210
+ width: 38%;
10211
+ }
10173
10212
  .w-\[42\%\] {
10174
10213
  width: 42%;
10175
10214
  }
@@ -10368,6 +10407,9 @@ img.xa-fav { padding: 1px; background: #fff; }
10368
10407
  .max-w-\[calc\(100\%-12px\)\] {
10369
10408
  max-width: calc(100% - 12px);
10370
10409
  }
10410
+ .max-w-\[calc\(100\%-24px\)\] {
10411
+ max-width: calc(100% - 24px);
10412
+ }
10371
10413
  .max-w-\[calc\(100vw-32px\)\] {
10372
10414
  max-width: calc(100vw - 32px);
10373
10415
  }
@@ -10864,6 +10906,9 @@ img.xa-fav { padding: 1px; background: #fff; }
10864
10906
  .rounded-\[7px\] {
10865
10907
  border-radius: 7px;
10866
10908
  }
10909
+ .rounded-\[8px\] {
10910
+ border-radius: 8px;
10911
+ }
10867
10912
  .rounded-full {
10868
10913
  border-radius: 9999px;
10869
10914
  }
@@ -11275,6 +11320,10 @@ img.xa-fav { padding: 1px; background: #fff; }
11275
11320
  --tw-bg-opacity: 1;
11276
11321
  background-color: rgb(10 10 12 / var(--tw-bg-opacity, 1));
11277
11322
  }
11323
+ .bg-\[\#0b0b0c\] {
11324
+ --tw-bg-opacity: 1;
11325
+ background-color: rgb(11 11 12 / var(--tw-bg-opacity, 1));
11326
+ }
11278
11327
  .bg-\[\#0b0b0d\] {
11279
11328
  --tw-bg-opacity: 1;
11280
11329
  background-color: rgb(11 11 13 / var(--tw-bg-opacity, 1));
@@ -11777,6 +11826,9 @@ img.xa-fav { padding: 1px; background: #fff; }
11777
11826
  .p-8 {
11778
11827
  padding: 2rem;
11779
11828
  }
11829
+ .p-\[2px\] {
11830
+ padding: 2px;
11831
+ }
11780
11832
  .\!px-2 {
11781
11833
  padding-left: 0.5rem !important;
11782
11834
  padding-right: 0.5rem !important;
@@ -12594,6 +12646,10 @@ img.xa-fav { padding: 1px; background: #fff; }
12594
12646
  .text-white\/90 {
12595
12647
  color: rgb(255 255 255 / 0.9);
12596
12648
  }
12649
+ .text-zinc-200 {
12650
+ --tw-text-opacity: 1;
12651
+ color: rgb(228 228 231 / var(--tw-text-opacity, 1));
12652
+ }
12597
12653
  .text-zinc-300 {
12598
12654
  --tw-text-opacity: 1;
12599
12655
  color: rgb(212 212 216 / var(--tw-text-opacity, 1));
@@ -14141,6 +14197,11 @@ body, #root, #app {
14141
14197
  color: rgb(255 255 255 / 0.25);
14142
14198
  }
14143
14199
 
14200
+ .placeholder\:text-zinc-500::placeholder {
14201
+ --tw-text-opacity: 1;
14202
+ color: rgb(113 113 122 / var(--tw-text-opacity, 1));
14203
+ }
14204
+
14144
14205
  .placeholder\:text-zinc-600::placeholder {
14145
14206
  --tw-text-opacity: 1;
14146
14207
  color: rgb(82 82 91 / var(--tw-text-opacity, 1));
@@ -1 +1 @@
1
- {"version":3,"file":"AgentInterface.d.ts","sourceRoot":"","sources":["../../../src/components/agent/AgentInterface.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwD,KAAK,WAAW,EAAE,MAAM,8CAA8C,CAAA;AAWrI,OAAO,KAA4D,MAAM,OAAO,CAAA;AAgHhF,OAAO,EAEL,KAAK,KAAK,IAAI,mBAAmB,EACjC,KAAK,iBAAiB,IAAI,+BAA+B,EACzD,KAAK,iBAAiB,IAAI,+BAA+B,EACzD,KAAK,0BAA0B,IAAI,wCAAwC,EAC3E,KAAK,mBAAmB,IAAI,0BAA0B,EACtD,KAAK,IAAI,IAAI,kBAAkB,EAC/B,KAAK,SAAS,IAAI,uBAAuB,EACzC,KAAK,YAAY,IAAI,iBAAiB,EACvC,MAAM,gCAAgC,CAAA;AAmBvC,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,sCAAsC,CAAA;AAwtF7C,MAAM,MAAM,YAAY,GAAG,0BAA0B,CAAA;AACrD,MAAM,MAAM,iBAAiB,GAAG,+BAA+B,CAAA;AAC/D,MAAM,MAAM,iBAAiB,GAAG,+BAA+B,CAAA;AAC/D,MAAM,MAAM,0BAA0B,GAAG,wCAAwC,CAAA;AACjF,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAA;AAC5C,MAAM,MAAM,KAAK,GAAG,mBAAmB,CAAA;AACvC,MAAM,MAAM,IAAI,GAAG,kBAAkB,CAAA;AACrC,MAAM,MAAM,SAAS,GAAG,uBAAuB,CAAA;AAy2H/C,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,UAAU,GAAG,oBAAoB,CAAA;IAC3C,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAA;IAChC,cAAc,CAAC,EAAE;QACf,WAAW,CAAC,EAAE,qBAAqB,CAAA;QACnC,UAAU,CAAC,EAAE,qBAAqB,CAAA;QAClC,UAAU,CAAC,EAAE,qBAAqB,CAAA;QAClC,OAAO,CAAC,EAAE,qBAAqB,CAAA;KAChC,CAAA;CACF;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,OAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACf,GAAE,mBAAwB,qBAywM1B"}
1
+ {"version":3,"file":"AgentInterface.d.ts","sourceRoot":"","sources":["../../../src/components/agent/AgentInterface.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwD,KAAK,WAAW,EAAE,MAAM,8CAA8C,CAAA;AAWrI,OAAO,KAA4D,MAAM,OAAO,CAAA;AAkHhF,OAAO,EAEL,KAAK,KAAK,IAAI,mBAAmB,EACjC,KAAK,iBAAiB,IAAI,+BAA+B,EACzD,KAAK,iBAAiB,IAAI,+BAA+B,EACzD,KAAK,0BAA0B,IAAI,wCAAwC,EAC3E,KAAK,mBAAmB,IAAI,0BAA0B,EACtD,KAAK,IAAI,IAAI,kBAAkB,EAC/B,KAAK,SAAS,IAAI,uBAAuB,EACzC,KAAK,YAAY,IAAI,iBAAiB,EACvC,MAAM,gCAAgC,CAAA;AAmBvC,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,sCAAsC,CAAA;AA2tF7C,MAAM,MAAM,YAAY,GAAG,0BAA0B,CAAA;AACrD,MAAM,MAAM,iBAAiB,GAAG,+BAA+B,CAAA;AAC/D,MAAM,MAAM,iBAAiB,GAAG,+BAA+B,CAAA;AAC/D,MAAM,MAAM,0BAA0B,GAAG,wCAAwC,CAAA;AACjF,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAA;AAC5C,MAAM,MAAM,KAAK,GAAG,mBAAmB,CAAA;AACvC,MAAM,MAAM,IAAI,GAAG,kBAAkB,CAAA;AACrC,MAAM,MAAM,SAAS,GAAG,uBAAuB,CAAA;AA66H/C,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,UAAU,GAAG,oBAAoB,CAAA;IAC3C,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAA;IAChC,cAAc,CAAC,EAAE;QACf,WAAW,CAAC,EAAE,qBAAqB,CAAA;QACnC,UAAU,CAAC,EAAE,qBAAqB,CAAA;QAClC,UAAU,CAAC,EAAE,qBAAqB,CAAA;QAClC,OAAO,CAAC,EAAE,qBAAqB,CAAA;KAChC,CAAA;CACF;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,OAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACf,GAAE,mBAAwB,qBA8wM1B"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { getAgentPlatformBridge, requireAgentPlatformCapability } from '@xenosystem/agent-conversation/platformBridge';
2
+ import { getAgentPlatformBridge, getOptionalAgentPlatformBridge, requireAgentPlatformCapability } from '@xenosystem/agent-conversation/platformBridge';
3
3
  import { holdParityTurnAtItsFirstBeat, seedParityConversation } from '@xenosystem/agent-conversation/parityFixture';
4
4
  /*
5
5
  * AgentInterface.tsx - AGENT Mode Interface
@@ -12,7 +12,7 @@ import { holdParityTurnAtItsFirstBeat, seedParityConversation } from '@xenosyste
12
12
  */
13
13
  import React, { useState, useMemo, useEffect, useRef, useCallback } from 'react';
14
14
  import { createPortal } from 'react-dom';
15
- import { ArrowUpRight, BookOpen, Bot, Building2, Check, CheckCircle2, CheckSquare, ChevronDown, ChevronRight, Clock, Code2, Copy, Edit2, File, FileCode, Folder, FolderOpen, FolderPlus, GitBranch, GitCompareArrows, Globe2, Layers, Loader2, MessageSquare, Monitor, MoreHorizontal, Move, Package, PanelLeftClose, PanelLeftOpen, PanelRightClose, PanelRightOpen, Pause, Pin, Play, Plus, Search, Settings, Share2, Sparkles, Terminal, Trash2, Users, X } from '@xenosystem/agent-conversation/icons';
15
+ import { Archive, ArrowUpRight, BookOpen, Bot, Building2, Check, CheckCircle2, CheckSquare, ChevronDown, ChevronRight, Clock, Code2, Copy, Edit2, File, FileCode, Folder, FolderOpen, FolderPlus, GitBranch, GitCompareArrows, Globe2, Layers, Loader2, MessageSquare, Monitor, MoreHorizontal, Move, Package, PanelLeftClose, PanelLeftOpen, PanelRightClose, PanelRightOpen, Pause, Pin, Play, Plus, Search, Settings, Share2, Sparkles, Terminal, Trash2, Users, X } from '@xenosystem/agent-conversation/icons';
16
16
  import { EntitySettingsLayout } from './settings/EntitySettingsLayout.js';
17
17
  import { WorkspacePersistenceNotice } from './WorkspacePersistenceNotice.js';
18
18
  import { EditorOperationAuthority, acknowledgeEditorSave, editorRecoveryFiles, editorSaveFailure, reconcileEditorRefresh, resolveEditorPaneMode } from '@xenosystem/agent-conversation/components/agent/editorOperationAuthority';
@@ -45,7 +45,8 @@ import { createConversationRuntimeBinding, runtimeSelectionForSdk } from '@xenos
45
45
  import { nativeExecutionPolicyForPermissionProfile, nativeWorkspaceTrustForPermissionProfile, } from '@xenosystem/agent-conversation/utils/acpExecutionAuthority';
46
46
  import { usePermissionStore } from '../../stores/permissionStore.js';
47
47
  import { agentCreationConfiguration } from '../../stores/agentCreationDefaults.js';
48
- import { useAgentChatStore, loadLocalAgentConversations, projectConversationRuntimeEvents, resetAcpContinuationForWorkspaceChange, } from '@xenosystem/agent-conversation/stores/agentChatStore';
48
+ import { ArchivedConversationsDialog } from './ArchivedConversationsDialog.js';
49
+ import { useAgentChatStore, liveConversations, loadLocalAgentConversations, projectConversationRuntimeEvents, resetAcpContinuationForWorkspaceChange, } from '@xenosystem/agent-conversation/stores/agentChatStore';
49
50
  import { useAgentIdeStore } from '../../stores/agentIdeStore.js';
50
51
  import { useAgentSearchStore } from '../../stores/agentSearchStore.js';
51
52
  import { useWorkspaceStore, } from '../../stores/workspaceStore.js';
@@ -1635,8 +1636,12 @@ function FolderSidebar({ conversationId, workspaceId, rootDirectory, allowedDire
1635
1636
  useEffect(() => {
1636
1637
  if (tabRequest?.tab === 'changes')
1637
1638
  setRightPanelTab('changes');
1638
- if (tabRequest?.tab === 'browser' && browserTabs[0])
1639
- setRightPanelTab(`browser:${browserTabs[0].id}`);
1639
+ if (tabRequest?.tab === 'browser') {
1640
+ if (browserTabs[0])
1641
+ setRightPanelTab(`browser:${browserTabs[0].id}`);
1642
+ else
1643
+ handleCreateBrowserTab();
1644
+ }
1640
1645
  if (tabRequest?.tab === 'terminal') {
1641
1646
  const id = terminalTabs[0]?.id ?? onCreateTerminal();
1642
1647
  if (id)
@@ -2235,7 +2240,7 @@ function ContextMenuPopup({ menu, workspaces, onClose, onAction, }) {
2235
2240
  return createPortal(_jsxs("div", { ref: menuRef, className: "fixed z-[500] w-[195px] rounded-lg border border-white/[0.12] bg-[#18181b] p-1 shadow-2xl backdrop-blur-md text-[12px] text-zinc-300 select-none animate-in fade-in duration-100", style: { left: posX, top: posY }, children: [menu.type === 'workspace' && (() => {
2236
2241
  const hasDir = Boolean(currentWorkspace?.directories && currentWorkspace.directories.length > 0);
2237
2242
  return (_jsxs(_Fragment, { children: [hasDir && (_jsx(MenuItem, { icon: FolderOpen, label: "Open in Explorer", shortcut: "E", position: "first", onClick: () => { onAction('open-explorer'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) })), _jsx(MenuItem, { icon: Edit2, label: "Rename Workspace", shortcut: "R", position: hasDir ? 'middle' : 'first', onClick: () => { onAction('rename'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Copy, label: "Copy", shortcut: "C", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'copy' ? null : 'copy'), onMouseEnter: () => setActiveSubmenu('copy') }), activeSubmenu === 'copy' && (_jsx(SubmenuPanel, { width: "w-[175px]", children: (extendsBelow) => copyItems.map((item, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction(item.action); onClose(); }, className: "w-full px-2 py-1 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, copyItems.length, extendsBelow), children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1 truncate", children: [_jsx(Copy, { className: "w-3 h-3 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "truncate", children: item.label })] }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, item.action))) }))] }), _jsx(MenuItem, { icon: FolderPlus, label: "Add Project Folder...", shortcut: "F", position: "middle", onClick: () => { onAction('add-folder'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx(MenuItem, { icon: Plus, label: "Add Team", shortcut: "T", position: "middle", onClick: () => { onAction('add-team'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx(MenuItem, { icon: Copy, label: "Duplicate Workspace", shortcut: "U", position: "middle", onClick: () => { onAction('duplicate'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx(MenuItem, { icon: Layers, label: currentWorkspace?.teams.some(t => !t.isExpanded) ? "Expand all" : "Collapse all", shortcut: "X", position: "middle", onClick: () => { onAction(currentWorkspace?.teams.some(t => !t.isExpanded) ? 'expand' : 'collapse'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Settings, label: "Workspace Settings", shortcut: "S", position: "middle", onClick: () => { onAction('settings'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Trash2, label: "Delete Workspace", shortcut: "D", danger: true, position: "last", onClick: () => { onAction('delete'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) })] }));
2238
- })(), menu.type === 'team' && (_jsxs(_Fragment, { children: [_jsx(MenuItem, { icon: Plus, label: "Add Agent to Team", shortcut: "A", position: "first", onClick: () => { onAction('add-agent'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx(MenuItem, { icon: Edit2, label: "Rename Team", shortcut: "R", position: "middle", onClick: () => { onAction('rename'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Copy, label: "Copy", shortcut: "C", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'copy' ? null : 'copy'), onMouseEnter: () => setActiveSubmenu('copy') }), activeSubmenu === 'copy' && (_jsx(SubmenuPanel, { width: "w-[160px]", children: (extendsBelow) => copyItems.map((item, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction(item.action); onClose(); }, className: "w-full px-2 py-1 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, copyItems.length, extendsBelow), children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1 truncate", children: [_jsx(Copy, { className: "w-3 h-3 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "truncate", children: item.label })] }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, item.action))) }))] }), moveTargets.length > 0 && (_jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Move, label: "Move to workspace", shortcut: "M", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'move' ? null : 'move'), onMouseEnter: () => setActiveSubmenu('move') }), activeSubmenu === 'move' && (_jsx(SubmenuPanel, { width: "w-[185px]", children: (extendsBelow) => (_jsx("div", { className: "max-h-[220px] overflow-auto", children: moveTargets.map((target, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction('move', target.workspaceId); onClose(); }, className: "w-full px-2 py-1.5 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white rounded transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, moveTargets.length, extendsBelow), children: [_jsx("span", { className: "truncate flex-1 min-w-0", children: target.workspaceName }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, target.workspaceId))) })) }))] })), _jsx(MenuItem, { icon: Copy, label: "Duplicate Team", shortcut: "U", position: "middle", onClick: () => { onAction('duplicate'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Settings, label: "Team Settings", shortcut: "S", position: "middle", onClick: () => { onAction('settings'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Trash2, label: "Delete Team", shortcut: "D", danger: true, position: "last", onClick: () => { onAction('delete'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) })] })), menu.type === 'agent' && (_jsxs(_Fragment, { children: [_jsx(MenuItem, { icon: MessageSquare, label: "New Conversation", shortcut: "N", position: "first", onClick: () => { onAction('new-conversation'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx(MenuItem, { icon: Edit2, label: "Rename Agent", shortcut: "R", position: "middle", onClick: () => { onAction('rename'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Copy, label: "Copy", shortcut: "C", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'copy' ? null : 'copy'), onMouseEnter: () => setActiveSubmenu('copy') }), activeSubmenu === 'copy' && (_jsx(SubmenuPanel, { width: "w-[160px]", children: (extendsBelow) => copyItems.map((item, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction(item.action); onClose(); }, className: "w-full px-2 py-1 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, copyItems.length, extendsBelow), children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1 truncate", children: [_jsx(Copy, { className: "w-3 h-3 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "truncate", children: item.label })] }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, item.action))) }))] }), moveTargets.length > 0 && (_jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Move, label: "Move to team", shortcut: "M", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'move' ? null : 'move'), onMouseEnter: () => setActiveSubmenu('move') }), activeSubmenu === 'move' && (_jsx(SubmenuPanel, { width: "w-[200px]", children: (extendsBelow) => (_jsx("div", { className: "max-h-[220px] overflow-auto", children: moveTargets.map((target, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction('move', target.workspaceId, target.teamId); onClose(); }, className: "w-full px-2 py-1.5 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white rounded transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, moveTargets.length, extendsBelow), children: [_jsxs("span", { className: "truncate flex-1 min-w-0", children: [_jsxs("span", { className: "text-zinc-500", children: [target.workspaceName, " /"] }), " ", target.teamName] }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, `${target.workspaceId}-${target.teamId}`))) })) }))] })), _jsx(MenuItem, { icon: Copy, label: "Duplicate Agent", shortcut: "U", position: "middle", onClick: () => { onAction('duplicate'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Settings, label: "Agent Settings", shortcut: "S", position: "middle", onClick: () => { onAction('settings'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Trash2, label: "Delete Agent", shortcut: "D", danger: true, position: "last", onClick: () => { onAction('delete'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) })] })), menu.type === 'conversation' && (_jsxs(_Fragment, { children: [_jsx(MenuItem, { icon: Edit2, label: "Rename", shortcut: "R", position: "first", onClick: () => { onAction('rename'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Copy, label: "Copy", shortcut: "C", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'copy' ? null : 'copy'), onMouseEnter: () => setActiveSubmenu('copy') }), activeSubmenu === 'copy' && (_jsx(SubmenuPanel, { width: "w-[175px]", children: (extendsBelow) => copyItems.map((item, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction(item.action); onClose(); }, className: "w-full px-2 py-1 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, copyItems.length, extendsBelow), children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1 truncate", children: [_jsx(Copy, { className: "w-3 h-3 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "truncate", children: item.label })] }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, item.action))) }))] }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Trash2, label: "Delete Conversation", shortcut: "D", danger: true, position: "last", onClick: () => { onAction('delete'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) })] }))] }), document.body);
2243
+ })(), menu.type === 'team' && (_jsxs(_Fragment, { children: [_jsx(MenuItem, { icon: Plus, label: "Add Agent to Team", shortcut: "A", position: "first", onClick: () => { onAction('add-agent'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx(MenuItem, { icon: Edit2, label: "Rename Team", shortcut: "R", position: "middle", onClick: () => { onAction('rename'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Copy, label: "Copy", shortcut: "C", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'copy' ? null : 'copy'), onMouseEnter: () => setActiveSubmenu('copy') }), activeSubmenu === 'copy' && (_jsx(SubmenuPanel, { width: "w-[160px]", children: (extendsBelow) => copyItems.map((item, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction(item.action); onClose(); }, className: "w-full px-2 py-1 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, copyItems.length, extendsBelow), children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1 truncate", children: [_jsx(Copy, { className: "w-3 h-3 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "truncate", children: item.label })] }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, item.action))) }))] }), moveTargets.length > 0 && (_jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Move, label: "Move to workspace", shortcut: "M", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'move' ? null : 'move'), onMouseEnter: () => setActiveSubmenu('move') }), activeSubmenu === 'move' && (_jsx(SubmenuPanel, { width: "w-[185px]", children: (extendsBelow) => (_jsx("div", { className: "max-h-[220px] overflow-auto", children: moveTargets.map((target, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction('move', target.workspaceId); onClose(); }, className: "w-full px-2 py-1.5 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white rounded transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, moveTargets.length, extendsBelow), children: [_jsx("span", { className: "truncate flex-1 min-w-0", children: target.workspaceName }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, target.workspaceId))) })) }))] })), _jsx(MenuItem, { icon: Copy, label: "Duplicate Team", shortcut: "U", position: "middle", onClick: () => { onAction('duplicate'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Settings, label: "Team Settings", shortcut: "S", position: "middle", onClick: () => { onAction('settings'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Trash2, label: "Delete Team", shortcut: "D", danger: true, position: "last", onClick: () => { onAction('delete'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) })] })), menu.type === 'agent' && (_jsxs(_Fragment, { children: [_jsx(MenuItem, { icon: MessageSquare, label: "New Conversation", shortcut: "N", position: "first", onClick: () => { onAction('new-conversation'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx(MenuItem, { icon: Edit2, label: "Rename Agent", shortcut: "R", position: "middle", onClick: () => { onAction('rename'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Copy, label: "Copy", shortcut: "C", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'copy' ? null : 'copy'), onMouseEnter: () => setActiveSubmenu('copy') }), activeSubmenu === 'copy' && (_jsx(SubmenuPanel, { width: "w-[160px]", children: (extendsBelow) => copyItems.map((item, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction(item.action); onClose(); }, className: "w-full px-2 py-1 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, copyItems.length, extendsBelow), children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1 truncate", children: [_jsx(Copy, { className: "w-3 h-3 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "truncate", children: item.label })] }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, item.action))) }))] }), moveTargets.length > 0 && (_jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Move, label: "Move to team", shortcut: "M", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'move' ? null : 'move'), onMouseEnter: () => setActiveSubmenu('move') }), activeSubmenu === 'move' && (_jsx(SubmenuPanel, { width: "w-[200px]", children: (extendsBelow) => (_jsx("div", { className: "max-h-[220px] overflow-auto", children: moveTargets.map((target, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction('move', target.workspaceId, target.teamId); onClose(); }, className: "w-full px-2 py-1.5 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white rounded transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, moveTargets.length, extendsBelow), children: [_jsxs("span", { className: "truncate flex-1 min-w-0", children: [_jsxs("span", { className: "text-zinc-500", children: [target.workspaceName, " /"] }), " ", target.teamName] }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, `${target.workspaceId}-${target.teamId}`))) })) }))] })), _jsx(MenuItem, { icon: Copy, label: "Duplicate Agent", shortcut: "U", position: "middle", onClick: () => { onAction('duplicate'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Settings, label: "Agent Settings", shortcut: "S", position: "middle", onClick: () => { onAction('settings'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Trash2, label: "Delete Agent", shortcut: "D", danger: true, position: "last", onClick: () => { onAction('delete'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) })] })), menu.type === 'conversation' && (_jsxs(_Fragment, { children: [_jsx(MenuItem, { icon: Edit2, label: "Rename", shortcut: "R", position: "first", onClick: () => { onAction('rename'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsxs("div", { className: "relative", onMouseLeave: () => setActiveSubmenu(null), children: [_jsx(MenuItem, { icon: Copy, label: "Copy", shortcut: "C", hasSubmenu: true, position: "middle", onClick: () => setActiveSubmenu(activeSubmenu === 'copy' ? null : 'copy'), onMouseEnter: () => setActiveSubmenu('copy') }), activeSubmenu === 'copy' && (_jsx(SubmenuPanel, { width: "w-[175px]", children: (extendsBelow) => copyItems.map((item, idx) => (_jsxs("button", { type: "button", onClick: () => { onAction(item.action); onClose(); }, className: "w-full px-2 py-1 text-left text-[11px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center justify-between gap-2 cursor-pointer " + getSubmenuItemRadius(idx, copyItems.length, extendsBelow), children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1 truncate", children: [_jsx(Copy, { className: "w-3 h-3 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "truncate", children: item.label })] }), _jsx("span", { className: "text-[10px] font-mono text-zinc-500 ml-2 flex-shrink-0", children: idx + 1 })] }, item.action))) }))] }), _jsx(MenuItem, { icon: Archive, label: "Archive", shortcut: "A", position: "middle", onClick: () => { onAction('archive'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsx(MenuItem, { icon: Trash2, label: "Delete Conversation", shortcut: "D", danger: true, position: "last", onClick: () => { onAction('delete'); onClose(); }, onMouseEnter: () => setActiveSubmenu(null) })] }))] }), document.body);
2239
2244
  }
2240
2245
  // =============================================================================
2241
2246
  // SIDEBAR COMPONENT
@@ -2339,7 +2344,13 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
2339
2344
  const [renameValue, setRenameValue] = useState('');
2340
2345
  const [deletingConvIds, setDeletingConvIds] = useState(new Set());
2341
2346
  const inboxSearchInputRef = useRef(null);
2342
- const conversations = useAgentChatStore(s => s.conversations);
2347
+ const allConversations = useAgentChatStore(s => s.conversations);
2348
+ const conversations = useMemo(() => liveConversations(allConversations), [allConversations]);
2349
+ const archivedConversations = useMemo(() => Object.values(allConversations).filter((conversation) => conversation.archivedAt), [allConversations]);
2350
+ const [archivedOpen, setArchivedOpen] = useState(false);
2351
+ const activeTurnsByConversation = useAgentChatStore(s => s.activeTurnsByConversation);
2352
+ const archiveConversation = useAgentChatStore(s => s.archiveConversation);
2353
+ const restoreConversation = useAgentChatStore(s => s.restoreConversation);
2343
2354
  const renameConversation = useAgentChatStore(s => s.renameConversation);
2344
2355
  const deleteConversation = useAgentChatStore(s => s.deleteConversation);
2345
2356
  const updateConversation = useAgentChatStore(s => s.updateConversation);
@@ -3038,6 +3049,15 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
3038
3049
  e.stopPropagation();
3039
3050
  setContextMenu({ x: e.clientX, y: e.clientY, type, workspaceId, teamId, agentId, conversationId });
3040
3051
  };
3052
+ // Archive refuses a conversation with a turn running or queued, so in a selection those simply stay.
3053
+ const archiveSelection = (conversationId) => {
3054
+ const ids = selectMode && selectedConvIds.has(conversationId) ? Array.from(selectedConvIds) : [conversationId];
3055
+ ids.forEach((id) => archiveConversation(id));
3056
+ setContextMenu(null);
3057
+ setConvMenuId(null);
3058
+ setHoveredConvId(null);
3059
+ };
3060
+ const conversationBusy = (conversationId) => (!!activeTurnsByConversation[conversationId] || !!allConversations[conversationId]?.pendingTurns?.length);
3041
3061
  // Handle context menu actions
3042
3062
  const handleContextAction = (action, targetWorkspaceId, targetTeamId) => {
3043
3063
  if (!contextMenu)
@@ -3134,6 +3154,10 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
3134
3154
  })();
3135
3155
  }
3136
3156
  break;
3157
+ case 'archive':
3158
+ if (conversationId)
3159
+ archiveSelection(conversationId);
3160
+ break;
3137
3161
  case 'delete':
3138
3162
  handleDelete();
3139
3163
  break;
@@ -3794,7 +3818,10 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
3794
3818
  const newId = createConversation(inboxAgentId);
3795
3819
  onSelectConversation(inboxAgentId, newId);
3796
3820
  }
3797
- }, className: "p-1 rounded text-zinc-500 hover:text-white transition-colors cursor-pointer", title: "New conversation in Main Chat", children: _jsx(Plus, { className: "w-3.5 h-3.5" }) }), _jsx("button", { type: "button", onClick: (e) => {
3821
+ }, className: "p-1 rounded text-zinc-500 hover:text-white transition-colors cursor-pointer", title: "New conversation in Main Chat", children: _jsx(Plus, { className: "w-3.5 h-3.5" }) }), archivedConversations.length > 0 && (_jsx("button", { type: "button", onClick: (e) => {
3822
+ e.stopPropagation();
3823
+ setArchivedOpen(true);
3824
+ }, className: "p-1 rounded text-zinc-500 hover:text-white transition-colors cursor-pointer", title: "Archived conversations", "data-xeno-archived-open": true, children: _jsx(Archive, { className: "w-3.5 h-3.5" }) })), _jsx("button", { type: "button", onClick: (e) => {
3798
3825
  e.stopPropagation();
3799
3826
  setInboxExpanded((prev) => !prev);
3800
3827
  }, className: "p-1 rounded text-zinc-500 hover:text-white transition-colors cursor-pointer", title: inboxExpanded ? "Collapse conversations" : "Expand conversations", children: _jsx(ChevronDown, { className: "w-3 h-3 transition-transform " + (inboxExpanded ? "" : "-rotate-90") }) })] })] }), inboxExpanded && workspaceConversations.length > 0 && (_jsx("div", { className: "space-y-0.5 pt-0.5", children: workspaceConversations.map((conv) => {
@@ -3948,14 +3975,19 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
3948
3975
  setSelectMode(true);
3949
3976
  setSelectedConvIds(new Set([convMenuId]));
3950
3977
  setConvMenuId(null);
3951
- }, className: "w-full px-2.5 py-1.5 rounded-[2px] text-left text-[12px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center gap-2 cursor-pointer select-none", children: [_jsx(CheckSquare, { className: "w-3.5 h-3.5 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: "Select" }), _jsx("span", { className: "text-[11px] font-mono text-zinc-500 pl-2 ml-auto flex-shrink-0", children: "S" })] }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsxs("button", { type: "button", onClick: () => {
3978
+ }, className: "w-full px-2.5 py-1.5 rounded-[2px] text-left text-[12px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center gap-2 cursor-pointer select-none", children: [_jsx(CheckSquare, { className: "w-3.5 h-3.5 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: "Select" }), _jsx("span", { className: "text-[11px] font-mono text-zinc-500 pl-2 ml-auto flex-shrink-0", children: "S" })] }), _jsxs("button", { type: "button", disabled: conversationBusy(convMenuId), title: conversationBusy(convMenuId) ? 'Wait for the turn to finish, or stop it first' : undefined, onClick: () => archiveSelection(convMenuId), className: "w-full px-2.5 py-1.5 rounded-[2px] text-left text-[12px] text-zinc-300 hover:bg-white/[0.06] hover:text-white transition-colors flex items-center gap-2 disabled:opacity-40 disabled:pointer-events-none", children: [_jsx(Archive, { className: "w-3.5 h-3.5 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: "Archive" }), _jsx("span", { className: "text-[11px] font-mono text-zinc-500 pl-2 ml-auto flex-shrink-0", children: "A" })] }), _jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsxs("button", { type: "button", onClick: () => {
3952
3979
  if (selectMode && selectedConvIds.size > 1 && selectedConvIds.has(convMenuId)) {
3953
3980
  animateDeleteConversations(Array.from(selectedConvIds), null);
3954
3981
  }
3955
3982
  else {
3956
3983
  animateDeleteConversation(convMenuId, null);
3957
3984
  }
3958
- }, className: "w-full px-2.5 py-1.5 rounded-b-[6px] rounded-t-[2px] text-left text-[12px] text-red-400 hover:bg-red-500/10 hover:text-red-300 transition-colors flex items-center gap-2 cursor-pointer select-none", children: [_jsx(Trash2, { className: "w-3.5 h-3.5 text-red-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: "Delete" }), _jsx("span", { className: "text-[11px] font-mono text-zinc-500 pl-2 ml-auto flex-shrink-0", children: "D" })] })] })] }), document.body), hoveredPreview && !contextMenu && !inboxMenuPos && !convMenuId && createPortal(_jsxs("div", { className: "fixed z-[450] w-[260px] rounded-[6px] border border-white/[0.1] bg-[#111113]/98 p-2 shadow-2xl shadow-black/90 backdrop-blur-md animate-in fade-in duration-100 select-none pointer-events-auto before:absolute before:-left-3 before:top-0 before:bottom-0 before:w-4 before:content-[''] space-y-1.5", style: {
3985
+ }, className: "w-full px-2.5 py-1.5 rounded-b-[6px] rounded-t-[2px] text-left text-[12px] text-red-400 hover:bg-red-500/10 hover:text-red-300 transition-colors flex items-center gap-2 cursor-pointer select-none", children: [_jsx(Trash2, { className: "w-3.5 h-3.5 text-red-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: "Delete" }), _jsx("span", { className: "text-[11px] font-mono text-zinc-500 pl-2 ml-auto flex-shrink-0", children: "D" })] })] })] }), document.body), archivedOpen && (_jsx(ArchivedConversationsDialog, { conversations: archivedConversations, onOpen: (conversationId) => {
3986
+ const conversation = allConversations[conversationId];
3987
+ if (conversation)
3988
+ onSelectConversation(conversation.agentId, conversationId);
3989
+ setArchivedOpen(false);
3990
+ }, onRestore: restoreConversation, onDelete: deleteConversation, onClose: () => setArchivedOpen(false) })), hoveredPreview && !contextMenu && !inboxMenuPos && !convMenuId && createPortal(_jsxs("div", { className: "fixed z-[450] w-[260px] rounded-[6px] border border-white/[0.1] bg-[#111113]/98 p-2 shadow-2xl shadow-black/90 backdrop-blur-md animate-in fade-in duration-100 select-none pointer-events-auto before:absolute before:-left-3 before:top-0 before:bottom-0 before:w-4 before:content-[''] space-y-1.5", style: {
3959
3991
  left: Math.min(hoveredPreview.rect.right + 6, window.innerWidth - 275),
3960
3992
  top: Math.max(8, Math.min(hoveredPreview.rect.top - 2, window.innerHeight - 200)),
3961
3993
  }, onMouseEnter: () => {
@@ -5532,7 +5564,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5532
5564
  return null;
5533
5565
  return { workspace, team };
5534
5566
  };
5535
- const orderedSessionConversations = useMemo(() => (orderOpenAgentSessionConversations(Object.values(conversations).map((conversation) => ({
5567
+ const orderedSessionConversations = useMemo(() => (orderOpenAgentSessionConversations(Object.values(liveConversations(conversations)).map((conversation) => ({
5536
5568
  ...conversation,
5537
5569
  sessionTab: conversation.sessionUi?.sessionTab,
5538
5570
  })))), [conversations]);
@@ -9073,6 +9105,10 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
9073
9105
  setFolderPanelOpen(true);
9074
9106
  setRightPanelTabRequest({ tab: 'changes', at: Date.now() });
9075
9107
  }, []);
9108
+ useEffect(() => getOptionalAgentPlatformBridge()?.preview?.onReveal?.(() => {
9109
+ setFolderPanelOpen(true);
9110
+ setRightPanelTabRequest({ tab: 'browser', at: Date.now() });
9111
+ }), []);
9076
9112
  useEffect(() => {
9077
9113
  const onKeyDown = (event) => {
9078
9114
  const requestTab = (tab) => {