@xenosystem/agent-interface-ui 0.1.177 → 0.1.179
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/adapters/agentHostPlatformBridge.d.ts.map +1 -1
- package/dist/adapters/agentHostPlatformBridge.js +7 -0
- package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
- package/dist/agent.css +50 -1
- package/dist/components/agent/AgentBrowserConnect.d.ts +3 -0
- package/dist/components/agent/AgentBrowserConnect.d.ts.map +1 -0
- package/dist/components/agent/AgentBrowserConnect.js +46 -0
- package/dist/components/agent/AgentBrowserConnect.js.map +1 -0
- package/dist/components/agent/AgentInterface.d.ts.map +1 -1
- package/dist/components/agent/AgentInterface.js +160 -13
- package/dist/components/agent/AgentInterface.js.map +1 -1
- package/dist/components/agent/AgentWorkbenchPanel.js +3 -3
- package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts.map +1 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.js +2 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.js.map +1 -1
- package/dist/components/agent/MonacoDiffWorkbenchEditor.d.ts +7 -1
- package/dist/components/agent/MonacoDiffWorkbenchEditor.d.ts.map +1 -1
- package/dist/components/agent/MonacoDiffWorkbenchEditor.js +83 -3
- package/dist/components/agent/MonacoDiffWorkbenchEditor.js.map +1 -1
- package/dist/components/agent/diffComments.d.ts +6 -0
- package/dist/components/agent/diffComments.d.ts.map +1 -0
- package/dist/components/agent/diffComments.js +17 -0
- package/dist/components/agent/diffComments.js.map +1 -0
- package/dist/components/product/XenoAgentSessionTabs.d.ts +10 -1
- package/dist/components/product/XenoAgentSessionTabs.d.ts.map +1 -1
- package/dist/components/product/XenoAgentSessionTabs.js +22 -5
- package/dist/components/product/XenoAgentSessionTabs.js.map +1 -1
- package/dist/components/product/sessionSplit.d.ts +7 -0
- package/dist/components/product/sessionSplit.d.ts.map +1 -0
- package/dist/components/product/sessionSplit.js +19 -0
- package/dist/components/product/sessionSplit.js.map +1 -0
- package/package.json +6 -6
- package/src/agent.css +49 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentBrowserConnect.js","sourceRoot":"","sources":["../../../src/components/agent/AgentBrowserConnect.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,8BAA8B,EAAE,MAAM,+CAA+C,CAAA;AAI9F,wGAAwG;AACxG,MAAM,UAAU,mBAAmB;IACjC,MAAM,OAAO,GAAG,8BAA8B,EAAE,EAAE,OAAO,CAAA;IACzD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAA;IACzD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACnD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAEjD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,GAAG,KAAK,CAAA;QACrB,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,KAAK,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;gBAC1D,IAAI,SAAS;oBAAE,OAAM;gBACrB,IAAI,MAAM,CAAC,OAAO;oBAAE,SAAS,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;;oBAChI,SAAS,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC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B,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,qBAwuM1B"}
|
|
@@ -53,6 +53,8 @@ import { useAuthStore } from '@xenosystem/agent-conversation/stores/authStore';
|
|
|
53
53
|
import { cycleAgentSessionTabId, nextAgentSessionTabAfterClose, normalizeAgentSessionTabState, orderOpenAgentSessionConversations, reorderAgentSessionTabIds, resolveAgentSessionTabShortcut, } from '@xenosystem/agent-conversation/sessionTabs';
|
|
54
54
|
import { XenoAgentProductHeader, } from '../product/XenoAgentProductHeader.js';
|
|
55
55
|
import { XenoAgentSessionTabs, } from '../product/XenoAgentSessionTabs.js';
|
|
56
|
+
import { dropFromSplit, followActiveSession, openInSplit } from '../product/sessionSplit.js';
|
|
57
|
+
import { addDiffComment, diffCommentsPrompt, removeDiffComment } from './diffComments.js';
|
|
56
58
|
import { XenoAgentWorkspaceSelector } from '../product/XenoAgentWorkspaceSelector.js';
|
|
57
59
|
import { WorkspaceCreationWizard } from '../workspace/WorkspaceCreationWizard.js';
|
|
58
60
|
const MonacoWorkbenchEditor = React.lazy(() => import('./MonacoWorkbenchEditor.js'));
|
|
@@ -1928,10 +1930,10 @@ function FolderSidebar({ conversationId, workspaceId, rootDirectory, allowedDire
|
|
|
1928
1930
|
? true
|
|
1929
1931
|
: terminalReady, onInput: (data) => activeTerminal && onPtyInput(activeTerminal.id, data), onResize: (cols, rows) => activeTerminal && onPtyResize(activeTerminal.id, cols, rows) }) }))] })] }));
|
|
1930
1932
|
}
|
|
1931
|
-
function RightSidebarControls({ folderPanelOpen, onOpenFolderPanel, visible = true, inline = false, }) {
|
|
1932
|
-
if (!visible
|
|
1933
|
+
function RightSidebarControls({ folderPanelOpen, onOpenFolderPanel, onOpenChanges, visible = true, inline = false, }) {
|
|
1934
|
+
if (!visible)
|
|
1933
1935
|
return null;
|
|
1934
|
-
return (
|
|
1936
|
+
return (_jsxs("div", { className: inline ? 'flex items-center gap-1.5 px-2' : 'absolute top-2.5 right-3 z-20 flex items-center gap-1.5', children: [onOpenChanges && (_jsx("button", { onClick: onOpenChanges, className: "h-7 w-7 rounded-[4px] bg-[#18181a] hover:bg-[#242428] text-[#7f7f86] hover:text-white flex items-center justify-center", title: "Changes (Ctrl+Shift+D)", "aria-label": "Open changes", type: "button", "data-xeno-agent-changes-open": "true", children: _jsx(GitCompareArrows, { className: "w-3.5 h-3.5", strokeWidth: 1.8 }) })), !folderPanelOpen && _jsx("button", { onClick: onOpenFolderPanel, className: "h-7 w-7 rounded-[4px] bg-[#18181a] hover:bg-[#242428] text-[#7f7f86] hover:text-white border border-white/[0.08] flex items-center justify-center transition-colors shadow-xs cursor-pointer", title: "Open right panel (Files & Terminal)", "aria-label": "Open right panel", type: "button", children: _jsx(PanelRightOpen, { className: "w-3.5 h-3.5", strokeWidth: 1.8 }) })] }));
|
|
1935
1937
|
}
|
|
1936
1938
|
function EditorTabs({ tabs, activeTabId, onSelectTab, onCloseTab, }) {
|
|
1937
1939
|
return (_jsxs("div", { className: "h-full min-w-0 flex items-center overflow-hidden", children: [_jsx("div", { className: "h-full w-10 flex-shrink-0 inline-flex items-center justify-center border-r border-white/[0.045] text-white/34", "aria-hidden": "true", children: _jsx(Folder, { className: "w-3.5 h-3.5", strokeWidth: 1.8 }) }), _jsx("div", { className: "h-full min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: _jsx("div", { className: "h-full flex items-center gap-1 px-1.5", children: tabs.map((tab) => {
|
|
@@ -4291,6 +4293,8 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
4291
4293
|
const [selectedInboxConversationId, setSelectedInboxConversationId] = useState(null);
|
|
4292
4294
|
const [activeSessionTabId, setActiveSessionTabId] = useState(null);
|
|
4293
4295
|
const [sessionTabsHydrated, setSessionTabsHydrated] = useState(false);
|
|
4296
|
+
const [sessionSplit, setSessionSplit] = useState(null);
|
|
4297
|
+
const previousActiveSessionRef = useRef(null);
|
|
4294
4298
|
const sessionTabsRestoreAttemptedRef = useRef(false);
|
|
4295
4299
|
const editorStatusTimerRef = useRef(null);
|
|
4296
4300
|
const initialSdkSessionHandledRef = useRef(false);
|
|
@@ -5517,11 +5521,14 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
5517
5521
|
conversationId: conversation.id,
|
|
5518
5522
|
title: conversation.title || 'New conversation',
|
|
5519
5523
|
status: conversationSessionTabStatus(conversation, activeSessionTabId, activeRuntimeConversationId, activeRuntimeRequestId),
|
|
5524
|
+
...(conversation.sessionUi?.workCopy ? { workCopyBranch: conversation.sessionUi.workCopy.branch } : {}),
|
|
5525
|
+
inSplit: sessionSplit?.includes(conversation.id) === true,
|
|
5520
5526
|
}))), [
|
|
5521
5527
|
activeRuntimeConversationId,
|
|
5522
5528
|
activeRuntimeRequestId,
|
|
5523
5529
|
activeSessionTabId,
|
|
5524
5530
|
orderedSessionConversations,
|
|
5531
|
+
sessionSplit,
|
|
5525
5532
|
]);
|
|
5526
5533
|
const activateSessionConversation = useCallback((conversationId) => {
|
|
5527
5534
|
const conversation = useAgentChatStore.getState().getConversation(conversationId);
|
|
@@ -5696,6 +5703,41 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
5696
5703
|
updateConversation(conversationId, personalConversationDefaults());
|
|
5697
5704
|
activateSessionConversation(conversationId);
|
|
5698
5705
|
}, [activateSessionConversation, createConversation, updateConversation]);
|
|
5706
|
+
useEffect(() => {
|
|
5707
|
+
const previous = previousActiveSessionRef.current;
|
|
5708
|
+
previousActiveSessionRef.current = activeSessionTabId;
|
|
5709
|
+
setSessionSplit((split) => followActiveSession(split, previous, activeSessionTabId));
|
|
5710
|
+
}, [activeSessionTabId]);
|
|
5711
|
+
const openSessionInSplit = useCallback((conversationId) => {
|
|
5712
|
+
setSessionSplit((split) => openInSplit(split, activeSessionTabId, conversationId));
|
|
5713
|
+
}, [activeSessionTabId]);
|
|
5714
|
+
const workCopyRepository = (activeSessionTabId && conversations[activeSessionTabId]?.sessionUi?.workCopy?.repository)
|
|
5715
|
+
|| (activeSessionTabId && conversations[activeSessionTabId]?.rootDirectory)
|
|
5716
|
+
|| null;
|
|
5717
|
+
const createSessionInWorkCopy = useCallback(async () => {
|
|
5718
|
+
if (!workCopyRepository)
|
|
5719
|
+
return;
|
|
5720
|
+
const engineering = getAgentPlatformBridge().engineering;
|
|
5721
|
+
const created = await engineering?.workCopyCreate({
|
|
5722
|
+
rootDirectory: workCopyRepository,
|
|
5723
|
+
allowedDirectories: [workCopyRepository],
|
|
5724
|
+
label: 'session',
|
|
5725
|
+
});
|
|
5726
|
+
if (!created?.success || !created.copy) {
|
|
5727
|
+
setEditorStatusMessage(created?.error || 'This surface cannot create a work copy.');
|
|
5728
|
+
return;
|
|
5729
|
+
}
|
|
5730
|
+
const { path, branch, repository } = created.copy;
|
|
5731
|
+
const conversationId = createConversation(MAIN_ASSISTANT_ID);
|
|
5732
|
+
updateConversation(conversationId, {
|
|
5733
|
+
schemaVersion: 3,
|
|
5734
|
+
workspaceMode: 'agent',
|
|
5735
|
+
rootDirectory: path,
|
|
5736
|
+
grantedDirectories: [path],
|
|
5737
|
+
sessionUi: { workCopy: { path, branch, repository } },
|
|
5738
|
+
});
|
|
5739
|
+
activateSessionConversation(conversationId);
|
|
5740
|
+
}, [activateSessionConversation, createConversation, updateConversation, workCopyRepository]);
|
|
5699
5741
|
const closeSessionConversation = useCallback((conversationId) => {
|
|
5700
5742
|
const state = useAgentChatStore.getState();
|
|
5701
5743
|
const conversation = state.getConversation(conversationId);
|
|
@@ -5856,8 +5898,45 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
5856
5898
|
conversations,
|
|
5857
5899
|
orderedSessionConversationIds,
|
|
5858
5900
|
]);
|
|
5901
|
+
const removeSessionWorkCopy = useCallback((conversationId) => {
|
|
5902
|
+
const conversation = useAgentChatStore.getState().getConversation(conversationId);
|
|
5903
|
+
const workCopy = conversation?.sessionUi?.workCopy;
|
|
5904
|
+
if (!workCopy)
|
|
5905
|
+
return;
|
|
5906
|
+
const { path, repository, branch } = workCopy;
|
|
5907
|
+
const request = { rootDirectory: repository, allowedDirectories: [repository], path, confirmed: true };
|
|
5908
|
+
void destructiveConfirmation.request(async () => {
|
|
5909
|
+
const listed = await getAgentPlatformBridge().engineering?.workCopyList({ rootDirectory: repository, allowedDirectories: [repository] });
|
|
5910
|
+
const copy = listed?.copies.find((candidate) => candidate.path === path);
|
|
5911
|
+
if (!copy)
|
|
5912
|
+
throw new Error(listed?.error || 'This work copy no longer exists.');
|
|
5913
|
+
return {
|
|
5914
|
+
title: copy.dirty ? 'Remove this work copy and lose its changes?' : 'Remove this work copy?',
|
|
5915
|
+
description: copy.dirty
|
|
5916
|
+
? `The folder has uncommitted changes, and they will be lost. Commits stay on ${branch}.`
|
|
5917
|
+
: `The folder is deleted. Commits stay on ${branch}.`,
|
|
5918
|
+
confirmLabel: copy.dirty ? 'Lose changes and remove' : 'Remove',
|
|
5919
|
+
execute: async () => {
|
|
5920
|
+
const removed = await getAgentPlatformBridge().engineering?.workCopyRemove({ ...request, discardChanges: copy.dirty });
|
|
5921
|
+
if (!removed?.removed)
|
|
5922
|
+
throw new Error(removed?.error || 'The work copy was not removed.');
|
|
5923
|
+
const { workCopy: _removed, ...sessionUi } = conversation?.sessionUi || {};
|
|
5924
|
+
updateConversation(conversationId, { sessionUi });
|
|
5925
|
+
closeSessionConversation(conversationId);
|
|
5926
|
+
},
|
|
5927
|
+
};
|
|
5928
|
+
});
|
|
5929
|
+
}, [closeSessionConversation, destructiveConfirmation.request, updateConversation]);
|
|
5930
|
+
useEffect(() => {
|
|
5931
|
+
setSessionSplit((split) => (split?.every((id) => orderedSessionConversationIds.includes(id)) ? split : null));
|
|
5932
|
+
}, [orderedSessionConversationIds]);
|
|
5859
5933
|
useEffect(() => {
|
|
5860
5934
|
const onKeyDown = (event) => {
|
|
5935
|
+
if (event.ctrlKey && event.altKey && event.key.toLowerCase() === 'w' && sessionSplit) {
|
|
5936
|
+
event.preventDefault();
|
|
5937
|
+
setSessionSplit(null);
|
|
5938
|
+
return;
|
|
5939
|
+
}
|
|
5861
5940
|
const shortcut = resolveAgentSessionTabShortcut(event, orderedSessionConversationIds.length);
|
|
5862
5941
|
if (!shortcut)
|
|
5863
5942
|
return;
|
|
@@ -5895,6 +5974,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
5895
5974
|
closeSessionConversation,
|
|
5896
5975
|
createSessionConversation,
|
|
5897
5976
|
orderedSessionConversationIds,
|
|
5977
|
+
sessionSplit,
|
|
5898
5978
|
]);
|
|
5899
5979
|
const updateAgent = (workspaceId, teamId, agentId, updates) => {
|
|
5900
5980
|
setWorkspaces(prev => prev.map(w => w.id === workspaceId
|
|
@@ -7543,6 +7623,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7543
7623
|
? current.filter((item) => item !== path)
|
|
7544
7624
|
: [...current, path]));
|
|
7545
7625
|
}, []);
|
|
7626
|
+
const openEditorDiffRef = useRef(null);
|
|
7546
7627
|
const handleEngineeringOpenPath = useCallback((path) => {
|
|
7547
7628
|
void handleOpenEditorPath(path);
|
|
7548
7629
|
}, [handleOpenEditorPath]);
|
|
@@ -7558,6 +7639,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7558
7639
|
const result = await getAgentPlatformBridge().engineering.gitDiff({
|
|
7559
7640
|
...engineeringRequestBase,
|
|
7560
7641
|
...(selectedPaths.length > 0 ? { paths: selectedPaths } : {}),
|
|
7642
|
+
...(selectedPaths.length === 1 ? { includeContents: true } : {}),
|
|
7561
7643
|
maxBytes: 180_000,
|
|
7562
7644
|
});
|
|
7563
7645
|
if (!result?.success) {
|
|
@@ -7567,6 +7649,21 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7567
7649
|
setEngineeringDiff(result.diff || '[No diff output]');
|
|
7568
7650
|
setEngineeringDiffLabel(selectedPaths.length > 0 ? `Diff: ${selectedPaths.length} selected` : 'Full working tree diff');
|
|
7569
7651
|
setEngineeringDiffTruncated(result.truncated === true);
|
|
7652
|
+
const [path] = selectedPaths;
|
|
7653
|
+
if (result.contents && path) {
|
|
7654
|
+
const patchLines = String(result.diff || '').split('\n');
|
|
7655
|
+
openEditorDiffRef.current?.({
|
|
7656
|
+
id: `git:${path}`,
|
|
7657
|
+
path,
|
|
7658
|
+
name: directoryLeafName(path),
|
|
7659
|
+
extension: path.includes('.') ? `.${path.split('.').pop()}` : '',
|
|
7660
|
+
originalContent: result.contents.original,
|
|
7661
|
+
modifiedContent: result.contents.modified,
|
|
7662
|
+
addedLines: patchLines.filter((line) => line.startsWith('+') && !line.startsWith('+++')).length,
|
|
7663
|
+
removedLines: patchLines.filter((line) => line.startsWith('-') && !line.startsWith('---')).length,
|
|
7664
|
+
createdAt: Date.now(),
|
|
7665
|
+
});
|
|
7666
|
+
}
|
|
7570
7667
|
}
|
|
7571
7668
|
finally {
|
|
7572
7669
|
setEngineeringLoading(false);
|
|
@@ -7586,7 +7683,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7586
7683
|
try {
|
|
7587
7684
|
const files = engineeringSelectedPaths.length > 0
|
|
7588
7685
|
? engineeringSelectedPaths
|
|
7589
|
-
: (engineeringGit?.files || []).map((file) => file.
|
|
7686
|
+
: (engineeringGit?.files || []).map((file) => file.relativePath);
|
|
7590
7687
|
const result = await getAgentPlatformBridge().engineering.enqueuePatchReview({
|
|
7591
7688
|
...engineeringRequestBase,
|
|
7592
7689
|
title: engineeringDiffLabel || 'Patch review',
|
|
@@ -7721,7 +7818,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7721
7818
|
setEngineeringError('Engineering stage bridge is not available.');
|
|
7722
7819
|
return;
|
|
7723
7820
|
}
|
|
7724
|
-
const targetPaths = paths?.length ? paths : (engineeringGit?.files || []).map((file) => file.
|
|
7821
|
+
const targetPaths = paths?.length ? paths : (engineeringGit?.files || []).map((file) => file.relativePath);
|
|
7725
7822
|
if (targetPaths.length === 0) {
|
|
7726
7823
|
setEngineeringError('No changed files to stage.');
|
|
7727
7824
|
return;
|
|
@@ -7752,7 +7849,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7752
7849
|
setEngineeringError('Engineering unstage bridge is not available.');
|
|
7753
7850
|
return;
|
|
7754
7851
|
}
|
|
7755
|
-
const targetPaths = paths?.length ? paths : (engineeringGit?.files || []).map((file) => file.
|
|
7852
|
+
const targetPaths = paths?.length ? paths : (engineeringGit?.files || []).map((file) => file.relativePath);
|
|
7756
7853
|
if (targetPaths.length === 0) {
|
|
7757
7854
|
setEngineeringError('No changed files to unstage.');
|
|
7758
7855
|
return;
|
|
@@ -8817,6 +8914,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8817
8914
|
setPendingEditorPath(null);
|
|
8818
8915
|
setEditorStatusMessage(null);
|
|
8819
8916
|
}, [centerPaneMode, setCenterPaneMode]);
|
|
8917
|
+
openEditorDiffRef.current = handleOpenEditorDiff;
|
|
8820
8918
|
const handlePeekEditorDiff = useCallback((diff) => {
|
|
8821
8919
|
handleOpenEditorDiff(diff);
|
|
8822
8920
|
}, [handleOpenEditorDiff]);
|
|
@@ -8918,6 +9016,16 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8918
9016
|
const handleSelectWorkbenchTab = useCallback((tab) => {
|
|
8919
9017
|
patchActiveConversationSessionUi({ panelOpen: true, panelTab: tab });
|
|
8920
9018
|
}, [patchActiveConversationSessionUi]);
|
|
9019
|
+
useEffect(() => {
|
|
9020
|
+
const onKeyDown = (event) => {
|
|
9021
|
+
if (!(event.ctrlKey && event.shiftKey && event.key.toLowerCase() === 'd'))
|
|
9022
|
+
return;
|
|
9023
|
+
event.preventDefault();
|
|
9024
|
+
handleSelectWorkbenchTab('engineering');
|
|
9025
|
+
};
|
|
9026
|
+
window.addEventListener('keydown', onKeyDown);
|
|
9027
|
+
return () => window.removeEventListener('keydown', onKeyDown);
|
|
9028
|
+
}, [handleSelectWorkbenchTab]);
|
|
8921
9029
|
const handleOpenPluginManager = useCallback(() => {
|
|
8922
9030
|
setSelectedAgentId(null);
|
|
8923
9031
|
setSelectedConversationId(null);
|
|
@@ -9276,7 +9384,13 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9276
9384
|
}, teamId: settingsPanel.teamId, teamName: teamForSettings?.name || settingsPanel.teamName, onClose: handleCloseSettings, onDelete: handleDeleteFromSettings }));
|
|
9277
9385
|
}
|
|
9278
9386
|
if (viewMode === 'inbox') {
|
|
9279
|
-
|
|
9387
|
+
const inboxView = (conversationId) => (_jsx(React.Suspense, { fallback: _jsx("div", { className: "flex h-full items-center justify-center text-[12px] text-white/35", children: "Loading chat..." }), children: _jsx(AgentView, { agentId: MAIN_ASSISTANT_ID, conversationId: conversationId, isMainAssistant: true, agentName: MAIN_ASSISTANT_NAME, model: MAIN_ASSISTANT_MODEL, templateName: "Main Assistant", workspaceName: "All Workspaces", teamName: "Global", systemPrompt: enrichedMainSystemPromptWithCodeContext, capabilities: { terminal: true, fileRead: true, fileWrite: true, appLaunch: true }, permissionProfile: "standard", allowedDirectories: [], approvalRules: [], allowedApps: [], teamAgents: [], onCreateWorkspace: handleMainCreateWorkspace, onCreateTeam: handleMainCreateTeam, onCreateTeamAgent: handleMainCreateTeamAgent, onGetInboxWorkspaceOptions: handleGetInboxWorkspaceOptions, onBindInboxConversationToWorkspace: handleBindInboxConversationToWorkspace, onOpenReassignedConversation: handleOpenReassignedConversation, onOpenEditorPath: handleOpenEditorPath, onOpenEditorDiff: handleOpenEditorDiff, onPeekEditorPath: handlePeekEditorPath, onPeekEditorDiff: handlePeekEditorDiff, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, externalInputLockReason: providerSessionTuiInputLockReason, onSendToNativeTui: activeProviderSessionTerminalId ? sendTextToActiveProviderTui : undefined, onConversationCreated: activateSessionConversation, onNavigateConversation: activateSessionConversation }) }));
|
|
9388
|
+
if (!sessionSplit)
|
|
9389
|
+
return inboxView(selectedInboxConversationId);
|
|
9390
|
+
return (_jsx("div", { className: "flex h-full min-w-0", "data-xeno-agent-session-split": "true", children: sessionSplit.map((conversationId, index) => (_jsx("div", { className: `h-full min-w-0 flex-1 ${index === 0 ? 'border-r border-[var(--xeno-border-subtle)]' : ''}`, "data-xeno-agent-session-pane": conversationId, "data-focused": conversationId === activeSessionTabId ? 'true' : 'false', onMouseDownCapture: () => {
|
|
9391
|
+
if (conversationId !== activeSessionTabId)
|
|
9392
|
+
activateSessionConversation(conversationId);
|
|
9393
|
+
}, children: inboxView(conversationId) }, conversationId))) }));
|
|
9280
9394
|
}
|
|
9281
9395
|
// If an agent is selected, show the chat view.
|
|
9282
9396
|
// Conversation is created lazily on first message send.
|
|
@@ -9436,14 +9550,47 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9436
9550
|
// Permission dialog state
|
|
9437
9551
|
const pendingPermission = usePermissionStore(s => s.pending);
|
|
9438
9552
|
const resolvePermission = usePermissionStore(s => s.resolvePermission);
|
|
9439
|
-
const
|
|
9553
|
+
const diffCommentsUi = activeConversation?.sessionUi;
|
|
9554
|
+
const setDiffComments = (next) => {
|
|
9555
|
+
if (!activeConversation)
|
|
9556
|
+
return;
|
|
9557
|
+
const sessionUi = useAgentChatStore.getState().getConversation(activeConversation.id)?.sessionUi;
|
|
9558
|
+
updateConversation(activeConversation.id, { sessionUi: { ...sessionUi, diffComments: next } });
|
|
9559
|
+
};
|
|
9560
|
+
const diffCommentProps = activeConversation
|
|
9561
|
+
? {
|
|
9562
|
+
comments: diffCommentsUi?.diffComments || [],
|
|
9563
|
+
onAddComment: (comment) => {
|
|
9564
|
+
const current = useAgentChatStore.getState().getConversation(activeConversation.id)?.sessionUi?.diffComments;
|
|
9565
|
+
setDiffComments(addDiffComment(current || [], comment, crypto.randomUUID()));
|
|
9566
|
+
},
|
|
9567
|
+
onRemoveComment: (id) => {
|
|
9568
|
+
const current = useAgentChatStore.getState().getConversation(activeConversation.id)?.sessionUi?.diffComments;
|
|
9569
|
+
setDiffComments(removeDiffComment(current || [], id));
|
|
9570
|
+
},
|
|
9571
|
+
onSendComments: () => {
|
|
9572
|
+
const sessionUi = useAgentChatStore.getState().getConversation(activeConversation.id)?.sessionUi;
|
|
9573
|
+
if (!sessionUi?.diffComments?.length)
|
|
9574
|
+
return;
|
|
9575
|
+
updateConversation(activeConversation.id, {
|
|
9576
|
+
sessionUi: {
|
|
9577
|
+
...sessionUi,
|
|
9578
|
+
diffComments: [],
|
|
9579
|
+
pendingPrompt: { id: crypto.randomUUID(), text: diffCommentsPrompt(sessionUi.diffComments) },
|
|
9580
|
+
},
|
|
9581
|
+
});
|
|
9582
|
+
setCenterPaneMode('agent');
|
|
9583
|
+
},
|
|
9584
|
+
}
|
|
9585
|
+
: {};
|
|
9586
|
+
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 }));
|
|
9440
9587
|
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, _jsx(Sidebar, { collapsed: sidebarCollapsed, onToggleCollapse: () => setSidebarCollapsed(c => !c), onOpenSettings: handleOpenSettings, workspaces: workspaces, setWorkspaces: setWorkspaces, inboxAgentId: MAIN_ASSISTANT_ID, isInboxSelected: viewMode === 'inbox', selectedInboxConversationId: selectedInboxConversationId, onSelectInbox: handleSelectInbox, onSelectInboxConversation: handleSelectInboxConversation, selectedAgentId: selectedAgentId, onSelectAgent: handleSelectAgent, selectedConversationId: selectedConversationId, onSelectConversation: handleSelectConversation, agentRunAvailability: activeSubagentRunCounts, onOpenSearchResultInEditor: handleOpenEditorPath, onSelectPlugins: () => {
|
|
9441
9588
|
if (activeConversationId) {
|
|
9442
9589
|
handleSelectWorkbenchTab('plugins');
|
|
9443
9590
|
return;
|
|
9444
9591
|
}
|
|
9445
9592
|
handleOpenPluginManager();
|
|
9446
|
-
}, onSelectKnowledge: () => handleSelectWorkbenchTab('knowledge'), onSelectProjects: () => setViewMode('projects'), onSelectTeams: () => setViewMode('teams'), onSelectAgents: () => setViewMode('agents'), onSelectScheduled: () => setViewMode('scheduled'), 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),
|
|
9593
|
+
}, onSelectKnowledge: () => handleSelectWorkbenchTab('knowledge'), onSelectProjects: () => setViewMode('projects'), onSelectTeams: () => setViewMode('teams'), onSelectAgents: () => setViewMode('agents'), onSelectScheduled: () => setViewMode('scheduled'), 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: () => handleSelectWorkbenchTab('engineering'),
|
|
9447
9594
|
// The conversation surface owns its full width; the bench has no shell overlay over it.
|
|
9448
9595
|
// Files/Terminal controls remain on editor surfaces, and conversation context keeps the
|
|
9449
9596
|
// capability available through its existing workbench/menu actions.
|
|
@@ -9452,9 +9599,9 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9452
9599
|
: 'bg-transparent hover:bg-white/[0.055] text-white/35 hover:text-white/60'}`, children: "Panel" }) })] })), _jsxs("div", { className: "flex-1 min-h-0 flex flex-col overflow-hidden", children: [_jsxs("main", { className: "flex-1 min-w-0 flex flex-col overflow-hidden", children: [sessionResumeError && _jsx("div", { role: "alert", className: "px-3 py-2 text-[12px] text-red-300", children: sessionResumeError }), centerPaneMode === 'split'
|
|
9453
9600
|
? (_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: [_jsxs("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 items-center gap-2 pr-2", children: _jsx("button", { onClick: handleToggleWorkbenchPanel, className: `h-7 px-2.5 rounded-[5px] text-[10px] transition-colors ${workbenchPanelOpen
|
|
9454
9601
|
? 'bg-white/[0.075] text-white/72'
|
|
9455
|
-
: 'bg-transparent hover:bg-white/[0.055] text-white/35 hover:text-white/60'}`, children: "Panel" }) })] }), _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 })) : (_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 })) }) })] })] }))
|
|
9602
|
+
: 'bg-transparent hover:bg-white/[0.055] text-white/35 hover:text-white/60'}`, children: "Panel" }) })] }), _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 })) }) })] })] }))
|
|
9456
9603
|
: centerPaneMode === 'editor'
|
|
9457
|
-
? (_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 })) : (_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 })) }))
|
|
9604
|
+
? (_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 })) }))
|
|
9458
9605
|
: renderContent()] }), activeConversationId && workbenchPanelOpen && !settingsPanel && (_jsx("div", { className: "px-6 pb-5", children: _jsx("div", { className: `w-full 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, { knowledgeWorkspaceId: activeConversation?.workspaceId, tab: workbenchPanelTab,
|
|
9459
9606
|
/* The host's default `resolveRunId` is
|
|
9460
9607
|
`subagentRunId ?? conversationId`, so the conversation id
|
|
@@ -9462,8 +9609,8 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9462
9609
|
host about a run it has never heard of. */
|
|
9463
9610
|
reviewRunId: activeConversationId, coordinationSessionId: activeConversation?.sessionUi?.coordinationSessionId || activeConversationId, traceMessages: traceMessages, selectedTraceMessage: selectedTraceMessage, outputEntries: outputEntries, problemEntries: problemEntries, onSelectTab: handleSelectWorkbenchTab, onClose: handleCloseWorkbenchPanel, onSelectTraceMessage: handleSelectWorkbenchTraceMessage, onOpenChatSettings: handleOpenActiveConversationSettings, onOpenChatAcpAgents: handleOpenActiveConversationAcpAgents, onOpenChatPlugins: handleOpenPluginManager, onOpenChatKnowledge: handleOpenActiveConversationKnowledge, onOpenEditorPath: handleOpenEditorPath, onOpenEditorDiff: handleOpenEditorDiff, terminalCapabilityEnabled: terminalCapabilityEnabled, terminalReady: terminalReady, resolvedTerminalCwd: resolvedTerminalCwd, terminalDraftCwd: terminalDraftCwd, terminalDraftInput: terminalDraftInput, onChangeTerminalCwd: setTerminalDraftCwd, onChangeTerminalInput: setTerminalDraftInput, onResetTerminalCwd: handleResetWorkbenchTerminalCwd, onClearTerminalHistory: handleClearWorkbenchTerminalHistory, onRunTerminalCommand: () => { void handleRunWorkbenchTerminalCommand(); }, terminalHistory: terminalHistory, liveTerminalRuns: liveTerminalRunsForConversation, onReuseTerminalEntry: handleReuseWorkbenchTerminalEntry, onStopTerminalRun: (terminalId) => { void handleStopWorkbenchTerminalRun(terminalId); }, codeWorkbench: codeWorkbenchState, onCodeQueryChange: setCodeWorkbenchQuery, onCodeModeChange: handleCodeModeChange, onCodeIndex: handleCodeIndex, onCodeSearch: handleCodeSearch, onCodeOpenPath: handleCodeOpenPath, onCodeToggleFile: handleCodeToggleFile, onCodeToggleSymbol: handleCodeToggleSymbol, onCodeCreateContextPack: () => { void handleCodeCreateContextPack(); }, onCodeMaterializeContextPack: (packId) => { void handleCodeMaterializeContextPack(packId); }, onCodeAttachContextPack: (packId) => { void handleCodeAttachContextPack(packId); }, onCodeRefreshContextPacks: () => { void handleCodeRefreshContextPacks(); }, onCodeRefreshChanges: () => { void handleCodeRefreshChanges(); }, onCodeRefreshActions: () => { void handleCodeRefreshActions(); }, onCodeApplyAction: (action) => { void handleCodeApplyAction(action); }, onCodeOrganizeImports: () => { void handleCodeOrganizeImports(); }, onCodeRenameSymbol: () => { void handleCodeRenameSymbol(); }, onCodeRefreshLanguageServices: () => { void handleCodeRefreshLanguageServices(); }, onCodeControlLanguageService: (serviceId, action) => { void handleCodeControlLanguageService(serviceId, action); }, onCodeRepairIndex: () => { void handleCodeRepairIndex(); }, engineeringWorkbench: engineeringWorkbenchState, onEngineeringRefresh: () => { void handleEngineeringRefresh(); }, onEngineeringTogglePath: handleEngineeringTogglePath, onEngineeringOpenPath: handleEngineeringOpenPath, onEngineeringPreviewDiff: (paths) => { void handleEngineeringPreviewDiff(paths); }, onEngineeringStage: (paths) => { void handleEngineeringStage(paths); }, onEngineeringUnstage: (paths) => { void handleEngineeringUnstage(paths); }, onEngineeringRunCheck: (checkId) => { void handleEngineeringRunCheck(checkId); }, onEngineeringStartBackgroundCheck: (checkId) => { void handleEngineeringStartBackgroundCheck(checkId); }, onEngineeringStopBackgroundRun: (runId) => { void handleEngineeringStopBackgroundRun(runId); }, onEngineeringReadBackgroundRunOutput: (runId) => { void handleEngineeringReadBackgroundRunOutput(runId); }, onEngineeringCommitMessageChange: setEngineeringCommitMessage, onEngineeringCommit: () => { void handleEngineeringCommit(); }, onEngineeringQueuePatchReview: () => { void handleEngineeringQueuePatchReview(); }, onEngineeringUpdatePatchReview: (id, status) => { void handleEngineeringUpdatePatchReview(id, status); }, onEngineeringReviewPatchSelection: (request) => { void handleEngineeringReviewPatchSelection(request); }, onEngineeringCompareCheckpoints: (fromCheckpointId, toCheckpointId) => { void handleEngineeringCompareCheckpoints(fromCheckpointId, toCheckpointId); }, onEngineeringRestoreCheckpoint: (checkpointId) => { void handleEngineeringRestoreCheckpoint(checkpointId); }, cliControlPlane: cliControlPlaneState, cliControlPlaneCaller: policyCaller, cliControlPlaneConversationId: activeConversationId, cliControlPlaneRemoteBackendId: selectedAgent?.runtimeSelection?.remoteBackendId || '', onCliControlPlaneInspect: () => { void handleCliControlPlaneInspect(); }, onCliControlPlaneRemoteRunOperation: (action, runId) => { void handleCliControlPlaneRemoteRunOperation(action, runId); }, subagentWorkbench: subagentWorkbenchState, subagentDelegationTargets: subagentDelegationTargets, subagentDelegationSourceName: selectedAgent?.name, subagentDelegationDisabledReason: subagentDelegationDisabledReason, onSubagentRefresh: () => { void handleSubagentRefresh(); }, onSubagentRecoverRuns: () => { void handleSubagentRecoverRuns(); }, onSubagentSelectRun: handleSubagentSelectRun, onSubagentOpenConversation: handleSubagentOpenConversation, onSubagentCancelRun: (run) => { void handleSubagentCancelRun(run); }, onCreateSubagentDelegation: handleWorkbenchSubagentDelegation, policyWorkbench: policyWorkbenchState, onPolicyRefresh: () => { void handlePolicyRefresh(); } }) }) }) }))] })] }), folderPanelOpen && !settingsPanel && !['projects', 'teams', 'agents', 'scheduled'].includes(viewMode || '') && (_jsx(FolderSidebar, { conversationId: activeConversationId, workspaceId: activeConversation?.workspaceId || null, rootDirectory: activeConversation?.rootDirectory || null, allowedDirectories: activeConversationAllowedDirectories, onOpenFolder: handleOpenFolderForConversation, onClose: () => setFolderPanelOpen(false), onOpenFile: handleOpenEditorFile, activeFilePath: activeEditorFilePath, terminalCapabilityEnabled: terminalCapabilityEnabled, terminalReady: terminalReady, xenoTuiReady: xenoTuiReady, xenoTuiUnavailableReason: xenoTuiUnavailableReason, providerSessionTuiReady: providerSessionTuiReady, providerSessionTuiUnavailableReason: providerSessionTuiUnavailableReason, providerSessionTuiLabel: providerSessionTuiLabel, resolvedTerminalCwd: resolvedTerminalCwd, terminalTabs: rightPanelTerminalsForConversation, onPtyInput: handleRightPanelPtyInput, onPtyResize: handleRightPanelPtyResize, onCreateTerminal: handleCreateRightPanelTerminal, onCreateXenoTui: handleCreateXenoTui, onCreateProviderTui: handleCreateProviderSessionTui, onCloseTerminal: handleCloseRightPanelTerminal, onClearTerminal: handleClearRightPanelTerminal, onRestartTerminal: handleRestartRightPanelTerminal, onStopTerminal: handleStopRightPanelTerminal, width: rightPanelWidth, onResizeStart: handleRightPanelResizeStart })), rightPanelResizing && (_jsx("div", { className: "fixed inset-0 z-[9999] cursor-col-resize bg-transparent", "aria-hidden": "true" })), pendingPermission && (_jsx(PermissionDialog, { request: pendingPermission, onDecision: resolvePermission }))] }));
|
|
9464
9611
|
if (surface !== 'standalone-desktop') {
|
|
9465
|
-
return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden", "data-xeno-agent-embedded-shell": "true", children: [_jsxs("header", { className: "xeno-chrome-shell xeno-border-subtle h-10 flex flex-shrink-0 border-b", "data-xeno-agent-session-header": "embedded", "data-xeno-hub-header-style": "true", children: [_jsx("div", { className: "min-w-0 flex-1", children: sessionTabsNode }), _jsx(RightSidebarControls, { folderPanelOpen: folderPanelOpen, onOpenFolderPanel: () => setFolderPanelOpen(true), visible: !settingsPanel && !['projects', 'teams', 'agents', 'scheduled'].includes(viewMode || ''), inline: true })] }), _jsx(WorkspacePersistenceNotice, {}), _jsx(SidebarLayoutNotice, {}), _jsx("div", { className: "min-h-0 min-w-0 flex-1", children: agentWorkspace })] }));
|
|
9612
|
+
return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden", "data-xeno-agent-embedded-shell": "true", children: [_jsxs("header", { className: "xeno-chrome-shell xeno-border-subtle h-10 flex flex-shrink-0 border-b", "data-xeno-agent-session-header": "embedded", "data-xeno-hub-header-style": "true", children: [_jsx("div", { className: "min-w-0 flex-1", children: sessionTabsNode }), _jsx(RightSidebarControls, { folderPanelOpen: folderPanelOpen, onOpenFolderPanel: () => setFolderPanelOpen(true), onOpenChanges: () => handleSelectWorkbenchTab('engineering'), visible: !settingsPanel && !['projects', 'teams', 'agents', 'scheduled'].includes(viewMode || ''), inline: true })] }), _jsx(WorkspacePersistenceNotice, {}), _jsx(SidebarLayoutNotice, {}), _jsx("div", { className: "min-h-0 min-w-0 flex-1", children: agentWorkspace })] }));
|
|
9466
9613
|
}
|
|
9467
|
-
return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden", "data-xeno-agent-standalone-shell": "true", "data-xeno-agent-launch-mode": initialLaunchMode || 'default', children: [_jsx(XenoAgentProductHeader, { title: initialLaunchMode === 'chat' ? 'XENO Chat' : 'XENO Agent', workspaceSelector: _jsx(XenoAgentWorkspaceSelector, { onOpenWorkspaceSettings: handleOpenWorkspaceSettings }), centerContent: sessionTabsNode, trailingContent: _jsx(RightSidebarControls, { folderPanelOpen: folderPanelOpen, onOpenFolderPanel: () => setFolderPanelOpen(true), visible: !settingsPanel && !['projects', 'teams', 'agents', 'scheduled'].includes(viewMode || ''), inline: true }), onMinimize: windowControls?.onMinimize, onNewWindow: windowControls?.onNewWindow, onMaximize: windowControls?.onMaximize, onClose: windowControls?.onClose }), _jsx(WorkspacePersistenceNotice, {}), _jsx(SidebarLayoutNotice, {}), _jsx("div", { className: "min-h-0 min-w-0 flex-1", children: agentWorkspace }), isWorkspaceWizardOpen && (_jsx(WorkspaceCreationWizard, { onClose: closeWorkspaceWizard }))] }));
|
|
9614
|
+
return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden", "data-xeno-agent-standalone-shell": "true", "data-xeno-agent-launch-mode": initialLaunchMode || 'default', children: [_jsx(XenoAgentProductHeader, { title: initialLaunchMode === 'chat' ? 'XENO Chat' : 'XENO Agent', workspaceSelector: _jsx(XenoAgentWorkspaceSelector, { onOpenWorkspaceSettings: handleOpenWorkspaceSettings }), centerContent: sessionTabsNode, trailingContent: _jsx(RightSidebarControls, { folderPanelOpen: folderPanelOpen, onOpenFolderPanel: () => setFolderPanelOpen(true), onOpenChanges: () => handleSelectWorkbenchTab('engineering'), visible: !settingsPanel && !['projects', 'teams', 'agents', 'scheduled'].includes(viewMode || ''), inline: true }), onMinimize: windowControls?.onMinimize, onNewWindow: windowControls?.onNewWindow, onMaximize: windowControls?.onMaximize, onClose: windowControls?.onClose }), _jsx(WorkspacePersistenceNotice, {}), _jsx(SidebarLayoutNotice, {}), _jsx("div", { className: "min-h-0 min-w-0 flex-1", children: agentWorkspace }), isWorkspaceWizardOpen && (_jsx(WorkspaceCreationWizard, { onClose: closeWorkspaceWizard }))] }));
|
|
9468
9615
|
}
|
|
9469
9616
|
//# sourceMappingURL=AgentInterface.js.map
|