@xenosystem/agent-interface-ui 0.1.178 → 0.1.180

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/adapters/agentHostPlatformBridge.d.ts +2 -0
  2. package/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -1
  3. package/dist/adapters/agentHostPlatformBridge.js +11 -0
  4. package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
  5. package/dist/agent.css +50 -1
  6. package/dist/components/agent/AgentBrowserConnect.d.ts +3 -0
  7. package/dist/components/agent/AgentBrowserConnect.d.ts.map +1 -0
  8. package/dist/components/agent/AgentBrowserConnect.js +46 -0
  9. package/dist/components/agent/AgentBrowserConnect.js.map +1 -0
  10. package/dist/components/agent/AgentInterface.d.ts.map +1 -1
  11. package/dist/components/agent/AgentInterface.js +186 -16
  12. package/dist/components/agent/AgentInterface.js.map +1 -1
  13. package/dist/components/agent/AgentPreviewPanel.d.ts +6 -0
  14. package/dist/components/agent/AgentPreviewPanel.d.ts.map +1 -0
  15. package/dist/components/agent/AgentPreviewPanel.js +103 -0
  16. package/dist/components/agent/AgentPreviewPanel.js.map +1 -0
  17. package/dist/components/agent/AgentWorkbenchPanel.js +3 -3
  18. package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
  19. package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts +2 -1
  20. package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts.map +1 -1
  21. package/dist/components/agent/AgentWorkspaceBrowserPanel.js +8 -2
  22. package/dist/components/agent/AgentWorkspaceBrowserPanel.js.map +1 -1
  23. package/dist/components/agent/MonacoDiffWorkbenchEditor.d.ts +7 -1
  24. package/dist/components/agent/MonacoDiffWorkbenchEditor.d.ts.map +1 -1
  25. package/dist/components/agent/MonacoDiffWorkbenchEditor.js +83 -3
  26. package/dist/components/agent/MonacoDiffWorkbenchEditor.js.map +1 -1
  27. package/dist/components/agent/diffComments.d.ts +6 -0
  28. package/dist/components/agent/diffComments.d.ts.map +1 -0
  29. package/dist/components/agent/diffComments.js +17 -0
  30. package/dist/components/agent/diffComments.js.map +1 -0
  31. package/dist/components/product/XenoAgentSessionTabs.d.ts +10 -1
  32. package/dist/components/product/XenoAgentSessionTabs.d.ts.map +1 -1
  33. package/dist/components/product/XenoAgentSessionTabs.js +22 -5
  34. package/dist/components/product/XenoAgentSessionTabs.js.map +1 -1
  35. package/dist/components/product/sessionSplit.d.ts +7 -0
  36. package/dist/components/product/sessionSplit.d.ts.map +1 -0
  37. package/dist/components/product/sessionSplit.js +19 -0
  38. package/dist/components/product/sessionSplit.js.map +1 -0
  39. package/package.json +6 -6
  40. package/src/agent.css +49 -0
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { getOptionalAgentPlatformBridge } from '@xenosystem/agent-conversation/platformBridge';
4
+ /** Links the person's own Chrome or Edge, so the agent's browser tools act where they are signed in. */
5
+ export function AgentBrowserConnect() {
6
+ const machine = getOptionalAgentPlatformBridge()?.machine;
7
+ const [status, setStatus] = useState(null);
8
+ const [connecting, setConnecting] = useState(false);
9
+ const [installed, setInstalled] = useState(false);
10
+ useEffect(() => {
11
+ let cancelled = false;
12
+ const read = () => {
13
+ void machine?.browser({ action: 'status' }).then((result) => {
14
+ if (cancelled)
15
+ return;
16
+ if (result.success)
17
+ setStatus({ connected: result.connected, ...(result.extensionUrl ? { extensionUrl: result.extensionUrl } : {}) });
18
+ else
19
+ setStatus({ connected: false, error: result.error });
20
+ }).catch((error) => {
21
+ if (!cancelled)
22
+ setStatus({ connected: false, error: error instanceof Error ? error.message : String(error) });
23
+ });
24
+ };
25
+ read();
26
+ const timer = window.setInterval(read, 5_000);
27
+ return () => { cancelled = true; window.clearInterval(timer); };
28
+ }, [machine]);
29
+ if (!machine?.browser || !status)
30
+ return null;
31
+ if (status.connected) {
32
+ return _jsx("div", { className: "flex-shrink-0 border-b border-white/[0.06] px-2 py-1.5 text-[11px] text-white/55", "data-xeno-browser-connected": "true", children: "Your browser is connected. The agent's browser tools act in it." });
33
+ }
34
+ const connect = async () => {
35
+ setConnecting(true);
36
+ const result = await machine.browser({ action: 'connect' });
37
+ setConnecting(false);
38
+ if (result.success)
39
+ setInstalled(true);
40
+ else
41
+ setStatus({ ...status, error: result.error || 'The companion could not be installed.' });
42
+ };
43
+ return (_jsxs("div", { className: "flex-shrink-0 border-b border-white/[0.06] px-2 py-1.5 text-[11px] text-white/55", "data-xeno-browser-connect": "true", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { children: "Use your own Chrome or Edge, where you are signed in." }), _jsx("button", { type: "button", disabled: connecting, onClick: () => { void connect(); }, className: "h-6 flex-shrink-0 rounded border border-white/[0.1] px-2 text-white/75 disabled:opacity-40", "data-xeno-browser-connect-action": "true", children: connecting ? 'Installing…' : 'Connect' })] }), installed && (_jsxs("p", { className: "mt-1", children: ["The companion is installed. If XENO Extension is not in your browser yet,", ' ', _jsx("button", { type: "button", className: "underline", onClick: () => { if (status.extensionUrl)
44
+ void getOptionalAgentPlatformBridge()?.window?.openExternal?.(status.extensionUrl); }, children: "download it" }), ", unzip it, open chrome://extensions, turn on Developer mode and choose Load unpacked. Then restart the browser."] })), status.error && _jsx("p", { role: "alert", className: "mt-1 text-red-300/80", children: status.error })] }));
45
+ }
46
+ //# sourceMappingURL=AgentBrowserConnect.js.map
@@ -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,CA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,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;AAo1H/C,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,UAAU,GAAG,oBAAoB,CAAA;IAC3C,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAA;IAChC,cAAc,CAAC,EAAE;QACf,WAAW,CAAC,EAAE,qBAAqB,CAAA;QACnC,UAAU,CAAC,EAAE,qBAAqB,CAAA;QAClC,UAAU,CAAC,EAAE,qBAAqB,CAAA;QAClC,OAAO,CAAC,EAAE,qBAAqB,CAAA;KAChC,CAAA;CACF;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,OAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACf,GAAE,mBAAwB,qBAovM1B"}
@@ -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'));
@@ -1625,9 +1627,20 @@ function clampRightPanelWidth(width) {
1625
1627
  : Math.max(RIGHT_PANEL_MIN_WIDTH, Math.min(RIGHT_PANEL_MAX_WIDTH, window.innerWidth - 360));
1626
1628
  return Math.min(viewportAwareMax, Math.max(RIGHT_PANEL_MIN_WIDTH, Math.round(width)));
1627
1629
  }
