zidane-ui 9.4.0 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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/composer/ContextBreakdown.d.ts +27 -2
- package/dist/chat/composer/ContextBreakdown.js +123 -2
- package/dist/chat/composer/DraftPickers.js +2 -0
- 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 +3 -1
- package/dist/chat/composer/ScopeToggle.js +2 -1
- package/dist/chat/composer/ServerScopeToggle.d.ts +3 -1
- package/dist/chat/composer/ServerScopeToggle.js +2 -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 +5 -0
- package/dist/chat/composer/use-draft-target.js +3 -0
- 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/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 +10 -6
- package/dist/chat/headless/index.js +30 -26
- package/dist/chat/headless/labels.d.ts +34 -4
- package/dist/chat/headless/labels.js +28 -6
- 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 +28 -2
- 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 +13 -3
- package/dist/chat/headless/sidebar/inbox.js +40 -19
- package/dist/chat/headless/sidebar/index.d.ts +5 -3
- package/dist/chat/headless/sidebar/index.js +4 -2
- package/dist/chat/headless/sidebar/labels.d.ts +30 -7
- package/dist/chat/headless/sidebar/labels.js +0 -3
- 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 +2 -1
- package/dist/chat/headless/sidebar/rows.js +7 -3
- 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/rail.d.ts +8 -1
- package/dist/chat/headless/transcript/rail.js +9 -2
- package/dist/chat/headless/transcript/rows.d.ts +5 -1
- package/dist/chat/headless/transcript-labels.d.ts +1 -0
- package/dist/chat/index.d.ts +5 -3
- package/dist/chat/index.js +7 -5
- 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 +13 -2
- package/dist/chat/sidebar/InboxList.js +44 -48
- 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 +41 -0
- package/dist/chat/sidebar/SessionSidebar.js +63 -13
- package/dist/chat/sidebar/SidebarFooter.d.ts +2 -23
- package/dist/chat/sidebar/SidebarFooter.js +2 -43
- package/dist/chat/sidebar/SidebarGroupHeader.d.ts +7 -3
- package/dist/chat/sidebar/SidebarGroupHeader.js +15 -10
- 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.js +2 -3
- package/dist/chat/sidebar/useInboxTriage.d.ts +5 -2
- package/dist/chat/sidebar/useInboxTriage.js +28 -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/transcript/PromptEcho.js +15 -2
- package/dist/chat/transcript/PromptOriginLabel.d.ts +1 -1
- package/dist/chat/transcript/TranscriptRail.d.ts +3 -1
- package/dist/chat/transcript/TranscriptRail.js +12 -2
- package/dist/chat/transcript/TranscriptRow.js +1 -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/index.d.ts +2 -2
- package/dist/chat/transcript/index.js +2 -2
- 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 +25 -3
- package/dist/chat/transcript/notices.js +136 -17
- package/dist/chat/transcript/prompt.js +8 -1
- package/dist/chat/transcript/script-input.d.ts +1 -1
- 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-Bsp5Ku7r.d.ts} +264 -134
- 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 +19 -7
- 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 +48 -0
- package/dist/session/use-home-projects.js +118 -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 +116 -0
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/index.d.ts +3 -2
- package/dist/settings/index.js +5 -4
- 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/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 +127 -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 +22 -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
|
@@ -8,6 +8,7 @@ import { ElicitationCard } from "./ElicitationCard.js";
|
|
|
8
8
|
import { usePendingInteractions } from "./hooks.js";
|
|
9
9
|
import { PlanCard } from "./PlanCard.js";
|
|
10
10
|
import { QuestionForm } from "./QuestionForm.js";
|
|
11
|
+
import { useAnswerInteraction } from "./use-answer-interaction.js";
|
|
11
12
|
import { useEffect, useState } from "react";
|
|
12
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
// src/chat/interactions/InboxPanel.tsx
|
|
@@ -20,6 +21,7 @@ const DISMISSED = "dismissed by user";
|
|
|
20
21
|
*/
|
|
21
22
|
function InboxPanel({ sessionId, focus = false, onFocusTaken, onEscape, Markdown, inProgress, recent, className, style }) {
|
|
22
23
|
const interactions = useChatHost().interactions;
|
|
24
|
+
const answer = useAnswerInteraction();
|
|
23
25
|
const labels = useChatLabels();
|
|
24
26
|
const pending = usePendingInteractions(sessionId);
|
|
25
27
|
const [rows, setRows] = useState(() => pending.map((item) => ({
|
|
@@ -100,22 +102,22 @@ function InboxPanel({ sessionId, focus = false, onFocusTaken, onEscape, Markdown
|
|
|
100
102
|
open,
|
|
101
103
|
collapsible: !isHead,
|
|
102
104
|
onToggle: () => setExpanded((e) => e === row.item.requestId ? null : row.item.requestId)
|
|
103
|
-
}), open && !row.leaving && interactions && /* @__PURE__ */ jsx("div", {
|
|
105
|
+
}), open && !row.leaving && interactions && answer && /* @__PURE__ */ jsx("div", {
|
|
104
106
|
className: "px-3 pb-3",
|
|
105
107
|
children: request.kind === "plan" ? /* @__PURE__ */ jsx(PlanCard, {
|
|
106
108
|
request,
|
|
107
109
|
autoFocus: isHead && focus,
|
|
108
110
|
Markdown,
|
|
109
|
-
onAnswer: (response) =>
|
|
111
|
+
onAnswer: (response) => answer(request.id, response)
|
|
110
112
|
}) : request.kind === "elicitation" ? /* @__PURE__ */ jsx(ElicitationCard, {
|
|
111
113
|
request,
|
|
112
114
|
autoFocus: isHead && focus,
|
|
113
|
-
onAnswer: (response) =>
|
|
115
|
+
onAnswer: (response) => answer(request.id, response)
|
|
114
116
|
}) : /* @__PURE__ */ jsx(QuestionForm, {
|
|
115
117
|
request,
|
|
116
118
|
autoFocus: isHead && focus,
|
|
117
119
|
Markdown,
|
|
118
|
-
onAnswer: (response) =>
|
|
120
|
+
onAnswer: (response) => answer(request.id, response),
|
|
119
121
|
...interactions.cancel ? { onDismiss: () => interactions.cancel(request.id, DISMISSED) } : {}
|
|
120
122
|
})
|
|
121
123
|
})]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Answers a request through the chat host, and says so in a toast when
|
|
3
|
+
* someone else answered it first (another window, another person): their
|
|
4
|
+
* answer stands.
|
|
5
|
+
*/
|
|
6
|
+
import { InteractionResponse } from "zidane/chat";
|
|
7
|
+
/**
|
|
8
|
+
* The answer path of the cards: `host.interactions.answer`, and a toast that names who answered first when this
|
|
9
|
+
* answer came second. Absent when the host has no interactions.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useAnswerInteraction(): ((requestId: string, response: InteractionResponse) => Promise<void>) | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { toast } from "../../app/toast.js";
|
|
2
|
+
import { useChatHost } from "../ChatProvider.js";
|
|
3
|
+
import { useChatLabels } from "../useChatLabels.js";
|
|
4
|
+
import { useCallback } from "react";
|
|
5
|
+
// src/chat/interactions/use-answer-interaction.ts
|
|
6
|
+
/**
|
|
7
|
+
* The answer path of the cards: `host.interactions.answer`, and a toast that names who answered first when this
|
|
8
|
+
* answer came second. Absent when the host has no interactions.
|
|
9
|
+
*/
|
|
10
|
+
function useAnswerInteraction() {
|
|
11
|
+
const interactions = useChatHost().interactions;
|
|
12
|
+
const labels = useChatLabels();
|
|
13
|
+
const answer = useCallback(async (requestId, response) => {
|
|
14
|
+
const outcome = await interactions?.answer(requestId, response);
|
|
15
|
+
if (outcome?.answeredFirst) toast.info(labels.interactionAnsweredFirst(outcome.answeredFirst.by, outcome.answeredFirst.decision), { source: "interactions" });
|
|
16
|
+
}, [interactions, labels]);
|
|
17
|
+
return interactions ? answer : void 0;
|
|
18
|
+
}
|
|
19
|
+
export { useAnswerInteraction };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `#` popover's rows for the artifacts of the composer's project (docs/ARTIFACTS.md § Mentions). A pick inserts
|
|
3
|
+
* the chat mention node with the mention's text as its id (`[label](artifact:<8 hex>)`, `artifactMention` without its
|
|
4
|
+
* `#`), so the prompt's text is the mention the host resolves at send, and the node shows the artifact's label.
|
|
5
|
+
*/
|
|
6
|
+
import { ComposerArtifactEntry } from "../headless/composer/host.js";
|
|
7
|
+
import { MentionItem } from "./MentionList.js";
|
|
8
|
+
/**
|
|
9
|
+
* The artifacts that match every word of `query` (in their label, locator or kind), as popover rows.
|
|
10
|
+
*
|
|
11
|
+
* @param entries - The project's artifacts, the newest first.
|
|
12
|
+
* @param query - What was typed after `#`.
|
|
13
|
+
* @param limit - The most rows.
|
|
14
|
+
* @param section - The rows' section label.
|
|
15
|
+
*/
|
|
16
|
+
export declare function artifactMentionItems(entries: readonly ComposerArtifactEntry[], query: string, limit: number, section: string): MentionItem[];
|
|
17
|
+
/**
|
|
18
|
+
* 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
|
|
19
|
+
* cannot clip itself; the full label is its hover text).
|
|
20
|
+
*
|
|
21
|
+
* @param label - The artifact's label.
|
|
22
|
+
*/
|
|
23
|
+
export declare function artifactChipLabel(label: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Whether a chat mention node's id is an artifact mention's text (a chat token never starts with `[`).
|
|
26
|
+
*
|
|
27
|
+
* @param id - The node's id.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isArtifactMentionId(id: string): boolean;
|
|
@@ -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,13 @@
|
|
|
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 { SidebarProjectRef } from "./SidebarGroupHeader.js";
|
|
13
16
|
import { ReactNode } from "react";
|
|
14
17
|
/** Props of {@link InboxList}. */
|
|
15
18
|
export interface InboxListProps<S extends SidebarListSession> {
|
|
@@ -27,7 +30,15 @@ export interface InboxListProps<S extends SidebarListSession> {
|
|
|
27
30
|
onShowMore: (shelf: InboxShelfId) => void;
|
|
28
31
|
/** Starts a session in a folder's project. Absent: no button on folders. */
|
|
29
32
|
onNewSessionIn?: (path: string) => void;
|
|
33
|
+
/** The picked project icons, by folder path. */
|
|
34
|
+
projectIcons?: Readonly<Record<string, ProjectIcon>>;
|
|
35
|
+
/** Picks (or, with `null`, resets) a project's icon. Absent: folders show a plain glyph. */
|
|
36
|
+
onAssignIcon?: (fullPath: string, icon: ProjectIcon | null) => void;
|
|
37
|
+
/** Opens a folder's project home from its name; the chevron folds (as the groups layout's headers). Absent: the name folds. */
|
|
38
|
+
onOpenProject?: (project: SidebarProjectRef) => void;
|
|
39
|
+
/** The project home on show: its folder's name is current. */
|
|
40
|
+
openProject?: SidebarProjectRef | null;
|
|
30
41
|
}
|
|
31
42
|
/** 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;
|
|
43
|
+
export declare function InboxList<S extends SidebarListSession>({ rows, renderSession, onToggleShelf, onToggleFolder, onShowMore, onNewSessionIn, projectIcons, onAssignIcon, onOpenProject, openProject }: InboxListProps<S>): import("react").JSX.Element;
|
|
33
44
|
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 } 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 }) {
|
|
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,48 @@ 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
|
-
children: /* @__PURE__ */ jsxs("button", {
|
|
77
|
-
type: "button",
|
|
78
|
-
onClick: () => onToggleFolder(row.id),
|
|
79
|
-
"aria-expanded": !row.collapsed,
|
|
80
|
-
className: HEAD_BUTTON,
|
|
81
|
-
children: [
|
|
82
|
-
/* @__PURE__ */ jsx("span", {
|
|
83
|
-
className: "truncate",
|
|
84
|
-
children: row.label
|
|
85
|
-
}),
|
|
86
|
-
row.collapsed && row.urgency && /* @__PURE__ */ jsx("span", {
|
|
87
|
-
role: "img",
|
|
88
|
-
"aria-label": row.urgency === "failed" ? labels.inboxFolderFailed : labels.inboxFolderWorking,
|
|
89
|
-
className: "zg-inbox-urgency shrink-0",
|
|
90
|
-
"data-urgency": row.urgency
|
|
91
|
-
}),
|
|
92
|
-
/* @__PURE__ */ jsx(Caret, {
|
|
93
|
-
open: !row.collapsed,
|
|
94
|
-
className: `shrink-0 ${row.collapsed ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`
|
|
95
|
-
})
|
|
96
|
-
]
|
|
97
|
-
})
|
|
65
|
+
const current = openProject != null && openProject.path === row.path && openProject.hostId === row.hostId;
|
|
66
|
+
const heading = /* @__PURE__ */ jsx(SessionGroupHeader, {
|
|
67
|
+
id: row.id,
|
|
68
|
+
label: row.label,
|
|
69
|
+
collapsed: row.collapsed,
|
|
70
|
+
onToggle: onToggleFolder,
|
|
71
|
+
...onOpenProject ? {
|
|
72
|
+
onOpen: () => onOpenProject({
|
|
73
|
+
path: row.path,
|
|
74
|
+
...row.hostId ? { hostId: row.hostId } : {}
|
|
98
75
|
}),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
76
|
+
active: current
|
|
77
|
+
} : {},
|
|
78
|
+
className: "zg-sticky-head zg-inbox-folder",
|
|
79
|
+
dataAttributes: {
|
|
80
|
+
"data-flip-key": row.id,
|
|
81
|
+
"data-inbox-section": "pinned",
|
|
82
|
+
"data-inbox-folder": row.id
|
|
83
|
+
},
|
|
84
|
+
icon: onAssignIcon && !row.hostId ? /* @__PURE__ */ jsx(ProjectIconButton, {
|
|
85
|
+
fullPath: row.path,
|
|
86
|
+
label: row.label,
|
|
87
|
+
icon: projectIcons?.[row.path],
|
|
88
|
+
isGitRepo: row.isGitRepo,
|
|
89
|
+
onAssign: onAssignIcon
|
|
90
|
+
}) : /* @__PURE__ */ jsx(GroupGlyph, { icon: "i-ph-folder-simple" }),
|
|
91
|
+
badge: row.collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: "zg-meta shrink-0 ml-1.5",
|
|
93
|
+
children: row.count
|
|
94
|
+
}), row.urgency && /* @__PURE__ */ jsx("span", {
|
|
95
|
+
role: "img",
|
|
96
|
+
"aria-label": row.urgency === "failed" ? labels.inboxFolderFailed : labels.inboxFolderWorking,
|
|
97
|
+
className: "zg-inbox-urgency shrink-0 ml-1.5",
|
|
98
|
+
"data-urgency": row.urgency
|
|
99
|
+
})] }),
|
|
100
|
+
action: /* @__PURE__ */ jsx(Fragment, { children: onNewSessionIn && /* @__PURE__ */ jsx(IconButton, {
|
|
101
|
+
icon: "i-ph-plus",
|
|
102
|
+
label: labels.inboxNewSessionIn(row.label),
|
|
103
|
+
size: "xs",
|
|
104
|
+
className: "zg-row-dots",
|
|
105
|
+
onClick: () => onNewSessionIn(row.path)
|
|
106
|
+
}) })
|
|
111
107
|
}, row.id);
|
|
112
108
|
group(row.id, heading, row.collapsed, rows.slice(i + 1, to));
|
|
113
109
|
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,27 @@ 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
|
+
/** A project with a home folder, as the sidebar names that folder's group. */
|
|
38
|
+
export interface SidebarHomeProject extends SidebarProjectRecord {
|
|
39
|
+
/** Its home folder, as the group's path. */
|
|
40
|
+
home: string;
|
|
41
|
+
/**
|
|
42
|
+
* The sidebar's folders in it, as their groups' paths: its home, and a folder the host files in it under another
|
|
43
|
+
* path (a symlink to the home, a folder inside it). Absent: its home alone.
|
|
44
|
+
*/
|
|
45
|
+
folders?: readonly string[];
|
|
46
|
+
}
|
|
25
47
|
/** Props of {@link SessionSidebar}. */
|
|
26
48
|
export interface SessionSidebarProps<S extends SidebarRowSession> {
|
|
27
49
|
/** The sessions the list shows (the shown space's filters applied). */
|
|
@@ -71,6 +93,25 @@ export interface SessionSidebarProps<S extends SidebarRowSession> {
|
|
|
71
93
|
onOpenChats?: () => void;
|
|
72
94
|
/** A new chat with no folder shows: the Chats header wears the active chip. */
|
|
73
95
|
chatsOpen?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Projects with no folder (`Settings.projectHome`): a header each, after the folders' groups of a view grouped by
|
|
98
|
+
* folder, whose name opens the project's home (`onOpenProjectRecord`), with its icon picker (`onSetProjectIcon`) for
|
|
99
|
+
* whoever can set it. Absent: none listed.
|
|
100
|
+
*/
|
|
101
|
+
folderlessProjects?: readonly SidebarProjectRecord[];
|
|
102
|
+
/** Opens the home of a project with no folder. */
|
|
103
|
+
onOpenProjectRecord?: (projectId: string) => void;
|
|
104
|
+
/** The project with no folder whose home shows: its header wears the active chip. */
|
|
105
|
+
openProjectId?: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Projects with a home folder (`Settings.projectHome`): the group of each of a project's folders (`folders`) shows
|
|
108
|
+
* its name when it is not its home's (a renamed project), with the folder as the hover hint, and its icon on the
|
|
109
|
+
* host over the window's.
|
|
110
|
+
* Absent: folder names and the window's icons.
|
|
111
|
+
*/
|
|
112
|
+
homeProjects?: readonly SidebarHomeProject[];
|
|
113
|
+
/** 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. */
|
|
114
|
+
onSetProjectIcon?: (projectId: string, icon: ProjectIcon | null) => void;
|
|
74
115
|
/** Renames a session. */
|
|
75
116
|
onRename: (sessionId: S['id'], title: string) => Promise<void>;
|
|
76
117
|
/** Archives or restores a session. */
|