@xenosystem/agent-interface-ui 0.1.21 → 0.1.23

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 (63) hide show
  1. package/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -1
  2. package/dist/adapters/agentHostPlatformBridge.js +131 -0
  3. package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
  4. package/dist/adapters/hubAgentPlatformBridge.d.ts.map +1 -1
  5. package/dist/adapters/hubAgentPlatformBridge.js +9 -0
  6. package/dist/adapters/hubAgentPlatformBridge.js.map +1 -1
  7. package/dist/components/agent/AgentInterface.d.ts.map +1 -1
  8. package/dist/components/agent/AgentInterface.js +247 -32
  9. package/dist/components/agent/AgentInterface.js.map +1 -1
  10. package/dist/components/agent/AgentPtyTerminalPanel.d.ts.map +1 -1
  11. package/dist/components/agent/AgentPtyTerminalPanel.js +66 -21
  12. package/dist/components/agent/AgentPtyTerminalPanel.js.map +1 -1
  13. package/dist/components/agent/AgentView.d.ts +5 -0
  14. package/dist/components/agent/AgentView.d.ts.map +1 -1
  15. package/dist/components/agent/AgentView.js +243 -37
  16. package/dist/components/agent/AgentView.js.map +1 -1
  17. package/dist/components/agent/nativeTuiComposerInput.d.ts +42 -0
  18. package/dist/components/agent/nativeTuiComposerInput.d.ts.map +1 -0
  19. package/dist/components/agent/nativeTuiComposerInput.js +51 -0
  20. package/dist/components/agent/nativeTuiComposerInput.js.map +1 -0
  21. package/dist/components/agent/ptyOutputReconciliation.d.ts +41 -0
  22. package/dist/components/agent/ptyOutputReconciliation.d.ts.map +1 -0
  23. package/dist/components/agent/ptyOutputReconciliation.js +68 -0
  24. package/dist/components/agent/ptyOutputReconciliation.js.map +1 -0
  25. package/dist/components/agent/settings/sections/DefaultAgentConfigSection.d.ts.map +1 -1
  26. package/dist/components/agent/settings/sections/DefaultAgentConfigSection.js +3 -2
  27. package/dist/components/agent/settings/sections/DefaultAgentConfigSection.js.map +1 -1
  28. package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js +1 -1
  29. package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js.map +1 -1
  30. package/dist/components/agent/terminalSurfaceAvailability.d.ts +22 -0
  31. package/dist/components/agent/terminalSurfaceAvailability.d.ts.map +1 -0
  32. package/dist/components/agent/terminalSurfaceAvailability.js +43 -0
  33. package/dist/components/agent/terminalSurfaceAvailability.js.map +1 -0
  34. package/dist/components/agent/webJobProgressView.d.ts +90 -0
  35. package/dist/components/agent/webJobProgressView.d.ts.map +1 -0
  36. package/dist/components/agent/webJobProgressView.js +104 -0
  37. package/dist/components/agent/webJobProgressView.js.map +1 -0
  38. package/dist/platformApiTypes.d.ts +32 -0
  39. package/dist/platformApiTypes.d.ts.map +1 -1
  40. package/dist/platformBridge.d.ts +9 -0
  41. package/dist/platformBridge.d.ts.map +1 -1
  42. package/dist/platformBridge.js +11 -0
  43. package/dist/platformBridge.js.map +1 -1
  44. package/dist/stores/agentChatStore.d.ts +11 -1
  45. package/dist/stores/agentChatStore.d.ts.map +1 -1
  46. package/dist/stores/agentChatStore.js +103 -6
  47. package/dist/stores/agentChatStore.js.map +1 -1
  48. package/dist/stores/xenoChatStore.d.ts.map +1 -1
  49. package/dist/stores/xenoChatStore.js +2 -1
  50. package/dist/stores/xenoChatStore.js.map +1 -1
  51. package/dist/utils/acpExecutionAuthority.d.ts +8 -0
  52. package/dist/utils/acpExecutionAuthority.d.ts.map +1 -1
  53. package/dist/utils/acpExecutionAuthority.js +24 -0
  54. package/dist/utils/acpExecutionAuthority.js.map +1 -1
  55. package/dist/utils/modelAvailability.d.ts +11 -0
  56. package/dist/utils/modelAvailability.d.ts.map +1 -0
  57. package/dist/utils/modelAvailability.js +10 -0
  58. package/dist/utils/modelAvailability.js.map +1 -0
  59. package/dist/utils/providerAvailability.d.ts +8 -0
  60. package/dist/utils/providerAvailability.d.ts.map +1 -0
  61. package/dist/utils/providerAvailability.js +13 -0
  62. package/dist/utils/providerAvailability.js.map +1 -0
  63. package/package.json +5 -5
@@ -19,7 +19,11 @@ import { PermissionDialog } from './PermissionDialog.js';
19
19
  import { runtimeEventSummary } from './runtimeEventSummary.js';
20
20
  import { latestContextPressure } from './timelineContextPressure.js';
21
21
  import { buildSubagentConversationProjection } from './subagentConversationProjection.js';
22
+ import { providerNativeTuiAvailability, xenoTuiAvailability } from './terminalSurfaceAvailability.js';
23
+ import { reconcilePtySnapshotOutput } from './ptyOutputReconciliation.js';
24
+ import { planNativeTuiComposerInput, resolveNativeTuiWriterTerminalId } from './nativeTuiComposerInput.js';
22
25
  import { createConversationRuntimeBinding, runtimeSelectionForSdk } from '../../utils/conversationRuntime.js';
26
+ import { nativeExecutionPolicyForPermissionProfile, nativeWorkspaceTrustForPermissionProfile, } from '../../utils/acpExecutionAuthority.js';
23
27
  import { usePermissionStore } from '../../stores/permissionStore.js';
24
28
  import { useAgentChatStore, loadLocalAgentConversations, projectConversationRuntimeEvents, resetAcpContinuationForWorkspaceChange, } from '../../stores/agentChatStore.js';
25
29
  import { useAgentIdeStore } from '../../stores/agentIdeStore.js';
@@ -1604,7 +1608,7 @@ function clampRightPanelWidth(width) {
1604
1608
  : Math.max(RIGHT_PANEL_MIN_WIDTH, Math.min(RIGHT_PANEL_MAX_WIDTH, window.innerWidth - 360));
1605
1609
  return Math.min(viewportAwareMax, Math.max(RIGHT_PANEL_MIN_WIDTH, Math.round(width)));
1606
1610
  }