1628
- function FolderSidebar({ conversationId, workspaceId, rootDirectory, allowedDirectories, onOpenFolder, onClose, onOpenFile, activeFilePath, terminalCapabilityEnabled, terminalReady, xenoTuiReady, xenoTuiUnavailableReason, providerSessionTuiReady, providerSessionTuiUnavailableReason, providerSessionTuiLabel, resolvedTerminalCwd, terminalTabs, onPtyInput, onPtyResize, onCreateTerminal, onCreateXenoTui, onCreateProviderTui, onCloseTerminal, onClearTerminal, onRestartTerminal, onStopTerminal, width, onResizeStart, }) {
1630
+ function FolderSidebar({ conversationId, workspaceId, rootDirectory, allowedDirectories, onOpenFolder, onClose, onOpenFile, activeFilePath, terminalCapabilityEnabled, terminalReady, xenoTuiReady, xenoTuiUnavailableReason, providerSessionTuiReady, providerSessionTuiUnavailableReason, providerSessionTuiLabel, resolvedTerminalCwd, terminalTabs, tabRequest, onPtyInput, onPtyResize, onCreateTerminal, onCreateXenoTui, onCreateProviderTui, onCloseTerminal, onClearTerminal, onRestartTerminal, onStopTerminal, width, onResizeStart, }) {
1629
1631
  const [rightPanelTab, setRightPanelTab] = useState('files');
1630
1632
  const [browserTabs, setBrowserTabs] = useState(() => loadCachedRightPanelBrowserTabs());
1633
+ useEffect(() => {
1634
+ if (tabRequest?.tab === 'browser' && browserTabs[0])
1635
+ setRightPanelTab(`browser:${browserTabs[0].id}`);
1636
+ if (tabRequest?.tab === 'terminal') {
1637
+ const id = terminalTabs[0]?.id ?? onCreateTerminal();
1638
+ if (id)
1639
+ setRightPanelTab(`terminal:${id}`);
1640
+ }
1641
+ // Only a new request moves the tab; the lists changing must not.
1642
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1643
+ }, [tabRequest]);
1631
1644
  const activeBrowserTabId = rightPanelTab.startsWith('browser:') ? rightPanelTab.slice('browser:'.length) : null;
1632
1645
  const activeBrowser = activeBrowserTabId
1633
1646
  ? browserTabs.find((tab) => tab.id === activeBrowserTabId) || null
@@ -1928,10 +1941,10 @@ function FolderSidebar({ conversationId, workspaceId, rootDirectory, allowedDire
1928
1941
  ? true
1929
1942
  : terminalReady, onInput: (data) => activeTerminal && onPtyInput(activeTerminal.id, data), onResize: (cols, rows) => activeTerminal && onPtyResize(activeTerminal.id, cols, rows) }) }))] })] }));
