zidane-ui 9.4.0 → 9.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/index.d.ts +2 -1
- package/dist/adapters/index.js +2 -1
- package/dist/adapters/live.d.ts +7 -2
- package/dist/adapters/live.js +5 -2
- package/dist/adapters/server-approvals-host.js +3 -1
- package/dist/adapters/server-channels-host.d.ts +32 -0
- package/dist/adapters/server-channels-host.js +49 -0
- package/dist/adapters/server-composer-host.js +13 -0
- package/dist/adapters/server-files-host.js +12 -31
- package/dist/adapters/server-host.js +27 -3
- package/dist/adapters/server-machines-host.d.ts +5 -0
- package/dist/adapters/server-machines-host.js +13 -6
- package/dist/adapters/server-oauth-flow.d.ts +2 -1
- package/dist/adapters/server-projects.d.ts +15 -0
- package/dist/adapters/server-projects.js +225 -0
- package/dist/adapters/server-session-host.d.ts +2 -0
- package/dist/adapters/server-session-host.js +20 -1
- package/dist/app/AppHostProvider.d.ts +1 -1
- package/dist/app/AppHostProvider.js +7 -2
- package/dist/app/ModalProvider.d.ts +6 -2
- package/dist/app/ModalProvider.js +38 -10
- package/dist/app/headless/app-host.d.ts +3 -0
- package/dist/approvals/ApprovalsProvider.d.ts +2 -1
- package/dist/approvals/ApprovalsProvider.js +12 -4
- package/dist/approvals/headless/host.d.ts +13 -2
- package/dist/approvals/headless/index.d.ts +3 -3
- package/dist/approvals/headless/index.js +2 -2
- package/dist/approvals/headless/labels.d.ts +12 -2
- package/dist/approvals/headless/labels.js +19 -1
- package/dist/channels/BindingEditorDialog.d.ts +18 -0
- package/dist/channels/BindingEditorDialog.js +637 -0
- package/dist/channels/ChannelAlertsList.d.ts +25 -0
- package/dist/channels/ChannelAlertsList.js +107 -0
- package/dist/channels/ChannelDefaultsSection.d.ts +20 -0
- package/dist/channels/ChannelDefaultsSection.js +133 -0
- package/dist/channels/ChannelsProvider.d.ts +31 -0
- package/dist/channels/ChannelsProvider.js +29 -0
- package/dist/channels/ChannelsSettingsSection.d.ts +40 -0
- package/dist/channels/ChannelsSettingsSection.js +456 -0
- package/dist/channels/ConnectionSetupDialog.d.ts +16 -0
- package/dist/channels/ConnectionSetupDialog.js +470 -0
- package/dist/channels/HeldRepliesList.d.ts +27 -0
- package/dist/channels/HeldRepliesList.js +173 -0
- package/dist/channels/ProjectChannelsSection.d.ts +55 -0
- package/dist/channels/ProjectChannelsSection.js +433 -0
- package/dist/channels/ReadinessChecklist.d.ts +102 -0
- package/dist/channels/ReadinessChecklist.js +273 -0
- package/dist/channels/TestSessionBanner.d.ts +24 -0
- package/dist/channels/TestSessionBanner.js +44 -0
- package/dist/channels/channels-parts.d.ts +104 -0
- package/dist/channels/channels-parts.js +203 -0
- package/dist/channels/context.d.ts +9 -0
- package/dist/channels/context.js +14 -0
- package/dist/channels/headless/access.d.ts +127 -0
- package/dist/channels/headless/access.js +187 -0
- package/dist/channels/headless/fixture-host.d.ts +83 -0
- package/dist/channels/headless/fixture-host.js +557 -0
- package/dist/channels/headless/host.d.ts +245 -0
- package/dist/channels/headless/host.js +39 -0
- package/dist/channels/headless/index.d.ts +10 -0
- package/dist/channels/headless/index.js +5 -0
- package/dist/channels/headless/labels.d.ts +217 -0
- package/dist/channels/headless/labels.js +260 -0
- package/dist/channels/headless/state.d.ts +22 -0
- package/dist/channels/headless/state.js +303 -0
- package/dist/channels/index.d.ts +21 -0
- package/dist/channels/index.js +13 -0
- package/dist/channels/testing/contract.d.ts +31 -0
- package/dist/channels/testing/contract.js +378 -0
- package/dist/channels/testing/index.d.ts +7 -0
- package/dist/channels/testing/index.js +1 -0
- package/dist/chat/HostBadge.js +1 -0
- package/dist/chat/OrchestratorBadge.d.ts +23 -0
- package/dist/chat/OrchestratorBadge.js +22 -0
- package/dist/chat/SessionGroupHeader.d.ts +11 -1
- package/dist/chat/SessionGroupHeader.js +25 -14
- package/dist/chat/SessionList.d.ts +1 -1
- package/dist/chat/SessionList.js +1 -1
- package/dist/chat/SessionRow.d.ts +141 -0
- package/dist/chat/SessionRow.js +215 -0
- package/dist/chat/StatusDot.d.ts +7 -2
- package/dist/chat/StatusDot.js +3 -2
- package/dist/chat/Transcript.js +6 -2
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/composer/ContextBreakdown.d.ts +27 -2
- package/dist/chat/composer/ContextBreakdown.js +123 -2
- package/dist/chat/composer/DraftPickers.d.ts +8 -2
- package/dist/chat/composer/DraftPickers.js +7 -3
- package/dist/chat/composer/HostContextOrb.d.ts +2 -0
- package/dist/chat/composer/HostContextOrb.js +17 -2
- package/dist/chat/composer/ProjectMenu.d.ts +16 -3
- package/dist/chat/composer/ProjectMenu.js +102 -20
- package/dist/chat/composer/ScopeToggle.d.ts +7 -2
- package/dist/chat/composer/ScopeToggle.js +4 -2
- package/dist/chat/composer/ServerScopeToggle.d.ts +7 -2
- package/dist/chat/composer/ServerScopeToggle.js +3 -1
- package/dist/chat/composer/index.d.ts +2 -2
- package/dist/chat/composer/index.js +2 -2
- package/dist/chat/composer/use-draft-target.d.ts +12 -1
- package/dist/chat/composer/use-draft-target.js +22 -10
- package/dist/chat/composer/use-send-prompt.d.ts +2 -0
- package/dist/chat/composer/use-send-prompt.js +4 -1
- package/dist/chat/headless/answered-first.d.ts +28 -0
- package/dist/chat/headless/answered-first.js +14 -0
- package/dist/chat/headless/chip-labels.d.ts +2 -0
- package/dist/chat/headless/chip-labels.js +2 -0
- package/dist/chat/headless/composer/composer-sources.d.ts +5 -2
- package/dist/chat/headless/composer/composer-sources.js +6 -0
- package/dist/chat/headless/composer/host.d.ts +13 -0
- package/dist/chat/headless/composer/index.d.ts +2 -2
- package/dist/chat/headless/composer/labels-chrome.d.ts +3 -0
- package/dist/chat/headless/composer/labels-chrome.js +4 -1
- package/dist/chat/headless/composer/labels-editor.d.ts +2 -0
- package/dist/chat/headless/composer/labels-editor.js +2 -0
- package/dist/chat/headless/draft-target.d.ts +2 -0
- package/dist/chat/headless/fixtures/demo-transcript-all-kinds.d.ts +6 -0
- package/dist/chat/headless/fixtures/demo-transcript-all-kinds.js +90 -2
- package/dist/chat/headless/folder-groups.d.ts +41 -0
- package/dist/chat/headless/folder-groups.js +76 -0
- package/dist/chat/headless/host.d.ts +16 -1
- package/dist/chat/headless/hosts.d.ts +1 -1
- package/dist/chat/headless/index.d.ts +15 -10
- package/dist/chat/headless/index.js +35 -30
- package/dist/chat/headless/labels.d.ts +43 -4
- package/dist/chat/headless/labels.js +40 -9
- package/dist/chat/headless/prompt-origin.d.ts +2 -2
- package/dist/chat/headless/prompt-origin.js +3 -3
- package/dist/chat/headless/send-flow.d.ts +2 -0
- package/dist/chat/headless/session-list.d.ts +36 -2
- package/dist/chat/headless/session-list.js +7 -0
- package/dist/chat/headless/sidebar/directory.d.ts +5 -0
- package/dist/chat/headless/sidebar/directory.js +2 -0
- package/dist/chat/headless/sidebar/inbox.d.ts +33 -7
- package/dist/chat/headless/sidebar/inbox.js +65 -26
- package/dist/chat/headless/sidebar/index.d.ts +6 -4
- package/dist/chat/headless/sidebar/index.js +5 -3
- package/dist/chat/headless/sidebar/labels.d.ts +36 -7
- package/dist/chat/headless/sidebar/labels.js +1 -4
- package/dist/chat/headless/sidebar/project-main.d.ts +43 -0
- package/dist/chat/headless/sidebar/project-main.js +46 -0
- package/dist/chat/headless/sidebar/row-changes.d.ts +43 -0
- package/dist/chat/headless/sidebar/row-changes.js +43 -0
- package/dist/chat/headless/sidebar/rows.d.ts +64 -6
- package/dist/chat/headless/sidebar/rows.js +98 -18
- package/dist/chat/headless/sidebar/types.d.ts +12 -0
- package/dist/chat/headless/streams/live-events.d.ts +12 -0
- package/dist/chat/headless/streams/live-events.js +21 -2
- package/dist/chat/headless/streams/store.d.ts +17 -0
- package/dist/chat/headless/streams/store.js +38 -15
- package/dist/chat/headless/streams/types.d.ts +2 -1
- package/dist/chat/headless/transcript/collapse.js +3 -1
- package/dist/chat/headless/transcript/derive.d.ts +1 -0
- package/dist/chat/headless/transcript/derive.js +3 -1
- package/dist/chat/headless/transcript/fold.js +1 -0
- package/dist/chat/headless/transcript/index.d.ts +3 -2
- package/dist/chat/headless/transcript/index.js +2 -1
- package/dist/chat/headless/transcript/rail.d.ts +8 -1
- package/dist/chat/headless/transcript/rail.js +10 -2
- package/dist/chat/headless/transcript/rows.d.ts +31 -3
- package/dist/chat/headless/transcript/select-stops.js +1 -0
- package/dist/chat/headless/transcript/session-groups.d.ts +36 -0
- package/dist/chat/headless/transcript/session-groups.js +94 -0
- package/dist/chat/headless/transcript-labels.d.ts +1 -0
- package/dist/chat/index.d.ts +8 -5
- package/dist/chat/index.js +9 -6
- package/dist/chat/interactions/HostInteractions.js +4 -2
- package/dist/chat/interactions/InboxPanel.js +6 -4
- package/dist/chat/interactions/use-answer-interaction.d.ts +11 -0
- package/dist/chat/interactions/use-answer-interaction.js +19 -0
- package/dist/chat/rich-composer/artifact-mentions.d.ts +29 -0
- package/dist/chat/rich-composer/artifact-mentions.js +40 -0
- package/dist/chat/rich-composer/composer-extensions.d.ts +3 -2
- package/dist/chat/rich-composer/composer-extensions.js +12 -9
- package/dist/chat/rich-composer/use-composer-sources.js +1 -0
- package/dist/chat/sidebar/InboxList.d.ts +26 -2
- package/dist/chat/sidebar/InboxList.js +65 -49
- package/dist/chat/sidebar/MainSessionRow.d.ts +2 -1
- package/dist/chat/sidebar/MainSessionRow.js +1 -1
- package/dist/chat/sidebar/ProjectIcon.d.ts +8 -4
- package/dist/chat/sidebar/ProjectIcon.js +15 -3
- package/dist/chat/sidebar/SessionSidebar.d.ts +51 -2
- package/dist/chat/sidebar/SessionSidebar.js +87 -17
- package/dist/chat/sidebar/SidebarFooter.d.ts +2 -23
- package/dist/chat/sidebar/SidebarFooter.js +2 -43
- package/dist/chat/sidebar/SidebarGroupHeader.d.ts +12 -3
- package/dist/chat/sidebar/SidebarGroupHeader.js +36 -15
- package/dist/chat/sidebar/SidebarLiveProvider.d.ts +22 -0
- package/dist/chat/sidebar/SidebarLiveProvider.js +20 -0
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +6 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +16 -7
- package/dist/chat/sidebar/inbox-triage.d.ts +18 -2
- package/dist/chat/sidebar/inbox-triage.js +39 -12
- package/dist/chat/sidebar/index.d.ts +5 -4
- package/dist/chat/sidebar/index.js +3 -2
- package/dist/chat/sidebar/sidebar-live.d.ts +29 -2
- package/dist/chat/sidebar/sidebar-live.js +36 -2
- package/dist/chat/sidebar/useInboxRows.d.ts +4 -1
- package/dist/chat/sidebar/useInboxRows.js +8 -6
- package/dist/chat/sidebar/useInboxTriage.d.ts +8 -2
- package/dist/chat/sidebar/useInboxTriage.js +29 -20
- package/dist/chat/testing/fixture-composer-host.d.ts +3 -1
- package/dist/chat/testing/fixture-composer-host.js +1 -0
- package/dist/chat/testing/index.d.ts +2 -2
- package/dist/chat/testing/index.js +2 -2
- package/dist/chat/transcript/BadgeMenu.d.ts +9 -2
- package/dist/chat/transcript/BadgeMenu.js +20 -2
- package/dist/chat/transcript/PromptEcho.js +15 -2
- package/dist/chat/transcript/PromptOriginLabel.d.ts +1 -1
- package/dist/chat/transcript/SubagentBlock.js +24 -7
- package/dist/chat/transcript/TranscriptRail.d.ts +3 -1
- package/dist/chat/transcript/TranscriptRail.js +15 -5
- package/dist/chat/transcript/TranscriptRow.js +9 -0
- package/dist/chat/transcript/badges.d.ts +1 -0
- package/dist/chat/transcript/badges.js +1 -0
- package/dist/chat/transcript/fold.js +2 -1
- package/dist/chat/transcript/frame.d.ts +7 -0
- package/dist/chat/transcript/frame.js +51 -5
- package/dist/chat/transcript/index.d.ts +5 -4
- package/dist/chat/transcript/index.js +4 -3
- package/dist/chat/transcript/inline-facts.d.ts +9 -0
- package/dist/chat/transcript/inline-facts.js +20 -0
- package/dist/chat/transcript/notices.d.ts +34 -12
- package/dist/chat/transcript/notices.js +213 -97
- package/dist/chat/transcript/prompt.js +8 -1
- package/dist/chat/transcript/receipt-parts.d.ts +29 -2
- package/dist/chat/transcript/receipt-parts.js +40 -7
- package/dist/chat/transcript/row-estimate.js +4 -1
- package/dist/chat/transcript/run-rows.js +2 -5
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/session-groups.d.ts +21 -0
- package/dist/chat/transcript/session-groups.js +154 -0
- package/dist/chat/transcript/session-line.d.ts +63 -0
- package/dist/chat/transcript/session-line.js +114 -0
- package/dist/chat/transcript/tasks.d.ts +1 -1
- package/dist/chat/transcript/tasks.js +1 -1
- package/dist/chat/transcript/tool-row.js +3 -2
- package/dist/code/editor/FileView.js +1 -3
- package/dist/components/Form.d.ts +28 -1
- package/dist/components/Form.js +43 -7
- package/dist/components/HelpTip.d.ts +22 -0
- package/dist/components/HelpTip.js +26 -0
- package/dist/components/Menu.js +1 -1
- package/dist/components/Notice.d.ts +6 -4
- package/dist/components/Notice.js +73 -27
- package/dist/components/Progress.js +10 -4
- package/dist/components/SearchField.d.ts +46 -0
- package/dist/components/SearchField.js +50 -0
- package/dist/components/ShowMore.d.ts +48 -0
- package/dist/components/ShowMore.js +57 -0
- package/dist/components/Tooltip.js +8 -5
- package/dist/components/charts/ScatterChart.js +13 -6
- package/dist/components/floating/FloatingSurface.js +2 -2
- package/dist/components/floating/useAnchoredPosition.d.ts +15 -1
- package/dist/components/floating/useAnchoredPosition.js +41 -7
- package/dist/components/palette/PaletteList.d.ts +5 -5
- package/dist/components/palette/PaletteList.js +2 -3
- package/dist/components/palette/PalettePanel.js +18 -12
- package/dist/components/palette/palette-layout.d.ts +5 -1
- package/dist/components/palette/palette-layout.js +13 -10
- package/dist/core.css +45 -20
- package/dist/dist/index-BmO8bRgK.d.ts +1 -0
- package/dist/dist/{index-BheVJOLc.d.ts → index-DPbpsCtl.d.ts} +248 -118
- package/dist/dist/index.d.ts +5 -5
- package/dist/dist/sandbox-Bzg_jJK2.d.ts +2 -0
- package/dist/dist/{timeout-CmTx6V9y.d.ts → timeout-NoG7ppkm.d.ts} +1 -1
- package/dist/files/FilesProvider.d.ts +2 -0
- package/dist/files/FilesProvider.js +5 -1
- package/dist/files/headless/host.d.ts +6 -2
- package/dist/files/index.d.ts +2 -2
- package/dist/files/index.js +2 -2
- package/dist/git/GitBar.js +8 -2
- package/dist/git/MoveSessionDialog.js +8 -5
- package/dist/git/MoveToDialog.d.ts +3 -1
- package/dist/git/MoveToDialog.js +43 -16
- package/dist/git/TeleportSessionDialog.d.ts +11 -4
- package/dist/git/TeleportSessionDialog.js +263 -107
- package/dist/git/WherePicker.js +4 -1
- package/dist/git/headless/labels.d.ts +8 -0
- package/dist/git/headless/labels.js +24 -16
- package/dist/git/index.d.ts +2 -2
- package/dist/git/index.js +2 -2
- package/dist/git/useEnvironmentChoices.d.ts +19 -0
- package/dist/git/useEnvironmentChoices.js +34 -10
- package/dist/hooks/useLastCount.d.ts +9 -0
- package/dist/hooks/useLastCount.js +29 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +7 -3
- package/dist/keybindings/headless/overrides.d.ts +1 -1
- package/dist/keybindings/headless/overrides.js +14 -3
- package/dist/labels.d.ts +7 -0
- package/dist/labels.js +10 -3
- package/dist/machines/AddMachineDialog.js +1 -1
- package/dist/machines/AddServerForm.d.ts +14 -2
- package/dist/machines/AddServerForm.js +167 -51
- package/dist/machines/HostCapabilities.js +8 -4
- package/dist/machines/HostSignIn.d.ts +2 -1
- package/dist/machines/HostSignIn.js +1 -0
- package/dist/machines/HostSyncPanel.d.ts +4 -1
- package/dist/machines/HostSyncPanel.js +248 -132
- package/dist/machines/HostsSection.d.ts +2 -2
- package/dist/machines/HostsSection.js +91 -52
- package/dist/machines/LinkedAccountsPanel.d.ts +29 -0
- package/dist/machines/LinkedAccountsPanel.js +268 -0
- package/dist/machines/MachinesExplainer.d.ts +4 -4
- package/dist/machines/MachinesExplainer.js +27 -17
- package/dist/machines/OrganizationPanel.d.ts +12 -5
- package/dist/machines/OrganizationPanel.js +420 -133
- package/dist/machines/ProjectsSpendPanel.d.ts +22 -0
- package/dist/machines/ProjectsSpendPanel.js +160 -0
- package/dist/machines/ServerMachinesPanel.js +19 -4
- package/dist/machines/ServerUpdatePanel.js +3 -3
- package/dist/machines/SyncAccounts.d.ts +14 -7
- package/dist/machines/SyncAccounts.js +67 -81
- package/dist/machines/TokensPanel.js +54 -30
- package/dist/machines/headless/fixture-host.d.ts +15 -10
- package/dist/machines/headless/fixture-host.js +75 -44
- package/dist/machines/headless/fixtures.d.ts +12 -0
- package/dist/machines/headless/fixtures.js +71 -1
- package/dist/machines/headless/host.d.ts +13 -9
- package/dist/machines/headless/index.d.ts +3 -3
- package/dist/machines/headless/index.js +2 -2
- package/dist/machines/headless/labels.d.ts +81 -40
- package/dist/machines/headless/labels.js +103 -60
- package/dist/machines/headless/linked-accounts.d.ts +42 -0
- package/dist/machines/headless/linked-accounts.js +31 -0
- package/dist/machines/headless/organization.d.ts +9 -3
- package/dist/machines/headless/organization.js +12 -2
- package/dist/machines/headless/sync.d.ts +2 -0
- package/dist/machines/index.d.ts +3 -2
- package/dist/machines/index.js +3 -2
- package/dist/machines/sync-rows.d.ts +8 -0
- package/dist/machines/sync-rows.js +10 -0
- package/dist/machines/testing/contract.d.ts +1 -25
- package/dist/machines/testing/contract.js +1 -97
- package/dist/machines/testing/index.d.ts +3 -3
- package/dist/machines/testing/index.js +2 -2
- package/dist/onboarding/demos/extensions.d.ts +4 -0
- package/dist/onboarding/demos/extensions.js +27 -1
- package/dist/onboarding/demos/sidebar-layout.d.ts +4 -2
- package/dist/onboarding/demos/sidebar-layout.js +5 -2
- package/dist/onboarding/headless/labels.d.ts +9 -0
- package/dist/onboarding/headless/labels.js +2 -0
- package/dist/onboarding/steps/SidebarStep.js +4 -2
- package/dist/onboarding/steps/setting-cards.d.ts +4 -2
- package/dist/onboarding/steps/setting-cards.js +3 -2
- package/dist/palette/PaletteDialog.js +4 -4
- package/dist/palette/PaletteRows.js +34 -16
- package/dist/palette/headless/app-sources.js +3 -1
- package/dist/palette/headless/labels.js +2 -2
- package/dist/palette/usePaletteController.js +4 -8
- package/dist/session/ArtifactsPanel.js +11 -23
- package/dist/session/NewProjectDialog.d.ts +33 -0
- package/dist/session/NewProjectDialog.js +216 -0
- package/dist/session/OpenProjectsDialog.d.ts +56 -0
- package/dist/session/OpenProjectsDialog.js +324 -0
- package/dist/session/OpenSessionsDialog.js +186 -61
- package/dist/session/ProjectArtifactsHome.d.ts +42 -0
- package/dist/session/ProjectArtifactsHome.js +98 -0
- package/dist/session/ProjectArtifactsSection.d.ts +13 -0
- package/dist/session/ProjectArtifactsSection.js +367 -0
- package/dist/session/ProjectBudgetsSection.d.ts +7 -0
- package/dist/session/ProjectBudgetsSection.js +377 -0
- package/dist/session/ProjectContextSection.d.ts +20 -0
- package/dist/session/ProjectContextSection.js +139 -0
- package/dist/session/ProjectHome.d.ts +32 -5
- package/dist/session/ProjectHome.js +496 -249
- package/dist/session/ProjectInstructionsSection.d.ts +7 -0
- package/dist/session/ProjectInstructionsSection.js +179 -0
- package/dist/session/ProjectMainButton.d.ts +35 -0
- package/dist/session/ProjectMainButton.js +73 -0
- package/dist/session/ProjectName.d.ts +76 -0
- package/dist/session/ProjectName.js +140 -0
- package/dist/session/ProjectOrchestratorSection.d.ts +14 -0
- package/dist/session/ProjectOrchestratorSection.js +117 -0
- package/dist/session/ProjectPublishDialog.d.ts +30 -0
- package/dist/session/ProjectPublishDialog.js +420 -0
- package/dist/session/ProjectSessionAccessSection.d.ts +13 -0
- package/dist/session/ProjectSessionAccessSection.js +109 -0
- package/dist/session/ProjectSessionsList.d.ts +53 -0
- package/dist/session/ProjectSessionsList.js +316 -0
- package/dist/session/ProjectSettingsDialog.d.ts +30 -0
- package/dist/session/ProjectSettingsDialog.js +693 -0
- package/dist/session/ProjectShareDialog.d.ts +36 -0
- package/dist/session/ProjectShareDialog.js +190 -0
- package/dist/session/ProjectSkillsSection.d.ts +7 -0
- package/dist/session/ProjectSkillsSection.js +197 -0
- package/dist/session/ProjectToolsSection.d.ts +16 -0
- package/dist/session/ProjectToolsSection.js +347 -0
- package/dist/session/ProjectUsage.d.ts +61 -0
- package/dist/session/ProjectUsage.js +344 -0
- package/dist/session/ProviderUsageProvider.d.ts +2 -3
- package/dist/session/QueueTab.js +11 -1
- package/dist/session/SessionAccessNotice.d.ts +31 -0
- package/dist/session/SessionAccessNotice.js +69 -0
- package/dist/session/SessionDetailsDialog.d.ts +3 -1
- package/dist/session/SessionDetailsDialog.js +16 -1
- package/dist/session/SessionHeader.d.ts +10 -3
- package/dist/session/SessionHeader.js +20 -8
- package/dist/session/SessionPeopleStack.d.ts +3 -2
- package/dist/session/SessionPeopleStack.js +51 -17
- package/dist/session/SessionPlaceMenu.js +2 -2
- package/dist/session/SessionProvider.d.ts +13 -1
- package/dist/session/SessionProvider.js +21 -1
- package/dist/session/ShareSessionDialog.d.ts +4 -4
- package/dist/session/ShareSessionDialog.js +182 -283
- package/dist/session/TypingLine.d.ts +9 -4
- package/dist/session/TypingLine.js +16 -5
- package/dist/session/{UsagePanel.d.ts → UsageSection.d.ts} +9 -13
- package/dist/session/{UsagePanel.js → UsageSection.js} +40 -41
- package/dist/session/artifact-row-parts.d.ts +32 -0
- package/dist/session/artifact-row-parts.js +51 -0
- package/dist/session/headless/access.d.ts +33 -0
- package/dist/session/headless/access.js +48 -0
- package/dist/session/headless/fixture-host.d.ts +48 -9
- package/dist/session/headless/fixture-host.js +139 -1
- package/dist/session/headless/fixture-project-artifacts.d.ts +77 -0
- package/dist/session/headless/fixture-project-artifacts.js +168 -0
- package/dist/session/headless/fixture-project-content.d.ts +67 -0
- package/dist/session/headless/fixture-project-content.js +176 -0
- package/dist/session/headless/fixture-projects.d.ts +175 -0
- package/dist/session/headless/fixture-projects.js +498 -0
- package/dist/session/headless/home-layout.d.ts +18 -2
- package/dist/session/headless/home-layout.js +20 -7
- package/dist/session/headless/host.d.ts +263 -7
- package/dist/session/headless/index.d.ts +10 -5
- package/dist/session/headless/index.js +8 -3
- package/dist/session/headless/labels.d.ts +381 -6
- package/dist/session/headless/labels.js +72 -24
- package/dist/session/headless/orchestration-labels.d.ts +52 -0
- package/dist/session/headless/orchestration-labels.js +59 -0
- package/dist/session/headless/project-artifact-labels.d.ts +67 -0
- package/dist/session/headless/project-artifact-labels.js +96 -0
- package/dist/session/headless/project-artifacts.d.ts +124 -0
- package/dist/session/headless/project-artifacts.js +271 -0
- package/dist/session/headless/project-content-labels.d.ts +88 -0
- package/dist/session/headless/project-content-labels.js +152 -0
- package/dist/session/headless/project-labels.d.ts +123 -0
- package/dist/session/headless/project-labels.js +128 -0
- package/dist/session/headless/project-sessions.d.ts +37 -0
- package/dist/session/headless/project-sessions.js +57 -0
- package/dist/session/headless/project-usage-labels.d.ts +74 -0
- package/dist/session/headless/project-usage-labels.js +81 -0
- package/dist/session/headless/project-usage.d.ts +65 -0
- package/dist/session/headless/project-usage.js +92 -0
- package/dist/session/headless/projects.d.ts +158 -0
- package/dist/session/headless/projects.js +301 -0
- package/dist/session/headless/pushed-once.d.ts +22 -0
- package/dist/session/headless/pushed-once.js +28 -0
- package/dist/session/headless/queue.js +2 -1
- package/dist/session/headless/typing.d.ts +20 -1
- package/dist/session/headless/typing.js +58 -3
- package/dist/session/home-block-parts.d.ts +40 -0
- package/dist/session/home-block-parts.js +46 -0
- package/dist/session/index.d.ts +17 -4
- package/dist/session/index.js +16 -3
- package/dist/session/modal-shell.d.ts +1 -1
- package/dist/session/modal-shell.js +1 -1
- package/dist/session/project-artifact-parts.d.ts +59 -0
- package/dist/session/project-artifact-parts.js +222 -0
- package/dist/session/project-content-parts.d.ts +176 -0
- package/dist/session/project-content-parts.js +546 -0
- package/dist/session/project-files.d.ts +48 -0
- package/dist/session/project-files.js +54 -0
- package/dist/session/project-folder-actions.d.ts +11 -0
- package/dist/session/project-folder-actions.js +39 -0
- package/dist/session/project-mcp-add.d.ts +23 -0
- package/dist/session/project-mcp-add.js +107 -0
- package/dist/session/project-record-document.d.ts +48 -0
- package/dist/session/project-record-document.js +225 -0
- package/dist/session/project-settings-parts.d.ts +69 -0
- package/dist/session/project-settings-parts.js +90 -0
- package/dist/session/share-people.d.ts +222 -0
- package/dist/session/share-people.js +457 -0
- package/dist/session/testing/contract.d.ts +67 -8
- package/dist/session/testing/contract.js +343 -6
- package/dist/session/testing/index.d.ts +5 -2
- package/dist/session/testing/index.js +4 -1
- package/dist/session/testing/project-artifacts.contract.js +159 -0
- package/dist/session/testing/project-content.contract.d.ts +19 -0
- package/dist/session/testing/project-content.contract.js +221 -0
- package/dist/session/testing/project-sessions.contract.js +134 -0
- package/dist/session/use-folder-missing.d.ts +6 -0
- package/dist/session/use-folder-missing.js +31 -0
- package/dist/session/use-folder-project.d.ts +14 -0
- package/dist/session/use-folder-project.js +37 -0
- package/dist/session/use-home-projects.d.ts +55 -0
- package/dist/session/use-home-projects.js +154 -0
- package/dist/session/use-project-home-layout.d.ts +33 -0
- package/dist/session/use-project-home-layout.js +134 -0
- package/dist/session/use-project-home-on.d.ts +2 -0
- package/dist/session/use-project-home-on.js +14 -0
- package/dist/settings/SettingCard.d.ts +3 -1
- package/dist/settings/SettingCard.js +2 -1
- package/dist/settings/SettingDemo.d.ts +3 -1
- package/dist/settings/SettingDemo.js +4 -3
- package/dist/settings/SettingsShell.d.ts +2 -1
- package/dist/settings/SettingsShell.js +55 -43
- package/dist/settings/headless/index.d.ts +2 -1
- package/dist/settings/headless/index.js +2 -1
- package/dist/settings/headless/mcp-requirement.d.ts +93 -0
- package/dist/settings/headless/mcp-requirement.js +117 -0
- package/dist/settings/headless/mcp.d.ts +2 -0
- package/dist/settings/headless/mcp.js +3 -2
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/index.d.ts +3 -2
- package/dist/settings/index.js +13 -12
- package/dist/settings/section.d.ts +9 -0
- package/dist/settings/section.js +12 -1
- package/dist/settings/sections/editor/labels.js +1 -1
- package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +6 -2
- package/dist/settings/sections/extensions/ExtensionConfigRows.js +10 -1
- package/dist/settings/sections/extensions/ExtensionOptionsSection.js +1 -0
- package/dist/settings/sections/extensions/ExtensionsSection.d.ts +6 -3
- package/dist/settings/sections/extensions/ExtensionsSection.js +24 -3
- package/dist/settings/sections/extensions/McpRequirementRow.d.ts +45 -0
- package/dist/settings/sections/extensions/McpRequirementRow.js +298 -0
- package/dist/settings/sections/extensions/labels.d.ts +4 -0
- package/dist/settings/sections/extensions/labels.js +4 -0
- package/dist/settings/sections/extensions/options-labels.d.ts +39 -0
- package/dist/settings/sections/extensions/options-labels.js +48 -1
- package/dist/settings/sections/extensions/use-mcp-setup.d.ts +6 -0
- package/dist/settings/sections/extensions/use-mcp-setup.js +41 -0
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +3 -0
- package/dist/settings/sections/index.d.ts +4 -3
- package/dist/settings/sections/index.js +4 -3
- package/dist/settings/sections/instructions/InstructionsSection.d.ts +69 -1
- package/dist/settings/sections/instructions/InstructionsSection.js +181 -109
- package/dist/settings/sections/mcp/McpAddForm.d.ts +9 -2
- package/dist/settings/sections/mcp/McpAddForm.js +15 -7
- package/dist/settings/sections/mcp/McpSection.js +3 -5
- package/dist/settings/sections/mcp/McpServerRow.js +7 -47
- package/dist/settings/sections/mcp/McpSignIn.d.ts +38 -0
- package/dist/settings/sections/mcp/McpSignIn.js +72 -0
- package/dist/settings/sections/mcp/labels.js +1 -1
- package/dist/settings/sections/models/AgentDefaults.d.ts +12 -4
- package/dist/settings/sections/models/AgentDefaults.js +102 -70
- package/dist/settings/sections/models/ModelPickField.d.ts +10 -1
- package/dist/settings/sections/models/ModelPickField.js +87 -39
- package/dist/settings/sections/models/labels.d.ts +8 -0
- package/dist/settings/sections/models/labels.js +8 -0
- package/dist/settings/sections/performance/labels.js +2 -2
- package/dist/settings/sections/providers/ServerSignIn.d.ts +6 -1
- package/dist/settings/sections/providers/ServerSignIn.js +66 -61
- package/dist/settings/sections/skills/SkillList.d.ts +45 -0
- package/dist/settings/sections/skills/SkillList.js +58 -40
- package/dist/settings/server-app.d.ts +2 -0
- package/dist/settings/server-app.js +16 -4
- package/dist/styles.css +170 -34
- package/dist/theme/runtime-icons.js +7 -3
- package/dist/workspace/PanelContentView.js +1 -1
- package/package.json +26 -2
- package/src/styles/app.css +6 -3
- package/src/styles/palette.css +15 -19
- package/src/styles/primitives.css +3 -1
- package/src/styles/transcript.css +61 -0
- package/dist/dist/index-ttmMvjgM.d.ts +0 -1
- package/dist/dist/sandbox-CSUihARm.d.ts +0 -2
- package/dist/machines/PersonalLayerPanel.d.ts +0 -32
- package/dist/machines/PersonalLayerPanel.js +0 -360
- package/dist/machines/headless/layer.d.ts +0 -64
- package/dist/machines/headless/layer.js +0 -56
- /package/dist/dist/{execution-failure-SREfl-EZ.d.ts → execution-failure-_L2r_Qd-.d.ts} +0 -0
|
@@ -16,6 +16,52 @@ import { SessionGroupBy } from "zidane/chat/pure";
|
|
|
16
16
|
* @param session - Its folder and project root.
|
|
17
17
|
*/
|
|
18
18
|
export declare function projectPathOf(session: Pick<SidebarListSession, 'projectRoot' | 'cwd'>): string;
|
|
19
|
+
/**
|
|
20
|
+
* The group key of a project with no folder, as its header's `fullPath`.
|
|
21
|
+
*
|
|
22
|
+
* @param projectId - The project.
|
|
23
|
+
*/
|
|
24
|
+
export declare function projectGroupPath(projectId: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* The project a group key names (`projectGroupPath`), else `null` (a folder).
|
|
27
|
+
*
|
|
28
|
+
* @param path - A header's `fullPath`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function projectIdOfGroup(path: string | undefined): string | null;
|
|
31
|
+
/** A project the sidebar groups this host's sessions by (`Settings.projectHome`). */
|
|
32
|
+
export interface SidebarProjectGroup {
|
|
33
|
+
/** The project's id. */
|
|
34
|
+
id: string;
|
|
35
|
+
/** Its name: the header of a project with no folder. */
|
|
36
|
+
name: string;
|
|
37
|
+
/** Its home folder; absent: a project with no folder. */
|
|
38
|
+
home?: string;
|
|
39
|
+
/** The sessions filed in it (`projects.sessions`): they group under it, whatever their folder. */
|
|
40
|
+
sessions?: readonly string[];
|
|
41
|
+
}
|
|
42
|
+
/** The projects of this host, by what the grouping asks of them (`sidebarProjectIndex`). */
|
|
43
|
+
export interface SidebarProjectIndex {
|
|
44
|
+
/** The project each filed session is in, by session id. */
|
|
45
|
+
filed: ReadonlyMap<string, SidebarProjectGroup>;
|
|
46
|
+
/** The projects with no folder, in order: a group each, with or without sessions. */
|
|
47
|
+
folderless: readonly SidebarProjectGroup[];
|
|
48
|
+
/** Each project with no folder by its group key. */
|
|
49
|
+
byGroup: ReadonlyMap<string, SidebarProjectGroup>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The lookups the grouping reads, built once per list of projects.
|
|
53
|
+
*
|
|
54
|
+
* @param projects - The host's projects, with the sessions filed in each.
|
|
55
|
+
*/
|
|
56
|
+
export declare function sidebarProjectIndex(projects: readonly SidebarProjectGroup[]): SidebarProjectIndex;
|
|
57
|
+
/**
|
|
58
|
+
* The group a session of this host is listed under: the project it is filed in first (its home, or the project's
|
|
59
|
+
* own group when it has no folder), else its folder (`projectPathOf`, `''`: Chats). A server's session keeps its folder.
|
|
60
|
+
*
|
|
61
|
+
* @param session - The session.
|
|
62
|
+
* @param projects - This host's projects (`sidebarProjectIndex`). Absent: its folder.
|
|
63
|
+
*/
|
|
64
|
+
export declare function sidebarGroupPathOf(session: Pick<SidebarListSession, 'id' | 'projectRoot' | 'cwd' | 'hostId'>, projects?: SidebarProjectIndex): string;
|
|
19
65
|
/** One row of the sidebar: a session-list row (a header may name its host) or a host's section header. */
|
|
20
66
|
export type SidebarListRow<S extends SidebarListSession = SidebarListSession> = Extract<SessionListRow<S>, {
|
|
21
67
|
kind: 'showMore';
|
|
@@ -40,13 +86,16 @@ export type SidebarListRow<S extends SidebarListSession = SidebarListSession> =
|
|
|
40
86
|
/**
|
|
41
87
|
* A group header; a server's folder names its server (`hostId`), shown as a chip. A project
|
|
42
88
|
* whose repository also has sessions on other machines names it (`repoKey`): those sessions
|
|
43
|
-
* are listed under it.
|
|
89
|
+
* are listed under it. A project with no folder names it (`projectId`), its `fullPath` its
|
|
90
|
+
* group key (`projectGroupPath`); `empty` while no session is filed in it.
|
|
44
91
|
*/
|
|
45
92
|
(Extract<SessionListRow<S>, {
|
|
46
93
|
kind: 'header';
|
|
47
94
|
}> & {
|
|
48
95
|
hostId?: string;
|
|
49
96
|
repoKey?: string;
|
|
97
|
+
projectId?: string;
|
|
98
|
+
empty?: boolean;
|
|
50
99
|
}) |
|
|
51
100
|
/**
|
|
52
101
|
* A host's section in the Per host view (This computer, then each saved
|
|
@@ -69,7 +118,14 @@ export declare function groupsByFolder(groupBy: SidebarGroupBy): boolean;
|
|
|
69
118
|
/** The directory-less bucket's label ("pure chat" sessions, no project). */
|
|
70
119
|
export declare const CHATS_BUCKET = "Chats";
|
|
71
120
|
/** The list options {@link buildSidebarRows} passes through. */
|
|
72
|
-
export type BuildSidebarRowsOptions = Pick<SessionListOptions<SidebarListSession>, 'collapsedGroups' | 'showMoreExpanded' | 'idPrefix' | 'pinnedProjects' | 'compare' | 'keepId'
|
|
121
|
+
export type BuildSidebarRowsOptions = Pick<SessionListOptions<SidebarListSession>, 'collapsedGroups' | 'showMoreExpanded' | 'idPrefix' | 'pinnedProjects' | 'compare' | 'keepId'> & {
|
|
122
|
+
/**
|
|
123
|
+
* This computer's projects (`sidebarProjectIndex`), in a view grouped by folder: a session filed in one groups
|
|
124
|
+
* under it before its folder, and each project with no folder has a group, after the folders', even with no
|
|
125
|
+
* session. Absent: folders alone.
|
|
126
|
+
*/
|
|
127
|
+
projects?: SidebarProjectIndex;
|
|
128
|
+
};
|
|
73
129
|
/**
|
|
74
130
|
* Orchestration on: the main session is pulled out (pinned above the list).
|
|
75
131
|
* Off: the main is not a chat; it is hidden, not regrouped.
|
|
@@ -82,13 +138,14 @@ export declare function partitionMainSession<S extends SidebarListSession>(sessi
|
|
|
82
138
|
rest: S[];
|
|
83
139
|
};
|
|
84
140
|
/**
|
|
85
|
-
* The sidebar's rows over the kit's session-list model: favorites
|
|
141
|
+
* The sidebar's rows over the kit's session-list model: favorites (with the project Mains that are on, first), git
|
|
142
|
+
* repositories and the project of each session.
|
|
86
143
|
*
|
|
87
144
|
* @param sessions - The sessions to list.
|
|
88
145
|
* @param groupBy - The session-list grouping.
|
|
89
146
|
* @param sortBy - The order inside a group.
|
|
90
|
-
* @param options - Collapsed groups, expanded "show more", id prefix, pinned projects.
|
|
91
|
-
* @param project - The
|
|
147
|
+
* @param options - Collapsed groups, expanded "show more", id prefix, pinned projects, this computer's projects.
|
|
148
|
+
* @param project - The group a session is listed under (defaults to {@link sidebarGroupPathOf}).
|
|
92
149
|
*/
|
|
93
150
|
export declare function buildSidebarRows<S extends SidebarListSession>(sessions: S[], groupBy: SessionGroupBy$1, sortBy: SidebarSortBy, options?: BuildSidebarRowsOptions, project?: (session: S) => string): SidebarListRow<S>[];
|
|
94
151
|
/**
|
|
@@ -100,8 +157,9 @@ export declare function buildSidebarRows<S extends SidebarListSession>(sessions:
|
|
|
100
157
|
* server folder.
|
|
101
158
|
*
|
|
102
159
|
* @param sessions - The listed sessions.
|
|
160
|
+
* @param projects - This computer's projects: a session filed in one groups under it, not under its repository.
|
|
103
161
|
*/
|
|
104
|
-
export declare function repoGroups(sessions: readonly SidebarListSession[]): Map<string, string>;
|
|
162
|
+
export declare function repoGroups(sessions: readonly SidebarListSession[], projects?: SidebarProjectIndex): Map<string, string>;
|
|
105
163
|
/**
|
|
106
164
|
* Whether `session` is listed under a project header: a local session in its
|
|
107
165
|
* folder, or, for a header that names a `repoKey`, a server session of that
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_CHAT_LABELS } from "../labels.js";
|
|
2
|
-
import { buildSessionRows } from "../session-list.js";
|
|
2
|
+
import { buildSessionRows, compareSessions } from "../session-list.js";
|
|
3
|
+
import { comparePinnedMains, isSidebarPinned } from "./project-main.js";
|
|
3
4
|
import { groupRows } from "zidane/chat/pure";
|
|
4
5
|
// src/chat/headless/sidebar/rows.ts
|
|
5
6
|
/**
|
|
@@ -8,7 +9,60 @@ import { groupRows } from "zidane/chat/pure";
|
|
|
8
9
|
* @param session - Its folder and project root.
|
|
9
10
|
*/
|
|
10
11
|
function projectPathOf(session) {
|
|
11
|
-
|
|
12
|
+
const path = session.projectRoot?.trim() ? session.projectRoot : session.cwd;
|
|
13
|
+
return path?.trim() ? path : "";
|
|
14
|
+
}
|
|
15
|
+
const PROJECT_GROUP = "project:";
|
|
16
|
+
/**
|
|
17
|
+
* The group key of a project with no folder, as its header's `fullPath`.
|
|
18
|
+
*
|
|
19
|
+
* @param projectId - The project.
|
|
20
|
+
*/
|
|
21
|
+
function projectGroupPath(projectId) {
|
|
22
|
+
return `${PROJECT_GROUP}${projectId}`;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The project a group key names (`projectGroupPath`), else `null` (a folder).
|
|
26
|
+
*
|
|
27
|
+
* @param path - A header's `fullPath`.
|
|
28
|
+
*/
|
|
29
|
+
function projectIdOfGroup(path) {
|
|
30
|
+
return path?.startsWith(PROJECT_GROUP) ? path.slice(9) : null;
|
|
31
|
+
}
|
|
32
|
+
const trimSlashes = (path) => path.replace(/\/+$/, "") || "/";
|
|
33
|
+
/**
|
|
34
|
+
* The lookups the grouping reads, built once per list of projects.
|
|
35
|
+
*
|
|
36
|
+
* @param projects - The host's projects, with the sessions filed in each.
|
|
37
|
+
*/
|
|
38
|
+
function sidebarProjectIndex(projects) {
|
|
39
|
+
const filed = /* @__PURE__ */ new Map();
|
|
40
|
+
const folderless = [];
|
|
41
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
42
|
+
for (const project of projects) {
|
|
43
|
+
for (const id of project.sessions ?? []) filed.set(id, project);
|
|
44
|
+
if (!project.home?.trim()) {
|
|
45
|
+
folderless.push(project);
|
|
46
|
+
byGroup.set(projectGroupPath(project.id), project);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
filed,
|
|
51
|
+
folderless,
|
|
52
|
+
byGroup
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The group a session of this host is listed under: the project it is filed in first (its home, or the project's
|
|
57
|
+
* own group when it has no folder), else its folder (`projectPathOf`, `''`: Chats). A server's session keeps its folder.
|
|
58
|
+
*
|
|
59
|
+
* @param session - The session.
|
|
60
|
+
* @param projects - This host's projects (`sidebarProjectIndex`). Absent: its folder.
|
|
61
|
+
*/
|
|
62
|
+
function sidebarGroupPathOf(session, projects) {
|
|
63
|
+
const project = !session.hostId ? projects?.filed.get(session.id) : void 0;
|
|
64
|
+
if (project) return project.home?.trim() ? trimSlashes(project.home.trim()) : projectGroupPath(project.id);
|
|
65
|
+
return projectPathOf(session);
|
|
12
66
|
}
|
|
13
67
|
/**
|
|
14
68
|
* Views whose groups are folders: Per directory, and each host's section in Per host.
|
|
@@ -43,27 +97,50 @@ function partitionMainSession(sessions, orchestrationEnabled) {
|
|
|
43
97
|
};
|
|
44
98
|
}
|
|
45
99
|
/**
|
|
46
|
-
* The sidebar's rows over the kit's session-list model: favorites
|
|
100
|
+
* The sidebar's rows over the kit's session-list model: favorites (with the project Mains that are on, first), git
|
|
101
|
+
* repositories and the project of each session.
|
|
47
102
|
*
|
|
48
103
|
* @param sessions - The sessions to list.
|
|
49
104
|
* @param groupBy - The session-list grouping.
|
|
50
105
|
* @param sortBy - The order inside a group.
|
|
51
|
-
* @param options - Collapsed groups, expanded "show more", id prefix, pinned projects.
|
|
52
|
-
* @param project - The
|
|
106
|
+
* @param options - Collapsed groups, expanded "show more", id prefix, pinned projects, this computer's projects.
|
|
107
|
+
* @param project - The group a session is listed under (defaults to {@link sidebarGroupPathOf}).
|
|
53
108
|
*/
|
|
54
|
-
function buildSidebarRows(sessions, groupBy, sortBy, options = {}, project =
|
|
55
|
-
|
|
56
|
-
|
|
109
|
+
function buildSidebarRows(sessions, groupBy, sortBy, options = {}, project = (s) => sidebarGroupPathOf(s, options.projects)) {
|
|
110
|
+
const { projects, ...list } = options;
|
|
111
|
+
const compare = list.compare ?? ((a, b) => compareSessions(a, b, sortBy));
|
|
112
|
+
const rows = buildSessionRows(sessions, {
|
|
113
|
+
...list,
|
|
57
114
|
groupBy,
|
|
58
115
|
sortBy,
|
|
59
116
|
project,
|
|
117
|
+
compare: (a, b) => comparePinnedMains(a, b) || compare(a, b),
|
|
60
118
|
isGitRepo: (s) => s.isGitRepo === true,
|
|
61
|
-
isFavorite:
|
|
119
|
+
isFavorite: isSidebarPinned,
|
|
120
|
+
...groupBy === "project" && projects ? { projectGroups: projects.folderless.map((p) => projectGroupPath(p.id)) } : {}
|
|
121
|
+
});
|
|
122
|
+
return groupBy === "project" && projects && projects.byGroup.size > 0 ? withProjectGroups(rows, projects) : rows;
|
|
123
|
+
}
|
|
124
|
+
/** The header of a project with no folder names the project, and says so while nothing is filed in it. */
|
|
125
|
+
function withProjectGroups(rows, projects) {
|
|
126
|
+
return rows.map((row, i) => {
|
|
127
|
+
if (row.kind !== "header" || row.fullPath === void 0) return row;
|
|
128
|
+
const project = projects.byGroup.get(row.fullPath);
|
|
129
|
+
if (!project) return row;
|
|
130
|
+
const next = rows[i + 1];
|
|
131
|
+
const empty = !row.collapsed && (next === void 0 || next.kind !== "session" && next.kind !== "showMore");
|
|
132
|
+
return {
|
|
133
|
+
...row,
|
|
134
|
+
label: project.name,
|
|
135
|
+
isGitRepo: false,
|
|
136
|
+
projectId: project.id,
|
|
137
|
+
...empty ? { empty: true } : {}
|
|
138
|
+
};
|
|
62
139
|
});
|
|
63
140
|
}
|
|
64
141
|
const HOST_SEP = "\0";
|
|
65
|
-
function hostFolderKey(session) {
|
|
66
|
-
const path =
|
|
142
|
+
function hostFolderKey(session, projects) {
|
|
143
|
+
const path = sidebarGroupPathOf(session, projects);
|
|
67
144
|
if (!session.hostId || !path) return path;
|
|
68
145
|
return `${path.replace(/\/+$/, "") || "/"}${HOST_SEP}${session.hostId}`;
|
|
69
146
|
}
|
|
@@ -76,19 +153,20 @@ function hostFolderKey(session) {
|
|
|
76
153
|
* server folder.
|
|
77
154
|
*
|
|
78
155
|
* @param sessions - The listed sessions.
|
|
156
|
+
* @param projects - This computer's projects: a session filed in one groups under it, not under its repository.
|
|
79
157
|
*/
|
|
80
|
-
function repoGroups(sessions) {
|
|
158
|
+
function repoGroups(sessions, projects) {
|
|
81
159
|
const local = /* @__PURE__ */ new Map();
|
|
82
160
|
const remote = /* @__PURE__ */ new Map();
|
|
83
161
|
for (const session of sessions) {
|
|
84
|
-
if (!session.repoKey || !projectPathOf(session)) continue;
|
|
162
|
+
if (!session.repoKey || !projectPathOf(session) || !session.hostId && projects?.filed.has(session.id)) continue;
|
|
85
163
|
if (session.hostId) {
|
|
86
164
|
const key = hostFolderKey(session);
|
|
87
165
|
const first = remote.get(session.repoKey);
|
|
88
166
|
if (first === void 0 || key < first) remote.set(session.repoKey, key);
|
|
89
167
|
} else {
|
|
90
168
|
const folders = local.get(session.repoKey) ?? /* @__PURE__ */ new Set();
|
|
91
|
-
folders.add(projectPathOf(session)
|
|
169
|
+
folders.add(trimSlashes(projectPathOf(session)));
|
|
92
170
|
local.set(session.repoKey, folders);
|
|
93
171
|
}
|
|
94
172
|
}
|
|
@@ -156,9 +234,11 @@ function buildHostSidebarRows(sessions, hosts, groupBy, sortBy, options = {}) {
|
|
|
156
234
|
const servers = new Map(hosts.filter((host) => host.kind === "server").map((host) => [host.id, host.name]));
|
|
157
235
|
if (groupBy !== "host") {
|
|
158
236
|
const listed = sessions.filter((s) => !s.hostId || servers.has(s.hostId));
|
|
159
|
-
const
|
|
237
|
+
const projects = groupBy === "project" ? options.projects : void 0;
|
|
238
|
+
const groups = servers.size > 0 ? repoGroups(listed, projects) : /* @__PURE__ */ new Map();
|
|
160
239
|
const repoByGroup = new Map([...groups].map(([repoKey, group]) => [group, repoKey]));
|
|
161
|
-
const
|
|
240
|
+
const filed = (s) => !s.hostId && projects?.filed.has(s.id) === true;
|
|
241
|
+
const rows = buildSidebarRows(listed, groupBy, sortBy, options, (s) => !filed(s) && s.repoKey && groups.has(s.repoKey) ? groups.get(s.repoKey) : hostFolderKey(s, projects));
|
|
162
242
|
return servers.size > 0 ? rows.map((row) => serverFolderHeader(withRepoKey(row, repoByGroup))) : rows;
|
|
163
243
|
}
|
|
164
244
|
const local = sessions.filter((s) => !s.hostId);
|
|
@@ -183,7 +263,7 @@ function buildHostSidebarRows(sessions, hosts, groupBy, sortBy, options = {}) {
|
|
|
183
263
|
session: open
|
|
184
264
|
});
|
|
185
265
|
} else {
|
|
186
|
-
const { pinnedProjects: _pinnedProjects, ...rest } = options;
|
|
266
|
+
const { pinnedProjects: _pinnedProjects, projects: _projects, ...rest } = options;
|
|
187
267
|
const rows = buildSidebarRows(own, "project", sortBy, {
|
|
188
268
|
...host.kind === "local" ? options : rest,
|
|
189
269
|
idPrefix: `${host.id}:`
|
|
@@ -359,4 +439,4 @@ function nestSidebarRows(rows) {
|
|
|
359
439
|
}
|
|
360
440
|
return top;
|
|
361
441
|
}
|
|
362
|
-
export { CHATS_BUCKET, buildHostSidebarRows, buildQuerySidebarRows, buildSidebarRows, groupsByFolder, isProjectMember, itemRows, nestSidebarRows, partitionMainSession, projectPathOf, repoGroups };
|
|
442
|
+
export { CHATS_BUCKET, buildHostSidebarRows, buildQuerySidebarRows, buildSidebarRows, groupsByFolder, isProjectMember, itemRows, nestSidebarRows, partitionMainSession, projectGroupPath, projectIdOfGroup, projectPathOf, repoGroups, sidebarGroupPathOf, sidebarProjectIndex };
|
|
@@ -31,6 +31,11 @@ export interface SidebarListSession {
|
|
|
31
31
|
spaceId?: string;
|
|
32
32
|
/** The orchestration main session. */
|
|
33
33
|
isMain?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* A project's Main (docs/ORCHESTRATION.md § Project Mains): its project, and `off` while that project's Main is off.
|
|
36
|
+
* Off, the sidebar leaves it out; on, it is pinned first, and its pin can't be moved or removed.
|
|
37
|
+
*/
|
|
38
|
+
projectMain?: SidebarProjectMain;
|
|
34
39
|
/** Its folder is a git repository. */
|
|
35
40
|
isGitRepo?: boolean;
|
|
36
41
|
/**
|
|
@@ -60,6 +65,13 @@ export interface SidebarListSession {
|
|
|
60
65
|
*/
|
|
61
66
|
facets?: Readonly<Record<string, unknown>>;
|
|
62
67
|
}
|
|
68
|
+
/** A project's Main, as its sidebar row says it. */
|
|
69
|
+
export interface SidebarProjectMain {
|
|
70
|
+
/** The project it orchestrates. */
|
|
71
|
+
projectId: string;
|
|
72
|
+
/** The project's Main is off: the session is not listed. */
|
|
73
|
+
off?: true;
|
|
74
|
+
}
|
|
63
75
|
/** Which sessions the list reads: the archive axis is the one the host filters. */
|
|
64
76
|
export type SessionArchiveFilter = 'active' | 'archived' | 'all';
|
|
65
77
|
/** Only sessions touched within the last day, 3, 7 or 30 days. */
|
|
@@ -17,6 +17,18 @@
|
|
|
17
17
|
import { ChatEvent } from "../host.js";
|
|
18
18
|
import { MarkdownDeltaOptions, TranscriptEvents } from "zidane/chat/pure";
|
|
19
19
|
import { Owner, StreamEvent } from "zidane/chat";
|
|
20
|
+
/**
|
|
21
|
+
* The rows a run's end adds (`run:end`): its failure, with who stopped it when someone did, or, for a run that ended
|
|
22
|
+
* without a failure, the line that says who stopped it (as the reloaded transcript has it, `runEnding`).
|
|
23
|
+
*
|
|
24
|
+
* @param end - The run's end, as the host sent it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function runEndEvents(end: {
|
|
27
|
+
ok: boolean;
|
|
28
|
+
error?: string;
|
|
29
|
+
detail?: StreamEvent['detail'];
|
|
30
|
+
stoppedBy?: StreamEvent['stoppedBy'];
|
|
31
|
+
}): ChatEvent[];
|
|
20
32
|
/** A live transcript event with the live timings (`ChatEvent`'s, the desktop app's `GuiStreamEvent`'s). */
|
|
21
33
|
type TimedEvent = Omit<StreamEvent, 'attachments'> & Pick<ChatEvent, 'thinkingStartedAt' | 'thinkingMs' | 'receivedAt'>;
|
|
22
34
|
/**
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
import { appendMarkdownDelta, appendThinkingLines, appendTranscriptEvent, chunkFact, finalizeStreamingMarkdown, mapTranscript, mergeTargetIndex, ownerOf, readEnvironmentSetup, transcriptFinalizeStreamingMarkdownForOwner, transcriptMarkdownDelta, transcriptThinkingLines, transcriptUpsertEnvironmentSetup, transcriptUpsertToolProgress, upsertEnvironmentSetup, upsertToolProgress, withTranscriptTail } from "zidane/chat/pure";
|
|
1
|
+
import { STOPPED_TEXT, appendMarkdownDelta, appendThinkingLines, appendTranscriptEvent, chunkFact, finalizeStreamingMarkdown, mapTranscript, mergeTargetIndex, ownerOf, readEnvironmentSetup, transcriptFinalizeStreamingMarkdownForOwner, transcriptMarkdownDelta, transcriptThinkingLines, transcriptUpsertEnvironmentSetup, transcriptUpsertToolProgress, upsertEnvironmentSetup, upsertToolProgress, withTranscriptTail } from "zidane/chat/pure";
|
|
2
2
|
// src/chat/headless/streams/live-events.ts
|
|
3
|
+
/**
|
|
4
|
+
* The rows a run's end adds (`run:end`): its failure, with who stopped it when someone did, or, for a run that ended
|
|
5
|
+
* without a failure, the line that says who stopped it (as the reloaded transcript has it, `runEnding`).
|
|
6
|
+
*
|
|
7
|
+
* @param end - The run's end, as the host sent it.
|
|
8
|
+
*/
|
|
9
|
+
function runEndEvents(end) {
|
|
10
|
+
if (!end.ok && end.error) return [{
|
|
11
|
+
kind: "error",
|
|
12
|
+
text: end.error,
|
|
13
|
+
...end.detail ? { detail: end.detail } : {},
|
|
14
|
+
...end.stoppedBy ? { stoppedBy: end.stoppedBy } : {}
|
|
15
|
+
}];
|
|
16
|
+
return end.stoppedBy ? [{
|
|
17
|
+
kind: "error",
|
|
18
|
+
text: STOPPED_TEXT,
|
|
19
|
+
stoppedBy: end.stoppedBy
|
|
20
|
+
}] : [];
|
|
21
|
+
}
|
|
3
22
|
const rows = (events) => events;
|
|
4
23
|
const timed = (events) => events;
|
|
5
24
|
function closed(event, startedAt, now) {
|
|
@@ -126,4 +145,4 @@ function isLive(events) {
|
|
|
126
145
|
function finishLiveTranscript(transcript, now = Date.now()) {
|
|
127
146
|
return mapTranscript(transcript, (events) => finishLive(events, now), (chunk) => chunkFact(chunk, "live", isLive));
|
|
128
147
|
}
|
|
129
|
-
export { applyLiveEvent, applyLiveEventToTranscript, closeThinkingSegment, endTurnInTranscript, finishLive, finishLiveTranscript };
|
|
148
|
+
export { applyLiveEvent, applyLiveEventToTranscript, closeThinkingSegment, endTurnInTranscript, finishLive, finishLiveTranscript, runEndEvents };
|
|
@@ -25,6 +25,11 @@ export interface PendingEcho {
|
|
|
25
25
|
clientMessageId?: string;
|
|
26
26
|
/** The row the client appended. The echo gives it its turn id. */
|
|
27
27
|
event: ChatEvent;
|
|
28
|
+
/**
|
|
29
|
+
* A live share's message the server holds while the owner's computer is offline: the owner's name. No run takes it
|
|
30
|
+
* before that computer is back, so a run's end keeps it waiting (`holdPrompt`).
|
|
31
|
+
*/
|
|
32
|
+
heldFor?: string;
|
|
28
33
|
}
|
|
29
34
|
/** Options for {@link SessionStreamStore}. */
|
|
30
35
|
export interface SessionStreamStoreOptions {
|
|
@@ -476,6 +481,16 @@ export declare class SessionStreamStore<K extends string = string> {
|
|
|
476
481
|
* @param clientMessageId - The id the send gave the message (`SendOptions.clientMessageId`). The store matches the echo by it.
|
|
477
482
|
*/
|
|
478
483
|
appendUserPrompt(sessionId: K, text: string, refs?: readonly PromptSegmentRef[], rawAttachments?: readonly ChatAttachment[], clientMessageId?: string): void;
|
|
484
|
+
/**
|
|
485
|
+
* Marks a prompt this client appended as held: a live share's server keeps it until the owner's computer is back
|
|
486
|
+
* (the send answered `waitingFor`). The row says so (`ChatEvent.heldFor`) until its echo comes, which turns it into
|
|
487
|
+
* the sent prompt, in place.
|
|
488
|
+
*
|
|
489
|
+
* @param sessionId - The session.
|
|
490
|
+
* @param clientMessageId - The id the send gave the message.
|
|
491
|
+
* @param owner - The owner's name.
|
|
492
|
+
*/
|
|
493
|
+
holdPrompt(sessionId: K, clientMessageId: string, owner: string): void;
|
|
479
494
|
/**
|
|
480
495
|
* Unwind ONE pending echo after a FAILED send — a refused/errored send
|
|
481
496
|
* produces no run, so the `run:end` sweep never fires and the stale
|
|
@@ -562,6 +577,8 @@ export declare class SessionStreamStore<K extends string = string> {
|
|
|
562
577
|
* turned on. A row that a reload replaced is left alone.
|
|
563
578
|
*/
|
|
564
579
|
private _bindLocalPrompt;
|
|
580
|
+
/** Puts `next` in place of this client's prompt row `local`, as the same row (it updates, never remounts). */
|
|
581
|
+
private _replaceLocalPrompt;
|
|
565
582
|
/**
|
|
566
583
|
* The loop changed a turn's text after it streamed (`turn:end.text`): the
|
|
567
584
|
* owner's streamed markdown rows of the turn become the saved text blocks,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inheritRowIdentity } from "../transcript/collapse.js";
|
|
2
|
-
import { applyLiveEventToTranscript, endTurnInTranscript, finishLiveTranscript } from "./live-events.js";
|
|
2
|
+
import { applyLiveEventToTranscript, endTurnInTranscript, finishLiveTranscript, runEndEvents } from "./live-events.js";
|
|
3
3
|
import { mergeLiveTail } from "./merge.js";
|
|
4
4
|
import { mergePromptPreviews, missingPreviewData } from "./prompt-previews.js";
|
|
5
5
|
import { defaultFrameScheduler } from "./scheduler.js";
|
|
@@ -790,6 +790,26 @@ var SessionStreamStore = class {
|
|
|
790
790
|
if (!had) this._notifyHas();
|
|
791
791
|
}
|
|
792
792
|
/**
|
|
793
|
+
* Marks a prompt this client appended as held: a live share's server keeps it until the owner's computer is back
|
|
794
|
+
* (the send answered `waitingFor`). The row says so (`ChatEvent.heldFor`) until its echo comes, which turns it into
|
|
795
|
+
* the sent prompt, in place.
|
|
796
|
+
*
|
|
797
|
+
* @param sessionId - The session.
|
|
798
|
+
* @param clientMessageId - The id the send gave the message.
|
|
799
|
+
* @param owner - The owner's name.
|
|
800
|
+
*/
|
|
801
|
+
holdPrompt(sessionId, clientMessageId, owner) {
|
|
802
|
+
const entry = this._pendingEcho.get(sessionId)?.find((p) => p.clientMessageId === clientMessageId);
|
|
803
|
+
if (!entry) return;
|
|
804
|
+
const held = {
|
|
805
|
+
...entry.event,
|
|
806
|
+
heldFor: owner
|
|
807
|
+
};
|
|
808
|
+
this._replaceLocalPrompt(sessionId, entry.event, held);
|
|
809
|
+
entry.event = held;
|
|
810
|
+
entry.heldFor = owner;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
793
813
|
* Unwind ONE pending echo after a FAILED send — a refused/errored send
|
|
794
814
|
* produces no run, so the `run:end` sweep never fires and the stale
|
|
795
815
|
* entry would silently swallow an identical remote prompt later.
|
|
@@ -878,11 +898,7 @@ var SessionStreamStore = class {
|
|
|
878
898
|
this.runStateVersion++;
|
|
879
899
|
const prior = this._events.transcriptOrEmpty(signal.sessionId);
|
|
880
900
|
let next = finishLiveTranscript(prior);
|
|
881
|
-
|
|
882
|
-
kind: "error",
|
|
883
|
-
text: signal.error,
|
|
884
|
-
...signal.detail ? { detail: signal.detail } : {}
|
|
885
|
-
});
|
|
901
|
+
for (const event of runEndEvents(signal)) next = appendTranscriptEvent(next, event);
|
|
886
902
|
const had = this._events.has(signal.sessionId);
|
|
887
903
|
const wasRunning = this._running.get(signal.sessionId) === true;
|
|
888
904
|
this._events.setTranscript(signal.sessionId, next);
|
|
@@ -891,7 +907,9 @@ var SessionStreamStore = class {
|
|
|
891
907
|
const streamed = this._runActivity.delete(signal.sessionId);
|
|
892
908
|
if (!sawStart && (wasRunning || streamed) && this._pages.has(signal.sessionId)) this._refetchDue.add(signal.sessionId);
|
|
893
909
|
this._retry.delete(signal.sessionId);
|
|
894
|
-
this._pendingEcho.
|
|
910
|
+
const held = this._pendingEcho.get(signal.sessionId)?.filter((p) => p.heldFor !== void 0);
|
|
911
|
+
if (held?.length) this._pendingEcho.set(signal.sessionId, held);
|
|
912
|
+
else this._pendingEcho.delete(signal.sessionId);
|
|
895
913
|
this._notifySession(signal.sessionId);
|
|
896
914
|
if (!had) this._notifyHas();
|
|
897
915
|
return;
|
|
@@ -914,7 +932,7 @@ var SessionStreamStore = class {
|
|
|
914
932
|
if (pending && index !== -1) {
|
|
915
933
|
const [local] = pending.splice(index, 1);
|
|
916
934
|
const { turnId, skillGroups } = signal.event;
|
|
917
|
-
if (turnId !== void 0 || skillGroups?.length) this._bindLocalPrompt(signal.sessionId, local.event, {
|
|
935
|
+
if (turnId !== void 0 || skillGroups?.length || local.heldFor !== void 0) this._bindLocalPrompt(signal.sessionId, local.event, {
|
|
918
936
|
...turnId !== void 0 ? { turnId } : {},
|
|
919
937
|
...skillGroups?.length ? { skillGroups } : {}
|
|
920
938
|
});
|
|
@@ -1084,16 +1102,21 @@ var SessionStreamStore = class {
|
|
|
1084
1102
|
* turned on. A row that a reload replaced is left alone.
|
|
1085
1103
|
*/
|
|
1086
1104
|
_bindLocalPrompt(sessionId, local, echo) {
|
|
1105
|
+
const { heldFor: _held, ...sent } = local;
|
|
1106
|
+
this._replaceLocalPrompt(sessionId, local, {
|
|
1107
|
+
...sent,
|
|
1108
|
+
...echo
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
/** Puts `next` in place of this client's prompt row `local`, as the same row (it updates, never remounts). */
|
|
1112
|
+
_replaceLocalPrompt(sessionId, local, next) {
|
|
1087
1113
|
const events = this._events.get(sessionId);
|
|
1088
1114
|
const at = events?.indexOf(local) ?? -1;
|
|
1089
1115
|
if (!events || at === -1) return;
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
};
|
|
1095
|
-
inheritRowIdentity(events, next);
|
|
1096
|
-
this._events.set(sessionId, next);
|
|
1116
|
+
const replaced = events.slice();
|
|
1117
|
+
replaced[at] = next;
|
|
1118
|
+
inheritRowIdentity(events, replaced);
|
|
1119
|
+
this._events.set(sessionId, replaced);
|
|
1097
1120
|
this._notifySession(sessionId);
|
|
1098
1121
|
}
|
|
1099
1122
|
/**
|
|
@@ -60,7 +60,7 @@ export type SessionStreamSignal<K extends string = string> = {
|
|
|
60
60
|
runId?: string;
|
|
61
61
|
startedAt?: number;
|
|
62
62
|
} |
|
|
63
|
-
/** A run ended; a failed one (`ok: false` with an `error`) appends an error row. */
|
|
63
|
+
/** A run ended; a failed one (`ok: false` with an `error`) appends an error row, and so does one a named person stopped (`stoppedBy`). */
|
|
64
64
|
{
|
|
65
65
|
kind: 'run:end';
|
|
66
66
|
sessionId: K;
|
|
@@ -68,6 +68,7 @@ export type SessionStreamSignal<K extends string = string> = {
|
|
|
68
68
|
ok: boolean;
|
|
69
69
|
error?: string;
|
|
70
70
|
detail?: StreamEvent['detail'];
|
|
71
|
+
stoppedBy?: StreamEvent['stoppedBy'];
|
|
71
72
|
} |
|
|
72
73
|
/** A turn of the parent (or of the subagent `childId`) ended: its streaming markdown is final, and is `text` when the host sends it (the saved text blocks, when the loop changed them after they streamed). */
|
|
73
74
|
{
|
|
@@ -347,7 +347,8 @@ function collapseAll(events, showEditDiffs, isStreaming) {
|
|
|
347
347
|
...event.skillGroups && event.skillGroups.length > 0 ? { skillGroups: event.skillGroups } : {},
|
|
348
348
|
...eventAttachments && eventAttachments.length > 0 ? { attachments: eventAttachments } : {},
|
|
349
349
|
...event.synthetic ? { synthetic: true } : {},
|
|
350
|
-
...origin ? { origin } : {}
|
|
350
|
+
...origin ? { origin } : {},
|
|
351
|
+
...event.heldFor !== void 0 ? { heldFor: event.heldFor } : {}
|
|
351
352
|
};
|
|
352
353
|
}));
|
|
353
354
|
break;
|
|
@@ -503,6 +504,7 @@ function collapseAll(events, showEditDiffs, isStreaming) {
|
|
|
503
504
|
id: `e-${sid}`,
|
|
504
505
|
text: event.text,
|
|
505
506
|
...event.detail ? { detail: event.detail } : {},
|
|
507
|
+
...event.stoppedBy ? { stoppedBy: event.stoppedBy } : {},
|
|
506
508
|
...event.notice ? { notice: event.notice } : {},
|
|
507
509
|
...event.tool ? { tool: event.tool } : {},
|
|
508
510
|
...event.callId ? { callId: event.callId } : {}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* batch* tool runs, thinking chains, task bursts
|
|
9
9
|
* markRunFailures a run that ended early → one row that can continue or retry
|
|
10
10
|
* dockRunReceipts run receipts onto their reply
|
|
11
|
+
* groupSessionEvents updates from other sessions in a row → one group
|
|
11
12
|
* foldExchanges compact density: each exchange's work behind one row
|
|
12
13
|
* clusterByOwner subagent rows → blocks per spawn
|
|
13
14
|
*
|
|
@@ -3,6 +3,7 @@ import { collapseEvents, collapseSeamRow } from "./collapse.js";
|
|
|
3
3
|
import { dockRunReceipts, findLastStreamingRow, foldExchanges } from "./fold.js";
|
|
4
4
|
import { nestToolCalls, nestedCallVisible } from "./nesting.js";
|
|
5
5
|
import { markRunFailures } from "./run-failures.js";
|
|
6
|
+
import { groupSessionEvents } from "./session-groups.js";
|
|
6
7
|
import { gatherCommandNotes, isCacheNotice, noteTranscriptPass } from "zidane/chat/pure";
|
|
7
8
|
// src/chat/headless/transcript/derive.ts
|
|
8
9
|
/**
|
|
@@ -40,7 +41,8 @@ function deriveRowsPart(events, streaming, options, final, before) {
|
|
|
40
41
|
const batched = batchTaskRuns(batchThinkingRuns(batchToolRuns(nested, options.groupToolCalls)));
|
|
41
42
|
const failed = markRunFailures(batched);
|
|
42
43
|
const { visibleRows, receiptByRowId } = dockRunReceipts(failed, options.showRunReceipt);
|
|
43
|
-
const
|
|
44
|
+
const grouped = groupSessionEvents(visibleRows);
|
|
45
|
+
const rows = options.compact ? foldExchanges(grouped, streaming, final) : grouped;
|
|
44
46
|
return {
|
|
45
47
|
rows,
|
|
46
48
|
receipts: receiptByRowId,
|
|
@@ -337,6 +337,7 @@ function dotVariantFor(row) {
|
|
|
337
337
|
if (row.live) return "tool-running";
|
|
338
338
|
return row.stats.tools > 0 && row.stats.failed === row.stats.tools ? "tool-err" : "tool-ok";
|
|
339
339
|
case "message-group": return row.messages.length === 0 ? "text" : "messages";
|
|
340
|
+
case "session-event-group": return row.level === "updates" ? "session-group" : row.level === "project" ? "session-project" : row.level === "worktree" ? "session-worktree" : `session-${row.events.at(-1).sessionEvent.status}`;
|
|
340
341
|
case "task": return TASK_DOT[taskOutcome(row.task)];
|
|
341
342
|
case "task-batch": {
|
|
342
343
|
const counts = countTaskOutcomes(row.tasks.map((t) => t.task));
|
|
@@ -7,7 +7,8 @@ import { FoldActionItem, FoldActionState, foldActionItems, toolAction } from "./
|
|
|
7
7
|
import { nestToolCalls, nestedCallVisible } from "./nesting.js";
|
|
8
8
|
import { PairingResult, ToolPairing, pairToolEvents } from "./pairing.js";
|
|
9
9
|
import { EMPTY_RAIL, RailExchange, RailModel, TranscriptRailState, TranscriptRailStore, computeRailModel, computeRailModelParts, createTranscriptRailStore, dataRowSelector, plainPreview, railWithOutline, sameRail } from "./rail.js";
|
|
10
|
-
import { BashExitMeta, Cluster, DotVariant, ExchangeFoldStats, GroupCluster, Owned, Row, SpawnMeta, TaskInfo, ToolRowModel, firstRowId, parseBashExitMeta } from "./rows.js";
|
|
10
|
+
import { BashExitMeta, Cluster, DotVariant, ExchangeFoldStats, GroupCluster, Owned, Row, SessionEventGroupLevel, SessionEventRowModel, SpawnMeta, TaskInfo, ToolRowModel, firstRowId, parseBashExitMeta } from "./rows.js";
|
|
11
11
|
import { RunFailure, failureTooltip, markRunFailures } from "./run-failures.js";
|
|
12
12
|
import { SelectStops, computeSelectStops, rowTurnIds, stopForRow } from "./select-stops.js";
|
|
13
|
-
|
|
13
|
+
import { groupSessionEvents, latestPerConversation } from "./session-groups.js";
|
|
14
|
+
export { type AuthCardPlan, type AuthFixes, type AuthSettingsTarget, type BashExitMeta, type Cluster, type DotVariant, EMPTY_RAIL, type ExchangeFoldStats, type ExchangeMedium, type FoldActionItem, type FoldActionState, type GroupCluster, type MediaRef, type Owned, type PairingResult, type RailExchange, type RailModel, type Row, type RunFailure, type SelectStops, type SessionEventGroupLevel, type SessionEventRowModel, type SpawnMeta, type TaskInfo, type ToolPairing, type ToolRowModel, type TranscriptRailState, type TranscriptRailStore, authFailureDetails, batchTaskRuns, batchThinkingRuns, batchToolRuns, clusterByOwner, collapseEvents, computeRailModel, computeRailModelParts, computeSelectStops, createAuthFixes, createTranscriptRailStore, dataRowSelector, dockRunReceipts, dotVariantFor, exchangesMedia, failureTooltip, findLastStreamingRow, firstRowId, foldActionItems, foldExchanges, foldWorkerRows, groupSessionEvents, inheritRowIdentity, isAuthFixed, latestPerConversation, markRunFailures, mediaRefsOf, mediumKey, nestToolCalls, nestedCallVisible, pairToolEvents, parseBashExitMeta, plainPreview, planAuthCard, railWithOutline, refusedSpawn, rowTurnIds, sameRail, stopForRow, toolAction, toolFailed };
|
|
@@ -10,4 +10,5 @@ import { EMPTY_RAIL, computeRailModel, computeRailModelParts, createTranscriptRa
|
|
|
10
10
|
import { firstRowId, parseBashExitMeta } from "./rows.js";
|
|
11
11
|
import { failureTooltip, markRunFailures } from "./run-failures.js";
|
|
12
12
|
import { computeSelectStops, rowTurnIds, stopForRow } from "./select-stops.js";
|
|
13
|
-
|
|
13
|
+
import { groupSessionEvents, latestPerConversation } from "./session-groups.js";
|
|
14
|
+
export { EMPTY_RAIL, authFailureDetails, batchTaskRuns, batchThinkingRuns, batchToolRuns, clusterByOwner, collapseEvents, computeRailModel, computeRailModelParts, computeSelectStops, createAuthFixes, createTranscriptRailStore, dataRowSelector, dockRunReceipts, dotVariantFor, exchangesMedia, failureTooltip, findLastStreamingRow, firstRowId, foldActionItems, foldExchanges, foldWorkerRows, groupSessionEvents, inheritRowIdentity, isAuthFixed, latestPerConversation, markRunFailures, mediaRefsOf, mediumKey, nestToolCalls, nestedCallVisible, pairToolEvents, parseBashExitMeta, plainPreview, planAuthCard, railWithOutline, refusedSpawn, rowTurnIds, sameRail, stopForRow, toolAction, toolFailed };
|
|
@@ -120,6 +120,11 @@ export interface TranscriptRailState extends RailModel {
|
|
|
120
120
|
selected: string | null;
|
|
121
121
|
/** The session's whole prompt outline while part of its history is not loaded; `null` otherwise. */
|
|
122
122
|
outline: readonly PromptOutlineEntry[] | null;
|
|
123
|
+
/**
|
|
124
|
+
* The session's outline is being read for the first time (part of its history is not loaded): the rail waits for
|
|
125
|
+
* it, so it never shows the loaded prompts alone and then grows.
|
|
126
|
+
*/
|
|
127
|
+
outlinePending: boolean;
|
|
123
128
|
/** Loads the history up to a turn position (`Transcript.loadThrough`); `null`: unloaded prompts can't be reached. */
|
|
124
129
|
loadThrough: ((index: number) => Promise<boolean>) | null;
|
|
125
130
|
}
|
|
@@ -135,8 +140,10 @@ export interface TranscriptRailStore extends Readable<TranscriptRailState> {
|
|
|
135
140
|
hover: (id: string | null) => void;
|
|
136
141
|
/** The exchange holding select-turn mode's cursor, or `null`. */
|
|
137
142
|
select: (id: string | null) => void;
|
|
138
|
-
/** The session's outline (`null`: none, all is loaded) and how to load up to one of its prompts. */
|
|
143
|
+
/** The session's outline (`null`: none, all is loaded) and how to load up to one of its prompts. Ends `outlinePending`. */
|
|
139
144
|
publishOutline: (outline: readonly PromptOutlineEntry[] | null, loadThrough: ((index: number) => Promise<boolean>) | null) => void;
|
|
145
|
+
/** A session whose outline is about to be read: drops the last one, and the rail waits (`outlinePending`). */
|
|
146
|
+
expectOutline: () => void;
|
|
140
147
|
}
|
|
141
148
|
/** A rail store with no exchange: one per transcript view (the provider makes it). */
|
|
142
149
|
export declare function createTranscriptRailStore(): TranscriptRailStore;
|