@xenosystem/agent-interface-ui 0.1.179 → 0.1.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/agentHostPlatformBridge.d.ts +2 -0
- package/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -1
- package/dist/adapters/agentHostPlatformBridge.js +4 -0
- package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
- package/dist/agent.css +6 -0
- package/dist/components/agent/AgentChangesPanel.d.ts +27 -0
- package/dist/components/agent/AgentChangesPanel.d.ts.map +1 -0
- package/dist/components/agent/AgentChangesPanel.js +12 -0
- package/dist/components/agent/AgentChangesPanel.js.map +1 -0
- package/dist/components/agent/AgentInterface.d.ts.map +1 -1
- package/dist/components/agent/AgentInterface.js +86 -25
- package/dist/components/agent/AgentInterface.js.map +1 -1
- package/dist/components/agent/AgentPreviewPanel.d.ts +6 -0
- package/dist/components/agent/AgentPreviewPanel.d.ts.map +1 -0
- package/dist/components/agent/AgentPreviewPanel.js +103 -0
- package/dist/components/agent/AgentPreviewPanel.js.map +1 -0
- package/dist/components/agent/AgentToolsHome.d.ts +6 -0
- package/dist/components/agent/AgentToolsHome.d.ts.map +1 -0
- package/dist/components/agent/AgentToolsHome.js +8 -0
- package/dist/components/agent/AgentToolsHome.js.map +1 -0
- package/dist/components/agent/AgentWorkbenchPanel.d.ts +5 -0
- package/dist/components/agent/AgentWorkbenchPanel.d.ts.map +1 -1
- package/dist/components/agent/AgentWorkbenchPanel.js +3 -33
- package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts +2 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts.map +1 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.js +6 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.js.map +1 -1
- package/dist/components/agent/workbenchTools.d.ts +12 -0
- package/dist/components/agent/workbenchTools.d.ts.map +1 -0
- package/dist/components/agent/workbenchTools.js +37 -0
- package/dist/components/agent/workbenchTools.js.map +1 -0
- package/package.json +6 -6
|
@@ -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 { AgentChangesPanel } from './AgentChangesPanel.js';
|
|
57
|
+
import { toolFillsTheScreen } from './workbenchTools.js';
|
|
56
58
|
import { dropFromSplit, followActiveSession, openInSplit } from '../product/sessionSplit.js';
|
|
57
59
|
import { addDiffComment, diffCommentsPrompt, removeDiffComment } from './diffComments.js';
|
|
58
60
|
import { XenoAgentWorkspaceSelector } from '../product/XenoAgentWorkspaceSelector.js';
|
|
@@ -1627,9 +1629,22 @@ function clampRightPanelWidth(width) {
|
|
|
1627
1629
|
: Math.max(RIGHT_PANEL_MIN_WIDTH, Math.min(RIGHT_PANEL_MAX_WIDTH, window.innerWidth - 360));
|
|
1628
1630
|
return Math.min(viewportAwareMax, Math.max(RIGHT_PANEL_MIN_WIDTH, Math.round(width)));
|
|
1629
1631
|
}
|
|
1630
|
-
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, }) {
|
|
1632
|
+
function FolderSidebar({ conversationId, workspaceId, rootDirectory, allowedDirectories, onOpenFolder, onClose, onOpenFile, activeFilePath, terminalCapabilityEnabled, terminalReady, xenoTuiReady, xenoTuiUnavailableReason, providerSessionTuiReady, providerSessionTuiUnavailableReason, providerSessionTuiLabel, resolvedTerminalCwd, terminalTabs, tabRequest, changes, changesRefreshKey, onPtyInput, onPtyResize, onCreateTerminal, onCreateXenoTui, onCreateProviderTui, onCloseTerminal, onClearTerminal, onRestartTerminal, onStopTerminal, width, onResizeStart, }) {
|
|
1631
1633
|
const [rightPanelTab, setRightPanelTab] = useState('files');
|
|
1632
1634
|
const [browserTabs, setBrowserTabs] = useState(() => loadCachedRightPanelBrowserTabs());
|
|
1635
|
+
useEffect(() => {
|
|
1636
|
+
if (tabRequest?.tab === 'changes')
|
|
1637
|
+
setRightPanelTab('changes');
|
|
1638
|
+
if (tabRequest?.tab === 'browser' && browserTabs[0])
|
|
1639
|
+
setRightPanelTab(`browser:${browserTabs[0].id}`);
|
|
1640
|
+
if (tabRequest?.tab === 'terminal') {
|
|
1641
|
+
const id = terminalTabs[0]?.id ?? onCreateTerminal();
|
|
1642
|
+
if (id)
|
|
1643
|
+
setRightPanelTab(`terminal:${id}`);
|
|
1644
|
+
}
|
|
1645
|
+
// Only a new request moves the tab; the lists changing must not.
|
|
1646
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1647
|
+
}, [tabRequest]);
|
|
1633
1648
|
const activeBrowserTabId = rightPanelTab.startsWith('browser:') ? rightPanelTab.slice('browser:'.length) : null;
|
|
1634
1649
|
const activeBrowser = activeBrowserTabId
|
|
1635
1650
|
? browserTabs.find((tab) => tab.id === activeBrowserTabId) || null
|
|
@@ -1815,6 +1830,7 @@ function FolderSidebar({ conversationId, workspaceId, rootDirectory, allowedDire
|
|
|
1815
1830
|
}, [browserTabs, rightPanelTab]);
|
|
1816
1831
|
return (_jsxs("aside", { className: "relative flex-shrink-0 bg-[#0c0c0e] border-l border-white/[0.06] flex flex-col overflow-hidden", style: { width }, children: [_jsxs("div", { role: "separator", "aria-orientation": "vertical", "aria-label": "Resize right panel", onPointerDown: onResizeStart, className: "absolute left-0 top-0 bottom-0 z-[1000] w-4 -translate-x-2 cursor-col-resize group touch-none", children: [_jsx("div", { className: "absolute left-1/2 top-0 bottom-0 w-px -translate-x-1/2 bg-white/[0.08] group-hover:bg-white/30 transition-colors" }), _jsx("div", { className: "absolute left-1/2 top-1/2 h-10 w-1 -translate-x-1/2 -translate-y-1/2 rounded-full bg-transparent group-hover:bg-white/20 transition-colors" })] }), _jsxs("div", { className: "h-10 flex-shrink-0 border-b border-white/[0.06] bg-[#0f0f11] flex items-center", 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(Package, { className: "w-3.5 h-3.5", strokeWidth: 1.8 }) }), _jsx("div", { className: "h-full min-w-0 flex-1 overflow-hidden", children: _jsxs("div", { className: "h-full flex items-center gap-1 px-1.5 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: [([
|
|
1817
1832
|
{ id: 'files', label: 'Files', icon: FolderOpen, title: effectiveRoot || 'Files' },
|
|
1833
|
+
{ id: 'changes', label: 'Changes', icon: GitCompareArrows, title: 'Changes (Ctrl+Shift+D)' },
|
|
1818
1834
|
]).map((tab) => {
|
|
1819
1835
|
const Icon = tab.icon;
|
|
1820
1836
|
const active = rightPanelTab === tab.id;
|
|
@@ -1921,7 +1937,7 @@ function FolderSidebar({ conversationId, workspaceId, rootDirectory, allowedDire
|
|
|
1921
1937
|
return (_jsx("div", { className: visible
|
|
1922
1938
|
? 'absolute inset-0'
|
|
1923
1939
|
: '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, workspaceId: workspaceId, conversationId: conversationId, visible: visible, rootDirectory: effectiveRoot || rootDirectory, allowedDirectories: effectiveAllowedDirectories, onOpenFolder: onOpenFolder }) }) }, tab.id));
|
|
1924
|
-
}), 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,
|
|
1940
|
+
}), rightPanelTab === 'changes' && _jsx(AgentChangesPanel, { changes: changes, refreshKey: changesRefreshKey }), 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,
|
|
1925
1941
|
// A created control-TUI tab remains renderable even after its
|
|
1926
1942
|
// process exits or its lane moves to reconciliation. Otherwise
|
|
1927
1943
|
// the useful vendor diagnostics are replaced by the unrelated
|
|
@@ -2245,7 +2261,7 @@ function relativeDate(ts) {
|
|
|
2245
2261
|
const months = Math.floor(days / 30);
|
|
2246
2262
|
return `${months}mo`;
|
|
2247
2263
|
}
|
|
2248
|
-
function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setWorkspaces, inboxAgentId, isInboxSelected, selectedInboxConversationId, onSelectInbox, onSelectInboxConversation, selectedAgentId, onSelectAgent, selectedConversationId, onSelectConversation, agentRunAvailability, onSelectPlugins, onSelectKnowledge, onSelectSettings, onSelectProjects, onSelectTeams, onSelectAgents, onSelectScheduled, onStartProjectChat, onOpenSearchResultInEditor, viewMode, isSettingsOpen, }) {
|
|
2264
|
+
function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setWorkspaces, inboxAgentId, isInboxSelected, selectedInboxConversationId, onSelectInbox, onSelectInboxConversation, selectedAgentId, onSelectAgent, selectedConversationId, onSelectConversation, agentRunAvailability, onSelectPlugins, onSelectKnowledge, onSelectTools, onSelectSettings, onSelectProjects, onSelectTeams, onSelectAgents, onSelectScheduled, onStartProjectChat, onOpenSearchResultInEditor, viewMode, isSettingsOpen, }) {
|
|
2249
2265
|
const [isAddingWorkspace, setIsAddingWorkspace] = useState(false);
|
|
2250
2266
|
const [newWorkspaceName, setNewWorkspaceName] = useState('');
|
|
2251
2267
|
const [addingTeamToWorkspace, setAddingTeamToWorkspace] = useState(null);
|
|
@@ -3596,7 +3612,7 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3596
3612
|
? 'bg-white/[0.08] text-white'
|
|
3597
3613
|
: 'text-[#7f7f86] hover:text-white hover:bg-white/[0.04]'}`, title: "Teams", children: _jsx(Users, { className: "w-4 h-4" }) }), _jsx("button", { type: "button", onClick: onSelectAgents, className: `p-1.5 rounded-[4px] transition-colors cursor-pointer ${viewMode === 'agents'
|
|
3598
3614
|
? 'bg-white/[0.08] text-white'
|
|
3599
|
-
: 'text-[#7f7f86] hover:text-white hover:bg-white/[0.04]'}`, title: "Agents", children: _jsx(Bot, { className: "w-4 h-4" }) }), _jsx("button", { type: "button", onClick: onSelectKnowledge, className: "p-1.5 rounded-[4px] text-[#7f7f86] hover:text-white hover:bg-white/[0.04] transition-colors cursor-pointer", title: "Library", children: _jsx(BookOpen, { className: "w-4 h-4" }) }), _jsx("button", { type: "button", onClick: onSelectScheduled, className: `p-1.5 rounded-[4px] transition-colors cursor-pointer ${viewMode === 'scheduled'
|
|
3615
|
+
: 'text-[#7f7f86] hover:text-white hover:bg-white/[0.04]'}`, title: "Agents", children: _jsx(Bot, { className: "w-4 h-4" }) }), _jsx("button", { type: "button", onClick: onSelectKnowledge, className: "p-1.5 rounded-[4px] text-[#7f7f86] hover:text-white hover:bg-white/[0.04] transition-colors cursor-pointer", title: "Library", children: _jsx(BookOpen, { className: "w-4 h-4" }) }), _jsx("button", { type: "button", onClick: onSelectTools, className: "p-1.5 rounded-[4px] text-[#7f7f86] hover:text-white hover:bg-white/[0.04] transition-colors cursor-pointer", title: "Tools", children: _jsx(Package, { className: "w-4 h-4" }) }), _jsx("button", { type: "button", onClick: onSelectScheduled, className: `p-1.5 rounded-[4px] transition-colors cursor-pointer ${viewMode === 'scheduled'
|
|
3600
3616
|
? 'bg-white/[0.08] text-white'
|
|
3601
3617
|
: 'text-[#7f7f86] hover:text-white hover:bg-white/[0.04]'}`, title: "Scheduled Tasks", children: _jsx(Clock, { className: "w-4 h-4" }) }), _jsx("div", { className: "flex-1" }), _jsx("button", { type: "button", onClick: () => {
|
|
3602
3618
|
if (targetWs) {
|
|
@@ -3645,7 +3661,7 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
3645
3661
|
? 'bg-white/[0.08] text-white font-medium'
|
|
3646
3662
|
: 'text-zinc-400 hover:text-white hover:bg-white/[0.04]'}`, children: [_jsx(Bot, { className: "w-3.5 h-3.5 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: "Agents" })] }), _jsxs("button", { type: "button", onClick: () => {
|
|
3647
3663
|
onSelectKnowledge();
|
|
3648
|
-
}, className: "w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-md text-left text-[12.5px] text-zinc-400 hover:text-white hover:bg-white/[0.04] transition-colors cursor-pointer select-none", children: [_jsx(BookOpen, { className: "w-3.5 h-3.5 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: "Library" })] }), _jsxs("button", { type: "button", onClick: () => {
|
|
3664
|
+
}, className: "w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-md text-left text-[12.5px] text-zinc-400 hover:text-white hover:bg-white/[0.04] transition-colors cursor-pointer select-none", children: [_jsx(BookOpen, { className: "w-3.5 h-3.5 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: "Library" })] }), _jsxs("button", { type: "button", onClick: onSelectTools, className: "w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-md text-left text-[12.5px] text-zinc-400 hover:text-white hover:bg-white/[0.04] transition-colors cursor-pointer select-none", "data-xeno-sidebar-tools": "true", children: [_jsx(Package, { className: "w-3.5 h-3.5 text-zinc-400 flex-shrink-0" }), _jsx("span", { className: "flex-1 truncate", children: "Tools" })] }), _jsxs("button", { type: "button", onClick: () => {
|
|
3649
3665
|
onSelectScheduled?.();
|
|
3650
3666
|
}, className: `w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-md text-left text-[12.5px] transition-colors cursor-pointer select-none ${isScheduledActive
|
|
3651
3667
|
? 'bg-white/[0.08] text-white font-medium'
|
|
@@ -4294,6 +4310,9 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
4294
4310
|
const [activeSessionTabId, setActiveSessionTabId] = useState(null);
|
|
4295
4311
|
const [sessionTabsHydrated, setSessionTabsHydrated] = useState(false);
|
|
4296
4312
|
const [sessionSplit, setSessionSplit] = useState(null);
|
|
4313
|
+
const [rightPanelTabRequest, setRightPanelTabRequest] = useState(null);
|
|
4314
|
+
const [toolsHomeOpen, setToolsHomeOpen] = useState(false);
|
|
4315
|
+
const [toolsFullScreen, setToolsFullScreen] = useState(false);
|
|
4297
4316
|
const previousActiveSessionRef = useRef(null);
|
|
4298
4317
|
const sessionTabsRestoreAttemptedRef = useRef(false);
|
|
4299
4318
|
const editorStatusTimerRef = useRef(null);
|
|
@@ -4397,6 +4416,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
4397
4416
|
: undefined;
|
|
4398
4417
|
// Never paint the previous conversation's editor during scope hydration.
|
|
4399
4418
|
const centerPaneMode = editorTabsConversationId === activeConversationId ? storedCenterPaneMode : 'agent';
|
|
4419
|
+
const workbenchFullScreen = toolsFullScreen && !!activeConversationId && !!activeConversation?.sessionUi?.panelOpen;
|
|
4400
4420
|
// A CLI-resumed conversation has two identities: the renderer conversation that owns its
|
|
4401
4421
|
// presentation state, and the durable SDK coordination session that owns Goal/Loop/Handoff
|
|
4402
4422
|
// and delegated child runs. The workbench must query the latter when it is attached; otherwise
|
|
@@ -8739,6 +8759,32 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8739
8759
|
engineeringSelectedPaths,
|
|
8740
8760
|
engineeringSessions,
|
|
8741
8761
|
]);
|
|
8762
|
+
const handleChangesOpenDiff = useCallback((relativePath) => {
|
|
8763
|
+
void handleEngineeringPreviewDiff([relativePath]);
|
|
8764
|
+
}, [handleEngineeringPreviewDiff]);
|
|
8765
|
+
const changesState = useMemo(() => ({
|
|
8766
|
+
isGitRepo: engineeringGit?.isGitRepo === true,
|
|
8767
|
+
...(engineeringGit?.branch ? { branch: engineeringGit.branch } : {}),
|
|
8768
|
+
files: engineeringGit?.files ?? [],
|
|
8769
|
+
loaded: !!engineeringGit,
|
|
8770
|
+
loading: engineeringLoading,
|
|
8771
|
+
error: engineeringError,
|
|
8772
|
+
commitMessage: engineeringCommitMessage,
|
|
8773
|
+
onCommitMessageChange: setEngineeringCommitMessage,
|
|
8774
|
+
onRefresh: () => { void handleEngineeringRefresh(); },
|
|
8775
|
+
onOpenDiff: handleChangesOpenDiff,
|
|
8776
|
+
onStageAll: () => { void handleEngineeringStage(undefined); },
|
|
8777
|
+
onCommit: () => { void handleEngineeringCommit(); },
|
|
8778
|
+
}), [
|
|
8779
|
+
engineeringCommitMessage,
|
|
8780
|
+
engineeringError,
|
|
8781
|
+
engineeringGit,
|
|
8782
|
+
engineeringLoading,
|
|
8783
|
+
handleChangesOpenDiff,
|
|
8784
|
+
handleEngineeringCommit,
|
|
8785
|
+
handleEngineeringRefresh,
|
|
8786
|
+
handleEngineeringStage,
|
|
8787
|
+
]);
|
|
8742
8788
|
const cliControlPlaneState = useMemo(() => ({
|
|
8743
8789
|
loading: cliControlPlaneLoading,
|
|
8744
8790
|
error: cliControlPlaneError,
|
|
@@ -9015,17 +9061,37 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9015
9061
|
}, [openEditorTabs, setTransientEditorStatus]);
|
|
9016
9062
|
const handleSelectWorkbenchTab = useCallback((tab) => {
|
|
9017
9063
|
patchActiveConversationSessionUi({ panelOpen: true, panelTab: tab });
|
|
9064
|
+
setToolsHomeOpen(false);
|
|
9065
|
+
setToolsFullScreen(toolFillsTheScreen(tab));
|
|
9066
|
+
}, [patchActiveConversationSessionUi]);
|
|
9067
|
+
const handleOpenTools = useCallback(() => {
|
|
9068
|
+
patchActiveConversationSessionUi({ panelOpen: true });
|
|
9069
|
+
setToolsHomeOpen(true);
|
|
9070
|
+
setToolsFullScreen(true);
|
|
9018
9071
|
}, [patchActiveConversationSessionUi]);
|
|
9072
|
+
const handleOpenChanges = useCallback(() => {
|
|
9073
|
+
setFolderPanelOpen(true);
|
|
9074
|
+
setRightPanelTabRequest({ tab: 'changes', at: Date.now() });
|
|
9075
|
+
}, []);
|
|
9019
9076
|
useEffect(() => {
|
|
9020
9077
|
const onKeyDown = (event) => {
|
|
9021
|
-
|
|
9078
|
+
const requestTab = (tab) => {
|
|
9079
|
+
event.preventDefault();
|
|
9080
|
+
setFolderPanelOpen(true);
|
|
9081
|
+
setRightPanelTabRequest({ tab, at: Date.now() });
|
|
9082
|
+
};
|
|
9083
|
+
if (event.ctrlKey && !event.shiftKey && !event.altKey && event.key === '`')
|
|
9084
|
+
requestTab('terminal');
|
|
9085
|
+
if (!event.ctrlKey || !event.shiftKey)
|
|
9022
9086
|
return;
|
|
9023
|
-
event.
|
|
9024
|
-
|
|
9087
|
+
if (event.key.toLowerCase() === 'b')
|
|
9088
|
+
requestTab('browser');
|
|
9089
|
+
if (event.key.toLowerCase() === 'd')
|
|
9090
|
+
requestTab('changes');
|
|
9025
9091
|
};
|
|
9026
9092
|
window.addEventListener('keydown', onKeyDown);
|
|
9027
9093
|
return () => window.removeEventListener('keydown', onKeyDown);
|
|
9028
|
-
}, [
|
|
9094
|
+
}, []);
|
|
9029
9095
|
const handleOpenPluginManager = useCallback(() => {
|
|
9030
9096
|
setSelectedAgentId(null);
|
|
9031
9097
|
setSelectedConversationId(null);
|
|
@@ -9061,10 +9127,9 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9061
9127
|
const handleSelectWorkbenchTraceMessage = useCallback((messageId) => {
|
|
9062
9128
|
patchActiveConversationSessionUi({ panelOpen: true, panelTab: 'trace', selectedTraceMessageId: messageId });
|
|
9063
9129
|
}, [patchActiveConversationSessionUi]);
|
|
9064
|
-
const handleToggleWorkbenchPanel = useCallback(() => {
|
|
9065
|
-
patchActiveConversationSessionUi({ panelOpen: !workbenchPanelOpen });
|
|
9066
|
-
}, [patchActiveConversationSessionUi, workbenchPanelOpen]);
|
|
9067
9130
|
const handleCloseWorkbenchPanel = useCallback(() => {
|
|
9131
|
+
setToolsHomeOpen(false);
|
|
9132
|
+
setToolsFullScreen(false);
|
|
9068
9133
|
patchActiveConversationSessionUi({ panelOpen: false });
|
|
9069
9134
|
}, [patchActiveConversationSessionUi]);
|
|
9070
9135
|
const handleRightPanelResizeStart = useCallback((event) => {
|
|
@@ -9384,7 +9449,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9384
9449
|
}, teamId: settingsPanel.teamId, teamName: teamForSettings?.name || settingsPanel.teamName, onClose: handleCloseSettings, onDelete: handleDeleteFromSettings }));
|
|
9385
9450
|
}
|
|
9386
9451
|
if (viewMode === 'inbox') {
|
|
9387
|
-
const inboxView = (conversationId) => (_jsx(React.Suspense, { fallback: _jsx("div", { className: "flex h-full items-center justify-center text-[12px] text-white/35", children: "Loading chat..." }), children: _jsx(AgentView, { agentId: MAIN_ASSISTANT_ID, conversationId: conversationId, isMainAssistant: true, agentName: MAIN_ASSISTANT_NAME, model: MAIN_ASSISTANT_MODEL, templateName: "Main Assistant", workspaceName: "All Workspaces", teamName: "Global", systemPrompt: enrichedMainSystemPromptWithCodeContext, capabilities: { terminal: true, fileRead: true, fileWrite: true, appLaunch: true }, permissionProfile: "standard", allowedDirectories: [], approvalRules: [], allowedApps: [], teamAgents: [], onCreateWorkspace: handleMainCreateWorkspace, onCreateTeam: handleMainCreateTeam, onCreateTeamAgent: handleMainCreateTeamAgent, onGetInboxWorkspaceOptions: handleGetInboxWorkspaceOptions, onBindInboxConversationToWorkspace: handleBindInboxConversationToWorkspace, onOpenReassignedConversation: handleOpenReassignedConversation, onOpenEditorPath: handleOpenEditorPath, onOpenEditorDiff: handleOpenEditorDiff, onPeekEditorPath: handlePeekEditorPath, onPeekEditorDiff: handlePeekEditorDiff, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, externalInputLockReason: providerSessionTuiInputLockReason, onSendToNativeTui: activeProviderSessionTerminalId ? sendTextToActiveProviderTui : undefined, onConversationCreated: activateSessionConversation, onNavigateConversation: activateSessionConversation }) }));
|
|
9452
|
+
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: handleOpenChanges }) }));
|
|
9388
9453
|
if (!sessionSplit)
|
|
9389
9454
|
return inboxView(selectedInboxConversationId);
|
|
9390
9455
|
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: () => {
|
|
@@ -9453,7 +9518,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9453
9518
|
selectedBy: 'user'
|
|
9454
9519
|
}
|
|
9455
9520
|
});
|
|
9456
|
-
}, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, onConversationCreated: activateSessionConversation, onNavigateConversation: activateSessionConversation }) }));
|
|
9521
|
+
}, renderWorkbenchPanel: false, onOpenConversationSettings: handleSelectSidebarSettings, onConversationCreated: activateSessionConversation, onNavigateConversation: activateSessionConversation, onOpenChanges: handleOpenChanges }) }));
|
|
9457
9522
|
}
|
|
9458
9523
|
// Projects Workspace Hub view (rendered on the right side)
|
|
9459
9524
|
if (viewMode === 'projects') {
|
|
@@ -9590,27 +9655,23 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
9590
9655
|
return;
|
|
9591
9656
|
}
|
|
9592
9657
|
handleOpenPluginManager();
|
|
9593
|
-
}, onSelectKnowledge: () => handleSelectWorkbenchTab('knowledge'), onSelectProjects: () => setViewMode('projects'), onSelectTeams: () => setViewMode('teams'), onSelectAgents: () => setViewMode('agents'), onSelectScheduled: () => setViewMode('scheduled'), onStartProjectChat: handleStartProjectChat, onSelectSettings: handleSelectSidebarSettings, viewMode: viewMode, isSettingsOpen: Boolean(settingsPanel) }), _jsxs("div", { className: "relative flex-1 min-w-0 flex flex-col overflow-hidden", children: [_jsx(RightSidebarControls, { folderPanelOpen: folderPanelOpen, onOpenFolderPanel: () => setFolderPanelOpen(true), onOpenChanges:
|
|
9658
|
+
}, onSelectKnowledge: () => handleSelectWorkbenchTab('knowledge'), onSelectTools: handleOpenTools, 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: handleOpenChanges,
|
|
9594
9659
|
// The conversation surface owns its full width; the bench has no shell overlay over it.
|
|
9595
9660
|
// Files/Terminal controls remain on editor surfaces, and conversation context keeps the
|
|
9596
9661
|
// capability available through its existing workbench/menu actions.
|
|
9597
|
-
visible: centerPaneMode === 'editor' && !settingsPanel && !['projects', 'teams', 'agents', 'scheduled'].includes(viewMode || '') }), centerPaneMode === 'editor' && (
|
|
9598
|
-
?
|
|
9599
|
-
: 'bg-transparent hover:bg-white/[0.055] text-white/35 hover:text-white/60'}`, children: "Panel" }) })] })), _jsxs("div", { className: "flex-1 min-h-0 flex flex-col overflow-hidden", children: [_jsxs("main", { className: "flex-1 min-w-0 flex flex-col overflow-hidden", children: [sessionResumeError && _jsx("div", { role: "alert", className: "px-3 py-2 text-[12px] text-red-300", children: sessionResumeError }), centerPaneMode === 'split'
|
|
9600
|
-
? (_jsxs("div", { className: "flex-1 min-h-0 grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] overflow-hidden", children: [_jsx("section", { className: "min-w-0 min-h-0 flex flex-col border-r xeno-border-subtle overflow-hidden", children: renderContent() }), _jsxs("section", { className: "min-w-0 min-h-0 flex flex-col overflow-hidden", children: [_jsxs("div", { className: "xeno-chrome-shell xeno-border-subtle h-10 border-b flex items-center justify-between gap-2 pr-[120px]", children: [_jsx("div", { className: "h-full min-w-0 flex-1", children: openEditorTabs.length > 0 && (_jsx(EditorTabs, { tabs: openEditorTabs, activeTabId: activeEditorTabId, onSelectTab: handleSelectEditorTab, onCloseTab: handleCloseEditorTab })) }), _jsx("div", { className: "flex items-center gap-2 pr-2", children: _jsx("button", { onClick: handleToggleWorkbenchPanel, className: `h-7 px-2.5 rounded-[5px] text-[10px] transition-colors ${workbenchPanelOpen
|
|
9601
|
-
? 'bg-white/[0.075] text-white/72'
|
|
9602
|
-
: 'bg-transparent hover:bg-white/[0.055] text-white/35 hover:text-white/60'}`, children: "Panel" }) })] }), _jsx("div", { className: "flex-1 min-h-0 flex flex-col overflow-hidden", children: _jsx(React.Suspense, { fallback: _jsx(WorkbenchLoadingSkeleton, { title: "Loading editor", subtitle: "Preparing editor workbench." }), children: activeEditorDiff ? (_jsx(MonacoDiffWorkbenchEditor, { diff: activeEditorDiff, rootDirectory: activeConversation?.rootDirectory || null, layoutKey: editorLayoutKey, statusMessage: editorStatusMessage, onOpenFile: handleOpenEditorPath, ...diffCommentProps })) : (_jsx(MonacoWorkbenchEditor, { file: activeEditorFile, pendingFilePath: pendingEditorPath, rootDirectory: activeConversation?.rootDirectory || null, openFilePaths: openEditorFiles.map((file) => file.path), layoutKey: editorLayoutKey, statusMessage: editorStatusMessage, onChangeFile: handleEditorContentChange, onSaveFile: handleSaveEditorFile, onRevertFile: handleRevertEditorFile })) }) })] })] }))
|
|
9662
|
+
visible: centerPaneMode === 'editor' && !settingsPanel && !['projects', 'teams', 'agents', 'scheduled'].includes(viewMode || '') }), centerPaneMode === 'editor' && (_jsx("div", { className: "xeno-chrome-shell xeno-border-subtle h-10 pr-[120px] border-b flex items-center justify-between gap-2", 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 })) }) })), _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 ${workbenchFullScreen ? 'hidden' : ''}`, children: [sessionResumeError && _jsx("div", { role: "alert", className: "px-3 py-2 text-[12px] text-red-300", children: sessionResumeError }), centerPaneMode === 'split'
|
|
9663
|
+
? (_jsxs("div", { className: "flex-1 min-h-0 grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] overflow-hidden", children: [_jsx("section", { className: "min-w-0 min-h-0 flex flex-col border-r xeno-border-subtle overflow-hidden", children: renderContent() }), _jsxs("section", { className: "min-w-0 min-h-0 flex flex-col overflow-hidden", children: [_jsx("div", { className: "xeno-chrome-shell xeno-border-subtle h-10 border-b flex items-center justify-between gap-2 pr-[120px]", children: _jsx("div", { className: "h-full min-w-0 flex-1", children: openEditorTabs.length > 0 && (_jsx(EditorTabs, { tabs: openEditorTabs, activeTabId: activeEditorTabId, onSelectTab: handleSelectEditorTab, onCloseTab: handleCloseEditorTab })) }) }), _jsx("div", { className: "flex-1 min-h-0 flex flex-col overflow-hidden", children: _jsx(React.Suspense, { fallback: _jsx(WorkbenchLoadingSkeleton, { title: "Loading editor", subtitle: "Preparing editor workbench." }), children: activeEditorDiff ? (_jsx(MonacoDiffWorkbenchEditor, { diff: activeEditorDiff, rootDirectory: activeConversation?.rootDirectory || null, layoutKey: editorLayoutKey, statusMessage: editorStatusMessage, onOpenFile: handleOpenEditorPath, ...diffCommentProps })) : (_jsx(MonacoWorkbenchEditor, { file: activeEditorFile, pendingFilePath: pendingEditorPath, rootDirectory: activeConversation?.rootDirectory || null, openFilePaths: openEditorFiles.map((file) => file.path), layoutKey: editorLayoutKey, statusMessage: editorStatusMessage, onChangeFile: handleEditorContentChange, onSaveFile: handleSaveEditorFile, onRevertFile: handleRevertEditorFile })) }) })] })] }))
|
|
9603
9664
|
: centerPaneMode === 'editor'
|
|
9604
9665
|
? (_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 })) }))
|
|
9605
|
-
: renderContent()] }), activeConversationId && workbenchPanelOpen && !settingsPanel && (_jsx("div", { className:
|
|
9666
|
+
: renderContent()] }), activeConversationId && workbenchPanelOpen && !settingsPanel && (_jsx("div", { className: workbenchFullScreen ? 'flex-1 min-h-0 px-6 py-5' : 'px-6 pb-5', children: _jsx("div", { className: `w-full mx-auto ${workbenchFullScreen ? 'h-full max-w-[1120px]' : isWideWorkbenchTab(workbenchPanelTab) ? 'max-w-[1120px]' : 'max-w-[820px]'}`, children: _jsx(React.Suspense, { fallback: _jsx(WorkbenchLoadingSkeleton, { title: "Loading workbench", subtitle: "Preparing trace and support panels." }), children: _jsx(AgentWorkbenchPanel, { fullScreen: workbenchFullScreen, showToolsHome: toolsHomeOpen, onShowToolsHome: setToolsHomeOpen, knowledgeWorkspaceId: activeConversation?.workspaceId, tab: workbenchPanelTab,
|
|
9606
9667
|
/* The host's default `resolveRunId` is
|
|
9607
9668
|
`subagentRunId ?? conversationId`, so the conversation id
|
|
9608
9669
|
IS the run id here. Passing anything else would ask the
|
|
9609
9670
|
host about a run it has never heard of. */
|
|
9610
|
-
reviewRunId: activeConversationId, coordinationSessionId: activeConversation?.sessionUi?.coordinationSessionId || activeConversationId, traceMessages: traceMessages, selectedTraceMessage: selectedTraceMessage, outputEntries: outputEntries, problemEntries: problemEntries, onSelectTab: handleSelectWorkbenchTab, onClose: handleCloseWorkbenchPanel, onSelectTraceMessage: handleSelectWorkbenchTraceMessage, onOpenChatSettings: handleOpenActiveConversationSettings, onOpenChatAcpAgents: handleOpenActiveConversationAcpAgents, onOpenChatPlugins: handleOpenPluginManager, onOpenChatKnowledge: handleOpenActiveConversationKnowledge, onOpenEditorPath: handleOpenEditorPath, onOpenEditorDiff: handleOpenEditorDiff, terminalCapabilityEnabled: terminalCapabilityEnabled, terminalReady: terminalReady, resolvedTerminalCwd: resolvedTerminalCwd, terminalDraftCwd: terminalDraftCwd, terminalDraftInput: terminalDraftInput, onChangeTerminalCwd: setTerminalDraftCwd, onChangeTerminalInput: setTerminalDraftInput, onResetTerminalCwd: handleResetWorkbenchTerminalCwd, onClearTerminalHistory: handleClearWorkbenchTerminalHistory, onRunTerminalCommand: () => { void handleRunWorkbenchTerminalCommand(); }, terminalHistory: terminalHistory, liveTerminalRuns: liveTerminalRunsForConversation, onReuseTerminalEntry: handleReuseWorkbenchTerminalEntry, onStopTerminalRun: (terminalId) => { void handleStopWorkbenchTerminalRun(terminalId); }, codeWorkbench: codeWorkbenchState, onCodeQueryChange: setCodeWorkbenchQuery, onCodeModeChange: handleCodeModeChange, onCodeIndex: handleCodeIndex, onCodeSearch: handleCodeSearch, onCodeOpenPath: handleCodeOpenPath, onCodeToggleFile: handleCodeToggleFile, onCodeToggleSymbol: handleCodeToggleSymbol, onCodeCreateContextPack: () => { void handleCodeCreateContextPack(); }, onCodeMaterializeContextPack: (packId) => { void handleCodeMaterializeContextPack(packId); }, onCodeAttachContextPack: (packId) => { void handleCodeAttachContextPack(packId); }, onCodeRefreshContextPacks: () => { void handleCodeRefreshContextPacks(); }, onCodeRefreshChanges: () => { void handleCodeRefreshChanges(); }, onCodeRefreshActions: () => { void handleCodeRefreshActions(); }, onCodeApplyAction: (action) => { void handleCodeApplyAction(action); }, onCodeOrganizeImports: () => { void handleCodeOrganizeImports(); }, onCodeRenameSymbol: () => { void handleCodeRenameSymbol(); }, onCodeRefreshLanguageServices: () => { void handleCodeRefreshLanguageServices(); }, onCodeControlLanguageService: (serviceId, action) => { void handleCodeControlLanguageService(serviceId, action); }, onCodeRepairIndex: () => { void handleCodeRepairIndex(); }, engineeringWorkbench: engineeringWorkbenchState, onEngineeringRefresh: () => { void handleEngineeringRefresh(); }, onEngineeringTogglePath: handleEngineeringTogglePath, onEngineeringOpenPath: handleEngineeringOpenPath, onEngineeringPreviewDiff: (paths) => { void handleEngineeringPreviewDiff(paths); }, onEngineeringStage: (paths) => { void handleEngineeringStage(paths); }, onEngineeringUnstage: (paths) => { void handleEngineeringUnstage(paths); }, onEngineeringRunCheck: (checkId) => { void handleEngineeringRunCheck(checkId); }, onEngineeringStartBackgroundCheck: (checkId) => { void handleEngineeringStartBackgroundCheck(checkId); }, onEngineeringStopBackgroundRun: (runId) => { void handleEngineeringStopBackgroundRun(runId); }, onEngineeringReadBackgroundRunOutput: (runId) => { void handleEngineeringReadBackgroundRunOutput(runId); }, onEngineeringCommitMessageChange: setEngineeringCommitMessage, onEngineeringCommit: () => { void handleEngineeringCommit(); }, onEngineeringQueuePatchReview: () => { void handleEngineeringQueuePatchReview(); }, onEngineeringUpdatePatchReview: (id, status) => { void handleEngineeringUpdatePatchReview(id, status); }, onEngineeringReviewPatchSelection: (request) => { void handleEngineeringReviewPatchSelection(request); }, onEngineeringCompareCheckpoints: (fromCheckpointId, toCheckpointId) => { void handleEngineeringCompareCheckpoints(fromCheckpointId, toCheckpointId); }, onEngineeringRestoreCheckpoint: (checkpointId) => { void handleEngineeringRestoreCheckpoint(checkpointId); }, cliControlPlane: cliControlPlaneState, cliControlPlaneCaller: policyCaller, cliControlPlaneConversationId: activeConversationId, cliControlPlaneRemoteBackendId: selectedAgent?.runtimeSelection?.remoteBackendId || '', onCliControlPlaneInspect: () => { void handleCliControlPlaneInspect(); }, onCliControlPlaneRemoteRunOperation: (action, runId) => { void handleCliControlPlaneRemoteRunOperation(action, runId); }, subagentWorkbench: subagentWorkbenchState, subagentDelegationTargets: subagentDelegationTargets, subagentDelegationSourceName: selectedAgent?.name, subagentDelegationDisabledReason: subagentDelegationDisabledReason, onSubagentRefresh: () => { void handleSubagentRefresh(); }, onSubagentRecoverRuns: () => { void handleSubagentRecoverRuns(); }, onSubagentSelectRun: handleSubagentSelectRun, onSubagentOpenConversation: handleSubagentOpenConversation, onSubagentCancelRun: (run) => { void handleSubagentCancelRun(run); }, onCreateSubagentDelegation: handleWorkbenchSubagentDelegation, policyWorkbench: policyWorkbenchState, onPolicyRefresh: () => { void handlePolicyRefresh(); } }) }) }) }))] })] }), folderPanelOpen && !settingsPanel && !['projects', 'teams', 'agents', 'scheduled'].includes(viewMode || '') && (_jsx(FolderSidebar, { conversationId: activeConversationId, workspaceId: activeConversation?.workspaceId || null, rootDirectory: activeConversation?.rootDirectory || null, allowedDirectories: activeConversationAllowedDirectories, onOpenFolder: handleOpenFolderForConversation, onClose: () => setFolderPanelOpen(false), onOpenFile: handleOpenEditorFile, activeFilePath: activeEditorFilePath, terminalCapabilityEnabled: terminalCapabilityEnabled, terminalReady: terminalReady, xenoTuiReady: xenoTuiReady, xenoTuiUnavailableReason: xenoTuiUnavailableReason, providerSessionTuiReady: providerSessionTuiReady, providerSessionTuiUnavailableReason: providerSessionTuiUnavailableReason, providerSessionTuiLabel: providerSessionTuiLabel, resolvedTerminalCwd: resolvedTerminalCwd, terminalTabs: rightPanelTerminalsForConversation, onPtyInput: handleRightPanelPtyInput, onPtyResize: handleRightPanelPtyResize, onCreateTerminal: handleCreateRightPanelTerminal, onCreateXenoTui: handleCreateXenoTui, onCreateProviderTui: handleCreateProviderSessionTui, onCloseTerminal: handleCloseRightPanelTerminal, onClearTerminal: handleClearRightPanelTerminal, onRestartTerminal: handleRestartRightPanelTerminal, onStopTerminal: handleStopRightPanelTerminal, width: rightPanelWidth, onResizeStart: handleRightPanelResizeStart })), rightPanelResizing && (_jsx("div", { className: "fixed inset-0 z-[9999] cursor-col-resize bg-transparent", "aria-hidden": "true" })), pendingPermission && (_jsx(PermissionDialog, { request: pendingPermission, onDecision: resolvePermission }))] }));
|
|
9671
|
+
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, changes: changesState, changesRefreshKey: `${activeConversationId || ''}:${activeRuntimeRequestId || ''}`, 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 }))] }));
|
|
9611
9672
|
if (surface !== 'standalone-desktop') {
|
|
9612
|
-
return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden", "data-xeno-agent-embedded-shell": "true", children: [_jsxs("header", { className: "xeno-chrome-shell xeno-border-subtle h-10 flex flex-shrink-0 border-b", "data-xeno-agent-session-header": "embedded", "data-xeno-hub-header-style": "true", children: [_jsx("div", { className: "min-w-0 flex-1", children: sessionTabsNode }), _jsx(RightSidebarControls, { folderPanelOpen: folderPanelOpen, onOpenFolderPanel: () => setFolderPanelOpen(true), onOpenChanges:
|
|
9673
|
+
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: handleOpenChanges, 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 })] }));
|
|
9613
9674
|
}
|
|
9614
|
-
return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden", "data-xeno-agent-standalone-shell": "true", "data-xeno-agent-launch-mode": initialLaunchMode || 'default', children: [_jsx(XenoAgentProductHeader, { title: initialLaunchMode === 'chat' ? 'XENO Chat' : 'XENO Agent', workspaceSelector: _jsx(XenoAgentWorkspaceSelector, { onOpenWorkspaceSettings: handleOpenWorkspaceSettings }), centerContent: sessionTabsNode, trailingContent: _jsx(RightSidebarControls, { folderPanelOpen: folderPanelOpen, onOpenFolderPanel: () => setFolderPanelOpen(true), onOpenChanges:
|
|
9675
|
+
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: handleOpenChanges, 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 }))] }));
|
|
9615
9676
|
}
|
|
9616
9677
|
//# sourceMappingURL=AgentInterface.js.map
|