1930
1943
  }
1931
- function RightSidebarControls({ folderPanelOpen, onOpenFolderPanel, visible = true, inline = false, }) {
1932
- if (!visible || folderPanelOpen)
1944
+ function RightSidebarControls({ folderPanelOpen, onOpenFolderPanel, onOpenChanges, visible = true, inline = false, }) {
1945
+ if (!visible)
1933
1946
  return null;
1934
- return (_jsx("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: _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 }) }) }));
1947
+ 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
1948
  }
1936
1949
  function EditorTabs({ tabs, activeTabId, onSelectTab, onCloseTab, }) {
1937
1950
  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 +4304,9 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
4291
4304
  const [selectedInboxConversationId, setSelectedInboxConversationId] = useState(null);
4292
4305
  const [activeSessionTabId, setActiveSessionTabId] = useState(null);
4293
4306
  const [sessionTabsHydrated, setSessionTabsHydrated] = useState(false);
4307
+ const [sessionSplit, setSessionSplit] = useState(null);
4308
+ const [rightPanelTabRequest, setRightPanelTabRequest] = useState(null);
4309
+ const previousActiveSessionRef = useRef(null);
4294
4310
  const sessionTabsRestoreAttemptedRef = useRef(false);
4295
4311
  const editorStatusTimerRef = useRef(null);
4296
4312
  const initialSdkSessionHandledRef = useRef(false);
@@ -5517,11 +5533,14 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5517
5533
  conversationId: conversation.id,
5518
5534
  title: conversation.title || 'New conversation',
5519
5535
  status: conversationSessionTabStatus(conversation, activeSessionTabId, activeRuntimeConversationId, activeRuntimeRequestId),
5536
+ ...(conversation.sessionUi?.workCopy ? { workCopyBranch: conversation.sessionUi.workCopy.branch } : {}),
5537
+ inSplit: sessionSplit?.includes(conversation.id) === true,
5520
5538
  }))), [
5521
5539
  activeRuntimeConversationId,
5522
5540
  activeRuntimeRequestId,
5523
5541
  activeSessionTabId,
5524
5542
  orderedSessionConversations,
5543
+ sessionSplit,
5525
5544
  ]);
