@xenosystem/agent-interface-ui 0.1.196 → 0.1.198
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/dist/agent.css +71 -1
- package/dist/components/agent/AgentInterface.d.ts +7 -1
- package/dist/components/agent/AgentInterface.d.ts.map +1 -1
- package/dist/components/agent/AgentInterface.js +66 -47
- package/dist/components/agent/AgentInterface.js.map +1 -1
- package/dist/components/agent/AgentWorkbenchPanel.d.ts.map +1 -1
- package/dist/components/agent/AgentWorkbenchPanel.js +23 -17
- package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
package/dist/agent.css
CHANGED
|
@@ -7728,6 +7728,10 @@ a.xeno-source-card:focus-visible {
|
|
|
7728
7728
|
.xa-label { font-size: 10px; line-height: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--xa-label); }
|
|
7729
7729
|
|
|
7730
7730
|
/* ── motion: the composer's pair, at the transcript's scale ─────────────── */
|
|
7731
|
+
/* A word of a reply that was just shown: it fades in once. Words already on screen are plain text and never redrawn. */
|
|
7732
|
+
@keyframes xa-reveal { from { opacity: 0; } to { opacity: 1; } }
|
|
7733
|
+
.xa-body .xa-w { animation: xa-reveal 180ms ease-out both; }
|
|
7734
|
+
@media (prefers-reduced-motion: reduce) { .xa-body .xa-w { animation: none; } }
|
|
7731
7735
|
@keyframes xa-breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
|
|
7732
7736
|
@keyframes xa-rise { 0% { transform: translateY(10px); opacity: 0; filter: blur(3px); } 45% { transform: translateY(4px); opacity: 0; filter: blur(3px); } 100% { transform: none; opacity: 1; filter: blur(0); } }
|
|
7733
7737
|
@keyframes xa-sink { 0% { transform: none; opacity: 1; filter: blur(0); } 55% { transform: translateY(4px); opacity: 0; filter: blur(3px); } 100% { transform: translateY(10px); opacity: 0; filter: blur(3px); } }
|
|
@@ -8706,6 +8710,67 @@ img.xa-fav { padding: 1px; background: #fff; }
|
|
|
8706
8710
|
}
|
|
8707
8711
|
@keyframes xa-stin { from { opacity: 0; transform: translate(6px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
|
|
8708
8712
|
.xa-dock .xa-controls .xa-grow { flex: 1; }
|
|
8713
|
+
/* where this session runs (composerPlace.ts), fourth design 2026-11-18: the earlier one-line list, made ours. The place
|
|
8714
|
+
in use is a brighter row tagged "In use" (no check mark); every place says its real state at the row's end as a
|
|
8715
|
+
6 px square and a word. Squares, never circles (DESIGN_SYSTEM). The chip: icon, name, state square, caret. */
|
|
8716
|
+
.xa-dock .xa-place { display: inline-flex; align-items: center; gap: 6px; height: 24px; max-width: 200px; padding: 0 7px 0 8px; border: 1px solid var(--xa-line-soft); border-radius: 5px; background: var(--xa-wash-hover); font-size: 11.5px; line-height: 1; font-weight: 500; color: var(--xa-t2); white-space: nowrap; }
|
|
8717
|
+
.xa-dock .xa-place .xa-lname { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
|
|
8718
|
+
.xa-dock .xa-place .xa-caret { display: inline-flex; color: var(--xa-t5); }
|
|
8719
|
+
.xa-dock .xa-place:hover, .xa-dock .xa-place.xa-open { background: rgba(var(--xa-ink), 0.09); border-color: var(--xa-line); color: var(--xa-t1); }
|
|
8720
|
+
.xa-dock .xa-place:hover .xa-caret, .xa-dock .xa-place.xa-open .xa-caret { color: var(--xa-t3); }
|
|
8721
|
+
.xa-dock .xa-place:disabled { opacity: 0.5; }
|
|
8722
|
+
.xa-dock .xa-pdot { flex: none; display: inline-block; width: 6px; height: 6px; border-radius: 1px; }
|
|
8723
|
+
.xa-dock .xa-pdot.xa-on { background: var(--xa-t1); }
|
|
8724
|
+
.xa-dock .xa-pdot.xa-idle { background: var(--xa-t5); }
|
|
8725
|
+
.xa-dock .xa-pdot.xa-off { box-shadow: inset 0 0 0 1px var(--xa-t5); }
|
|
8726
|
+
/* the side inset sits on the SCROLLING box (.xa-mrows), not the menu: the search runs edge to edge with -4px
|
|
8727
|
+
margins, and overhanging a scroller's content box made a horizontal scrollbar (overflow-y: auto makes x auto
|
|
8728
|
+
too). Overhang into the scroller's own padding is not overflow. Measured: scrollWidth 314 > clientWidth 310. */
|
|
8729
|
+
.xa-dock .xa-menu.xa-placemenu { padding: 0 0 4px; border-radius: 9px; }
|
|
8730
|
+
.xa-dock .xa-menu.xa-placemenu .xa-mrows { padding: 0 4px; }
|
|
8731
|
+
.xa-dock .xa-placemenu .xa-psearch { display: flex; align-items: center; gap: 8px; height: 36px; margin: 0 -4px 4px; padding: 0 13px; border-bottom: 1px solid var(--xa-line-soft); color: var(--xa-t5); cursor: text; }
|
|
8732
|
+
.xa-dock .xa-placemenu .xa-psearch input { flex: 1; min-width: 0; height: 100%; padding: 0; background: none; border: 0; outline: none; box-shadow: none; font: inherit; font-size: 12px; color: var(--xa-t1); }
|
|
8733
|
+
.xa-dock .xa-placemenu .xa-psearch input::placeholder { color: var(--xa-t5); }
|
|
8734
|
+
.xa-dock .xa-placemenu .xa-pgroup + .xa-pgroup { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--xa-line-soft); }
|
|
8735
|
+
.xa-dock .xa-placemenu .xa-ptitle { padding: 6px 10px 4px; font-size: 11px; font-weight: 500; color: var(--xa-t5); }
|
|
8736
|
+
.xa-dock .xa-placemenu .xa-prow { display: flex; align-items: center; gap: 9px; width: 100%; height: 30px; padding: 0 10px; border-radius: 5px; text-align: left; font-size: 12px; color: var(--xa-t2); }
|
|
8737
|
+
.xa-dock .xa-placemenu .xa-prow + .xa-prow { margin-top: 2px; }
|
|
8738
|
+
.xa-dock .xa-placemenu .xa-prow.xa-act { background: var(--xa-wash-hover); color: var(--xa-t1); }
|
|
8739
|
+
.xa-dock .xa-placemenu .xa-prow.xa-on { background: rgba(var(--xa-ink), 0.08); color: var(--xa-t1); font-weight: 500; }
|
|
8740
|
+
.xa-dock .xa-placemenu .xa-prow:disabled { color: var(--xa-t6); }
|
|
8741
|
+
.xa-dock .xa-placemenu .xa-pic { flex: none; display: inline-flex; width: 13px; color: var(--xa-t5); }
|
|
8742
|
+
.xa-dock .xa-placemenu .xa-prow.xa-on .xa-pic, .xa-dock .xa-placemenu .xa-prow.xa-act .xa-pic { color: var(--xa-t2); }
|
|
8743
|
+
.xa-dock .xa-placemenu .xa-plabel { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
8744
|
+
.xa-dock .xa-placemenu .xa-pmeta { flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 11px; font-weight: 400; color: var(--xa-t5); }
|
|
8745
|
+
.xa-dock .xa-placemenu .xa-prow.xa-on .xa-pmeta { color: var(--xa-t4); }
|
|
8746
|
+
.xa-dock .xa-placemenu .xa-pinuse { flex: none; padding: 3px 6px; border-radius: 4px; background: rgba(var(--xa-ink), 0.10); font-size: 10.5px; line-height: 1; font-weight: 500; color: var(--xa-t1); }
|
|
8747
|
+
.xa-dock .xa-placemenu .xa-paction { flex: none; padding: 3px 6px; border: 1px solid var(--xa-line); border-radius: 4px; font-size: 10.5px; line-height: 1; font-weight: 500; color: var(--xa-t3); }
|
|
8748
|
+
.xa-dock .xa-placemenu .xa-prow.xa-act .xa-paction { border-color: rgba(var(--xa-ink), 0.18); color: var(--xa-t1); }
|
|
8749
|
+
.xa-dock .xa-placemenu .xa-padd { color: var(--xa-t3); }
|
|
8750
|
+
.xa-dock .xa-placemenu .xa-pkeys { flex: none; font-size: 10px; font-weight: 400; color: var(--xa-t6); }
|
|
8751
|
+
/* the new-session card (PlaceCard): where a new session will run, centred in the empty conversation, in the list's
|
|
8752
|
+
own one-line style; changing it opens the chip's list */
|
|
8753
|
+
.xa-app .xa-placecard-wrap { display: flex; justify-content: center; padding: 18vh 16px 0; }
|
|
8754
|
+
.xa-app .xa-placecard { display: flex; flex-direction: column; gap: 2px; width: 280px; max-width: 100%; padding: 4px; border: 1px solid var(--xa-line-menu); border-radius: 9px; background: var(--xa-menu); }
|
|
8755
|
+
.xa-app .xa-placecard .xa-pcrow { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 5px; background: rgba(var(--xa-ink), 0.06); font-size: 12px; font-weight: 500; color: var(--xa-t1); }
|
|
8756
|
+
.xa-app .xa-placecard .xa-pcic { flex: none; display: inline-flex; color: var(--xa-t3); }
|
|
8757
|
+
.xa-app .xa-placecard .xa-pcname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
8758
|
+
.xa-app .xa-placecard .xa-pcstate { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 400; color: var(--xa-t4); white-space: nowrap; }
|
|
8759
|
+
.xa-app .xa-placecard .xa-pdot { flex: none; display: inline-block; width: 6px; height: 6px; border-radius: 1px; }
|
|
8760
|
+
.xa-app .xa-placecard .xa-pdot.xa-on { background: var(--xa-t1); }
|
|
8761
|
+
.xa-app .xa-placecard .xa-pdot.xa-idle { background: var(--xa-t5); }
|
|
8762
|
+
.xa-app .xa-placecard .xa-pdot.xa-off { box-shadow: inset 0 0 0 1px var(--xa-t5); }
|
|
8763
|
+
.xa-app .xa-placecard .xa-pcchoose { display: flex; align-items: center; justify-content: flex-start; gap: 6px; width: 100%; height: 30px; padding: 0 10px; border-radius: 5px; font-size: 12px; color: var(--xa-t3); text-align: left; }
|
|
8764
|
+
.xa-app .xa-placecard .xa-pcchoose:hover { background: var(--xa-wash-hover); color: var(--xa-t1); }
|
|
8765
|
+
/* moving a chat in progress: asked in place of the list */
|
|
8766
|
+
.xa-dock .xa-placemenu .xa-pask { display: flex; flex-direction: column; gap: 12px; padding: 12px 8px 4px; }
|
|
8767
|
+
.xa-dock .xa-placemenu .xa-pasktext { margin: 0; font-size: 12px; line-height: 1.5; color: var(--xa-t3); }
|
|
8768
|
+
.xa-dock .xa-placemenu .xa-pasktext b { font-weight: 500; color: var(--xa-t1); }
|
|
8769
|
+
.xa-dock .xa-placemenu .xa-paskbar { display: flex; justify-content: flex-end; gap: 6px; }
|
|
8770
|
+
.xa-dock .xa-placemenu .xa-pbtn { height: 26px; max-width: 180px; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px; background: rgba(var(--xa-ink), 0.06); font-size: 11.5px; font-weight: 500; color: var(--xa-t2); }
|
|
8771
|
+
.xa-dock .xa-placemenu .xa-pbtn:hover { background: rgba(var(--xa-ink), 0.10); color: var(--xa-t1); }
|
|
8772
|
+
.xa-dock .xa-placemenu .xa-pbtn.xa-primary { background: var(--xa-send); color: #141312; }
|
|
8773
|
+
.xa-dock .xa-placemenu .xa-pbtn.xa-primary:hover { background: var(--xa-send-hover); }
|
|
8709
8774
|
.xa-dock .xa-ic { width: 24px; height: 24px; border-radius: 4px; color: var(--xa-t4); }
|
|
8710
8775
|
.xa-dock .xa-ic:hover, .xa-dock .xa-ic.xa-open { background: var(--xa-wash-hover); color: var(--xa-t2); }
|
|
8711
8776
|
.xa-dock .xa-segc { display: flex; align-items: center; gap: 2px; padding: 2px; background: var(--xa-wash); border: 1px solid var(--xa-line-soft); border-radius: 4px; }
|
|
@@ -8822,7 +8887,9 @@ img.xa-fav { padding: 1px; background: #fff; }
|
|
|
8822
8887
|
.xa-dock .xa-chip { display: inline-flex; align-items: center; gap: 4px; vertical-align: -2px; padding: 1px 5px 1px 4px; background: rgba(var(--xa-ink),0.07); border: 1px solid var(--xa-line-soft); border-radius: 3px; font-size: 12px; line-height: 1.3; color: var(--xa-t1); white-space: nowrap; }
|
|
8823
8888
|
.xa-dock .xa-chip svg { flex: none; color: var(--xa-t4); }
|
|
8824
8889
|
.xa-dock .xa-mrow { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border-radius: 4px; text-align: left; font-size: 12px; color: var(--xa-t3); }
|
|
8825
|
-
|
|
8890
|
+
/* margin, padding and display are pinned: the transcript's turn rail shares the class name (transcript.css `.xa-rail`), and its
|
|
8891
|
+
gutter made this 2 px mark a 16 px block in a tall row */
|
|
8892
|
+
.xa-dock .xa-mrow .xa-rail { display: block; width: 2px; height: 13px; margin: 0; padding: 0; background: transparent; flex: none; }
|
|
8826
8893
|
.xa-dock .xa-mrow.xa-tall { align-items: stretch; padding: 8px 9px; } .xa-mrow.xa-tall .xa-rail { height: auto; }
|
|
8827
8894
|
.xa-dock .xa-mrow .xa-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
|
|
8828
8895
|
.xa-dock .xa-mrow .xa-sub { font-size: 11px; line-height: 1.35; color: var(--xa-t5); }
|
|
@@ -8914,6 +8981,9 @@ img.xa-fav { padding: 1px; background: #fff; }
|
|
|
8914
8981
|
.xa-dock .xa-menu .xa-search { display: block; width: 100%; height: 26px; margin: 2px 0 4px; padding: 0 9px; background: var(--xa-well); border: 1px solid var(--xa-line-soft); border-radius: 4px; font: inherit; font-size: 11px; color: var(--xa-t1); outline: none; box-shadow: none; }
|
|
8915
8982
|
.xa-dock .xa-menu .xa-search::placeholder { color: var(--xa-t6); }
|
|
8916
8983
|
.xa-dock .xa-menu .xa-none { padding: 7px 9px; font-size: 11px; color: var(--xa-t5); }
|
|
8984
|
+
/* the Repo chip (composerRepo.ts): the place chip's construction; unset, its name reads as a prompt, not a value */
|
|
8985
|
+
.xa-dock .xa-place.xa-repo.xa-unset .xa-lname { color: var(--xa-t4); }
|
|
8986
|
+
.xa-dock .xa-menu .xa-perror { margin: 2px 4px 4px; padding: 7px 9px; font-size: 11px; line-height: 1.45; color: var(--xa-t2); background: var(--xa-wash-hover); border: 1px solid var(--xa-line); border-radius: 4px; }
|
|
8917
8987
|
|
|
8918
8988
|
/* 🔴 ONE correction to the prototype, because the prototype contradicts ITSELF here. Its comment on
|
|
8919
8989
|
the typed popover says "the row it lands on moves its content right to make room, the others sit
|
|
@@ -29,6 +29,12 @@ export interface AgentInterfaceProps {
|
|
|
29
29
|
initialConversationId?: string;
|
|
30
30
|
/** Told which chat is on screen whenever that changes (null: none), so a surface's address can follow it. */
|
|
31
31
|
onActiveConversationChange?: (conversationId: string | null) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Draw the sidebar here instead of beside the conversation: an element in another page of the same site (on the
|
|
34
|
+
* website, the workspace's own left panel, under the header it already has). It is the same sidebar, drawn by this
|
|
35
|
+
* interface, with the same state; its menus open in that page. Null or absent: the sidebar is beside the conversation.
|
|
36
|
+
*/
|
|
37
|
+
sidebarPlace?: HTMLElement | null;
|
|
32
38
|
windowControls?: {
|
|
33
39
|
onNewWindow?: XenoAgentWindowAction;
|
|
34
40
|
onMinimize?: XenoAgentWindowAction;
|
|
@@ -36,5 +42,5 @@ export interface AgentInterfaceProps {
|
|
|
36
42
|
onClose?: XenoAgentWindowAction;
|
|
37
43
|
};
|
|
38
44
|
}
|
|
39
|
-
export default function AgentInterface({ surface, initialSdkSessionId, initialLaunchMode, initialWorkspaceRoot, initialParityFrame, initialConversationId, onActiveConversationChange, windowControls, }?: AgentInterfaceProps): React.JSX.Element;
|
|
45
|
+
export default function AgentInterface({ surface, initialSdkSessionId, initialLaunchMode, initialWorkspaceRoot, initialParityFrame, initialConversationId, onActiveConversationChange, sidebarPlace, windowControls, }?: AgentInterfaceProps): React.JSX.Element;
|
|
40
46
|
//# sourceMappingURL=AgentInterface.d.ts.map
|
|
@@ -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,
|
|
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,KAAuF,MAAM,OAAO,CAAA;AAwG3G,OAAO,iCAAiC,CAAA;AAgBxC,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;AAqBvC,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;AAm6H/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;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,6GAA6G;IAC7G,0BAA0B,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACpE;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IACjC,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,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,EACZ,cAAc,GACf,GAAE,mBAAwB,qBAs0M1B"}
|
|
@@ -10,7 +10,7 @@ import { holdParityTurnAtItsFirstBeat, seedParityConversation } from '@xenosyste
|
|
|
10
10
|
* - A 280px sidebar contains inbox, spaces, knowledge, and settings.
|
|
11
11
|
* - The content panel remains centered relative to the full viewport.
|
|
12
12
|
*/
|
|
13
|
-
import React, { useState, useMemo, useEffect, useRef, useCallback } from 'react';
|
|
13
|
+
import React, { createContext, useContext, useState, useMemo, useEffect, useRef, useCallback } from 'react';
|
|
14
14
|
import { createPortal } from 'react-dom';
|
|
15
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';
|
|
@@ -57,7 +57,7 @@ import { useAgentSearchStore } from '../../stores/agentSearchStore.js';
|
|
|
57
57
|
import { useWorkspaceStore, } from '../../stores/workspaceStore.js';
|
|
58
58
|
import { useAuthStore } from '@xenosystem/agent-conversation/stores/authStore';
|
|
59
59
|
import { sidebarAccountLine, useHostAccount } from './sidebarAccount.js';
|
|
60
|
-
import { remoteHostName } from '@xenosystem/agent-conversation/remoteHostName';
|
|
60
|
+
import { onRemoteHostChange, remoteHostKind, remoteHostName, remoteHostSwitch } from '@xenosystem/agent-conversation/remoteHostName';
|
|
61
61
|
import { cycleAgentSessionTabId, nextAgentSessionTabAfterClose, normalizeAgentSessionTabState, orderOpenAgentSessionConversations, reorderAgentSessionTabIds, resolveAgentSessionTabShortcut, } from '@xenosystem/agent-conversation/sessionTabs';
|
|
62
62
|
import { XenoAgentProductHeader, } from '../product/XenoAgentProductHeader.js';
|
|
63
63
|
import { XenoAgentSessionTabs, } from '../product/XenoAgentSessionTabs.js';
|
|
@@ -1979,13 +1979,10 @@ const PlusIcon = () => (_jsx("svg", { className: "w-4 h-4", fill: "none", stroke
|
|
|
1979
1979
|
const BookIcon = () => (_jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" }) }));
|
|
1980
1980
|
const SettingsIcon = () => (_jsxs("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [_jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })] }));
|
|
1981
1981
|
const ChevronDownIcon = ({ className = "w-4 h-4" }) => (_jsx("svg", { className: className, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M19 9l-7 7-7-7" }) }));
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
// =============================================================================
|
|
1985
|
-
// =============================================================================
|
|
1986
|
-
// CONTEXT MENU COMPONENT
|
|
1987
|
-
// =============================================================================
|
|
1982
|
+
const SidebarPlaceContext = createContext(null);
|
|
1983
|
+
const useSidebarPlace = () => useContext(SidebarPlaceContext) ?? { doc: document, win: window, elsewhere: false };
|
|
1988
1984
|
function ContextMenuPopup({ menu, workspaces, onClose, onAction, }) {
|
|
1985
|
+
const place = useSidebarPlace();
|
|
1989
1986
|
const menuRef = React.useRef(null);
|
|
1990
1987
|
const [activeSubmenu, setActiveSubmenu] = useState(null);
|
|
1991
1988
|
const currentWorkspace = workspaces.find(w => w.id === menu.workspaceId);
|
|
@@ -2185,16 +2182,16 @@ function ContextMenuPopup({ menu, workspaces, onClose, onAction, }) {
|
|
|
2185
2182
|
}
|
|
2186
2183
|
}
|
|
2187
2184
|
};
|
|
2188
|
-
|
|
2189
|
-
|
|
2185
|
+
place.doc.addEventListener('mousedown', handleClickOutside);
|
|
2186
|
+
place.doc.addEventListener('keydown', handleKeyDown);
|
|
2190
2187
|
return () => {
|
|
2191
|
-
|
|
2192
|
-
|
|
2188
|
+
place.doc.removeEventListener('mousedown', handleClickOutside);
|
|
2189
|
+
place.doc.removeEventListener('keydown', handleKeyDown);
|
|
2193
2190
|
};
|
|
2194
2191
|
}, [onClose, activeSubmenu, copyItems, moveTargets, menu.type, currentWorkspace, onAction]);
|
|
2195
|
-
const posX = Math.max(8, Math.min(menu.x,
|
|
2196
|
-
const posY = Math.max(8, Math.min(menu.y,
|
|
2197
|
-
const opensOnRight = posX + 200 + 190 <=
|
|
2192
|
+
const posX = Math.max(8, Math.min(menu.x, place.win.innerWidth - 210));
|
|
2193
|
+
const posY = Math.max(8, Math.min(menu.y, place.win.innerHeight - 340));
|
|
2194
|
+
const opensOnRight = posX + 200 + 190 <= place.win.innerWidth;
|
|
2198
2195
|
const MenuItem = ({ icon: Icon, label, shortcut, onClick, danger = false, hasSubmenu = false, position = 'middle', onMouseEnter, }) => {
|
|
2199
2196
|
let radiusClass = 'rounded-[2px]';
|
|
2200
2197
|
if (position === 'first')
|
|
@@ -2247,7 +2244,7 @@ function ContextMenuPopup({ menu, workspaces, onClose, onAction, }) {
|
|
|
2247
2244
|
return createPortal(_jsxs("div", { ref: menuRef, className: "fixed z-[500] w-[195px] rounded-lg border border-white/[0.12] bg-xs-raised 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' && (() => {
|
|
2248
2245
|
const hasDir = Boolean(currentWorkspace?.directories && currentWorkspace.directories.length > 0);
|
|
2249
2246
|
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) })] }));
|
|
2250
|
-
})(), 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) })] }))] }),
|
|
2247
|
+
})(), 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) })] }))] }), place.doc.body);
|
|
2251
2248
|
}
|
|
2252
2249
|
// =============================================================================
|
|
2253
2250
|
// SIDEBAR COMPONENT
|
|
@@ -2280,20 +2277,25 @@ function SidebarFooter({ onOpenAccount, onSelectKnowledge, onSelectPlugins, onSe
|
|
|
2280
2277
|
// The desktop app's account lives in the Agent host; the legacy store above is empty there.
|
|
2281
2278
|
const hostAccount = useHostAccount();
|
|
2282
2279
|
// On another PC the host's account is that PC's business and is not shown to a device: the row says where this is.
|
|
2280
|
+
// the place can say what it is doing as that changes ("Starting your machine…"), so the row is told when it does
|
|
2281
|
+
const [, placeChanged] = useState(0);
|
|
2282
|
+
useEffect(() => onRemoteHostChange(() => placeChanged(count => count + 1)), []);
|
|
2283
2283
|
const controlled = remoteHostName();
|
|
2284
|
-
const
|
|
2284
|
+
const changePlace = controlled ? remoteHostSwitch() : null;
|
|
2285
|
+
const { name, detail } = controlled ? { name: controlled, detail: remoteHostKind() ?? 'Your PC, from here' } : sidebarAccountLine(hostAccount, user);
|
|
2285
2286
|
const tools = [
|
|
2286
2287
|
['Knowledge', onSelectKnowledge, _jsx(BookIcon, {}, "k")],
|
|
2287
2288
|
['Plugins', onSelectPlugins, _jsx(Package, { className: "w-4 h-4", strokeWidth: 1.5 }, "p")],
|
|
2288
2289
|
['Settings', onSelectSettings, _jsx(SettingsIcon, {}, "s")],
|
|
2289
2290
|
];
|
|
2290
|
-
return (_jsxs("div", { className: "flex flex-none items-center gap-1 border-t border-xs-line p-2", children: [_jsxs("button", { type: "button", onClick: onOpenAccount, className: "flex min-w-0 flex-1 items-center gap-2.5 h-10 px-1.5 rounded text-left hover:bg-white/[0.06] transition-colors cursor-pointer", title:
|
|
2291
|
+
return (_jsxs("div", { className: "flex flex-none items-center gap-1 border-t border-xs-line p-2", children: [_jsxs("button", { type: "button", onClick: changePlace ?? onOpenAccount, className: "flex min-w-0 flex-1 items-center gap-2.5 h-10 px-1.5 rounded text-left hover:bg-white/[0.06] transition-colors cursor-pointer", title: changePlace ? 'Where it runs: Cloud or one of your PCs' : 'Account and settings', ...(changePlace ? { 'data-xeno-agent-change-place': 'true' } : {}), children: [_jsx("span", { className: "grid flex-none place-items-center w-7 h-7 rounded bg-xs-accent text-xs-on-accent text-[12px] font-semibold", children: name.slice(0, 1).toUpperCase() }), _jsxs("span", { className: "flex min-w-0 flex-col gap-px", children: [_jsx("span", { className: "truncate text-[12.5px] font-semibold text-white", children: name }), _jsx("span", { className: "truncate font-mono text-[10px] text-xs-ink3", "data-xeno-agent-place-detail": true, children: detail })] }), changePlace ? _jsx(ChevronDown, { className: "ml-auto h-3.5 w-3.5 flex-none text-xs-ink3", "aria-hidden": true }) : null] }), _jsx("div", { role: "toolbar", "aria-label": "Knowledge, plugins and settings", className: "flex flex-none gap-px p-0.5 rounded-md bg-white/[0.06]", children: tools.map(([label, onClick, icon]) => (_jsx("button", { type: "button", onClick: onClick, "aria-label": label, title: label, className: "grid place-items-center w-[30px] h-[30px] rounded text-xs-ink2 hover:text-white hover:bg-xs-page transition-colors cursor-pointer", children: icon }, label))) })] }));
|
|
2291
2292
|
}
|
|
2292
2293
|
/** One page in the sidebar list — the canvas's nav row: 30 px, 13 px text, the active page bold on a fill. */
|
|
2293
2294
|
function SidebarNavItem({ icon: Icon, label, active, onClick, badge, dataAttr }) {
|
|
2294
|
-
return (_jsxs("button", { type: "button", onClick: onClick, "aria-current": active ? 'page' : undefined, ...(dataAttr ? { [dataAttr]: 'true' } : {}), className: `w-full flex items-center gap-2.5 h-[30px] px-2.5 rounded text-left text-[13px] transition-colors cursor-pointer select-none ${active ? 'bg-white/[0.085] text-white font-semibold' : 'text-white hover:bg-white/[0.06]'}`, children: [_jsx(Icon, { className: "w-3.5 h-3.5 text-xs-ink2 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: label }), badge ? _jsx("span", { className: "font-mono text-[10px] text-xs-ink3", children: badge }) : null] }));
|
|
2295
|
+
return (_jsxs("button", { type: "button", onClick: onClick, "aria-current": active ? 'page' : undefined, "data-xs-row": true, ...(dataAttr ? { [dataAttr]: 'true' } : {}), className: `w-full flex items-center gap-2.5 h-[30px] px-2.5 rounded text-left text-[13px] transition-colors cursor-pointer select-none ${active ? 'bg-white/[0.085] text-white font-semibold' : 'text-white hover:bg-white/[0.06]'}`, children: [_jsx(Icon, { className: "w-3.5 h-3.5 text-xs-ink2 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: label }), badge ? _jsx("span", { className: "font-mono text-[10px] text-xs-ink3", children: badge }) : null] }));
|
|
2295
2296
|
}
|
|
2296
|
-
function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setWorkspaces, inboxAgentId, isInboxSelected, selectedInboxConversationId, onSelectInbox, onSelectInboxConversation, selectedAgentId, onSelectAgent, selectedConversationId, onSelectConversation, agentRunAvailability, onSelectPlugins, onSelectKnowledge, onSelectTools, onSelectSettings, onSelectProjects, onSelectTeams, onSelectAgents, onSelectScheduled, onSelectMission, onStartProjectChat, onOpenSearchResultInEditor, viewMode, isSettingsOpen, }) {
|
|
2297
|
+
function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setWorkspaces, inboxAgentId, isInboxSelected, selectedInboxConversationId, onSelectInbox, onSelectInboxConversation, selectedAgentId, onSelectAgent, selectedConversationId, onSelectConversation, agentRunAvailability, onSelectPlugins, onSelectKnowledge, onSelectTools, onSelectWorkbenchTab, openWorkbenchTab, onSelectSettings, onSelectProjects, onSelectTeams, onSelectAgents, onSelectScheduled, onSelectMission, onStartProjectChat, onOpenSearchResultInEditor, viewMode, isSettingsOpen, }) {
|
|
2298
|
+
const place = useSidebarPlace();
|
|
2297
2299
|
const [isAddingWorkspace, setIsAddingWorkspace] = useState(false);
|
|
2298
2300
|
const [newWorkspaceName, setNewWorkspaceName] = useState('');
|
|
2299
2301
|
const [addingTeamToWorkspace, setAddingTeamToWorkspace] = useState(null);
|
|
@@ -3046,8 +3048,8 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3046
3048
|
return;
|
|
3047
3049
|
clearConversationSelection();
|
|
3048
3050
|
};
|
|
3049
|
-
|
|
3050
|
-
return () =>
|
|
3051
|
+
place.doc.addEventListener('keydown', handleEscapeSelection, true);
|
|
3052
|
+
return () => place.doc.removeEventListener('keydown', handleEscapeSelection, true);
|
|
3051
3053
|
}, [selectMode]);
|
|
3052
3054
|
useEffect(() => {
|
|
3053
3055
|
if (!inboxSearchMode)
|
|
@@ -3681,7 +3683,9 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3681
3683
|
? 'bg-white/[0.08] text-white'
|
|
3682
3684
|
: 'text-xs-ink3 hover:text-white hover:bg-white/[0.04]'}`, title: "Workspace Settings", children: _jsx(Settings, { className: "w-4 h-4" }) })] }));
|
|
3683
3685
|
}
|
|
3684
|
-
return (_jsxs("aside", { className: "flex-shrink-0 bg-xs-raised border-r border-xs-line flex flex-col",
|
|
3686
|
+
return (_jsxs("aside", { className: "flex-shrink-0 bg-xs-raised border-r border-xs-line flex flex-col", "data-xeno-sidebar-look": place.look ?? 'app',
|
|
3687
|
+
// a page that shows this panel in a column of its own (the workspace's left panel) says how wide that column is
|
|
3688
|
+
style: { width: `var(--xeno-agent-sidebar-width, ${SIDEBAR_WIDTH}px)` }, children: [_jsx("style", { children: `
|
|
3685
3689
|
@keyframes conversationDeleteParticle {
|
|
3686
3690
|
0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.6); }
|
|
3687
3691
|
15% { opacity: 1; }
|
|
@@ -3691,8 +3695,8 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3691
3695
|
const targetAgentId = scopedWorkspace ? (scopedMainAgentInfo?.agent?.id || inboxAgentId) : inboxAgentId;
|
|
3692
3696
|
const newId = createConversation(targetAgentId);
|
|
3693
3697
|
onSelectConversation(targetAgentId, newId);
|
|
3694
|
-
}, className: "flex-1 flex items-center gap-2 h-8 px-2.5 rounded bg-xs-field hover:bg-white/[0.1] text-white text-[13px] font-semibold transition-colors cursor-pointer", children: [_jsx(Plus, { className: "w-3 h-3 text-white" }), _jsx("span", { children:
|
|
3695
|
-
onSelectConversation(item.agentId, item.conversationId); }, onOpenMission: () => onSelectMission?.() }), _jsxs("div", { className: "flex flex-col gap-px", children: [_jsx(SidebarNavItem, { icon: Layers, label: "Mission control", active: isMissionActive, onClick: () => onSelectMission?.(), badge: mission.needs.length + mission.running.length > 0 ? String(mission.needs.length + mission.running.length) : undefined }), _jsx(SidebarNavItem, { icon: MessageSquare, label: "Chat", active: isChatsActive, onClick: () => { if (scopedWorkspace)
|
|
3698
|
+
}, className: "flex-1 flex items-center gap-2 h-8 px-2.5 rounded bg-xs-field hover:bg-white/[0.1] text-white text-[13px] font-semibold transition-colors cursor-pointer", "data-xs-new": true, children: [_jsx(Plus, { className: "w-3 h-3 text-white" }), _jsx("span", { children: place.look === 'workspace' ? 'New session' : 'New' }), _jsx("span", { className: "ml-auto font-mono text-[10px] font-normal text-xs-ink3", "data-xs-kbd": true, children: "Ctrl N" })] }), !place.elsewhere && _jsx("button", { onClick: onToggleCollapse, className: "grid place-items-center w-7 h-7 rounded text-xs-ink3 hover:text-white hover:bg-white/[0.06] transition-colors flex-shrink-0 cursor-pointer", title: "Collapse sidebar", "aria-label": "Collapse sidebar", children: _jsx(PanelLeftClose, { className: "w-3.5 h-3.5" }) })] }), place.look === 'workspace' && onSelectWorkbenchTab && (_jsxs("div", { className: "flex flex-col gap-px pb-2", "data-xs-group": "work", children: [_jsx(SidebarNavItem, { icon: Bot, label: "Sessions", active: openWorkbenchTab === 'sessions', onClick: () => onSelectWorkbenchTab('sessions'), dataAttr: "data-xeno-sidebar-sessions" }), _jsx(SidebarNavItem, { icon: Play, label: "Runs", active: openWorkbenchTab === 'subagents', onClick: () => onSelectWorkbenchTab('subagents'), dataAttr: "data-xeno-sidebar-runs" }), _jsx(SidebarNavItem, { icon: Check, label: "Checkpoints", active: openWorkbenchTab === 'checkpoints', onClick: () => onSelectWorkbenchTab('checkpoints'), dataAttr: "data-xeno-sidebar-checkpoints" })] })), _jsx(NeedsYouBox, { onOpen: (item) => { if (item.conversationId && item.agentId)
|
|
3699
|
+
onSelectConversation(item.agentId, item.conversationId); }, onOpenMission: () => onSelectMission?.() }), _jsxs("div", { className: "flex flex-col gap-px", children: [_jsx(SidebarNavItem, { icon: Layers, label: "Mission control", active: isMissionActive, onClick: () => onSelectMission?.(), badge: mission.needs.length + mission.running.length > 0 ? String(mission.needs.length + mission.running.length) : undefined }), place.look !== 'workspace' && _jsx(SidebarNavItem, { icon: MessageSquare, label: "Chat", active: isChatsActive, onClick: () => { if (scopedWorkspace)
|
|
3696
3700
|
handleSelectScopedWorkspaceChat();
|
|
3697
3701
|
else
|
|
3698
3702
|
onSelectInbox(); } }), _jsx(SidebarNavItem, { icon: Folder, label: "Projects", active: isProjectsActive, onClick: onSelectProjects }), _jsx(SidebarNavItem, { icon: Bot, label: "Agents", active: isAgentsActive, onClick: () => onSelectAgents?.() }), _jsx(SidebarNavItem, { icon: Users, label: "Teams", active: isTeamsActive, onClick: () => onSelectTeams?.() }), _jsx(SidebarNavItem, { icon: BookOpen, label: "Library", active: false, onClick: onSelectKnowledge }), _jsx(SidebarNavItem, { icon: Package, label: "Tools", active: false, onClick: onSelectTools, dataAttr: "data-xeno-sidebar-tools" }), _jsx(SidebarNavItem, { icon: Clock, label: "Scheduled", active: isScheduledActive, onClick: () => onSelectScheduled?.() })] })] }), _jsxs("div", { className: "space-y-3 pt-1", children: [pinError && _jsx("p", { role: "alert", className: "px-2 text-[11px] text-amber-300", children: pinError }), (pinnedProjectItems.length > 0 || pinnedConversations.length > 0 || pinnedEntities.length > 0) && (_jsxs("div", { className: "pt-1 pb-1", children: [_jsxs("div", { className: "flex items-center justify-between px-2 pb-1 select-none", children: [_jsx("span", { className: "text-[11px] font-medium tracking-wide text-zinc-400", children: "Pinned" }), _jsx("span", { className: "text-[9px] font-mono px-1 py-0.2 rounded bg-white/[0.06] text-zinc-500", children: pinnedProjectItems.length + pinnedConversations.length + pinnedEntities.length })] }), _jsxs("div", { className: "space-y-0.5", children: [pinnedEntities.map(({ pin, name }) => (_jsxs("div", { className: "flex items-center gap-1 rounded-md px-2 py-1 text-[12px] text-zinc-300", children: [_jsxs("button", { type: "button", className: "min-w-0 flex-1 truncate text-left hover:text-white", onClick: () => {
|
|
@@ -3786,7 +3790,7 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3786
3790
|
})();
|
|
3787
3791
|
const isMainChatActive = (selectedAgentId === targetAgentId && !selectedConversationId) ||
|
|
3788
3792
|
(viewMode === 'inbox' && !scopedWorkspace && !selectedInboxConversationId);
|
|
3789
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "group/mainchat w-full flex items-center justify-between px-2.5 py-1.5 rounded-md transition-colors text-left select-none cursor-pointer " + (isMainChatActive
|
|
3793
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { "data-xs-row": true, ...(isMainChatActive ? { 'aria-current': 'page' } : {}), className: "group/mainchat w-full flex items-center justify-between px-2.5 py-1.5 rounded-md transition-colors text-left select-none cursor-pointer " + (isMainChatActive
|
|
3790
3794
|
? "bg-white/[0.08] text-white font-medium"
|
|
3791
3795
|
: "text-zinc-300 hover:text-white hover:bg-white/[0.04]"), onClick: () => {
|
|
3792
3796
|
if (scopedWorkspace) {
|
|
@@ -3821,7 +3825,7 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3821
3825
|
const isActive = (selectedAgentId === targetAgentId && selectedConversationId === conv.id) ||
|
|
3822
3826
|
(viewMode === 'inbox' && selectedInboxConversationId === conv.id);
|
|
3823
3827
|
const isPinned = pinnedConvIds.has(conv.id);
|
|
3824
|
-
return (_jsxs("div", { className: "group/conv relative flex items-center justify-between rounded-md transition-colors px-2.5 py-1.5 cursor-pointer " + (isActive
|
|
3828
|
+
return (_jsxs("div", { "data-xs-row": true, "data-xs-sub": true, ...(isActive ? { 'aria-current': 'page' } : {}), className: "group/conv relative flex items-center justify-between rounded-md transition-colors px-2.5 py-1.5 cursor-pointer " + (isActive
|
|
3825
3829
|
? "bg-white/[0.08] text-white font-medium"
|
|
3826
3830
|
: "text-zinc-400 hover:text-zinc-200 hover:bg-white/[0.04]"), onClick: () => {
|
|
3827
3831
|
if (targetWs) {
|
|
@@ -3853,7 +3857,7 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3853
3857
|
}
|
|
3854
3858
|
}, className: "p-0.5 rounded text-zinc-500 hover:text-white transition-colors opacity-0 group-hover/conv:opacity-100", title: "Conversation options", children: _jsx(MoreHorizontal, { className: "w-3.5 h-3.5" }) })] })] }, conv.id));
|
|
3855
3859
|
}) }))] }));
|
|
3856
|
-
})() }), _jsx(RemotePcsSection, {}), _jsxs("div", { className: "pt-1", children: [_jsxs("div", { className: "flex items-center justify-between px-2 pb-1 select-none", children: [_jsxs("button", { type: "button", onClick: () => setIsProjectsCollapsed((prev) => !prev), className: "flex items-center gap-1 text-[11px] font-medium uppercase tracking-wider text-zinc-500 hover:text-zinc-300 transition-colors cursor-pointer", children: [_jsx("span", { children: "Projects" }), _jsx("span", { className: "text-[9px] font-mono px-1 py-0.2 rounded bg-white/[0.06] text-zinc-400", children: currentWorkspaceProjects.length }), _jsx(ChevronDown, { className: `w-3 h-3 transition-transform ${isProjectsCollapsed ? '-rotate-90' : ''}` })] }), _jsx("button", { type: "button", onClick: () => {
|
|
3860
|
+
})() }), _jsx(RemotePcsSection, {}), _jsxs("div", { className: "pt-1", children: [_jsxs("div", { className: "flex items-center justify-between px-2 pb-1 select-none", children: [_jsxs("button", { type: "button", onClick: () => setIsProjectsCollapsed((prev) => !prev), "data-xs-heading": true, className: "flex items-center gap-1 text-[11px] font-medium uppercase tracking-wider text-zinc-500 hover:text-zinc-300 transition-colors cursor-pointer", children: [_jsx("span", { children: "Projects" }), _jsx("span", { className: "text-[9px] font-mono px-1 py-0.2 rounded bg-white/[0.06] text-zinc-400", children: currentWorkspaceProjects.length }), _jsx(ChevronDown, { className: `w-3 h-3 transition-transform ${isProjectsCollapsed ? '-rotate-90' : ''}` })] }), _jsx("button", { type: "button", onClick: () => {
|
|
3857
3861
|
const targetWsId = currentWorkspace ? currentWorkspace.id : workspaces[0]?.id;
|
|
3858
3862
|
if (targetWsId)
|
|
3859
3863
|
void handleAddProjectToWorkspace(targetWsId);
|
|
@@ -3875,7 +3879,7 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3875
3879
|
e.stopPropagation();
|
|
3876
3880
|
handleOpenPathInExplorer(dir);
|
|
3877
3881
|
}, className: "p-1 rounded text-zinc-500 hover:text-white transition-colors", title: "Open in Windows Explorer", children: _jsx(ArrowUpRight, { className: "w-3 h-3" }) })] })] }, dir));
|
|
3878
|
-
})) }))] }), _jsxs("div", { className: "pt-1", children: [_jsxs("div", { className: "flex items-center justify-between px-2 pb-1.5 select-none", children: [_jsx("span", { className: "text-[11px] font-medium uppercase tracking-wider text-zinc-500", children: "Teams" }), _jsxs("div", { className: "flex items-center gap-0.5", children: [_jsx("button", { type: "button", onClick: handleToggleSidebarViewMode, "aria-label": "Stacked sidebar layout", "aria-pressed": sidebarViewMode === 'stacked', className: "p-1 rounded transition-colors " + (sidebarViewMode === 'stacked' ? "text-xs-info hover:text-white" : "text-zinc-500 hover:text-zinc-200 hover:bg-white/[0.04]"), title: sidebarViewMode === 'tree' ? 'Switch to Stacked View' : 'Switch to Tree View', children: sidebarViewMode === 'tree' ? _jsx(Layers, { className: "w-3.5 h-3.5" }) : _jsx(GitBranch, { className: "w-3.5 h-3.5" }) }), _jsx("button", { onClick: () => {
|
|
3882
|
+
})) }))] }), _jsxs("div", { className: "pt-1", children: [_jsxs("div", { className: "flex items-center justify-between px-2 pb-1.5 select-none", children: [_jsx("span", { "data-xs-heading": true, className: "text-[11px] font-medium uppercase tracking-wider text-zinc-500", children: "Teams" }), _jsxs("div", { className: "flex items-center gap-0.5", children: [_jsx("button", { type: "button", onClick: handleToggleSidebarViewMode, "aria-label": "Stacked sidebar layout", "aria-pressed": sidebarViewMode === 'stacked', className: "p-1 rounded transition-colors " + (sidebarViewMode === 'stacked' ? "text-xs-info hover:text-white" : "text-zinc-500 hover:text-zinc-200 hover:bg-white/[0.04]"), title: sidebarViewMode === 'tree' ? 'Switch to Stacked View' : 'Switch to Tree View', children: sidebarViewMode === 'tree' ? _jsx(Layers, { className: "w-3.5 h-3.5" }) : _jsx(GitBranch, { className: "w-3.5 h-3.5" }) }), _jsx("button", { onClick: () => {
|
|
3879
3883
|
const targetWsId = currentWorkspace ? currentWorkspace.id : workspaces[0]?.id;
|
|
3880
3884
|
if (targetWsId)
|
|
3881
3885
|
setAddingTeamToWorkspace(targetWsId);
|
|
@@ -3919,12 +3923,12 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3919
3923
|
handleContextMenu(e, 'conversation', workspace.id, team.id, agent.id, conv.id);
|
|
3920
3924
|
}, className: "p-0.5 rounded text-zinc-500 hover:text-white transition-colors", title: "Conversation options", children: _jsx(MoreHorizontal, { className: "w-3.5 h-3.5" }) })] })] }, conv.id));
|
|
3921
3925
|
})) })] }, `${workspace.id}-${team.id}`));
|
|
3922
|
-
})) })] })] })] }), _jsx(SidebarFooter, { onOpenAccount: onSelectSettings, onSelectKnowledge: onSelectKnowledge, onSelectPlugins: onSelectPlugins, onSelectSettings: onSelectSettings }), contextMenu && (_jsx(ContextMenuPopup, { menu: contextMenu, workspaces: workspaces, onClose: () => setContextMenu(null), onAction: handleContextAction })), inboxMenuPos && createPortal(_jsxs(_Fragment, { children: [_jsx("div", { className: "fixed inset-0 z-[499]", onClick: () => setInboxMenuPos(null), onContextMenu: (e) => {
|
|
3926
|
+
})) })] })] })] }), place.look !== 'workspace' && _jsx(SidebarFooter, { onOpenAccount: onSelectSettings, onSelectKnowledge: onSelectKnowledge, onSelectPlugins: onSelectPlugins, onSelectSettings: onSelectSettings }), contextMenu && (_jsx(ContextMenuPopup, { menu: contextMenu, workspaces: workspaces, onClose: () => setContextMenu(null), onAction: handleContextAction })), inboxMenuPos && createPortal(_jsxs(_Fragment, { children: [_jsx("div", { className: "fixed inset-0 z-[499]", onClick: () => setInboxMenuPos(null), onContextMenu: (e) => {
|
|
3923
3927
|
e.preventDefault();
|
|
3924
3928
|
setInboxMenuPos(null);
|
|
3925
3929
|
} }), _jsxs("div", { className: "fixed z-[500] w-[195px] rounded-lg border border-white/[0.12] bg-xs-raised p-1 shadow-2xl backdrop-blur-md text-[12px] text-zinc-300 select-none animate-in fade-in duration-100", style: {
|
|
3926
|
-
left: Math.max(8, Math.min(inboxMenuPos.x,
|
|
3927
|
-
top: Math.max(8, Math.min(inboxMenuPos.y,
|
|
3930
|
+
left: Math.max(8, Math.min(inboxMenuPos.x, place.win.innerWidth - 210)),
|
|
3931
|
+
top: Math.max(8, Math.min(inboxMenuPos.y, place.win.innerHeight - 240))
|
|
3928
3932
|
}, children: [_jsxs("button", { type: "button", onClick: () => {
|
|
3929
3933
|
if (scopedWorkspace) {
|
|
3930
3934
|
handleSelectScopedWorkspaceChat();
|
|
@@ -3956,9 +3960,9 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3956
3960
|
}, 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(Settings, { className: "w-3.5 h-3.5 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: scopedWorkspace ? 'Workspace Settings' : 'Chat Settings' }), _jsx("span", { className: "text-[11px] font-mono text-zinc-500 pl-2 ml-auto flex-shrink-0", children: "S" })] }), visibleInboxConversations.length > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { className: "my-1 border-t border-white/[0.06]" }), _jsxs("button", { type: "button", onClick: () => {
|
|
3957
3961
|
animateDeleteConversations(visibleInboxConversations.map(c => c.id), null);
|
|
3958
3962
|
setInboxMenuPos(null);
|
|
3959
|
-
}, 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: "Clear All Conversations" }), _jsx("span", { className: "text-[11px] font-mono text-zinc-500 pl-2 ml-auto flex-shrink-0", children: "D" })] })] }))] })] }),
|
|
3960
|
-
left: Math.max(8, Math.min(convMenuPos.x,
|
|
3961
|
-
top: Math.max(8, Math.min(convMenuPos.y,
|
|
3963
|
+
}, 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: "Clear All Conversations" }), _jsx("span", { className: "text-[11px] font-mono text-zinc-500 pl-2 ml-auto flex-shrink-0", children: "D" })] })] }))] })] }), place.doc.body), convMenuId && createPortal(_jsxs(_Fragment, { children: [_jsx("div", { className: "fixed inset-0 z-[499]", onClick: () => { setConvMenuId(null); setHoveredConvId(null); }, onContextMenu: (e) => { e.preventDefault(); setConvMenuId(null); setHoveredConvId(null); } }), _jsxs("div", { className: "fixed z-[500] w-[175px] rounded-lg border border-white/[0.12] bg-xs-raised p-1 shadow-2xl backdrop-blur-md text-[12px] text-zinc-300 select-none animate-in fade-in duration-100", style: {
|
|
3964
|
+
left: Math.max(8, Math.min(convMenuPos.x, place.win.innerWidth - 190)),
|
|
3965
|
+
top: Math.max(8, Math.min(convMenuPos.y, place.win.innerHeight - 150))
|
|
3962
3966
|
}, children: [_jsxs("button", { type: "button", onClick: () => {
|
|
3963
3967
|
const conv = inboxConversations.find(c => c.id === convMenuId);
|
|
3964
3968
|
setEditingConvId(convMenuId);
|
|
@@ -3975,14 +3979,14 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3975
3979
|
else {
|
|
3976
3980
|
animateDeleteConversation(convMenuId, null);
|
|
3977
3981
|
}
|
|
3978
|
-
}, 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" })] })] })] }),
|
|
3982
|
+
}, 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" })] })] })] }), place.doc.body), archivedOpen && (_jsx(ArchivedConversationsDialog, { conversations: archivedConversations, onOpen: (conversationId) => {
|
|
3979
3983
|
const conversation = allConversations[conversationId];
|
|
3980
3984
|
if (conversation)
|
|
3981
3985
|
onSelectConversation(conversation.agentId, conversationId);
|
|
3982
3986
|
setArchivedOpen(false);
|
|
3983
|
-
}, 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-xs-page/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: {
|
|
3984
|
-
left: Math.min(hoveredPreview.rect.right + 6,
|
|
3985
|
-
top: Math.max(8, Math.min(hoveredPreview.rect.top - 2,
|
|
3987
|
+
}, onRestore: restoreConversation, onDelete: deleteConversation, onClose: () => setArchivedOpen(false) })), hoveredPreview && !place.elsewhere && !contextMenu && !inboxMenuPos && !convMenuId && createPortal(_jsxs("div", { className: "fixed z-[450] w-[260px] rounded-[6px] border border-white/[0.1] bg-xs-page/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: {
|
|
3988
|
+
left: Math.min(hoveredPreview.rect.right + 6, place.win.innerWidth - 275),
|
|
3989
|
+
top: Math.max(8, Math.min(hoveredPreview.rect.top - 2, place.win.innerHeight - 200)),
|
|
3986
3990
|
}, onMouseEnter: () => {
|
|
3987
3991
|
if (closeTimerRef.current) {
|
|
3988
3992
|
clearTimeout(closeTimerRef.current);
|
|
@@ -4041,7 +4045,7 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
4041
4045
|
}
|
|
4042
4046
|
setHoveredPreview(null);
|
|
4043
4047
|
}, className: "flex items-center justify-between w-full px-2 py-1 rounded-[4px] bg-white/[0.03] hover:bg-white/[0.08] text-zinc-400 hover:text-white transition-colors cursor-pointer text-[11px] font-medium border border-white/[0.04]", children: [_jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(Settings, { className: "w-3 h-3 text-zinc-400" }), _jsx("span", { children: hoveredPreview.type === 'workspace' ? 'Configure Project' :
|
|
4044
|
-
hoveredPreview.type === 'team' ? 'Configure Team' : 'Configure Agent' })] }), _jsx(ChevronRight, { className: "w-3 h-3 text-zinc-500" })] }) })] }))] }),
|
|
4048
|
+
hoveredPreview.type === 'team' ? 'Configure Team' : 'Configure Agent' })] }), _jsx(ChevronRight, { className: "w-3 h-3 text-zinc-500" })] }) })] }))] }), place.doc.body)] }));
|
|
4045
4049
|
}
|
|
4046
4050
|
// =============================================================================
|
|
4047
4051
|
// AGENT RUNTIME SETTINGS
|
|
@@ -4232,7 +4236,7 @@ function waitForSubagentConversationResult(conversationId, timeoutMs) {
|
|
|
4232
4236
|
});
|
|
4233
4237
|
});
|
|
4234
4238
|
}
|
|
4235
|
-
export default function AgentInterface({ surface = 'embedded', initialSdkSessionId, initialLaunchMode, initialWorkspaceRoot, initialParityFrame, initialConversationId, onActiveConversationChange, windowControls, } = {}) {
|
|
4239
|
+
export default function AgentInterface({ surface = 'embedded', initialSdkSessionId, initialLaunchMode, initialWorkspaceRoot, initialParityFrame, initialConversationId, onActiveConversationChange, sidebarPlace, windowControls, } = {}) {
|
|
4236
4240
|
const [settingsPanel, setSettingsPanel] = useState(null);
|
|
4237
4241
|
const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
|
|
4238
4242
|
const [folderPanelOpen, setFolderPanelOpen] = useState(false);
|
|
@@ -6690,11 +6694,11 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
6690
6694
|
});
|
|
6691
6695
|
}, [activeSubagentRunCounts, selectedAgent, selectedAgentHierarchy]);
|
|
6692
6696
|
const subagentDelegationDisabledReason = !selectedAgent
|
|
6693
|
-
? '
|
|
6697
|
+
? 'To hand work over, open a chat with one of your team’s agents: its teammates are who it can hand work to.'
|
|
6694
6698
|
: !activeConversationId
|
|
6695
|
-
? 'Open a
|
|
6699
|
+
? 'Open a chat first.'
|
|
6696
6700
|
: subagentDelegationTargets.length === 0
|
|
6697
|
-
? '
|
|
6701
|
+
? 'This agent has no teammates to hand work to.'
|
|
6698
6702
|
: undefined;
|
|
6699
6703
|
const policyCaller = useMemo(() => ({
|
|
6700
6704
|
workspaceId: selectedAgentHierarchy?.workspace.id || activeConversation?.workspaceId,
|
|
@@ -9711,13 +9715,28 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9711
9715
|
}
|
|
9712
9716
|
: {};
|
|
9713
9717
|
const sessionTabsNode = (_jsx(XenoAgentSessionTabs, { tabs: sessionTabs, activeConversationId: activeSessionTabId, placement: surface === 'standalone-desktop' ? 'titlebar' : 'embedded', onActivate: activateSessionConversation, onClose: closeSessionConversation, onCloseMany: closeSessionConversations, onCreate: createSessionConversation, ...(workCopyRepository ? { onCreateInWorkCopy: () => void createSessionInWorkCopy() } : {}), onOpenInSplit: openSessionInSplit, onRemoveFromSplit: () => setSessionSplit(null), onRemoveWorkCopy: removeSessionWorkCopy, onReorder: reorderSessionConversations }));
|
|
9714
|
-
|
|
9718
|
+
// the sidebar in another page: drawn there by this interface, through a portal, with that page as its place
|
|
9719
|
+
const sidebarPlaceValue = useMemo(() => {
|
|
9720
|
+
const doc = sidebarPlace?.ownerDocument;
|
|
9721
|
+
const win = doc?.defaultView;
|
|
9722
|
+
// the page that holds the sidebar says which look it wants: its own (`workspace`, the platform's panel) or the app's
|
|
9723
|
+
const look = sidebarPlace?.dataset.xenoSidebarLook === 'workspace' ? 'workspace' : 'app';
|
|
9724
|
+
return doc && win ? { doc, win, elsewhere: true, look } : null;
|
|
9725
|
+
}, [sidebarPlace]);
|
|
9726
|
+
const placedSidebar = (node) => sidebarPlace && sidebarPlaceValue
|
|
9727
|
+
? createPortal(_jsx(SidebarPlaceContext.Provider, { value: sidebarPlaceValue, children: node }), sidebarPlace)
|
|
9728
|
+
: node;
|
|
9729
|
+
const agentWorkspace = (_jsxs("div", { className: "xeno-app-shell flex h-full w-full", "data-xeno-agent-interface-owner": "shared", "data-xeno-agent-interface-contract": "1", "data-xeno-agent-interface-surface": surface, children: [destructiveConfirmation.confirmation, placedSidebar(_jsxs("div", { className: settingsPanel ? 'hidden' : 'contents', children: [_jsx(Sidebar, { collapsed: sidebarPlace ? false : sidebarCollapsed, onToggleCollapse: () => setSidebarCollapsed(c => !c), onOpenSettings: handleOpenSettings, workspaces: workspaces, setWorkspaces: setWorkspaces, inboxAgentId: MAIN_ASSISTANT_ID, isInboxSelected: viewMode === 'inbox', selectedInboxConversationId: selectedInboxConversationId, onSelectInbox: () => { setToolsFullScreen(false); handleSelectInbox(); }, onSelectInboxConversation: (id) => { setToolsFullScreen(false); handleSelectInboxConversation(id); }, selectedAgentId: selectedAgentId, onSelectAgent: handleSelectAgent, selectedConversationId: selectedConversationId,
|
|
9730
|
+
// a chat chosen in the sidebar is what is shown, even when a tool was open as the whole page
|
|
9731
|
+
onSelectConversation: (agentId, conversationId) => { setToolsFullScreen(false); handleSelectConversation(agentId, conversationId); }, agentRunAvailability: activeSubagentRunCounts, onOpenSearchResultInEditor: handleOpenEditorPath, onSelectPlugins: () => {
|
|
9715
9732
|
if (activeConversationId) {
|
|
9716
9733
|
handleSelectWorkbenchTab('plugins');
|
|
9717
9734
|
return;
|
|
9718
9735
|
}
|
|
9719
9736
|
handleOpenPluginManager();
|
|
9720
|
-
}, onSelectKnowledge: () => handleSelectWorkbenchTab('knowledge'),
|
|
9737
|
+
}, onSelectKnowledge: () => handleSelectWorkbenchTab('knowledge'),
|
|
9738
|
+
// from the left panel these are places of their own: the whole page, as Projects and Agents are
|
|
9739
|
+
onSelectWorkbenchTab: (tab) => { handleSelectWorkbenchTab(tab); setToolsFullScreen(true); }, openWorkbenchTab: workbenchPanelOpen ? workbenchPanelTab : null, onSelectTools: handleOpenTools, onSelectProjects: () => setViewMode('projects'), onSelectTeams: () => setViewMode('teams'), onSelectAgents: () => setViewMode('agents'), onSelectScheduled: () => setViewMode('scheduled'), onSelectMission: () => setViewMode('mission'), onStartProjectChat: handleStartProjectChat, onSelectSettings: handleSelectSidebarSettings, viewMode: viewMode, isSettingsOpen: Boolean(settingsPanel) }), " "] })), _jsxs("div", { className: "relative flex-1 min-w-0 flex flex-col overflow-hidden", children: [_jsx(RightSidebarControls, { folderPanelOpen: folderPanelOpen, onOpenFolderPanel: () => setFolderPanelOpen(true), onOpenChanges: handleOpenChanges,
|
|
9721
9740
|
// The conversation surface owns its full width; the bench has no shell overlay over it.
|
|
9722
9741
|
// Files/Terminal controls remain on editor surfaces, and conversation context keeps the
|
|
9723
9742
|
// capability available through its existing workbench/menu actions.
|
|
@@ -9725,7 +9744,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9725
9744
|
? (_jsxs("div", { className: "flex-1 min-h-0 grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] overflow-hidden", children: [_jsx("section", { className: "min-w-0 min-h-0 flex flex-col border-r xeno-border-subtle overflow-hidden", children: renderContent() }), _jsxs("section", { className: "min-w-0 min-h-0 flex flex-col overflow-hidden", children: [_jsx("div", { className: "xeno-chrome-shell xeno-border-subtle h-10 border-b flex items-center justify-between gap-2 pr-[120px]", children: _jsx("div", { className: "h-full min-w-0 flex-1", children: openEditorTabs.length > 0 && (_jsx(EditorTabs, { tabs: openEditorTabs, activeTabId: activeEditorTabId, onSelectTab: handleSelectEditorTab, onCloseTab: handleCloseEditorTab })) }) }), _jsx("div", { className: "flex-1 min-h-0 flex flex-col overflow-hidden", children: _jsx(React.Suspense, { fallback: _jsx(WorkbenchLoadingSkeleton, { title: "Loading editor", subtitle: "Preparing editor workbench." }), children: activeEditorDiff ? (_jsx(MonacoDiffWorkbenchEditor, { diff: activeEditorDiff, rootDirectory: activeConversation?.rootDirectory || null, layoutKey: editorLayoutKey, statusMessage: editorStatusMessage, onOpenFile: handleOpenEditorPath, ...diffCommentProps })) : (_jsx(MonacoWorkbenchEditor, { file: activeEditorFile, pendingFilePath: pendingEditorPath, rootDirectory: activeConversation?.rootDirectory || null, openFilePaths: openEditorFiles.map((file) => file.path), layoutKey: editorLayoutKey, statusMessage: editorStatusMessage, onChangeFile: handleEditorContentChange, onSaveFile: handleSaveEditorFile, onRevertFile: handleRevertEditorFile })) }) })] })] }))
|
|
9726
9745
|
: centerPaneMode === 'editor'
|
|
9727
9746
|
? (_jsx(React.Suspense, { fallback: _jsx(WorkbenchLoadingSkeleton, { title: "Loading editor", subtitle: "Preparing editor workbench." }), children: activeEditorDiff ? (_jsx(MonacoDiffWorkbenchEditor, { diff: activeEditorDiff, rootDirectory: activeConversation?.rootDirectory || null, layoutKey: editorLayoutKey, statusMessage: editorStatusMessage, onOpenFile: handleOpenEditorPath, ...diffCommentProps })) : (_jsx(MonacoWorkbenchEditor, { file: activeEditorFile, pendingFilePath: pendingEditorPath, rootDirectory: activeConversation?.rootDirectory || null, openFilePaths: openEditorFiles.map((file) => file.path), layoutKey: editorLayoutKey, statusMessage: editorStatusMessage, onChangeFile: handleEditorContentChange, onSaveFile: handleSaveEditorFile, onRevertFile: handleRevertEditorFile })) }))
|
|
9728
|
-
: renderContent()] }), activeConversationId && workbenchPanelOpen && !settingsPanel && (_jsx("div", { className: workbenchFullScreen ? 'flex-1 min-h-0 px-
|
|
9747
|
+
: renderContent()] }), activeConversationId && workbenchPanelOpen && !settingsPanel && (_jsx("div", { className: workbenchFullScreen ? 'flex-1 min-h-0 bg-xs-page px-8 pb-10 pt-[26px]' : 'px-6 pb-5', children: _jsx("div", { className: `w-full ${workbenchFullScreen ? 'h-full max-w-[1080px]' : `mx-auto ${isWideWorkbenchTab(workbenchPanelTab) ? 'max-w-[1120px]' : 'max-w-[820px]'}`}`, children: _jsx(React.Suspense, { fallback: _jsx(WorkbenchLoadingSkeleton, { title: "Loading workbench", subtitle: "Preparing trace and support panels." }), children: _jsx(AgentWorkbenchPanel, { fullScreen: workbenchFullScreen, showToolsHome: toolsHomeOpen, onShowToolsHome: setToolsHomeOpen, knowledgeWorkspaceId: activeConversation?.workspaceId, tab: workbenchPanelTab,
|
|
9729
9748
|
/* The host's default `resolveRunId` is
|
|
9730
9749
|
`subagentRunId ?? conversationId`, so the conversation id
|
|
9731
9750
|
IS the run id here. Passing anything else would ask the
|