1607
- function FolderSidebar({ conversationId, rootDirectory, allowedDirectories, onOpenFolder, onClose, onOpenFile, activeFilePath, terminalCapabilityEnabled, terminalReady, providerSessionTuiReady, resolvedTerminalCwd, terminalTabs, onPtyInput, onPtyResize, onCreateTerminal, onCreateProviderTui, onCloseTerminal, onClearTerminal, onRestartTerminal, onStopTerminal, width, onResizeStart, }) {
1611
+ function FolderSidebar({ conversationId, 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, }) {
1608
1612
  const [rightPanelTab, setRightPanelTab] = useState('files');
1609
1613
  const [browserTabs, setBrowserTabs] = useState(() => loadCachedRightPanelBrowserTabs());
1610
1614
  const activeBrowserTabId = rightPanelTab.startsWith('browser:') ? rightPanelTab.slice('browser:'.length) : null;
@@ -1822,7 +1826,7 @@ function FolderSidebar({ conversationId, rootDirectory, allowedDirectories, onOp
1822
1826
  : 'text-white/0 group-hover:text-white/38 hover:!text-white/70 hover:bg-white/[0.07]'}`, "aria-label": `Close ${tab.label}`, children: _jsx(X, { className: "w-3 h-3", strokeWidth: 1.8 }) })] }, tab.id));
1823
1827
  })] }) }), _jsxs("div", { className: "h-full flex items-center gap-1 px-2", children: [_jsxs("div", { ref: newTabMenuRef, className: "relative", children: [_jsx("button", { type: "button", onClick: () => setNewTabMenuOpen((open) => !open), className: `h-7 w-7 inline-flex items-center justify-center rounded-[5px] transition-colors ${newTabMenuOpen
1824
1828
  ? 'text-white/72 bg-white/[0.07]'
1825
- : 'text-white/30 hover:text-white/65 hover:bg-white/[0.055]'}`, title: "New tab", "aria-haspopup": "menu", "aria-expanded": newTabMenuOpen, children: _jsx(PlusIcon, {}) }), newTabMenuOpen && (_jsxs("div", { role: "menu", className: "absolute right-0 top-[32px] z-50 w-44 overflow-hidden rounded-[7px] border border-white/[0.08] bg-[#111114] py-1 shadow-[0_16px_40px_rgba(0,0,0,0.45)]", children: [_jsxs("button", { type: "button", role: "menuitem", onClick: () => {
1829
+ : 'text-white/30 hover:text-white/65 hover:bg-white/[0.055]'}`, title: "New tab", "aria-label": "New right panel tab", "aria-haspopup": "menu", "aria-expanded": newTabMenuOpen, children: _jsx(PlusIcon, {}) }), newTabMenuOpen && (_jsxs("div", { role: "menu", className: "absolute right-0 top-[32px] z-50 w-44 overflow-hidden rounded-[7px] border border-white/[0.08] bg-[#111114] py-1 shadow-[0_16px_40px_rgba(0,0,0,0.45)]", children: [_jsxs("button", { type: "button", role: "menuitem", onClick: () => {
1826
1830
  handleCreateBrowserTab();
1827
1831
  setNewTabMenuOpen(false);
1828
1832
  }, className: "w-full flex items-center gap-2.5 px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors", children: [_jsx(Globe2, { className: "h-3.5 w-3.5 text-white/42", strokeWidth: 1.8 }), _jsx("span", { children: "Browser" })] }), _jsxs("button", { type: "button", role: "menuitem", onClick: () => {
@@ -1830,14 +1834,19 @@ function FolderSidebar({ conversationId, rootDirectory, allowedDirectories, onOp
1830
1834
  if (id)
1831
1835
  setRightPanelTab(`terminal:${id}`);
1832
1836
  setNewTabMenuOpen(false);
1833
- }, disabled: !terminalCapabilityEnabled || !terminalReady, className: "w-full flex items-center gap-2.5 px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-35 disabled:hover:bg-transparent disabled:hover:text-white/64", children: [_jsx(Terminal, { className: "h-3.5 w-3.5 text-white/42", strokeWidth: 1.8 }), _jsx("span", { children: "PowerShell" })] }), _jsxs("button", { type: "button", role: "menuitem", onClick: () => {
1837
+ }, disabled: !terminalCapabilityEnabled || !terminalReady, className: "w-full flex items-center gap-2.5 px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-35 disabled:hover:bg-transparent disabled:hover:text-white/64", children: [_jsx(Terminal, { className: "h-3.5 w-3.5 text-white/42", strokeWidth: 1.8 }), _jsx("span", { children: "PowerShell" })] }), _jsxs("button", { type: "button", role: "menuitem", "aria-label": "Open XENO TUI", onClick: () => {
1838
+ const id = onCreateXenoTui();
1839
+ if (id)
1840
+ setRightPanelTab(`terminal:${id}`);
1841
+ setNewTabMenuOpen(false);
1842
+ }, disabled: !xenoTuiReady, title: xenoTuiUnavailableReason, className: "w-full flex items-start gap-2.5 px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-45 disabled:hover:bg-transparent disabled:hover:text-white/64", children: [_jsx(Terminal, { className: "mt-0.5 h-3.5 w-3.5 flex-none text-white/42", strokeWidth: 1.8 }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "block", children: "XENO TUI" }), !xenoTuiReady && xenoTuiUnavailableReason ? _jsx("span", { className: "mt-0.5 block text-[10px] leading-3 text-white/45", children: xenoTuiUnavailableReason }) : null] })] }), _jsxs("button", { type: "button", role: "menuitem", "aria-label": `Open ${providerSessionTuiLabel}`, onClick: () => {
1834
1843
  const id = onCreateProviderTui();
1835
1844
  if (id)
1836
1845
  setRightPanelTab(`terminal:${id}`);
1837
1846
  setNewTabMenuOpen(false);
1838
- }, disabled: !providerSessionTuiReady, className: "w-full flex items-center gap-2.5 px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-35 disabled:hover:bg-transparent disabled:hover:text-white/64", children: [_jsx(Terminal, { className: "h-3.5 w-3.5 text-white/42", strokeWidth: 1.8 }), _jsx("span", { children: "Provider TUI" })] })] }))] }), _jsxs("div", { ref: panelMenuRef, className: "relative", children: [_jsx("button", { type: "button", onClick: () => setPanelMenuOpen((open) => !open), className: `h-7 w-7 inline-flex items-center justify-center rounded-[5px] transition-colors ${panelMenuOpen
1847
+ }, disabled: !providerSessionTuiReady, title: providerSessionTuiUnavailableReason, className: "w-full flex items-start gap-2.5 px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-45 disabled:hover:bg-transparent disabled:hover:text-white/64", children: [_jsx(Terminal, { className: "mt-0.5 h-3.5 w-3.5 flex-none text-white/42", strokeWidth: 1.8 }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "block", children: providerSessionTuiLabel }), !providerSessionTuiReady && providerSessionTuiUnavailableReason ? _jsx("span", { className: "mt-0.5 block text-[10px] leading-3 text-white/45", children: providerSessionTuiUnavailableReason }) : null] })] })] }))] }), _jsxs("div", { ref: panelMenuRef, className: "relative", children: [_jsx("button", { type: "button", onClick: () => setPanelMenuOpen((open) => !open), className: `h-7 w-7 inline-flex items-center justify-center rounded-[5px] transition-colors ${panelMenuOpen
1839
1848
  ? 'text-white/72 bg-white/[0.07]'
1840
- : 'text-white/30 hover:text-white/65 hover:bg-white/[0.055]'}`, title: "Panel options", "aria-haspopup": "menu", "aria-expanded": panelMenuOpen, children: _jsx(MoreHorizontal, { className: "w-3.5 h-3.5", strokeWidth: 1.8 }) }), panelMenuOpen && (_jsxs("div", { role: "menu", className: "absolute right-0 top-[32px] z-50 w-52 overflow-hidden rounded-[7px] border border-white/[0.08] bg-[#111114] py-1 shadow-[0_16px_40px_rgba(0,0,0,0.45)]", children: [activeTerminal ? (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", role: "menuitem", onClick: () => {
1849
+ : 'text-white/30 hover:text-white/65 hover:bg-white/[0.055]'}`, title: "Panel options", "aria-label": "Right panel options", "aria-haspopup": "menu", "aria-expanded": panelMenuOpen, children: _jsx(MoreHorizontal, { className: "w-3.5 h-3.5", strokeWidth: 1.8 }) }), panelMenuOpen && (_jsxs("div", { role: "menu", className: "absolute right-0 top-[32px] z-50 w-52 overflow-hidden rounded-[7px] border border-white/[0.08] bg-[#111114] py-1 shadow-[0_16px_40px_rgba(0,0,0,0.45)]", children: [activeTerminal ? (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", role: "menuitem", onClick: () => {
1841
1850
  onClearTerminal(activeTerminal.id);
1842
1851
  setPanelMenuOpen(false);
1843
1852
  }, className: "w-full px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors", children: "Clear terminal" }), _jsx("button", { type: "button", role: "menuitem", onClick: () => {
@@ -1845,7 +1854,7 @@ function FolderSidebar({ conversationId, rootDirectory, allowedDirectories, onOp
1845
1854
  setPanelMenuOpen(false);
1846
1855
  }, className: "w-full px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors", children: activeTerminal.kind === 'provider-session' && activeTerminal.exited
1847
1856
  ? 'Reconcile and return to chat'
1848
- : `Restart ${activeTerminal.kind === 'provider-session' ? (activeTerminal.label || 'Provider TUI') : 'PowerShell'}` }), activeTerminal.kind === 'provider-session' && !activeTerminal.exited ? (_jsx("button", { type: "button", role: "menuitem", onClick: () => {
1857
+ : `Restart ${activeTerminal.kind === 'provider-session' ? (activeTerminal.label || 'Provider Native TUI') : activeTerminal.kind === 'xeno-session' ? 'XENO TUI' : 'PowerShell'}` }), activeTerminal.kind === 'provider-session' && !activeTerminal.exited ? (_jsx("button", { type: "button", role: "menuitem", onClick: () => {
1849
1858
  onStopTerminal(activeTerminal.id);
1850
1859
  setPanelMenuOpen(false);
1851
1860
  }, className: "w-full px-3 py-2 text-left text-[12px] text-red-200/70 hover:bg-red-500/[0.09] hover:text-red-100 transition-colors", children: "Stop provider session" })) : null, _jsx("button", { type: "button", role: "menuitem", onClick: () => {
@@ -1871,12 +1880,17 @@ function FolderSidebar({ conversationId, rootDirectory, allowedDirectories, onOp
1871
1880
  if (id)
1872
1881
  setRightPanelTab(`terminal:${id}`);
1873
1882
  setPanelMenuOpen(false);
1874
- }, disabled: !terminalCapabilityEnabled || !terminalReady, className: "w-full px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-35 disabled:hover:bg-transparent", children: "New PowerShell tab" }), _jsx("button", { type: "button", role: "menuitem", onClick: () => {
1883
+ }, disabled: !terminalCapabilityEnabled || !terminalReady, className: "w-full px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-35 disabled:hover:bg-transparent", children: "New PowerShell tab" }), _jsxs("button", { type: "button", role: "menuitem", "aria-label": "Open XENO TUI", onClick: () => {
1884
+ const id = onCreateXenoTui();
1885
+ if (id)
1886
+ setRightPanelTab(`terminal:${id}`);
1887
+ setPanelMenuOpen(false);
1888
+ }, disabled: !xenoTuiReady, title: xenoTuiUnavailableReason, className: "w-full px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-45 disabled:hover:bg-transparent", children: [_jsx("span", { className: "block", children: "Open XENO TUI" }), !xenoTuiReady && xenoTuiUnavailableReason ? _jsx("span", { className: "mt-0.5 block text-[10px] leading-3 text-white/45", children: xenoTuiUnavailableReason }) : null] }), _jsxs("button", { type: "button", role: "menuitem", "aria-label": `Open ${providerSessionTuiLabel}`, onClick: () => {
1875
1889
  const id = onCreateProviderTui();
1876
1890
  if (id)
1877
1891
  setRightPanelTab(`terminal:${id}`);
1878
1892
  setPanelMenuOpen(false);
1879
- }, disabled: !providerSessionTuiReady, className: "w-full px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-35 disabled:hover:bg-transparent", children: "Open Provider TUI" }), _jsx("button", { type: "button", role: "menuitem", onClick: () => {
1893
+ }, disabled: !providerSessionTuiReady, title: providerSessionTuiUnavailableReason, className: "w-full px-3 py-2 text-left text-[12px] text-white/64 hover:bg-white/[0.06] hover:text-white transition-colors disabled:cursor-not-allowed disabled:opacity-45 disabled:hover:bg-transparent", children: [_jsxs("span", { className: "block", children: ["Open ", providerSessionTuiLabel] }), !providerSessionTuiReady && providerSessionTuiUnavailableReason ? _jsx("span", { className: "mt-0.5 block text-[10px] leading-3 text-white/45", children: providerSessionTuiUnavailableReason }) : null] }), _jsx("button", { type: "button", role: "menuitem", onClick: () => {
1880
1894
  terminalTabs.forEach((tab) => onCloseTerminal(tab.id));
1881
1895
  setRightPanelTab('files');
1882
1896
  setPanelMenuOpen(false);
@@ -1888,7 +1902,14 @@ function FolderSidebar({ conversationId, rootDirectory, allowedDirectories, onOp
1888
1902
  return (_jsx("div", { className: visible
1889
1903
  ? 'absolute inset-0'
1890
1904
  : 'absolute inset-0 invisible pointer-events-none opacity-0', "aria-hidden": !visible, children: _jsx(React.Suspense, { fallback: _jsx("div", { className: "h-full bg-[#08080a] px-3 py-2 text-[12px] text-white/40", children: "Loading browser..." }), children: _jsx(AgentWorkspaceBrowserPanel, { browserId: tab.id, browserLabel: tab.label, rootDirectory: effectiveRoot || rootDirectory, allowedDirectories: effectiveAllowedDirectories, onOpenFolder: onOpenFolder }) }) }, tab.id));
1891
- }), rightPanelTab === 'files' && effectiveRoot && (_jsxs("div", { children: [_jsxs("button", { type: "button", onClick: () => handleToggleDirectory(effectiveRoot), className: "w-full flex items-center gap-1.5 px-2 py-1.5 text-white/68 hover:text-white hover:bg-white/[0.04] rounded-md transition-colors text-left", children: [_jsx(ChevronDownIcon, { className: `w-3 h-3 flex-shrink-0 transition-transform ${expandedPaths.has(effectiveRoot) ? '' : '-rotate-90'}` }), expandedPaths.has(effectiveRoot) ? (_jsx(FolderOpen, { className: "w-3.5 h-3.5 flex-shrink-0 text-white/55", strokeWidth: 1.8 })) : (_jsx(Folder, { className: "w-3.5 h-3.5 flex-shrink-0 text-white/45", strokeWidth: 1.8 })), _jsx("span", { className: "min-w-0 truncate text-[12px]", children: directoryLeafName(effectiveRoot) })] }), expandedPaths.has(effectiveRoot) && (_jsxs("div", { className: "mt-0.5", children: [isRootLoading && (_jsx(FolderTreeLoadingSkeleton, { depth: 1, rows: 5 })), !isRootLoading && loadErrors[effectiveRoot] && (_jsx("div", { className: "pl-7 py-1 text-[11px] text-red-300/45", children: loadErrors[effectiveRoot] })), !isRootLoading && !loadErrors[effectiveRoot] && (entriesByPath[effectiveRoot] || []).map((entry) => (_jsx(FolderTreeNode, { entry: entry, depth: 1, expandedPaths: expandedPaths, loadingPaths: loadingPaths, loadErrors: loadErrors, entriesByPath: entriesByPath, onToggleDirectory: handleToggleDirectory, onOpenFile: onOpenFile, activeFilePath: activeFilePath }, entry.path)))] }))] })), rightPanelTab === 'files' && !effectiveRoot && (_jsxs("div", { className: "mt-2 rounded-md border border-white/[0.06] bg-white/[0.02] p-3", children: [_jsx("p", { className: "text-[11px] uppercase tracking-[0.18em] text-white/28", children: "Folder Explorer" }), _jsx("p", { className: "mt-2 text-[12px] leading-relaxed text-white/42", children: "Open a folder for this conversation to browse files here and send them into the editor." }), _jsxs("div", { className: "mt-3 space-y-2", children: [_jsx(SkeletonBlock, { className: "h-3 w-[78%]" }), _jsx(SkeletonBlock, { className: "h-3 w-[66%]" }), _jsx(SkeletonBlock, { className: "h-3 w-[72%]" })] })] })), activeTerminalTabId && (_jsx(React.Suspense, { fallback: _jsx("div", { className: "h-full bg-[#050506] px-3 py-2 font-mono text-[12px] text-white/40", children: "Loading terminal..." }), children: _jsx(AgentPtyTerminalPanel, { terminalKey: activeTerminal?.id || null, terminalId: activeTerminal?.terminalId || null, output: activeTerminal?.output || '', terminalCapabilityEnabled: activeTerminal?.kind === 'provider-session' ? true : terminalCapabilityEnabled, terminalReady: activeTerminal?.kind === 'provider-session' ? providerSessionTuiReady : terminalReady, onInput: (data) => activeTerminal && onPtyInput(activeTerminal.id, data), onResize: (cols, rows) => activeTerminal && onPtyResize(activeTerminal.id, cols, rows) }) }))] })] }));
1905
+ }), rightPanelTab === 'files' && effectiveRoot && (_jsxs("div", { children: [_jsxs("button", { type: "button", onClick: () => handleToggleDirectory(effectiveRoot), className: "w-full flex items-center gap-1.5 px-2 py-1.5 text-white/68 hover:text-white hover:bg-white/[0.04] rounded-md transition-colors text-left", children: [_jsx(ChevronDownIcon, { className: `w-3 h-3 flex-shrink-0 transition-transform ${expandedPaths.has(effectiveRoot) ? '' : '-rotate-90'}` }), expandedPaths.has(effectiveRoot) ? (_jsx(FolderOpen, { className: "w-3.5 h-3.5 flex-shrink-0 text-white/55", strokeWidth: 1.8 })) : (_jsx(Folder, { className: "w-3.5 h-3.5 flex-shrink-0 text-white/45", strokeWidth: 1.8 })), _jsx("span", { className: "min-w-0 truncate text-[12px]", children: directoryLeafName(effectiveRoot) })] }), expandedPaths.has(effectiveRoot) && (_jsxs("div", { className: "mt-0.5", children: [isRootLoading && (_jsx(FolderTreeLoadingSkeleton, { depth: 1, rows: 5 })), !isRootLoading && loadErrors[effectiveRoot] && (_jsx("div", { className: "pl-7 py-1 text-[11px] text-red-300/45", children: loadErrors[effectiveRoot] })), !isRootLoading && !loadErrors[effectiveRoot] && (entriesByPath[effectiveRoot] || []).map((entry) => (_jsx(FolderTreeNode, { entry: entry, depth: 1, expandedPaths: expandedPaths, loadingPaths: loadingPaths, loadErrors: loadErrors, entriesByPath: entriesByPath, onToggleDirectory: handleToggleDirectory, onOpenFile: onOpenFile, activeFilePath: activeFilePath }, entry.path)))] }))] })), rightPanelTab === 'files' && !effectiveRoot && (_jsxs("div", { className: "mt-2 rounded-md border border-white/[0.06] bg-white/[0.02] p-3", children: [_jsx("p", { className: "text-[11px] uppercase tracking-[0.18em] text-white/28", children: "Folder Explorer" }), _jsx("p", { className: "mt-2 text-[12px] leading-relaxed text-white/42", children: "Open a folder for this conversation to browse files here and send them into the editor." }), _jsxs("div", { className: "mt-3 space-y-2", children: [_jsx(SkeletonBlock, { className: "h-3 w-[78%]" }), _jsx(SkeletonBlock, { className: "h-3 w-[66%]" }), _jsx(SkeletonBlock, { className: "h-3 w-[72%]" })] })] })), activeTerminalTabId && (_jsx(React.Suspense, { fallback: _jsx("div", { className: "h-full bg-[#050506] px-3 py-2 font-mono text-[12px] text-white/40", children: "Loading terminal..." }), children: _jsx(AgentPtyTerminalPanel, { terminalKey: activeTerminal?.id || null, terminalId: activeTerminal?.terminalId || null, output: activeTerminal?.output || '', terminalCapabilityEnabled: activeTerminal?.kind === 'provider-session' || activeTerminal?.kind === 'xeno-session' ? true : terminalCapabilityEnabled,
1906
+ // A created control-TUI tab remains renderable even after its
1907
+ // process exits or its lane moves to reconciliation. Otherwise
1908
+ // the useful vendor diagnostics are replaced by the unrelated
1909
+ // "Open a folder before starting PowerShell" placeholder.
1910
+ terminalReady: activeTerminal?.kind === 'provider-session' || activeTerminal?.kind === 'xeno-session'
1911
+ ? true
1912
+ : terminalReady, onInput: (data) => activeTerminal && onPtyInput(activeTerminal.id, data), onResize: (cols, rows) => activeTerminal && onPtyResize(activeTerminal.id, cols, rows) }) }))] })] }));
1892
1913
  }
