@xenosystem/agent-conversation 0.1.184 → 0.1.185

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.
@@ -480,7 +480,7 @@ function AgentMarkdownLink({ href, children, fileReferences, onOpenEditorPath, a
480
480
  onOpenEditorPath(filePath);
481
481
  closeContextMenu();
482
482
  };
483
- const tooltip = filePath && tooltipPosition ? (_jsx("span", { role: "tooltip", className: "pointer-events-none fixed z-[300]", style: { left: tooltipPosition.x, top: tooltipPosition.y }, children: _jsx("span", { className: "block -translate-x-1/2 -translate-y-full pb-1", children: _jsxs("span", { className: "relative inline-block w-max max-w-[440px] rounded-[7px] border border-[#ffffff1a] bg-[#252529] px-3 py-2 shadow-[0_8px_24px_rgba(0,0,0,0.35)]", children: [_jsx("span", { className: "block whitespace-pre-wrap break-all text-left text-[12px] leading-[17px] text-[#f4f4f5]", children: filePath }), _jsx("span", { className: "absolute -bottom-[5px] left-1/2 h-2.5 w-2.5 -translate-x-1/2 rotate-45 border-b border-r border-[#ffffff1a] bg-[#252529]" })] }) }) })) : null;
483
+ const tooltip = filePath && tooltipPosition ? (_jsx("span", { role: "tooltip", className: "pointer-events-none fixed z-[300]", style: { left: tooltipPosition.x, top: tooltipPosition.y }, children: _jsx("span", { className: "block -translate-x-1/2 -translate-y-full pb-1", children: _jsxs("span", { className: "relative inline-block w-max max-w-[440px] rounded-[7px] border border-[#ffffff1a] bg-xs-field px-3 py-2 shadow-[0_8px_24px_rgba(0,0,0,0.35)]", children: [_jsx("span", { className: "block whitespace-pre-wrap break-all text-left text-[12px] leading-[17px] text-xs-ink", children: filePath }), _jsx("span", { className: "absolute -bottom-[5px] left-1/2 h-2.5 w-2.5 -translate-x-1/2 rotate-45 border-b border-r border-[#ffffff1a] bg-xs-field" })] }) }) })) : null;
484
484
  const hoverHandlers = isFileLink
485
485
  ? {
486
486
  onMouseEnter: (event) => showFilePath(event.currentTarget),
@@ -719,7 +719,7 @@ function assistantLaneMarkerKind(part) {
719
719
  }
720
720
  }
721
721
  function ErrorMarkerIcon({ className = '' }) {
722
- return (_jsx("span", { className: `inline-flex h-3 w-3 items-center justify-center rounded-[2px] border border-[#e25f57]/25 bg-[#e25f57]/10 ${className}`, children: _jsx(X, { className: "h-2 w-2 text-[#ff8d86]", strokeWidth: 2 }) }));
722
+ return (_jsx("span", { className: `inline-flex h-3 w-3 items-center justify-center rounded-[2px] border border-xs-danger/25 bg-xs-danger/10 ${className}`, children: _jsx(X, { className: "h-2 w-2 text-xs-danger", strokeWidth: 2 }) }));
723
723
  }
724
724
  function AssistantTimelineRow({ markerKind, markerEmbedded = false, isLast, showConnectorBelow = false, children, }) {
725
725
  const marker = (() => {
@@ -964,7 +964,7 @@ function CommandResultBlock({ command, content, isError }) {
964
964
  return null;
965
965
  return (_jsx("div", { className: "mt-1.5 ml-5 space-y-0.5", children: resultBlocks.map((result, i) => (_jsx(WebSearchResultItem, { result: result }, i))) }));
966
966
  }
967
- return (_jsxs("div", { className: "mt-0.5 ml-5 overflow-hidden rounded border border-[color:var(--xeno-tool-expanded-border)] bg-[var(--xeno-tool-expanded-bg)]", children: [_jsx("div", { className: "py-0.5", children: _jsxs("div", { className: "group/tc flex w-full items-center gap-1 pr-2.5 pl-1.5 py-[5px]", children: [_jsx("span", { className: "inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: isError ? (_jsx(ErrorMarkerIcon, {})) : (_jsx("span", { className: "block h-1.5 w-1.5 rounded-[2px] bg-[var(--xeno-marker-solid)]" })) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block text-[10px] uppercase tracking-[0.14em] text-white/20", children: "Command" }), _jsx("span", { className: `block truncate text-[12px] leading-3 font-mono ${isError ? 'text-red-300/70' : 'text-white/50'}`, children: parsedContent.command || summary.detail })] }), _jsx("span", { className: `text-[10px] ${isError ? 'text-red-400/40' : 'text-white/20'}`, children: statusLabel })] }) }), parsedContent.cwd && (_jsx("div", { className: "border-t border-white/[0.04] px-2.5 py-1 text-[10px] text-white/20 font-mono truncate", children: parsedContent.cwd })), parsedContent.stdout && (_jsxs("div", { className: "border-t border-white/[0.04]", children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-white/20", children: "Output" }), _jsx("div", { className: "max-h-[220px] overflow-auto mr-1 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-track]:my-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-[1px] [&::-webkit-scrollbar-thumb]:hover:bg-white/20", children: _jsx("pre", { className: "px-2.5 pb-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-white/40", children: parsedContent.stdout }) })] })), (parsedContent.stderr || parsedContent.error) && (_jsxs("div", { className: "border-t border-red-500/10", children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-[#ffb0b0]/70", children: "Error" }), _jsx("pre", { className: "px-2.5 pb-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-[#f0b7b7]/80", children: [parsedContent.error, parsedContent.stderr].filter(Boolean).join('\n\n') })] })), !parsedContent.stdout && !parsedContent.stderr && !parsedContent.error && (_jsx("div", { className: "border-t border-white/[0.04] px-2.5 py-2 text-[11px] text-white/24", children: "No output" }))] }));
967
+ return (_jsxs("div", { className: "mt-0.5 ml-5 overflow-hidden rounded border border-[color:var(--xeno-tool-expanded-border)] bg-[var(--xeno-tool-expanded-bg)]", children: [_jsx("div", { className: "py-0.5", children: _jsxs("div", { className: "group/tc flex w-full items-center gap-1 pr-2.5 pl-1.5 py-[5px]", children: [_jsx("span", { className: "inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: isError ? (_jsx(ErrorMarkerIcon, {})) : (_jsx("span", { className: "block h-1.5 w-1.5 rounded-[2px] bg-[var(--xeno-marker-solid)]" })) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block text-[10px] uppercase tracking-[0.14em] text-white/20", children: "Command" }), _jsx("span", { className: `block truncate text-[12px] leading-3 font-mono ${isError ? 'text-red-300/70' : 'text-white/50'}`, children: parsedContent.command || summary.detail })] }), _jsx("span", { className: `text-[10px] ${isError ? 'text-red-400/40' : 'text-white/20'}`, children: statusLabel })] }) }), parsedContent.cwd && (_jsx("div", { className: "border-t border-white/[0.04] px-2.5 py-1 text-[10px] text-white/20 font-mono truncate", children: parsedContent.cwd })), parsedContent.stdout && (_jsxs("div", { className: "border-t border-white/[0.04]", children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-white/20", children: "Output" }), _jsx("div", { className: "max-h-[220px] overflow-auto mr-1 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-track]:my-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-[1px] [&::-webkit-scrollbar-thumb]:hover:bg-white/20", children: _jsx("pre", { className: "px-2.5 pb-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-white/40", children: parsedContent.stdout }) })] })), (parsedContent.stderr || parsedContent.error) && (_jsxs("div", { className: "border-t border-red-500/10", children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-xs-danger/70", children: "Error" }), _jsx("pre", { className: "px-2.5 pb-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-xs-danger/80", children: [parsedContent.error, parsedContent.stderr].filter(Boolean).join('\n\n') })] })), !parsedContent.stdout && !parsedContent.stderr && !parsedContent.error && (_jsx("div", { className: "border-t border-white/[0.04] px-2.5 py-2 text-[11px] text-white/24", children: "No output" }))] }));
968
968
  })()] }));
969
969
  }
970
970
  /** Renders tool calls from the agentic loop (function calling) */