5526
5545
  const activateSessionConversation = useCallback((conversationId) => {
5527
5546
  const conversation = useAgentChatStore.getState().getConversation(conversationId);
@@ -5696,6 +5715,41 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5696
5715
  updateConversation(conversationId, personalConversationDefaults());
5697
5716
  activateSessionConversation(conversationId);
5698
5717
  }, [activateSessionConversation, createConversation, updateConversation]);
5718
+ useEffect(() => {
5719
+ const previous = previousActiveSessionRef.current;
5720
+ previousActiveSessionRef.current = activeSessionTabId;
5721
+ setSessionSplit((split) => followActiveSession(split, previous, activeSessionTabId));
5722
+ }, [activeSessionTabId]);
5723
+ const openSessionInSplit = useCallback((conversationId) => {
5724
+ setSessionSplit((split) => openInSplit(split, activeSessionTabId, conversationId));
5725
+ }, [activeSessionTabId]);
5726
+ const workCopyRepository = (activeSessionTabId && conversations[activeSessionTabId]?.sessionUi?.workCopy?.repository)
5727
+ || (activeSessionTabId && conversations[activeSessionTabId]?.rootDirectory)
5728
+ || null;
5729
+ const createSessionInWorkCopy = useCallback(async () => {
5730
+ if (!workCopyRepository)
5731
+ return;
5732
+ const engineering = getAgentPlatformBridge().engineering;
5733
+ const created = await engineering?.workCopyCreate({
5734
+ rootDirectory: workCopyRepository,
5735
+ allowedDirectories: [workCopyRepository],
5736
+ label: 'session',
5737
+ });
5738
+ if (!created?.success || !created.copy) {
5739
+ setEditorStatusMessage(created?.error || 'This surface cannot create a work copy.');
5740
+ return;
5741
+ }
5742
+ const { path, branch, repository } = created.copy;
5743
+ const conversationId = createConversation(MAIN_ASSISTANT_ID);
5744
+ updateConversation(conversationId, {
5745
+ schemaVersion: 3,
5746
+ workspaceMode: 'agent',
5747
+ rootDirectory: path,
5748
+ grantedDirectories: [path],
5749
+ sessionUi: { workCopy: { path, branch, repository } },
5750
+ });
5751
+ activateSessionConversation(conversationId);
5752
+ }, [activateSessionConversation, createConversation, updateConversation, workCopyRepository]);
5699
5753
  const closeSessionConversation = useCallback((conversationId) => {
5700
5754
  const state = useAgentChatStore.getState();
5701
5755
  const conversation = state.getConversation(conversationId);
@@ -5856,8 +5910,45 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5856
5910
  conversations,
5857
5911
  orderedSessionConversationIds,
5858
5912
  ]);