1893
1914
  function RightSidebarControls({ folderPanelOpen, onOpenFolderPanel, }) {
1894
1915
  return (_jsxs("div", { className: "absolute top-2 right-3 z-20 flex items-center gap-1.5", children: [_jsx("button", { className: "h-[34px] w-[34px] inline-flex items-center justify-center text-white/35 hover:text-white/60 transition-colors", title: "Sidebar options", "aria-label": "Sidebar options", type: "button", children: _jsx(MoreHorizontal, { className: "w-4 h-4", strokeWidth: 1.8 }) }), !folderPanelOpen && (_jsx("button", { onClick: onOpenFolderPanel, className: "h-[34px] w-[34px] inline-flex items-center justify-center transition-colors text-white/45 hover:text-white/75", title: "Open right sidebar", "aria-label": "Open right sidebar", type: "button", children: _jsx(PanelRightOpen, { className: "w-4 h-4", strokeWidth: 1.8 }) }))] }));
@@ -3454,21 +3475,50 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3454
3475
  }
3455
3476
  return DEFAULT_AGENT_CAPABILITIES;
3456
3477
  }, [selectedAgentId, viewMode, workspaces]);
3478
+ const activeAgentPermissionProfile = useMemo(() => {
3479
+ if (viewMode !== 'agent' || !selectedAgentId)
3480
+ return 'standard';
3481
+ for (const workspace of workspaces) {
3482
+ for (const team of workspace.teams) {
3483
+ const agent = team.agents.find((entry) => entry.id === selectedAgentId);
3484
+ if (agent)
3485
+ return agent.permissionProfile || 'standard';
3486
+ }
3487
+ }
3488
+ return 'standard';
3489
+ }, [selectedAgentId, viewMode, workspaces]);
3457
3490
  const terminalCapabilityEnabled = !!activeAgentCapabilities.terminal;
