@xenosystem/agent-interface-ui 0.1.18 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -1
- package/dist/adapters/agentHostPlatformBridge.js +216 -1
- package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
- package/dist/components/agent/AgentInterface.d.ts.map +1 -1
- package/dist/components/agent/AgentInterface.js +68 -27
- package/dist/components/agent/AgentInterface.js.map +1 -1
- package/dist/components/agent/AgentView.d.ts +22 -0
- package/dist/components/agent/AgentView.d.ts.map +1 -1
- package/dist/components/agent/AgentView.js +39 -14
- package/dist/components/agent/AgentView.js.map +1 -1
- package/dist/components/agent/AgentWorkbenchPanel.d.ts +4 -1
- package/dist/components/agent/AgentWorkbenchPanel.d.ts.map +1 -1
- package/dist/components/agent/AgentWorkbenchPanel.js +15 -6
- package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
- package/dist/components/agent/DevelopmentCoordinationPanel.d.ts +5 -0
- package/dist/components/agent/DevelopmentCoordinationPanel.d.ts.map +1 -0
- package/dist/components/agent/DevelopmentCoordinationPanel.js +73 -0
- package/dist/components/agent/DevelopmentCoordinationPanel.js.map +1 -0
- package/dist/components/agent/developmentCoordinationProjection.d.ts +53 -0
- package/dist/components/agent/developmentCoordinationProjection.d.ts.map +1 -0
- package/dist/components/agent/developmentCoordinationProjection.js +102 -0
- package/dist/components/agent/developmentCoordinationProjection.js.map +1 -0
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js +3 -37
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js.map +1 -1
- package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js +2 -2
- package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js.map +1 -1
- package/dist/components/agent/subagentConversationProjection.d.ts +4 -0
- package/dist/components/agent/subagentConversationProjection.d.ts.map +1 -0
- package/dist/components/agent/subagentConversationProjection.js +76 -0
- package/dist/components/agent/subagentConversationProjection.js.map +1 -0
- package/dist/components/agent/subagentRunTree.d.ts +18 -0
- package/dist/components/agent/subagentRunTree.d.ts.map +1 -0
- package/dist/components/agent/subagentRunTree.js +43 -0
- package/dist/components/agent/subagentRunTree.js.map +1 -0
- package/dist/platformApiTypes.d.ts +25 -0
- package/dist/platformApiTypes.d.ts.map +1 -1
- package/dist/stores/agentChatStore.d.ts +6 -2
- package/dist/stores/agentChatStore.d.ts.map +1 -1
- package/dist/stores/agentChatStore.js +20 -4
- package/dist/stores/agentChatStore.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type ToolCallInfo } from '../../stores/agentChatStore.js';
|
|
2
3
|
import type { AgentApprovalRule, AgentCapabilities, AgentPermissionProfileName } from './AgentInterface.js';
|
|
3
4
|
import type { HubAgentRuntimeSelection } from '../../types/agentRuntimeProvider.js';
|
|
4
5
|
import type { ConversationEditorDiff } from '../../types/agentEditor.js';
|
|
6
|
+
import { type WorkspaceSelectionChoice } from '../../utils/workspaceSelectionContinuation.js';
|
|
5
7
|
interface AllowedApp {
|
|
6
8
|
id: string;
|
|
7
9
|
name: string;
|
|
@@ -19,6 +21,7 @@ interface AgentViewProps {
|
|
|
19
21
|
workspaceId?: string;
|
|
20
22
|
teamId?: string;
|
|
21
23
|
conversationId?: string | null;
|
|
24
|
+
onNavigateConversation?: (conversationId: string) => void;
|
|
22
25
|
isMainAssistant?: boolean;
|
|
23
26
|
agentName: string;
|
|
24
27
|
model: string;
|
|
@@ -140,6 +143,25 @@ interface AgentViewProps {
|
|
|
140
143
|
renderWorkbenchPanel?: boolean;
|
|
141
144
|
externalInputLockReason?: string;
|
|
142
145
|
}
|
|
146
|
+
interface WorkspacePlacementCardState {
|
|
147
|
+
workspacePlacementId: string;
|
|
148
|
+
existingWorkspaceName?: string;
|
|
149
|
+
suggestedWorkspaceName: string;
|
|
150
|
+
resolving: boolean;
|
|
151
|
+
onChoose: (choice: WorkspaceSelectionChoice) => void;
|
|
152
|
+
}
|
|
153
|
+
export declare function ToolCallsBlock({ calls, requestId, onAddApprovalRule, onOpenEditorPath, onOpenEditorDiff, onPeekEditorPath, onPeekEditorDiff, onChooseDirectorySelect, onExpandIntoView, workspacePlacementCard, }: {
|
|
154
|
+
calls: ToolCallInfo[];
|
|
155
|
+
requestId?: string;
|
|
156
|
+
onAddApprovalRule?: AgentViewProps['onAddApprovalRule'];
|
|
157
|
+
onOpenEditorPath?: (path: string) => void;
|
|
158
|
+
onOpenEditorDiff?: (diff: ConversationEditorDiff) => void;
|
|
159
|
+
onPeekEditorPath?: (path: string) => void;
|
|
160
|
+
onPeekEditorDiff?: (diff: ConversationEditorDiff) => void;
|
|
161
|
+
onChooseDirectorySelect?: (requestId: string | undefined, toolCall: ToolCallInfo) => void;
|
|
162
|
+
onExpandIntoView?: (trigger: HTMLElement) => void;
|
|
163
|
+
workspacePlacementCard?: WorkspacePlacementCardState;
|
|
164
|
+
}): React.JSX.Element | null;
|
|
143
165
|
export declare function AgentView(props: AgentViewProps): React.JSX.Element;
|
|
144
166
|
export {};
|
|
145
167
|
//# sourceMappingURL=AgentView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentView.d.ts","sourceRoot":"","sources":["../../../src/components/agent/AgentView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA4D,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"AgentView.d.ts","sourceRoot":"","sources":["../../../src/components/agent/AgentView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAMhF,OAAO,EAA2N,KAAK,YAAY,EAA2N,MAAM,gCAAgC,CAAA;AAWpf,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CA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AE,2BAA2B,CAAA;CACrD,4BAw3BA;AA0KD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,qBAiqL9C"}
|
|
@@ -2438,6 +2438,22 @@ function deriveTerminalToolOutput(toolCall) {
|
|
|
2438
2438
|
function TerminalOutputBlock({ output, terminalId, cwd }) {
|
|
2439
2439
|
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 }) })] }));
|
|
2440
2440
|
}
|
|
2441
|
+
function WebContextEvidenceCard({ toolCall, expanded }) {
|
|
2442
|
+
const projection = toolCall.webContext;
|
|
2443
|
+
if (!projection)
|
|
2444
|
+
return null;
|
|
2445
|
+
const evidence = projection.evidence;
|
|
2446
|
+
const visibleCitations = expanded ? evidence.citations.slice(0, 20) : [];
|
|
2447
|
+
let sourceLabel = evidence.finalUrl || evidence.sourceUrl;
|
|
2448
|
+
try {
|
|
2449
|
+
sourceLabel = new URL(sourceLabel).hostname;
|
|
2450
|
+
}
|
|
2451
|
+
catch {
|
|
2452
|
+
// The host already validated a non-empty source; preserve it verbatim when
|
|
2453
|
+
// it is not a URL rather than inventing a label.
|
|
2454
|
+
}
|
|
2455
|
+
return (_jsxs("div", { "data-web-context-evidence": evidence.evidenceId, className: "ml-3 mt-0.5 max-w-[calc(100%-12px)] overflow-hidden rounded-[3px] border border-sky-300/[0.08] bg-sky-300/[0.025]", children: [_jsxs("div", { className: "flex min-h-[24px] items-center gap-2 px-2 text-[10px]", children: [_jsx("span", { className: "uppercase tracking-[0.14em] text-sky-200/38", children: "Evidence" }), _jsx("span", { className: "min-w-0 flex-1 truncate text-white/42", title: evidence.finalUrl || evidence.sourceUrl, children: sourceLabel }), _jsxs("span", { className: "flex-shrink-0 text-white/24", children: [evidence.citations.length, " ", evidence.citations.length === 1 ? 'source' : 'sources'] }), projection.job && (_jsx("span", { className: "flex-shrink-0 uppercase tracking-[0.12em] text-white/20", children: projection.job.state }))] }), expanded && (_jsxs("div", { className: "border-t border-white/[0.04] px-2 py-1.5", children: [_jsx("div", { className: "truncate font-mono text-[9px] text-white/20", title: evidence.evidenceId, children: evidence.evidenceId }), visibleCitations.length > 0 && (_jsxs("div", { className: "mt-1 space-y-1", children: [visibleCitations.map((citation, index) => (_jsx("a", { href: citation.url, target: "_blank", rel: "noreferrer", className: "block min-w-0 truncate text-[10px] text-sky-200/45 hover:text-sky-100/70", title: citation.url, children: citation.title || citation.url }, `${citation.url}:${index}`))), evidence.citations.length > visibleCitations.length && (_jsxs("div", { className: "text-[9px] text-white/20", children: ["+", evidence.citations.length - visibleCitations.length, " more sources"] }))] }))] }))] }));
|
|
2456
|
+
}
|
|
2441
2457
|
function readToolStringParam(params, keys) {
|
|
2442
2458
|
if (!params)
|
|
2443
2459
|
return '';
|
|
@@ -2738,7 +2754,7 @@ function coerceSdkMessagesToChatMessages(messages) {
|
|
|
2738
2754
|
};
|
|
2739
2755
|
});
|
|
2740
2756
|
}
|
|
2741
|
-
function ToolCallsBlock({ calls, requestId, onAddApprovalRule, onOpenEditorPath, onOpenEditorDiff, onPeekEditorPath, onPeekEditorDiff, onChooseDirectorySelect, onExpandIntoView, workspacePlacementCard, }) {
|
|
2757
|
+
export function ToolCallsBlock({ calls, requestId, onAddApprovalRule, onOpenEditorPath, onOpenEditorDiff, onPeekEditorPath, onPeekEditorDiff, onChooseDirectorySelect, onExpandIntoView, workspacePlacementCard, }) {
|
|
2742
2758
|
const [expandedId, setExpandedId] = useState(null);
|
|
2743
2759
|
const [expandedFilePreviewId, setExpandedFilePreviewId] = useState(null);
|
|
2744
2760
|
const resolvePermission = useAgentChatStore(s => s.resolvePermission);
|
|
@@ -2851,7 +2867,7 @@ function ToolCallsBlock({ calls, requestId, onAddApprovalRule, onOpenEditorPath,
|
|
|
2851
2867
|
}
|
|
2852
2868
|
const isExpanded = expandedId === item.id;
|
|
2853
2869
|
const relatedCallIds = item.calls.map((call) => call.id);
|
|
2854
|
-
return (_jsxs("div", { children: [_jsx("div", { className: `rounded transition-colors ${isExpanded ? 'bg-[var(--xeno-tool-expanded-active)]' : 'hover:bg-[var(--xeno-tool-expanded-active)]'}`, children: _jsx("div", { className: "group/tc w-full px-1.5 py-[5px] rounded", children: _jsxs("div", { className: "flex items-start gap-1.5", children: [_jsxs("button", { type: "button", onClick: () => toggleTopLevelItem(item.id, relatedCallIds), className: "min-w-0 flex-1 inline-flex items-start gap-1.5 text-left", "aria-label": `Tool call group: ${item.label}`, children: [_jsx("span", { className: "mt-[2px] inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: _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: "File activity" }), _jsx("span", { className: "block truncate text-[12px] leading-3 text-white/50", children: item.label })] })] }), _jsxs("div", { className: "flex items-center gap-1.5 flex-shrink-0 pt-[2px]", children: [!isExpanded && item.diffStats && (item.diffStats.added > 0 || item.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: [item.diffStats.added > 0 && (_jsxs("span", { className: "text-emerald-300", children: ["+", item.diffStats.added] })), item.diffStats.removed > 0 && (_jsxs("span", { className: "text-red-300", children: ["-", item.diffStats.removed] }))] })), _jsx("button", { type: "button", onClick: () => toggleTopLevelItem(item.id, relatedCallIds), className: "flex-shrink-0", "aria-label": isExpanded ? 'Collapse tool details' : 'Expand tool details', children: _jsx(ChevronRight, { className: `w-3 h-3 text-white/15 transition-transform ${isExpanded ? 'rotate-90' : ''}` }) })] })] }) }) }), _jsx("div", {
|
|
2870
|
+
return (_jsxs("div", { children: [_jsx("div", { className: `rounded transition-colors ${isExpanded ? 'bg-[var(--xeno-tool-expanded-active)]' : 'hover:bg-[var(--xeno-tool-expanded-active)]'}`, children: _jsx("div", { className: "group/tc w-full px-1.5 py-[5px] rounded", children: _jsxs("div", { className: "flex items-start gap-1.5", children: [_jsxs("button", { type: "button", onClick: () => toggleTopLevelItem(item.id, relatedCallIds), className: "min-w-0 flex-1 inline-flex items-start gap-1.5 text-left", "aria-label": `Tool call group: ${item.label}`, children: [_jsx("span", { className: "mt-[2px] inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: _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: "File activity" }), _jsx("span", { className: "block truncate text-[12px] leading-3 text-white/50", children: item.label })] })] }), _jsxs("div", { className: "flex items-center gap-1.5 flex-shrink-0 pt-[2px]", children: [!isExpanded && item.diffStats && (item.diffStats.added > 0 || item.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: [item.diffStats.added > 0 && (_jsxs("span", { className: "text-emerald-300", children: ["+", item.diffStats.added] })), item.diffStats.removed > 0 && (_jsxs("span", { className: "text-red-300", children: ["-", item.diffStats.removed] }))] })), _jsx("button", { type: "button", onClick: () => toggleTopLevelItem(item.id, relatedCallIds), className: "flex-shrink-0", "aria-label": isExpanded ? 'Collapse tool details' : 'Expand tool details', children: _jsx(ChevronRight, { className: `w-3 h-3 text-white/15 transition-transform ${isExpanded ? 'rotate-90' : ''}` }) })] })] }) }) }), isExpanded && (_jsx("div", { children: _jsx("div", { className: "min-h-0 overflow-hidden", children: _jsx("div", { className: "mx-auto w-[calc(100%-24px)] min-w-[320px] max-w-full overflow-hidden rounded-t-[2px] rounded-b border border-t-0 border-[color:var(--xeno-tool-expanded-border)] bg-[var(--xeno-tool-expanded-bg)]", children: _jsx("div", { className: "max-h-[240px] overflow-auto [&::-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: item.calls.map((call) => (_jsx("div", { children: renderGroupedFileActionRow(call) }, call.id))) }) }) }) }))] }, item.id));
|
|
2855
2871
|
}) }));
|
|
2856
2872
|
}
|
|
2857
2873
|
return (_jsx("div", { className: "space-y-1", children: visibleCalls.map((tc, callIndex) => {
|
|
@@ -2905,22 +2921,31 @@ function ToolCallsBlock({ calls, requestId, onAddApprovalRule, onOpenEditorPath,
|
|
|
2905
2921
|
const showsInlineCommandCard = isCommandToolHeader;
|
|
2906
2922
|
const footerCwd = tc.cwd;
|
|
2907
2923
|
const hasDetailsFooter = !!durationLabel || tc.riskLevel === 'high' || !!footerCwd;
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2924
|
+
// The collapsed card is the normal state. Do not parse, stringify, or
|
|
2925
|
+
// construct large tool payloads until the user explicitly expands it.
|
|
2926
|
+
// Previously these values and their DOM were created behind a zero-row
|
|
2927
|
+
// CSS grid, which still blocked the renderer and could flash before the
|
|
2928
|
+
// collapse styles were applied.
|
|
2929
|
+
const materializeDetails = isExpanded && !hasPendingInteractiveCard;
|
|
2930
|
+
const webSearchResults = materializeDetails && isWebSearchTool && !tc.webContext ? parseWebSearchResultBlocks(tc.result || '') : [];
|
|
2931
|
+
const rawDetailRows = materializeDetails
|
|
2932
|
+
? (webSearchResults.length > 0 || !!tc.webContext
|
|
2933
|
+
? deriveToolDetailRows(tc).filter((row) => row.label !== 'Result')
|
|
2934
|
+
: deriveToolDetailRows(tc))
|
|
2935
|
+
: [];
|
|
2936
|
+
const terminalOutput = materializeDetails ? deriveTerminalToolOutput(tc) : null;
|
|
2913
2937
|
const detailRows = showsInlineDiffCard
|
|
2914
2938
|
? rawDetailRows.filter((row) => row.label !== 'Result' && row.label !== 'Write' && row.label !== 'Edit' && row.label !== 'Read' && row.label !== 'Path')
|
|
2915
2939
|
: showsInlineCommandCard
|
|
2916
2940
|
? rawDetailRows.filter((row) => row.label !== 'Command' && row.label !== 'Result')
|
|
2917
2941
|
: rawDetailRows;
|
|
2918
2942
|
const showsCollapsedFileActionRow = showsInlineDiffCard && !!fileActionLabel && !!filePath && expandedFilePreviewId !== tc.id;
|
|
2943
|
+
const hasRawParams = !!tc.params && Object.keys(tc.params).length > 0;
|
|
2944
|
+
const hasRawResult = typeof tc.result === 'string' ? tc.result.length > 0 : tc.result !== undefined && tc.result !== null;
|
|
2919
2945
|
const hasExpandableDetails = !hasPendingInteractiveCard && (showsInlineCommandCard ||
|
|
2920
2946
|
(!isRunning && (showsInlineDiffCard ||
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
webSearchResults.length > 0 ||
|
|
2947
|
+
hasRawParams ||
|
|
2948
|
+
hasRawResult ||
|
|
2924
2949
|
!!durationLabel ||
|
|
2925
2950
|
tc.riskLevel === 'high' ||
|
|
2926
2951
|
!!tc.cwd)));
|
|
@@ -2991,14 +3016,14 @@ function ToolCallsBlock({ calls, requestId, onAddApprovalRule, onOpenEditorPath,
|
|
|
2991
3016
|
setExpandedFilePreviewId(tc.id);
|
|
2992
3017
|
}
|
|
2993
3018
|
}
|
|
2994
|
-
}, className: "flex-shrink-0", "aria-label": isExpanded ? 'Collapse tool details' : 'Expand tool details', children: _jsx(ChevronRight, { className: `w-3 h-3 text-white/15 transition-transform ${isExpanded ? 'rotate-90' : ''}` }) }))] })] }) })), pr?.status === 'pending' && (_jsx(ToolApprovalCard, { toolCall: tc, permission: pr, canPersistAllowlist:
|
|
3019
|
+
}, className: "flex-shrink-0", "aria-label": isExpanded ? 'Collapse tool details' : 'Expand tool details', children: _jsx(ChevronRight, { className: `w-3 h-3 text-white/15 transition-transform ${isExpanded ? 'rotate-90' : ''}` }) }))] })] }) })), tc.webContext && !isRunning && (_jsx(WebContextEvidenceCard, { toolCall: tc, expanded: isExpanded })), pr?.status === 'pending' && (_jsx(ToolApprovalCard, { toolCall: tc, permission: pr, canPersistAllowlist:
|
|
2995
3020
|
// An ACP `execute` names no directory, and gating this on
|
|
2996
3021
|
// `directory` alone hid the persist choice for every such
|
|
2997
3022
|
// permission — which is why a user could not create a policy
|
|
2998
3023
|
// rule at all. An agent-offered "allow always" is sufficient
|
|
2999
3024
|
// on its own.
|
|
3000
3025
|
!!pr.allowAlwaysOptionId
|
|
3001
|
-
|| (!!pr.directory && (!isPseudoPermissionDirectory(pr.directory) || canBuildSurfaceApprovalRule(tc, pr))), onSkip: () => handleDenyAccess(pr), onRun: () => handleGrantAccess(pr), onAllowlist: () => handleAllowlistAccess(tc, pr), onDenyAlways: pr.rejectAlwaysOptionId ? () => handleDenyAlwaysAccess(pr) : undefined })), askUserRequest?.status === 'pending' && (_jsx(ToolAskUserCard, { requestId: requestId, askUserRequest: askUserRequest })), _jsx("div", { className:
|
|
3026
|
+
|| (!!pr.directory && (!isPseudoPermissionDirectory(pr.directory) || canBuildSurfaceApprovalRule(tc, pr))), onSkip: () => handleDenyAccess(pr), onRun: () => handleGrantAccess(pr), onAllowlist: () => handleAllowlistAccess(tc, pr), onDenyAlways: pr.rejectAlwaysOptionId ? () => handleDenyAlwaysAccess(pr) : undefined })), askUserRequest?.status === 'pending' && (_jsx(ToolAskUserCard, { requestId: requestId, askUserRequest: askUserRequest })), isExpanded && hasExpandableDetails && (_jsx("div", { className: "mt-0", children: _jsx("div", { className: `min-h-0 overflow-hidden ${showsInlineCommandCard
|
|
3002
3027
|
? '-ml-[24px] w-[calc(100%+32px)]'
|
|
3003
3028
|
: isCompactToolHeader
|
|
3004
3029
|
? '-ml-[20px] w-[calc(100%+13px)]'
|
|
@@ -3025,7 +3050,7 @@ function ToolCallsBlock({ calls, requestId, onAddApprovalRule, onOpenEditorPath,
|
|
|
3025
3050
|
event.preventDefault();
|
|
3026
3051
|
setExpandedFilePreviewId(null);
|
|
3027
3052
|
}
|
|
3028
|
-
}, className: "min-w-0 flex flex-1 items-center gap-1.5 text-left", "aria-label": `Collapse ${fileActionLabel} ${filePath}`, children: [_jsx("span", { className: "inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: _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 inline-flex items-center gap-1.5", children: [_jsx("span", { className: "flex-shrink-0 text-[10px] uppercase tracking-[0.14em] text-white/20", children: fileActionLabel }), _jsx("span", { className: "min-w-0 truncate text-[12px] leading-3 font-mono text-white/50", title: filePath, children: deriveToolCallFileName(tc) })] })] }), _jsxs("span", { className: "flex items-center gap-2 flex-shrink-0", children: [handleOpenDiff && tc.diff && (_jsx("button", { type: "button", onClick: () => handleOpenDiff(tc.diff), className: "text-[10px] text-white/35 hover:text-white/55 transition-colors", children: "Preview diff" })), tc.diff && (_jsxs(_Fragment, { children: [_jsxs("span", { className: "text-[10px] text-emerald-300", children: ["+", diffStats?.added ?? 0] }), _jsxs("span", { className: "text-[10px] text-red-300", children: ["-", diffStats?.removed ?? 0] })] })), handleOpenPath && (_jsx("button", { type: "button", onClick: () => handleOpenPath(filePath), className: "text-[10px] text-white/20 hover:text-white/40 transition-colors", children: "Open file" }))] })] }) })), _jsx(ToolInlineDiffCard, { toolCall: tc, onPeekEditorDiff: handleOpenDiff, onPeekEditorPath: handleOpenPath, embedded: true, showHeader: false, showHeaderActions: false, showHeaderStats: false })] }) }) })), !hasPendingPermission && showsInlineCommandCard && (_jsx("div", { className: `${detailRows.length > 0 || webSearchResults.length > 0 || showsInlineDiffCard ? 'border-t border-white/[0.04]' : ''}`, children: _jsx(ToolCommandDetails, { toolCall: tc }) }))] }), hasDetailsFooter && (_jsxs("div", { "data-tool-details-footer": true, className: "absolute inset-x-0 bottom-0 z-10 flex h-6 items-center gap-x-3 border-t border-white/[0.04] bg-[var(--xeno-tool-expanded-bg)] px-2.5 text-[10px] text-white/20", children: [durationLabel && _jsxs("span", { className: "flex-none", children: ["Duration ", durationLabel] }), tc.riskLevel === 'high' && _jsx("span", { className: "flex-none", children: "Risk high" }), footerCwd && _jsxs("span", { className: "min-w-0 flex-1 truncate", children: ["cwd ", footerCwd] })] }))] }) }) })] }, tc.id));
|
|
3053
|
+
}, className: "min-w-0 flex flex-1 items-center gap-1.5 text-left", "aria-label": `Collapse ${fileActionLabel} ${filePath}`, children: [_jsx("span", { className: "inline-flex h-3 w-3 flex-shrink-0 items-center justify-center", children: _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 inline-flex items-center gap-1.5", children: [_jsx("span", { className: "flex-shrink-0 text-[10px] uppercase tracking-[0.14em] text-white/20", children: fileActionLabel }), _jsx("span", { className: "min-w-0 truncate text-[12px] leading-3 font-mono text-white/50", title: filePath, children: deriveToolCallFileName(tc) })] })] }), _jsxs("span", { className: "flex items-center gap-2 flex-shrink-0", children: [handleOpenDiff && tc.diff && (_jsx("button", { type: "button", onClick: () => handleOpenDiff(tc.diff), className: "text-[10px] text-white/35 hover:text-white/55 transition-colors", children: "Preview diff" })), tc.diff && (_jsxs(_Fragment, { children: [_jsxs("span", { className: "text-[10px] text-emerald-300", children: ["+", diffStats?.added ?? 0] }), _jsxs("span", { className: "text-[10px] text-red-300", children: ["-", diffStats?.removed ?? 0] })] })), handleOpenPath && (_jsx("button", { type: "button", onClick: () => handleOpenPath(filePath), className: "text-[10px] text-white/20 hover:text-white/40 transition-colors", children: "Open file" }))] })] }) })), _jsx(ToolInlineDiffCard, { toolCall: tc, onPeekEditorDiff: handleOpenDiff, onPeekEditorPath: handleOpenPath, embedded: true, showHeader: false, showHeaderActions: false, showHeaderStats: false })] }) }) })), !hasPendingPermission && showsInlineCommandCard && (_jsx("div", { className: `${detailRows.length > 0 || webSearchResults.length > 0 || showsInlineDiffCard ? 'border-t border-white/[0.04]' : ''}`, children: _jsx(ToolCommandDetails, { toolCall: tc }) }))] }), hasDetailsFooter && (_jsxs("div", { "data-tool-details-footer": true, className: "absolute inset-x-0 bottom-0 z-10 flex h-6 items-center gap-x-3 border-t border-white/[0.04] bg-[var(--xeno-tool-expanded-bg)] px-2.5 text-[10px] text-white/20", children: [durationLabel && _jsxs("span", { className: "flex-none", children: ["Duration ", durationLabel] }), tc.riskLevel === 'high' && _jsx("span", { className: "flex-none", children: "Risk high" }), footerCwd && _jsxs("span", { className: "min-w-0 flex-1 truncate", children: ["cwd ", footerCwd] })] }))] }) }) }))] }, tc.id));
|
|
3029
3054
|
}) }));
|
|
3030
3055
|
}
|
|
3031
3056
|
function toolCallLabel(toolName, params) {
|
|
@@ -7054,7 +7079,7 @@ export function AgentView(props) {
|
|
|
7054
7079
|
terminalDraftInput,
|
|
7055
7080
|
updateConversation,
|
|
7056
7081
|
]);
|
|
7057
|
-
return (_jsxs("div", { className: "xeno-app-shell flex-1 relative min-h-0", children: [_jsx("div", { ref: messagesScrollRef, className: "agent-scrollbar absolute inset-0 overflow-auto pr-1.5", style: { scrollbarGutter: 'stable' }, children: conversationHydrating ? (_jsx(ConversationLoadingSkeleton, {})) : (_jsxs("div", { className: "w-full max-w-[820px] mx-auto px-6 pt-6 min-h-full flex flex-col gap-1.5", style: { paddingBottom: messageViewportBottomPadding }, children: [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) => {
|
|
7082
|
+
return (_jsxs("div", { className: "xeno-app-shell flex-1 relative min-h-0", children: [_jsx("div", { ref: messagesScrollRef, className: "agent-scrollbar absolute inset-0 overflow-auto pr-1.5", style: { scrollbarGutter: 'stable' }, children: conversationHydrating ? (_jsx(ConversationLoadingSkeleton, {})) : (_jsxs("div", { className: "w-full max-w-[820px] mx-auto px-6 pt-6 min-h-full flex flex-col gap-1.5", style: { paddingBottom: messageViewportBottomPadding }, 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) => {
|
|
7058
7083
|
const previousMsg = runtimeProjectedMessages[msgIdx - 1];
|
|
7059
7084
|
const parts = computeMsgParts(msg);
|
|
7060
7085
|
const addConversationTurnGap = previousMsg !== undefined && msg.role !== previousMsg.role;
|