@stigmer/react 3.1.1 → 3.1.3
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/composer/SessionComposer.d.ts +25 -1
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +19 -8
- package/composer/SessionComposer.js.map +1 -1
- package/execution/ArtifactContentRenderer.d.ts +11 -1
- package/execution/ArtifactContentRenderer.d.ts.map +1 -1
- package/execution/ArtifactContentRenderer.js +39 -15
- package/execution/ArtifactContentRenderer.js.map +1 -1
- package/execution/ArtifactPreviewModal.d.ts +5 -5
- package/execution/ArtifactPreviewModal.js +4 -4
- package/execution/ArtifactPreviewModal.js.map +1 -1
- package/execution/FileChangeProgressBar.d.ts +47 -0
- package/execution/FileChangeProgressBar.d.ts.map +1 -0
- package/execution/FileChangeProgressBar.js +49 -0
- package/execution/FileChangeProgressBar.js.map +1 -0
- package/execution/FileChangesView.d.ts.map +1 -1
- package/execution/FileChangesView.js +19 -4
- package/execution/FileChangesView.js.map +1 -1
- package/execution/FilePathContext.d.ts +8 -1
- package/execution/FilePathContext.d.ts.map +1 -1
- package/execution/FilePathContext.js.map +1 -1
- package/execution/FilePathLink.d.ts.map +1 -1
- package/execution/FilePathLink.js +21 -6
- package/execution/FilePathLink.js.map +1 -1
- package/execution/FileReviewAtoms.d.ts +27 -0
- package/execution/FileReviewAtoms.d.ts.map +1 -0
- package/execution/FileReviewAtoms.js +64 -0
- package/execution/FileReviewAtoms.js.map +1 -0
- package/execution/FileReviewCard.d.ts +2 -2
- package/execution/FileReviewCard.d.ts.map +1 -1
- package/execution/FileReviewCard.js +32 -62
- package/execution/FileReviewCard.js.map +1 -1
- package/execution/MessageEntry.d.ts +20 -0
- package/execution/MessageEntry.d.ts.map +1 -1
- package/execution/MessageEntry.js +19 -5
- package/execution/MessageEntry.js.map +1 -1
- package/execution/MessageThread.d.ts +75 -13
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +195 -27
- package/execution/MessageThread.js.map +1 -1
- package/execution/PlanArtifactCard.d.ts +36 -21
- package/execution/PlanArtifactCard.d.ts.map +1 -1
- package/execution/PlanArtifactCard.js +39 -25
- package/execution/PlanArtifactCard.js.map +1 -1
- package/execution/PlanCompletionCard.d.ts +4 -4
- package/execution/PlanCompletionCard.d.ts.map +1 -1
- package/execution/PlanCompletionCard.js +4 -4
- package/execution/PlanCompletionCard.js.map +1 -1
- package/execution/PlanDocumentMessage.d.ts +32 -0
- package/execution/PlanDocumentMessage.d.ts.map +1 -0
- package/execution/PlanDocumentMessage.js +37 -0
- package/execution/PlanDocumentMessage.js.map +1 -0
- package/execution/PlanStreamingCard.d.ts +50 -0
- package/execution/PlanStreamingCard.d.ts.map +1 -0
- package/execution/PlanStreamingCard.js +40 -0
- package/execution/PlanStreamingCard.js.map +1 -0
- package/execution/index.d.ts +9 -1
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +4 -0
- package/execution/index.js.map +1 -1
- package/execution/use-build-from-plan-hotkey.d.ts +1 -1
- package/execution/use-build-from-plan-hotkey.js +1 -1
- package/execution/useArtifactCopy.d.ts +51 -0
- package/execution/useArtifactCopy.d.ts.map +1 -0
- package/execution/useArtifactCopy.js +75 -0
- package/execution/useArtifactCopy.js.map +1 -0
- package/execution/useArtifactDownload.d.ts.map +1 -1
- package/execution/useArtifactDownload.js +17 -5
- package/execution/useArtifactDownload.js.map +1 -1
- package/execution/useCreateAgentExecution.d.ts +12 -0
- package/execution/useCreateAgentExecution.d.ts.map +1 -1
- package/execution/useCreateAgentExecution.js +5 -1
- package/execution/useCreateAgentExecution.js.map +1 -1
- package/github/decodeGitHubContent.d.ts +29 -0
- package/github/decodeGitHubContent.d.ts.map +1 -0
- package/github/decodeGitHubContent.js +72 -0
- package/github/decodeGitHubContent.js.map +1 -0
- package/github/index.d.ts +1 -0
- package/github/index.d.ts.map +1 -1
- package/github/index.js +1 -0
- package/github/index.js.map +1 -1
- package/github/useGitHubFileReader.d.ts +26 -0
- package/github/useGitHubFileReader.d.ts.map +1 -0
- package/github/useGitHubFileReader.js +106 -0
- package/github/useGitHubFileReader.js.map +1 -0
- package/github/useGitHubTreeLister.d.ts.map +1 -1
- package/github/useGitHubTreeLister.js +6 -2
- package/github/useGitHubTreeLister.js.map +1 -1
- package/index.d.ts +9 -9
- package/index.d.ts.map +1 -1
- package/index.js +5 -5
- package/index.js.map +1 -1
- package/internal/ResizableSplit.d.ts +72 -22
- package/internal/ResizableSplit.d.ts.map +1 -1
- package/internal/ResizableSplit.js +96 -38
- package/internal/ResizableSplit.js.map +1 -1
- package/internal/VirtualizedThread.d.ts +5 -3
- package/internal/VirtualizedThread.d.ts.map +1 -1
- package/internal/VirtualizedThread.js +6 -4
- package/internal/VirtualizedThread.js.map +1 -1
- package/internal/file-icons/index.d.ts +17 -0
- package/internal/file-icons/index.d.ts.map +1 -0
- package/internal/file-icons/index.js +60 -0
- package/internal/file-icons/index.js.map +1 -0
- package/internal/file-tree/FileTreeNode.d.ts +18 -1
- package/internal/file-tree/FileTreeNode.d.ts.map +1 -1
- package/internal/file-tree/FileTreeNode.js +11 -2
- package/internal/file-tree/FileTreeNode.js.map +1 -1
- package/internal/markdown-components.d.ts +38 -1
- package/internal/markdown-components.d.ts.map +1 -1
- package/internal/markdown-components.js +86 -11
- package/internal/markdown-components.js.map +1 -1
- package/{workflow → internal}/motion-preference.d.ts +7 -4
- package/internal/motion-preference.d.ts.map +1 -0
- package/{workflow → internal}/motion-preference.js +7 -4
- package/internal/motion-preference.js.map +1 -0
- package/internal/store/index.d.ts +33 -0
- package/internal/store/index.d.ts.map +1 -1
- package/internal/store/index.js +59 -0
- package/internal/store/index.js.map +1 -1
- package/internal/store/workspace-editors-store.d.ts +145 -0
- package/internal/store/workspace-editors-store.d.ts.map +1 -0
- package/internal/store/workspace-editors-store.js +208 -0
- package/internal/store/workspace-editors-store.js.map +1 -0
- package/internal/store/workspace-file-selection-store.d.ts +38 -0
- package/internal/store/workspace-file-selection-store.d.ts.map +1 -0
- package/internal/store/workspace-file-selection-store.js +62 -0
- package/internal/store/workspace-file-selection-store.js.map +1 -0
- package/internal/useRevealLine.d.ts +49 -0
- package/internal/useRevealLine.d.ts.map +1 -0
- package/internal/useRevealLine.js +43 -0
- package/internal/useRevealLine.js.map +1 -0
- package/library/detect-plan-artifact.d.ts +43 -4
- package/library/detect-plan-artifact.d.ts.map +1 -1
- package/library/detect-plan-artifact.js +45 -5
- package/library/detect-plan-artifact.js.map +1 -1
- package/library/detect-streaming-plan.d.ts +45 -0
- package/library/detect-streaming-plan.d.ts.map +1 -0
- package/library/detect-streaming-plan.js +83 -0
- package/library/detect-streaming-plan.js.map +1 -0
- package/library/index.d.ts +4 -1
- package/library/index.d.ts.map +1 -1
- package/library/index.js +2 -1
- package/library/index.js.map +1 -1
- package/package.json +4 -4
- package/session/NewSessionViewer.d.ts +19 -4
- package/session/NewSessionViewer.d.ts.map +1 -1
- package/session/NewSessionViewer.js +52 -25
- package/session/NewSessionViewer.js.map +1 -1
- package/session/PlanEditor.d.ts +55 -0
- package/session/PlanEditor.d.ts.map +1 -0
- package/session/PlanEditor.js +88 -0
- package/session/PlanEditor.js.map +1 -0
- package/session/PlanStreamingDocument.d.ts +30 -0
- package/session/PlanStreamingDocument.d.ts.map +1 -0
- package/session/PlanStreamingDocument.js +37 -0
- package/session/PlanStreamingDocument.js.map +1 -0
- package/session/SessionPanelChip.d.ts +26 -0
- package/session/SessionPanelChip.d.ts.map +1 -0
- package/session/SessionPanelChip.js +40 -0
- package/session/SessionPanelChip.js.map +1 -0
- package/session/SessionViewer.d.ts +34 -7
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +334 -33
- package/session/SessionViewer.js.map +1 -1
- package/session/{inspector → facets}/ArtifactsTab.d.ts +10 -2
- package/session/facets/ArtifactsTab.d.ts.map +1 -0
- package/session/{inspector → facets}/ArtifactsTab.js +8 -3
- package/session/facets/ArtifactsTab.js.map +1 -0
- package/session/{inspector → facets}/ChangesTab.d.ts +3 -3
- package/session/facets/ChangesTab.d.ts.map +1 -0
- package/session/{inspector → facets}/ChangesTab.js +3 -3
- package/session/facets/ChangesTab.js.map +1 -0
- package/session/facets/InspectTab.d.ts.map +1 -0
- package/session/facets/InspectTab.js.map +1 -0
- package/session/{inspector → facets}/SetupTab.d.ts +11 -2
- package/session/facets/SetupTab.d.ts.map +1 -0
- package/session/{inspector → facets}/SetupTab.js +4 -3
- package/session/facets/SetupTab.js.map +1 -0
- package/session/{inspector → facets}/UsageTab.d.ts +1 -1
- package/session/facets/UsageTab.d.ts.map +1 -0
- package/session/{inspector → facets}/UsageTab.js +1 -1
- package/session/facets/UsageTab.js.map +1 -0
- package/session/{inspector → facets}/index.d.ts +0 -6
- package/session/facets/index.d.ts.map +1 -0
- package/session/{inspector → facets}/index.js +0 -3
- package/session/facets/index.js.map +1 -0
- package/session/index.d.ts +11 -2
- package/session/index.d.ts.map +1 -1
- package/session/index.js +15 -2
- package/session/index.js.map +1 -1
- package/session/plan-document.d.ts +21 -0
- package/session/plan-document.d.ts.map +1 -0
- package/session/plan-document.js +28 -0
- package/session/plan-document.js.map +1 -0
- package/session/useOpenFileChange.d.ts +20 -0
- package/session/useOpenFileChange.d.ts.map +1 -0
- package/session/useOpenFileChange.js +31 -0
- package/session/useOpenFileChange.js.map +1 -0
- package/session/usePlanDraft.d.ts +52 -0
- package/session/usePlanDraft.d.ts.map +1 -0
- package/session/usePlanDraft.js +63 -0
- package/session/usePlanDraft.js.map +1 -0
- package/session/useSessionConversation.d.ts +14 -1
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +20 -2
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +1 -0
- package/session/useSessionPageFlow.js.map +1 -1
- package/session/useSessionPanel.d.ts +120 -0
- package/session/useSessionPanel.d.ts.map +1 -0
- package/session/useSessionPanel.js +130 -0
- package/session/useSessionPanel.js.map +1 -0
- package/session/useSessionRailViews.d.ts +45 -0
- package/session/useSessionRailViews.d.ts.map +1 -0
- package/session/useSessionRailViews.js +105 -0
- package/session/useSessionRailViews.js.map +1 -0
- package/src/composer/SessionComposer.tsx +53 -10
- package/src/composer/__tests__/SessionComposer-contract.test.tsx +58 -4
- package/src/execution/ArtifactContentRenderer.tsx +101 -24
- package/src/execution/ArtifactPreviewModal.tsx +9 -9
- package/src/execution/FileChangeProgressBar.tsx +121 -0
- package/src/execution/FileChangesView.tsx +18 -4
- package/src/execution/FilePathContext.tsx +8 -1
- package/src/execution/FilePathLink.tsx +22 -6
- package/src/execution/FileReviewAtoms.tsx +89 -0
- package/src/execution/FileReviewCard.tsx +57 -90
- package/src/execution/MessageEntry.tsx +49 -1
- package/src/execution/MessageThread.tsx +308 -39
- package/src/execution/PlanArtifactCard.tsx +174 -64
- package/src/execution/PlanCompletionCard.tsx +5 -5
- package/src/execution/PlanDocumentMessage.tsx +96 -0
- package/src/execution/PlanStreamingCard.tsx +141 -0
- package/src/execution/__tests__/ArtifactContentRenderer.test.tsx +80 -1
- package/src/execution/__tests__/ArtifactPreviewModal.test.tsx +6 -6
- package/src/execution/__tests__/FileChangeProgressBar.test.tsx +125 -0
- package/src/execution/__tests__/FilePathLink.test.tsx +87 -0
- package/src/execution/__tests__/FileReviewCard.test.tsx +66 -7
- package/src/execution/__tests__/MessageThread.test.tsx +102 -1
- package/src/execution/__tests__/PlanArtifactCard.test.tsx +114 -26
- package/src/execution/__tests__/PlanCompletionCard.test.tsx +2 -2
- package/src/execution/__tests__/PlanDocumentMessage.test.tsx +55 -0
- package/src/execution/__tests__/PlanStreamingCard.test.tsx +56 -0
- package/src/execution/__tests__/buildThreadItems-plan-completion.test.ts +600 -22
- package/src/execution/__tests__/message-entry.test.tsx +17 -0
- package/src/execution/__tests__/useArtifactCopy.test.tsx +90 -0
- package/src/execution/__tests__/useArtifactDownload.test.tsx +2 -0
- package/src/execution/__tests__/useCreateAgentExecution.test.tsx +85 -0
- package/src/execution/index.ts +13 -1
- package/src/execution/use-build-from-plan-hotkey.ts +1 -1
- package/src/execution/useArtifactCopy.ts +109 -0
- package/src/execution/useArtifactDownload.ts +17 -5
- package/src/execution/useCreateAgentExecution.ts +18 -1
- package/src/github/__tests__/decodeGitHubContent.test.ts +102 -0
- package/src/github/__tests__/useGitHubFileReader.test.ts +183 -0
- package/src/github/decodeGitHubContent.ts +83 -0
- package/src/github/index.ts +1 -0
- package/src/github/useGitHubFileReader.ts +152 -0
- package/src/github/useGitHubTreeLister.ts +6 -2
- package/src/index.ts +69 -9
- package/src/internal/ResizableSplit.tsx +184 -51
- package/src/internal/VirtualizedThread.tsx +12 -4
- package/src/internal/__tests__/ResizableSplit.test.tsx +125 -3
- package/src/internal/__tests__/markdown-components.test.tsx +68 -0
- package/src/internal/__tests__/useRevealLine.test.tsx +97 -0
- package/src/internal/file-icons/__tests__/file-icons.test.tsx +35 -0
- package/src/internal/file-icons/index.tsx +137 -0
- package/src/internal/file-tree/FileTreeNode.tsx +56 -5
- package/src/internal/file-tree/__tests__/FileTreeNode-explorer.test.tsx +86 -0
- package/src/internal/markdown-components.tsx +116 -11
- package/src/{workflow → internal}/motion-preference.ts +7 -4
- package/src/internal/store/__tests__/workspace-editors-store.test.ts +216 -0
- package/src/internal/store/__tests__/workspace-file-selection-store.test.ts +118 -0
- package/src/internal/store/index.ts +94 -0
- package/src/internal/store/workspace-editors-store.ts +315 -0
- package/src/internal/store/workspace-file-selection-store.ts +88 -0
- package/src/internal/useRevealLine.ts +81 -0
- package/src/library/__tests__/detect-plan-artifact.test.ts +69 -0
- package/src/library/__tests__/detect-streaming-plan.test.ts +234 -0
- package/src/library/detect-plan-artifact.ts +62 -5
- package/src/library/detect-streaming-plan.ts +108 -0
- package/src/library/index.ts +7 -0
- package/src/session/NewSessionViewer.tsx +123 -55
- package/src/session/PlanEditor.tsx +361 -0
- package/src/session/PlanStreamingDocument.tsx +97 -0
- package/src/session/SessionPanelChip.tsx +103 -0
- package/src/session/SessionViewer.tsx +655 -96
- package/src/session/__tests__/NewSessionViewer.test.tsx +148 -0
- package/src/session/__tests__/PlanEditor.test.tsx +217 -0
- package/src/session/__tests__/PlanStreamingDocument.test.tsx +50 -0
- package/src/session/__tests__/SessionPanelChip.test.tsx +42 -0
- package/src/session/__tests__/SessionViewer-fileReviewDock.test.tsx +66 -4
- package/src/session/__tests__/SessionViewer-transcriptFileOpen.test.tsx +205 -0
- package/src/session/__tests__/audienceWiring.test.tsx +55 -19
- package/src/session/__tests__/useOpenFileChange.test.tsx +82 -0
- package/src/session/__tests__/usePlanDraft.test.ts +102 -0
- package/src/session/__tests__/useSessionConversation.test.tsx +44 -0
- package/src/session/__tests__/useSessionPanel.test.ts +298 -0
- package/src/session/__tests__/useSessionRailViews.test.tsx +124 -0
- package/src/session/{inspector → facets}/ArtifactsTab.tsx +27 -5
- package/src/session/{inspector → facets}/ChangesTab.tsx +3 -3
- package/src/session/{inspector → facets}/SetupTab.tsx +13 -1
- package/src/session/{inspector → facets}/UsageTab.tsx +1 -1
- package/src/session/{inspector → facets}/__tests__/ArtifactsTab.test.tsx +42 -8
- package/src/session/facets/__tests__/SetupTab.test.tsx +44 -0
- package/src/session/{inspector → facets}/index.ts +0 -16
- package/src/session/index.ts +30 -13
- package/src/session/plan-document.ts +30 -0
- package/src/session/useOpenFileChange.ts +53 -0
- package/src/session/usePlanDraft.ts +109 -0
- package/src/session/useSessionConversation.ts +38 -3
- package/src/session/useSessionPageFlow.ts +1 -0
- package/src/session/useSessionPanel.ts +288 -0
- package/src/session/useSessionRailViews.tsx +200 -0
- package/src/workflow/WorkflowExecutionGraph.tsx +1 -1
- package/src/workflow/index.ts +1 -1
- package/src/workflow/useFollowExecution.ts +1 -1
- package/src/workspace/EditorTabs.tsx +174 -0
- package/src/workspace/ExplorerTree.tsx +253 -0
- package/src/workspace/FileViewer.tsx +537 -0
- package/src/workspace/WorkspaceContentSearch.tsx +502 -0
- package/src/workspace/WorkspaceContentSearcher.ts +70 -0
- package/src/workspace/WorkspaceEditor.tsx +19 -16
- package/src/workspace/WorkspaceFileLister.ts +11 -0
- package/src/workspace/WorkspaceFileReader.ts +57 -0
- package/src/workspace/WorkspaceFileSearch.tsx +452 -0
- package/src/workspace/WorkspaceSurface.tsx +839 -0
- package/src/workspace/__tests__/EditorTabs.test.tsx +102 -0
- package/src/workspace/__tests__/ExplorerTree.test.tsx +204 -0
- package/src/workspace/__tests__/FileViewer.test.tsx +439 -0
- package/src/workspace/__tests__/WorkspaceContentSearch.test.tsx +229 -0
- package/src/workspace/__tests__/WorkspaceEditor-initialPanel.test.tsx +19 -0
- package/src/workspace/__tests__/WorkspaceFileSearch.test.tsx +227 -0
- package/src/workspace/__tests__/WorkspaceSurface.test.tsx +418 -0
- package/src/workspace/__tests__/a11y/harness.tsx +140 -0
- package/src/workspace/__tests__/a11y/mock-capabilities.ts +138 -0
- package/src/workspace/__tests__/a11y/workspace-editor.a11y.test.tsx +65 -0
- package/src/workspace/__tests__/a11y/workspace-explorer-search.a11y.test.tsx +112 -0
- package/src/workspace/__tests__/a11y/workspace-viewer-tabs.a11y.test.tsx +69 -0
- package/src/workspace/__tests__/findChangeForSelection.test.ts +132 -0
- package/src/workspace/__tests__/matchContentPreview.test.ts +55 -0
- package/src/workspace/__tests__/matchWorkspaceFiles.test.ts +104 -0
- package/src/workspace/__tests__/resolveWorkspaceFileSelection.test.ts +135 -0
- package/src/workspace/__tests__/useWorkspaceContentSearch.test.tsx +196 -0
- package/src/workspace/__tests__/useWorkspaceFileContent.test.tsx +190 -0
- package/src/workspace/__tests__/useWorkspaceFileSearch.test.tsx +162 -0
- package/src/workspace/findChangeForSelection.ts +61 -0
- package/src/workspace/index.ts +56 -2
- package/src/workspace/matchContentPreview.ts +51 -0
- package/src/workspace/matchWorkspaceFiles.ts +86 -0
- package/src/workspace/resolveWorkspaceFileSelection.ts +119 -0
- package/src/workspace/useWorkspaceContentSearch.ts +228 -0
- package/src/workspace/useWorkspaceFileContent.ts +129 -0
- package/src/workspace/useWorkspaceFileSearch.ts +184 -0
- package/src/workspace/useWorkspaceFiles.ts +27 -27
- package/src/workspace/workspaceListingCache.ts +93 -0
- package/styles.css +1 -1
- package/workflow/WorkflowExecutionGraph.js +1 -1
- package/workflow/WorkflowExecutionGraph.js.map +1 -1
- package/workflow/index.d.ts +1 -1
- package/workflow/index.d.ts.map +1 -1
- package/workflow/index.js +1 -1
- package/workflow/index.js.map +1 -1
- package/workflow/useFollowExecution.js +1 -1
- package/workflow/useFollowExecution.js.map +1 -1
- package/workspace/EditorTabs.d.ts +47 -0
- package/workspace/EditorTabs.d.ts.map +1 -0
- package/workspace/EditorTabs.js +78 -0
- package/workspace/EditorTabs.js.map +1 -0
- package/workspace/ExplorerTree.d.ts +32 -0
- package/workspace/ExplorerTree.d.ts.map +1 -0
- package/workspace/ExplorerTree.js +49 -0
- package/workspace/ExplorerTree.js.map +1 -0
- package/workspace/FileViewer.d.ts +93 -0
- package/workspace/FileViewer.d.ts.map +1 -0
- package/workspace/FileViewer.js +193 -0
- package/workspace/FileViewer.js.map +1 -0
- package/workspace/WorkspaceContentSearch.d.ts +41 -0
- package/workspace/WorkspaceContentSearch.d.ts.map +1 -0
- package/workspace/WorkspaceContentSearch.js +216 -0
- package/workspace/WorkspaceContentSearch.js.map +1 -0
- package/workspace/WorkspaceContentSearcher.d.ts +59 -0
- package/workspace/WorkspaceContentSearcher.d.ts.map +1 -0
- package/workspace/WorkspaceContentSearcher.js +7 -0
- package/workspace/WorkspaceContentSearcher.js.map +1 -0
- package/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/workspace/WorkspaceEditor.js +8 -10
- package/workspace/WorkspaceEditor.js.map +1 -1
- package/workspace/WorkspaceFileLister.d.ts +11 -0
- package/workspace/WorkspaceFileLister.d.ts.map +1 -1
- package/workspace/WorkspaceFileReader.d.ts +48 -0
- package/workspace/WorkspaceFileReader.d.ts.map +1 -0
- package/workspace/WorkspaceFileReader.js +11 -0
- package/workspace/WorkspaceFileReader.js.map +1 -0
- package/workspace/WorkspaceFileSearch.d.ts +32 -0
- package/workspace/WorkspaceFileSearch.d.ts.map +1 -0
- package/workspace/WorkspaceFileSearch.js +175 -0
- package/workspace/WorkspaceFileSearch.js.map +1 -0
- package/workspace/WorkspaceSurface.d.ts +151 -0
- package/workspace/WorkspaceSurface.d.ts.map +1 -0
- package/workspace/WorkspaceSurface.js +220 -0
- package/workspace/WorkspaceSurface.js.map +1 -0
- package/workspace/findChangeForSelection.d.ts +19 -0
- package/workspace/findChangeForSelection.d.ts.map +1 -0
- package/workspace/findChangeForSelection.js +46 -0
- package/workspace/findChangeForSelection.js.map +1 -0
- package/workspace/index.d.ts +24 -2
- package/workspace/index.d.ts.map +1 -1
- package/workspace/index.js +13 -1
- package/workspace/index.js.map +1 -1
- package/workspace/matchContentPreview.d.ts +21 -0
- package/workspace/matchContentPreview.d.ts.map +1 -0
- package/workspace/matchContentPreview.js +36 -0
- package/workspace/matchContentPreview.js.map +1 -0
- package/workspace/matchWorkspaceFiles.d.ts +30 -0
- package/workspace/matchWorkspaceFiles.d.ts.map +1 -0
- package/workspace/matchWorkspaceFiles.js +58 -0
- package/workspace/matchWorkspaceFiles.js.map +1 -0
- package/workspace/resolveWorkspaceFileSelection.d.ts +19 -0
- package/workspace/resolveWorkspaceFileSelection.d.ts.map +1 -0
- package/workspace/resolveWorkspaceFileSelection.js +115 -0
- package/workspace/resolveWorkspaceFileSelection.js.map +1 -0
- package/workspace/useWorkspaceContentSearch.d.ts +69 -0
- package/workspace/useWorkspaceContentSearch.d.ts.map +1 -0
- package/workspace/useWorkspaceContentSearch.js +154 -0
- package/workspace/useWorkspaceContentSearch.js.map +1 -0
- package/workspace/useWorkspaceFileContent.d.ts +73 -0
- package/workspace/useWorkspaceFileContent.d.ts.map +1 -0
- package/workspace/useWorkspaceFileContent.js +57 -0
- package/workspace/useWorkspaceFileContent.js.map +1 -0
- package/workspace/useWorkspaceFileSearch.d.ts +61 -0
- package/workspace/useWorkspaceFileSearch.d.ts.map +1 -0
- package/workspace/useWorkspaceFileSearch.js +119 -0
- package/workspace/useWorkspaceFileSearch.js.map +1 -0
- package/workspace/useWorkspaceFiles.d.ts +13 -5
- package/workspace/useWorkspaceFiles.d.ts.map +1 -1
- package/workspace/useWorkspaceFiles.js +18 -19
- package/workspace/useWorkspaceFiles.js.map +1 -1
- package/workspace/workspaceListingCache.d.ts +47 -0
- package/workspace/workspaceListingCache.d.ts.map +1 -0
- package/workspace/workspaceListingCache.js +55 -0
- package/workspace/workspaceListingCache.js.map +1 -0
- package/session/inspector/ArtifactsTab.d.ts.map +0 -1
- package/session/inspector/ArtifactsTab.js.map +0 -1
- package/session/inspector/ChangesTab.d.ts.map +0 -1
- package/session/inspector/ChangesTab.js.map +0 -1
- package/session/inspector/InspectTab.d.ts.map +0 -1
- package/session/inspector/InspectTab.js.map +0 -1
- package/session/inspector/SessionInspector.d.ts +0 -64
- package/session/inspector/SessionInspector.d.ts.map +0 -1
- package/session/inspector/SessionInspector.js +0 -53
- package/session/inspector/SessionInspector.js.map +0 -1
- package/session/inspector/SetupTab.d.ts.map +0 -1
- package/session/inspector/SetupTab.js.map +0 -1
- package/session/inspector/UsageTab.d.ts.map +0 -1
- package/session/inspector/UsageTab.js.map +0 -1
- package/session/inspector/WorkspaceTab.d.ts +0 -35
- package/session/inspector/WorkspaceTab.d.ts.map +0 -1
- package/session/inspector/WorkspaceTab.js +0 -75
- package/session/inspector/WorkspaceTab.js.map +0 -1
- package/session/inspector/index.d.ts.map +0 -1
- package/session/inspector/index.js.map +0 -1
- package/session/inspector/useSessionInspector.d.ts +0 -49
- package/session/inspector/useSessionInspector.d.ts.map +0 -1
- package/session/inspector/useSessionInspector.js +0 -122
- package/session/inspector/useSessionInspector.js.map +0 -1
- package/src/session/inspector/SessionInspector.tsx +0 -162
- package/src/session/inspector/WorkspaceTab.tsx +0 -245
- package/src/session/inspector/__tests__/useSessionInspector.test.ts +0 -251
- package/src/session/inspector/useSessionInspector.ts +0 -178
- package/src/workspace/WorkspaceEntryFiles.tsx +0 -196
- package/workflow/motion-preference.d.ts.map +0 -1
- package/workflow/motion-preference.js.map +0 -1
- package/workspace/WorkspaceEntryFiles.d.ts +0 -22
- package/workspace/WorkspaceEntryFiles.d.ts.map +0 -1
- package/workspace/WorkspaceEntryFiles.js +0 -58
- package/workspace/WorkspaceEntryFiles.js.map +0 -1
- /package/session/{inspector → facets}/InspectTab.d.ts +0 -0
- /package/session/{inspector → facets}/InspectTab.js +0 -0
- /package/src/{workflow → internal}/__tests__/motion-preference.test.ts +0 -0
- /package/src/session/{inspector → facets}/InspectTab.tsx +0 -0
- /package/src/session/{inspector → facets}/__tests__/ChangesTab.test.tsx +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
3
|
+
import { prefersReducedMotion } from "./motion-preference.js";
|
|
4
|
+
/**
|
|
5
|
+
* Scrolls a line-faithful code view to `reveal.line` and reports which line to
|
|
6
|
+
* highlight.
|
|
7
|
+
*
|
|
8
|
+
* The mechanics are centralized here (rather than duplicated into each line
|
|
9
|
+
* renderer) and mirror the established `data-attribute` scroll pattern used by
|
|
10
|
+
* the workflow waterfall: the consumer renders each row with `data-line="N"`
|
|
11
|
+
* and this hook, on every `reveal.nonce` change, finds the target row within
|
|
12
|
+
* `containerRef` and scrolls it into view. Smooth scroll yields to
|
|
13
|
+
* `prefers-reduced-motion` (a JS animation the CSS rule does not cover), and
|
|
14
|
+
* the scroll is an optional call so it is a no-op under jsdom, which has no
|
|
15
|
+
* `scrollIntoView`.
|
|
16
|
+
*
|
|
17
|
+
* Placement matters: mount this inside the line renderer, which exists only
|
|
18
|
+
* after the file content has loaded — never above the async content gate — so
|
|
19
|
+
* the `[data-line]` rows are present when the effect runs and a fresh open does
|
|
20
|
+
* not race the load. A missing or out-of-range line is a silent no-op.
|
|
21
|
+
*/
|
|
22
|
+
export function useRevealLine(reveal) {
|
|
23
|
+
const containerRef = useRef(null);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!reveal)
|
|
26
|
+
return;
|
|
27
|
+
const container = containerRef.current;
|
|
28
|
+
if (!container)
|
|
29
|
+
return;
|
|
30
|
+
const row = container.querySelector(`[data-line="${reveal.line}"]`);
|
|
31
|
+
// Optional call: jsdom (tests) implements no `scrollIntoView`.
|
|
32
|
+
row?.scrollIntoView?.({
|
|
33
|
+
block: "center",
|
|
34
|
+
behavior: prefersReducedMotion() ? "auto" : "smooth",
|
|
35
|
+
});
|
|
36
|
+
// Intentionally keyed only on the nonce: a repeat navigation to the same
|
|
37
|
+
// line (new nonce) must re-scroll, and `reveal.line` changes always ship a
|
|
38
|
+
// new nonce, so it is covered transitively.
|
|
39
|
+
}, [reveal?.nonce]);
|
|
40
|
+
const isRevealed = useCallback((line) => reveal?.line === line, [reveal?.line]);
|
|
41
|
+
return { containerRef, isRevealed };
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=useRevealLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRevealLine.js","sourceRoot":"","sources":["../../src/internal/useRevealLine.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAgC9D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAgC;IAEhC,MAAM,YAAY,GAAG,MAAM,CAAW,IAAI,CAAC,CAAC;IAE5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,SAAS;YAAE,OAAO;QAEvB,MAAM,GAAG,GAAG,SAAS,CAAC,aAAa,CAAC,eAAe,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;QACpE,+DAA+D;QAC/D,GAAG,EAAE,cAAc,EAAE,CAAC;YACpB,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;SACrD,CAAC,CAAC;QACH,yEAAyE;QACzE,2EAA2E;QAC3E,4CAA4C;IAC9C,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IAEpB,MAAM,UAAU,GAAG,WAAW,CAC5B,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,EAAE,IAAI,KAAK,IAAI,EACvC,CAAC,MAAM,EAAE,IAAI,CAAC,CACf,CAAC;IAEF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -1,13 +1,42 @@
|
|
|
1
1
|
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
2
2
|
import type { ExecutionArtifact } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/artifact_pb";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The session's current plan: the published plan artifact (a `*.plan.md` FILE)
|
|
5
|
+
* of the most recent execution that produced one, plus the execution it belongs
|
|
6
|
+
* to (artifact content RPCs are execution-scoped).
|
|
7
|
+
*/
|
|
8
|
+
export interface SessionPlan {
|
|
9
|
+
/** ID of the execution that published the plan. */
|
|
10
|
+
readonly executionId: string;
|
|
11
|
+
/** The published plan artifact (`*.plan.md`). */
|
|
12
|
+
readonly artifact: ExecutionArtifact;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Legacy plan filename. Detection-only: {@link isPlanArtifactName} still
|
|
16
|
+
* accepts this exact name so plans published before named artifacts existed
|
|
17
|
+
* keep working. The runner never freshly emits it (a titleless plan falls back
|
|
18
|
+
* to a bare `<id>.plan.md`). Kept in sync with the runner's
|
|
19
|
+
* `PLAN_ARTIFACT_NAME` (shared/plan-artifact.ts).
|
|
6
20
|
*/
|
|
7
21
|
export declare const PLAN_ARTIFACT_NAME = "plan.md";
|
|
8
22
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
23
|
+
* Suffix every named plan artifact carries (`<slug>_<id>.plan.md`, or a bare
|
|
24
|
+
* `<id>.plan.md` when untitled). The runner derives the slug from the plan's
|
|
25
|
+
* title and the `<id>` from its content hash; detection keys on this suffix.
|
|
26
|
+
* Kept in sync with the runner's `PLAN_ARTIFACT_SUFFIX` (shared/plan-artifact.ts)
|
|
27
|
+
* — the runner and browser SDK have disjoint module graphs, so the constant is
|
|
28
|
+
* duplicated by design, mirroring {@link PLAN_ARTIFACT_NAME}.
|
|
29
|
+
*/
|
|
30
|
+
export declare const PLAN_ARTIFACT_SUFFIX = ".plan.md";
|
|
31
|
+
/**
|
|
32
|
+
* Returns `true` when a filename is a plan's: the legacy exact `plan.md`, or
|
|
33
|
+
* any `*.plan.md`. Accepting the legacy name keeps plans published before named
|
|
34
|
+
* artifacts existed detectable.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isPlanArtifactName(name: string): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Returns `true` when an artifact is the published plan: a FILE artifact whose
|
|
39
|
+
* name satisfies {@link isPlanArtifactName}.
|
|
11
40
|
*
|
|
12
41
|
* Detection is by convention — the same lightweight, content-free approach used
|
|
13
42
|
* for skill packages ({@link isSkillPackage}) — so the UI never needs an extra
|
|
@@ -23,4 +52,14 @@ export declare function isPlanArtifact(artifact: ExecutionArtifact): boolean;
|
|
|
23
52
|
* replaces rather than appends, so this is defensive.
|
|
24
53
|
*/
|
|
25
54
|
export declare function findPlanArtifact(execution: AgentExecution | null | undefined): ExecutionArtifact | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Finds the session's LATEST plan across all executions — the plan the panel's
|
|
57
|
+
* plan document tab edits and the "Build" action implements. Executions are
|
|
58
|
+
* scanned newest-first (the array is chronological), mirroring the thread's
|
|
59
|
+
* latest-plan-owns-the-build-action rule so every surface agrees on which
|
|
60
|
+
* plan is current.
|
|
61
|
+
*
|
|
62
|
+
* Returns `undefined` when no execution in the session published a plan.
|
|
63
|
+
*/
|
|
64
|
+
export declare function findLatestSessionPlan(executions: readonly AgentExecution[]): SessionPlan | undefined;
|
|
26
65
|
//# sourceMappingURL=detect-plan-artifact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect-plan-artifact.d.ts","sourceRoot":"","sources":["../../src/library/detect-plan-artifact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAC;AAClG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AAG1G
|
|
1
|
+
{"version":3,"file":"detect-plan-artifact.d.ts","sourceRoot":"","sources":["../../src/library/detect-plan-artifact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAC;AAClG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AAG1G;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;CACtC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAE/C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAKnE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAC3C,iBAAiB,GAAG,SAAS,CAO/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,SAAS,cAAc,EAAE,GACpC,WAAW,GAAG,SAAS,CAUzB"}
|
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
import { ExecutionArtifactKind } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Legacy plan filename. Detection-only: {@link isPlanArtifactName} still
|
|
4
|
+
* accepts this exact name so plans published before named artifacts existed
|
|
5
|
+
* keep working. The runner never freshly emits it (a titleless plan falls back
|
|
6
|
+
* to a bare `<id>.plan.md`). Kept in sync with the runner's
|
|
7
|
+
* `PLAN_ARTIFACT_NAME` (shared/plan-artifact.ts).
|
|
5
8
|
*/
|
|
6
9
|
export const PLAN_ARTIFACT_NAME = "plan.md";
|
|
7
10
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
11
|
+
* Suffix every named plan artifact carries (`<slug>_<id>.plan.md`, or a bare
|
|
12
|
+
* `<id>.plan.md` when untitled). The runner derives the slug from the plan's
|
|
13
|
+
* title and the `<id>` from its content hash; detection keys on this suffix.
|
|
14
|
+
* Kept in sync with the runner's `PLAN_ARTIFACT_SUFFIX` (shared/plan-artifact.ts)
|
|
15
|
+
* — the runner and browser SDK have disjoint module graphs, so the constant is
|
|
16
|
+
* duplicated by design, mirroring {@link PLAN_ARTIFACT_NAME}.
|
|
17
|
+
*/
|
|
18
|
+
export const PLAN_ARTIFACT_SUFFIX = ".plan.md";
|
|
19
|
+
/**
|
|
20
|
+
* Returns `true` when a filename is a plan's: the legacy exact `plan.md`, or
|
|
21
|
+
* any `*.plan.md`. Accepting the legacy name keeps plans published before named
|
|
22
|
+
* artifacts existed detectable.
|
|
23
|
+
*/
|
|
24
|
+
export function isPlanArtifactName(name) {
|
|
25
|
+
return name === PLAN_ARTIFACT_NAME || name.endsWith(PLAN_ARTIFACT_SUFFIX);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns `true` when an artifact is the published plan: a FILE artifact whose
|
|
29
|
+
* name satisfies {@link isPlanArtifactName}.
|
|
10
30
|
*
|
|
11
31
|
* Detection is by convention — the same lightweight, content-free approach used
|
|
12
32
|
* for skill packages ({@link isSkillPackage}) — so the UI never needs an extra
|
|
@@ -15,7 +35,7 @@ export const PLAN_ARTIFACT_NAME = "plan.md";
|
|
|
15
35
|
*/
|
|
16
36
|
export function isPlanArtifact(artifact) {
|
|
17
37
|
return (artifact.kind === ExecutionArtifactKind.FILE &&
|
|
18
|
-
artifact.name
|
|
38
|
+
isPlanArtifactName(artifact.name));
|
|
19
39
|
}
|
|
20
40
|
/**
|
|
21
41
|
* Finds the plan artifact on a completed execution, or `undefined` when none
|
|
@@ -34,4 +54,24 @@ export function findPlanArtifact(execution) {
|
|
|
34
54
|
}
|
|
35
55
|
return undefined;
|
|
36
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Finds the session's LATEST plan across all executions — the plan the panel's
|
|
59
|
+
* plan document tab edits and the "Build" action implements. Executions are
|
|
60
|
+
* scanned newest-first (the array is chronological), mirroring the thread's
|
|
61
|
+
* latest-plan-owns-the-build-action rule so every surface agrees on which
|
|
62
|
+
* plan is current.
|
|
63
|
+
*
|
|
64
|
+
* Returns `undefined` when no execution in the session published a plan.
|
|
65
|
+
*/
|
|
66
|
+
export function findLatestSessionPlan(executions) {
|
|
67
|
+
for (let i = executions.length - 1; i >= 0; i--) {
|
|
68
|
+
const execution = executions[i];
|
|
69
|
+
const artifact = findPlanArtifact(execution);
|
|
70
|
+
const executionId = execution.metadata?.id;
|
|
71
|
+
if (artifact && executionId) {
|
|
72
|
+
return { executionId, artifact };
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
37
77
|
//# sourceMappingURL=detect-plan-artifact.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect-plan-artifact.js","sourceRoot":"","sources":["../../src/library/detect-plan-artifact.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8DAA8D,CAAC;
|
|
1
|
+
{"version":3,"file":"detect-plan-artifact.js","sourceRoot":"","sources":["../../src/library/detect-plan-artifact.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8DAA8D,CAAC;AAcrG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI,KAAK,kBAAkB,IAAI,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,QAA2B;IACxD,OAAO,CACL,QAAQ,CAAC,IAAI,KAAK,qBAAqB,CAAC,IAAI;QAC5C,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAClC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAA4C;IAE5C,MAAM,SAAS,GAAG,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC;IAC/C,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3D,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/C,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,UAAqC;IAErC,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAChD,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAC7C,MAAM,WAAW,GAAG,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC;QAC3C,IAAI,QAAQ,IAAI,WAAW,EAAE,CAAC;YAC5B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;QACnC,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
2
|
+
/**
|
|
3
|
+
* A plan being written by a live Plan-mode execution, detected mid-stream so
|
|
4
|
+
* the UI can promote it to a document surface (panel plan tab + compact thread
|
|
5
|
+
* card) instead of letting it dump into the chat as a giant streaming bubble.
|
|
6
|
+
*/
|
|
7
|
+
export interface StreamingPlan {
|
|
8
|
+
/** Index of the plan message in `execution.status.messages`. */
|
|
9
|
+
readonly messageIndex: number;
|
|
10
|
+
/**
|
|
11
|
+
* The plan text to render on document surfaces: the message content with
|
|
12
|
+
* any enclosing plan fence stripped, streaming-tolerantly (an unterminated
|
|
13
|
+
* opening fence is stripped too — see {@link findStreamingPlan}). Purely a
|
|
14
|
+
* display projection; the stored message is never mutated.
|
|
15
|
+
*/
|
|
16
|
+
readonly displayText: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Detects the plan a live Plan-mode execution is currently writing, or
|
|
20
|
+
* `undefined` when the execution has no recognizable plan in flight.
|
|
21
|
+
*
|
|
22
|
+
* This is the third leg of the plan convention, alongside the runner's prompt
|
|
23
|
+
* directive ("your FINAL message IS the plan, starting with a single `#`
|
|
24
|
+
* title" — `plan-mode-prompt.ts`) and the completion-time artifact detection
|
|
25
|
+
* by filename ({@link isPlanArtifact}). Completion makes the plan unambiguous
|
|
26
|
+
* (the published `plan.md` artifact); mid-stream it must be inferred, and the
|
|
27
|
+
* directive's mandated shape is the inference:
|
|
28
|
+
*
|
|
29
|
+
* - the execution runs in Plan mode and is **non-terminal** (a completed turn
|
|
30
|
+
* is owned by the artifact path; a stopped/failed turn has no live plan),
|
|
31
|
+
* - the candidate is the **last content-bearing `MESSAGE_AI`** — the exact
|
|
32
|
+
* selection rule the runner's `extractFinalPlanText` and the thread's
|
|
33
|
+
* `findPlanMessageIndex` share, so all three stay in lockstep,
|
|
34
|
+
* - and that candidate opens with an `# H1` title (after tolerating an
|
|
35
|
+
* enclosing plan fence, see {@link unwrapStreamingPlanFence}) — the shape
|
|
36
|
+
* the directive mandates and narration essentially never has.
|
|
37
|
+
*
|
|
38
|
+
* Degradation is graceful by design: a model that ignores the directive
|
|
39
|
+
* simply streams its plan in the thread as before, and the completion-time
|
|
40
|
+
* pipeline is unaffected either way. Only the LAST content-bearing AI message
|
|
41
|
+
* is ever considered — an earlier message is settled narration, and falling
|
|
42
|
+
* back to it would promote the wrong text.
|
|
43
|
+
*/
|
|
44
|
+
export declare function findStreamingPlan(execution: AgentExecution | null | undefined): StreamingPlan | undefined;
|
|
45
|
+
//# sourceMappingURL=detect-streaming-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-streaming-plan.d.ts","sourceRoot":"","sources":["../../src/library/detect-streaming-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAC;AAOlG;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAqCD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAC3C,aAAa,GAAG,SAAS,CAoB3B"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { InteractionMode, MessageType, } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
2
|
+
import { isTerminalPhase } from "@stigmer/sdk";
|
|
3
|
+
/**
|
|
4
|
+
* Opening line of a whole-message plan fence: ``` with no language tag, or
|
|
5
|
+
* tagged `markdown`/`md`. Any other tag (```python …) means the message opens
|
|
6
|
+
* with a genuine code block, not a wrapped plan, and is never unwrapped —
|
|
7
|
+
* mirroring `unwrapEnclosingMarkdownFence`'s tag rules.
|
|
8
|
+
*/
|
|
9
|
+
const OPENING_PLAN_FENCE_RE = /^(`{3,})(?:markdown|md)?[ \t]*\r?\n/;
|
|
10
|
+
/** A streaming plan message qualifies when it opens with an `# H1` title. */
|
|
11
|
+
const LEADING_H1_RE = /^#[ \t]/;
|
|
12
|
+
/**
|
|
13
|
+
* Streaming-tolerant unwrap of a whole-message plan fence.
|
|
14
|
+
*
|
|
15
|
+
* `unwrapEnclosingMarkdownFence` deliberately no-ops until the closing fence
|
|
16
|
+
* arrives (transcripts must stay faithful while a genuine code block is still
|
|
17
|
+
* open). A plan surface can't wait: mid-stream the closing fence hasn't
|
|
18
|
+
* streamed yet, and rendering the fence as-is turns the whole live plan into
|
|
19
|
+
* one giant code block. Because Plan mode's output IS a markdown document by
|
|
20
|
+
* contract, a message that OPENS with a bare/markdown fence is a wrapped plan
|
|
21
|
+
* — so this strips the opening fence immediately and the closing fence
|
|
22
|
+
* whenever it shows up as the final line.
|
|
23
|
+
*/
|
|
24
|
+
function unwrapStreamingPlanFence(content) {
|
|
25
|
+
const trimmed = content.trim();
|
|
26
|
+
const open = OPENING_PLAN_FENCE_RE.exec(trimmed);
|
|
27
|
+
if (!open)
|
|
28
|
+
return content;
|
|
29
|
+
const body = trimmed.slice(open[0].length);
|
|
30
|
+
// Strip the closing fence only when it is the final line (same backtick
|
|
31
|
+
// run); a fence anywhere else belongs to a code block inside the plan.
|
|
32
|
+
const close = new RegExp(`(?:^|\\r?\\n)${open[1]}[ \\t]*$`);
|
|
33
|
+
const closeMatch = close.exec(body);
|
|
34
|
+
return closeMatch ? body.slice(0, closeMatch.index) : body;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Detects the plan a live Plan-mode execution is currently writing, or
|
|
38
|
+
* `undefined` when the execution has no recognizable plan in flight.
|
|
39
|
+
*
|
|
40
|
+
* This is the third leg of the plan convention, alongside the runner's prompt
|
|
41
|
+
* directive ("your FINAL message IS the plan, starting with a single `#`
|
|
42
|
+
* title" — `plan-mode-prompt.ts`) and the completion-time artifact detection
|
|
43
|
+
* by filename ({@link isPlanArtifact}). Completion makes the plan unambiguous
|
|
44
|
+
* (the published `plan.md` artifact); mid-stream it must be inferred, and the
|
|
45
|
+
* directive's mandated shape is the inference:
|
|
46
|
+
*
|
|
47
|
+
* - the execution runs in Plan mode and is **non-terminal** (a completed turn
|
|
48
|
+
* is owned by the artifact path; a stopped/failed turn has no live plan),
|
|
49
|
+
* - the candidate is the **last content-bearing `MESSAGE_AI`** — the exact
|
|
50
|
+
* selection rule the runner's `extractFinalPlanText` and the thread's
|
|
51
|
+
* `findPlanMessageIndex` share, so all three stay in lockstep,
|
|
52
|
+
* - and that candidate opens with an `# H1` title (after tolerating an
|
|
53
|
+
* enclosing plan fence, see {@link unwrapStreamingPlanFence}) — the shape
|
|
54
|
+
* the directive mandates and narration essentially never has.
|
|
55
|
+
*
|
|
56
|
+
* Degradation is graceful by design: a model that ignores the directive
|
|
57
|
+
* simply streams its plan in the thread as before, and the completion-time
|
|
58
|
+
* pipeline is unaffected either way. Only the LAST content-bearing AI message
|
|
59
|
+
* is ever considered — an earlier message is settled narration, and falling
|
|
60
|
+
* back to it would promote the wrong text.
|
|
61
|
+
*/
|
|
62
|
+
export function findStreamingPlan(execution) {
|
|
63
|
+
if (execution?.spec?.executionConfig?.interactionMode !== InteractionMode.PLAN) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
const phase = execution.status?.phase;
|
|
67
|
+
if (phase === undefined || isTerminalPhase(phase))
|
|
68
|
+
return undefined;
|
|
69
|
+
const messages = execution.status?.messages ?? [];
|
|
70
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
71
|
+
const msg = messages[i];
|
|
72
|
+
if (msg.type !== MessageType.MESSAGE_AI)
|
|
73
|
+
continue;
|
|
74
|
+
if (msg.content.trim().length === 0)
|
|
75
|
+
continue;
|
|
76
|
+
const displayText = unwrapStreamingPlanFence(msg.content);
|
|
77
|
+
return LEADING_H1_RE.test(displayText.trimStart())
|
|
78
|
+
? { messageIndex: i, displayText }
|
|
79
|
+
: undefined;
|
|
80
|
+
}
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=detect-streaming-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-streaming-plan.js","sourceRoot":"","sources":["../../src/library/detect-streaming-plan.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,WAAW,GACZ,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAmB/C;;;;;GAKG;AACH,MAAM,qBAAqB,GAAG,qCAAqC,CAAC;AAEpE,6EAA6E;AAC7E,MAAM,aAAa,GAAG,SAAS,CAAC;AAEhC;;;;;;;;;;;GAWG;AACH,SAAS,wBAAwB,CAAC,OAAe;IAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjD,IAAI,CAAC,IAAI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B,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC1D,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;YAChD,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE;YAClC,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/library/index.d.ts
CHANGED
|
@@ -8,7 +8,10 @@ export type { StigmerResourceKind, StigmerResourceDetection, } from "./detect-st
|
|
|
8
8
|
export { useDetectStigmerResource } from "./useDetectStigmerResource.js";
|
|
9
9
|
export { isSkillPackage, detectSkillPackage, } from "./detect-skill-package.js";
|
|
10
10
|
export type { SkillPackageDetection } from "./detect-skill-package.js";
|
|
11
|
-
export { isPlanArtifact, findPlanArtifact, PLAN_ARTIFACT_NAME, } from "./detect-plan-artifact.js";
|
|
11
|
+
export { isPlanArtifact, isPlanArtifactName, findPlanArtifact, findLatestSessionPlan, PLAN_ARTIFACT_NAME, PLAN_ARTIFACT_SUFFIX, } from "./detect-plan-artifact.js";
|
|
12
|
+
export type { SessionPlan } from "./detect-plan-artifact.js";
|
|
13
|
+
export { findStreamingPlan } from "./detect-streaming-plan.js";
|
|
14
|
+
export type { StreamingPlan } from "./detect-streaming-plan.js";
|
|
12
15
|
export { useDetectSkillPackage } from "./useDetectSkillPackage.js";
|
|
13
16
|
export type { UseDetectSkillPackageReturn } from "./useDetectSkillPackage.js";
|
|
14
17
|
export { parseResourceYaml } from "./parse-resource-yaml.js";
|
package/library/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/library/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EAAE,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Ae,EACf,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,YAAY,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAErF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EACV,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,YAAY,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC"}
|
package/library/index.js
CHANGED
|
@@ -4,7 +4,8 @@ export { ResourceCountCard } from "./ResourceCountCard.js";
|
|
|
4
4
|
export { detectStigmerResource } from "./detect-stigmer-resource.js";
|
|
5
5
|
export { useDetectStigmerResource } from "./useDetectStigmerResource.js";
|
|
6
6
|
export { isSkillPackage, detectSkillPackage, } from "./detect-skill-package.js";
|
|
7
|
-
export { isPlanArtifact, findPlanArtifact, PLAN_ARTIFACT_NAME, } from "./detect-plan-artifact.js";
|
|
7
|
+
export { isPlanArtifact, isPlanArtifactName, findPlanArtifact, findLatestSessionPlan, PLAN_ARTIFACT_NAME, PLAN_ARTIFACT_SUFFIX, } from "./detect-plan-artifact.js";
|
|
8
|
+
export { findStreamingPlan } from "./detect-streaming-plan.js";
|
|
8
9
|
export { useDetectSkillPackage } from "./useDetectSkillPackage.js";
|
|
9
10
|
export { parseResourceYaml } from "./parse-resource-yaml.js";
|
|
10
11
|
export { serializeAgentYaml, serializeMcpServerYaml, serializeAgentInputYaml, serializeMcpServerInputYaml, } from "./serialize-resource-yaml.js";
|
package/library/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/library/index.ts"],"names":[],"mappings":"AAAA,OAAO,E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AAqB,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAElG,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAM3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAO3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG9E,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAM/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigmer/react",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"description": "React provider and client hook for the Stigmer platform SDK",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@bufbuild/protovalidate": "^1.1.1",
|
|
39
39
|
"@dagrejs/dagre": "^1.1.4",
|
|
40
|
-
"@stigmer/theme": "3.1.
|
|
40
|
+
"@stigmer/theme": "3.1.3",
|
|
41
41
|
"diff": "^8.0.3",
|
|
42
42
|
"fflate": "^0.8.2",
|
|
43
43
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@codemirror/state": "^6.0.0",
|
|
61
61
|
"@codemirror/view": "^6.0.0",
|
|
62
62
|
"@lezer/highlight": "^1.0.0",
|
|
63
|
-
"@stigmer/protos": "3.1.
|
|
64
|
-
"@stigmer/sdk": "3.1.
|
|
63
|
+
"@stigmer/protos": "3.1.3",
|
|
64
|
+
"@stigmer/sdk": "3.1.3",
|
|
65
65
|
"@tanstack/react-table": "^8.20.0",
|
|
66
66
|
"@xyflow/react": "^12.0.0",
|
|
67
67
|
"elkjs": "^0.9.0",
|
|
@@ -2,6 +2,8 @@ import { type ReactNode } from "react";
|
|
|
2
2
|
import type { ResourceRef } from "@stigmer/sdk";
|
|
3
3
|
import type { UseGitHubConnectionReturn } from "../github/useGitHubConnection.js";
|
|
4
4
|
import type { WorkspaceFileLister } from "../workspace/WorkspaceFileLister.js";
|
|
5
|
+
import type { WorkspaceFileReader } from "../workspace/WorkspaceFileReader.js";
|
|
6
|
+
import type { WorkspaceContentSearcher } from "../workspace/WorkspaceContentSearcher.js";
|
|
5
7
|
import type { HarnessOption } from "../models/harness.js";
|
|
6
8
|
import type { RuntimeEnvProvider } from "./runtime-env.js";
|
|
7
9
|
import type { SessionAudience } from "./audience.js";
|
|
@@ -34,6 +36,18 @@ export interface NewSessionViewerProps {
|
|
|
34
36
|
* expandable file tree. (DD-004 capability injection, DD-011 opt-in.)
|
|
35
37
|
*/
|
|
36
38
|
readonly workspaceFileLister?: WorkspaceFileLister;
|
|
39
|
+
/**
|
|
40
|
+
* Platform-injected content reader for the read-only file viewer. When set,
|
|
41
|
+
* clicking a file in the Workspace tree opens it in a contextual "Viewer"
|
|
42
|
+
* tab — the same capability `SessionViewer` accepts (DD-016 parity).
|
|
43
|
+
*/
|
|
44
|
+
readonly workspaceFileReader?: WorkspaceFileReader;
|
|
45
|
+
/**
|
|
46
|
+
* Platform-injected content (text) searcher — the same capability
|
|
47
|
+
* `SessionViewer` accepts (DD-016 parity). Desktop injects a native
|
|
48
|
+
* ripgrep-backed searcher; web leaves it undefined (DD-09).
|
|
49
|
+
*/
|
|
50
|
+
readonly workspaceContentSearcher?: WorkspaceContentSearcher;
|
|
37
51
|
/**
|
|
38
52
|
* Supplies host-app environment variables for the session's first
|
|
39
53
|
* execution (e.g. short-lived credentials for MCP tools, minted as
|
|
@@ -99,9 +113,10 @@ export interface NewSessionViewerProps {
|
|
|
99
113
|
* Owns `useNewSessionFlow` internally and composes:
|
|
100
114
|
* - **Centered composer** (primary pane): `SessionComposer` with all
|
|
101
115
|
* context pickers (agent, workspace, MCP servers, skills)
|
|
102
|
-
* - **
|
|
103
|
-
*
|
|
104
|
-
*
|
|
116
|
+
* - **Session panel** (secondary pane): the unified `WorkspaceSurface` with a
|
|
117
|
+
* Config rail view — collapsed by default behind a persistent top-right chip
|
|
118
|
+
* and homing on the Config facet when opened. Same layout model as
|
|
119
|
+
* `SessionViewer` (DD-016).
|
|
105
120
|
*
|
|
106
121
|
* Framework-agnostic — no Next.js, no Tauri, no routing deps. Host
|
|
107
122
|
* apps inject platform-specific values via props (DD-004/DD-016).
|
|
@@ -127,5 +142,5 @@ export interface NewSessionViewerProps {
|
|
|
127
142
|
* />
|
|
128
143
|
* ```
|
|
129
144
|
*/
|
|
130
|
-
export declare function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnection, enableGitHub, enableLocal, onBrowseLocalFolder, workspaceFileLister, getRuntimeEnv, audience, defaultHarness, initialAgentRef, initialInstanceId, initialAttachments, heading, placeholder, initialRows, autoFocus, footerContent, className, }: NewSessionViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
export declare function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnection, enableGitHub, enableLocal, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, getRuntimeEnv, audience, defaultHarness, initialAgentRef, initialInstanceId, initialAttachments, heading, placeholder, initialRows, autoFocus, footerContent, className, }: NewSessionViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
131
146
|
//# sourceMappingURL=NewSessionViewer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewSessionViewer.d.ts","sourceRoot":"","sources":["../../src/session/NewSessionViewer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"NewSessionViewer.d.ts","sourceRoot":"","sources":["../../src/session/NewSessionViewer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAGzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAS1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,wDAAwD;IACxD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,sEAAsE;IACtE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7C;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,yBAAyB,CAAC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AAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,gBAAgB,EAChB,OAAO,EACP,gBAAgB,EAChB,YAAmB,EACnB,WAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,EACb,QAAuB,EACvB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,OAA2C,EAC3C,WAAsD,EACtD,WAAe,EACf,SAAgB,EAChB,aAAa,EACb,SAAS,GACV,EAAE,qBAAqB,2CA6NvB"}
|
|
@@ -4,8 +4,12 @@ import { useCallback, useMemo, useState } from "react";
|
|
|
4
4
|
import { cn } from "@stigmer/theme";
|
|
5
5
|
import { SessionComposer } from "../composer/index.js";
|
|
6
6
|
import { ResizableSplit } from "../internal/ResizableSplit.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useWorkspaceEditors } from "../internal/store/index.js";
|
|
8
|
+
import { WorkspaceSurface } from "../workspace/WorkspaceSurface.js";
|
|
8
9
|
import { useNewSessionFlow } from "./useNewSessionFlow.js";
|
|
10
|
+
import { useSessionPanel } from "./useSessionPanel.js";
|
|
11
|
+
import { useSessionRailViews } from "./useSessionRailViews.js";
|
|
12
|
+
import { SessionPanelChip } from "./SessionPanelChip.js";
|
|
9
13
|
/**
|
|
10
14
|
* Full-featured new-session launcher organism — the pre-session analog
|
|
11
15
|
* of `SessionViewer`.
|
|
@@ -13,9 +17,10 @@ import { useNewSessionFlow } from "./useNewSessionFlow.js";
|
|
|
13
17
|
* Owns `useNewSessionFlow` internally and composes:
|
|
14
18
|
* - **Centered composer** (primary pane): `SessionComposer` with all
|
|
15
19
|
* context pickers (agent, workspace, MCP servers, skills)
|
|
16
|
-
* - **
|
|
17
|
-
*
|
|
18
|
-
*
|
|
20
|
+
* - **Session panel** (secondary pane): the unified `WorkspaceSurface` with a
|
|
21
|
+
* Config rail view — collapsed by default behind a persistent top-right chip
|
|
22
|
+
* and homing on the Config facet when opened. Same layout model as
|
|
23
|
+
* `SessionViewer` (DD-016).
|
|
19
24
|
*
|
|
20
25
|
* Framework-agnostic — no Next.js, no Tauri, no routing deps. Host
|
|
21
26
|
* apps inject platform-specific values via props (DD-004/DD-016).
|
|
@@ -41,7 +46,7 @@ import { useNewSessionFlow } from "./useNewSessionFlow.js";
|
|
|
41
46
|
* />
|
|
42
47
|
* ```
|
|
43
48
|
*/
|
|
44
|
-
export function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnection, enableGitHub = true, enableLocal = false, onBrowseLocalFolder, workspaceFileLister, getRuntimeEnv, audience = "integrator", defaultHarness, initialAgentRef, initialInstanceId, initialAttachments, heading = "What would you like to work on?", placeholder = "Describe what you need help with\u2026", initialRows = 3, autoFocus = true, footerContent, className, }) {
|
|
49
|
+
export function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnection, enableGitHub = true, enableLocal = false, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, getRuntimeEnv, audience = "integrator", defaultHarness, initialAgentRef, initialInstanceId, initialAttachments, heading = "What would you like to work on?", placeholder = "Describe what you need help with\u2026", initialRows = 3, autoFocus = true, footerContent, className, }) {
|
|
45
50
|
const flow = useNewSessionFlow({
|
|
46
51
|
org,
|
|
47
52
|
onSessionCreated,
|
|
@@ -51,11 +56,21 @@ export function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnect
|
|
|
51
56
|
});
|
|
52
57
|
const [interactionMode, setInteractionMode] = useState("agent");
|
|
53
58
|
const isEndUser = audience === "endUser";
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
// The unified-panel controller (shared with SessionViewer, DD-016). The
|
|
60
|
+
// launcher has no execution yet, so the FSM inputs are static. It has no
|
|
61
|
+
// streaming column to isolate either, so subscribing to the editor group in
|
|
62
|
+
// the body is harmless — unlike `SessionViewer`, which subscribes one level
|
|
63
|
+
// down. Homes on Config: pre-session the Explorer is empty, while Config
|
|
64
|
+
// carries the run defaults (harness/model) worth seeing before starting.
|
|
65
|
+
const panel = useSessionPanel({
|
|
66
|
+
phase: null,
|
|
67
|
+
hasChanges: false,
|
|
68
|
+
defaultView: "configure",
|
|
69
|
+
});
|
|
70
|
+
const { editors, activeKey, activeFile, reveal } = useWorkspaceEditors(panel.editorsStore);
|
|
71
|
+
// Honor a jump-to-line reveal only while it targets the active editor
|
|
72
|
+
// (DD-016 parity with SessionViewer).
|
|
73
|
+
const activeReveal = reveal && reveal.key === activeKey ? reveal : undefined;
|
|
59
74
|
const handleRemoveAgent = useCallback(() => {
|
|
60
75
|
flow.setAgentRef(null);
|
|
61
76
|
flow.setResolution(null);
|
|
@@ -89,20 +104,32 @@ export function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnect
|
|
|
89
104
|
flow.sessionVariables, flow.harness, flow.modelId,
|
|
90
105
|
isEndUser, handleRemoveAgent, handleRemoveMcp, handleRemoveSkill,
|
|
91
106
|
]);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
// Launcher facets: Config only — no executions exist yet, so the
|
|
108
|
+
// execution-derived facets (Changes/Artifacts/Usage) don't apply.
|
|
109
|
+
const railViews = useSessionRailViews({
|
|
110
|
+
allExecutions: [],
|
|
111
|
+
org,
|
|
112
|
+
sessionConfig,
|
|
113
|
+
selectedItem: null,
|
|
114
|
+
includeExecutionFacets: false,
|
|
115
|
+
});
|
|
116
|
+
// Explorer-footer folder attach (desktop only — needs the native picker).
|
|
117
|
+
const canAddLocalFolder = enableLocal && !!onBrowseLocalFolder;
|
|
118
|
+
const handleAddLocalFolder = useCallback(async () => {
|
|
119
|
+
const path = await onBrowseLocalFolder?.();
|
|
120
|
+
if (path)
|
|
121
|
+
flow.workspace.addLocalPath(path);
|
|
122
|
+
}, [onBrowseLocalFolder, flow.workspace.addLocalPath]);
|
|
123
|
+
const composerNode = (
|
|
124
|
+
// `my-auto` centers the composer vertically whether or not context is
|
|
125
|
+
// attached — safe-centering, not a special case: auto margins absorb free
|
|
126
|
+
// space when the composer is shorter than the pane and collapse to zero
|
|
127
|
+
// when it outgrows it, degrading to a normal top-aligned scroll. The
|
|
128
|
+
// scroll container's `py-6` keeps breathing room in that overflow case.
|
|
129
|
+
// Do NOT reintroduce a context-driven position flip: the composer must not
|
|
130
|
+
// move as context is attached (DD-16's layout-stability rationale — chrome
|
|
131
|
+
// that shifts with attached context reads as instability).
|
|
132
|
+
_jsx("div", { className: "flex h-full flex-col items-center overflow-y-auto px-4 py-6", children: _jsxs("div", { className: "my-auto w-full max-w-2xl space-y-6", children: [_jsx("h1", { className: "text-center text-lg font-medium text-foreground", children: heading }), _jsx(SessionComposer, { onSubmit: flow.submit, isSubmitting: flow.isSubmitting, org: org, workspace: flow.workspace, gitHubConnection: enableGitHub ? gitHubConnection : undefined, enableGitHub: enableGitHub, enableLocal: enableLocal, onBrowseLocalFolder: onBrowseLocalFolder, agentRef: flow.agentRef, onAgentRefChange: flow.setAgentRef, onAgentResolutionChange: flow.setResolution, initialAgentRef: initialAgentRef, initialInstanceId: initialInstanceId, initialAttachments: initialAttachments, lockAgent: isEndUser && initialAgentRef != null, mcpServerUsages: isEndUser ? undefined : flow.mcpServerUsages, onMcpServerUsagesChange: isEndUser ? undefined : flow.setMcpServerUsages, skillRefs: isEndUser ? undefined : flow.skillRefs, onSkillRefsChange: isEndUser ? undefined : flow.setSkillRefs, sessionVariables: isEndUser ? undefined : flow.sessionVariables, showHarnessSelector: true, harness: flow.harness, onHarnessChange: flow.setHarness, interactionMode: interactionMode, onInteractionModeChange: setInteractionMode, showInteractionModePicker: true, defaultModelId: flow.modelId, onModelChange: flow.setModelId, placeholder: placeholder, initialRows: initialRows, autoFocus: autoFocus, ariaLabel: "Start a new session" }), footerContent, _jsx("p", { className: "text-center text-[0.65rem] text-muted-foreground", children: "Press Enter to send, Shift+Enter for a new line" })] }) }));
|
|
133
|
+
return (_jsxs("div", { className: cn("relative flex h-full w-full flex-col", className), children: [_jsx("div", { className: "absolute top-2 right-6 z-10", children: _jsx(SessionPanelChip, { isOpen: panel.isOpen, onToggle: panel.isOpen ? panel.closePanel : panel.openPanel }) }), _jsx(ResizableSplit, { resizablePane: "primary", collapsedPane: panel.isOpen ? "none" : "secondary", defaultSize: 420, minSize: 320, maxSize: 640, storageKey: "stgm-new-session-chat-width", responsiveCollapse: panel.isOpen ? "primary" : "none", ariaLabel: "Resize composer panel", className: "min-h-0 flex-1", primary: composerNode, secondary: panel.isOpen ? (_jsx(WorkspaceSurface, { entries: flow.workspace.entries, lister: workspaceFileLister, reader: workspaceFileReader, searcher: workspaceContentSearcher, view: panel.view, onViewChange: panel.setView, extraViews: railViews, onRemoveEntry: flow.workspace.remove, onAddLocalFolder: canAddLocalFolder ? handleAddLocalFolder : undefined, editors: editors, selectedFile: activeFile, onOpenFile: panel.openFile, onActivateEditor: panel.activateEditor, onPinEditor: panel.pinEditor, onCloseEditor: panel.closeEditor, onCollapse: panel.closePanel, reveal: activeReveal, className: "h-full" })) : null })] }));
|
|
107
134
|
}
|
|
108
135
|
//# sourceMappingURL=NewSessionViewer.js.map
|