3458
3491
  const terminalReady = terminalCapabilityEnabled && Boolean(resolvedTerminalCwd || activeConversationId);
3459
3492
  const activeLane = activeSessionUi.activeLane;
3460
3493
  const guiOwnsActiveProviderSession = Boolean(activeRuntimeRequestId && activeRuntimeConversationId === activeConversationId);
3461
- const providerSessionTuiReady = Boolean(activeConversationId
3462
- && activeLane?.laneId
3463
- && !guiOwnsActiveProviderSession
3464
- && getAgentPlatformBridge().workspace.providerNativeAttach
3465
- && (activeLane.status === 'new'
3466
- || activeLane.status === 'clean'
3467
- || rightPanelTerminals.some((tab) => (tab.kind === 'provider-session'
3468
- && tab.conversationId === activeConversationId
3469
- && tab.laneId === activeLane.laneId
3470
- && tab.detached === true
3471
- && !!tab.terminalId))));
3494
+ const activeConversationWorkspaceMode = activeConversation?.workspaceMode === 'workspace' ? 'workspace' : 'chat-only';
3495
+ const selectedRuntimeKind = activeConversation?.runtime?.selection.providerKind || 'sdk-native';
3496
+ const xenoTuiState = xenoTuiAvailability({
3497
+ conversationId: activeConversationId,
3498
+ workspaceMode: activeConversationWorkspaceMode,
3499
+ cwd: resolvedTerminalCwd,
3500
+ providerKind: selectedRuntimeKind,
3501
+ hostAttachAvailable: typeof getAgentPlatformBridge().workspace.xenoTuiAttach === 'function',
3502
+ guiTurnActive: guiOwnsActiveProviderSession,
3503
+ });
3504
+ const providerTuiState = providerNativeTuiAvailability({
3505
+ conversationId: activeConversationId,
3506
+ lane: activeLane,
3507
+ hostAttachAvailable: typeof getAgentPlatformBridge().workspace.providerNativeAttach === 'function',
3508
+ guiTurnActive: guiOwnsActiveProviderSession,
3509
+ hasDetachedTerminal: rightPanelTerminals.some((tab) => (tab.kind === 'provider-session'
3510
+ && tab.conversationId === activeConversationId
3511
+ && tab.laneId === activeLane?.laneId
3512
+ && tab.detached === true
3513
+ && !!tab.terminalId)),
3514
+ });
3515
+ const xenoTuiReady = xenoTuiState.ready;
3516
+ const xenoTuiUnavailableReason = xenoTuiState.reason;
3517
+ const providerSessionTuiReady = providerTuiState.ready;
3518
+ const providerSessionTuiUnavailableReason = providerTuiState.reason;
3519
+ const providerSessionTuiLabel = activeLane?.providerDisplayName
3520
+ ? `${activeLane.providerDisplayName} TUI`
3521
+ : 'Provider TUI';
3472
3522
  const rightPanelPtyAllowedKey = useMemo(() => activeConversationAllowedDirectories.map(normalizeDirectoryPath).join('|'), [activeConversationAllowedDirectories]);
