@stigmer/react 3.0.9-dev.20260615153829 → 3.1.0
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/execution/ApprovalCard.d.ts +47 -3
- package/execution/ApprovalCard.d.ts.map +1 -1
- package/execution/ApprovalCard.js +138 -70
- package/execution/ApprovalCard.js.map +1 -1
- package/execution/ApprovalContext.d.ts +72 -0
- package/execution/ApprovalContext.d.ts.map +1 -0
- package/execution/ApprovalContext.js +41 -0
- package/execution/ApprovalContext.js.map +1 -0
- package/execution/ArtifactCard.d.ts.map +1 -1
- package/execution/ArtifactCard.js +3 -1
- package/execution/ArtifactCard.js.map +1 -1
- package/execution/ArtifactPreviewModal.d.ts.map +1 -1
- package/execution/ArtifactPreviewModal.js +5 -3
- package/execution/ArtifactPreviewModal.js.map +1 -1
- package/execution/EmptyChangeNotice.d.ts +38 -0
- package/execution/EmptyChangeNotice.d.ts.map +1 -0
- package/execution/EmptyChangeNotice.js +27 -0
- package/execution/EmptyChangeNotice.js.map +1 -0
- package/execution/FileChangesView.d.ts +81 -0
- package/execution/FileChangesView.d.ts.map +1 -0
- package/execution/FileChangesView.js +164 -0
- package/execution/FileChangesView.js.map +1 -0
- package/execution/FilePathLink.d.ts +24 -4
- package/execution/FilePathLink.d.ts.map +1 -1
- package/execution/FilePathLink.js +31 -9
- package/execution/FilePathLink.js.map +1 -1
- package/execution/FileReviewCard.d.ts +111 -0
- package/execution/FileReviewCard.d.ts.map +1 -0
- package/execution/FileReviewCard.js +558 -0
- package/execution/FileReviewCard.js.map +1 -0
- package/execution/FileReviewContext.d.ts +35 -0
- package/execution/FileReviewContext.d.ts.map +1 -0
- package/execution/FileReviewContext.js +23 -0
- package/execution/FileReviewContext.js.map +1 -0
- package/execution/FileReviewDock.d.ts +73 -0
- package/execution/FileReviewDock.d.ts.map +1 -0
- package/execution/FileReviewDock.js +65 -0
- package/execution/FileReviewDock.js.map +1 -0
- package/execution/McpToolDetail.d.ts.map +1 -1
- package/execution/McpToolDetail.js +38 -5
- package/execution/McpToolDetail.js.map +1 -1
- package/execution/MessageThread.d.ts +42 -3
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +263 -18
- package/execution/MessageThread.js.map +1 -1
- package/execution/PlanArtifactCard.d.ts.map +1 -1
- package/execution/PlanArtifactCard.js +3 -1
- package/execution/PlanArtifactCard.js.map +1 -1
- package/execution/PlanCompletionCard.d.ts +1 -1
- package/execution/PlanCompletionCard.js +1 -1
- package/execution/ResultView.d.ts +19 -1
- package/execution/ResultView.d.ts.map +1 -1
- package/execution/ResultView.js +141 -40
- package/execution/ResultView.js.map +1 -1
- package/execution/SubAgentSection.d.ts.map +1 -1
- package/execution/SubAgentSection.js +45 -6
- package/execution/SubAgentSection.js.map +1 -1
- package/execution/TerminalSession.d.ts +34 -0
- package/execution/TerminalSession.d.ts.map +1 -0
- package/execution/TerminalSession.js +34 -0
- package/execution/TerminalSession.js.map +1 -0
- package/execution/TodoCard.d.ts +53 -0
- package/execution/TodoCard.d.ts.map +1 -0
- package/execution/TodoCard.js +77 -0
- package/execution/TodoCard.js.map +1 -0
- package/execution/ToolArgsView.d.ts +7 -1
- package/execution/ToolArgsView.d.ts.map +1 -1
- package/execution/ToolArgsView.js +10 -9
- package/execution/ToolArgsView.js.map +1 -1
- package/execution/ToolCallDetail.d.ts +10 -1
- package/execution/ToolCallDetail.d.ts.map +1 -1
- package/execution/ToolCallDetail.js +66 -19
- package/execution/ToolCallDetail.js.map +1 -1
- package/execution/ToolCallGroup.d.ts +28 -18
- package/execution/ToolCallGroup.d.ts.map +1 -1
- package/execution/ToolCallGroup.js +39 -148
- package/execution/ToolCallGroup.js.map +1 -1
- package/execution/ToolCallItem.d.ts +36 -8
- package/execution/ToolCallItem.d.ts.map +1 -1
- package/execution/ToolCallItem.js +140 -21
- package/execution/ToolCallItem.js.map +1 -1
- package/execution/ToolRunGroup.d.ts +48 -0
- package/execution/ToolRunGroup.d.ts.map +1 -0
- package/execution/ToolRunGroup.js +168 -0
- package/execution/ToolRunGroup.js.map +1 -0
- package/execution/approval-provenance.d.ts +2 -0
- package/execution/approval-provenance.d.ts.map +1 -0
- package/execution/approval-provenance.js +6 -0
- package/execution/approval-provenance.js.map +1 -0
- package/execution/artifact-utils.d.ts +0 -10
- package/execution/artifact-utils.d.ts.map +1 -1
- package/execution/artifact-utils.js +0 -17
- package/execution/artifact-utils.js.map +1 -1
- package/execution/execution-phases.d.ts +1 -6
- package/execution/execution-phases.d.ts.map +1 -1
- package/execution/execution-phases.js +4 -14
- package/execution/execution-phases.js.map +1 -1
- package/execution/file-path-resolver.d.ts +28 -0
- package/execution/file-path-resolver.d.ts.map +1 -1
- package/execution/file-path-resolver.js +24 -0
- package/execution/file-path-resolver.js.map +1 -1
- package/execution/file-review-status.d.ts +127 -0
- package/execution/file-review-status.d.ts.map +1 -0
- package/execution/file-review-status.js +135 -0
- package/execution/file-review-status.js.map +1 -0
- package/execution/index.d.ts +39 -5
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +23 -3
- package/execution/index.js.map +1 -1
- package/execution/segment-tool-calls.d.ts +46 -0
- package/execution/segment-tool-calls.d.ts.map +1 -0
- package/execution/segment-tool-calls.js +71 -0
- package/execution/segment-tool-calls.js.map +1 -0
- package/execution/tool-categories.d.ts +62 -1
- package/execution/tool-categories.d.ts.map +1 -1
- package/execution/tool-categories.js +96 -2
- package/execution/tool-categories.js.map +1 -1
- package/execution/tool-presenter.d.ts +38 -2
- package/execution/tool-presenter.d.ts.map +1 -1
- package/execution/tool-presenter.js +23 -1
- package/execution/tool-presenter.js.map +1 -1
- package/execution/tool-rendering-primitives.d.ts.map +1 -1
- package/execution/tool-rendering-primitives.js +3 -2
- package/execution/tool-rendering-primitives.js.map +1 -1
- package/execution/useArtifactDownload.d.ts +44 -0
- package/execution/useArtifactDownload.d.ts.map +1 -0
- package/execution/useArtifactDownload.js +80 -0
- package/execution/useArtifactDownload.js.map +1 -0
- package/execution/useArtifactDownloadUrl.d.ts +67 -0
- package/execution/useArtifactDownloadUrl.d.ts.map +1 -0
- package/execution/useArtifactDownloadUrl.js +59 -0
- package/execution/useArtifactDownloadUrl.js.map +1 -0
- package/execution/useFileChangeContent.d.ts +61 -0
- package/execution/useFileChangeContent.d.ts.map +1 -0
- package/execution/useFileChangeContent.js +89 -0
- package/execution/useFileChangeContent.js.map +1 -0
- package/execution/useFileReview.d.ts +89 -0
- package/execution/useFileReview.d.ts.map +1 -0
- package/execution/useFileReview.js +106 -0
- package/execution/useFileReview.js.map +1 -0
- package/execution/useSubmitApproval.d.ts +17 -2
- package/execution/useSubmitApproval.d.ts.map +1 -1
- package/execution/useSubmitApproval.js +27 -23
- package/execution/useSubmitApproval.js.map +1 -1
- package/execution/useToolOutputContent.d.ts +44 -0
- package/execution/useToolOutputContent.d.ts.map +1 -0
- package/execution/useToolOutputContent.js +31 -0
- package/execution/useToolOutputContent.js.map +1 -0
- package/index.d.ts +6 -6
- package/index.d.ts.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/internal/ApprovalPeekBar.d.ts +23 -0
- package/internal/ApprovalPeekBar.d.ts.map +1 -0
- package/internal/ApprovalPeekBar.js +25 -0
- package/internal/ApprovalPeekBar.js.map +1 -0
- package/internal/BoundedContent.d.ts +49 -0
- package/internal/BoundedContent.d.ts.map +1 -0
- package/internal/BoundedContent.js +50 -0
- package/internal/BoundedContent.js.map +1 -0
- package/internal/DecisionButton.d.ts +47 -0
- package/internal/DecisionButton.d.ts.map +1 -0
- package/internal/DecisionButton.js +42 -0
- package/internal/DecisionButton.js.map +1 -0
- package/internal/InCardDecisionError.d.ts +31 -0
- package/internal/InCardDecisionError.d.ts.map +1 -0
- package/internal/InCardDecisionError.js +23 -0
- package/internal/InCardDecisionError.js.map +1 -0
- package/internal/RevealToggle.d.ts +36 -0
- package/internal/RevealToggle.d.ts.map +1 -0
- package/internal/RevealToggle.js +32 -0
- package/internal/RevealToggle.js.map +1 -0
- package/internal/VirtualizedThread.d.ts +7 -1
- package/internal/VirtualizedThread.d.ts.map +1 -1
- package/internal/VirtualizedThread.js +7 -3
- package/internal/VirtualizedThread.js.map +1 -1
- package/internal/code-highlight.d.ts +24 -0
- package/internal/code-highlight.d.ts.map +1 -0
- package/internal/code-highlight.js +115 -0
- package/internal/code-highlight.js.map +1 -0
- package/internal/markdown-components.d.ts.map +1 -1
- package/internal/markdown-components.js +13 -2
- package/internal/markdown-components.js.map +1 -1
- package/internal/useAutoDisclosure.d.ts +34 -0
- package/internal/useAutoDisclosure.d.ts.map +1 -0
- package/internal/useAutoDisclosure.js +53 -0
- package/internal/useAutoDisclosure.js.map +1 -0
- package/internal/useElapsedSince.d.ts +30 -0
- package/internal/useElapsedSince.d.ts.map +1 -0
- package/internal/useElapsedSince.js +70 -0
- package/internal/useElapsedSince.js.map +1 -0
- package/internal/useIsOverflowing.d.ts +30 -0
- package/internal/useIsOverflowing.d.ts.map +1 -0
- package/internal/useIsOverflowing.js +47 -0
- package/internal/useIsOverflowing.js.map +1 -0
- package/internal/useIsTextTruncated.d.ts +24 -0
- package/internal/useIsTextTruncated.d.ts.map +1 -0
- package/internal/useIsTextTruncated.js +41 -0
- package/internal/useIsTextTruncated.js.map +1 -0
- package/internal/useKeyedSubmission.d.ts +49 -0
- package/internal/useKeyedSubmission.d.ts.map +1 -0
- package/internal/useKeyedSubmission.js +67 -0
- package/internal/useKeyedSubmission.js.map +1 -0
- package/package.json +7 -4
- package/session/SessionViewer.d.ts +2 -2
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +10 -4
- package/session/SessionViewer.js.map +1 -1
- package/session/index.d.ts +2 -0
- package/session/index.d.ts.map +1 -1
- package/session/index.js +1 -0
- package/session/index.js.map +1 -1
- package/session/inspector/ChangesTab.d.ts +8 -5
- package/session/inspector/ChangesTab.d.ts.map +1 -1
- package/session/inspector/ChangesTab.js +11 -8
- package/session/inspector/ChangesTab.js.map +1 -1
- package/session/inspector/SessionInspector.d.ts +4 -4
- package/session/inspector/SessionInspector.d.ts.map +1 -1
- package/session/inspector/SessionInspector.js +4 -4
- package/session/inspector/SessionInspector.js.map +1 -1
- package/session/inspector/index.d.ts +0 -2
- package/session/inspector/index.d.ts.map +1 -1
- package/session/inspector/index.js +0 -1
- package/session/inspector/index.js.map +1 -1
- package/session/inspector/useSessionInspector.d.ts +8 -4
- package/session/inspector/useSessionInspector.d.ts.map +1 -1
- package/session/inspector/useSessionInspector.js +27 -20
- package/session/inspector/useSessionInspector.js.map +1 -1
- package/session/useSessionConversation.d.ts +37 -3
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +18 -2
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionFileChanges.d.ts +74 -0
- package/session/useSessionFileChanges.d.ts.map +1 -0
- package/session/useSessionFileChanges.js +178 -0
- package/session/useSessionFileChanges.js.map +1 -0
- package/src/__tests__/styles-border-layer-invariant.test.ts +105 -0
- package/src/execution/ApprovalCard.tsx +368 -230
- package/src/execution/ApprovalContext.ts +109 -0
- package/src/execution/ArtifactCard.tsx +10 -6
- package/src/execution/ArtifactPreviewModal.tsx +12 -6
- package/src/execution/EmptyChangeNotice.tsx +62 -0
- package/src/execution/FileChangesView.tsx +383 -0
- package/src/execution/FilePathLink.tsx +65 -12
- package/src/execution/FileReviewCard.tsx +1118 -0
- package/src/execution/FileReviewContext.ts +53 -0
- package/src/execution/FileReviewDock.tsx +157 -0
- package/src/execution/McpToolDetail.tsx +98 -32
- package/src/execution/MessageThread.tsx +374 -9
- package/src/execution/PlanArtifactCard.tsx +9 -6
- package/src/execution/PlanCompletionCard.tsx +1 -1
- package/src/execution/ResultView.tsx +333 -162
- package/src/execution/SubAgentSection.tsx +58 -11
- package/src/execution/TerminalSession.tsx +91 -0
- package/src/execution/TodoCard.tsx +186 -0
- package/src/execution/ToolArgsView.tsx +28 -17
- package/src/execution/ToolCallDetail.tsx +137 -26
- package/src/execution/ToolCallGroup.tsx +68 -296
- package/src/execution/ToolCallItem.tsx +265 -67
- package/src/execution/ToolRunGroup.tsx +302 -0
- package/src/execution/__tests__/ApprovalCard.test.tsx +395 -5
- package/src/execution/__tests__/ArtifactContentRenderer.test.tsx +15 -0
- package/src/execution/__tests__/ArtifactPreviewModal.test.tsx +0 -1
- package/src/execution/__tests__/EmptyChangeNotice.test.tsx +24 -0
- package/src/execution/__tests__/FileChangesView.test.tsx +296 -0
- package/src/execution/__tests__/FilePathLink.test.tsx +92 -0
- package/src/execution/__tests__/FileReviewCard.test.tsx +1044 -0
- package/src/execution/__tests__/FileReviewDock.test.tsx +134 -0
- package/src/execution/__tests__/McpToolDetail.test.tsx +79 -0
- package/src/execution/__tests__/MessageThread.test.tsx +324 -0
- package/src/execution/__tests__/PlanArtifactCard.test.tsx +37 -16
- package/src/execution/__tests__/ResultView.test.tsx +280 -2
- package/src/execution/__tests__/SubAgentSection.test.tsx +180 -0
- package/src/execution/__tests__/TerminalSession.test.tsx +72 -0
- package/src/execution/__tests__/TodoCard.test.tsx +102 -0
- package/src/execution/__tests__/ToolArgsView.test.tsx +48 -0
- package/src/execution/__tests__/ToolCallDetail.test.tsx +195 -0
- package/src/execution/__tests__/ToolCallGroup.test.tsx +132 -0
- package/src/execution/__tests__/ToolCallItem.test.tsx +521 -0
- package/src/execution/__tests__/ToolRunGroup.test.tsx +137 -0
- package/src/execution/__tests__/blanked-narration.test.tsx +149 -0
- package/src/execution/__tests__/buildThreadItems-approvals.test.ts +304 -0
- package/src/execution/__tests__/buildThreadItems-file-review.test.ts +331 -0
- package/src/execution/__tests__/file-path-resolver.test.ts +44 -0
- package/src/execution/__tests__/file-review-status.test.ts +343 -0
- package/src/execution/__tests__/message-entry.test.tsx +16 -0
- package/src/execution/__tests__/segment-tool-calls.test.ts +124 -0
- package/src/execution/__tests__/subagent-file-review-badge.test.tsx +273 -0
- package/src/execution/__tests__/thread-keys.test.ts +195 -0
- package/src/execution/__tests__/tool-presenter.test.tsx +95 -0
- package/src/execution/__tests__/useArtifactDownload.test.tsx +67 -0
- package/src/execution/__tests__/useArtifactDownloadUrl.test.tsx +51 -0
- package/src/execution/__tests__/useFileChangeContent.test.tsx +240 -0
- package/src/execution/__tests__/useFileReview.test.tsx +236 -0
- package/src/execution/__tests__/useSubmitApproval.test.tsx +165 -0
- package/src/execution/__tests__/useToolOutputContent.test.tsx +82 -0
- package/src/execution/approval-provenance.ts +8 -0
- package/src/execution/artifact-utils.ts +0 -18
- package/src/execution/execution-phases.ts +4 -16
- package/src/execution/file-path-resolver.ts +38 -0
- package/src/execution/file-review-status.ts +219 -0
- package/src/execution/index.ts +84 -4
- package/src/execution/segment-tool-calls.ts +101 -0
- package/src/execution/tool-categories.ts +128 -1
- package/src/execution/tool-presenter.ts +58 -3
- package/src/execution/tool-rendering-primitives.tsx +11 -14
- package/src/execution/useArtifactDownload.ts +109 -0
- package/src/execution/useArtifactDownloadUrl.ts +116 -0
- package/src/execution/useFileChangeContent.ts +149 -0
- package/src/execution/useFileReview.ts +197 -0
- package/src/execution/useSubmitApproval.ts +49 -27
- package/src/execution/useToolOutputContent.ts +70 -0
- package/src/index.ts +60 -1
- package/src/internal/ApprovalPeekBar.tsx +73 -0
- package/src/internal/BoundedContent.tsx +97 -0
- package/src/internal/DecisionButton.tsx +127 -0
- package/src/internal/InCardDecisionError.tsx +47 -0
- package/src/internal/RevealToggle.tsx +91 -0
- package/src/internal/VirtualizedThread.tsx +28 -2
- package/src/internal/__tests__/ApprovalPeekBar.test.tsx +34 -0
- package/src/internal/__tests__/BoundedContent.test.tsx +92 -0
- package/src/internal/__tests__/DecisionButton.test.tsx +107 -0
- package/src/internal/__tests__/RevealToggle.test.tsx +61 -0
- package/src/internal/__tests__/code-highlight.test.tsx +59 -0
- package/src/internal/__tests__/markdown-components.test.tsx +68 -2
- package/src/internal/__tests__/useAutoDisclosure.test.ts +74 -0
- package/src/internal/__tests__/useElapsedSince.test.tsx +68 -0
- package/src/internal/__tests__/useIsOverflowing.test.ts +36 -0
- package/src/internal/__tests__/useKeyedSubmission.test.tsx +126 -0
- package/src/internal/code-highlight.tsx +120 -0
- package/src/internal/markdown-components.tsx +20 -3
- package/src/internal/useAutoDisclosure.ts +58 -0
- package/src/internal/useElapsedSince.ts +72 -0
- package/src/internal/useIsOverflowing.ts +61 -0
- package/src/internal/useIsTextTruncated.ts +55 -0
- package/src/internal/useKeyedSubmission.ts +101 -0
- package/src/session/SessionViewer.tsx +21 -4
- package/src/session/__tests__/SessionViewer-fileReviewDock.test.tsx +198 -0
- package/src/session/__tests__/audienceWiring.test.tsx +4 -0
- package/src/session/__tests__/useSessionFileChanges.test.ts +303 -0
- package/src/session/index.ts +3 -0
- package/src/session/inspector/ChangesTab.tsx +20 -17
- package/src/session/inspector/SessionInspector.tsx +12 -10
- package/src/session/inspector/__tests__/ArtifactsTab.test.tsx +0 -1
- package/src/session/inspector/__tests__/ChangesTab.test.tsx +38 -0
- package/src/session/inspector/__tests__/useSessionInspector.test.ts +46 -61
- package/src/session/inspector/index.ts +0 -3
- package/src/session/inspector/useSessionInspector.ts +27 -20
- package/src/session/useSessionConversation.ts +80 -3
- package/src/session/useSessionFileChanges.ts +207 -0
- package/src/styles.css +123 -10
- package/src/version-history/DiffViewer.tsx +10 -7
- package/src/version-history/UnifiedDiffView.tsx +66 -0
- package/src/version-history/__tests__/DiffViewer.test.tsx +57 -0
- package/src/version-history/__tests__/UnifiedDiffView.test.tsx +50 -0
- package/src/version-history/__tests__/computeDiff.test.ts +35 -0
- package/src/version-history/__tests__/parseUnifiedDiff.test.ts +82 -0
- package/src/version-history/computeDiff.ts +6 -37
- package/src/version-history/diff-hunks.ts +63 -0
- package/src/version-history/index.ts +1 -0
- package/src/version-history/parseUnifiedDiff.ts +34 -0
- package/src/workflow/WorkflowExecutionApprovalCard.tsx +49 -24
- package/src/workflow/WorkflowExecutionTimeline.tsx +15 -4
- package/src/workflow/WorkflowExecutionTimelineEvent.tsx +8 -3
- package/src/workflow/WorkflowExecutionViewer.tsx +72 -28
- package/src/workflow/WorkflowFileReviewList.tsx +152 -0
- package/src/workflow/WorkflowTaskApprovalCard.tsx +37 -85
- package/src/workflow/__tests__/ExecutionInspector.test.tsx +30 -2
- package/src/workflow/__tests__/WorkflowExecutionApprovalCard.test.tsx +129 -0
- package/src/workflow/__tests__/WorkflowFileReviewList.test.tsx +129 -0
- package/src/workflow/__tests__/WorkflowTaskApprovalCard.test.tsx +43 -11
- package/src/workflow/__tests__/useWorkflowExecutionActions.test.tsx +276 -0
- package/src/workflow/execution-inspector/ExecutionInspector.tsx +42 -18
- package/src/workflow/index.ts +5 -0
- package/src/workflow/useWorkflowExecutionActions.ts +177 -29
- package/styles.css +1 -1
- package/version-history/DiffViewer.d.ts.map +1 -1
- package/version-history/DiffViewer.js +9 -3
- package/version-history/DiffViewer.js.map +1 -1
- package/version-history/UnifiedDiffView.d.ts +29 -0
- package/version-history/UnifiedDiffView.d.ts.map +1 -0
- package/version-history/UnifiedDiffView.js +36 -0
- package/version-history/UnifiedDiffView.js.map +1 -0
- package/version-history/computeDiff.d.ts +3 -1
- package/version-history/computeDiff.d.ts.map +1 -1
- package/version-history/computeDiff.js +5 -35
- package/version-history/computeDiff.js.map +1 -1
- package/version-history/diff-hunks.d.ts +21 -0
- package/version-history/diff-hunks.d.ts.map +1 -0
- package/version-history/diff-hunks.js +58 -0
- package/version-history/diff-hunks.js.map +1 -0
- package/version-history/index.d.ts +1 -0
- package/version-history/index.d.ts.map +1 -1
- package/version-history/index.js +1 -0
- package/version-history/index.js.map +1 -1
- package/version-history/parseUnifiedDiff.d.ts +22 -0
- package/version-history/parseUnifiedDiff.d.ts.map +1 -0
- package/version-history/parseUnifiedDiff.js +34 -0
- package/version-history/parseUnifiedDiff.js.map +1 -0
- package/workflow/WorkflowExecutionApprovalCard.d.ts +8 -1
- package/workflow/WorkflowExecutionApprovalCard.d.ts.map +1 -1
- package/workflow/WorkflowExecutionApprovalCard.js +17 -3
- package/workflow/WorkflowExecutionApprovalCard.js.map +1 -1
- package/workflow/WorkflowExecutionTimeline.d.ts +11 -2
- package/workflow/WorkflowExecutionTimeline.d.ts.map +1 -1
- package/workflow/WorkflowExecutionTimeline.js +2 -2
- package/workflow/WorkflowExecutionTimeline.js.map +1 -1
- package/workflow/WorkflowExecutionTimelineEvent.d.ts +4 -1
- package/workflow/WorkflowExecutionTimelineEvent.d.ts.map +1 -1
- package/workflow/WorkflowExecutionTimelineEvent.js +2 -2
- package/workflow/WorkflowExecutionTimelineEvent.js.map +1 -1
- package/workflow/WorkflowExecutionViewer.d.ts.map +1 -1
- package/workflow/WorkflowExecutionViewer.js +18 -10
- package/workflow/WorkflowExecutionViewer.js.map +1 -1
- package/workflow/WorkflowFileReviewList.d.ts +46 -0
- package/workflow/WorkflowFileReviewList.d.ts.map +1 -0
- package/workflow/WorkflowFileReviewList.js +48 -0
- package/workflow/WorkflowFileReviewList.js.map +1 -0
- package/workflow/WorkflowTaskApprovalCard.d.ts +8 -1
- package/workflow/WorkflowTaskApprovalCard.d.ts.map +1 -1
- package/workflow/WorkflowTaskApprovalCard.js +12 -19
- package/workflow/WorkflowTaskApprovalCard.js.map +1 -1
- package/workflow/execution-inspector/ExecutionInspector.d.ts +21 -4
- package/workflow/execution-inspector/ExecutionInspector.d.ts.map +1 -1
- package/workflow/execution-inspector/ExecutionInspector.js +6 -3
- package/workflow/execution-inspector/ExecutionInspector.js.map +1 -1
- package/workflow/index.d.ts +1 -0
- package/workflow/index.d.ts.map +1 -1
- package/workflow/index.js +1 -0
- package/workflow/index.js.map +1 -1
- package/workflow/useWorkflowExecutionActions.d.ts +62 -4
- package/workflow/useWorkflowExecutionActions.d.ts.map +1 -1
- package/workflow/useWorkflowExecutionActions.js +94 -18
- package/workflow/useWorkflowExecutionActions.js.map +1 -1
- package/session/inspector/PlanTab.d.ts +0 -15
- package/session/inspector/PlanTab.d.ts.map +0 -1
- package/session/inspector/PlanTab.js +0 -19
- package/session/inspector/PlanTab.js.map +0 -1
- package/src/session/inspector/PlanTab.tsx +0 -31
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { memo } from "react";
|
|
4
4
|
import type { ToolCall } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
|
|
5
5
|
import type { SubAgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/subagent_pb";
|
|
6
6
|
import {
|
|
@@ -8,12 +8,18 @@ import {
|
|
|
8
8
|
ToolCallStatus,
|
|
9
9
|
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
10
10
|
import { cn } from "@stigmer/theme";
|
|
11
|
+
import { useRenderTracer } from "../internal/dev";
|
|
12
|
+
import { useAutoDisclosure } from "../internal/useAutoDisclosure";
|
|
13
|
+
import { useIsTextTruncated } from "../internal/useIsTextTruncated";
|
|
11
14
|
import { ToolCallDetail, formatDuration } from "./ToolCallDetail";
|
|
12
15
|
import { SubAgentSection } from "./SubAgentSection";
|
|
16
|
+
import { ApprovalCardBody } from "./ApprovalCard";
|
|
17
|
+
import { useApproval } from "./ApprovalContext";
|
|
18
|
+
import { useFileReviewRowState } from "./FileReviewContext";
|
|
19
|
+
import type { FileReviewRowState } from "./file-review-status";
|
|
13
20
|
import { FilePathLink } from "./FilePathLink";
|
|
14
|
-
import { type ToolCategory } from "./tool-categories";
|
|
21
|
+
import { isFileCategory, type ToolCategory } from "./tool-categories";
|
|
15
22
|
import { useToolPresentation } from "./tool-presenter";
|
|
16
|
-
import { useSandboxNormalize } from "./SandboxContext";
|
|
17
23
|
import { useThreadSelection } from "./useThreadSelection";
|
|
18
24
|
|
|
19
25
|
/** Props for {@link ToolCallItem}. */
|
|
@@ -27,9 +33,18 @@ export interface ToolCallItemProps {
|
|
|
27
33
|
*/
|
|
28
34
|
readonly subAgentExecution?: SubAgentExecution | null;
|
|
29
35
|
/**
|
|
30
|
-
*
|
|
36
|
+
* Forces the detail panel open on first render regardless of the
|
|
37
|
+
* auto-disclosure policy. Defaults to `false`.
|
|
31
38
|
*/
|
|
32
39
|
readonly defaultExpanded?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the row renders as its own self-contained card (a thin rounded
|
|
42
|
+
* border). Defaults to `true`. Set to `false` when the row is nested inside a
|
|
43
|
+
* container that already provides the border — e.g. the folded
|
|
44
|
+
* `ToolRunGroup` chip — where the row falls back to a divider-separated
|
|
45
|
+
* row to avoid a card-in-a-card.
|
|
46
|
+
*/
|
|
47
|
+
readonly bordered?: boolean;
|
|
33
48
|
/** Additional CSS class names for the root container. */
|
|
34
49
|
readonly className?: string;
|
|
35
50
|
}
|
|
@@ -37,48 +52,123 @@ export interface ToolCallItemProps {
|
|
|
37
52
|
/**
|
|
38
53
|
* Renders a single tool call as a row in the tool call group.
|
|
39
54
|
*
|
|
40
|
-
*
|
|
55
|
+
* Three rendering modes, set by one rule — **does the body carry content the
|
|
56
|
+
* one-line row cannot?**
|
|
57
|
+
*
|
|
58
|
+
* - **Non-expandable** (completed/skipped Read): a static `<div>` row with a
|
|
59
|
+
* clickable {@link FilePathLink}. The path IS the complete information.
|
|
60
|
+
* - **Preview** (content-bearing: shell / edit / write / fetch / web-search /
|
|
61
|
+
* unknown / mcp): a plain (non-button) header above an **always-visible**
|
|
62
|
+
* {@link ToolCallDetail} body — Cursor-style "previews aren't collapsible".
|
|
63
|
+
* There is no header chevron; each content block self-bounds with its own
|
|
64
|
+
* single in-place reveal (`RevealToggle`), so a long diff or output
|
|
65
|
+
* never floods the thread. The body is suppressed only for an `empty` result
|
|
66
|
+
* (e.g. a no-output shell), which stays a clean one-line row.
|
|
67
|
+
* - **Summary / sub-agent** (read / list / search / delete / think, and
|
|
68
|
+
* sub-agent delegations): a chevron-gated `div[role=button]` header that
|
|
69
|
+
* discloses a body hidden by default — {@link ToolCallDetail}, a
|
|
70
|
+
* {@link SubAgentSection}, or, when gated, an inline {@link ApprovalCardBody}.
|
|
71
|
+
* {@link useAutoDisclosure} force-opens it while *running* or *awaiting
|
|
72
|
+
* approval*, then settles it closed; a manual click always wins thereafter.
|
|
41
73
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* - **Expandable** (all other tools): a `<button>` row that toggles a
|
|
46
|
-
* {@link ToolCallDetail} or {@link SubAgentSection} detail panel.
|
|
74
|
+
* The two disclosure axes — the card-level chevron and a block's
|
|
75
|
+
* content-overflow reveal — never govern the same body, which is what removes
|
|
76
|
+
* the old "expand, then Show more" double control.
|
|
47
77
|
*
|
|
48
78
|
* Shows category-aware labels (e.g., "Shell", "Read", "Edit") with
|
|
49
79
|
* the primary argument as a subtitle, a category-specific icon, and
|
|
50
80
|
* an inline approval decision badge when applicable.
|
|
51
81
|
*
|
|
82
|
+
* Wrapped in `React.memo` — structural sharing (DD-009/010) preserves
|
|
83
|
+
* the `ToolCall` reference when unchanged, so a settled row skips
|
|
84
|
+
* re-renders while sibling tools stream.
|
|
85
|
+
*
|
|
52
86
|
* @example
|
|
53
87
|
* ```tsx
|
|
54
88
|
* <ToolCallItem toolCall={tc} />
|
|
55
89
|
* <ToolCallItem toolCall={tc} subAgentExecution={sub} />
|
|
56
90
|
* ```
|
|
57
91
|
*/
|
|
58
|
-
export function ToolCallItem({
|
|
92
|
+
export const ToolCallItem = memo(function ToolCallItem({
|
|
59
93
|
toolCall,
|
|
60
94
|
subAgentExecution,
|
|
61
95
|
defaultExpanded = false,
|
|
96
|
+
bordered = true,
|
|
62
97
|
className,
|
|
63
98
|
}: ToolCallItemProps) {
|
|
64
|
-
|
|
99
|
+
useRenderTracer("ToolCallItem", { status: toolCall.status, id: toolCall.id });
|
|
65
100
|
|
|
66
101
|
const status = mapToolCallStatus(toolCall);
|
|
67
102
|
const StatusIcon = STATUS_ICON[status];
|
|
68
103
|
const duration = formatDuration(toolCall.startedAt, toolCall.completedAt);
|
|
69
104
|
const isSubAgent = subAgentExecution != null;
|
|
70
105
|
|
|
71
|
-
const { category, label, primaryArg, resultSummary } =
|
|
106
|
+
const { category, label, primaryArg, result, resultSummary, disclosure } =
|
|
107
|
+
useToolPresentation(toolCall);
|
|
72
108
|
const CategoryIcon = CATEGORY_ICON[category];
|
|
73
109
|
|
|
110
|
+
// An unresolved approval gating this exact call (parent or nested sub-agent),
|
|
111
|
+
// or null. Drives the inline approval panel and forces the row open.
|
|
112
|
+
const approval = useApproval(toolCall.id);
|
|
113
|
+
|
|
114
|
+
// The card-level disclosure for *summary* rows (preview rows ignore it — their
|
|
115
|
+
// body is always visible). Force-open only while the row carries live or
|
|
116
|
+
// actionable content: while it runs, or while it awaits approval; a manual
|
|
117
|
+
// toggle takes over from there. Called unconditionally to honour the rules of
|
|
118
|
+
// hooks even though preview rows do not read `expanded`.
|
|
119
|
+
const autoOpen =
|
|
120
|
+
toolCall.status === ToolCallStatus.TOOL_CALL_RUNNING || approval != null;
|
|
121
|
+
const [expanded, handleToggle] = useAutoDisclosure(autoOpen, {
|
|
122
|
+
initialOpen: defaultExpanded || autoOpen,
|
|
123
|
+
});
|
|
124
|
+
|
|
74
125
|
const displayLabel = isSubAgent
|
|
75
126
|
? subAgentExecution.subject || subAgentExecution.name || label
|
|
76
127
|
: label;
|
|
77
128
|
|
|
78
|
-
const normalize = useSandboxNormalize();
|
|
79
129
|
const approvalBadge = getApprovalBadge(toolCall);
|
|
130
|
+
|
|
131
|
+
// A flowed file edit stamped with its change set id badges the set's live
|
|
132
|
+
// review state (pending review / kept / discarded) right on the row — the
|
|
133
|
+
// observational record stays in place while the decision surface is the
|
|
134
|
+
// set's own bar. Null for unstamped rows and honest-degradation cases.
|
|
135
|
+
const reviewState = useFileReviewRowState(toolCall.fileChangeSetId, primaryArg);
|
|
136
|
+
const reviewBadge = reviewState ? REVIEW_BADGE[reviewState] : null;
|
|
137
|
+
|
|
80
138
|
const selection = useThreadSelection("tool-call", toolCall.id);
|
|
81
139
|
|
|
140
|
+
// Search/list show their query/path as the header subtitle (truncated). Track
|
|
141
|
+
// whether it actually clips so the expanded detail can restate the full,
|
|
142
|
+
// wrapping value only when needed — avoiding a redundant repeat of a short
|
|
143
|
+
// value the header already shows in full. Gated to these two categories so
|
|
144
|
+
// only the rows that consume the signal pay for the measurement.
|
|
145
|
+
const measuresSubtitle = category === "search" || category === "list";
|
|
146
|
+
const { ref: subtitleRef, isTruncated: primaryArgTruncated } =
|
|
147
|
+
useIsTextTruncated<HTMLSpanElement>(measuresSubtitle);
|
|
148
|
+
|
|
149
|
+
// Cursor-style chrome: each tool call is its own self-contained card — a thin
|
|
150
|
+
// rounded neutral border. A pending gate carries a restrained left accent on
|
|
151
|
+
// the card itself (warning, or destructive for a delete); that accent is the
|
|
152
|
+
// only "awaiting you" cue now that the amber fill is gone. Nested inside a
|
|
153
|
+
// folded run chip the card degrades to a divider-separated row (via
|
|
154
|
+
// `bordered={false}`) so we never draw a card inside a card.
|
|
155
|
+
const cardClass = bordered
|
|
156
|
+
? cn(
|
|
157
|
+
// border-prominent (not border): a transparent card needs a line the eye
|
|
158
|
+
// actually catches — the default border token is white at 14% opacity,
|
|
159
|
+
// which vanishes on the dark thread surface.
|
|
160
|
+
"rounded-lg border border-border-prominent overflow-hidden",
|
|
161
|
+
approval != null &&
|
|
162
|
+
(category === "delete"
|
|
163
|
+
? "border-l-2 border-l-destructive"
|
|
164
|
+
: "border-l-2 border-l-warning"),
|
|
165
|
+
selection?.isSelected && "ring-1 ring-primary/40",
|
|
166
|
+
)
|
|
167
|
+
: cn(
|
|
168
|
+
"border-b border-border-muted last:border-b-0",
|
|
169
|
+
selection?.isSelected && "ring-1 ring-primary/40 rounded-sm",
|
|
170
|
+
);
|
|
171
|
+
|
|
82
172
|
// Completed/skipped Read items are non-expandable — the clickable
|
|
83
173
|
// path in the row is the complete information. Failed reads remain
|
|
84
174
|
// expandable to show the error.
|
|
@@ -101,6 +191,18 @@ export function ToolCallItem({
|
|
|
101
191
|
</span>
|
|
102
192
|
)}
|
|
103
193
|
|
|
194
|
+
{reviewBadge && (
|
|
195
|
+
<span
|
|
196
|
+
className={cn(
|
|
197
|
+
"shrink-0 rounded px-1 py-0.5 text-[10px] font-medium leading-none",
|
|
198
|
+
reviewBadge.colorClass,
|
|
199
|
+
)}
|
|
200
|
+
data-cursor-target="file-review-row-badge"
|
|
201
|
+
>
|
|
202
|
+
{reviewBadge.label}
|
|
203
|
+
</span>
|
|
204
|
+
)}
|
|
205
|
+
|
|
104
206
|
{toolCall.mcpServerSlug && (
|
|
105
207
|
<span className="shrink-0 rounded bg-muted px-1 py-0.5 font-mono text-muted-foreground">
|
|
106
208
|
{toolCall.mcpServerSlug}
|
|
@@ -142,11 +244,10 @@ export function ToolCallItem({
|
|
|
142
244
|
|
|
143
245
|
if (isNonExpandableRead) {
|
|
144
246
|
return (
|
|
145
|
-
<div
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
)}>
|
|
247
|
+
<div
|
|
248
|
+
data-cursor-target="tool-call-row"
|
|
249
|
+
className={cn(cardClass, className)}
|
|
250
|
+
>
|
|
150
251
|
<div
|
|
151
252
|
className="flex w-full items-center gap-2 px-2.5 py-1.5 text-xs"
|
|
152
253
|
>
|
|
@@ -169,65 +270,145 @@ export function ToolCallItem({
|
|
|
169
270
|
);
|
|
170
271
|
}
|
|
171
272
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
273
|
+
// Shell shows neither a command subtitle nor an exit summary in the header —
|
|
274
|
+
// both live in the terminal session body below, so the header stays minimal
|
|
275
|
+
// (icon + label + status + duration).
|
|
276
|
+
const displaySubtitle =
|
|
277
|
+
isSubAgent || category === "shell" ? null : primaryArg;
|
|
278
|
+
|
|
279
|
+
// For file tools the subtitle is a path: render it filename-first through
|
|
280
|
+
// FilePathLink (full path on hover) rather than the raw, often-absolute string
|
|
281
|
+
// that buried the file name behind a long prefix.
|
|
282
|
+
const subtitleIsFilePath =
|
|
283
|
+
!isSubAgent && primaryArg != null && isFileCategory(category);
|
|
284
|
+
|
|
285
|
+
// Preview categories (shell, edit, write, fetch, web-search, unknown, mcp)
|
|
286
|
+
// render their body ALWAYS — Cursor-style "previews aren't collapsible" — so
|
|
287
|
+
// no header chevron competes with the body's own in-place reveal. Summary
|
|
288
|
+
// categories and sub-agents keep the chevron: their body is genuinely hidden
|
|
289
|
+
// by default, so the chevron has a real job. The two disclosure axes
|
|
290
|
+
// (card-level chevron vs. content-overflow reveal) never govern one body.
|
|
291
|
+
const isPreviewCategory = !isSubAgent && disclosure === "preview";
|
|
292
|
+
|
|
293
|
+
// The disclosed body, shared by both layouts: a pending gate decides inline,
|
|
294
|
+
// a sub-agent shows its delegation, otherwise the category detail.
|
|
295
|
+
const body = isSubAgent ? (
|
|
296
|
+
<SubAgentSection subAgentExecution={subAgentExecution} collapsible={false} />
|
|
297
|
+
) : approval ? (
|
|
298
|
+
// The row above is this approval's header, so render only the body (preview
|
|
299
|
+
// + actions). The enclosing card already carries the border + warning/
|
|
300
|
+
// destructive accent for a pending gate, so the body renders borderless.
|
|
301
|
+
<ApprovalCardBody
|
|
302
|
+
pendingApproval={approval.pendingApproval}
|
|
303
|
+
onSubmit={approval.onSubmit}
|
|
304
|
+
isSubmitting={approval.isSubmitting}
|
|
305
|
+
error={approval.error}
|
|
306
|
+
/>
|
|
307
|
+
) : (
|
|
308
|
+
<ToolCallDetail
|
|
309
|
+
toolCall={toolCall}
|
|
310
|
+
primaryArgTruncated={primaryArgTruncated}
|
|
311
|
+
/>
|
|
312
|
+
);
|
|
177
313
|
|
|
314
|
+
// The header's metadata, identical in both layouts (the chevron is appended
|
|
315
|
+
// only by the summary layout below).
|
|
316
|
+
const headerInner = (
|
|
317
|
+
<>
|
|
318
|
+
<span className="shrink-0 text-muted-foreground" aria-hidden="true">
|
|
319
|
+
<CategoryIcon />
|
|
320
|
+
</span>
|
|
321
|
+
|
|
322
|
+
<span className="min-w-0 flex-1 flex items-baseline gap-1.5 overflow-hidden">
|
|
323
|
+
<span className="shrink-0 font-medium text-foreground">
|
|
324
|
+
{displayLabel}
|
|
325
|
+
</span>
|
|
326
|
+
{subtitleIsFilePath && primaryArg ? (
|
|
327
|
+
<FilePathLink
|
|
328
|
+
path={primaryArg}
|
|
329
|
+
className="min-w-0 text-xs text-muted-foreground"
|
|
330
|
+
/>
|
|
331
|
+
) : (
|
|
332
|
+
displaySubtitle && (
|
|
333
|
+
<span
|
|
334
|
+
ref={measuresSubtitle ? subtitleRef : undefined}
|
|
335
|
+
title={displaySubtitle}
|
|
336
|
+
className="min-w-0 truncate text-muted-foreground font-mono"
|
|
337
|
+
>
|
|
338
|
+
{displaySubtitle}
|
|
339
|
+
</span>
|
|
340
|
+
)
|
|
341
|
+
)}
|
|
342
|
+
{!isSubAgent && category !== "shell" && resultSummary && (
|
|
343
|
+
<span className="shrink-0 tabular-nums text-muted-foreground">
|
|
344
|
+
{resultSummary}
|
|
345
|
+
</span>
|
|
346
|
+
)}
|
|
347
|
+
</span>
|
|
348
|
+
|
|
349
|
+
{trailingContent}
|
|
350
|
+
</>
|
|
351
|
+
);
|
|
352
|
+
|
|
353
|
+
// Preview layout: a plain (non-button) header above an always-visible body.
|
|
354
|
+
// The body renders only when it has something to show — a pending gate, or a
|
|
355
|
+
// non-empty result — so a no-output shell (which normalizes to an `empty`
|
|
356
|
+
// result) stays a clean one-line row, never an empty padded box.
|
|
357
|
+
if (isPreviewCategory) {
|
|
358
|
+
const showBody = approval != null || result.type !== "empty";
|
|
359
|
+
return (
|
|
360
|
+
<div
|
|
361
|
+
data-cursor-target="tool-call-row"
|
|
362
|
+
className={cn(cardClass, className)}
|
|
363
|
+
>
|
|
364
|
+
<div className="flex w-full items-center gap-2 px-2.5 py-1.5 text-xs">
|
|
365
|
+
{headerInner}
|
|
366
|
+
</div>
|
|
367
|
+
{showBody && (
|
|
368
|
+
<div className="px-2.5 pb-2.5 pt-1" data-cursor-target="tool-preview">
|
|
369
|
+
{body}
|
|
370
|
+
</div>
|
|
371
|
+
)}
|
|
372
|
+
</div>
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// Summary / sub-agent layout: a chevron-gated header disclosing a body hidden
|
|
377
|
+
// by default. The header is a div[role=button], not a <button>, because it
|
|
378
|
+
// carries the nested "Inspect tool call" <button> (a <button> may not contain
|
|
379
|
+
// another); Enter/Space drive the toggle for keyboard parity.
|
|
178
380
|
return (
|
|
179
|
-
<div
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
381
|
+
<div
|
|
382
|
+
data-cursor-target="tool-call-row"
|
|
383
|
+
className={cn(cardClass, className)}
|
|
384
|
+
>
|
|
385
|
+
<div
|
|
386
|
+
role="button"
|
|
387
|
+
tabIndex={0}
|
|
186
388
|
aria-expanded={expanded}
|
|
187
|
-
onClick={
|
|
389
|
+
onClick={handleToggle}
|
|
390
|
+
onKeyDown={(e) => {
|
|
391
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
392
|
+
e.preventDefault();
|
|
393
|
+
handleToggle();
|
|
394
|
+
}
|
|
395
|
+
}}
|
|
188
396
|
className={cn(
|
|
189
|
-
"flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-xs transition-colors",
|
|
397
|
+
"flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-xs transition-colors",
|
|
190
398
|
"hover:bg-muted-subtle",
|
|
399
|
+
// ring-inset so the card's overflow-hidden does not clip the focus ring.
|
|
400
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
191
401
|
expanded && "bg-muted-faint",
|
|
192
402
|
)}
|
|
193
403
|
>
|
|
194
|
-
|
|
195
|
-
<CategoryIcon />
|
|
196
|
-
</span>
|
|
197
|
-
|
|
198
|
-
<span className="min-w-0 flex-1 flex items-baseline gap-1.5 overflow-hidden">
|
|
199
|
-
<span className="shrink-0 font-medium text-foreground">
|
|
200
|
-
{displayLabel}
|
|
201
|
-
</span>
|
|
202
|
-
{displaySubtitle && (
|
|
203
|
-
<span className="min-w-0 truncate text-muted-foreground font-mono">
|
|
204
|
-
{displaySubtitle}
|
|
205
|
-
</span>
|
|
206
|
-
)}
|
|
207
|
-
{!isSubAgent && resultSummary && (
|
|
208
|
-
<span className="shrink-0 tabular-nums text-muted-foreground">
|
|
209
|
-
{resultSummary}
|
|
210
|
-
</span>
|
|
211
|
-
)}
|
|
212
|
-
</span>
|
|
213
|
-
|
|
214
|
-
{trailingContent}
|
|
215
|
-
|
|
404
|
+
{headerInner}
|
|
216
405
|
<ChevronIcon expanded={expanded} />
|
|
217
|
-
</
|
|
218
|
-
|
|
219
|
-
{expanded &&
|
|
220
|
-
<div className="px-2.5 pb-2.5 pt-1">
|
|
221
|
-
{isSubAgent ? (
|
|
222
|
-
<SubAgentSection subAgentExecution={subAgentExecution} collapsible={false} />
|
|
223
|
-
) : (
|
|
224
|
-
<ToolCallDetail toolCall={toolCall} />
|
|
225
|
-
)}
|
|
226
|
-
</div>
|
|
227
|
-
)}
|
|
406
|
+
</div>
|
|
407
|
+
|
|
408
|
+
{expanded && <div className="px-2.5 pb-2.5 pt-1">{body}</div>}
|
|
228
409
|
</div>
|
|
229
410
|
);
|
|
230
|
-
}
|
|
411
|
+
});
|
|
231
412
|
|
|
232
413
|
// ---------------------------------------------------------------------------
|
|
233
414
|
// Approval badge
|
|
@@ -252,6 +433,23 @@ function getApprovalBadge(toolCall: ToolCall): ApprovalBadgeInfo | null {
|
|
|
252
433
|
}
|
|
253
434
|
}
|
|
254
435
|
|
|
436
|
+
// ---------------------------------------------------------------------------
|
|
437
|
+
// File-review badge — a stamped edit row's live review state
|
|
438
|
+
// ---------------------------------------------------------------------------
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* The badge pill for each {@link FileReviewRowState}, in the approval badge's
|
|
442
|
+
* visual vocabulary. "Kept"/"Discarded" match the decision surface's verdict
|
|
443
|
+
* copy (see FileReviewCard's VerdictBadge) so the row and the bar always speak
|
|
444
|
+
* the same language.
|
|
445
|
+
*/
|
|
446
|
+
const REVIEW_BADGE: Record<FileReviewRowState, ApprovalBadgeInfo> = {
|
|
447
|
+
pending: { label: "Pending review", colorClass: "bg-warning/15 text-warning" },
|
|
448
|
+
kept: { label: "Kept", colorClass: "bg-success/15 text-success" },
|
|
449
|
+
discarded: { label: "Discarded", colorClass: "bg-destructive/15 text-destructive" },
|
|
450
|
+
failed: { label: "Review failed", colorClass: "bg-destructive/15 text-destructive" },
|
|
451
|
+
};
|
|
452
|
+
|
|
255
453
|
// ---------------------------------------------------------------------------
|
|
256
454
|
// Status mapping
|
|
257
455
|
// ---------------------------------------------------------------------------
|