@stigmer/react 3.0.9-dev.20260616060535 → 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/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 +4 -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__/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__/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__/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/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 +35 -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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { TodoItem } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/todo_pb";
|
|
2
|
+
/** Props for {@link TodoCard}. */
|
|
3
|
+
export interface TodoCardProps {
|
|
4
|
+
/**
|
|
5
|
+
* The agent's todo map for one execution — the proto map shape
|
|
6
|
+
* (`execution.status.todos`) passed through by reference so a settled
|
|
7
|
+
* card skips re-renders while siblings stream (DD-009/010).
|
|
8
|
+
*/
|
|
9
|
+
readonly todos: {
|
|
10
|
+
readonly [key: string]: TodoItem;
|
|
11
|
+
};
|
|
12
|
+
/** Additional CSS class names for the root container. */
|
|
13
|
+
readonly className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The agent's plan, rendered inline in the message thread as a collapsible
|
|
17
|
+
* card — the Cursor-style "what I'm going to do, and how far I've got"
|
|
18
|
+
* surface. It is the in-thread home of the todo list that previously lived
|
|
19
|
+
* in the right-side Plan tab.
|
|
20
|
+
*
|
|
21
|
+
* The card chrome matches the rest of the thread's tool cards (a single
|
|
22
|
+
* neutral {@link https://tailwindcss.com `border-border-prominent`} line) and
|
|
23
|
+
* wraps the chrome-less {@link TodoList} primitive — the same list the
|
|
24
|
+
* sub-agent section renders bare, so there is exactly one todo renderer and no
|
|
25
|
+
* card-in-a-card.
|
|
26
|
+
*
|
|
27
|
+
* Disclosure follows the thread's {@link useAutoDisclosure} convention: open
|
|
28
|
+
* while the plan is active (any item in progress), settling closed once the
|
|
29
|
+
* plan is fully resolved, with a user's manual toggle always winning. This
|
|
30
|
+
* keeps an in-flight plan visible and a finished one tidy, mirroring
|
|
31
|
+
* `ToolRunGroup`/{@link SubAgentSection}.
|
|
32
|
+
*
|
|
33
|
+
* `React.memo`'d on the by-reference `todos` map: structural sharing
|
|
34
|
+
* (`shareTodos`) keeps the reference stable across stream frames, so the card
|
|
35
|
+
* re-renders only when the plan actually changes — never per frame.
|
|
36
|
+
*
|
|
37
|
+
* All visual properties flow through `--stgm-*` tokens.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <TodoCard todos={execution.status?.todos ?? {}} />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const TodoCard: import("react").NamedExoticComponent<TodoCardProps>;
|
|
45
|
+
/**
|
|
46
|
+
* Shallow comparator for {@link TodoCardProps}. The `todos` map is kept
|
|
47
|
+
* referentially stable by `shareTodos`, so an identity check is exactly the
|
|
48
|
+
* right (and cheapest) "did the plan change?" test.
|
|
49
|
+
*
|
|
50
|
+
* @internal Exported for testing — not part of the public API.
|
|
51
|
+
*/
|
|
52
|
+
export declare function todoCardPropsEqual(prev: Readonly<TodoCardProps>, next: Readonly<TodoCardProps>): boolean;
|
|
53
|
+
//# sourceMappingURL=TodoCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoCard.d.ts","sourceRoot":"","sources":["../../src/execution/TodoCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8DAA8D,CAAC;AAO7F,kCAAkC;AAClC,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,CAAC;IACrD,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,QAAQ,qDA6EC,CAAC;AAEvB;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,EAC7B,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,GAC5B,OAAO,CAET"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { memo, useMemo } from "react";
|
|
4
|
+
import { TodoStatus } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
5
|
+
import { cn } from "@stigmer/theme";
|
|
6
|
+
import { useRenderTracer } from "../internal/dev";
|
|
7
|
+
import { useAutoDisclosure } from "../internal/useAutoDisclosure";
|
|
8
|
+
import { TodoList, findActiveTodo, todoCompletionSummary } from "./TodoList";
|
|
9
|
+
/**
|
|
10
|
+
* The agent's plan, rendered inline in the message thread as a collapsible
|
|
11
|
+
* card — the Cursor-style "what I'm going to do, and how far I've got"
|
|
12
|
+
* surface. It is the in-thread home of the todo list that previously lived
|
|
13
|
+
* in the right-side Plan tab.
|
|
14
|
+
*
|
|
15
|
+
* The card chrome matches the rest of the thread's tool cards (a single
|
|
16
|
+
* neutral {@link https://tailwindcss.com `border-border-prominent`} line) and
|
|
17
|
+
* wraps the chrome-less {@link TodoList} primitive — the same list the
|
|
18
|
+
* sub-agent section renders bare, so there is exactly one todo renderer and no
|
|
19
|
+
* card-in-a-card.
|
|
20
|
+
*
|
|
21
|
+
* Disclosure follows the thread's {@link useAutoDisclosure} convention: open
|
|
22
|
+
* while the plan is active (any item in progress), settling closed once the
|
|
23
|
+
* plan is fully resolved, with a user's manual toggle always winning. This
|
|
24
|
+
* keeps an in-flight plan visible and a finished one tidy, mirroring
|
|
25
|
+
* `ToolRunGroup`/{@link SubAgentSection}.
|
|
26
|
+
*
|
|
27
|
+
* `React.memo`'d on the by-reference `todos` map: structural sharing
|
|
28
|
+
* (`shareTodos`) keeps the reference stable across stream frames, so the card
|
|
29
|
+
* re-renders only when the plan actually changes — never per frame.
|
|
30
|
+
*
|
|
31
|
+
* All visual properties flow through `--stgm-*` tokens.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <TodoCard todos={execution.status?.todos ?? {}} />
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export const TodoCard = memo(function TodoCard({ todos, className, }) {
|
|
39
|
+
useRenderTracer("TodoCard", { todos });
|
|
40
|
+
const count = Object.keys(todos).length;
|
|
41
|
+
const isActive = findActiveTodo(todos) != null;
|
|
42
|
+
const summary = todoCompletionSummary(todos);
|
|
43
|
+
const allDone = useMemo(() => count > 0 &&
|
|
44
|
+
Object.values(todos).every((t) => t.status === TodoStatus.TODO_COMPLETED ||
|
|
45
|
+
t.status === TodoStatus.TODO_CANCELLED), [todos, count]);
|
|
46
|
+
// Open while the plan is being worked, tidy once it is fully resolved; a
|
|
47
|
+
// manual toggle wins for the card's lifetime. A completed plan in session
|
|
48
|
+
// history therefore renders collapsed.
|
|
49
|
+
const [expanded, handleToggle] = useAutoDisclosure(isActive);
|
|
50
|
+
// buildThreadItems only emits this item when todos exist, but guard anyway
|
|
51
|
+
// so the component is safe to use standalone.
|
|
52
|
+
if (count === 0)
|
|
53
|
+
return null;
|
|
54
|
+
return (_jsxs("div", { role: "region", "aria-label": "Agent to-dos", "data-cursor-target": "todo-card", className: cn("rounded-lg border border-border-prominent overflow-hidden", className), children: [_jsxs("button", { type: "button", "aria-expanded": expanded, onClick: handleToggle, className: cn("flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-xs text-muted-foreground transition-colors", "hover:bg-muted-subtle",
|
|
55
|
+
// ring-inset so the card's overflow-hidden does not clip the focus ring.
|
|
56
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"), children: [_jsx("span", { className: cn("shrink-0", allDone ? "text-success" : "text-muted-foreground"), "aria-hidden": "true", children: _jsx(PlanIcon, {}) }), _jsx("span", { className: "min-w-0 flex-1 truncate font-medium text-foreground", children: "To-dos" }), summary && (_jsx("span", { className: "shrink-0 tabular-nums text-muted-foreground", children: summary })), _jsx(ChevronIcon, { expanded: expanded })] }), expanded && (_jsx("div", { className: "border-t border-border-muted px-2.5 py-2", children: _jsx(TodoList, { todos: todos }) }))] }));
|
|
57
|
+
}, todoCardPropsEqual);
|
|
58
|
+
/**
|
|
59
|
+
* Shallow comparator for {@link TodoCardProps}. The `todos` map is kept
|
|
60
|
+
* referentially stable by `shareTodos`, so an identity check is exactly the
|
|
61
|
+
* right (and cheapest) "did the plan change?" test.
|
|
62
|
+
*
|
|
63
|
+
* @internal Exported for testing — not part of the public API.
|
|
64
|
+
*/
|
|
65
|
+
export function todoCardPropsEqual(prev, next) {
|
|
66
|
+
return prev.todos === next.todos && prev.className === next.className;
|
|
67
|
+
}
|
|
68
|
+
// ---------------------------------------------------------------------------
|
|
69
|
+
// Inline SVG icons — kept inline for SDK independence (codebase pattern)
|
|
70
|
+
// ---------------------------------------------------------------------------
|
|
71
|
+
function PlanIcon() {
|
|
72
|
+
return (_jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "M2 3h8M2 6h6M2 9h7" }) }));
|
|
73
|
+
}
|
|
74
|
+
function ChevronIcon({ expanded }) {
|
|
75
|
+
return (_jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", className: cn("shrink-0 text-muted-foreground transition-transform duration-150", expanded && "rotate-90"), "aria-hidden": "true", children: _jsx("path", { d: "M3.5 2L6.5 5L3.5 8" }) }));
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=TodoCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoCard.js","sourceRoot":"","sources":["../../src/execution/TodoCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAc7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,QAAQ,CAAC,EAC7C,KAAK,EACL,SAAS,GACK;IACd,eAAe,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;I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
readonly args: Record<string, unknown> | null;
|
|
13
13
|
/** MCP server slug for MCP tool classification and metadata. */
|
|
14
14
|
readonly mcpServerSlug?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the file-tool view renders the path row. Defaults to `true`. Set to
|
|
17
|
+
* `false` where an ancestor already names the file (the approval gate header),
|
|
18
|
+
* so the write/edit content shows without restating the path.
|
|
19
|
+
*/
|
|
20
|
+
readonly showFileName?: boolean;
|
|
15
21
|
/** Additional CSS class names for the root container. */
|
|
16
22
|
readonly className?: string;
|
|
17
23
|
}
|
|
@@ -39,5 +45,5 @@ export interface ToolArgsViewProps {
|
|
|
39
45
|
* <ToolArgsView toolName={tc.name} args={tc.args} mcpServerSlug={tc.mcpServerSlug} />
|
|
40
46
|
* ```
|
|
41
47
|
*/
|
|
42
|
-
export declare function ToolArgsView({ toolName, args, mcpServerSlug, className, }: ToolArgsViewProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare function ToolArgsView({ toolName, args, mcpServerSlug, showFileName, className, }: ToolArgsViewProps): import("react/jsx-runtime").JSX.Element;
|
|
43
49
|
//# sourceMappingURL=ToolArgsView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolArgsView.d.ts","sourceRoot":"","sources":["../../src/execution/ToolArgsView.tsx"],"names":[],"mappings":"AAsBA,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC9C,gEAAgE;IAChE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,IAAI,EACJ,aAAa,EACb,SAAS,GACV,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ToolArgsView.d.ts","sourceRoot":"","sources":["../../src/execution/ToolArgsView.tsx"],"names":[],"mappings":"AAsBA,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC9C,gEAAgE;IAChE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,IAAI,EACJ,aAAa,EACb,YAAmB,EACnB,SAAS,GACV,EAAE,iBAAiB,2CAuBnB"}
|
|
@@ -5,7 +5,7 @@ import { cn } from "@stigmer/theme";
|
|
|
5
5
|
import { resolveToolCategory, } from "./tool-categories";
|
|
6
6
|
import { FilePathLink } from "./FilePathLink";
|
|
7
7
|
import { McpArgsView, McpMetadataRow } from "./McpToolDetail";
|
|
8
|
-
import {
|
|
8
|
+
import { TerminalSession } from "./TerminalSession";
|
|
9
9
|
import { CollapsibleCode, FilePathIcon, formatJson, } from "./tool-rendering-primitives";
|
|
10
10
|
/**
|
|
11
11
|
* Unified tool-arguments renderer used by both {@link ApprovalCard}
|
|
@@ -31,15 +31,15 @@ import { CollapsibleCode, FilePathIcon, formatJson, } from "./tool-rendering-pri
|
|
|
31
31
|
* <ToolArgsView toolName={tc.name} args={tc.args} mcpServerSlug={tc.mcpServerSlug} />
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
export function ToolArgsView({ toolName, args, mcpServerSlug, className, }) {
|
|
34
|
+
export function ToolArgsView({ toolName, args, mcpServerSlug, showFileName = true, className, }) {
|
|
35
35
|
const categoryInfo = useMemo(() => resolveToolCategory(toolName, mcpServerSlug), [toolName, mcpServerSlug]);
|
|
36
36
|
const primaryArg = useMemo(() => extractPrimaryArgValue(args, categoryInfo), [args, categoryInfo]);
|
|
37
|
-
return (_jsx("div", { className: cn("text-xs", className), children: _jsx(CategoryArgsDispatch, { category: categoryInfo.category, toolName: toolName, args: args, primaryArg: primaryArg, mcpServerSlug: mcpServerSlug }) }));
|
|
37
|
+
return (_jsx("div", { className: cn("text-xs", className), children: _jsx(CategoryArgsDispatch, { category: categoryInfo.category, toolName: toolName, args: args, primaryArg: primaryArg, mcpServerSlug: mcpServerSlug, showFileName: showFileName }) }));
|
|
38
38
|
}
|
|
39
39
|
// ---------------------------------------------------------------------------
|
|
40
40
|
// Dispatch
|
|
41
41
|
// ---------------------------------------------------------------------------
|
|
42
|
-
function CategoryArgsDispatch({ category, toolName, args, primaryArg, mcpServerSlug, }) {
|
|
42
|
+
function CategoryArgsDispatch({ category, toolName, args, primaryArg, mcpServerSlug, showFileName, }) {
|
|
43
43
|
switch (category) {
|
|
44
44
|
case "shell":
|
|
45
45
|
return primaryArg ? _jsx(ShellArgsView, { command: primaryArg }) : null;
|
|
@@ -47,7 +47,7 @@ function CategoryArgsDispatch({ category, toolName, args, primaryArg, mcpServerS
|
|
|
47
47
|
case "write":
|
|
48
48
|
case "edit":
|
|
49
49
|
case "delete":
|
|
50
|
-
return primaryArg ? (_jsx(FileArgsView, { path: primaryArg, category: category, args: args })) : null;
|
|
50
|
+
return primaryArg ? (_jsx(FileArgsView, { path: primaryArg, category: category, args: args, showFileName: showFileName })) : null;
|
|
51
51
|
case "search":
|
|
52
52
|
case "list":
|
|
53
53
|
return primaryArg ? _jsx(SearchArgsView, { pattern: primaryArg }) : null;
|
|
@@ -60,11 +60,12 @@ function CategoryArgsDispatch({ category, toolName, args, primaryArg, mcpServerS
|
|
|
60
60
|
// ---------------------------------------------------------------------------
|
|
61
61
|
// Category-specific views
|
|
62
62
|
// ---------------------------------------------------------------------------
|
|
63
|
+
// Pre-execution (approval gate) shell view: the command only, in the same
|
|
64
|
+
// terminal chrome the completed call uses — there is no output yet.
|
|
63
65
|
function ShellArgsView({ command }) {
|
|
64
|
-
|
|
65
|
-
return (_jsx("div", { className: "rounded-md border border-border bg-[var(--stgm-terminal-bg,#1a1a2e)] p-2.5", children: _jsxs("pre", { className: "whitespace-pre-wrap break-words font-mono text-xs text-[var(--stgm-terminal-fg,#e0e0e0)]", children: [_jsxs("span", { className: "select-none text-[var(--stgm-terminal-prompt,#6b7280)]", children: ["$", " "] }), normalize(command)] }) }));
|
|
66
|
+
return _jsx(TerminalSession, { command: command });
|
|
66
67
|
}
|
|
67
|
-
function FileArgsView({ path, category, args, }) {
|
|
68
|
+
function FileArgsView({ path, category, args, showFileName = true, }) {
|
|
68
69
|
const writeContent = useMemo(() => {
|
|
69
70
|
if (category !== "write" && category !== "edit")
|
|
70
71
|
return null;
|
|
@@ -72,7 +73,7 @@ function FileArgsView({ path, category, args, }) {
|
|
|
72
73
|
return null;
|
|
73
74
|
return extractWriteContentFromArgs(args);
|
|
74
75
|
}, [category, args]);
|
|
75
|
-
return (_jsxs("div", { className: "space-y-1.5", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-xs", children: [_jsx(FilePathIcon, {}), _jsx(FilePathLink, { path: path, className: "text-xs" })] }), writeContent && (_jsx(CollapsibleCode, { label: "Content", content: writeContent }))] }));
|
|
76
|
+
return (_jsxs("div", { className: "space-y-1.5", children: [showFileName && (_jsxs("div", { className: "flex items-center gap-1.5 text-xs", children: [_jsx(FilePathIcon, {}), _jsx(FilePathLink, { path: path, className: "text-xs" })] })), writeContent && (_jsx(CollapsibleCode, { label: "Content", content: writeContent }))] }));
|
|
76
77
|
}
|
|
77
78
|
function SearchArgsView({ pattern }) {
|
|
78
79
|
return (_jsxs("div", { className: "flex items-center gap-1.5 text-xs", children: [_jsx("span", { className: "text-muted-foreground", children: "Pattern:" }), _jsx("code", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-foreground", children: pattern })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolArgsView.js","sourceRoot":"","sources":["../../src/execution/ToolArgsView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EACL,mBAAmB,GAEpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ToolArgsView.js","sourceRoot":"","sources":["../../src/execution/ToolArgsView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EACL,mBAAmB,GAEpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,UAAU,GACX,MAAM,6BAA6B,CAAC;AA8BrC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,QAAQ,EACR,IAAI,EACJ,aAAa,EACb,YAAY,GAAG,IAAI,EACnB,SAAS,GACS;IAClB,MAAM,YAAY,G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C;AAED,SAAS,sBAAsB,CAC7B,IAAoC,EACpC,IAAsB;IAEtB,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAiB,EAAE;QAChD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC;QAC1D,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACzC,IAAI,CAAC;YAAE,OAAO,CAAC,CAAC;IAClB,CAAC;IAED,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACxC,MAAM,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;QACvB,IAAI,CAAC;YAAE,OAAO,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE,CAAC;QAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,OAAO,GAAG,KAAK,QAAQ;gBAAE,OAAO,GAAG,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -3,6 +3,15 @@ import type { ToolCall } from "@stigmer/protos/ai/stigmer/agentic/agentexecution
|
|
|
3
3
|
export interface ToolCallDetailProps {
|
|
4
4
|
/** The tool call to render in detail. */
|
|
5
5
|
readonly toolCall: ToolCall;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the owning row's header truncated the primary argument (the search
|
|
8
|
+
* query / list path). A header-owned layout fact: when `true`, the search/list
|
|
9
|
+
* body restates the full, wrapping value so a long query is reachable without
|
|
10
|
+
* relying on the hover tooltip; when `false` (the default) the header already
|
|
11
|
+
* shows the value in full, so the body does not repeat it. Only the
|
|
12
|
+
* search/list branch consumes it.
|
|
13
|
+
*/
|
|
14
|
+
readonly primaryArgTruncated?: boolean;
|
|
6
15
|
/** Additional CSS class names for the root container. */
|
|
7
16
|
readonly className?: string;
|
|
8
17
|
}
|
|
@@ -27,7 +36,7 @@ export interface ToolCallDetailProps {
|
|
|
27
36
|
* <ToolCallDetail toolCall={toolCall} />
|
|
28
37
|
* ```
|
|
29
38
|
*/
|
|
30
|
-
export declare function ToolCallDetail({ toolCall, className }: ToolCallDetailProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function ToolCallDetail({ toolCall, primaryArgTruncated, className, }: ToolCallDetailProps): import("react/jsx-runtime").JSX.Element;
|
|
31
40
|
/**
|
|
32
41
|
* Returns a human-readable duration string from two ISO 8601 timestamps, or
|
|
33
42
|
* `null` when either timestamp is empty or invalid.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCallDetail.d.ts","sourceRoot":"","sources":["../../src/execution/ToolCallDetail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iEAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolCallDetail.d.ts","sourceRoot":"","sources":["../../src/execution/ToolCallDetail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iEAAiE,CAAC;AAehG,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B;;;;;;;OAOG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,mBAA2B,EAC3B,SAAS,GACV,EAAE,mBAAmB,2CAcrB;AAyMD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,CAiBf"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "@stigmer/theme";
|
|
4
|
+
import { BoundedContent } from "../internal/BoundedContent";
|
|
4
5
|
import { McpToolDetail } from "./McpToolDetail";
|
|
5
6
|
import { ToolArgsView } from "./ToolArgsView";
|
|
6
7
|
import { ResultView } from "./ResultView";
|
|
7
8
|
import { useToolPresentation } from "./tool-presenter";
|
|
8
9
|
import { CollapsiblePre } from "./tool-rendering-primitives";
|
|
10
|
+
import { describeApprovalPolicySource, isInformativePolicySource, } from "./approval-provenance";
|
|
9
11
|
/**
|
|
10
12
|
* Renders the detail panel for a single tool call with category-specific
|
|
11
13
|
* treatments.
|
|
@@ -27,39 +29,75 @@ import { CollapsiblePre } from "./tool-rendering-primitives";
|
|
|
27
29
|
* <ToolCallDetail toolCall={toolCall} />
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
|
-
export function ToolCallDetail({ toolCall, className }) {
|
|
31
|
-
const { category, result } = useToolPresentation(toolCall);
|
|
32
|
-
return (_jsx("div", { className: cn("space-y-2 text-xs", className), children: _jsx(CategoryDetail, { toolCall: toolCall, category: category, result: result }) }));
|
|
32
|
+
export function ToolCallDetail({ toolCall, primaryArgTruncated = false, className, }) {
|
|
33
|
+
const { category, result, primaryArg } = useToolPresentation(toolCall);
|
|
34
|
+
return (_jsx("div", { className: cn("space-y-2 text-xs", className), children: _jsx(CategoryDetail, { toolCall: toolCall, category: category, result: result, primaryArg: primaryArg, primaryArgTruncated: primaryArgTruncated }) }));
|
|
33
35
|
}
|
|
34
36
|
// ---------------------------------------------------------------------------
|
|
35
37
|
// Category composition
|
|
36
38
|
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
39
|
+
// Invariant: the owning row header owns the METADATA (icon, label, file name,
|
|
40
|
+
// ± stats, MCP slug, status, duration); the detail body owns the CONTENT — the
|
|
41
|
+
// ToolArgsView input and the ResultView effect — plus, at most, a
|
|
42
|
+
// ProvenanceNote when the authorization provenance is genuinely informative.
|
|
43
|
+
// The body never restates header metadata. Each category picks the input/effect
|
|
44
|
+
// combination that is informative without duplication.
|
|
40
45
|
// ---------------------------------------------------------------------------
|
|
41
|
-
function CategoryDetail({ toolCall, category, result, }) {
|
|
46
|
+
function CategoryDetail({ toolCall, category, result, primaryArg, primaryArgTruncated, }) {
|
|
42
47
|
const args = _jsx(ArgsSection, { toolCall: toolCall });
|
|
43
48
|
switch (category) {
|
|
44
49
|
case "think":
|
|
45
50
|
return _jsx(ThinkToolDetail, { toolCall: toolCall });
|
|
46
51
|
case "mcp":
|
|
47
52
|
return _jsx(McpToolDetail, { toolCall: toolCall });
|
|
53
|
+
case "search":
|
|
54
|
+
case "list":
|
|
55
|
+
// The query/path is the input; the matches are the effect. The owning row
|
|
56
|
+
// header already shows the query (truncated, with a hover tooltip), so the
|
|
57
|
+
// body does NOT restate it as a redundant "Pattern:" row — it shows the
|
|
58
|
+
// full, wrapping value only when the header truncated it (a long query),
|
|
59
|
+
// then the result. This is the search/list analog of the edit branch's
|
|
60
|
+
// "the diff already names the file" de-duplication.
|
|
61
|
+
return (_jsxs(_Fragment, { children: [_jsx(ProvenanceNote, { toolCall: toolCall }), primaryArgTruncated && primaryArg && (_jsx(SearchQueryBlock, { category: category, value: primaryArg })), _jsx(ResultView, { view: result, showStats: false })] }));
|
|
48
62
|
case "edit":
|
|
63
|
+
case "write":
|
|
49
64
|
// The diff already names the file and quantifies the change, so it stands
|
|
50
|
-
// alone — showing the
|
|
51
|
-
|
|
65
|
+
// alone — showing the written content as an argument would duplicate it. A
|
|
66
|
+
// write whose capture is unavailable degrades to a `file` result here
|
|
67
|
+
// (ResultView shows the content), so the input is never lost. The owning
|
|
68
|
+
// row already names the file, so the body suppresses the path.
|
|
69
|
+
//
|
|
70
|
+
// The diff is the one tool body with no internal truncation of its own, so
|
|
71
|
+
// it is bounded by the shared BoundedContent budget (the same clamp the
|
|
72
|
+
// approval gate diff uses) — a large or still-streaming edit shows a
|
|
73
|
+
// consistent, scannable window with one in-place reveal, never the whole
|
|
74
|
+
// file. Every other category's body self-truncates (terminal / text via
|
|
75
|
+
// CollapsiblePre), so only edit/write wrap here — never double-bound.
|
|
76
|
+
return (_jsxs(_Fragment, { children: [_jsx(ProvenanceNote, { toolCall: toolCall }), _jsx(BoundedContent, { cursorTarget: "tool-detail-expand", children: _jsx(ResultView, { view: result, showFileName: false, showStats: false }) })] }));
|
|
52
77
|
case "read":
|
|
53
|
-
case "write":
|
|
54
78
|
case "delete":
|
|
55
|
-
// The input is the point (path, or path
|
|
79
|
+
// The input is the point (path, or path for a delete). Only surface a
|
|
56
80
|
// result body when it carries new information — i.e. an error.
|
|
57
|
-
return (_jsxs(_Fragment, { children: [_jsx(
|
|
81
|
+
return (_jsxs(_Fragment, { children: [_jsx(ProvenanceNote, { toolCall: toolCall }), args, result.type === "error" && _jsx(ResultView, { view: result })] }));
|
|
82
|
+
case "shell":
|
|
83
|
+
// The result IS a terminal session (command + output in one block via
|
|
84
|
+
// ResultView's terminal view), so a separate args box would just restate
|
|
85
|
+
// the command line the session already leads with. The exception is a
|
|
86
|
+
// hard tool failure (TOOL_CALL_FAILED → error view, which has no command):
|
|
87
|
+
// show the command (args) alongside the error so it is never lost.
|
|
88
|
+
return (_jsxs(_Fragment, { children: [_jsx(ProvenanceNote, { toolCall: toolCall }), result.type === "error" ? (_jsxs(_Fragment, { children: [args, _jsx(ResultView, { view: result })] })) : (_jsx(ResultView, { view: result }))] }));
|
|
58
89
|
default:
|
|
59
|
-
//
|
|
60
|
-
return (_jsxs(_Fragment, { children: [_jsx(
|
|
90
|
+
// fetch, web-search, unknown: input + effect.
|
|
91
|
+
return (_jsxs(_Fragment, { children: [_jsx(ProvenanceNote, { toolCall: toolCall }), args, _jsx(ResultView, { view: result })] }));
|
|
61
92
|
}
|
|
62
93
|
}
|
|
94
|
+
// The full, wrapping query (search) or path (list), shown in the body only when
|
|
95
|
+
// the owning row's header truncated it — so a long value is reachable without
|
|
96
|
+
// hovering, without restating a short value the header already shows in full.
|
|
97
|
+
function SearchQueryBlock({ category, value, }) {
|
|
98
|
+
const label = category === "list" ? "Path" : "Query";
|
|
99
|
+
return (_jsxs("div", { className: "space-y-1", children: [_jsx("span", { className: "font-medium text-muted-foreground", children: label }), _jsx("code", { className: "block whitespace-pre-wrap break-words rounded bg-muted px-1.5 py-0.5 font-mono text-foreground", children: value })] }));
|
|
100
|
+
}
|
|
63
101
|
function ArgsSection({ toolCall }) {
|
|
64
102
|
return (_jsx(ToolArgsView, { toolName: toolCall.name, args: toolCall.args, mcpServerSlug: toolCall.mcpServerSlug }));
|
|
65
103
|
}
|
|
@@ -72,12 +110,21 @@ function ThinkToolDetail({ toolCall }) {
|
|
|
72
110
|
// ---------------------------------------------------------------------------
|
|
73
111
|
// Shared sub-components
|
|
74
112
|
// ---------------------------------------------------------------------------
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
113
|
+
// The detail body's only metadata. Duration and the MCP slug live in the owning
|
|
114
|
+
// row header (ToolCallItem / ApprovalCardHeader), so the body never restates
|
|
115
|
+
// them; it surfaces the authorization provenance the runner stamped onto the
|
|
116
|
+
// call (approval_policy_source) ONLY when it is genuinely informative — an
|
|
117
|
+
// explicit override, a server-marked destructive tighten, or a post-hoc
|
|
118
|
+
// lease/bypass that cleared it. The everyday "this category just needs approval"
|
|
119
|
+
// default and legacy UNSPECIFIED are noise, so they render nothing, mirroring
|
|
120
|
+
// the approval gate's smart-suppress (isInformativePolicySource).
|
|
121
|
+
function ProvenanceNote({ toolCall }) {
|
|
122
|
+
if (!isInformativePolicySource(toolCall.approvalPolicySource))
|
|
123
|
+
return null;
|
|
124
|
+
const provenance = describeApprovalPolicySource(toolCall.approvalPolicySource);
|
|
125
|
+
if (!provenance)
|
|
79
126
|
return null;
|
|
80
|
-
return (
|
|
127
|
+
return (_jsx("p", { className: "text-[11px] italic text-muted-foreground", title: provenance, children: provenance }));
|
|
81
128
|
}
|
|
82
129
|
// ---------------------------------------------------------------------------
|
|
83
130
|
// Utilities
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCallDetail.js","sourceRoot":"","sources":["../../src/execution/ToolCallDetail.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolCallDetail.js","sourceRoot":"","sources":["../../src/execution/ToolCallDetail.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE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;IAChC,IAAI,EAAE,GAAG,MAAM;QAAE,OAAO,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAErD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;IACxC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IACjD,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,CAAC;AACjE,CAAC"}
|
|
@@ -12,13 +12,18 @@ export interface ToolCallGroupProps {
|
|
|
12
12
|
*/
|
|
13
13
|
readonly subAgentExecutions?: readonly SubAgentExecution[];
|
|
14
14
|
/**
|
|
15
|
-
* Custom
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Custom label formatter for a folded run chip (e.g. a run of reads).
|
|
16
|
+
* Receives the run's tool calls and returns the chip's collapsed label.
|
|
17
|
+
*
|
|
18
|
+
* NOTE: the unit of summary moved from the *turn* to the *run*. This used to
|
|
19
|
+
* label the whole turn ("Ran 3 tools"); since the turn no longer collapses,
|
|
20
|
+
* it now labels each {@link ToolRunGroup} chip. The signature is unchanged.
|
|
18
21
|
*/
|
|
19
22
|
readonly formatSummary?: (toolCalls: readonly ToolCall[]) => string;
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
24
|
+
* @deprecated No-op. The turn no longer collapses as a unit — rows persist
|
|
25
|
+
* and only repetitive runs fold (see {@link ToolRunGroup}). Kept for
|
|
26
|
+
* back-compat so existing call sites keep type-checking.
|
|
22
27
|
*/
|
|
23
28
|
readonly defaultExpanded?: boolean;
|
|
24
29
|
/** Additional CSS class names for the root container. */
|
|
@@ -36,23 +41,28 @@ export interface ToolCallGroupProps {
|
|
|
36
41
|
*/
|
|
37
42
|
export declare function toolCallGroupPropsEqual(prev: Readonly<ToolCallGroupProps>, next: Readonly<ToolCallGroupProps>): boolean;
|
|
38
43
|
/**
|
|
39
|
-
* Renders
|
|
40
|
-
*
|
|
44
|
+
* Renders one AI turn's tool activity as a **persistent-row timeline** rather
|
|
45
|
+
* than a collapsible "Ran N tools" box. Each call stays visible after it
|
|
46
|
+
* settles, so completed work is never hidden behind a pill — the thread reads
|
|
47
|
+
* like a virtual human at work.
|
|
41
48
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
49
|
+
* The turn is segmented by {@link segmentToolCalls}:
|
|
50
|
+
* - high-signal calls (edits, shell, MCP, sub-agents, …) render as persistent
|
|
51
|
+
* {@link ToolCallItem} rows; a content-bearing call shows its body inline
|
|
52
|
+
* (no card chevron), bounded by a single in-place reveal;
|
|
53
|
+
* - runs of consecutive low-signal same-category calls (read / list / search)
|
|
54
|
+
* fold into one collapsible {@link ToolRunGroup} chip — the *only* collapse,
|
|
55
|
+
* because that is the only genuine noise.
|
|
47
56
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
57
|
+
* The rows are clustered under a light left rail (the neutral counterpart to
|
|
58
|
+
* {@link SubAgentSection}'s primary-tinted rail for delegated work), keeping a
|
|
59
|
+
* turn's tools visually associated with their AI message without a tab that
|
|
60
|
+
* hides things.
|
|
52
61
|
*
|
|
53
|
-
* Wrapped in `React.memo` with a custom comparator that checks
|
|
54
|
-
*
|
|
55
|
-
*
|
|
62
|
+
* Wrapped in `React.memo` with a custom comparator that checks `toolCalls`
|
|
63
|
+
* elements by reference (structural sharing keeps individual `ToolCall` objects
|
|
64
|
+
* stable for unchanged calls), so settled rows skip re-renders while siblings
|
|
65
|
+
* stream (DD-009/010).
|
|
56
66
|
*
|
|
57
67
|
* @example
|
|
58
68
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCallGroup.d.ts","sourceRoot":"","sources":["../../src/execution/ToolCallGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iEAAiE,CAAC;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolCallGroup.d.ts","sourceRoot":"","sources":["../../src/execution/ToolCallGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iEAAiE,CAAC;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AAQ1G,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,CAAC;IACxC;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC3D;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,KAAK,MAAM,CAAC;IACpE;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EAClC,IAAI,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GACjC,OAAO,CAWT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,0DAmEC,CAAC"}
|