3473
3523
  useEffect(() => {
3474
3524
  rightPanelTerminalsRef.current = rightPanelTerminals;
@@ -3488,7 +3538,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3488
3538
  terminalId: null,
3489
3539
  starting: false,
3490
3540
  exited: true,
3491
- output: entry.output || `[${entry.kind === 'provider-session' ? (entry.label || 'Provider TUI') : 'PowerShell'} session is no longer available.]\r\n`,
3541
+ output: entry.output || `[${entry.kind === 'provider-session' ? (entry.label || 'Provider Native TUI') : entry.kind === 'xeno-session' ? 'XENO TUI' : 'PowerShell'} session is no longer available.]\r\n`,
3492
3542
  };
3493
3543
  }
3494
3544
  return {
@@ -3544,6 +3594,21 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3544
3594
  getAgentPlatformBridge().workspace.offPtyExit();
3545
3595
  };
3546
3596
  }, []);
3597
+ const hydrateStartedPty = useCallback((tabId, terminalId) => {
3598
+ void getAgentPlatformBridge().workspace.ptySnapshot({ terminalId }).then((snapshot) => {
3599
+ if (!snapshot?.success || !snapshot.exists)
3600
+ return;
3601
+ setRightPanelTerminals((current) => current.map((tab) => (tab.id === tabId && tab.terminalId === terminalId
3602
+ ? {
3603
+ ...tab,
3604
+ cwd: snapshot.cwd || tab.cwd,
3605
+ output: reconcilePtySnapshotOutput(snapshot.output || '', tab.output),
3606
+ }
3607
+ : tab)));
3608
+ }).catch(() => {
3609
+ // Live PTY events remain authoritative when a best-effort hydration read fails.
3610
+ });
3611
+ }, []);
3547
3612
  const startRightPanelTerminal = useCallback((tabId, conversationId, cwd, allowedDirs, profile) => {
3548
3613
  const allowedDirsForStart = allowedDirs.length > 0 ? allowedDirs : [cwd].filter(Boolean);
3549
3614
  if (!profile && !cwd && allowedDirsForStart.length === 0 && !conversationId) {
@@ -3564,6 +3629,8 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3564
3629
  conversationId,
3565
3630
  laneId: profile.laneId,
3566
3631
  expectedLaneRevision: profile.expectedLaneRevision,
3632
+ workspaceTrust: nativeWorkspaceTrustForPermissionProfile(activeAgentPermissionProfile),
3633
+ executionPolicy: nativeExecutionPolicyForPermissionProfile(activeAgentPermissionProfile),
3567
3634
  cols: 80,
3568
3635
  rows: 24,
3569
3636
  })
@@ -3619,6 +3686,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3619
3686
  exited: false,
3620
3687
  }