@@ -1858,7 +1858,7 @@ function ToolInlineDiffCard({ toolCall, onPeekEditorDiff, onPeekEditorPath, embe
1858
1858
  return (_jsxs("div", { className: embedded ? 'overflow-hidden' : 'mt-1.5 ml-5 overflow-hidden rounded border border-[color:var(--xeno-tool-expanded-border)] bg-[var(--xeno-tool-expanded-bg)]', children: [showHeader && (_jsxs("div", { className: "flex items-center justify-between gap-3 px-3 py-1.5 border-b border-white/[0.04]", children: [_jsxs("div", { className: "min-w-0 flex items-center gap-2", children: [_jsx("button", { type: "button", onClick: () => onPeekEditorDiff?.(diff), onMouseEnter: (event) => {
1859
1859
  const rect = event.currentTarget.getBoundingClientRect();
1860
1860
  setTooltip({ x: rect.left + rect.width / 2, y: rect.top - 14 });
1861
- }, onMouseLeave: () => setTooltip(null), className: "text-[12px] text-left text-white/50 hover:text-white/70 transition-colors truncate", children: diff.name }), showHeaderStats && (_jsxs(_Fragment, { children: [_jsxs("span", { className: "text-[10px] text-emerald-300 flex-shrink-0 tabular-nums tracking-tight", children: ["+", diffStats.added] }), _jsxs("span", { className: "text-[10px] text-red-300 flex-shrink-0 tabular-nums tracking-tight", children: ["-", diffStats.removed] })] }))] }), showHeaderActions && (_jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [_jsx(DiffCopyButton, { getText: () => diff.modifiedContent }), onPeekEditorPath && (_jsx("button", { type: "button", onClick: () => onPeekEditorPath(diff.path), className: "text-[10px] text-white/20 hover:text-white/40 transition-colors", children: "Open file" })), onPeekEditorDiff && (_jsx("button", { type: "button", onClick: () => onPeekEditorDiff(diff), className: "text-[10px] text-white/35 hover:text-white/55 transition-colors", children: "Preview diff" }))] }))] })), tooltip && (_jsx("div", { className: "fixed z-[300] pointer-events-none", style: { left: tooltip.x, top: tooltip.y }, children: _jsx("div", { className: "-translate-x-1/2 -translate-y-full mb-4", children: _jsxs("div", { className: "relative inline-block px-4 py-2.5 rounded-md bg-[#0c0c0e] border border-white/[0.06] max-w-[620px]", children: [_jsx("p", { className: "text-[11px] text-white/50 whitespace-pre-wrap leading-relaxed break-all", children: diff.path }), _jsx("div", { className: "absolute left-1/2 -translate-x-1/2 -bottom-[5px] w-2.5 h-2.5 rotate-45 bg-[#0c0c0e] border-r border-b border-white/[0.06]" })] }) }) })), _jsx("div", { className: "relative max-h-[240px] overflow-auto font-mono text-[11px] leading-5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-track]:rounded-[1px] [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-[1px] [&::-webkit-scrollbar-thumb]:hover:bg-white/20", children: previewLines.map((line, index) => {
1861
+ }, onMouseLeave: () => setTooltip(null), className: "text-[12px] text-left text-white/50 hover:text-white/70 transition-colors truncate", children: diff.name }), showHeaderStats && (_jsxs(_Fragment, { children: [_jsxs("span", { className: "text-[10px] text-emerald-300 flex-shrink-0 tabular-nums tracking-tight", children: ["+", diffStats.added] }), _jsxs("span", { className: "text-[10px] text-red-300 flex-shrink-0 tabular-nums tracking-tight", children: ["-", diffStats.removed] })] }))] }), showHeaderActions && (_jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [_jsx(DiffCopyButton, { getText: () => diff.modifiedContent }), onPeekEditorPath && (_jsx("button", { type: "button", onClick: () => onPeekEditorPath(diff.path), className: "text-[10px] text-white/20 hover:text-white/40 transition-colors", children: "Open file" })), onPeekEditorDiff && (_jsx("button", { type: "button", onClick: () => onPeekEditorDiff(diff), className: "text-[10px] text-white/35 hover:text-white/55 transition-colors", children: "Preview diff" }))] }))] })), tooltip && (_jsx("div", { className: "fixed z-[300] pointer-events-none", style: { left: tooltip.x, top: tooltip.y }, children: _jsx("div", { className: "-translate-x-1/2 -translate-y-full mb-4", children: _jsxs("div", { className: "relative inline-block px-4 py-2.5 rounded-md bg-xs-page border border-white/[0.06] max-w-[620px]", children: [_jsx("p", { className: "text-[11px] text-white/50 whitespace-pre-wrap leading-relaxed break-all", children: diff.path }), _jsx("div", { className: "absolute left-1/2 -translate-x-1/2 -bottom-[5px] w-2.5 h-2.5 rotate-45 bg-xs-page border-r border-b border-white/[0.06]" })] }) }) })), _jsx("div", { className: "relative max-h-[240px] overflow-auto font-mono text-[11px] leading-5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-track]:rounded-[1px] [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-[1px] [&::-webkit-scrollbar-thumb]:hover:bg-white/20", children: previewLines.map((line, index) => {
1862
1862
  if (line.kind === 'ellipsis') {
1863
1863
  return (_jsx("div", { className: "bg-white/[0.02] pl-[9px] pr-3 py-1 text-white/25", children: line.text }, `ellipsis-${index}`));
1864
1864
  }
@@ -1902,7 +1902,7 @@ function ToolCommandDetails({ toolCall }) {
1902
1902
  const isFailed = interactionState === 'failed';
1903
1903
  if (!command && !output && !isRunning)
1904
1904
  return null;
1905
- return (_jsxs("div", { "data-command-tool-details": true, className: "overflow-hidden", children: [command && (_jsxs("div", { className: "border-b border-white/[0.04]", children: [_jsx("div", { className: "px-2.5 pt-1.5 text-[10px] uppercase tracking-[0.12em] text-white/20", children: "Full command" }), _jsx("div", { children: _jsx("pre", { className: `px-2.5 pb-2 pt-1 text-[11px] font-mono whitespace-pre-wrap break-words ${isFailed ? 'text-red-300/70' : 'text-white/50'}`, children: command }) })] })), output && (_jsxs("div", { children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-white/20", children: isFailed ? 'Error' : 'Output' }), _jsx("div", { children: _jsx("pre", { className: `px-2.5 pb-2 text-[11px] font-mono whitespace-pre-wrap break-words ${isFailed ? 'text-[#ff8b8b]' : 'text-white/40'}`, children: output }) })] })), !output && (_jsx("div", { className: "px-2.5 py-2 text-[11px] text-white/24", children: isRunning ? 'Waiting for output...' : 'No output' }))] }));
1905
+ return (_jsxs("div", { "data-command-tool-details": true, className: "overflow-hidden", children: [command && (_jsxs("div", { className: "border-b border-white/[0.04]", children: [_jsx("div", { className: "px-2.5 pt-1.5 text-[10px] uppercase tracking-[0.12em] text-white/20", children: "Full command" }), _jsx("div", { children: _jsx("pre", { className: `px-2.5 pb-2 pt-1 text-[11px] font-mono whitespace-pre-wrap break-words ${isFailed ? 'text-red-300/70' : 'text-white/50'}`, children: command }) })] })), output && (_jsxs("div", { children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-white/20", children: isFailed ? 'Error' : 'Output' }), _jsx("div", { children: _jsx("pre", { className: `px-2.5 pb-2 text-[11px] font-mono whitespace-pre-wrap break-words ${isFailed ? 'text-xs-danger' : 'text-white/40'}`, children: output }) })] })), !output && (_jsx("div", { className: "px-2.5 py-2 text-[11px] text-white/24", children: isRunning ? 'Waiting for output...' : 'No output' }))] }));
1906
1906
  }
1907
1907
  function deriveToolDetailRows(toolCall) {
1908
1908
  const params = toolCall.params || {};
@@ -2003,7 +2003,7 @@ function deriveToolDetailRows(toolCall) {
2003
2003
  return rows;
2004
2004
  }
2005
2005
  function TerminalOutputBlock({ output, terminalId, cwd }) {
2006
- return (_jsxs("div", { className: "border-t border-white/[0.04]", children: [_jsxs("div", { className: "flex h-[22px] items-center justify-between gap-2 px-2.5 text-[10px] uppercase tracking-[0.14em] text-white/20", children: [_jsx("span", { children: "Output" }), _jsx("span", { className: "min-w-0 truncate normal-case tracking-normal font-mono text-[10px] text-white/18", children: cwd || terminalId || '' })] }), _jsx("div", { className: "max-h-[220px] overflow-auto bg-[#050506] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-[1px] [&::-webkit-scrollbar-thumb]:hover:bg-white/20", children: _jsx("pre", { className: "px-2.5 pb-2 pt-1 text-[11px] leading-relaxed font-mono whitespace-pre-wrap break-words text-white/55", children: output }) })] }));
2006
+ return (_jsxs("div", { className: "border-t border-white/[0.04]", children: [_jsxs("div", { className: "flex h-[22px] items-center justify-between gap-2 px-2.5 text-[10px] uppercase tracking-[0.14em] text-white/20", children: [_jsx("span", { children: "Output" }), _jsx("span", { className: "min-w-0 truncate normal-case tracking-normal font-mono text-[10px] text-white/18", children: cwd || terminalId || '' })] }), _jsx("div", { className: "max-h-[220px] overflow-auto bg-xs-frame [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-[1px] [&::-webkit-scrollbar-thumb]:hover:bg-white/20", children: _jsx("pre", { className: "px-2.5 pb-2 pt-1 text-[11px] leading-relaxed font-mono whitespace-pre-wrap break-words text-white/55", children: output }) })] }));
2007
2007
  }
2008
2008
  function WebContextEvidenceCard({ toolCall, expanded }) {
2009
2009
  const projection = toolCall.webContext;
@@ -2039,7 +2039,7 @@ function WebContextJobProgressRow({ toolCall, onStop, }) {
2039
2039
  // A stale row is a record, not a live one: nothing is still moving, so nothing pulses.
2040
2040
  const indeterminate = view.percent === null && !view.stale;
2041
2041
  return (_jsx("div", { "data-web-job-progress": view.jobId, "data-web-job-state": progress.state, "data-web-job-stale": view.stale ? 'true' : 'false', className: "ml-3 mt-0.5 max-w-[calc(100%-12px)] overflow-hidden rounded-[3px] border border-white/[0.06] bg-white/[0.02]", children: _jsxs("div", { className: "flex min-h-[24px] items-center gap-2 px-2 text-[10px]", children: [_jsx("span", { className: "flex-shrink-0 uppercase tracking-[0.14em] text-white/32", children: view.operationLabel }), _jsx("span", { className: `flex-shrink-0 uppercase tracking-[0.12em] ${view.tone === 'failed'
2042
- ? 'text-[#ff8d86]/70'
2042
+ ? 'text-xs-danger/70'
2043
2043
  : view.tone === 'cancelled' || view.tone === 'partial'
2044
2044
  ? 'text-white/30'
2045
2045
  : 'text-white/45'}`, children: view.stateLabel }), _jsx("div", { role: "progressbar", "aria-label": view.ariaLabel, "aria-valuetext": view.valueText, ...(view.percent === null
@@ -2067,12 +2067,12 @@ function ToolApprovalCard({ toolCall, permission, canPersistAllowlist, onSkip, o
2067
2067
  return (_jsxs("div", { className: "mt-1 -ml-[18px] w-[calc(100%+18px)] overflow-visible rounded-[2px] border border-white/[0.045] bg-black/20", children: [_jsxs("button", { type: "button", onClick: () => {
2068
2068
  setAllowlistMenuOpen(false);
2069
2069
  setExpanded((value) => !value);
2070
- }, className: "flex h-[22px] w-full items-center justify-between gap-2 border-b border-white/[0.04] bg-[#101012] pr-2.5 pl-2 text-left transition-colors hover:bg-[#131316]", "aria-expanded": expanded, children: [_jsxs("span", { className: "min-w-0 inline-flex items-center gap-1.5 truncate", title: info.description, children: [_jsx(ShieldAlert, { className: "h-3 w-3 flex-shrink-0 text-amber-400/70", strokeWidth: 1.5 }), _jsx("span", { className: "min-w-0 truncate text-[10px] uppercase tracking-[0.18em] text-white/20", children: "Approval required" })] }), _jsx(ChevronRight, { className: `h-3 w-3 flex-shrink-0 text-white/12 transition-transform ${expanded ? 'rotate-90' : ''}`, strokeWidth: 1.6 })] }), _jsx("div", { className: `grid transition-[grid-template-rows,opacity] duration-200 ease-out ${expanded ? 'grid-rows-[1fr] opacity-100' : 'grid-rows-[0fr] opacity-0'}`, children: _jsxs("div", { className: `min-h-0 ${allowlistMenuOpen ? 'overflow-visible' : 'overflow-hidden'}`, children: [_jsx("div", { className: "border-b border-white/[0.035] bg-black/10 px-2.5 py-1", children: _jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [_jsx("span", { className: "flex-shrink-0 text-[10px] uppercase tracking-[0.16em] leading-4 text-white/20", children: surfaceLabel }), _jsxs("pre", { className: "min-w-0 flex-1 whitespace-pre-wrap break-all font-mono text-[12px] leading-[14px] text-white/72", children: [info.prompt && _jsx("span", { className: "text-white/24", children: info.prompt }), info.body] })] }) }), _jsxs("div", { className: "relative flex h-[24px] items-center justify-between gap-1 bg-[#0b0b0d] px-0.5", children: [_jsxs("button", { type: "button", onClick: () => setAllowlistMenuOpen((value) => !value), className: "inline-flex h-[18px] items-center justify-center gap-1 rounded-[2px] pl-2 pr-1 text-[10px] leading-none text-white/32 transition-colors hover:bg-white/[0.03] hover:text-white/58", title: "Autorun mode", "aria-haspopup": "menu", "aria-expanded": allowlistMenuOpen, children: [_jsx("span", { children: "Use Allowlist" }), _jsx(ChevronDown, { className: `h-2.5 w-2.5 text-white/22 transition-transform ${allowlistMenuOpen ? 'rotate-180' : ''}`, strokeWidth: 1.8 })] }), allowlistMenuOpen && (_jsxs("div", { role: "menu", className: "absolute left-0 top-full z-20 mt-1 w-[170px] overflow-hidden rounded-[3px] border border-white/[0.075] bg-[#101012] py-1 shadow-[0_12px_30px_rgba(0,0,0,0.38)]", children: [_jsxs("button", { type: "button", role: "menuitem", onClick: () => setAllowlistMenuOpen(false), className: "flex h-6 w-full items-center justify-between px-2 text-left text-[10px] text-white/42 hover:bg-white/[0.04] hover:text-white/70", children: [_jsx("span", { children: "Use Allowlist" }), _jsx(Check, { className: "h-3 w-3 text-white/35", strokeWidth: 1.7 })] }), _jsx("button", { type: "button", role: "menuitem", onClick: () => {
2070
+ }, className: "flex h-[22px] w-full items-center justify-between gap-2 border-b border-white/[0.04] bg-xs-page pr-2.5 pl-2 text-left transition-colors hover:bg-xs-page", "aria-expanded": expanded, children: [_jsxs("span", { className: "min-w-0 inline-flex items-center gap-1.5 truncate", title: info.description, children: [_jsx(ShieldAlert, { className: "h-3 w-3 flex-shrink-0 text-amber-400/70", strokeWidth: 1.5 }), _jsx("span", { className: "min-w-0 truncate text-[10px] uppercase tracking-[0.18em] text-white/20", children: "Approval required" })] }), _jsx(ChevronRight, { className: `h-3 w-3 flex-shrink-0 text-white/12 transition-transform ${expanded ? 'rotate-90' : ''}`, strokeWidth: 1.6 })] }), _jsx("div", { className: `grid transition-[grid-template-rows,opacity] duration-200 ease-out ${expanded ? 'grid-rows-[1fr] opacity-100' : 'grid-rows-[0fr] opacity-0'}`, children: _jsxs("div", { className: `min-h-0 ${allowlistMenuOpen ? 'overflow-visible' : 'overflow-hidden'}`, children: [_jsx("div", { className: "border-b border-white/[0.035] bg-black/10 px-2.5 py-1", children: _jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [_jsx("span", { className: "flex-shrink-0 text-[10px] uppercase tracking-[0.16em] leading-4 text-white/20", children: surfaceLabel }), _jsxs("pre", { className: "min-w-0 flex-1 whitespace-pre-wrap break-all font-mono text-[12px] leading-[14px] text-white/72", children: [info.prompt && _jsx("span", { className: "text-white/24", children: info.prompt }), info.body] })] }) }), _jsxs("div", { className: "relative flex h-[24px] items-center justify-between gap-1 bg-xs-page px-0.5", children: [_jsxs("button", { type: "button", onClick: () => setAllowlistMenuOpen((value) => !value), className: "inline-flex h-[18px] items-center justify-center gap-1 rounded-[2px] pl-2 pr-1 text-[10px] leading-none text-white/32 transition-colors hover:bg-white/[0.03] hover:text-white/58", title: "Autorun mode", "aria-haspopup": "menu", "aria-expanded": allowlistMenuOpen, children: [_jsx("span", { children: "Use Allowlist" }), _jsx(ChevronDown, { className: `h-2.5 w-2.5 text-white/22 transition-transform ${allowlistMenuOpen ? 'rotate-180' : ''}`, strokeWidth: 1.8 })] }), allowlistMenuOpen && (_jsxs("div", { role: "menu", className: "absolute left-0 top-full z-20 mt-1 w-[170px] overflow-hidden rounded-[3px] border border-white/[0.075] bg-xs-page py-1 shadow-[0_12px_30px_rgba(0,0,0,0.38)]", children: [_jsxs("button", { type: "button", role: "menuitem", onClick: () => setAllowlistMenuOpen(false), className: "flex h-6 w-full items-center justify-between px-2 text-left text-[10px] text-white/42 hover:bg-white/[0.04] hover:text-white/70", children: [_jsx("span", { children: "Use Allowlist" }), _jsx(Check, { className: "h-3 w-3 text-white/35", strokeWidth: 1.7 })] }), _jsx("button", { type: "button", role: "menuitem", onClick: () => {
2071
2071
  setAllowlistMenuOpen(false);
2072
2072
  onAllowlist();
2073
2073
  }, className: "h-6 w-full px-2 text-left text-[10px] text-white/58 hover:bg-white/[0.04] hover:text-white", children: "Allowlist this action" }), _jsx("button", { type: "button", role: "menuitem", onClick: () => setAllowlistMenuOpen(false), className: "h-6 w-full px-2 text-left text-[10px] text-white/34 hover:bg-white/[0.04] hover:text-white/60", children: "Ask every time" })] })), _jsxs("div", { className: "ml-auto flex h-full items-center gap-0.5", children: [_jsx("button", { type: "button", onClick: onSkip, className: "inline-flex h-[18px] items-center justify-center rounded-[2px] px-1.5 text-[10px] leading-none text-white/70 transition-colors hover:bg-white/[0.03] hover:text-white", children: "Skip" }), onDenyAlways && (_jsx("button", { type: "button", onClick: onDenyAlways, title: "Refuse this and remember the refusal", className: "inline-flex h-[18px] items-center justify-center rounded-[2px] px-1.5 text-[10px] leading-none text-white/45 transition-colors hover:bg-white/[0.03] hover:text-white/75", children: "Never" })), _jsx("button", { type: "button", onClick: onAllowlist, className: `inline-flex h-[18px] items-center justify-center whitespace-nowrap rounded-[2px] border px-1.5 text-[10px] leading-none transition-colors ${canPersistAllowlist
2074
- ? 'border-white/[0.075] bg-[#151517] text-white/58 hover:border-transparent hover:bg-[#1d1d20] hover:text-white/78'
2075
- : 'border-white/[0.05] bg-[#101012] text-white/38 hover:border-transparent hover:bg-[#171719] hover:text-white/58'}`, title: canPersistAllowlist ? 'Allow for this conversation' : 'Approve this action; persistent allowlist is not available for this surface action yet', children: info.allowlistLabel }), _jsx("button", { type: "button", onClick: onRun, className: "inline-flex h-[18px] items-center justify-center rounded-[2px] border border-white/[0.09] bg-[#18181b] px-2 text-[10px] font-medium leading-none text-white/66 transition-colors hover:border-transparent hover:bg-[#222226] hover:text-white", children: info.runLabel })] })] })] }) })] }));
2074
+ ? 'border-white/[0.075] bg-xs-page text-white/58 hover:border-transparent hover:bg-xs-raised hover:text-white/78'
2075
+ : 'border-white/[0.05] bg-xs-page text-white/38 hover:border-transparent hover:bg-xs-raised hover:text-white/58'}`, title: canPersistAllowlist ? 'Allow for this conversation' : 'Approve this action; persistent allowlist is not available for this surface action yet', children: info.allowlistLabel }), _jsx("button", { type: "button", onClick: onRun, className: "inline-flex h-[18px] items-center justify-center rounded-[2px] border border-white/[0.09] bg-xs-raised px-2 text-[10px] font-medium leading-none text-white/66 transition-colors hover:border-transparent hover:bg-xs-field hover:text-white", children: info.runLabel })] })] })] }) })] }));
2076
2076
  }
2077
2077
  function ToolAskUserCard({ requestId, askUserRequest, }) {
2078
2078
  const [draft, setDraft] = useState('');
@@ -2131,7 +2131,7 @@ function ToolAskUserCard({ requestId, askUserRequest, }) {
2131
2131
  setSending(false);
2132
2132
  }
2133
2133
  };
2134
- return (_jsxs("div", { className: "mt-1 -ml-[18px] w-[calc(100%+18px)] overflow-hidden rounded-[2px] border border-sky-300/[0.08] bg-[#071014]/80", children: [_jsxs("div", { className: "border-b border-white/[0.045] bg-[#0b151a] px-2.5 py-1.5", children: [_jsx("p", { className: "text-[10px] uppercase tracking-[0.18em] text-sky-200/32", children: "Input needed" }), _jsx("p", { className: "mt-1 text-[12px] leading-4 text-white/78", children: askUserRequest.question }), askUserRequest.context && (_jsx("p", { className: "mt-1 text-[10px] leading-4 text-white/32", children: askUserRequest.context }))] }), _jsxs("div", { className: "space-y-2 bg-black/20 px-2.5 py-2", children: [askUserRequest.options && askUserRequest.options.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-1.5", children: askUserRequest.options.map((option) => (_jsx("button", { type: "button", disabled: sending, onClick: () => void answer(option, option), className: "rounded-[2px] border border-white/[0.08] bg-white/[0.04] px-2 py-1 text-[11px] text-white/68 transition-colors hover:border-sky-200/20 hover:bg-sky-200/[0.08] hover:text-white disabled:opacity-40", children: option }, option))) })), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("input", { value: draft, onChange: (event) => setDraft(event.target.value), onKeyDown: (event) => {
2134
+ return (_jsxs("div", { className: "mt-1 -ml-[18px] w-[calc(100%+18px)] overflow-hidden rounded-[2px] border border-sky-300/[0.08] bg-xs-page/80", children: [_jsxs("div", { className: "border-b border-white/[0.045] bg-xs-page px-2.5 py-1.5", children: [_jsx("p", { className: "text-[10px] uppercase tracking-[0.18em] text-sky-200/32", children: "Input needed" }), _jsx("p", { className: "mt-1 text-[12px] leading-4 text-white/78", children: askUserRequest.question }), askUserRequest.context && (_jsx("p", { className: "mt-1 text-[10px] leading-4 text-white/32", children: askUserRequest.context }))] }), _jsxs("div", { className: "space-y-2 bg-black/20 px-2.5 py-2", children: [askUserRequest.options && askUserRequest.options.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-1.5", children: askUserRequest.options.map((option) => (_jsx("button", { type: "button", disabled: sending, onClick: () => void answer(option, option), className: "rounded-[2px] border border-white/[0.08] bg-white/[0.04] px-2 py-1 text-[11px] text-white/68 transition-colors hover:border-sky-200/20 hover:bg-sky-200/[0.08] hover:text-white disabled:opacity-40", children: option }, option))) })), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("input", { value: draft, onChange: (event) => setDraft(event.target.value), onKeyDown: (event) => {
2135
2135
  if (event.key === 'Enter') {
2136
2136
  event.preventDefault();
2137
2137
  void answer(draft);
@@ -2399,7 +2399,7 @@ export function ToolCallsBlock({ calls, requestId, onAddApprovalRule, onOpenEdit
2399
2399
  : isCompactToolHeader
2400
2400
  ? 'w-[calc(100%+13px)]'
2401
2401
  : 'w-full'} rounded-[2px] border transition-colors ${isFailedToolCall
2402
- ? 'border-[#e25f57]/20 bg-[#e25f57]/[0.04]'
2402
+ ? 'border-xs-danger/20 bg-xs-danger/[0.04]'
2403
2403
  : isExpanded
2404
2404
  ? 'border-white/[0.04]'
2405
2405
  : isCommandToolHeader
@@ -2434,10 +2434,10 @@ export function ToolCallsBlock({ calls, requestId, onAddApprovalRule, onOpenEdit
2434
2434
  }
2435
2435
  }
2436
2436
  }, className: `min-w-0 flex-1 inline-flex text-left disabled:cursor-default ${isCompactToolHeader ? 'h-full items-center' : 'items-start'} ${hasPendingInteractiveCard || isRunningChooseDirectory ? 'gap-0' : 'gap-1.5'}`, disabled: isRunning, "aria-label": `Tool call: ${tc.toolName}`, children: [showInlineToolStatusIcon && (_jsx("span", { className: `${isCompactToolHeader ? 'mt-0' : 'mt-[2px]'} inline-flex h-3 w-3 flex-shrink-0 items-center justify-center`, children: isRunning ? (_jsx("svg", { className: "w-3 h-3 text-white/25 animate-spin", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M12 2v4m0 12v4m-7.07-3.93l2.83-2.83m8.48-8.48l2.83-2.83M2 12h4m12 0h4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83", strokeWidth: 1.5, strokeLinecap: "square" }) })) : isCancelledToolCall ? (_jsx(X, { className: "h-2.5 w-2.5 text-white/28", "aria-hidden": "true" })) : (_jsx(ErrorMarkerIcon, {})) })), _jsx("span", { className: `min-w-0 flex-1 ${isCompactToolHeader ? 'flex h-full items-center' : ''}`, children: isRunningChooseDirectory ? (_jsx("span", { className: "block truncate text-[12px] leading-4 text-white/50", title: "Selecting folder", children: "Selecting folder" })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: `${isCompactToolHeader ? 'inline-flex h-[20px] -translate-y-[0.5px] items-center leading-[20px]' : 'block leading-none'} text-[10px] uppercase tracking-[0.14em] transition-colors ${isFailedToolCall
2437
- ? 'text-[#ff8d86]/80 group-hover/tc:text-[#ffaaa5]'
2437
+ ? 'text-xs-danger/80 group-hover/tc:text-xs-danger'
2438
2438
  : isRunning
2439
2439
  ? 'text-white/45 group-hover/tc:text-white/60'
2440
- : 'text-white/32 group-hover/tc:text-white/48'}`, children: hasPendingAskUser ? 'Input needed' : hasPendingPermission ? 'Approval required' : cardDisplay.eyebrow }), !hasPendingInteractiveCard && !hideCollapsedToolTitle && hasToolTitle && (_jsx("span", { className: `block truncate text-[12px] leading-3 ${isFailedToolCall ? 'text-red-300/70' : 'text-white/50'}`, title: cardDisplay.title || filePath || primaryText, children: cardDisplay.title }))] })) })] }), _jsxs("div", { className: `flex items-center gap-1.5 flex-shrink-0 ${isCompactToolHeader ? 'pt-0' : 'pt-[2px]'}`, children: [activeWorkspacePlacementCard && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: () => activeWorkspacePlacementCard.onChoose('inbox'), disabled: activeWorkspacePlacementCard.resolving, className: "h-[20px] flex-shrink-0 rounded-[2px] px-2 text-[10px] text-white/40 transition-colors hover:bg-white/[0.06] hover:text-white/70 disabled:opacity-40", title: "Continue in Inbox with this folder allowed for this conversation.", children: "Keep in Inbox" }), activeWorkspacePlacementCard.existingWorkspaceName && (_jsxs("button", { type: "button", onClick: () => activeWorkspacePlacementCard.onChoose('reuse'), disabled: activeWorkspacePlacementCard.resolving, className: "h-[20px] flex-shrink-0 rounded-[2px] px-2 text-[10px] text-white/45 transition-colors hover:bg-white/[0.06] hover:text-white/75 disabled:opacity-40", title: `Move this chat to ${activeWorkspacePlacementCard.existingWorkspaceName}.`, children: ["Move to ", activeWorkspacePlacementCard.existingWorkspaceName] })), _jsx("button", { type: "button", onClick: () => activeWorkspacePlacementCard.onChoose('create'), disabled: activeWorkspacePlacementCard.resolving, className: "h-[20px] flex-shrink-0 rounded-[2px] border border-white/[0.10] bg-white/[0.06] px-2 text-[10px] text-white/65 transition-colors hover:border-white/[0.16] hover:bg-white/[0.10] hover:text-white/85 disabled:opacity-40", title: `Create workspace ${activeWorkspacePlacementCard.suggestedWorkspaceName} from the selected folder.`, children: activeWorkspacePlacementCard.resolving ? 'Working...' : `Create ${activeWorkspacePlacementCard.suggestedWorkspaceName}` })] })), isCancelledToolCall && (_jsx("span", { className: "text-[9px] uppercase tracking-[0.14em] text-white/24", children: "Cancelled" })), isFailedToolCall && (_jsx("span", { className: "text-[9px] uppercase tracking-[0.14em] text-[#ff8d86]/70", children: "Failed" })), tc.diff && !isRunning && (_jsx(DiffCopyButton, { getText: () => tc.diff.modifiedContent })), tc.diff && handleOpenDiff && !isRunning && !isExpanded && (_jsx("button", { type: "button", onClick: (event) => {
2440
+ : 'text-white/32 group-hover/tc:text-white/48'}`, children: hasPendingAskUser ? 'Input needed' : hasPendingPermission ? 'Approval required' : cardDisplay.eyebrow }), !hasPendingInteractiveCard && !hideCollapsedToolTitle && hasToolTitle && (_jsx("span", { className: `block truncate text-[12px] leading-3 ${isFailedToolCall ? 'text-red-300/70' : 'text-white/50'}`, title: cardDisplay.title || filePath || primaryText, children: cardDisplay.title }))] })) })] }), _jsxs("div", { className: `flex items-center gap-1.5 flex-shrink-0 ${isCompactToolHeader ? 'pt-0' : 'pt-[2px]'}`, children: [activeWorkspacePlacementCard && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: () => activeWorkspacePlacementCard.onChoose('inbox'), disabled: activeWorkspacePlacementCard.resolving, className: "h-[20px] flex-shrink-0 rounded-[2px] px-2 text-[10px] text-white/40 transition-colors hover:bg-white/[0.06] hover:text-white/70 disabled:opacity-40", title: "Continue in Inbox with this folder allowed for this conversation.", children: "Keep in Inbox" }), activeWorkspacePlacementCard.existingWorkspaceName && (_jsxs("button", { type: "button", onClick: () => activeWorkspacePlacementCard.onChoose('reuse'), disabled: activeWorkspacePlacementCard.resolving, className: "h-[20px] flex-shrink-0 rounded-[2px] px-2 text-[10px] text-white/45 transition-colors hover:bg-white/[0.06] hover:text-white/75 disabled:opacity-40", title: `Move this chat to ${activeWorkspacePlacementCard.existingWorkspaceName}.`, children: ["Move to ", activeWorkspacePlacementCard.existingWorkspaceName] })), _jsx("button", { type: "button", onClick: () => activeWorkspacePlacementCard.onChoose('create'), disabled: activeWorkspacePlacementCard.resolving, className: "h-[20px] flex-shrink-0 rounded-[2px] border border-white/[0.10] bg-white/[0.06] px-2 text-[10px] text-white/65 transition-colors hover:border-white/[0.16] hover:bg-white/[0.10] hover:text-white/85 disabled:opacity-40", title: `Create workspace ${activeWorkspacePlacementCard.suggestedWorkspaceName} from the selected folder.`, children: activeWorkspacePlacementCard.resolving ? 'Working...' : `Create ${activeWorkspacePlacementCard.suggestedWorkspaceName}` })] })), isCancelledToolCall && (_jsx("span", { className: "text-[9px] uppercase tracking-[0.14em] text-white/24", children: "Cancelled" })), isFailedToolCall && (_jsx("span", { className: "text-[9px] uppercase tracking-[0.14em] text-xs-danger/70", children: "Failed" })), tc.diff && !isRunning && (_jsx(DiffCopyButton, { getText: () => tc.diff.modifiedContent })), tc.diff && handleOpenDiff && !isRunning && !isExpanded && (_jsx("button", { type: "button", onClick: (event) => {
2441
2441
  event.stopPropagation();
2442
2442
  handleOpenDiff(tc.diff);
2443
2443
  }, className: "flex-shrink-0 text-[10px] uppercase tracking-[0.16em] text-white/20 hover:text-white/40 transition-colors", children: "Open Diff" })), !isExpanded && diffStats && (diffStats.added > 0 || diffStats.removed > 0) && (_jsxs("span", { className: "inline-flex items-center gap-1.5 flex-shrink-0 text-[10px] leading-4 tabular-nums tracking-tight", children: [diffStats.added > 0 && (_jsxs("span", { className: "text-emerald-300", children: ["+", diffStats.added] })), diffStats.removed > 0 && (_jsxs("span", { className: "text-red-300", children: ["-", diffStats.removed] }))] })), isRunningChooseDirectory && chooseDirectoryId && onChooseDirectorySelect && (_jsx("button", { type: "button", onClick: (event) => {
@@ -3146,7 +3146,7 @@ export function AgentView(props) {
3146
3146
  : (cloudModels.length === 0 && sharedProviderCatalogLoaded
3147
3147
  ? cloudCatalogUnavailableReason
3148
3148
  : (currentCloudModel?.availabilityReason || null));
3149
- const renderModelSearch = () => (_jsx("div", { className: "shrink-0 border-b border-white/[0.06] bg-[#111111]", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "pointer-events-none absolute left-3 top-1/2 h-3 w-3 -translate-y-1/2 text-white/25" }), _jsx("input", { autoFocus: true, type: "text", value: modelSearchQuery, onChange: (event) => setModelSearchQuery(event.target.value), onKeyDown: (event) => {
3149
+ const renderModelSearch = () => (_jsx("div", { className: "shrink-0 border-b border-white/[0.06] bg-xs-page", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "pointer-events-none absolute left-3 top-1/2 h-3 w-3 -translate-y-1/2 text-white/25" }), _jsx("input", { autoFocus: true, type: "text", value: modelSearchQuery, onChange: (event) => setModelSearchQuery(event.target.value), onKeyDown: (event) => {
3150
3150
  if (event.key === 'Escape') {
3151
3151
  setModelListOpen(false);
3152
3152
  setAcpModelListOpen(false);
@@ -7078,9 +7078,9 @@ export function AgentView(props) {
7078
7078
  ? 'Queued'
7079
7079
  : 'Idle';
7080
7080
  const sessionStatusClassName = sessionStatus === 'running'
7081
- ? 'text-[#ffd38a]'
7081
+ ? 'text-xs-warn'
7082
7082
  : sessionStatus === 'cancelling'
7083
- ? 'text-[#ffb38a]'
7083
+ ? 'text-xs-warn'
7084
7084
  : sessionStatus === 'queued'
7085
7085
  ? 'text-white/60'
7086
7086
  : 'text-white/30';
@@ -7731,7 +7731,7 @@ export function AgentView(props) {
7731
7731
  // dock's measured height; in a column nothing needs measuring for the thread to end above the box.
7732
7732
  // (No `xeno-app-shell`: that is the product chrome's surface, declared later at equal specificity, and it
7733
7733
  // painted the panel's root in the chrome's ink and background instead of the panel's own.)
7734
- _jsxs("div", { className: "xa-app", style: sideChatOpen ? { paddingRight: 356 } : undefined, children: [sdkConfirmation.confirmation, _jsx("div", { ref: messagesScrollRef, className: `xa-transcript${stepsMode === 'collapsed' ? ' xa-collapsed' : ''}`, "data-transcript": true, style: messageViewportBottomPadding ? { paddingBottom: messageViewportBottomPadding } : undefined, children: conversationHydrating ? (_jsx(ConversationLoadingSkeleton, {})) : (_jsxs("div", { ref: threadRef, className: "xa-thread", "data-stage": true, children: [conversation?.sessionUi?.parentConversationId && props.onNavigateConversation && (_jsx("div", { className: "sticky top-2 z-[21] -mx-1 px-1 pb-2", children: _jsxs("button", { type: "button", onClick: () => props.onNavigateConversation?.(conversation.sessionUi?.parentConversationId || ''), className: "xeno-border-subtle w-full rounded-[6px] border bg-[#111111] px-3 py-2 text-left text-[11px] text-white/48 hover:bg-white/[0.045] hover:text-white/72 transition-colors inline-flex items-center gap-2", children: [_jsx(ChevronLeft, { className: "h-3.5 w-3.5" }), _jsx("span", { children: "Back to parent agent" }), _jsx("span", { className: "ml-auto text-[10px] text-white/22 truncate", children: agentName })] }) })), conversation && devSessionOpen && (_jsx("div", { className: "sticky top-2 z-[20] -mx-1 px-1 pb-2", children: _jsxs("div", { className: "xeno-border-subtle rounded-[6px] border bg-[#111111] px-3 py-2 flex items-center justify-between gap-3", children: [_jsxs("div", { className: "flex items-center gap-3 min-w-0 flex-wrap", children: [_jsx("span", { className: "text-[10px] uppercase tracking-[0.14em] text-white/28", children: "Dev session" }), _jsx("span", { className: `text-[10px] uppercase tracking-[0.14em] ${sessionStatusClassName}`, children: sessionStatusLabel }), _jsxs("span", { className: "text-[10px] text-white/24 tabular-nums", children: [pendingTurns.length, " queued"] }), _jsxs("span", { className: "text-[10px] text-white/24 tabular-nums", children: [checkpoints.length, " checkpoints"] }), _jsxs("span", { className: "text-[10px] text-white/18", children: ["Last active ", new Date(conversation.lastMessageAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })] })] }), _jsxs("div", { className: "flex items-center gap-1.5 flex-shrink-0", children: [_jsxs("button", { type: "button", onClick: () => { void handleCopyDebugSnapshot('standard'); }, disabled: !conversationId || conversationHydrating, className: "h-7 px-2.5 rounded-[4px] bg-white/[0.05] hover:bg-white/[0.08] text-[10px] text-white/55 hover:text-white/78 transition-colors disabled:opacity-35 inline-flex items-center gap-1.5", title: "Copy a redacted support report", children: [_jsx(Copy, { className: "w-3 h-3" }), "Copy report"] }), _jsx("button", { type: "button", onClick: () => { void handleCopyDebugSnapshot('full'); }, disabled: !conversationId || conversationHydrating, className: "h-7 px-2.5 rounded-[4px] bg-white/[0.05] hover:bg-white/[0.08] text-[10px] text-white/45 hover:text-white/72 transition-colors disabled:opacity-35", title: "Copy the full redacted support report", children: "Full report" }), _jsx("button", { type: "button", onClick: toggleDevSession, className: "h-7 px-2.5 rounded-[4px] bg-white/[0.05] hover:bg-white/[0.08] text-[10px] text-white/35 hover:text-white/70 transition-colors", title: "Hide developer session (Ctrl+Shift+D)", children: "Hide" })] })] }) })), runtimeProjectedMessages.length === 0 && (_jsx("div", { className: "flex-1 flex items-center justify-center pt-[20vh]", children: _jsxs("p", { className: "text-[13px] text-white/20", children: ["Message ", agentName, " to get started"] }) })), runtimeProjectedMessages.map((msg, msgIdx) => {
7734
+ _jsxs("div", { className: "xa-app", style: sideChatOpen ? { paddingRight: 356 } : undefined, children: [sdkConfirmation.confirmation, _jsx("div", { ref: messagesScrollRef, className: `xa-transcript${stepsMode === 'collapsed' ? ' xa-collapsed' : ''}`, "data-transcript": true, style: messageViewportBottomPadding ? { paddingBottom: messageViewportBottomPadding } : undefined, children: conversationHydrating ? (_jsx(ConversationLoadingSkeleton, {})) : (_jsxs("div", { ref: threadRef, className: "xa-thread", "data-stage": true, children: [conversation?.sessionUi?.parentConversationId && props.onNavigateConversation && (_jsx("div", { className: "sticky top-2 z-[21] -mx-1 px-1 pb-2", children: _jsxs("button", { type: "button", onClick: () => props.onNavigateConversation?.(conversation.sessionUi?.parentConversationId || ''), className: "xeno-border-subtle w-full rounded-[6px] border bg-xs-page px-3 py-2 text-left text-[11px] text-white/48 hover:bg-white/[0.045] hover:text-white/72 transition-colors inline-flex items-center gap-2", children: [_jsx(ChevronLeft, { className: "h-3.5 w-3.5" }), _jsx("span", { children: "Back to parent agent" }), _jsx("span", { className: "ml-auto text-[10px] text-white/22 truncate", children: agentName })] }) })), conversation && devSessionOpen && (_jsx("div", { className: "sticky top-2 z-[20] -mx-1 px-1 pb-2", children: _jsxs("div", { className: "xeno-border-subtle rounded-[6px] border bg-xs-page px-3 py-2 flex items-center justify-between gap-3", children: [_jsxs("div", { className: "flex items-center gap-3 min-w-0 flex-wrap", children: [_jsx("span", { className: "text-[10px] uppercase tracking-[0.14em] text-white/28", children: "Dev session" }), _jsx("span", { className: `text-[10px] uppercase tracking-[0.14em] ${sessionStatusClassName}`, children: sessionStatusLabel }), _jsxs("span", { className: "text-[10px] text-white/24 tabular-nums", children: [pendingTurns.length, " queued"] }), _jsxs("span", { className: "text-[10px] text-white/24 tabular-nums", children: [checkpoints.length, " checkpoints"] }), _jsxs("span", { className: "text-[10px] text-white/18", children: ["Last active ", new Date(conversation.lastMessageAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })] })] }), _jsxs("div", { className: "flex items-center gap-1.5 flex-shrink-0", children: [_jsxs("button", { type: "button", onClick: () => { void handleCopyDebugSnapshot('standard'); }, disabled: !conversationId || conversationHydrating, className: "h-7 px-2.5 rounded-[4px] bg-white/[0.05] hover:bg-white/[0.08] text-[10px] text-white/55 hover:text-white/78 transition-colors disabled:opacity-35 inline-flex items-center gap-1.5", title: "Copy a redacted support report", children: [_jsx(Copy, { className: "w-3 h-3" }), "Copy report"] }), _jsx("button", { type: "button", onClick: () => { void handleCopyDebugSnapshot('full'); }, disabled: !conversationId || conversationHydrating, className: "h-7 px-2.5 rounded-[4px] bg-white/[0.05] hover:bg-white/[0.08] text-[10px] text-white/45 hover:text-white/72 transition-colors disabled:opacity-35", title: "Copy the full redacted support report", children: "Full report" }), _jsx("button", { type: "button", onClick: toggleDevSession, className: "h-7 px-2.5 rounded-[4px] bg-white/[0.05] hover:bg-white/[0.08] text-[10px] text-white/35 hover:text-white/70 transition-colors", title: "Hide developer session (Ctrl+Shift+D)", children: "Hide" })] })] }) })), runtimeProjectedMessages.length === 0 && (_jsx("div", { className: "flex-1 flex items-center justify-center pt-[20vh]", children: _jsxs("p", { className: "text-[13px] text-white/20", children: ["Message ", agentName, " to get started"] }) })), runtimeProjectedMessages.map((msg, msgIdx) => {
7735
7735
  const previousMsg = runtimeProjectedMessages[msgIdx - 1];
7736
7736
  // a day boundary in the thread: before the first message, and wherever the day changes
7737
7737
  const dayLabel = relativeDay(msg.timestamp);
@@ -7836,10 +7836,10 @@ export function AgentView(props) {
7836
7836
  : 'xeno-text-faint hover:text-[color:var(--xeno-ink-secondary)] hover:bg-[var(--xeno-bg-subtle)]'}`, children: tab }, tab))) }), _jsx("button", { onClick: () => patchSessionUi({ panelOpen: false }), className: "text-[10px] xeno-text-faint hover:text-[color:var(--xeno-ink-secondary)] transition-colors", children: "Close" })] }), _jsxs("div", { className: "h-[240px] min-h-0", children: [sessionPanelTab === 'trace' && (_jsxs("div", { className: "h-full grid grid-cols-[240px_minmax(0,1fr)]", children: [_jsx("div", { className: "border-r border-white/[0.06] overflow-y-auto", children: traceMessages.length === 0 ? (_jsx("div", { className: "px-3 py-3 text-[11px] text-white/28", children: "No traced turns yet." })) : (traceMessages.map((message) => {
7837
7837
  const toolCount = message.toolCalls?.length || 0;
7838
7838
  const selected = selectedTraceMessage?.id === message.id;
7839
- return (_jsxs("button", { onClick: () => patchSessionUi({ panelOpen: true, panelTab: 'trace', selectedTraceMessageId: message.id }), className: `w-full text-left px-3 py-2 border-b border-white/[0.04] transition-colors ${selected ? 'bg-white/[0.06]' : 'hover:bg-white/[0.03]'}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { className: "text-[11px] text-white/68 truncate", children: message.toolCalls?.[0]?.summary || message.content || 'Assistant turn' }), _jsx("span", { className: "text-[10px] text-white/18 tabular-nums", children: new Date(message.timestamp).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) })] }), _jsxs("div", { className: "flex items-center gap-2 mt-1", children: [_jsxs("span", { className: "text-[10px] text-white/24 tabular-nums", children: [toolCount, " tools"] }), message.error && _jsx("span", { className: "text-[10px] text-[#ff9a9a]", children: "error" })] })] }, message.id));
7840
- })) }), _jsx("div", { className: "overflow-y-auto px-3 py-3", children: !selectedTraceMessage ? (_jsx("p", { className: "text-[11px] text-white/28", children: "Select a turn to inspect its tools and outputs." })) : (_jsx("div", { className: "space-y-2", children: (selectedTraceMessage.toolCalls || []).map((toolCall) => (_jsxs("div", { className: "rounded-[5px] border border-white/[0.06] bg-black/20 px-3 py-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-[11px] text-white/72 truncate", children: toolCall.summary || toolCall.toolName }), _jsxs("p", { className: "text-[10px] text-white/22 mt-1", children: [toolCall.toolName, typeof toolCall.durationMs === 'number' && toolCall.durationMs >= 1000 ? ` - ${Math.round(toolCall.durationMs)}ms` : ''] })] }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [toolCall.diff && (props.onPeekEditorDiff || props.onOpenEditorDiff) && (_jsx("button", { onClick: () => (props.onPeekEditorDiff || props.onOpenEditorDiff)?.(toolCall.diff), className: "text-[10px] text-white/45 hover:text-white/78 transition-colors", children: "Open Diff" })), toolCall.artifacts?.find((artifact) => artifact.type === 'file' && artifact.openInEditor)?.value && (props.onPeekEditorPath || props.onOpenEditorPath) && (_jsx("button", { onClick: () => (props.onPeekEditorPath || props.onOpenEditorPath)?.(toolCall.artifacts.find((artifact) => artifact.type === 'file' && artifact.openInEditor).value), className: "text-[10px] text-white/30 hover:text-white/65 transition-colors", children: "Open File" }))] })] }), toolCall.result?.trim() && (_jsx("pre", { className: "mt-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed text-white/52 font-mono", children: toolCall.result.trim() }))] }, toolCall.id))) })) })] })), sessionPanelTab === 'output' && (_jsx("div", { className: "h-full overflow-y-auto px-3 py-3", children: outputEntries.length === 0 ? (_jsx("p", { className: "text-[11px] text-white/28", children: "No output captured for the selected turn." })) : (_jsx("div", { className: "space-y-2", children: outputEntries.map((entry) => (_jsxs("div", { className: "rounded-[5px] border border-white/[0.06] bg-black/20 overflow-hidden", children: [_jsx("div", { className: "px-3 py-2 border-b border-white/[0.06] text-[10px] uppercase tracking-[0.12em] text-white/26", children: entry.label }), _jsx("pre", { className: `px-3 py-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono ${entry.tone === 'error' ? 'text-[#ffaaaa]' : 'text-white/55'}`, children: entry.content })] }, entry.id))) })) })), sessionPanelTab === 'problems' && (_jsx("div", { className: "h-full overflow-y-auto px-3 py-3", children: problemEntries.length === 0 ? (_jsx("p", { className: "text-[11px] text-white/28", children: "No problems in this conversation." })) : (_jsx("div", { className: "space-y-2", children: problemEntries.map((problem) => (_jsxs("div", { className: "rounded-[5px] border border-[#4b1f24] bg-[#1a0f12] px-3 py-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("p", { className: "text-[11px] text-[#ffb0b0] truncate", children: problem.label }), _jsx("span", { className: "text-[10px] text-white/20 tabular-nums", children: new Date(problem.timestamp).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) })] }), _jsx("p", { className: "mt-1 text-[11px] leading-relaxed text-[#f0b7b7]/80 whitespace-pre-wrap break-words", children: problem.detail })] }, problem.id))) })) })), sessionPanelTab === 'terminal' && (_jsxs("div", { className: "h-full flex flex-col", children: [_jsxs("div", { className: "px-3 py-2 border-b border-white/[0.06] flex items-center justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-[10px] uppercase tracking-[0.12em] text-white/26", children: "Workspace terminal" }), _jsx("p", { className: "text-[11px] text-white/34 truncate", children: terminalCapabilityEnabled
7839
+ return (_jsxs("button", { onClick: () => patchSessionUi({ panelOpen: true, panelTab: 'trace', selectedTraceMessageId: message.id }), className: `w-full text-left px-3 py-2 border-b border-white/[0.04] transition-colors ${selected ? 'bg-white/[0.06]' : 'hover:bg-white/[0.03]'}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("span", { className: "text-[11px] text-white/68 truncate", children: message.toolCalls?.[0]?.summary || message.content || 'Assistant turn' }), _jsx("span", { className: "text-[10px] text-white/18 tabular-nums", children: new Date(message.timestamp).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) })] }), _jsxs("div", { className: "flex items-center gap-2 mt-1", children: [_jsxs("span", { className: "text-[10px] text-white/24 tabular-nums", children: [toolCount, " tools"] }), message.error && _jsx("span", { className: "text-[10px] text-xs-danger", children: "error" })] })] }, message.id));
7840
+ })) }), _jsx("div", { className: "overflow-y-auto px-3 py-3", children: !selectedTraceMessage ? (_jsx("p", { className: "text-[11px] text-white/28", children: "Select a turn to inspect its tools and outputs." })) : (_jsx("div", { className: "space-y-2", children: (selectedTraceMessage.toolCalls || []).map((toolCall) => (_jsxs("div", { className: "rounded-[5px] border border-white/[0.06] bg-black/20 px-3 py-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-[11px] text-white/72 truncate", children: toolCall.summary || toolCall.toolName }), _jsxs("p", { className: "text-[10px] text-white/22 mt-1", children: [toolCall.toolName, typeof toolCall.durationMs === 'number' && toolCall.durationMs >= 1000 ? ` - ${Math.round(toolCall.durationMs)}ms` : ''] })] }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [toolCall.diff && (props.onPeekEditorDiff || props.onOpenEditorDiff) && (_jsx("button", { onClick: () => (props.onPeekEditorDiff || props.onOpenEditorDiff)?.(toolCall.diff), className: "text-[10px] text-white/45 hover:text-white/78 transition-colors", children: "Open Diff" })), toolCall.artifacts?.find((artifact) => artifact.type === 'file' && artifact.openInEditor)?.value && (props.onPeekEditorPath || props.onOpenEditorPath) && (_jsx("button", { onClick: () => (props.onPeekEditorPath || props.onOpenEditorPath)?.(toolCall.artifacts.find((artifact) => artifact.type === 'file' && artifact.openInEditor).value), className: "text-[10px] text-white/30 hover:text-white/65 transition-colors", children: "Open File" }))] })] }), toolCall.result?.trim() && (_jsx("pre", { className: "mt-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed text-white/52 font-mono", children: toolCall.result.trim() }))] }, toolCall.id))) })) })] })), sessionPanelTab === 'output' && (_jsx("div", { className: "h-full overflow-y-auto px-3 py-3", children: outputEntries.length === 0 ? (_jsx("p", { className: "text-[11px] text-white/28", children: "No output captured for the selected turn." })) : (_jsx("div", { className: "space-y-2", children: outputEntries.map((entry) => (_jsxs("div", { className: "rounded-[5px] border border-white/[0.06] bg-black/20 overflow-hidden", children: [_jsx("div", { className: "px-3 py-2 border-b border-white/[0.06] text-[10px] uppercase tracking-[0.12em] text-white/26", children: entry.label }), _jsx("pre", { className: `px-3 py-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono ${entry.tone === 'error' ? 'text-xs-danger' : 'text-white/55'}`, children: entry.content })] }, entry.id))) })) })), sessionPanelTab === 'problems' && (_jsx("div", { className: "h-full overflow-y-auto px-3 py-3", children: problemEntries.length === 0 ? (_jsx("p", { className: "text-[11px] text-white/28", children: "No problems in this conversation." })) : (_jsx("div", { className: "space-y-2", children: problemEntries.map((problem) => (_jsxs("div", { className: "rounded-[5px] border border-xs-danger-line bg-xs-danger-bg px-3 py-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("p", { className: "text-[11px] text-xs-danger truncate", children: problem.label }), _jsx("span", { className: "text-[10px] text-white/20 tabular-nums", children: new Date(problem.timestamp).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) })] }), _jsx("p", { className: "mt-1 text-[11px] leading-relaxed text-xs-danger/80 whitespace-pre-wrap break-words", children: problem.detail })] }, problem.id))) })) })), sessionPanelTab === 'terminal' && (_jsxs("div", { className: "h-full flex flex-col", children: [_jsxs("div", { className: "px-3 py-2 border-b border-white/[0.06] flex items-center justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-[10px] uppercase tracking-[0.12em] text-white/26", children: "Workspace terminal" }), _jsx("p", { className: "text-[11px] text-white/34 truncate", children: terminalCapabilityEnabled
7841
7841
  ? (resolvedTerminalCwd || (terminalReady ? 'Conversation workspace (managed)' : 'Open a folder to start running commands.'))
7842
- : 'Terminal access is disabled for this agent.' })] }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [_jsx("button", { onClick: handleResetTerminalCwd, disabled: !terminalCapabilityEnabled || (!effectiveAllowedDirectories.length && !resolvedTerminalCwd), className: "text-[10px] text-white/32 hover:text-white/62 transition-colors disabled:opacity-30", children: "Reset cwd" }), _jsx("button", { onClick: handleClearTerminalHistory, disabled: terminalHistory.length === 0, className: "text-[10px] text-white/32 hover:text-white/62 transition-colors disabled:opacity-30", children: "Clear" })] })] }), _jsx("div", { className: "flex-1 min-h-0 overflow-y-auto px-3 py-3", children: !terminalCapabilityEnabled ? (_jsx("p", { className: "text-[11px] text-white/28", children: "Enable terminal capability for this agent to run commands from the dock." })) : !terminalReady ? (_jsx("p", { className: "text-[11px] text-white/28", children: "Open or choose a folder first. Terminal commands run inside the conversation workspace." })) : terminalHistory.length === 0 && !activeTerminalCommand ? (_jsx("p", { className: "text-[11px] text-white/28", children: "No terminal commands yet. Run a command below and it will stay attached to this conversation." })) : (_jsxs("div", { className: "space-y-1.5", children: [activeTerminalCommand && (_jsxs("div", { className: "rounded border border-white/[0.04] bg-black/20 overflow-hidden", children: [_jsx("div", { className: `px-1.5 py-[5px] rounded transition-colors ${expandedActiveTerminalCard ? 'bg-white/[0.03]' : 'hover:bg-white/[0.02]'}`, children: _jsxs("div", { className: "flex items-start gap-1.5", children: [_jsxs("button", { type: "button", onClick: () => setExpandedActiveTerminalCard((value) => !value), className: "min-w-0 flex-1 inline-flex items-start gap-1.5 text-left", children: [_jsx("span", { className: "mt-[2px] inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: _jsx("svg", { className: "w-3 h-3 text-white/25 animate-spin", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M12 2v4m0 12v4m-7.07-3.93l2.83-2.83m8.48-8.48l2.83-2.83M2 12h4m12 0h4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83", strokeWidth: 1.5, strokeLinecap: "square" }) }) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block text-[10px] uppercase tracking-[0.14em] text-white/20", children: "Terminal" }), _jsx("span", { className: "block truncate text-[12px] leading-3 font-mono text-white/50", children: activeTerminalCommand.command })] })] }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0 pt-[2px]", children: [_jsx("span", { className: "text-[10px] text-[#ffd38a]", children: "Running..." }), _jsx("button", { type: "button", onClick: () => setExpandedActiveTerminalCard((value) => !value), className: "flex-shrink-0", children: _jsx("svg", { className: `w-3 h-3 text-white/15 transition-transform ${expandedActiveTerminalCard ? 'rotate-90' : ''}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M9 6l6 6-6 6", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }) }), _jsx("div", { className: `grid transition-[grid-template-rows,opacity] duration-200 ease-out ${expandedActiveTerminalCard ? 'grid-rows-[1fr] opacity-100 mt-0.5' : 'grid-rows-[0fr] opacity-0 mt-0'}`, children: _jsx("div", { className: "min-h-0 overflow-hidden", children: _jsx("div", { className: "border-t border-white/[0.04] px-2.5 py-1.5 text-[10px] text-white/20 font-mono truncate", children: activeTerminalCommand.cwd }) }) })] })), terminalHistory.map((entry) => (_jsxs("div", { className: "rounded border border-white/[0.04] bg-black/20 overflow-hidden", children: [_jsx("div", { className: `px-1.5 py-[5px] rounded transition-colors ${expandedTerminalHistoryId === entry.id ? 'bg-white/[0.03]' : 'hover:bg-white/[0.02]'}`, children: _jsxs("div", { className: "flex items-start gap-1.5", children: [_jsxs("button", { type: "button", onClick: () => setExpandedTerminalHistoryId(expandedTerminalHistoryId === entry.id ? null : entry.id), className: "min-w-0 flex-1 inline-flex items-start gap-1.5 text-left", children: [_jsx("span", { className: "mt-[2px] inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: entry.success ? (_jsx("span", { className: "block h-1.5 w-1.5 rounded-[2px] bg-[var(--xeno-marker-solid)]" })) : (_jsx(ErrorMarkerIcon, {})) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block text-[10px] uppercase tracking-[0.14em] text-white/20", children: "Terminal" }), _jsx("span", { className: "block truncate text-[12px] leading-3 font-mono text-white/50", children: entry.command })] })] }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0 pt-[2px]", children: [_jsx("span", { className: "text-[10px] text-white/20", children: new Date(entry.endedAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) }), _jsx("span", { className: "text-[10px] text-white/20 tabular-nums", children: entry.durationMs >= 1000 ? `${(entry.durationMs / 1000).toFixed(1)}s` : `${entry.durationMs}ms` }), _jsx("span", { className: `text-[10px] ${entry.success ? 'text-[#96e59d]' : 'text-[#ff9a9a]'}`, children: entry.success ? `exit ${entry.exitCode ?? 0}` : (entry.error ? 'failed' : `exit ${entry.exitCode ?? 'error'}`) }), _jsx("button", { onClick: () => handleReuseTerminalEntry(entry), className: "text-[10px] text-white/35 hover:text-white/65 transition-colors", children: "Reuse" }), _jsx("button", { type: "button", onClick: () => setExpandedTerminalHistoryId(expandedTerminalHistoryId === entry.id ? null : entry.id), className: "flex-shrink-0", children: _jsx("svg", { className: `w-3 h-3 text-white/15 transition-transform ${expandedTerminalHistoryId === entry.id ? 'rotate-90' : ''}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M9 6l6 6-6 6", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }) }), _jsx("div", { className: `grid transition-[grid-template-rows,opacity] duration-200 ease-out ${expandedTerminalHistoryId === entry.id ? 'grid-rows-[1fr] opacity-100 mt-0.5' : 'grid-rows-[0fr] opacity-0 mt-0'}`, children: _jsxs("div", { className: "min-h-0 overflow-hidden", children: [_jsx("div", { className: "border-t border-white/[0.04] px-2.5 py-1.5 text-[10px] text-white/20 font-mono truncate", children: entry.cwd }), entry.stdout.trim() && (_jsxs("div", { className: "border-t border-white/[0.04]", children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-white/20", children: "Stdout" }), _jsx("pre", { className: "px-2.5 pb-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-white/40", children: entry.stdout.trim() })] })), (entry.stderr.trim() || entry.error?.trim()) && (_jsxs("div", { className: "border-t border-red-500/10", children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-[#ffb0b0]/70", children: "Error" }), _jsx("pre", { className: "px-2.5 pb-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-[#f0b7b7]/80", children: [entry.error?.trim(), entry.stderr.trim()].filter(Boolean).join('\n\n') })] }))] }) })] }, entry.id)))] })) }), _jsx("div", { className: "border-t border-white/[0.06] px-3 py-2 bg-[#0b0b0d]", children: _jsxs("div", { className: "grid grid-cols-[minmax(0,220px)_minmax(0,1fr)_auto] gap-2", children: [_jsx("input", { value: terminalDraftCwd, onChange: (event) => setTerminalDraftCwd(event.target.value), placeholder: resolvedTerminalCwd || 'Working directory', className: "h-8 rounded-[4px] border border-white/[0.06] bg-black/20 px-2.5 text-[11px] text-white/70 placeholder:text-white/18 outline-none focus:border-white/[0.12]" }), _jsx("input", { value: terminalDraftInput, onChange: (event) => setTerminalDraftInput(event.target.value), onKeyDown: (event) => {
7842
+ : 'Terminal access is disabled for this agent.' })] }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [_jsx("button", { onClick: handleResetTerminalCwd, disabled: !terminalCapabilityEnabled || (!effectiveAllowedDirectories.length && !resolvedTerminalCwd), className: "text-[10px] text-white/32 hover:text-white/62 transition-colors disabled:opacity-30", children: "Reset cwd" }), _jsx("button", { onClick: handleClearTerminalHistory, disabled: terminalHistory.length === 0, className: "text-[10px] text-white/32 hover:text-white/62 transition-colors disabled:opacity-30", children: "Clear" })] })] }), _jsx("div", { className: "flex-1 min-h-0 overflow-y-auto px-3 py-3", children: !terminalCapabilityEnabled ? (_jsx("p", { className: "text-[11px] text-white/28", children: "Enable terminal capability for this agent to run commands from the dock." })) : !terminalReady ? (_jsx("p", { className: "text-[11px] text-white/28", children: "Open or choose a folder first. Terminal commands run inside the conversation workspace." })) : terminalHistory.length === 0 && !activeTerminalCommand ? (_jsx("p", { className: "text-[11px] text-white/28", children: "No terminal commands yet. Run a command below and it will stay attached to this conversation." })) : (_jsxs("div", { className: "space-y-1.5", children: [activeTerminalCommand && (_jsxs("div", { className: "rounded border border-white/[0.04] bg-black/20 overflow-hidden", children: [_jsx("div", { className: `px-1.5 py-[5px] rounded transition-colors ${expandedActiveTerminalCard ? 'bg-white/[0.03]' : 'hover:bg-white/[0.02]'}`, children: _jsxs("div", { className: "flex items-start gap-1.5", children: [_jsxs("button", { type: "button", onClick: () => setExpandedActiveTerminalCard((value) => !value), className: "min-w-0 flex-1 inline-flex items-start gap-1.5 text-left", children: [_jsx("span", { className: "mt-[2px] inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: _jsx("svg", { className: "w-3 h-3 text-white/25 animate-spin", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M12 2v4m0 12v4m-7.07-3.93l2.83-2.83m8.48-8.48l2.83-2.83M2 12h4m12 0h4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83", strokeWidth: 1.5, strokeLinecap: "square" }) }) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block text-[10px] uppercase tracking-[0.14em] text-white/20", children: "Terminal" }), _jsx("span", { className: "block truncate text-[12px] leading-3 font-mono text-white/50", children: activeTerminalCommand.command })] })] }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0 pt-[2px]", children: [_jsx("span", { className: "text-[10px] text-xs-warn", children: "Running..." }), _jsx("button", { type: "button", onClick: () => setExpandedActiveTerminalCard((value) => !value), className: "flex-shrink-0", children: _jsx("svg", { className: `w-3 h-3 text-white/15 transition-transform ${expandedActiveTerminalCard ? 'rotate-90' : ''}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M9 6l6 6-6 6", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }) }), _jsx("div", { className: `grid transition-[grid-template-rows,opacity] duration-200 ease-out ${expandedActiveTerminalCard ? 'grid-rows-[1fr] opacity-100 mt-0.5' : 'grid-rows-[0fr] opacity-0 mt-0'}`, children: _jsx("div", { className: "min-h-0 overflow-hidden", children: _jsx("div", { className: "border-t border-white/[0.04] px-2.5 py-1.5 text-[10px] text-white/20 font-mono truncate", children: activeTerminalCommand.cwd }) }) })] })), terminalHistory.map((entry) => (_jsxs("div", { className: "rounded border border-white/[0.04] bg-black/20 overflow-hidden", children: [_jsx("div", { className: `px-1.5 py-[5px] rounded transition-colors ${expandedTerminalHistoryId === entry.id ? 'bg-white/[0.03]' : 'hover:bg-white/[0.02]'}`, children: _jsxs("div", { className: "flex items-start gap-1.5", children: [_jsxs("button", { type: "button", onClick: () => setExpandedTerminalHistoryId(expandedTerminalHistoryId === entry.id ? null : entry.id), className: "min-w-0 flex-1 inline-flex items-start gap-1.5 text-left", children: [_jsx("span", { className: "mt-[2px] inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: entry.success ? (_jsx("span", { className: "block h-1.5 w-1.5 rounded-[2px] bg-[var(--xeno-marker-solid)]" })) : (_jsx(ErrorMarkerIcon, {})) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block text-[10px] uppercase tracking-[0.14em] text-white/20", children: "Terminal" }), _jsx("span", { className: "block truncate text-[12px] leading-3 font-mono text-white/50", children: entry.command })] })] }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0 pt-[2px]", children: [_jsx("span", { className: "text-[10px] text-white/20", children: new Date(entry.endedAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) }), _jsx("span", { className: "text-[10px] text-white/20 tabular-nums", children: entry.durationMs >= 1000 ? `${(entry.durationMs / 1000).toFixed(1)}s` : `${entry.durationMs}ms` }), _jsx("span", { className: `text-[10px] ${entry.success ? 'text-xs-ok' : 'text-xs-danger'}`, children: entry.success ? `exit ${entry.exitCode ?? 0}` : (entry.error ? 'failed' : `exit ${entry.exitCode ?? 'error'}`) }), _jsx("button", { onClick: () => handleReuseTerminalEntry(entry), className: "text-[10px] text-white/35 hover:text-white/65 transition-colors", children: "Reuse" }), _jsx("button", { type: "button", onClick: () => setExpandedTerminalHistoryId(expandedTerminalHistoryId === entry.id ? null : entry.id), className: "flex-shrink-0", children: _jsx("svg", { className: `w-3 h-3 text-white/15 transition-transform ${expandedTerminalHistoryId === entry.id ? 'rotate-90' : ''}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M9 6l6 6-6 6", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }) }), _jsx("div", { className: `grid transition-[grid-template-rows,opacity] duration-200 ease-out ${expandedTerminalHistoryId === entry.id ? 'grid-rows-[1fr] opacity-100 mt-0.5' : 'grid-rows-[0fr] opacity-0 mt-0'}`, children: _jsxs("div", { className: "min-h-0 overflow-hidden", children: [_jsx("div", { className: "border-t border-white/[0.04] px-2.5 py-1.5 text-[10px] text-white/20 font-mono truncate", children: entry.cwd }), entry.stdout.trim() && (_jsxs("div", { className: "border-t border-white/[0.04]", children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-white/20", children: "Stdout" }), _jsx("pre", { className: "px-2.5 pb-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-white/40", children: entry.stdout.trim() })] })), (entry.stderr.trim() || entry.error?.trim()) && (_jsxs("div", { className: "border-t border-red-500/10", children: [_jsx("div", { className: "px-2.5 py-1 text-[10px] uppercase tracking-[0.12em] text-xs-danger/70", children: "Error" }), _jsx("pre", { className: "px-2.5 pb-2 whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-xs-danger/80", children: [entry.error?.trim(), entry.stderr.trim()].filter(Boolean).join('\n\n') })] }))] }) })] }, entry.id)))] })) }), _jsx("div", { className: "border-t border-white/[0.06] px-3 py-2 bg-xs-page", children: _jsxs("div", { className: "grid grid-cols-[minmax(0,220px)_minmax(0,1fr)_auto] gap-2", children: [_jsx("input", { value: terminalDraftCwd, onChange: (event) => setTerminalDraftCwd(event.target.value), placeholder: resolvedTerminalCwd || 'Working directory', className: "h-8 rounded-[4px] border border-white/[0.06] bg-black/20 px-2.5 text-[11px] text-white/70 placeholder:text-white/18 outline-none focus:border-white/[0.12]" }), _jsx("input", { value: terminalDraftInput, onChange: (event) => setTerminalDraftInput(event.target.value), onKeyDown: (event) => {
7843
7843
  if (event.key === 'Enter' && !event.shiftKey) {
7844
7844
  event.preventDefault();
7845
7845
  void handleRunTerminalCommand();