5913
+ const removeSessionWorkCopy = useCallback((conversationId) => {
5914
+ const conversation = useAgentChatStore.getState().getConversation(conversationId);
5915
+ const workCopy = conversation?.sessionUi?.workCopy;
5916
+ if (!workCopy)
5917
+ return;
5918
+ const { path, repository, branch } = workCopy;
5919
+ const request = { rootDirectory: repository, allowedDirectories: [repository], path, confirmed: true };
5920
+ void destructiveConfirmation.request(async () => {
5921
+ const listed = await getAgentPlatformBridge().engineering?.workCopyList({ rootDirectory: repository, allowedDirectories: [repository] });
5922
+ const copy = listed?.copies.find((candidate) => candidate.path === path);
5923
+ if (!copy)
5924
+ throw new Error(listed?.error || 'This work copy no longer exists.');
5925
+ return {
5926
+ title: copy.dirty ? 'Remove this work copy and lose its changes?' : 'Remove this work copy?',
5927
+ description: copy.dirty
5928
+ ? `The folder has uncommitted changes, and they will be lost. Commits stay on ${branch}.`
5929
+ : `The folder is deleted. Commits stay on ${branch}.`,
5930
+ confirmLabel: copy.dirty ? 'Lose changes and remove' : 'Remove',
5931
+ execute: async () => {
5932
+ const removed = await getAgentPlatformBridge().engineering?.workCopyRemove({ ...request, discardChanges: copy.dirty });
5933
+ if (!removed?.removed)
5934
+ throw new Error(removed?.error || 'The work copy was not removed.');
5935
+ const { workCopy: _removed, ...sessionUi } = conversation?.sessionUi || {};
5936
+ updateConversation(conversationId, { sessionUi });
5937
+ closeSessionConversation(conversationId);
5938
+ },
5939
+ };
5940
+ });
5941
+ }, [closeSessionConversation, destructiveConfirmation.request, updateConversation]);
5942
+ useEffect(() => {
5943
+ setSessionSplit((split) => (split?.every((id) => orderedSessionConversationIds.includes(id)) ? split : null));
5944
+ }, [orderedSessionConversationIds]);
5859
5945
  useEffect(() => {
5860
5946
  const onKeyDown = (event) => {
5947
+ if (event.ctrlKey && event.altKey && event.key.toLowerCase() === 'w' && sessionSplit) {
5948
+ event.preventDefault();
5949
+ setSessionSplit(null);
5950
+ return;
5951
+ }
5861
5952
  const shortcut = resolveAgentSessionTabShortcut(event, orderedSessionConversationIds.length);
5862
5953
  if (!shortcut)
5863
5954
  return;
@@ -5895,6 +5986,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5895
5986
  closeSessionConversation,
5896
5987
  createSessionConversation,
5897
5988
  orderedSessionConversationIds,
5989
+ sessionSplit,
5898
5990
  ]);
5899
5991
  const updateAgent = (workspaceId, teamId, agentId, updates) => {
5900
5992
  setWorkspaces(prev => prev.map(w => w.id === workspaceId
@@ -7543,6 +7635,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
7543
7635
  ? current.filter((item) => item !== path)
7544
7636
  : [...current, path]));
7545
7637
  }, []);
7638
+ const openEditorDiffRef = useRef(null);
7546
7639
  const handleEngineeringOpenPath = useCallback((path) => {
7547
7640
  void handleOpenEditorPath(path);
7548
7641
  }, [handleOpenEditorPath]);
@@ -7558,6 +7651,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
7558
7651
  const result = await getAgentPlatformBridge().engineering.gitDiff({
7559
7652
  ...engineeringRequestBase,
7560
7653
  ...(selectedPaths.length > 0 ? { paths: selectedPaths } : {}),
7654
+ ...(selectedPaths.length === 1 ? { includeContents: true } : {}),
7561
7655
  maxBytes: 180_000,
7562
7656
  });
7563
7657
  if (!result?.success) {
@@ -7567,6 +7661,21 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
7567
7661
  setEngineeringDiff(result.diff || '[No diff output]');
7568
7662
  setEngineeringDiffLabel(selectedPaths.length > 0 ? `Diff: ${selectedPaths.length} selected` : 'Full working tree diff');
7569
7663
  setEngineeringDiffTruncated(result.truncated === true);
7664
+ const [path] = selectedPaths;
7665
+ if (result.contents && path) {
7666
+ const patchLines = String(result.diff || '').split('\n');
7667
+ openEditorDiffRef.current?.({
7668
+ id: `git:${path}`,
7669
+ path,
7670
+ name: directoryLeafName(path),
7671
+ extension: path.includes('.') ? `.${path.split('.').pop()}` : '',
7672
+ originalContent: result.contents.original,
7673
+ modifiedContent: result.contents.modified,
7674
+ addedLines: patchLines.filter((line) => line.startsWith('+') && !line.startsWith('+++')).length,
7675
+ removedLines: patchLines.filter((line) => line.startsWith('-') && !line.startsWith('---')).length,
7676
+ createdAt: Date.now(),
7677
+ });
7678
+ }
7570
7679
  }