3621
3688
  : tab)));
3689
+ hydrateStartedPty(tabId, result.terminalId);
3622
3690
  if (profile && 'laneRevision' in result && typeof result.laneRevision === 'number') {
3623
3691
  const conversation = useAgentChatStore.getState().getConversation(conversationId);
3624
3692
  const lane = conversation?.sessionUi?.activeLane;
@@ -3632,7 +3700,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3632
3700
  }
3633
3701
  }
3634
3702
  });
3635
- }, []);
3703
+ }, [activeAgentPermissionProfile, hydrateStartedPty]);
3636
3704
  const handleCreateRightPanelTerminal = useCallback(() => {
3637
3705
  if (!activeConversationId || !terminalCapabilityEnabled || !terminalReady)
3638
3706
  return null;
@@ -3664,9 +3732,114 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3664
3732
  terminalCapabilityEnabled,
3665
3733
  terminalReady,
3666
3734
  ]);
3735
+ const startCanonicalXenoTui = useCallback((tabId, conversationId) => {
3736
+ const attach = getAgentPlatformBridge().workspace.xenoTuiAttach;
3737
+ const conversation = useAgentChatStore.getState().getConversation(conversationId);
3738
+ if (!attach || !conversation) {
3739
+ setRightPanelTerminals((current) => current.map((tab) => tab.id === tabId
3740
+ ? { ...tab, starting: false, exited: true, output: `${tab.output}[XENO TUI attachment is unavailable on this host.]\r\n` }
3741
+ : tab));
3742
+ return;
3743
+ }
3744
+ const workspaceMode = conversation.workspaceMode === 'workspace' ? 'workspace' : 'chat-only';
3745
+ const workingDirectory = workspaceMode === 'workspace'
3746
+ ? (conversation.rootDirectory || conversation.grantedDirectories?.[0] || '')
3747
+ : '';
3748
+ const runtime = conversation.runtime;
3749
+ const selection = runtime?.selection || runtimeSelectionForSdk('migration');
3750
+ if (selection.providerKind === 'cli-app-server' || selection.providerKind === 'cli-remote') {
3751
+ setRightPanelTerminals((current) => current.map((tab) => tab.id === tabId
3752
+ ? { ...tab, starting: false, exited: true, output: `${tab.output}[The selected CLI runtime cannot be rebound as a host provider lane.]\r\n` }
3753
+ : tab));
3754
+ return;
3755
+ }
3756
+ const providerKind = selection.providerKind === 'acp-provider'
3757
+ ? 'acp-provider'
3758
+ : 'sdk-native';
3759
+ void attach({
3760
+ conversationId,
3761
+ workspaceMode,
3762
+ ...(workingDirectory ? { workingDirectory } : {}),
3763
+ ...(conversation.workspaceId ? { workspaceId: conversation.workspaceId } : {}),
3764
+ providerKind,
3765
+ providerId: selection.providerId,
3766
+ ...(selection.acpAgentConfigId ? { acpAgentConfigId: selection.acpAgentConfigId } : {}),
3767
+ ...(selection.providerModel || runtime?.model || conversation.model
3768
+ ? { model: selection.providerModel || runtime?.model || conversation.model }
3769
+ : {}),
3770
+ cols: 80,
3771
+ rows: 24,
3772
+ }).then((result) => {
3773
+ const tabStillExists = rightPanelTerminalsRef.current.some((tab) => tab.id === tabId);
3774
+ if (!tabStillExists) {
3775
+ if (result.terminalId)
3776
+ void getAgentPlatformBridge().workspace.ptyStop({ terminalId: result.terminalId });
3777
+ return;
3778
+ }
3779
+ if (!result.success || !result.terminalId) {
3780
+ setRightPanelTerminals((current) => current.map((tab) => tab.id === tabId
3781
+ ? { ...tab, starting: false, exited: true, output: `${tab.output}[${result.error || 'Failed to start XENO TUI.'}]\r\n` }
3782
+ : tab));
3783
+ return;
3784
+ }
3785
+ setRightPanelTerminals((current) => current.map((tab) => tab.id === tabId
3786
+ ? {
3787
+ ...tab,
3788
+ terminalId: result.terminalId,
3789
+ cwd: result.cwd || tab.cwd,
3790
+ starting: false,
3791
+ exited: false,
3792
+ }
3793
+ : tab));
3794
+ hydrateStartedPty(tabId, result.terminalId);
3795
+ if (result.activeLane) {
3796
+ const latest = useAgentChatStore.getState().getConversation(conversationId);
3797
+ useAgentChatStore.getState().updateConversation(conversationId, {
3798
+ sessionUi: {
3799
+ ...(latest?.sessionUi || {}),
3800
+ activeLane: result.activeLane,
3801
+ lanes: result.lanes || [
3802
+ ...((latest?.sessionUi?.lanes || []).filter((lane) => lane.laneId !== result.activeLane.laneId)),
3803
+ result.activeLane,
3804
+ ],
3805
+ },
3806
+ });
3807
+ }
3808
+ });
3809
+ }, [hydrateStartedPty]);
3810
+ const handleCreateXenoTui = useCallback(() => {
3811
+ if (!activeConversationId || !xenoTuiReady)
3812
+ return null;
3813
+ const existing = rightPanelTerminalsRef.current.find((tab) => (tab.conversationId === activeConversationId && tab.kind === 'xeno-session'));
3814
+ if (existing) {
3815
+ if (existing.exited && !existing.starting) {
3816
+ setRightPanelTerminals((current) => current.map((tab) => tab.id === existing.id
3817
+ ? { ...tab, terminalId: null, starting: true, exited: false, output: '' }
3818
+ : tab));
3819
+ startCanonicalXenoTui(existing.id, activeConversationId);
3820
+ }
3821
+ return existing.id;
3822
+ }
3823
+ const tabId = `xeno-tui-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
3824
+ const tab = {
3825
+ id: tabId,
3826
+ label: 'XENO TUI',
3827
+ kind: 'xeno-session',
3828
+ conversationId: activeConversationId,
3829
+ terminalId: null,
3830
+ cwd: resolvedTerminalCwd,
3831
+ allowedKey: `xeno-session:${activeConversationId}`,
3832
+ output: '',
3833
+ starting: true,
3834
+ exited: false,
3835
+ };
3836
+ setRightPanelTerminals((current) => [...current, tab]);
3837
+ startCanonicalXenoTui(tabId, activeConversationId);
3838
+ return tabId;
3839
+ }, [activeConversationId, resolvedTerminalCwd, startCanonicalXenoTui, xenoTuiReady]);
3667
3840
  const handleCreateProviderSessionTui = useCallback(() => {
3668
3841
  const lane = activeSessionUi.activeLane;
3669
- if (!activeConversationId || !lane?.laneId || guiOwnsActiveProviderSession)
3842
+ if (!activeConversationId || !lane?.laneId || !providerSessionTuiReady)
3670
3843
  return null;
3671
3844
  const existing = rightPanelTerminalsRef.current.find((tab) => (tab.conversationId === activeConversationId
3672
3845
  && tab.kind === 'provider-session'
@@ -3708,7 +3881,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3708
3881
  const tabId = `provider-tui-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
3709
3882
  const tab = {
3710
3883
  id: tabId,
3711
- label: lane.providerDisplayName ? `${lane.providerDisplayName} TUI` : 'Provider TUI',
3884
+ label: lane.providerDisplayName ? `${lane.providerDisplayName} Native TUI` : 'Provider Native TUI',
3712
3885
  kind: 'provider-session',
3713
3886
  conversationId: activeConversationId,
3714
3887
  terminalId: null,
@@ -3727,7 +3900,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3727
3900
  activeConversationAllowedDirectories,
3728
3901
  activeConversationId,
3729
3902
  activeSessionUi.activeLane,
3730
- guiOwnsActiveProviderSession,
3903
+ providerSessionTuiReady,
3731
3904
  resolvedTerminalCwd,
3732
3905
  startRightPanelTerminal,
3733
3906
  ]);
@@ -3869,6 +4042,15 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3869
4042
  return;
3870
4043
  }
