@xenosystem/agent-interface-ui 0.1.8 → 0.1.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AgentView.d.ts","sourceRoot":"","sources":["../../../src/components/agent/AgentView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAiBhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAC3G,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAA2B,MAAM,4BAA4B,CAAA;AAiCjG,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB;AAED,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,iBAAiB,CAAA;IAChC,iB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CAAC,EAAE,CAAC,MAAM,EAAE;QACtC,cAAc,EAAE,MAAM,CAAA;QACtB,OAAO,EAAE,MAAM,CAAA;KAChB,KAAK,IAAI,CAAA;IACV,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,IAAI,CAAA;IACzD,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,IAAI,CAAA;IACzD,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,0BAA0B,CAAC,EAAE,MAAM,IAAI,CAAA;IACvC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,kBAAkB,CAAC,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAChF,qBAAqB,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAA;IACxD,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uBAAuB,CAAC,EAAE,MAAM,CAAA;CACjC;AAi1JD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,qBAopL9C"}
@@ -6132,7 +6132,7 @@ export function AgentView(props) {
6132
6132
  textareaRef.current.style.height = 'auto';
6133
6133
  return;
6134
6134
  }
6135
- if (effectiveAllowedDirectories.length === 0) {
6135
+ if (workspaceBinding.mode === 'workspace' && effectiveAllowedDirectories.length === 0) {
6136
6136
  appendMessage(targetConversationId, { role: 'assistant', content: 'No allowed directories configured. Open agent settings and add one.', error: 'No allowed directories configured.' });
6137
6137
  if (textareaRef.current)
6138
6138
  textareaRef.current.style.height = 'auto';
@@ -6147,8 +6147,9 @@ export function AgentView(props) {
6147
6147
  setIsRunningCommand(true);
6148
6148
  const result = await getAgentPlatformBridge().workspace.runCommand({
6149
6149
  command,
6150
- cwd: effectiveAllowedDirectories[0],
6151
- allowedDirs: effectiveAllowedDirectories
6150
+ cwd: effectiveAllowedDirectories[0] || '',
6151
+ allowedDirs: effectiveAllowedDirectories,
6152
+ conversationId: targetConversationId,
6152
6153
  });
6153
6154
  setIsRunningCommand(false);
6154
6155
  const blocks = [];
@@ -6974,6 +6975,7 @@ export function AgentView(props) {
6974
6975
  command,
6975
6976
  cwd,
6976
6977
  allowedDirs: effectiveAllowedDirectories,
6978
+ conversationId,
6977
6979
  timeoutMs: 30_000,
6978
6980
  });
6979
6981
  const endedAt = Date.now();
@@ -7215,8 +7217,8 @@ export function AgentView(props) {
7215
7217
  const selected = selectedTraceMessage?.id === message.id;
7216
7218
  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));
7217
7219
  })) }), _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
7218
- ? (resolvedTerminalCwd || 'Open a folder to start running commands.')
7219
- : '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." })) : !effectiveAllowedDirectories.length ? (_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) => {
7220
+ ? (resolvedTerminalCwd || (terminalReady ? 'Conversation workspace (managed)' : 'Open a folder to start running commands.'))
7221
+ : '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) => {
7220
7222
  if (event.key === 'Enter' && !event.shiftKey) {
7221
7223
  event.preventDefault();
7222
7224
  void handleRunTerminalCommand();