7571
7680
  finally {
7572
7681
  setEngineeringLoading(false);
@@ -7586,7 +7695,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
7586
7695
  try {
7587
7696
  const files = engineeringSelectedPaths.length > 0
7588
7697
  ? engineeringSelectedPaths
7589
- : (engineeringGit?.files || []).map((file) => file.path);
7698
+ : (engineeringGit?.files || []).map((file) => file.relativePath);
7590
7699
  const result = await getAgentPlatformBridge().engineering.enqueuePatchReview({
7591
7700
  ...engineeringRequestBase,
7592
7701
  title: engineeringDiffLabel || 'Patch review',
@@ -7721,7 +7830,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
7721
7830
  setEngineeringError('Engineering stage bridge is not available.');
7722
7831
  return;
7723
7832
  }
7724
- const targetPaths = paths?.length ? paths : (engineeringGit?.files || []).map((file) => file.path);
7833
+ const targetPaths = paths?.length ? paths : (engineeringGit?.files || []).map((file) => file.relativePath);
7725
7834
  if (targetPaths.length === 0) {
7726
7835
  setEngineeringError('No changed files to stage.');
7727
7836
  return;
@@ -7752,7 +7861,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
7752
7861
  setEngineeringError('Engineering unstage bridge is not available.');
7753
7862
  return;
7754
7863
  }
7755
- const targetPaths = paths?.length ? paths : (engineeringGit?.files || []).map((file) => file.path);
7864
+ const targetPaths = paths?.length ? paths : (engineeringGit?.files || []).map((file) => file.relativePath);
7756
7865
  if (targetPaths.length === 0) {
7757
7866
  setEngineeringError('No changed files to unstage.');
7758
7867
  return;
@@ -8817,6 +8926,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
8817
8926
  setPendingEditorPath(null);
8818
8927
  setEditorStatusMessage(null);
8819
8928
  }, [centerPaneMode, setCenterPaneMode]);
8929
+ openEditorDiffRef.current = handleOpenEditorDiff;
8820
8930
  const handlePeekEditorDiff = useCallback((diff) => {
8821
8931
  handleOpenEditorDiff(diff);
8822
8932
  }, [handleOpenEditorDiff]);
@@ -8918,6 +9028,27 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
8918
9028
  const handleSelectWorkbenchTab = useCallback((tab) => {
8919
9029
  patchActiveConversationSessionUi({ panelOpen: true, panelTab: tab });
8920
9030
  }, [patchActiveConversationSessionUi]);
9031
+ useEffect(() => {
9032
+ const onKeyDown = (event) => {
9033
+ const requestTab = (tab) => {
9034
+ event.preventDefault();
9035
+ setFolderPanelOpen(true);
9036
+ setRightPanelTabRequest({ tab, at: Date.now() });
9037
+ };
9038
+ if (event.ctrlKey && !event.shiftKey && !event.altKey && event.key === '`')
9039
+ requestTab('terminal');
9040
+ if (!event.ctrlKey || !event.shiftKey)
9041
+ return;
9042
+ if (event.key.toLowerCase() === 'b')
9043
+ requestTab('browser');
9044
+ if (event.key.toLowerCase() !== 'd')
9045
+ return;
9046
+ event.preventDefault();
9047
+ handleSelectWorkbenchTab('engineering');
9048
+ };
9049
+ window.addEventListener('keydown', onKeyDown);
9050
+ return () => window.removeEventListener('keydown', onKeyDown);
9051
+ }, [handleSelectWorkbenchTab]);
8921
9052
  const handleOpenPluginManager = useCallback(() => {
8922
9053
  setSelectedAgentId(null);
8923
9054
  setSelectedConversationId(null);
@@ -9276,7 +9407,13 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
9276
9407
  }, teamId: settingsPanel.teamId, teamName: teamForSettings?.name || settingsPanel.teamName, onClose: handleCloseSettings, onDelete: handleDeleteFromSettings }));
9277
9408
  }
9278
9409
  if (viewMode === 'inbox') {
9279
- return (_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: selectedInboxConversationId, 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 }) }));
9410
+ 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, onOpenChanges: () => handleSelectWorkbenchTab('engineering') }) }));
9411
+ if (!sessionSplit)
9412
+ return inboxView(selectedInboxConversationId);
9413
+ 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: () => {
9414
+ if (conversationId !== activeSessionTabId)
9415
+ activateSessionConversation(conversationId);
9416
+ }, children: inboxView(conversationId) }, conversationId))) }));
9280
9417
  }
9281
9418
  // If an agent is selected, show the chat view.
9282
9419
  // Conversation is created lazily on first message send.
@@ -9339,7 +9476,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
9339
9476
  selectedBy: 'user'
9340
9477
  }