3871
4044
  const oldTerminalId = tab.terminalId;
4045
+ if (tab.kind === 'xeno-session') {
4046
+ setRightPanelTerminals((current) => current.map((entry) => entry.id === tabId
4047
+ ? { ...entry, terminalId: null, output: '', starting: true, exited: false }
4048
+ : entry));
4049
+ if (oldTerminalId)
4050
+ void getAgentPlatformBridge().workspace.ptyStop({ terminalId: oldTerminalId });
4051
+ startCanonicalXenoTui(tabId, tab.conversationId);
4052
+ return;
4053
+ }
3872
4054
  const cwd = tab.cwd || resolvedTerminalCwd || activeConversationAllowedDirectories[0] || '';
3873
4055
  if (tab.kind === 'provider-session' && tab.laneId) {
3874
4056
  if (oldTerminalId) {
@@ -3928,12 +4110,14 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3928
4110
  void getAgentPlatformBridge().workspace.ptyStop({ terminalId: oldTerminalId });
3929
4111
  }
3930
4112
  startRightPanelTerminal(tabId, tab.conversationId, cwd, activeConversationAllowedDirectories, undefined);
3931
- }, [activeConversationAllowedDirectories, activeConversationId, activeSessionUi.activeLane, handleCloseRightPanelTerminal, resolvedTerminalCwd, startRightPanelTerminal]);
4113
+ }, [activeConversationAllowedDirectories, activeConversationId, activeSessionUi.activeLane, handleCloseRightPanelTerminal, resolvedTerminalCwd, startCanonicalXenoTui, startRightPanelTerminal]);
3932
4114
  const rightPanelTerminalsForConversation = useMemo(() => (rightPanelTerminals.filter((tab) => (tab.detached !== true &&
3933
4115
  tab.conversationId === activeConversationId &&
3934
4116
  (tab.kind === 'provider-session'
3935
4117
  ? (activeLane?.laneId ? tab.laneId === activeLane.laneId : false)
3936
- : tab.allowedKey === rightPanelPtyAllowedKey)))), [activeConversationId, activeLane?.laneId, rightPanelPtyAllowedKey, rightPanelTerminals]);
4118
+ : tab.kind === 'xeno-session'
4119
+ ? true
4120
+ : tab.allowedKey === rightPanelPtyAllowedKey)))), [activeConversationId, activeLane?.laneId, rightPanelPtyAllowedKey, rightPanelTerminals]);
3937
4121
  const providerSessionTuiOwnsActiveSession = activeLane?.status === 'active_native'
3938
4122
  || rightPanelTerminals.some((tab) => (tab.conversationId === activeConversationId
3939
4123
  && tab.kind === 'provider-session'
@@ -3941,10 +4125,25 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
3941
4125
  && !tab.exited
3942
4126
  && (tab.starting || !!tab.terminalId)));
3943
4127
  const providerSessionTuiInputLockReason = providerSessionTuiOwnsActiveSession
3944
- ? 'Native provider TUI owns this session. Reattach it or stop it explicitly before sending from chat.'
4128
+ ? 'Native provider TUI owns this session. Text sent here is delivered through that same provider session.'
3945
4129
  : activeLane?.status === 'externally_advanced' || activeLane?.status === 'needs_reconciliation'
3946
4130
  ? 'The native provider session advanced outside chat. Use “Reconcile and return to chat” before continuing.'
3947
4131
  : undefined;
