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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { artifactMention } from "zidane/chat/pure";
|
|
2
|
+
// src/chat/rich-composer/artifact-mentions.ts
|
|
3
|
+
/**
|
|
4
|
+
* The artifacts that match every word of `query` (in their label, locator or kind), as popover rows.
|
|
5
|
+
*
|
|
6
|
+
* @param entries - The project's artifacts, the newest first.
|
|
7
|
+
* @param query - What was typed after `#`.
|
|
8
|
+
* @param limit - The most rows.
|
|
9
|
+
* @param section - The rows' section label.
|
|
10
|
+
*/
|
|
11
|
+
function artifactMentionItems(entries, query, limit, section) {
|
|
12
|
+
const words = query.toLowerCase().split(/\s+/).filter(Boolean);
|
|
13
|
+
return entries.filter((entry) => words.every((word) => `${entry.label} ${entry.uri} ${entry.kind}`.toLowerCase().includes(word))).slice(0, limit).map((entry) => ({
|
|
14
|
+
id: artifactMention(entry.id, entry.label).slice(1),
|
|
15
|
+
label: entry.label,
|
|
16
|
+
meta: entry.kind,
|
|
17
|
+
section
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
/** The most characters of an artifact's label its composer chip shows, as the sent prompt's chip does (`40ch`). */
|
|
21
|
+
const CHIP_LABEL_MAX = 40;
|
|
22
|
+
/**
|
|
23
|
+
* The text of an artifact's composer chip: its label, a long one cut to an ellipsis (the chip is an inline box, so it
|
|
24
|
+
* cannot clip itself; the full label is its hover text).
|
|
25
|
+
*
|
|
26
|
+
* @param label - The artifact's label.
|
|
27
|
+
*/
|
|
28
|
+
function artifactChipLabel(label) {
|
|
29
|
+
const chars = Array.from(label);
|
|
30
|
+
return chars.length > CHIP_LABEL_MAX ? `${chars.slice(0, 39).join("").trimEnd()}…` : label;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Whether a chat mention node's id is an artifact mention's text (a chat token never starts with `[`).
|
|
34
|
+
*
|
|
35
|
+
* @param id - The node's id.
|
|
36
|
+
*/
|
|
37
|
+
function isArtifactMentionId(id) {
|
|
38
|
+
return id.startsWith("[");
|
|
39
|
+
}
|
|
40
|
+
export { artifactChipLabel, artifactMentionItems, isArtifactMentionId };
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* The rich composer's Tiptap extensions: a StarterKit with lists, inline
|
|
3
3
|
* code and code blocks only, the placeholder per prompt mode, and one
|
|
4
4
|
* Mention node per completion trigger
|
|
5
|
-
* (`@` files, `/` skills and commands, `#` chats
|
|
6
|
-
* trigger), each with its popover
|
|
5
|
+
* (`@` files, `/` skills and commands, `#` chats and the project's
|
|
6
|
+
* artifacts, each extension's trigger), each with its popover
|
|
7
|
+
* (`mention-popover.ts`).
|
|
7
8
|
*/
|
|
8
9
|
import { ComposerMode } from "../headless/composer-modes.js";
|
|
9
10
|
import { JsonNode } from "../headless/composer/editor-markdown.js";
|
|
@@ -2,6 +2,7 @@ import { splitPath } from "../../path.js";
|
|
|
2
2
|
import { draftTextToDocJson } from "../headless/composer/draft-sync.js";
|
|
3
3
|
import { findSkillGroup, skillGroupMembers } from "../headless/composer/skill-groups.js";
|
|
4
4
|
import { BADGE_GLYPH, fileBadgeSpec } from "../transcript/badges.js";
|
|
5
|
+
import { artifactChipLabel, artifactMentionItems, isArtifactMentionId } from "./artifact-mentions.js";
|
|
5
6
|
import { createMentionRenderer, projectName, suggestToMentionItems } from "./mention-popover.js";
|
|
6
7
|
import Mention from "@tiptap/extension-mention";
|
|
7
8
|
import Placeholder from "@tiptap/extension-placeholder";
|
|
@@ -260,27 +261,29 @@ function composerExtensions(ctx) {
|
|
|
260
261
|
renderHTML: ({ node }) => {
|
|
261
262
|
const token = node.attrs.id;
|
|
262
263
|
const label = typeof node.attrs.label === "string" ? node.attrs.label : token;
|
|
264
|
+
const artifact = isArtifactMentionId(token);
|
|
263
265
|
return [
|
|
264
266
|
"span",
|
|
265
267
|
{
|
|
266
|
-
"class": `zg-mention zg-mention-chat zg-badge ${BADGE_GLYPH.chat}`,
|
|
267
|
-
"data-kind": "chat",
|
|
268
|
-
"title": `#${token}
|
|
268
|
+
"class": `zg-mention zg-mention-chat zg-badge ${artifact ? BADGE_GLYPH.artifact : BADGE_GLYPH.chat}`,
|
|
269
|
+
"data-kind": artifact ? "artifact" : "chat",
|
|
270
|
+
"title": artifact ? label : `#${token}`,
|
|
271
|
+
...artifact ? { dir: "auto" } : {}
|
|
269
272
|
},
|
|
270
|
-
label
|
|
273
|
+
artifact ? artifactChipLabel(label) : label
|
|
271
274
|
];
|
|
272
275
|
},
|
|
273
276
|
suggestion: {
|
|
274
277
|
char: "#",
|
|
275
278
|
allow: ({ state, range }) => modeRef.current === "normal" && !inCode(state, range.from),
|
|
276
279
|
items: async ({ query }) => {
|
|
277
|
-
await sources.chats.read();
|
|
278
|
-
return suggestToMentionItems(chatsProvider, query, 8, (data) => ({
|
|
280
|
+
await Promise.all([sources.chats.read(), sources.artifacts.read()]);
|
|
281
|
+
return [...suggestToMentionItems(chatsProvider, query, 8, (data) => ({
|
|
279
282
|
id: data.token,
|
|
280
283
|
label: data.entry.title,
|
|
281
284
|
...data.entry.projectRoot ? { description: projectName(data.entry.projectRoot) } : {},
|
|
282
285
|
meta: labels.chatMessages(data.entry.userMessageCount)
|
|
283
|
-
}));
|
|
286
|
+
})), ...artifactMentionItems(sources.artifacts.peek(), query, 8, labels.mentionArtifacts)];
|
|
284
287
|
},
|
|
285
288
|
render: () => createMentionRenderer(mentionPopovers, "chats", {
|
|
286
289
|
onActiveChange: () => ghostGateChangedRef.current(),
|
|
@@ -290,12 +293,12 @@ function composerExtensions(ctx) {
|
|
|
290
293
|
chatScopeRef.current = next;
|
|
291
294
|
return {
|
|
292
295
|
scopeLabel: chatScopeLabel(next),
|
|
293
|
-
items: suggestToMentionItems(chatsProvider, query, 8, (data) => ({
|
|
296
|
+
items: [...suggestToMentionItems(chatsProvider, query, 8, (data) => ({
|
|
294
297
|
id: data.token,
|
|
295
298
|
label: data.entry.title,
|
|
296
299
|
...data.entry.projectRoot ? { description: projectName(data.entry.projectRoot) } : {},
|
|
297
300
|
meta: labels.chatMessages(data.entry.userMessageCount)
|
|
298
|
-
}))
|
|
301
|
+
})), ...artifactMentionItems(sources.artifacts.peek(), query, 8, labels.mentionArtifacts)]
|
|
299
302
|
};
|
|
300
303
|
}
|
|
301
304
|
})
|
|
@@ -25,6 +25,7 @@ function useComposerSources(folderPath, fileRoot, hostId, onCatalog) {
|
|
|
25
25
|
files: lists.files,
|
|
26
26
|
commands: lists.commands,
|
|
27
27
|
chats: lists.chats,
|
|
28
|
+
artifacts: lists.artifacts,
|
|
28
29
|
skills: () => held.skills,
|
|
29
30
|
skillGroups: () => held.groups,
|
|
30
31
|
location: () => held.location
|
|
@@ -6,10 +6,14 @@
|
|
|
6
6
|
*
|
|
7
7
|
* The sidebar draws it twice: the list's rows (pinned, active) in the scrolling list, the shelves'
|
|
8
8
|
* in the dock under it. Headings carry `data-inbox-section` (the section a row dropped under them
|
|
9
|
-
* lands in) and `data-flip-key` (the FLIP glide
|
|
9
|
+
* lands in: a folder's top pins), a folder's `data-inbox-folder`, and `data-flip-key` (the FLIP glide
|
|
10
|
+
* keeps them in step with the rows).
|
|
10
11
|
*/
|
|
11
12
|
import { InboxRow, InboxSection, InboxShelfId } from "../headless/sidebar/inbox.js";
|
|
13
|
+
import { ProjectIcon } from "../headless/sidebar/project-icons.js";
|
|
12
14
|
import { SidebarListSession } from "../headless/sidebar/types.js";
|
|
15
|
+
import { SidebarProjectRecord } from "./SessionSidebar.js";
|
|
16
|
+
import { SidebarProjectRef } from "./SidebarGroupHeader.js";
|
|
13
17
|
import { ReactNode } from "react";
|
|
14
18
|
/** Props of {@link InboxList}. */
|
|
15
19
|
export interface InboxListProps<S extends SidebarListSession> {
|
|
@@ -27,7 +31,27 @@ export interface InboxListProps<S extends SidebarListSession> {
|
|
|
27
31
|
onShowMore: (shelf: InboxShelfId) => void;
|
|
28
32
|
/** Starts a session in a folder's project. Absent: no button on folders. */
|
|
29
33
|
onNewSessionIn?: (path: string) => void;
|
|
34
|
+
/** The picked project icons, by folder path. */
|
|
35
|
+
projectIcons?: Readonly<Record<string, ProjectIcon>>;
|
|
36
|
+
/** Picks (or, with `null`, resets) a project's icon. Absent: folders show a plain glyph. */
|
|
37
|
+
onAssignIcon?: (fullPath: string, icon: ProjectIcon | null) => void;
|
|
38
|
+
/** Opens a folder's project home from its name; the chevron folds (as the groups layout's headers). Absent: the name folds. */
|
|
39
|
+
onOpenProject?: (project: SidebarProjectRef) => void;
|
|
40
|
+
/** The project home on show: its folder's name is current. */
|
|
41
|
+
openProject?: SidebarProjectRef | null;
|
|
42
|
+
/** Starts a new chat with no folder from the Chats folder's name. Absent: the name folds. */
|
|
43
|
+
onOpenChats?: () => void;
|
|
44
|
+
/** A new chat with no folder shows: the Chats folder's name is current. */
|
|
45
|
+
chatsOpen?: boolean;
|
|
46
|
+
/** The projects with no folder, by id: their folders' icons. */
|
|
47
|
+
projectRecords?: ReadonlyMap<string, SidebarProjectRecord>;
|
|
48
|
+
/** Opens the home of a project with no folder from its folder's name. Absent: the name folds. */
|
|
49
|
+
onOpenProjectRecord?: (projectId: string) => void;
|
|
50
|
+
/** The project with no folder whose home shows: its folder's name is current. */
|
|
51
|
+
openProjectId?: string | null;
|
|
52
|
+
/** Picks (or resets) the icon of a project with no folder. Absent: its icon shows with no picker. */
|
|
53
|
+
onSetProjectIcon?: (projectId: string, icon: ProjectIcon | null) => void;
|
|
30
54
|
}
|
|
31
55
|
/** Draws the inbox rows as `<li>` children of the sidebar's list. */
|
|
32
|
-
export declare function InboxList<S extends SidebarListSession>({ rows, renderSession, onToggleShelf, onToggleFolder, onShowMore, onNewSessionIn }: InboxListProps<S>): import("react").JSX.Element;
|
|
56
|
+
export declare function InboxList<S extends SidebarListSession>({ rows, renderSession, onToggleShelf, onToggleFolder, onShowMore, onNewSessionIn, projectIcons, onAssignIcon, onOpenProject, openProject, onOpenChats, chatsOpen, projectRecords, onOpenProjectRecord, openProjectId, onSetProjectIcon }: InboxListProps<S>): import("react").JSX.Element;
|
|
33
57
|
export type { InboxSection };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IconButton } from "../../components/IconButton.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Caret } from "../transcript/frame.js";
|
|
2
|
+
import { GroupGlyph, SessionGroupHeader } from "../SessionGroupHeader.js";
|
|
3
|
+
import { ProjectIconButton, ProjectIconGlyph } from "./ProjectIcon.js";
|
|
5
4
|
import { SidebarFold } from "./SidebarFold.js";
|
|
6
5
|
import { useSidebarLabels } from "./useSidebarLabels.js";
|
|
7
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -16,7 +15,7 @@ const SHELF_ICONS = {
|
|
|
16
15
|
const HEAD = "zg-sticky-head zg-no-drag group flex items-center gap-1.5 -mx-2 px-3 pt-3 pb-1 text-sm text-[var(--zg-text-muted)] select-none";
|
|
17
16
|
const HEAD_BUTTON = "zg-press-soft flex flex-1 items-center gap-1.5 min-w-0 bg-transparent border-0 cursor-pointer p-0 font-medium text-[var(--zg-sidebar-label-fg,var(--zg-text-muted))] hover:text-[var(--zg-text)] transition-colors";
|
|
18
17
|
/** Draws the inbox rows as `<li>` children of the sidebar's list. */
|
|
19
|
-
function InboxList({ rows, renderSession, onToggleShelf, onToggleFolder, onShowMore, onNewSessionIn }) {
|
|
18
|
+
function InboxList({ rows, renderSession, onToggleShelf, onToggleFolder, onShowMore, onNewSessionIn, projectIcons, onAssignIcon, onOpenProject, openProject, onOpenChats, chatsOpen = false, projectRecords, onOpenProjectRecord, openProjectId = null, onSetProjectIcon }) {
|
|
20
19
|
const labels = useSidebarLabels();
|
|
21
20
|
const out = [];
|
|
22
21
|
/** A heading's rows: the shelf's or the folder's, up to the next heading. */
|
|
@@ -63,51 +62,68 @@ function InboxList({ rows, renderSession, onToggleShelf, onToggleFolder, onShowM
|
|
|
63
62
|
const row = rows[i];
|
|
64
63
|
if (row.kind === "folder") {
|
|
65
64
|
const to = rowsUnder(i + 1, (r) => r.kind === "session" && r.folder === row.id);
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
65
|
+
const current = openProject != null && openProject.path === row.path && openProject.hostId === row.hostId;
|
|
66
|
+
const projectId = row.projectId;
|
|
67
|
+
const record = projectId !== void 0 ? projectRecords?.get(projectId) : void 0;
|
|
68
|
+
const label = row.chats ? labels.chats : row.label;
|
|
69
|
+
const open = row.chats ? onOpenChats ? {
|
|
70
|
+
onOpen: onOpenChats,
|
|
71
|
+
active: chatsOpen
|
|
72
|
+
} : {} : projectId !== void 0 ? onOpenProjectRecord ? {
|
|
73
|
+
onOpen: () => onOpenProjectRecord(projectId),
|
|
74
|
+
active: openProjectId === projectId
|
|
75
|
+
} : {} : onOpenProject ? {
|
|
76
|
+
onOpen: () => onOpenProject({
|
|
77
|
+
path: row.path,
|
|
78
|
+
...row.hostId ? { hostId: row.hostId } : {}
|
|
79
|
+
}),
|
|
80
|
+
active: current
|
|
81
|
+
} : {};
|
|
82
|
+
const heading = /* @__PURE__ */ jsx(SessionGroupHeader, {
|
|
83
|
+
id: row.id,
|
|
84
|
+
label,
|
|
85
|
+
collapsed: row.collapsed,
|
|
86
|
+
collapsible: row.count > 0,
|
|
87
|
+
onToggle: onToggleFolder,
|
|
88
|
+
...open,
|
|
89
|
+
className: "zg-sticky-head zg-inbox-folder",
|
|
90
|
+
dataAttributes: {
|
|
91
|
+
"data-flip-key": row.id,
|
|
92
|
+
"data-inbox-section": "pinned",
|
|
93
|
+
"data-inbox-folder": row.id
|
|
94
|
+
},
|
|
95
|
+
icon: row.chats ? /* @__PURE__ */ jsx(GroupGlyph, { icon: "i-ph-chats" }) : projectId !== void 0 ? onSetProjectIcon && !record?.iconLocked ? /* @__PURE__ */ jsx(ProjectIconButton, {
|
|
96
|
+
fullPath: projectId,
|
|
97
|
+
label,
|
|
98
|
+
...record?.icon ? { icon: record.icon } : {},
|
|
99
|
+
isGitRepo: false,
|
|
100
|
+
onAssign: onSetProjectIcon
|
|
101
|
+
}) : /* @__PURE__ */ jsx(ProjectIconGlyph, {
|
|
102
|
+
...record?.icon ? { icon: record.icon } : {},
|
|
103
|
+
isGitRepo: false
|
|
104
|
+
}) : onAssignIcon && !row.hostId ? /* @__PURE__ */ jsx(ProjectIconButton, {
|
|
105
|
+
fullPath: row.path,
|
|
106
|
+
label: row.label,
|
|
107
|
+
icon: projectIcons?.[row.path],
|
|
108
|
+
isGitRepo: row.isGitRepo,
|
|
109
|
+
onAssign: onAssignIcon
|
|
110
|
+
}) : /* @__PURE__ */ jsx(GroupGlyph, { icon: "i-ph-folder-simple" }),
|
|
111
|
+
badge: row.collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
112
|
+
className: "zg-meta shrink-0 ml-1.5",
|
|
113
|
+
children: row.count
|
|
114
|
+
}), row.urgency && /* @__PURE__ */ jsx("span", {
|
|
115
|
+
role: "img",
|
|
116
|
+
"aria-label": row.urgency === "failed" ? labels.inboxFolderFailed : labels.inboxFolderWorking,
|
|
117
|
+
className: "zg-inbox-urgency shrink-0 ml-1.5",
|
|
118
|
+
"data-urgency": row.urgency
|
|
119
|
+
})] }),
|
|
120
|
+
action: /* @__PURE__ */ jsx(Fragment, { children: onNewSessionIn && !row.chats && (projectId === void 0 || onOpenProjectRecord) && /* @__PURE__ */ jsx(IconButton, {
|
|
121
|
+
icon: "i-ph-plus",
|
|
122
|
+
label: labels.inboxNewSessionIn(label),
|
|
123
|
+
size: "xs",
|
|
124
|
+
className: "zg-row-dots",
|
|
125
|
+
onClick: () => onNewSessionIn(row.path)
|
|
126
|
+
}) })
|
|
111
127
|
}, row.id);
|
|
112
128
|
group(row.id, heading, row.collapsed, rows.slice(i + 1, to));
|
|
113
129
|
i = to;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pinned row for the orchestration "Main" session: always labeled "Main"
|
|
3
|
-
* (not the stored title),
|
|
3
|
+
* (not the stored title), its leading glyph the Orchestrator compass (unless the
|
|
4
|
+
* person picked an icon), above every group. Same row mechanics as
|
|
4
5
|
* `SessionRow` (`.zg-session-row`, `data-active`, the 18px leading slot) so
|
|
5
6
|
* it reads as part of the list, but no rename / archive / delete menu: a
|
|
6
7
|
* fixed nav entry, not a user-editable row.
|
|
@@ -43,7 +43,7 @@ function MainSessionRowInner({ sessionId, isActive, icon, onAssignIcon, onSelect
|
|
|
43
43
|
fullPath: MAIN_SESSION_ICON_KEY,
|
|
44
44
|
label: labels.mainSession,
|
|
45
45
|
icon,
|
|
46
|
-
defaultGlyph: "i-ph-
|
|
46
|
+
defaultGlyph: "i-ph-compass-fill text-[var(--zg-accent)]",
|
|
47
47
|
title: labels.changeMainIcon,
|
|
48
48
|
onAssign: onAssignIcon
|
|
49
49
|
})
|
|
@@ -24,8 +24,12 @@ import { ProjectIcon, ProjectIconMap } from "../headless/sidebar/project-icons.j
|
|
|
24
24
|
import { CSSProperties } from "react";
|
|
25
25
|
/** Forget the shared map (tests: a fresh read from storage). */
|
|
26
26
|
export declare function resetProjectIconsForTests(): void;
|
|
27
|
-
/**
|
|
28
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Icon map + setter, shared by every caller on the page.
|
|
29
|
+
*
|
|
30
|
+
* @param enabled - Read the map. Off: `{}`, and a change of it renders nothing again.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useProjectIcons(enabled?: boolean): {
|
|
29
33
|
icons: ProjectIconMap;
|
|
30
34
|
setIcon: (fullPath: string, icon: ProjectIcon | null) => void;
|
|
31
35
|
};
|
|
@@ -37,8 +41,8 @@ export interface ProjectIconGlyphProps {
|
|
|
37
41
|
isGitRepo?: boolean;
|
|
38
42
|
/** Default glyph class when nothing is assigned; overrides the folder choice. */
|
|
39
43
|
defaultGlyph?: string;
|
|
40
|
-
/** `sm`: the sidebar's 18px slot. `lg`: a heading's 28px slot (the project home). */
|
|
41
|
-
size?: 'sm' | 'lg';
|
|
44
|
+
/** `xs`: a menu row's 16px icon slot. `sm`: the sidebar's 18px slot. `lg`: a heading's 28px slot (the project home). */
|
|
45
|
+
size?: 'xs' | 'sm' | 'lg';
|
|
42
46
|
/** Extra classes on the slot. */
|
|
43
47
|
className?: string;
|
|
44
48
|
/** Inline styles on the slot. */
|
|
@@ -33,14 +33,26 @@ function setProjectIcon(fullPath, icon) {
|
|
|
33
33
|
function resetProjectIconsForTests() {
|
|
34
34
|
sharedIcons = null;
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const NO_ICONS = {};
|
|
37
|
+
const noIcons = () => NO_ICONS;
|
|
38
|
+
const unsubscribed = () => () => void 0;
|
|
39
|
+
/**
|
|
40
|
+
* Icon map + setter, shared by every caller on the page.
|
|
41
|
+
*
|
|
42
|
+
* @param enabled - Read the map. Off: `{}`, and a change of it renders nothing again.
|
|
43
|
+
*/
|
|
44
|
+
function useProjectIcons(enabled = true) {
|
|
38
45
|
return {
|
|
39
|
-
icons: useSyncExternalStore(subscribeIcons, readIcons, readIcons),
|
|
46
|
+
icons: useSyncExternalStore(enabled ? subscribeIcons : unsubscribed, enabled ? readIcons : noIcons, enabled ? readIcons : noIcons),
|
|
40
47
|
setIcon: setProjectIcon
|
|
41
48
|
};
|
|
42
49
|
}
|
|
43
50
|
const GLYPH_SIZE = {
|
|
51
|
+
xs: {
|
|
52
|
+
slot: "w-4 h-4 rounded-zg-xs",
|
|
53
|
+
emoji: "text-zg-label",
|
|
54
|
+
glyph: "text-sm"
|
|
55
|
+
},
|
|
44
56
|
sm: {
|
|
45
57
|
slot: "w-[18px] h-[18px] rounded-zg-sm",
|
|
46
58
|
emoji: "text-zg-ui",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ExtensionItem } from "../../extensions/headless/wire.js";
|
|
2
2
|
import { HostView } from "../headless/hosts.js";
|
|
3
|
+
import { ProjectIcon } from "../headless/sidebar/project-icons.js";
|
|
3
4
|
import { SidebarQueryLayer } from "../headless/sidebar/query.js";
|
|
4
5
|
import { SessionArchiveFilter, SidebarGroupBy, SidebarInboxGroupBy, SidebarLayout, SidebarListSession, SidebarSortBy, SidebarView } from "../headless/sidebar/types.js";
|
|
5
6
|
import { SidebarProject } from "./session-menu.js";
|
|
@@ -22,6 +23,32 @@ export interface SidebarSpaceSlide {
|
|
|
22
23
|
/** Toward a later space, or an earlier one. */
|
|
23
24
|
direction: 'next' | 'prev';
|
|
24
25
|
}
|
|
26
|
+
/** A project with no folder, as the sidebar lists it. */
|
|
27
|
+
export interface SidebarProjectRecord {
|
|
28
|
+
/** The project's id. */
|
|
29
|
+
id: string;
|
|
30
|
+
/** Its name. */
|
|
31
|
+
name: string;
|
|
32
|
+
/** Its icon on the host: it wins over the window's. */
|
|
33
|
+
icon?: ProjectIcon;
|
|
34
|
+
/** The person can't change its icon (a member's in organization mode): it shows with no picker. */
|
|
35
|
+
iconLocked?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The ids of this host's sessions filed in it (`projects.sessions`): in a view grouped by folder they are listed
|
|
38
|
+
* under it, whatever their folder. Absent: its folder's sessions (a project with a home), or none.
|
|
39
|
+
*/
|
|
40
|
+
sessions?: readonly string[];
|
|
41
|
+
}
|
|
42
|
+
/** A project with a home folder, as the sidebar names that folder's group. */
|
|
43
|
+
export interface SidebarHomeProject extends SidebarProjectRecord {
|
|
44
|
+
/** Its home folder, as the group's path. */
|
|
45
|
+
home: string;
|
|
46
|
+
/**
|
|
47
|
+
* The sidebar's folders in it, as their groups' paths: its home, and a folder the host files in it under another
|
|
48
|
+
* path (a symlink to the home, a folder inside it). Absent: its home alone.
|
|
49
|
+
*/
|
|
50
|
+
folders?: readonly string[];
|
|
51
|
+
}
|
|
25
52
|
/** Props of {@link SessionSidebar}. */
|
|
26
53
|
export interface SessionSidebarProps<S extends SidebarRowSession> {
|
|
27
54
|
/** The sessions the list shows (the shown space's filters applied). */
|
|
@@ -71,6 +98,27 @@ export interface SessionSidebarProps<S extends SidebarRowSession> {
|
|
|
71
98
|
onOpenChats?: () => void;
|
|
72
99
|
/** A new chat with no folder shows: the Chats header wears the active chip. */
|
|
73
100
|
chatsOpen?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Projects with no folder (`Settings.projectHome`, with `onOpenProjectRecord`): a group each in a view grouped by
|
|
103
|
+
* folder (the inbox's too), with the sessions filed in it (`sessions`), ordered and pinned like a folder's, listed
|
|
104
|
+
* with none too. Its name opens the project's home (`onOpenProjectRecord`), and so does its "+" (a chat with no
|
|
105
|
+
* folder, filed in it on its first send). Its icon picker (`onSetProjectIcon`) is for whoever can set it.
|
|
106
|
+
* Absent: none listed.
|
|
107
|
+
*/
|
|
108
|
+
folderlessProjects?: readonly SidebarProjectRecord[];
|
|
109
|
+
/** Opens the home of a project with no folder. */
|
|
110
|
+
onOpenProjectRecord?: (projectId: string) => void;
|
|
111
|
+
/** The project with no folder whose home shows: its header wears the active chip. */
|
|
112
|
+
openProjectId?: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Projects with a home folder (`Settings.projectHome`): the group of each of a project's folders (`folders`) shows
|
|
115
|
+
* its name when it is not its home's (a renamed project), with the folder as the hover hint, and its icon on the
|
|
116
|
+
* host over the window's.
|
|
117
|
+
* Absent: folder names and the window's icons.
|
|
118
|
+
*/
|
|
119
|
+
homeProjects?: readonly SidebarHomeProject[];
|
|
120
|
+
/** A project's icon was picked (`null`: reset) on its home's group or on the header of a project with no folder: the host keeps it. */
|
|
121
|
+
onSetProjectIcon?: (projectId: string, icon: ProjectIcon | null) => void;
|
|
74
122
|
/** Renames a session. */
|
|
75
123
|
onRename: (sessionId: S['id'], title: string) => Promise<void>;
|
|
76
124
|
/** Archives or restores a session. */
|
|
@@ -165,8 +213,9 @@ export interface NewSessionButtonProps {
|
|
|
165
213
|
style?: CSSProperties;
|
|
166
214
|
}
|
|
167
215
|
/**
|
|
168
|
-
* The New
|
|
169
|
-
* session is open, its ⌘N hint fading in on
|
|
216
|
+
* The New row (a new chat with no project, `labels.newSession`; its tooltip says New session and the keys): the same
|
|
217
|
+
* grid as a session row (an 18px glyph column, `text-sm`), raised while no session is open, its ⌘N hint fading in on
|
|
218
|
+
* hover or focus.
|
|
170
219
|
*
|
|
171
220
|
* @param props - What it starts, whether it is the current selection, `className` and `style`.
|
|
172
221
|
*/
|