9341
9478
  });
9342
- }, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, onConversationCreated: activateSessionConversation, onNavigateConversation: activateSessionConversation }) }));
9479
+ }, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, onConversationCreated: activateSessionConversation, onNavigateConversation: activateSessionConversation, onOpenChanges: () => handleSelectWorkbenchTab('engineering') }) }));
9343
9480
  }
9344
9481
  // Projects Workspace Hub view (rendered on the right side)
9345
9482
  if (viewMode === 'projects') {
@@ -9436,14 +9573,47 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
9436
9573
  // Permission dialog state
9437
9574
  const pendingPermission = usePermissionStore(s => s.pending);
9438
9575
  const resolvePermission = usePermissionStore(s => s.resolvePermission);
9439
- const sessionTabsNode = (_jsx(XenoAgentSessionTabs, { tabs: sessionTabs, activeConversationId: activeSessionTabId, placement: surface === 'standalone-desktop' ? 'titlebar' : 'embedded', onActivate: activateSessionConversation, onClose: closeSessionConversation, onCloseMany: closeSessionConversations, onCreate: createSessionConversation, onReorder: reorderSessionConversations }));
9576
+ const diffCommentsUi = activeConversation?.sessionUi;
9577
+ const setDiffComments = (next) => {
9578
+ if (!activeConversation)
9579
+ return;
9580
+ const sessionUi = useAgentChatStore.getState().getConversation(activeConversation.id)?.sessionUi;
9581
+ updateConversation(activeConversation.id, { sessionUi: { ...sessionUi, diffComments: next } });
9582
+ };
9583
+ const diffCommentProps = activeConversation
9584
+ ? {
9585
+ comments: diffCommentsUi?.diffComments || [],
9586
+ onAddComment: (comment) => {
9587
+ const current = useAgentChatStore.getState().getConversation(activeConversation.id)?.sessionUi?.diffComments;
9588
+ setDiffComments(addDiffComment(current || [], comment, crypto.randomUUID()));
9589
+ },
9590
+ onRemoveComment: (id) => {
9591
+ const current = useAgentChatStore.getState().getConversation(activeConversation.id)?.sessionUi?.diffComments;
9592
+ setDiffComments(removeDiffComment(current || [], id));
9593
+ },
9594
+ onSendComments: () => {
9595
+ const sessionUi = useAgentChatStore.getState().getConversation(activeConversation.id)?.sessionUi;
9596
+ if (!sessionUi?.diffComments?.length)
9597
+ return;
9598
+ updateConversation(activeConversation.id, {
9599
+ sessionUi: {
9600
+ ...sessionUi,
9601
+ diffComments: [],
9602
+ pendingPrompt: { id: crypto.randomUUID(), text: diffCommentsPrompt(sessionUi.diffComments) },
9603
+ },
9604
+ });
9605
+ setCenterPaneMode('agent');
9606
+ },
9607
+ }
9608
+ : {};
9609
+ 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
9610
  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
9611
  if (activeConversationId) {
9442
9612
  handleSelectWorkbenchTab('plugins');
9443
9613
  return;
9444
9614
  }
9445
9615
  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),
9616
+ }, 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
9617
  // The conversation surface owns its full width; the bench has no shell overlay over it.
9448
9618
  // Files/Terminal controls remain on editor surfaces, and conversation context keeps the
9449
9619
  // capability available through its existing workbench/menu actions.
@@ -9452,18 +9622,18 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
9452
9622
  : '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
9623
  ? (_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
9624
  ? '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 })) }) })] })] }))
9625
+ : '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
9626
  : 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 })) }))
9627
+ ? (_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
9628
  : 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
9629
  /* The host's default `resolveRunId` is
9460
9630
  `subagentRunId ?? conversationId`, so the conversation id
9461
9631
  IS the run id here. Passing anything else would ask the
9462
9632
  host about a run it has never heard of. */
9463
- 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 }))] }));
9633
+ 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, tabRequest: rightPanelTabRequest, 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
9634
  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 })] }));
9635
+ 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
9636
  }
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 }))] }));
9637
+ 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
9638
  }
9469
9639
  //# sourceMappingURL=AgentInterface.js.map