4132
+ const activeProviderSessionTerminalId = resolveNativeTuiWriterTerminalId(rightPanelTerminals, activeConversationId, activeLane?.laneId);
4133
+ const sendTextToActiveProviderTui = useCallback(async (text) => {
4134
+ const terminalId = resolveNativeTuiWriterTerminalId(rightPanelTerminalsRef.current, activeConversationId, activeLane?.laneId);
4135
+ if (!terminalId)
4136
+ return { success: false, error: 'The native provider TUI is not attached to this window.' };
4137
+ const [content, submit] = planNativeTuiComposerInput(text);
4138
+ const inserted = await getAgentPlatformBridge().workspace.ptyInput({
4139
+ terminalId,
4140
+ data: content,
4141
+ });
4142
+ if (!inserted.success)
4143
+ return inserted;
4144
+ await new Promise((resolve) => setTimeout(resolve, 120));
4145
+ return getAgentPlatformBridge().workspace.ptyInput({ terminalId, data: submit });
4146
+ }, [activeConversationId, activeLane?.laneId]);
3948
4147
  const patchActiveConversationSessionUi = useCallback((patch) => {
3949
4148
  if (!activeConversationId)
3950
4149
  return;
@@ -4420,8 +4619,24 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
4420
4619
  ]);
4421
4620
  const createSessionConversation = useCallback(() => {
4422
4621
  const conversationId = createConversation(MAIN_ASSISTANT_ID);
4622
+ const current = activeSessionTabId
4623
+ ? useAgentChatStore.getState().getConversation(activeSessionTabId)
4624
+ : undefined;
4625
+ const inheritWorkspace = current?.workspaceMode === 'workspace' && Boolean(current.rootDirectory);
4626
+ const launchWorkspace = initialLaunchMode === 'agent' && Boolean(initialWorkspaceRoot);
4627
+ if (inheritWorkspace || launchWorkspace) {
4628
+ const rootDirectory = inheritWorkspace ? current.rootDirectory : initialWorkspaceRoot;
4629
+ updateConversation(conversationId, {
4630
+ schemaVersion: 3,
4631
+ workspaceMode: 'workspace',
4632
+ rootDirectory,
4633
+ grantedDirectories: inheritWorkspace
4634
+ ? (current.grantedDirectories?.length ? [...current.grantedDirectories] : [rootDirectory])
4635
+ : [rootDirectory],
4636
+ });
4637
+ }
4423
4638
  activateSessionConversation(conversationId);
4424
- }, [activateSessionConversation, createConversation]);
4639
+ }, [activateSessionConversation, activeSessionTabId, createConversation, initialLaunchMode, initialWorkspaceRoot, updateConversation]);
4425
4640
  const closeSessionConversation = useCallback((conversationId) => {
4426
4641
  const state = useAgentChatStore.getState();
4427
4642
  const conversation = state.getConversation(conversationId);
@@ -8024,7 +8239,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
8024
8239
  }, teamId: settingsPanel.teamId, teamName: teamForSettings?.name || settingsPanel.teamName, onClose: handleCloseSettings, onDelete: handleDeleteFromSettings }));
8025
8240
  }
8026
8241
  if (viewMode === 'inbox') {
8027
- 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, onConversationCreated: activateSessionConversation, onNavigateConversation: activateSessionConversation }) }));
8242
+ 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 }) }));
8028
8243
  }
8029
8244
  // If an agent is selected, show the chat view.
8030
8245
  // Conversation is created lazily on first message send.
@@ -8053,7 +8268,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
8053
8268
  sp += `\n\nInstalled XENO apps: ${runtimeContext.installedApps.join(', ')}`;
8054
8269
  }
8055
8270
  return sp || undefined;
8056
- })()), templateName: selectedAgent.templateName, workspaceName: selectedAgent.workspaceName, teamName: selectedAgent.teamName, capabilities: selectedAgent.capabilities, permissionProfile: selectedAgent.permissionProfile || 'standard', runtimeSelection: selectedAgent.runtimeSelection, externalInputLockReason: providerSessionTuiInputLockReason, allowedDirectories: selectedAgent.allowedDirectories, approvalRules: selectedAgent.approvalRules || [], onAddApprovalRule: (rule) => {
8271
+ })()), templateName: selectedAgent.templateName, workspaceName: selectedAgent.workspaceName, teamName: selectedAgent.teamName, capabilities: selectedAgent.capabilities, permissionProfile: selectedAgent.permissionProfile || 'standard', runtimeSelection: selectedAgent.runtimeSelection, externalInputLockReason: providerSessionTuiInputLockReason, onSendToNativeTui: activeProviderSessionTerminalId ? sendTextToActiveProviderTui : undefined, allowedDirectories: selectedAgent.allowedDirectories, approvalRules: selectedAgent.approvalRules || [], onAddApprovalRule: (rule) => {
8057
8272
  addAgentApprovalRule(selectedAgentHierarchy.workspace.id, selectedAgentHierarchy.team.id, selectedAgent.id, rule);
8058
8273
  }, allowedApps: resolvedAllowedApps, teamAgents: teamAgents, onCreateAgent: handleCreateAgentFromAgent, onAskAgent: handleAskAgentFromAgent, onEnableFileWrite: enableSelectedAgentFileWrite, onOpenEditorPath: handleOpenEditorPath, onOpenEditorDiff: handleOpenEditorDiff, onPeekEditorPath: handlePeekEditorPath, onPeekEditorDiff: handlePeekEditorDiff, onOpenRuntimeSettings: () => {
8059
8274
  handleOpenSettings({
@@ -8119,7 +8334,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
8119
8334
  `subagentRunId ?? conversationId`, so the conversation id
8120
8335
  IS the run id here. Passing anything else would ask the
8121
8336
  host about a run it has never heard of. */
8122
- 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(); }, onCliControlPlaneInspectOperation: (operation) => { void handleCliControlPlaneInspectOperation(operation); }, 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 && (_jsx(FolderSidebar, { conversationId: activeConversationId, rootDirectory: activeConversation?.rootDirectory || null, allowedDirectories: activeConversationAllowedDirectories, onOpenFolder: handleOpenFolderForConversation, onClose: () => setFolderPanelOpen(false), onOpenFile: handleOpenEditorFile, activeFilePath: activeEditorFilePath, terminalCapabilityEnabled: terminalCapabilityEnabled, terminalReady: terminalReady, providerSessionTuiReady: providerSessionTuiReady, resolvedTerminalCwd: resolvedTerminalCwd, terminalTabs: rightPanelTerminalsForConversation, onPtyInput: handleRightPanelPtyInput, onPtyResize: handleRightPanelPtyResize, onCreateTerminal: handleCreateRightPanelTerminal, 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 }))] }));
8337
+ 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(); }, onCliControlPlaneInspectOperation: (operation) => { void handleCliControlPlaneInspectOperation(operation); }, 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 && (_jsx(FolderSidebar, { conversationId: activeConversationId, 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 }))] }));
8123
8338
  if (surface !== 'standalone-desktop') {
8124
8339
  return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden", "data-xeno-agent-embedded-shell": "true", children: [_jsx("header", { className: "xeno-chrome-shell xeno-border-subtle h-10 flex-shrink-0 border-b", "data-xeno-agent-session-header": "embedded", "data-xeno-hub-header-style": "true", children: sessionTabsNode }), _jsx("div", { className: "min-h-0 min-w-0 flex-1", children: agentWorkspace })] }));
8125
8340
  }