@vibefield/rosetta-room 0.0.0-stage → 0.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/README.md +247 -2
- package/dist/HistoryRoom.d.ts +98 -0
- package/dist/HistoryRoom.js +440 -0
- package/dist/TranscriptReader.d.ts +22 -0
- package/dist/TranscriptReader.js +72 -0
- package/dist/components/ColdStart.d.ts +4 -0
- package/dist/components/ColdStart.js +5 -0
- package/dist/components/FilterChips.d.ts +4 -0
- package/dist/components/FilterChips.js +5 -0
- package/dist/components/HostAct.d.ts +9 -0
- package/dist/components/HostAct.js +16 -0
- package/dist/components/HostMenu.d.ts +41 -0
- package/dist/components/HostMenu.js +216 -0
- package/dist/components/IngestStatus.d.ts +4 -0
- package/dist/components/IngestStatus.js +20 -0
- package/dist/components/ListActivityNotice.d.ts +5 -0
- package/dist/components/ListActivityNotice.js +4 -0
- package/dist/components/ListSections.d.ts +20 -0
- package/dist/components/ListSections.js +39 -0
- package/dist/components/RenameHeading.d.ts +9 -0
- package/dist/components/RenameHeading.js +75 -0
- package/dist/components/SearchStrip.d.ts +5 -0
- package/dist/components/SearchStrip.js +8 -0
- package/dist/components/SummaryMetrics.d.ts +13 -0
- package/dist/components/SummaryMetrics.js +9 -0
- package/dist/components/SummaryPanels.d.ts +35 -0
- package/dist/components/SummaryPanels.js +117 -0
- package/dist/components/Transcript.d.ts +46 -0
- package/dist/components/Transcript.js +358 -0
- package/dist/components/charts/ActivityChartDetail.d.ts +13 -0
- package/dist/components/charts/ActivityChartDetail.js +78 -0
- package/dist/components/charts/CalendarHeatmap.d.ts +16 -0
- package/dist/components/charts/CalendarHeatmap.js +55 -0
- package/dist/components/charts/DayActivityChart.d.ts +8 -0
- package/dist/components/charts/DayActivityChart.js +71 -0
- package/dist/components/charts/ModelsChartDetail.d.ts +7 -0
- package/dist/components/charts/ModelsChartDetail.js +19 -0
- package/dist/components/charts/ProjectChartDialog.d.ts +19 -0
- package/dist/components/charts/ProjectChartDialog.js +39 -0
- package/dist/components/charts/Streamgraph.d.ts +16 -0
- package/dist/components/charts/Streamgraph.js +94 -0
- package/dist/components/charts/Treemap.d.ts +26 -0
- package/dist/components/charts/Treemap.js +81 -0
- package/dist/components/charts/index.d.ts +9 -0
- package/dist/components/charts/index.js +4 -0
- package/dist/components/charts/streamgraph-layout.d.ts +23 -0
- package/dist/components/charts/streamgraph-layout.js +114 -0
- package/dist/components/charts/treemap-layout.d.ts +32 -0
- package/dist/components/charts/treemap-layout.js +140 -0
- package/dist/components/charts/types.d.ts +65 -0
- package/dist/components/charts/types.js +8 -0
- package/dist/components/file-viewer/FileViewerBrowsers.d.ts +10 -0
- package/dist/components/file-viewer/FileViewerBrowsers.js +65 -0
- package/dist/components/file-viewer/FileViewerDialog.d.ts +33 -0
- package/dist/components/file-viewer/FileViewerDialog.js +82 -0
- package/dist/components/file-viewer/FileViewerHeader.d.ts +26 -0
- package/dist/components/file-viewer/FileViewerHeader.js +17 -0
- package/dist/components/file-viewer/ImageGalleryDialog.d.ts +14 -0
- package/dist/components/file-viewer/ImageGalleryDialog.js +98 -0
- package/dist/components/file-viewer/diff/index.d.ts +2 -0
- package/dist/components/file-viewer/diff/index.js +2 -0
- package/dist/components/file-viewer/diff/parse.d.ts +2 -0
- package/dist/components/file-viewer/diff/parse.js +164 -0
- package/dist/components/file-viewer/diff/types.d.ts +44 -0
- package/dist/components/file-viewer/diff/types.js +7 -0
- package/dist/components/file-viewer/gallery-source.d.ts +11 -0
- package/dist/components/file-viewer/gallery-source.js +75 -0
- package/dist/components/file-viewer/image-resource.d.ts +19 -0
- package/dist/components/file-viewer/image-resource.js +60 -0
- package/dist/components/file-viewer/index.d.ts +5 -0
- package/dist/components/file-viewer/index.js +8 -0
- package/dist/components/file-viewer/markdown/blocks.d.ts +2 -0
- package/dist/components/file-viewer/markdown/blocks.js +277 -0
- package/dist/components/file-viewer/markdown/index.d.ts +4 -0
- package/dist/components/file-viewer/markdown/index.js +35 -0
- package/dist/components/file-viewer/markdown/inline.d.ts +10 -0
- package/dist/components/file-viewer/markdown/inline.js +178 -0
- package/dist/components/file-viewer/markdown/render.d.ts +9 -0
- package/dist/components/file-viewer/markdown/render.js +78 -0
- package/dist/components/file-viewer/markdown/types.d.ts +57 -0
- package/dist/components/file-viewer/markdown/types.js +11 -0
- package/dist/components/file-viewer/minimap/CodeMinimap.d.ts +10 -0
- package/dist/components/file-viewer/minimap/CodeMinimap.js +296 -0
- package/dist/components/file-viewer/minimap/layout.d.ts +60 -0
- package/dist/components/file-viewer/minimap/layout.js +117 -0
- package/dist/components/file-viewer/minimap/palette.d.ts +2 -0
- package/dist/components/file-viewer/minimap/palette.js +73 -0
- package/dist/components/file-viewer/minimap/raster.d.ts +19 -0
- package/dist/components/file-viewer/minimap/raster.js +122 -0
- package/dist/components/file-viewer/registry.d.ts +25 -0
- package/dist/components/file-viewer/registry.js +182 -0
- package/dist/components/file-viewer/syntax/grammars.d.ts +16 -0
- package/dist/components/file-viewer/syntax/grammars.js +221 -0
- package/dist/components/file-viewer/syntax/index.d.ts +8 -0
- package/dist/components/file-viewer/syntax/index.js +9 -0
- package/dist/components/file-viewer/syntax/languages.d.ts +14 -0
- package/dist/components/file-viewer/syntax/languages.js +115 -0
- package/dist/components/file-viewer/syntax/tokenize-config.d.ts +2 -0
- package/dist/components/file-viewer/syntax/tokenize-config.js +132 -0
- package/dist/components/file-viewer/syntax/tokenize-css.d.ts +2 -0
- package/dist/components/file-viewer/syntax/tokenize-css.js +169 -0
- package/dist/components/file-viewer/syntax/tokenize-markup.d.ts +2 -0
- package/dist/components/file-viewer/syntax/tokenize-markup.js +124 -0
- package/dist/components/file-viewer/syntax/tokenize.d.ts +9 -0
- package/dist/components/file-viewer/syntax/tokenize.js +289 -0
- package/dist/components/file-viewer/syntax/types.d.ts +74 -0
- package/dist/components/file-viewer/syntax/types.js +13 -0
- package/dist/components/file-viewer/types.d.ts +111 -0
- package/dist/components/file-viewer/types.js +8 -0
- package/dist/components/file-viewer/use-file-content.d.ts +26 -0
- package/dist/components/file-viewer/use-file-content.js +144 -0
- package/dist/components/file-viewer/views/BinaryView.d.ts +2 -0
- package/dist/components/file-viewer/views/BinaryView.js +34 -0
- package/dist/components/file-viewer/views/CodeView.d.ts +2 -0
- package/dist/components/file-viewer/views/CodeView.js +46 -0
- package/dist/components/file-viewer/views/DiffBody.d.ts +7 -0
- package/dist/components/file-viewer/views/DiffBody.js +77 -0
- package/dist/components/file-viewer/views/DiffView.d.ts +2 -0
- package/dist/components/file-viewer/views/DiffView.js +11 -0
- package/dist/components/file-viewer/views/ImageView.d.ts +9 -0
- package/dist/components/file-viewer/views/ImageView.js +28 -0
- package/dist/components/file-viewer/views/MarkdownView.d.ts +9 -0
- package/dist/components/file-viewer/views/MarkdownView.js +20 -0
- package/dist/components/file-viewer/views/SvgView.d.ts +9 -0
- package/dist/components/file-viewer/views/SvgView.js +10 -0
- package/dist/components/git/ChangeTree.d.ts +20 -0
- package/dist/components/git/ChangeTree.js +35 -0
- package/dist/components/git/CommitViewer.d.ts +12 -0
- package/dist/components/git/CommitViewer.js +85 -0
- package/dist/components/git/GitChanges.d.ts +17 -0
- package/dist/components/git/GitChanges.js +70 -0
- package/dist/components/git/GitHistory.d.ts +9 -0
- package/dist/components/git/GitHistory.js +58 -0
- package/dist/components/git/co-author.d.ts +14 -0
- package/dist/components/git/co-author.js +55 -0
- package/dist/components/git/git-file-source.d.ts +18 -0
- package/dist/components/git/git-file-source.js +53 -0
- package/dist/components/git/git-host.d.ts +24 -0
- package/dist/components/git/git-host.js +130 -0
- package/dist/components/git/index.d.ts +10 -0
- package/dist/components/git/index.js +12 -0
- package/dist/components/git/path-tree.d.ts +23 -0
- package/dist/components/git/path-tree.js +73 -0
- package/dist/components/git/session-files.d.ts +9 -0
- package/dist/components/git/session-files.js +50 -0
- package/dist/components/git/types.d.ts +92 -0
- package/dist/components/git/types.js +9 -0
- package/dist/components/projects/ProjectActivitySparkline.d.ts +6 -0
- package/dist/components/projects/ProjectActivitySparkline.js +12 -0
- package/dist/components/projects/ProjectList.d.ts +25 -0
- package/dist/components/projects/ProjectList.js +43 -0
- package/dist/components/projects/ProjectListItem.d.ts +19 -0
- package/dist/components/projects/ProjectListItem.js +78 -0
- package/dist/components/projects/ProjectsColumn.d.ts +19 -0
- package/dist/components/projects/ProjectsColumn.js +36 -0
- package/dist/components/projects/index.d.ts +8 -0
- package/dist/components/projects/index.js +4 -0
- package/dist/components/search/MatchStepper.d.ts +9 -0
- package/dist/components/search/MatchStepper.js +14 -0
- package/dist/components/search/SearchLauncher.d.ts +12 -0
- package/dist/components/search/SearchLauncher.js +13 -0
- package/dist/components/search/SearchSheet.d.ts +29 -0
- package/dist/components/search/SearchSheet.js +230 -0
- package/dist/components/search/index.d.ts +8 -0
- package/dist/components/search/index.js +4 -0
- package/dist/components/search/shortcut.d.ts +25 -0
- package/dist/components/search/shortcut.js +32 -0
- package/dist/components/sessions/SessionList.d.ts +24 -0
- package/dist/components/sessions/SessionList.js +76 -0
- package/dist/components/sessions/SessionListItem.d.ts +13 -0
- package/dist/components/sessions/SessionListItem.js +58 -0
- package/dist/components/sessions/SessionsColumn.d.ts +26 -0
- package/dist/components/sessions/SessionsColumn.js +32 -0
- package/dist/components/sessions/index.d.ts +9 -0
- package/dist/components/sessions/index.js +4 -0
- package/dist/components/sessions/session-display.d.ts +8 -0
- package/dist/components/sessions/session-display.js +18 -0
- package/dist/components/sessions/types.d.ts +7 -0
- package/dist/components/sessions/types.js +1 -0
- package/dist/components/transcript/Activity.d.ts +45 -0
- package/dist/components/transcript/Activity.js +75 -0
- package/dist/components/transcript/Anchor.d.ts +8 -0
- package/dist/components/transcript/Anchor.js +23 -0
- package/dist/components/transcript/Attachments.d.ts +21 -0
- package/dist/components/transcript/Attachments.js +138 -0
- package/dist/components/transcript/AuthoredMessage.d.ts +19 -0
- package/dist/components/transcript/AuthoredMessage.js +17 -0
- package/dist/components/transcript/Compaction.d.ts +9 -0
- package/dist/components/transcript/Compaction.js +50 -0
- package/dist/components/transcript/DayPill.d.ts +38 -0
- package/dist/components/transcript/DayPill.js +68 -0
- package/dist/components/transcript/Document.d.ts +32 -0
- package/dist/components/transcript/Document.js +503 -0
- package/dist/components/transcript/Favicon.d.ts +32 -0
- package/dist/components/transcript/Favicon.js +71 -0
- package/dist/components/transcript/HeadOfDocument.d.ts +19 -0
- package/dist/components/transcript/HeadOfDocument.js +44 -0
- package/dist/components/transcript/Ledger.d.ts +53 -0
- package/dist/components/transcript/Ledger.js +182 -0
- package/dist/components/transcript/LineDetail.d.ts +24 -0
- package/dist/components/transcript/LineDetail.js +81 -0
- package/dist/components/transcript/Marker.d.ts +33 -0
- package/dist/components/transcript/Marker.js +21 -0
- package/dist/components/transcript/MessagePreview.d.ts +12 -0
- package/dist/components/transcript/MessagePreview.js +58 -0
- package/dist/components/transcript/Prompt.d.ts +20 -0
- package/dist/components/transcript/Prompt.js +55 -0
- package/dist/components/transcript/Prose.d.ts +19 -0
- package/dist/components/transcript/Prose.js +109 -0
- package/dist/components/transcript/ReceiptPill.d.ts +10 -0
- package/dist/components/transcript/ReceiptPill.js +10 -0
- package/dist/components/transcript/ResponseHead.d.ts +9 -0
- package/dist/components/transcript/ResponseHead.js +36 -0
- package/dist/components/transcript/Subthread.d.ts +19 -0
- package/dist/components/transcript/Subthread.js +96 -0
- package/dist/components/transcript/Team.d.ts +53 -0
- package/dist/components/transcript/Team.js +185 -0
- package/dist/components/transcript/Thinking.d.ts +24 -0
- package/dist/components/transcript/Thinking.js +50 -0
- package/dist/components/transcript/TimelineMeta.d.ts +9 -0
- package/dist/components/transcript/TimelineMeta.js +161 -0
- package/dist/components/transcript/TranscriptLoading.d.ts +10 -0
- package/dist/components/transcript/TranscriptLoading.js +10 -0
- package/dist/components/transcript/WebDetail.d.ts +8 -0
- package/dist/components/transcript/WebDetail.js +29 -0
- package/dist/components/transcript/Workflow.d.ts +12 -0
- package/dist/components/transcript/Workflow.js +208 -0
- package/dist/components/transcript/activity-plan.d.ts +84 -0
- package/dist/components/transcript/activity-plan.js +209 -0
- package/dist/components/transcript/attachment-file-source.d.ts +23 -0
- package/dist/components/transcript/attachment-file-source.js +103 -0
- package/dist/components/transcript/attachment-gallery.d.ts +12 -0
- package/dist/components/transcript/attachment-gallery.js +33 -0
- package/dist/components/transcript/detail-parts.d.ts +50 -0
- package/dist/components/transcript/detail-parts.js +295 -0
- package/dist/components/transcript/disclosure-state.d.ts +6 -0
- package/dist/components/transcript/disclosure-state.js +32 -0
- package/dist/components/transcript/disclosure-store.d.ts +8 -0
- package/dist/components/transcript/disclosure-store.js +31 -0
- package/dist/components/transcript/document-model.d.ts +15 -0
- package/dist/components/transcript/document-model.js +104 -0
- package/dist/components/transcript/document-plan.d.ts +28 -0
- package/dist/components/transcript/document-plan.js +145 -0
- package/dist/components/transcript/fold-preference.d.ts +17 -0
- package/dist/components/transcript/fold-preference.js +63 -0
- package/dist/components/transcript/glyphs.d.ts +15 -0
- package/dist/components/transcript/glyphs.js +47 -0
- package/dist/components/transcript/index.d.ts +23 -0
- package/dist/components/transcript/index.js +22 -0
- package/dist/components/transcript/message-file-source.d.ts +15 -0
- package/dist/components/transcript/message-file-source.js +31 -0
- package/dist/components/transcript/message-preview.d.ts +9 -0
- package/dist/components/transcript/message-preview.js +46 -0
- package/dist/components/transcript/read-file-source.d.ts +7 -0
- package/dist/components/transcript/read-file-source.js +34 -0
- package/dist/components/transcript/reader-context.d.ts +13 -0
- package/dist/components/transcript/reader-context.js +55 -0
- package/dist/components/transcript/reading-identity.d.ts +2 -0
- package/dist/components/transcript/reading-identity.js +52 -0
- package/dist/components/transcript/scroll-to-row.d.ts +2 -0
- package/dist/components/transcript/scroll-to-row.js +13 -0
- package/dist/components/transcript/thread-index.d.ts +14 -0
- package/dist/components/transcript/thread-index.js +40 -0
- package/dist/components/transcript/thread-navigation.d.ts +5 -0
- package/dist/components/transcript/thread-navigation.js +3 -0
- package/dist/components/transcript/timeline-meta-file-source.d.ts +6 -0
- package/dist/components/transcript/timeline-meta-file-source.js +55 -0
- package/dist/components/transcript/timeline-meta-state.d.ts +12 -0
- package/dist/components/transcript/timeline-meta-state.js +24 -0
- package/dist/components/ui/ColumnHeading.d.ts +27 -0
- package/dist/components/ui/ColumnHeading.js +7 -0
- package/dist/components/ui/ConfirmDialog.d.ts +14 -0
- package/dist/components/ui/ConfirmDialog.js +22 -0
- package/dist/components/ui/DialogShell.d.ts +18 -0
- package/dist/components/ui/DialogShell.js +40 -0
- package/dist/components/ui/EmptyState.d.ts +10 -0
- package/dist/components/ui/EmptyState.js +6 -0
- package/dist/components/ui/ListSummaryHeader.d.ts +9 -0
- package/dist/components/ui/ListSummaryHeader.js +6 -0
- package/dist/components/ui/ListToolbar.d.ts +6 -0
- package/dist/components/ui/ListToolbar.js +5 -0
- package/dist/components/ui/ResultGroupHeader.d.ts +9 -0
- package/dist/components/ui/ResultGroupHeader.js +5 -0
- package/dist/components/ui/SegmentedControl.d.ts +16 -0
- package/dist/components/ui/SegmentedControl.js +9 -0
- package/dist/components/ui/SummaryMetric.d.ts +13 -0
- package/dist/components/ui/SummaryMetric.js +10 -0
- package/dist/components/ui/Veil.d.ts +7 -0
- package/dist/components/ui/Veil.js +5 -0
- package/dist/components/ui/index.d.ts +20 -0
- package/dist/components/ui/index.js +10 -0
- package/dist/components/worktree/WorktreeColumn.d.ts +22 -0
- package/dist/components/worktree/WorktreeColumn.js +170 -0
- package/dist/components/worktree/WorktreeFileTree.d.ts +19 -0
- package/dist/components/worktree/WorktreeFileTree.js +60 -0
- package/dist/components/worktree/WorktreeHeader.d.ts +32 -0
- package/dist/components/worktree/WorktreeHeader.js +81 -0
- package/dist/components/worktree/WorktreeList.d.ts +8 -0
- package/dist/components/worktree/WorktreeList.js +12 -0
- package/dist/components/worktree/index.d.ts +12 -0
- package/dist/components/worktree/index.js +7 -0
- package/dist/components/worktree/types.d.ts +17 -0
- package/dist/components/worktree/types.js +3 -0
- package/dist/components/worktree/use-worktree-guest.d.ts +21 -0
- package/dist/components/worktree/use-worktree-guest.js +92 -0
- package/dist/components/worktree/worktree-file-commands.d.ts +19 -0
- package/dist/components/worktree/worktree-file-commands.js +112 -0
- package/dist/components/worktree/worktree-file-source.d.ts +15 -0
- package/dist/components/worktree/worktree-file-source.js +75 -0
- package/dist/components/worktree/worktree-host.d.ts +31 -0
- package/dist/components/worktree/worktree-host.js +242 -0
- package/dist/fixtures/index.d.ts +24 -0
- package/dist/fixtures/index.js +292 -0
- package/dist/host-inputs.d.ts +231 -0
- package/dist/host-inputs.js +35 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +14 -0
- package/dist/lib/activity-details.d.ts +23 -0
- package/dist/lib/activity-details.js +78 -0
- package/dist/lib/activity-order.d.ts +32 -0
- package/dist/lib/activity-order.js +86 -0
- package/dist/lib/agent-paths.d.ts +6 -0
- package/dist/lib/agent-paths.js +19 -0
- package/dist/lib/agents.d.ts +15 -0
- package/dist/lib/agents.js +60 -0
- package/dist/lib/catalog-status.d.ts +3 -0
- package/dist/lib/catalog-status.js +10 -0
- package/dist/lib/chart-data.d.ts +14 -0
- package/dist/lib/chart-data.js +151 -0
- package/dist/lib/day-activity.d.ts +21 -0
- package/dist/lib/day-activity.js +56 -0
- package/dist/lib/format.d.ts +24 -0
- package/dist/lib/format.js +116 -0
- package/dist/lib/hooks.d.ts +118 -0
- package/dist/lib/hooks.js +608 -0
- package/dist/lib/icons.d.ts +21 -0
- package/dist/lib/icons.js +49 -0
- package/dist/lib/image-media.d.ts +6 -0
- package/dist/lib/image-media.js +30 -0
- package/dist/lib/ingest-activity.d.ts +50 -0
- package/dist/lib/ingest-activity.js +151 -0
- package/dist/lib/ingest.d.ts +25 -0
- package/dist/lib/ingest.js +70 -0
- package/dist/lib/model-labels.d.ts +5 -0
- package/dist/lib/model-labels.js +28 -0
- package/dist/lib/model.d.ts +73 -0
- package/dist/lib/model.js +141 -0
- package/dist/lib/motion.d.ts +13 -0
- package/dist/lib/motion.js +80 -0
- package/dist/lib/room-storage.d.ts +13 -0
- package/dist/lib/room-storage.js +40 -0
- package/dist/lib/search-results.d.ts +27 -0
- package/dist/lib/search-results.js +83 -0
- package/dist/lib/search-sheet.d.ts +119 -0
- package/dist/lib/search-sheet.js +282 -0
- package/dist/lib/sections.d.ts +19 -0
- package/dist/lib/sections.js +36 -0
- package/dist/lib/session-activity.d.ts +5 -0
- package/dist/lib/session-activity.js +15 -0
- package/dist/lib/session-leases.d.ts +15 -0
- package/dist/lib/session-leases.js +61 -0
- package/dist/lib/spend.d.ts +42 -0
- package/dist/lib/spend.js +112 -0
- package/dist/lib/tint.d.ts +9 -0
- package/dist/lib/tint.js +53 -0
- package/dist/lib/transcript/collaboration.d.ts +97 -0
- package/dist/lib/transcript/collaboration.js +423 -0
- package/dist/lib/transcript/families.d.ts +212 -0
- package/dist/lib/transcript/families.js +906 -0
- package/dist/lib/transcript/favicons.d.ts +54 -0
- package/dist/lib/transcript/favicons.js +183 -0
- package/dist/lib/transcript/head-of-document.d.ts +27 -0
- package/dist/lib/transcript/head-of-document.js +274 -0
- package/dist/lib/transcript/head-state.d.ts +182 -0
- package/dist/lib/transcript/head-state.js +305 -0
- package/dist/lib/transcript/history-window.d.ts +13 -0
- package/dist/lib/transcript/history-window.js +52 -0
- package/dist/lib/transcript/images.d.ts +8 -0
- package/dist/lib/transcript/images.js +60 -0
- package/dist/lib/transcript/index.d.ts +15 -0
- package/dist/lib/transcript/index.js +8 -0
- package/dist/lib/transcript/ledger.d.ts +143 -0
- package/dist/lib/transcript/ledger.js +513 -0
- package/dist/lib/transcript/protocol.d.ts +23 -0
- package/dist/lib/transcript/protocol.js +1 -0
- package/dist/lib/transcript/sittings.d.ts +75 -0
- package/dist/lib/transcript/sittings.js +147 -0
- package/dist/lib/transcript/tail-scroll.d.ts +36 -0
- package/dist/lib/transcript/tail-scroll.js +167 -0
- package/dist/lib/transcript/tail-state.d.ts +17 -0
- package/dist/lib/transcript/tail-state.js +30 -0
- package/dist/lib/transcript/turns.d.ts +192 -0
- package/dist/lib/transcript/turns.js +576 -0
- package/dist/lib/transcript/use-transcript-opening.d.ts +12 -0
- package/dist/lib/transcript/use-transcript-opening.js +31 -0
- package/dist/lib/transcript/use-transcript-tail.d.ts +25 -0
- package/dist/lib/transcript/use-transcript-tail.js +158 -0
- package/dist/lib/transcript/vocabulary.d.ts +119 -0
- package/dist/lib/transcript/vocabulary.js +293 -0
- package/dist/lib/transcript/web-address.d.ts +6 -0
- package/dist/lib/transcript/web-address.js +18 -0
- package/dist/lib/transcript/workflow.d.ts +31 -0
- package/dist/lib/transcript/workflow.js +133 -0
- package/dist/lib/use-activity-order.d.ts +2 -0
- package/dist/lib/use-activity-order.js +23 -0
- package/dist/lib/use-day-usage.d.ts +8 -0
- package/dist/lib/use-day-usage.js +31 -0
- package/dist/lib/use-deferred-list-order.d.ts +26 -0
- package/dist/lib/use-deferred-list-order.js +142 -0
- package/dist/lib/use-ingest-activity.d.ts +2 -0
- package/dist/lib/use-ingest-activity.js +49 -0
- package/dist/lib/use-list-motion.d.ts +4 -0
- package/dist/lib/use-list-motion.js +67 -0
- package/dist/ports.d.ts +222 -0
- package/dist/ports.js +3 -0
- package/dist/room-context.d.ts +60 -0
- package/dist/room-context.js +87 -0
- package/dist/styles/activity-chart.css +127 -0
- package/dist/styles/attachments.css +29 -0
- package/dist/styles/favicon.css +73 -0
- package/dist/styles/history-room.css +18 -0
- package/dist/styles/host-inputs.css +250 -0
- package/dist/styles/image-gallery.css +30 -0
- package/dist/styles/ingest.css +51 -0
- package/dist/styles/message-preview.css +34 -0
- package/dist/styles/models-chart.css +66 -0
- package/dist/styles/project-chart.css +19 -0
- package/dist/styles/reader.css +33 -0
- package/dist/styles/room.css +1411 -0
- package/dist/styles/search.css +252 -0
- package/dist/styles/transcript-activity.css +70 -0
- package/dist/styles/transcript-head.css +220 -0
- package/dist/styles/transcript-loading.css +57 -0
- package/dist/styles/transcript.css +1226 -0
- package/package.json +61 -4
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Which agent a `Co-authored-by` trailer names.
|
|
2
|
+
//
|
|
3
|
+
// A trailer is free text someone's tool wrote, so this is recognition, not
|
|
4
|
+
// lookup: it matches the addresses and names the coding agents actually sign
|
|
5
|
+
// with, and answers `null` for anything it does not know. A wrong mark is
|
|
6
|
+
// worse than no mark — it would attribute a person's commit to a machine —
|
|
7
|
+
// so every rule here is a match on something an agent puts there on purpose,
|
|
8
|
+
// never a guess from a name that merely looks automated.
|
|
9
|
+
/** Ordered: the first match wins, so the specific addresses come before the
|
|
10
|
+
* looser name patterns. */
|
|
11
|
+
const RULES = [
|
|
12
|
+
{ kind: "claude-code", email: /@anthropic\.com$/ },
|
|
13
|
+
{ kind: "claude-code", name: /\bclaude\b/ },
|
|
14
|
+
{ kind: "codex", email: /^codex@|chatgpt@/ },
|
|
15
|
+
{ kind: "codex", name: /\bcodex\b/ },
|
|
16
|
+
{ kind: "cursor", email: /@cursor\.(com|sh)$/, },
|
|
17
|
+
{ kind: "cursor", name: /\bcursor\b/ },
|
|
18
|
+
{ kind: "github-copilot", email: /copilot@/ },
|
|
19
|
+
{ kind: "github-copilot", name: /\bcopilot\b/ },
|
|
20
|
+
{ kind: "gemini-cli", name: /\bgemini\b/ },
|
|
21
|
+
{ kind: "opencode", name: /\bopencode\b/ },
|
|
22
|
+
{ kind: "amp", email: /@ampcode\.com$/ },
|
|
23
|
+
{ kind: "windsurf", name: /\bwindsurf\b/ },
|
|
24
|
+
{ kind: "cline", name: /\bcline\b/ },
|
|
25
|
+
{ kind: "grok", name: /\bgrok\b/ },
|
|
26
|
+
{ kind: "kimi-code", name: /\bkimi\b/ },
|
|
27
|
+
{ kind: "antigravity", name: /\bantigravity\b/ },
|
|
28
|
+
{ kind: "devin", email: /@devin\.ai$/ },
|
|
29
|
+
];
|
|
30
|
+
/** The runtime kind this co-author is, or `null` when nothing recognises it —
|
|
31
|
+
* which is how a human co-author stays a human. */
|
|
32
|
+
export function agentKindOf(author) {
|
|
33
|
+
const email = (author.email ?? "").toLowerCase();
|
|
34
|
+
const name = author.name.toLowerCase();
|
|
35
|
+
for (const rule of RULES) {
|
|
36
|
+
if (rule.email !== undefined && email !== "" && rule.email.test(email))
|
|
37
|
+
return rule.kind;
|
|
38
|
+
if (rule.name !== undefined && rule.name.test(name))
|
|
39
|
+
return rule.kind;
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
/** The agents credited on a commit, deduplicated by kind and in trailer
|
|
44
|
+
* order. Two trailers for one agent is one mark, because the row is saying
|
|
45
|
+
* WHICH agent, not how many times it signed. */
|
|
46
|
+
export function creditedAgents(coAuthors) {
|
|
47
|
+
const seen = new Map();
|
|
48
|
+
for (const author of coAuthors) {
|
|
49
|
+
const kind = agentKindOf(author);
|
|
50
|
+
if (kind === null || seen.has(kind))
|
|
51
|
+
continue;
|
|
52
|
+
seen.set(kind, { kind, label: author.name });
|
|
53
|
+
}
|
|
54
|
+
return [...seen.values()];
|
|
55
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FileHandle, FileSource } from "../file-viewer/index.js";
|
|
2
|
+
import type { DiffRequest, GitClient } from "./types.js";
|
|
3
|
+
/** A handle for one side of one file's change. */
|
|
4
|
+
export declare function diffHandle(request: DiffRequest, options: {
|
|
5
|
+
readonly root: string;
|
|
6
|
+
readonly label: string;
|
|
7
|
+
}): FileHandle;
|
|
8
|
+
/** Which side this handle is a view of, for the dialog's caption. */
|
|
9
|
+
export declare function diffSideLabel(request: DiffRequest): string;
|
|
10
|
+
/**
|
|
11
|
+
* A `FileSource` that answers with diffs.
|
|
12
|
+
*
|
|
13
|
+
* `read` is never called — every kind this source serves declares the
|
|
14
|
+
* `compare` payload — but the contract requires it, and throwing names the
|
|
15
|
+
* mistake rather than returning empty bytes that would render as a blank
|
|
16
|
+
* file.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createGitFileSource(client: GitClient): FileSource;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// The adapter between the git column and the file viewer — the only file that
|
|
2
|
+
// knows both what a `GitClient` is and what a `FileSource` is.
|
|
3
|
+
//
|
|
4
|
+
// The viewer shows one file. A diff is one file with two versions, so the
|
|
5
|
+
// same dialog serves both: the column hands it a handle whose `ref` names the
|
|
6
|
+
// side of the index to diff against, and the viewer neither knows nor asks
|
|
7
|
+
// where the text came from.
|
|
8
|
+
const isGitRef = (value) => value !== null && typeof value === "object" && "request" in value;
|
|
9
|
+
/** A handle for one side of one file's change. */
|
|
10
|
+
export function diffHandle(request, options) {
|
|
11
|
+
const name = request.path.slice(request.path.lastIndexOf("/") + 1);
|
|
12
|
+
return {
|
|
13
|
+
// The side is part of the identity: the staged and unstaged halves of one
|
|
14
|
+
// file are two different documents, and switching between them must
|
|
15
|
+
// remount rather than reuse the last read.
|
|
16
|
+
key: `${options.root}#${request.sha ?? (request.staged === true ? "index" : "worktree")}#${request.path}`,
|
|
17
|
+
name,
|
|
18
|
+
path: `${options.root}/${request.path}`,
|
|
19
|
+
// A diff's size is not the file's size, and the viewer's byte limits are
|
|
20
|
+
// about what it must decode. git's output is bounded host-side.
|
|
21
|
+
size: 0,
|
|
22
|
+
ref: { request },
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** Which side this handle is a view of, for the dialog's caption. */
|
|
26
|
+
export function diffSideLabel(request) {
|
|
27
|
+
if (request.sha !== undefined)
|
|
28
|
+
return request.sha.slice(0, 7);
|
|
29
|
+
return request.staged === true ? "staged" : "unstaged";
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A `FileSource` that answers with diffs.
|
|
33
|
+
*
|
|
34
|
+
* `read` is never called — every kind this source serves declares the
|
|
35
|
+
* `compare` payload — but the contract requires it, and throwing names the
|
|
36
|
+
* mistake rather than returning empty bytes that would render as a blank
|
|
37
|
+
* file.
|
|
38
|
+
*/
|
|
39
|
+
export function createGitFileSource(client) {
|
|
40
|
+
return {
|
|
41
|
+
read() {
|
|
42
|
+
return Promise.reject(new Error("a diff is read through compare(), not read()"));
|
|
43
|
+
},
|
|
44
|
+
async compare(handle) {
|
|
45
|
+
if (!isGitRef(handle.ref))
|
|
46
|
+
throw new Error("that file is no longer in the change set");
|
|
47
|
+
const answer = await client.diff(handle.ref.request);
|
|
48
|
+
if (answer.error !== null)
|
|
49
|
+
throw new Error(answer.error);
|
|
50
|
+
return { unified: answer.text };
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { GitClient } from "./types.js";
|
|
2
|
+
export interface GitConnection {
|
|
3
|
+
readonly client: GitClient;
|
|
4
|
+
/** The root the process behind this client is serving. */
|
|
5
|
+
readonly root: string;
|
|
6
|
+
readonly generation: number;
|
|
7
|
+
dispose(): void;
|
|
8
|
+
}
|
|
9
|
+
/** Connect the git half only after `worktree-host` has accepted the paired
|
|
10
|
+
* generation. Disposal closes the port and rejects every pending request. */
|
|
11
|
+
export declare function connectGitClient(port: MessagePort, root: string, generation: number): GitConnection;
|
|
12
|
+
export type Refresh = () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Poll one read off a client.
|
|
15
|
+
*
|
|
16
|
+
* `read` must be stable. The value is `null` until the first answer, and a
|
|
17
|
+
* failed read keeps the last good value rather than blanking the column —
|
|
18
|
+
* a repository mid-rebase answers nothing for a moment, and that is not a
|
|
19
|
+
* reason to tell the reader their work disappeared.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useGitRead<T>(connection: GitConnection | null, read: (client: GitClient) => Promise<T>, refreshKey: number): {
|
|
22
|
+
value: T | null;
|
|
23
|
+
refresh: Refresh;
|
|
24
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// The renderer's git client over the git half of a paired worktree
|
|
2
|
+
// connection. Port ownership and generation arbitration live in
|
|
3
|
+
// `worktree-host`; this module only turns one already-accepted port into a
|
|
4
|
+
// disposable request/response client.
|
|
5
|
+
import { useCallback, useEffect, useState } from "react";
|
|
6
|
+
/** A read that has not been asked for in this long is asked again. Slow on
|
|
7
|
+
* purpose: this is a repository someone else is editing, and the room is a
|
|
8
|
+
* reader that must not turn into a poller. */
|
|
9
|
+
const POLL_MS = 4_000;
|
|
10
|
+
/** A `GitClient` over one port. Requests are correlated by id; the port has a
|
|
11
|
+
* single consumer, so the id space is local and monotonic. */
|
|
12
|
+
function connect(port) {
|
|
13
|
+
let nextId = 0;
|
|
14
|
+
let disposed = false;
|
|
15
|
+
const waiting = new Map();
|
|
16
|
+
const onMessage = (event) => {
|
|
17
|
+
const reply = event.data;
|
|
18
|
+
if (typeof reply?.id !== "number")
|
|
19
|
+
return;
|
|
20
|
+
const settle = waiting.get(reply.id);
|
|
21
|
+
if (settle === undefined)
|
|
22
|
+
return;
|
|
23
|
+
waiting.delete(reply.id);
|
|
24
|
+
if (reply.ok === true)
|
|
25
|
+
settle.resolve(reply.value);
|
|
26
|
+
else
|
|
27
|
+
settle.reject(new Error(reply.error ?? "the git command failed"));
|
|
28
|
+
};
|
|
29
|
+
const rejectWaiting = (message) => {
|
|
30
|
+
const error = new Error(message);
|
|
31
|
+
for (const request of waiting.values())
|
|
32
|
+
request.reject(error);
|
|
33
|
+
waiting.clear();
|
|
34
|
+
};
|
|
35
|
+
const onMessageError = () => rejectWaiting("the git connection closed");
|
|
36
|
+
port.addEventListener("message", onMessage);
|
|
37
|
+
port.addEventListener("messageerror", onMessageError);
|
|
38
|
+
port.start();
|
|
39
|
+
const call = (op, args) => new Promise((resolve, reject) => {
|
|
40
|
+
if (disposed) {
|
|
41
|
+
reject(new Error("the git connection closed"));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const id = (nextId += 1);
|
|
45
|
+
waiting.set(id, {
|
|
46
|
+
resolve: (value) => resolve(value),
|
|
47
|
+
reject,
|
|
48
|
+
});
|
|
49
|
+
try {
|
|
50
|
+
port.postMessage({ id, op, args });
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
waiting.delete(id);
|
|
54
|
+
reject(error instanceof Error ? error : new Error("the git connection closed"));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const client = {
|
|
58
|
+
branch: () => call("branch"),
|
|
59
|
+
status: () => call("status"),
|
|
60
|
+
log: () => call("log"),
|
|
61
|
+
diff: (request) => call("diff", request),
|
|
62
|
+
commitFiles: (sha) => call("commitFiles", sha),
|
|
63
|
+
stage: (paths) => call("stage", paths),
|
|
64
|
+
unstage: (paths) => call("unstage", paths),
|
|
65
|
+
discard: (paths) => call("discard", paths),
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
client,
|
|
69
|
+
dispose: () => {
|
|
70
|
+
if (disposed)
|
|
71
|
+
return;
|
|
72
|
+
disposed = true;
|
|
73
|
+
port.removeEventListener("message", onMessage);
|
|
74
|
+
port.removeEventListener("messageerror", onMessageError);
|
|
75
|
+
rejectWaiting("the git connection closed");
|
|
76
|
+
port.close();
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/** Connect the git half only after `worktree-host` has accepted the paired
|
|
81
|
+
* generation. Disposal closes the port and rejects every pending request. */
|
|
82
|
+
export function connectGitClient(port, root, generation) {
|
|
83
|
+
const connected = connect(port);
|
|
84
|
+
return {
|
|
85
|
+
client: connected.client,
|
|
86
|
+
root,
|
|
87
|
+
generation,
|
|
88
|
+
dispose: connected.dispose,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Poll one read off a client.
|
|
93
|
+
*
|
|
94
|
+
* `read` must be stable. The value is `null` until the first answer, and a
|
|
95
|
+
* failed read keeps the last good value rather than blanking the column —
|
|
96
|
+
* a repository mid-rebase answers nothing for a moment, and that is not a
|
|
97
|
+
* reason to tell the reader their work disappeared.
|
|
98
|
+
*/
|
|
99
|
+
export function useGitRead(connection, read, refreshKey) {
|
|
100
|
+
const [value, setValue] = useState(null);
|
|
101
|
+
const [tick, setTick] = useState(0);
|
|
102
|
+
const refresh = useCallback(() => setTick((n) => n + 1), []);
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
if (connection === null) {
|
|
105
|
+
setValue(null);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
let cancelled = false;
|
|
109
|
+
const run = () => {
|
|
110
|
+
void read(connection.client)
|
|
111
|
+
.then((next) => {
|
|
112
|
+
if (!cancelled)
|
|
113
|
+
setValue(next);
|
|
114
|
+
})
|
|
115
|
+
.catch(() => {
|
|
116
|
+
// A read that failed is not news the column can act on; the next
|
|
117
|
+
// tick will try again, and the last good answer stays on screen.
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
run();
|
|
121
|
+
const timer = window.setInterval(run, POLL_MS);
|
|
122
|
+
return () => {
|
|
123
|
+
cancelled = true;
|
|
124
|
+
window.clearInterval(timer);
|
|
125
|
+
};
|
|
126
|
+
// `read` is a stable module-level function per call site.
|
|
127
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
128
|
+
}, [connection, tick, refreshKey]);
|
|
129
|
+
return { value, refresh };
|
|
130
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { ChangeTree } from "./ChangeTree.js";
|
|
2
|
+
export { creditedAgents } from "./co-author.js";
|
|
3
|
+
export { CommitViewer } from "./CommitViewer.js";
|
|
4
|
+
export { createGitFileSource, diffHandle } from "./git-file-source.js";
|
|
5
|
+
export { useGitRead } from "./git-host.js";
|
|
6
|
+
export { changeShapeOf, GitChanges } from "./GitChanges.js";
|
|
7
|
+
export { GitHistory } from "./GitHistory.js";
|
|
8
|
+
export { buildPathTree, filesUnder } from "./path-tree.js";
|
|
9
|
+
export { sessionFilePaths } from "./session-files.js";
|
|
10
|
+
export type { BranchFacts, CoAuthor, Commit, CommitFile, GitClient, StatusEntry, StatusLetter, } from "./types.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// The git half of column ③ — what the repository has not recorded yet, and
|
|
2
|
+
// what it has. The column that hosts these lives in `components/worktree`,
|
|
3
|
+
// because files, changes and history are three views of one checkout.
|
|
4
|
+
export { ChangeTree } from "./ChangeTree.js";
|
|
5
|
+
export { creditedAgents } from "./co-author.js";
|
|
6
|
+
export { CommitViewer } from "./CommitViewer.js";
|
|
7
|
+
export { createGitFileSource, diffHandle } from "./git-file-source.js";
|
|
8
|
+
export { useGitRead } from "./git-host.js";
|
|
9
|
+
export { changeShapeOf, GitChanges } from "./GitChanges.js";
|
|
10
|
+
export { GitHistory } from "./GitHistory.js";
|
|
11
|
+
export { buildPathTree, filesUnder } from "./path-tree.js";
|
|
12
|
+
export { sessionFilePaths } from "./session-files.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** A directory whose only child is another directory is drawn as one row —
|
|
2
|
+
* `crates/store/src` rather than three rows deep. The design record refuses
|
|
3
|
+
* this for column ③ (a walked tree's "only one child" is a claim about the
|
|
4
|
+
* walk); here it is safe, because the set is closed and git named all of it. */
|
|
5
|
+
export interface TreeRow {
|
|
6
|
+
readonly kind: "directory" | "file";
|
|
7
|
+
/** What the row shows: a file's name, or a folder's collapsed path. */
|
|
8
|
+
readonly label: string;
|
|
9
|
+
/** Full workspace-relative path. Directories carry theirs too, so a folder
|
|
10
|
+
* can be acted on as the set of files beneath it. */
|
|
11
|
+
readonly path: string;
|
|
12
|
+
readonly depth: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Build the subtree over `paths`.
|
|
16
|
+
*
|
|
17
|
+
* Directories sort before files and both sort naturally, which is the order
|
|
18
|
+
* mille draws column ③ in — two lists of the same repository that disagreed
|
|
19
|
+
* about order would be two lists.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildPathTree(paths: readonly string[]): readonly TreeRow[];
|
|
22
|
+
/** Every file at or beneath `row` — what acting on a folder row acts on. */
|
|
23
|
+
export declare function filesUnder(rows: readonly TreeRow[], row: TreeRow): readonly string[];
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Paths → a subtree, which is the shape the design record asks for:
|
|
2
|
+
// "Each group is a *subtree*, not a filtered list — a folder survives when
|
|
3
|
+
// anything inside it survives — so a path a reader learned in one view still
|
|
4
|
+
// holds in the other."
|
|
5
|
+
//
|
|
6
|
+
// Pure, and deliberately not mille: mille walks a real directory, and these
|
|
7
|
+
// rows are a set of paths git named. They wear the same geometry so the two
|
|
8
|
+
// columns read as one repository, and they do not pretend to be the same
|
|
9
|
+
// component.
|
|
10
|
+
const node = () => ({ children: new Map(), files: [] });
|
|
11
|
+
/**
|
|
12
|
+
* Build the subtree over `paths`.
|
|
13
|
+
*
|
|
14
|
+
* Directories sort before files and both sort naturally, which is the order
|
|
15
|
+
* mille draws column ③ in — two lists of the same repository that disagreed
|
|
16
|
+
* about order would be two lists.
|
|
17
|
+
*/
|
|
18
|
+
export function buildPathTree(paths) {
|
|
19
|
+
const root = node();
|
|
20
|
+
for (const path of paths) {
|
|
21
|
+
const segments = path.split("/").filter((s) => s !== "");
|
|
22
|
+
if (segments.length === 0)
|
|
23
|
+
continue;
|
|
24
|
+
let current = root;
|
|
25
|
+
for (const segment of segments.slice(0, -1)) {
|
|
26
|
+
let next = current.children.get(segment);
|
|
27
|
+
if (next === undefined) {
|
|
28
|
+
next = node();
|
|
29
|
+
current.children.set(segment, next);
|
|
30
|
+
}
|
|
31
|
+
current = next;
|
|
32
|
+
}
|
|
33
|
+
current.files.push(segments[segments.length - 1]);
|
|
34
|
+
}
|
|
35
|
+
const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: "base" });
|
|
36
|
+
const rows = [];
|
|
37
|
+
const walk = (current, prefix, depth) => {
|
|
38
|
+
const directories = [...current.children.entries()].sort((a, b) => collator.compare(a[0], b[0]));
|
|
39
|
+
for (const [name, child] of directories) {
|
|
40
|
+
// Collapse a chain of single-child directories into one row.
|
|
41
|
+
let label = name;
|
|
42
|
+
let path = prefix === "" ? name : `${prefix}/${name}`;
|
|
43
|
+
let inner = child;
|
|
44
|
+
while (inner.files.length === 0 && inner.children.size === 1) {
|
|
45
|
+
const [onlyName, onlyChild] = [...inner.children.entries()][0];
|
|
46
|
+
label = `${label}/${onlyName}`;
|
|
47
|
+
path = `${path}/${onlyName}`;
|
|
48
|
+
inner = onlyChild;
|
|
49
|
+
}
|
|
50
|
+
rows.push({ kind: "directory", label, path, depth });
|
|
51
|
+
walk(inner, path, depth + 1);
|
|
52
|
+
}
|
|
53
|
+
for (const name of [...current.files].sort(collator.compare)) {
|
|
54
|
+
rows.push({
|
|
55
|
+
kind: "file",
|
|
56
|
+
label: name,
|
|
57
|
+
path: prefix === "" ? name : `${prefix}/${name}`,
|
|
58
|
+
depth,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
walk(root, "", 0);
|
|
63
|
+
return rows;
|
|
64
|
+
}
|
|
65
|
+
/** Every file at or beneath `row` — what acting on a folder row acts on. */
|
|
66
|
+
export function filesUnder(rows, row) {
|
|
67
|
+
if (row.kind === "file")
|
|
68
|
+
return [row.path];
|
|
69
|
+
const prefix = `${row.path}/`;
|
|
70
|
+
return rows
|
|
71
|
+
.filter((candidate) => candidate.kind === "file" && candidate.path.startsWith(prefix))
|
|
72
|
+
.map((candidate) => candidate.path);
|
|
73
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TimelineEntry } from "@vibefield/rosetta-protocol";
|
|
2
|
+
/**
|
|
3
|
+
* Workspace-relative paths this session's file-change actions named.
|
|
4
|
+
*
|
|
5
|
+
* Absolute paths are made relative to `root` so they match what git prints;
|
|
6
|
+
* a path outside the root is dropped rather than shown against the wrong
|
|
7
|
+
* repository.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sessionFilePaths(entries: readonly TimelineEntry[], root: string | null): ReadonlySet<string>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Which files the open session touched.
|
|
2
|
+
//
|
|
3
|
+
// The one fact a general git client cannot show, and the reason a git column
|
|
4
|
+
// belongs in a room about agent sessions. It is derived from the timeline the
|
|
5
|
+
// room is already reading — every `file_change` tool action names a path — so
|
|
6
|
+
// it costs no new request and no new table.
|
|
7
|
+
//
|
|
8
|
+
// Until the typed tool projection ships, the daemon answers no `file_change`
|
|
9
|
+
// actions at all and this returns an empty set. That draws NO marks, which is
|
|
10
|
+
// the honest state: "we cannot say" and "this session touched nothing" look
|
|
11
|
+
// the same here, and neither of them is a lie about a file.
|
|
12
|
+
/** `path` on a `ResourceRef`, if that is what this value is. */
|
|
13
|
+
function refPath(value) {
|
|
14
|
+
if (value === null || typeof value !== "object")
|
|
15
|
+
return null;
|
|
16
|
+
const path = value.path;
|
|
17
|
+
return typeof path === "string" && path !== "" ? path : null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Workspace-relative paths this session's file-change actions named.
|
|
21
|
+
*
|
|
22
|
+
* Absolute paths are made relative to `root` so they match what git prints;
|
|
23
|
+
* a path outside the root is dropped rather than shown against the wrong
|
|
24
|
+
* repository.
|
|
25
|
+
*/
|
|
26
|
+
export function sessionFilePaths(entries, root) {
|
|
27
|
+
const out = new Set();
|
|
28
|
+
if (root === null)
|
|
29
|
+
return out;
|
|
30
|
+
const prefix = root.endsWith("/") ? root : `${root}/`;
|
|
31
|
+
for (const entry of entries) {
|
|
32
|
+
const body = entry.body;
|
|
33
|
+
if (body?.type !== "tool_use")
|
|
34
|
+
continue;
|
|
35
|
+
const action = body.tool?.action;
|
|
36
|
+
if (action?.type !== "file_change")
|
|
37
|
+
continue;
|
|
38
|
+
// Both the changed path and a move's destination count as touched.
|
|
39
|
+
const change = action;
|
|
40
|
+
for (const candidate of [refPath(change.path), refPath(change.destination)]) {
|
|
41
|
+
if (candidate === null)
|
|
42
|
+
continue;
|
|
43
|
+
if (candidate.startsWith(prefix))
|
|
44
|
+
out.add(candidate.slice(prefix.length));
|
|
45
|
+
else if (!candidate.startsWith("/"))
|
|
46
|
+
out.add(candidate);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return out;
|
|
50
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/** git's own status letter, per slot. `?` is untracked and `U` unmerged. */
|
|
2
|
+
export type StatusLetter = "M" | "A" | "D" | "R" | "C" | "T" | "?" | "U";
|
|
3
|
+
/**
|
|
4
|
+
* One path's status, with BOTH of git's slots kept.
|
|
5
|
+
*
|
|
6
|
+
* A file with staged changes and further unstaged edits is genuinely in both
|
|
7
|
+
* groups, with a different diff in each. Collapsing the pair into one letter
|
|
8
|
+
* is right for a row decoration and wrong for a list you commit from.
|
|
9
|
+
*/
|
|
10
|
+
export interface StatusEntry {
|
|
11
|
+
/** Workspace-relative, POSIX separators — what git prints. */
|
|
12
|
+
readonly path: string;
|
|
13
|
+
/** Where a rename came from. */
|
|
14
|
+
readonly original: string | null;
|
|
15
|
+
/** The index against HEAD: what `git commit` would record. */
|
|
16
|
+
readonly index: StatusLetter | null;
|
|
17
|
+
/** The working tree against the index: what is not staged yet. */
|
|
18
|
+
readonly worktree: StatusLetter | null;
|
|
19
|
+
}
|
|
20
|
+
export interface BranchFacts {
|
|
21
|
+
readonly name: string | null;
|
|
22
|
+
readonly upstream: string | null;
|
|
23
|
+
/** Commits this branch has that its upstream does not. `null` when there
|
|
24
|
+
* is no upstream to compare against — which is not zero. */
|
|
25
|
+
readonly ahead: number | null;
|
|
26
|
+
readonly behind: number | null;
|
|
27
|
+
}
|
|
28
|
+
/** Someone git records as having co-written a commit. For this room that is
|
|
29
|
+
* usually the agent that wrote it — the one thing a `Co-authored-by` trailer
|
|
30
|
+
* says that nothing else in the room can. */
|
|
31
|
+
export interface CoAuthor {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly email: string | null;
|
|
34
|
+
}
|
|
35
|
+
export interface Commit {
|
|
36
|
+
readonly sha: string;
|
|
37
|
+
readonly short: string;
|
|
38
|
+
readonly subject: string;
|
|
39
|
+
readonly author: string;
|
|
40
|
+
readonly timestampMs: number;
|
|
41
|
+
readonly merge: boolean;
|
|
42
|
+
readonly coAuthors: readonly CoAuthor[];
|
|
43
|
+
/** `null` on a branch with no upstream: the row draws no mark rather than
|
|
44
|
+
* claiming a commit is unpushed when nothing can know. */
|
|
45
|
+
readonly pushed: boolean | null;
|
|
46
|
+
readonly added: number;
|
|
47
|
+
readonly deleted: number;
|
|
48
|
+
readonly files: number;
|
|
49
|
+
}
|
|
50
|
+
/** One file inside a commit. */
|
|
51
|
+
export interface CommitFile {
|
|
52
|
+
readonly path: string;
|
|
53
|
+
/** Where a rename came from. */
|
|
54
|
+
readonly original: string | null;
|
|
55
|
+
readonly status: StatusLetter;
|
|
56
|
+
/** `null` for a binary file, which has no line count. */
|
|
57
|
+
readonly added: number | null;
|
|
58
|
+
readonly deleted: number | null;
|
|
59
|
+
}
|
|
60
|
+
/** Which side of the index a diff is taken from. */
|
|
61
|
+
export interface DiffRequest {
|
|
62
|
+
readonly path: string;
|
|
63
|
+
readonly staged?: boolean;
|
|
64
|
+
/** A commit's diff, rather than the working tree's. */
|
|
65
|
+
readonly sha?: string;
|
|
66
|
+
}
|
|
67
|
+
/** The two views the column offers, which are the two views git has. */
|
|
68
|
+
export type GitView = "changes" | "history";
|
|
69
|
+
/** Everything the fx-host will answer. Every read resolves to a value with
|
|
70
|
+
* its own `error` field; only the write acts reject. */
|
|
71
|
+
export interface GitClient {
|
|
72
|
+
branch(): Promise<BranchFacts>;
|
|
73
|
+
status(): Promise<{
|
|
74
|
+
entries: readonly StatusEntry[];
|
|
75
|
+
error: string | null;
|
|
76
|
+
}>;
|
|
77
|
+
log(): Promise<{
|
|
78
|
+
commits: readonly Commit[];
|
|
79
|
+
error: string | null;
|
|
80
|
+
}>;
|
|
81
|
+
diff(request: DiffRequest): Promise<{
|
|
82
|
+
text: string;
|
|
83
|
+
error: string | null;
|
|
84
|
+
}>;
|
|
85
|
+
commitFiles(sha: string): Promise<{
|
|
86
|
+
files: readonly CommitFile[];
|
|
87
|
+
error: string | null;
|
|
88
|
+
}>;
|
|
89
|
+
stage(paths: readonly string[]): Promise<void>;
|
|
90
|
+
unstage(paths: readonly string[]): Promise<void>;
|
|
91
|
+
discard(paths: readonly string[]): Promise<void>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// What column ⑤ is a view of.
|
|
2
|
+
//
|
|
3
|
+
// The column is scoped to the REPOSITORY, like every other git client — and
|
|
4
|
+
// the files this session touched wear a mark. The design record's §8 offered
|
|
5
|
+
// the opposite (a column scoped to one session, Q4's "keep or kill"); this
|
|
6
|
+
// keeps the idea it was after and drops the filter, because a list that hides
|
|
7
|
+
// the other twenty changed files is not a thing you can commit from, and the
|
|
8
|
+
// session attribution is the one fact GitHub Desktop could never show.
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ProjectActivitySparklineProps {
|
|
2
|
+
readonly values: readonly number[];
|
|
3
|
+
readonly accessibleLabel?: string;
|
|
4
|
+
}
|
|
5
|
+
/** Compact bar sparkline for a project's recent token buckets. */
|
|
6
|
+
export declare function ProjectActivitySparkline({ values, accessibleLabel, }: ProjectActivitySparklineProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** Compact bar sparkline for a project's recent token buckets. */
|
|
3
|
+
export function ProjectActivitySparkline({ values, accessibleLabel = "Token activity over the last 30 days", }) {
|
|
4
|
+
const peak = values.reduce((maximum, value) => Math.max(maximum, Number.isFinite(value) ? value : 0), 0);
|
|
5
|
+
return (_jsx("div", { className: "ah-project-activity-sparkline", role: "img", "aria-label": accessibleLabel, children: values.map((rawValue, bucketIndex) => {
|
|
6
|
+
const value = Number.isFinite(rawValue) ? Math.max(0, rawValue) : 0;
|
|
7
|
+
const height = value === 0 || peak === 0
|
|
8
|
+
? "1px"
|
|
9
|
+
: `${Math.max(12, Math.round((value / peak) * 100))}%`;
|
|
10
|
+
return (_jsx("i", { "data-zero": value === 0 ? "" : undefined, style: { "--h": height } }, bucketIndex));
|
|
11
|
+
}) }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ProjectBackfill, RuntimeBackfill } from "@vibefield/rosetta-protocol";
|
|
2
|
+
import type { ProjectViewModel } from "../../lib/model.js";
|
|
3
|
+
import type { ArrangedSection } from "../../lib/sections.js";
|
|
4
|
+
export interface ProjectListProps {
|
|
5
|
+
/** Projects in display order; sorting and filtering belong to the container. */
|
|
6
|
+
readonly projects: readonly ProjectViewModel[];
|
|
7
|
+
/** A deliberate sort choice establishes a fresh view. */
|
|
8
|
+
readonly orderScope?: string;
|
|
9
|
+
readonly selectedProjectId: string | null;
|
|
10
|
+
readonly maximumLifetimeCost: number;
|
|
11
|
+
readonly homeDirectory: string | null;
|
|
12
|
+
readonly currentTimestamp: number;
|
|
13
|
+
/** A backfill is running: unfinished projects cook rather than lie. */
|
|
14
|
+
readonly ingestActive: boolean;
|
|
15
|
+
readonly runtimes?: readonly RuntimeBackfill[] | undefined;
|
|
16
|
+
/** The daemon's per-project backfill fold, keyed by project id. */
|
|
17
|
+
readonly projectBackfills: ReadonlyMap<string, ProjectBackfill>;
|
|
18
|
+
/** The list itself is still being censused — only the ready may claim
|
|
19
|
+
* emptiness, so the empty state yields to the section's veil. */
|
|
20
|
+
readonly pending: boolean;
|
|
21
|
+
readonly onProjectSelect: (projectId: string) => void;
|
|
22
|
+
/** The host's sections (R3), arranged; null draws the one run it always did. */
|
|
23
|
+
readonly sections?: readonly ArrangedSection<ProjectViewModel>[] | null | undefined;
|
|
24
|
+
}
|
|
25
|
+
export declare function ProjectList({ projects, orderScope, selectedProjectId, maximumLifetimeCost, homeDirectory, currentTimestamp, ingestActive, runtimes, projectBackfills, pending, onProjectSelect, sections, }: ProjectListProps): import("react").JSX.Element;
|