zidane-ui 9.3.1 → 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 +9 -2
- package/dist/adapters/live.js +8 -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-git-host.js +5 -2
- package/dist/adapters/server-host.js +44 -14
- package/dist/adapters/server-machines-host.d.ts +5 -0
- package/dist/adapters/server-machines-host.js +15 -1
- 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 +69 -1
- package/dist/adapters/server-settings-sections.js +4 -1
- package/dist/adapters/sse-host.js +3 -0
- package/dist/adapters/sse-protocol.d.ts +10 -0
- 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/appearance/ZoomIndicator.js +5 -8
- 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/HostTranscript.js +15 -1
- 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/SessionStreamsProvider.d.ts +1 -1
- package/dist/chat/StatusDot.d.ts +7 -2
- package/dist/chat/StatusDot.js +3 -2
- package/dist/chat/Transcript.d.ts +3 -2
- package/dist/chat/Transcript.js +26 -7
- 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.js +2 -0
- package/dist/chat/composer/HostContextOrb.d.ts +2 -0
- package/dist/chat/composer/HostContextOrb.js +17 -2
- package/dist/chat/composer/ModelOptionsPicker.js +6 -2
- package/dist/chat/composer/ModelPicker.d.ts +1 -1
- package/dist/chat/composer/PlacePicker.d.ts +3 -1
- package/dist/chat/composer/PlacePicker.js +5 -1
- 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 +18 -3
- 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/block-runs.js +26 -1
- package/dist/chat/headless/chip-labels.d.ts +2 -0
- package/dist/chat/headless/chip-labels.js +2 -0
- package/dist/chat/headless/chip-views.js +1 -1
- 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 +30 -1
- package/dist/chat/headless/draft-target.js +22 -1
- 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 +4 -0
- package/dist/chat/headless/index.d.ts +31 -27
- package/dist/chat/headless/index.js +33 -29
- package/dist/chat/headless/labels.d.ts +34 -4
- package/dist/chat/headless/labels.js +28 -6
- package/dist/chat/headless/markdown-scan.d.ts +0 -2
- package/dist/chat/headless/markdown-scan.js +3 -8
- package/dist/chat/headless/markdown-stream.js +3 -3
- package/dist/chat/headless/prompt-origin.d.ts +4 -2
- package/dist/chat/headless/prompt-origin.js +9 -5
- 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 +15 -1
- package/dist/chat/headless/sidebar/directory.js +11 -1
- package/dist/chat/headless/sidebar/environment.d.ts +15 -4
- package/dist/chat/headless/sidebar/environment.js +27 -9
- 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 +6 -4
- package/dist/chat/headless/sidebar/index.js +5 -3
- package/dist/chat/headless/sidebar/labels.d.ts +38 -8
- package/dist/chat/headless/sidebar/labels.js +8 -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 +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/actions.d.ts +2 -2
- package/dist/chat/headless/streams/actions.js +1 -1
- package/dist/chat/headless/streams/event-bytes.d.ts +12 -1
- package/dist/chat/headless/streams/event-bytes.js +13 -1
- 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 +38 -5
- package/dist/chat/headless/streams/store.js +74 -22
- package/dist/chat/headless/streams/transcript-map.js +2 -5
- package/dist/chat/headless/streams/types.d.ts +4 -2
- package/dist/chat/headless/transcript/collapse.js +6 -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 +6 -4
- package/dist/chat/index.js +8 -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 +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 +16 -4
- package/dist/chat/sidebar/RowChips.js +2 -2
- package/dist/chat/sidebar/SessionSidebar.d.ts +47 -0
- package/dist/chat/sidebar/SessionSidebar.js +85 -28
- package/dist/chat/sidebar/SidebarFilterMenu.js +0 -1
- package/dist/chat/sidebar/SidebarFold.js +17 -16
- 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 +12 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +25 -13
- 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/session-menu.d.ts +4 -0
- package/dist/chat/sidebar/session-menu.js +14 -2
- package/dist/chat/sidebar/sidebar-live.d.ts +29 -2
- package/dist/chat/sidebar/sidebar-live.js +64 -6
- package/dist/chat/sidebar/useInboxRows.js +8 -9
- package/dist/chat/sidebar/useInboxTriage.d.ts +5 -2
- package/dist/chat/sidebar/useInboxTriage.js +78 -67
- package/dist/chat/sidebar/useSessionSearch.js +19 -18
- 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/FileChip.js +28 -0
- package/dist/chat/transcript/LazyRow.d.ts +1 -1
- package/dist/chat/transcript/LazyRow.js +3 -4
- package/dist/chat/transcript/PromptEcho.js +18 -13
- package/dist/chat/transcript/PromptOriginLabel.d.ts +1 -1
- package/dist/chat/transcript/SessionChip.d.ts +11 -0
- package/dist/chat/transcript/SessionChip.js +34 -0
- package/dist/chat/transcript/TranscriptRail.d.ts +4 -2
- 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/chip-details.d.ts +11 -0
- package/dist/chat/transcript/chip-details.js +17 -1
- package/dist/chat/transcript/fold-worker.js +2 -1
- package/dist/chat/transcript/fold.js +13 -4
- package/dist/chat/transcript/index.d.ts +3 -3
- package/dist/chat/transcript/index.js +3 -3
- package/dist/chat/transcript/inline-facts.d.ts +9 -0
- package/dist/chat/transcript/inline-facts.js +20 -0
- package/dist/chat/transcript/markdown-cache.d.ts +10 -1
- package/dist/chat/transcript/markdown-cache.js +37 -4
- package/dist/chat/transcript/markdown.js +27 -34
- package/dist/chat/transcript/media-gallery.js +13 -16
- package/dist/chat/transcript/messages.js +5 -4
- package/dist/chat/transcript/notices.d.ts +25 -3
- package/dist/chat/transcript/notices.js +136 -17
- package/dist/chat/transcript/prompt.d.ts +1 -1
- package/dist/chat/transcript/prompt.js +8 -1
- package/dist/chat/transcript/row-mount.d.ts +27 -8
- package/dist/chat/transcript/row-mount.js +114 -80
- package/dist/chat/transcript/row-parking.d.ts +27 -0
- package/dist/chat/transcript/row-parking.js +37 -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-parts.js +0 -1
- package/dist/chat/transcript/tool-row.js +3 -2
- package/dist/chat/transcript/use-transcript-rows.d.ts +1 -1
- package/dist/chat/transcript/useHistoryBackfill.d.ts +42 -0
- package/dist/chat/transcript/useHistoryBackfill.js +170 -0
- package/dist/chat/transcript/useTranscriptFind.js +2 -4
- package/dist/chat/transcript/useTranscriptScroll.d.ts +7 -4
- package/dist/chat/transcript/useTranscriptScroll.js +12 -1
- package/dist/chat/transcript/useTranscriptSearch.d.ts +2 -2
- package/dist/chat/transcript/useTranscriptSearch.js +6 -6
- package/dist/chat/transcript/useTranscriptSelectionCopy.d.ts +5 -5
- package/dist/chat/transcript/useTranscriptSelectionCopy.js +28 -7
- package/dist/code/editor/FileTree.d.ts +2 -0
- package/dist/code/editor/FileTree.js +1 -1
- package/dist/code/editor/FileView.js +16 -27
- package/dist/code/editor/find/useFind.js +17 -17
- package/dist/code/editor/useCodeDocument.js +22 -19
- package/dist/code/editor/useDetachCleanup.js +4 -3
- package/dist/code/use-highlighted-html.js +12 -13
- 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/IconButton.d.ts +3 -1
- package/dist/components/IconButton.js +7 -2
- package/dist/components/IconButtonTip.d.ts +3 -1
- package/dist/components/IconButtonTip.js +2 -1
- 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/RowActionsMenu.js +7 -14
- 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.d.ts +4 -1
- package/dist/components/Tooltip.js +16 -11
- package/dist/components/assign-ref.d.ts +8 -0
- package/dist/components/assign-ref.js +12 -0
- package/dist/components/charts/ScatterChart.js +13 -6
- package/dist/components/floating/FloatingSurface.js +4 -4
- package/dist/components/floating/HoverCard.js +32 -14
- package/dist/components/floating/Popover.js +4 -7
- package/dist/components/floating/useAnchoredPosition.d.ts +20 -4
- package/dist/components/floating/useAnchoredPosition.js +44 -10
- package/dist/components/object-key.d.ts +7 -0
- package/dist/components/object-key.js +18 -0
- package/dist/components/palette/PaletteList.d.ts +5 -5
- package/dist/components/palette/PaletteList.js +1 -7
- 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/components/tooltip-arming.d.ts +3 -0
- package/dist/components/tooltip-arming.js +8 -1
- package/dist/core.css +45 -20
- package/dist/dist/index-BmO8bRgK.d.ts +1 -0
- package/dist/dist/{index-C6-t1SS9.d.ts → index-Bsp5Ku7r.d.ts} +264 -133
- 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/FilesTab.js +0 -1
- package/dist/files/TreeColumn.d.ts +2 -4
- package/dist/files/TreeColumn.js +0 -5
- package/dist/files/headless/host.d.ts +9 -9
- package/dist/files/headless/labels.d.ts +0 -1
- package/dist/files/headless/labels.js +0 -1
- package/dist/files/headless/workspace-diff.js +1 -1
- package/dist/files/index.d.ts +2 -2
- package/dist/files/index.js +2 -2
- package/dist/files/useCodeReview.js +1 -3
- package/dist/files/useFilesDiagnostics.d.ts +1 -1
- package/dist/files/useFilesDiagnostics.js +4 -11
- package/dist/files/useOpenFiles.js +9 -12
- package/dist/files/useWorkspace.d.ts +5 -7
- package/dist/files/useWorkspace.js +4 -15
- package/dist/git/GitBar.js +13 -5
- package/dist/git/MoveSessionDialog.d.ts +18 -8
- package/dist/git/MoveSessionDialog.js +39 -57
- package/dist/git/MoveToDialog.d.ts +63 -0
- package/dist/git/MoveToDialog.js +267 -0
- package/dist/git/SandboxManager.js +9 -4
- package/dist/git/SyncChip.js +11 -4
- package/dist/git/TeleportSessionDialog.d.ts +76 -0
- package/dist/git/TeleportSessionDialog.js +596 -0
- package/dist/git/WherePicker.js +4 -1
- package/dist/git/headless/host.d.ts +14 -0
- package/dist/git/headless/index.d.ts +2 -1
- package/dist/git/headless/index.js +2 -1
- package/dist/git/headless/labels.d.ts +52 -1
- package/dist/git/headless/labels.js +58 -0
- package/dist/git/headless/sandboxes.d.ts +1 -1
- package/dist/git/headless/sandboxes.js +4 -3
- package/dist/git/headless/teleport.d.ts +76 -0
- package/dist/git/headless/teleport.js +19 -0
- package/dist/git/index.d.ts +5 -3
- package/dist/git/index.js +5 -3
- package/dist/git/useEnvironmentChoices.d.ts +24 -2
- package/dist/git/useEnvironmentChoices.js +43 -11
- package/dist/hooks/useLastCount.d.ts +9 -0
- package/dist/hooks/useLastCount.js +29 -0
- package/dist/hooks/useLatest.d.ts +8 -0
- package/dist/hooks/useLatest.js +17 -0
- package/dist/hooks/useMinuteTick.d.ts +6 -2
- package/dist/hooks/useMinuteTick.js +12 -6
- package/dist/hooks/useNearViewport.js +11 -8
- package/dist/index.d.ts +8 -3
- package/dist/index.js +8 -3
- package/dist/keybindings/KeybindingsProvider.js +3 -4
- package/dist/keybindings/headless/catalog.d.ts +1 -1
- package/dist/keybindings/headless/catalog.js +18 -0
- 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 +198 -30
- package/dist/machines/Banners.d.ts +2 -2
- package/dist/machines/Banners.js +3 -3
- package/dist/machines/DaemonMenu.js +1 -3
- 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 +94 -51
- 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 +32 -0
- package/dist/machines/OrganizationPanel.js +553 -0
- 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 -0
- package/dist/machines/headless/fixture-host.js +75 -0
- package/dist/machines/headless/fixtures.d.ts +12 -0
- package/dist/machines/headless/fixtures.js +71 -1
- package/dist/machines/headless/host.d.ts +25 -1
- package/dist/machines/headless/index.d.ts +3 -1
- package/dist/machines/headless/index.js +3 -1
- package/dist/machines/headless/labels.d.ts +104 -8
- package/dist/machines/headless/labels.js +121 -21
- 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 +44 -0
- package/dist/machines/headless/organization.js +54 -0
- package/dist/machines/headless/sync.d.ts +2 -0
- package/dist/machines/index.d.ts +4 -1
- package/dist/machines/index.js +4 -1
- package/dist/machines/sync-rows.d.ts +8 -0
- package/dist/machines/sync-rows.js +10 -0
- package/dist/machines/testing/index.d.ts +3 -3
- package/dist/machines/testing/index.js +2 -2
- package/dist/motion/grow.js +12 -13
- package/dist/motion/swap.js +2 -5
- package/dist/motion/use-flip-list.d.ts +14 -0
- package/dist/motion/use-flip-list.js +17 -12
- 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 +40 -1
- package/dist/palette/headless/labels.js +5 -2
- package/dist/palette/usePaletteController.js +4 -8
- package/dist/server/sse-handler.js +25 -2
- package/dist/session/ArtifactsPanel.js +11 -23
- package/dist/session/DiffFileTree.js +1 -4
- 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.d.ts +46 -0
- package/dist/session/OpenSessionsDialog.js +295 -0
- package/dist/session/PlanTracker.js +1 -2
- 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 +502 -254
- 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/RemindersPanel.js +10 -12
- package/dist/session/SecretsPanel.js +2 -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 +24 -0
- package/dist/session/SessionPeopleStack.js +99 -0
- package/dist/session/SessionPlaceMenu.js +7 -6
- package/dist/session/SessionProvider.d.ts +13 -1
- package/dist/session/SessionProvider.js +21 -1
- package/dist/session/ShareSessionDialog.d.ts +32 -0
- package/dist/session/ShareSessionDialog.js +241 -0
- package/dist/session/TypingLine.d.ts +27 -0
- package/dist/session/TypingLine.js +42 -0
- 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 +302 -7
- package/dist/session/headless/index.d.ts +11 -4
- package/dist/session/headless/index.js +9 -2
- package/dist/session/headless/labels.d.ts +428 -4
- package/dist/session/headless/labels.js +109 -5
- package/dist/session/headless/orchestration-labels.d.ts +52 -0
- package/dist/session/headless/orchestration-labels.js +59 -0
- package/dist/session/headless/people.d.ts +29 -0
- package/dist/session/headless/people.js +53 -0
- package/dist/session/headless/place.d.ts +5 -0
- package/dist/session/headless/place.js +5 -1
- 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 +56 -0
- package/dist/session/headless/typing.js +115 -0
- 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 +21 -4
- package/dist/session/index.js +20 -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/headless/sections-host.d.ts +7 -2
- package/dist/settings/index.d.ts +3 -2
- package/dist/settings/index.js +5 -4
- package/dist/settings/section.d.ts +24 -3
- package/dist/settings/section.js +27 -4
- package/dist/settings/sections/editor/labels.js +1 -1
- package/dist/settings/sections/environments/EnvironmentsSection.js +30 -6
- 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/keybindings/labels.d.ts +3 -0
- package/dist/settings/sections/keybindings/labels.js +3 -0
- package/dist/settings/sections/keybindings/rows.js +12 -0
- package/dist/settings/sections/logs/LogsSection.js +5 -8
- 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 +154 -36
- package/dist/terminal/HostTerminalSurface.js +28 -30
- package/dist/terminal/TerminalPanel.js +4 -12
- package/dist/terminal/TerminalProvider.d.ts +10 -2
- package/dist/terminal/TerminalProvider.js +10 -2
- package/dist/terminal/headless/labels.d.ts +0 -1
- package/dist/terminal/headless/labels.js +1 -2
- package/dist/terminal/headless/store.js +5 -1
- package/dist/theme/runtime-icons.js +7 -3
- package/dist/workspace/LayoutBudget.js +1 -7
- package/dist/workspace/PanelContentView.js +1 -1
- package/package.json +26 -2
- package/src/styles/app.css +6 -3
- package/src/styles/chat.css +3 -1
- package/src/styles/palette.css +15 -19
- package/src/styles/primitives.css +3 -1
- package/src/styles/transcript.css +39 -3
- package/dist/dist/index-De9AbmxS.d.ts +0 -1
- package/dist/dist/sandbox-CSUihARm.d.ts +0 -2
- /package/dist/dist/{execution-failure-SREfl-EZ.d.ts → execution-failure-_L2r_Qd-.d.ts} +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { errorMessage } from "../../components/report-error.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useLatest } from "../../hooks/useLatest.js";
|
|
3
|
+
import { compareInboxSection, inboxFolderIdOf } from "../headless/sidebar/inbox.js";
|
|
3
4
|
import { applyInboxPatch } from "../headless/sidebar/inbox-state.js";
|
|
4
|
-
import {
|
|
5
|
+
import { isPinnedProjectMain } from "../headless/sidebar/project-main.js";
|
|
6
|
+
import { INBOX_SNOOZE_PRESETS, inboxDragPreview, inverseInboxPatch, pinnedOrderAfterDrop, snoozeUntil } from "./inbox-triage.js";
|
|
5
7
|
import { useSidebarNotice } from "./SidebarHostProvider.js";
|
|
6
8
|
import { useSidebarLabels } from "./useSidebarLabels.js";
|
|
7
9
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -23,7 +25,7 @@ const orderKey = (i) => String((i + 1) * ORDER_STEP).padStart(12, "0");
|
|
|
23
25
|
* @param options - See {@link UseInboxTriageOptions}.
|
|
24
26
|
*/
|
|
25
27
|
function useInboxTriage(options) {
|
|
26
|
-
const { enabled, rows, listRef, flip, onSetInboxState, onSetFavorite, onSetArchived, needsYou = EMPTY } = options;
|
|
28
|
+
const { enabled, rows, groupBy = "none", listRef, flip, onSetInboxState, onSetFavorite, onSetArchived, needsYou = EMPTY } = options;
|
|
27
29
|
const labels = useSidebarLabels();
|
|
28
30
|
const notify = useSidebarNotice();
|
|
29
31
|
const [selected, setSelected] = useState(EMPTY);
|
|
@@ -34,8 +36,9 @@ function useInboxTriage(options) {
|
|
|
34
36
|
/** The custom snooze time picked so far: saved when the field loses focus or on Enter, not on each change. */
|
|
35
37
|
const picked = useRef("");
|
|
36
38
|
const timeInput = useRef(null);
|
|
37
|
-
const live =
|
|
39
|
+
const live = useLatest({
|
|
38
40
|
rows,
|
|
41
|
+
groupBy,
|
|
39
42
|
selected,
|
|
40
43
|
onSetInboxState,
|
|
41
44
|
onSetFavorite,
|
|
@@ -43,39 +46,31 @@ function useInboxTriage(options) {
|
|
|
43
46
|
labels,
|
|
44
47
|
needsYou
|
|
45
48
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
setSelected(EMPTY);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
setSelected((current) => {
|
|
63
|
-
if (current.size === 0) return current;
|
|
64
|
-
const listed = new Set(rows.flatMap((r) => r.kind === "session" ? [r.id] : []));
|
|
65
|
-
const kept = [...current].filter((id) => listed.has(id));
|
|
66
|
-
return kept.length === current.size ? current : new Set(kept);
|
|
67
|
-
});
|
|
68
|
-
}, [enabled, rows]);
|
|
69
|
-
const sessionRow = (id) => live.current.rows.find((r) => r.kind === "session" && r.id === id);
|
|
49
|
+
const kept = useMemo(() => {
|
|
50
|
+
if (!enabled) return EMPTY;
|
|
51
|
+
if (selected.size === 0) return selected;
|
|
52
|
+
const listed = new Set(rows.flatMap((r) => r.kind === "session" ? [r.id] : []));
|
|
53
|
+
const ids = [...selected].filter((id) => listed.has(id));
|
|
54
|
+
return ids.length === selected.size ? selected : new Set(ids);
|
|
55
|
+
}, [
|
|
56
|
+
enabled,
|
|
57
|
+
rows,
|
|
58
|
+
selected
|
|
59
|
+
]);
|
|
60
|
+
if (kept !== selected) setSelected(kept);
|
|
61
|
+
const sessionRow = useCallback((id) => live().rows.find((r) => r.kind === "session" && r.id === id), [live]);
|
|
70
62
|
/** The row and, when it is selected, every selected row. */
|
|
71
|
-
const targetsOf = (id) =>
|
|
72
|
-
|
|
63
|
+
const targetsOf = useCallback((id) => {
|
|
64
|
+
const current = live().selected;
|
|
65
|
+
return current.has(id) ? [...current] : [id];
|
|
66
|
+
}, [live]);
|
|
67
|
+
const failed = useCallback((err) => notify(live().labels.inboxActionFailed(errorMessage(err))), [notify, live]);
|
|
73
68
|
/**
|
|
74
69
|
* Saves a change on each session; ⌘Z takes back the ones that saved for a moment. No toast: the row moving
|
|
75
70
|
* says it was done. A failed save is reported.
|
|
76
71
|
*/
|
|
77
72
|
const apply = useCallback((ids, patchFor) => {
|
|
78
|
-
const save = live.
|
|
73
|
+
const save = live().onSetInboxState;
|
|
79
74
|
if (!save || ids.length === 0) return;
|
|
80
75
|
const now = Date.now();
|
|
81
76
|
const before = ids.flatMap((id) => {
|
|
@@ -105,7 +100,11 @@ function useInboxTriage(options) {
|
|
|
105
100
|
if (ok.length === 0 && undo.current === revert) undo.current = null;
|
|
106
101
|
});
|
|
107
102
|
setSelected(EMPTY);
|
|
108
|
-
}, [
|
|
103
|
+
}, [
|
|
104
|
+
failed,
|
|
105
|
+
sessionRow,
|
|
106
|
+
live
|
|
107
|
+
]);
|
|
109
108
|
const settle = useCallback((ids) => apply(ids, () => ({ settled: true })), [apply]);
|
|
110
109
|
const bringBack = useCallback((ids) => apply(ids, () => ({
|
|
111
110
|
settled: false,
|
|
@@ -133,7 +132,7 @@ function useInboxTriage(options) {
|
|
|
133
132
|
const ids = targetsOf(sessionId);
|
|
134
133
|
if (action === "settle") settle(ids);
|
|
135
134
|
else if (action === "unsettle" || action === "wake") bringBack(ids);
|
|
136
|
-
else live.
|
|
135
|
+
else live().onSetInboxState?.(sessionId, { woke: false }).catch(failed);
|
|
137
136
|
};
|
|
138
137
|
const snooze = (sessionId, preset) => {
|
|
139
138
|
const ids = targetsOf(sessionId);
|
|
@@ -157,7 +156,7 @@ function useInboxTriage(options) {
|
|
|
157
156
|
const listMaybe = listRef.current;
|
|
158
157
|
if (!listMaybe) return;
|
|
159
158
|
const list = listMaybe;
|
|
160
|
-
const order = live.
|
|
159
|
+
const order = live().rows.flatMap((r) => r.kind === "session" && r.section === section ? [r.id] : []);
|
|
161
160
|
const start = order.indexOf(sessionId);
|
|
162
161
|
let picked = [sessionId];
|
|
163
162
|
setSwept(new Set(picked));
|
|
@@ -193,7 +192,7 @@ function useInboxTriage(options) {
|
|
|
193
192
|
event.preventDefault();
|
|
194
193
|
};
|
|
195
194
|
const menuItems = (sessionId, section) => {
|
|
196
|
-
const l = live.
|
|
195
|
+
const l = live().labels;
|
|
197
196
|
const ids = targetsOf(sessionId);
|
|
198
197
|
const many = ids.length > 1;
|
|
199
198
|
const snoozeRows = INBOX_SNOOZE_PRESETS.map((preset) => ({
|
|
@@ -228,7 +227,7 @@ function useInboxTriage(options) {
|
|
|
228
227
|
label: allPinned ? l.inboxUnpinMany(ids.length) : l.inboxPinMany(ids.length),
|
|
229
228
|
group: "inbox-many",
|
|
230
229
|
onSelect: () => {
|
|
231
|
-
for (const id of ids) live.
|
|
230
|
+
for (const id of ids) live().onSetFavorite(id, !allPinned).catch(failed);
|
|
232
231
|
setSelected(EMPTY);
|
|
233
232
|
}
|
|
234
233
|
}, {
|
|
@@ -236,7 +235,7 @@ function useInboxTriage(options) {
|
|
|
236
235
|
label: l.inboxArchiveMany(ids.length),
|
|
237
236
|
group: "inbox-many",
|
|
238
237
|
onSelect: () => {
|
|
239
|
-
for (const id of ids) live.
|
|
238
|
+
for (const id of ids) live().onSetArchived(id, true).catch(failed);
|
|
240
239
|
setSelected(EMPTY);
|
|
241
240
|
}
|
|
242
241
|
});
|
|
@@ -255,7 +254,10 @@ function useInboxTriage(options) {
|
|
|
255
254
|
bringBack,
|
|
256
255
|
snoozeAt,
|
|
257
256
|
failed,
|
|
258
|
-
listRef
|
|
257
|
+
listRef,
|
|
258
|
+
sessionRow,
|
|
259
|
+
live,
|
|
260
|
+
targetsOf
|
|
259
261
|
]);
|
|
260
262
|
const onClickCapture = useCallback((event) => {
|
|
261
263
|
if (!enabled) return;
|
|
@@ -277,25 +279,25 @@ function useInboxTriage(options) {
|
|
|
277
279
|
if (event.shiftKey && anchor.current) {
|
|
278
280
|
event.preventDefault();
|
|
279
281
|
event.stopPropagation();
|
|
280
|
-
const order = live.
|
|
282
|
+
const order = live().rows.flatMap((r) => r.kind === "session" ? [r.id] : []);
|
|
281
283
|
const a = order.indexOf(anchor.current);
|
|
282
284
|
const b = order.indexOf(id);
|
|
283
285
|
if (a >= 0 && b >= 0) setSelected(new Set(order.slice(Math.min(a, b), Math.max(a, b) + 1)));
|
|
284
286
|
return;
|
|
285
287
|
}
|
|
286
288
|
anchor.current = id;
|
|
287
|
-
if (live.
|
|
288
|
-
}, [enabled]);
|
|
289
|
+
if (live().selected.size > 0) setSelected(EMPTY);
|
|
290
|
+
}, [enabled, live]);
|
|
289
291
|
const onKeyDown = useCallback((event) => {
|
|
290
|
-
if (event.key === "Escape" && live.
|
|
292
|
+
if (event.key === "Escape" && live().selected.size > 0) {
|
|
291
293
|
setSelected(EMPTY);
|
|
292
294
|
event.stopPropagation();
|
|
293
295
|
}
|
|
294
|
-
}, []);
|
|
296
|
+
}, [live]);
|
|
295
297
|
/** Drops `id` (from `from`) per `state`. */
|
|
296
298
|
const drop = useCallback((id, from, state) => {
|
|
297
299
|
const { action } = state;
|
|
298
|
-
const l = live
|
|
300
|
+
const l = live();
|
|
299
301
|
const save = l.onSetInboxState;
|
|
300
302
|
if (!action) return;
|
|
301
303
|
if (action === "settle") {
|
|
@@ -311,13 +313,12 @@ function useInboxTriage(options) {
|
|
|
311
313
|
save?.(id, { sidebarOrder: null }).catch(failed);
|
|
312
314
|
return;
|
|
313
315
|
}
|
|
314
|
-
const
|
|
315
|
-
const
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
];
|
|
316
|
+
const pinnedRows = l.rows.filter((r) => r.kind === "session" && r.section === "pinned" && r.id !== id);
|
|
317
|
+
const pinned = pinnedRows.map((r) => r.session).sort((a, b) => compareInboxSection("pinned", a, b));
|
|
318
|
+
const peers = pinnedRows.filter((r) => r.folder === state.folder).map((r) => r.id);
|
|
319
|
+
const mains = new Set(pinnedRows.filter((r) => isPinnedProjectMain(r.session)).map((r) => r.id));
|
|
320
|
+
const leading = peers.filter((pid) => mains.has(pid)).length;
|
|
321
|
+
const order = pinnedOrderAfterDrop(pinned.map((s) => s.id), peers, id, Math.max(state.index, leading)).filter((sid) => !mains.has(sid));
|
|
321
322
|
if (action === "pin" && from !== "pinned") {
|
|
322
323
|
if (from === "settled" || from === "snoozed") save?.(id, {
|
|
323
324
|
settled: false,
|
|
@@ -332,7 +333,8 @@ function useInboxTriage(options) {
|
|
|
332
333
|
}, [
|
|
333
334
|
settle,
|
|
334
335
|
bringBack,
|
|
335
|
-
failed
|
|
336
|
+
failed,
|
|
337
|
+
live
|
|
336
338
|
]);
|
|
337
339
|
return {
|
|
338
340
|
handlers,
|
|
@@ -342,14 +344,14 @@ function useInboxTriage(options) {
|
|
|
342
344
|
onKeyDown,
|
|
343
345
|
onPointerDown: useCallback((event) => {
|
|
344
346
|
const listMaybe = listRef.current;
|
|
345
|
-
if (!enabled || !listMaybe || !live.
|
|
347
|
+
if (!enabled || !listMaybe || !live().onSetInboxState || event.button !== 0 || event.pointerType === "touch") return;
|
|
346
348
|
const target = event.target;
|
|
347
349
|
if (target.closest(".zg-row-actions, .zg-row-dots, input, textarea, [contenteditable=\"true\"]")) return;
|
|
348
350
|
const rowMaybe = target.closest("[data-session-id]");
|
|
349
351
|
if (!rowMaybe || !listMaybe.contains(rowMaybe)) return;
|
|
350
352
|
const id = rowMaybe.dataset.sessionId;
|
|
351
353
|
const fromMaybe = sessionRow(id)?.section;
|
|
352
|
-
if (!fromMaybe || fromMaybe === "archived") return;
|
|
354
|
+
if (!fromMaybe || fromMaybe === "archived" || isPinnedProjectMain(sessionRow(id).session)) return;
|
|
353
355
|
const list = listMaybe;
|
|
354
356
|
const rowEl = rowMaybe;
|
|
355
357
|
const from = fromMaybe;
|
|
@@ -357,6 +359,7 @@ function useInboxTriage(options) {
|
|
|
357
359
|
const pointerId = event.pointerId;
|
|
358
360
|
let dragging = false;
|
|
359
361
|
let state = null;
|
|
362
|
+
const home = live().groupBy === "project" ? inboxFolderIdOf(sessionRow(id).session) : void 0;
|
|
360
363
|
let scrollFrame = 0;
|
|
361
364
|
let lastY = startY;
|
|
362
365
|
/**
|
|
@@ -371,11 +374,13 @@ function useInboxTriage(options) {
|
|
|
371
374
|
function begin() {
|
|
372
375
|
const base = list.getBoundingClientRect();
|
|
373
376
|
let section = "pinned";
|
|
377
|
+
let folder;
|
|
374
378
|
items = [];
|
|
375
379
|
for (const el of list.querySelectorAll("[data-flip-scroller] li")) {
|
|
376
380
|
if (el.classList.contains("zg-fold") || el.closest("[inert]") || !(el.dataset.sessionId || el.dataset.flipKey)) continue;
|
|
377
381
|
const sid = el.dataset.sessionId;
|
|
378
382
|
section = sid ? sessionRow(sid)?.section ?? section : el.dataset.inboxSection ?? section;
|
|
383
|
+
folder = sid ? sessionRow(sid)?.folder : el.dataset.inboxSection ? el.dataset.inboxFolder : folder;
|
|
379
384
|
const r = el.getBoundingClientRect();
|
|
380
385
|
const area = el.closest("[data-flip-scroller]");
|
|
381
386
|
items.push({
|
|
@@ -384,6 +389,7 @@ function useInboxTriage(options) {
|
|
|
384
389
|
height: r.height,
|
|
385
390
|
section,
|
|
386
391
|
kind: sid ? "session" : "other",
|
|
392
|
+
...folder !== void 0 ? { folder } : {},
|
|
387
393
|
area,
|
|
388
394
|
scrollAt: area.scrollTop
|
|
389
395
|
});
|
|
@@ -436,7 +442,10 @@ function useInboxTriage(options) {
|
|
|
436
442
|
}
|
|
437
443
|
scrollFrame = requestAnimationFrame(autoScroll);
|
|
438
444
|
}
|
|
439
|
-
/**
|
|
445
|
+
/**
|
|
446
|
+
* Where the drop would put the row in a sorted section: before the first of its rows that sorts after it. Per
|
|
447
|
+
* project, Active is its own folder's, after the folder's pins.
|
|
448
|
+
*/
|
|
440
449
|
const landed = /* @__PURE__ */ new Map();
|
|
441
450
|
function landsAt(section, action) {
|
|
442
451
|
const memo = `${section}:${action}`;
|
|
@@ -449,16 +458,17 @@ function useInboxTriage(options) {
|
|
|
449
458
|
snoozedUntil: null
|
|
450
459
|
};
|
|
451
460
|
const moved = applyInboxPatch(row.session, patch, Date.now());
|
|
461
|
+
const within = section === "active" && home !== void 0 ? (item) => item.folder === home : (item) => item.section === section;
|
|
452
462
|
let last = -1;
|
|
453
463
|
for (let i = 0; i < items.length; i++) {
|
|
454
464
|
const item = items[i];
|
|
455
|
-
if (i === origin || item
|
|
456
|
-
const other = item.kind === "session" ? sessionRow(item.el.dataset.sessionId)?.session : void 0;
|
|
465
|
+
if (i === origin || !within(item)) continue;
|
|
466
|
+
const other = item.kind === "session" && item.section === section ? sessionRow(item.el.dataset.sessionId)?.session : void 0;
|
|
457
467
|
if (!other) {
|
|
458
468
|
last = i;
|
|
459
469
|
continue;
|
|
460
470
|
}
|
|
461
|
-
if (compareInboxSection(section, moved, other, live.
|
|
471
|
+
if (compareInboxSection(section, moved, other, live().needsYou) < 0) {
|
|
462
472
|
at = i;
|
|
463
473
|
break;
|
|
464
474
|
}
|
|
@@ -497,20 +507,22 @@ function useInboxTriage(options) {
|
|
|
497
507
|
height: item.height,
|
|
498
508
|
section: item.section,
|
|
499
509
|
kind: item.kind,
|
|
510
|
+
...item.folder !== void 0 ? { folder: item.folder } : {},
|
|
500
511
|
hidden: mid < band.top || mid > band.bottom
|
|
501
512
|
};
|
|
502
513
|
});
|
|
503
|
-
const preview = inboxDragPreview(now, origin, own.top + dy + own.height / 2, gap, landsAt);
|
|
514
|
+
const preview = inboxDragPreview(now, origin, own.top + dy + own.height / 2, gap, landsAt, home);
|
|
504
515
|
items.forEach(({ el }, i) => {
|
|
505
516
|
if (i === origin) return;
|
|
506
517
|
const shift = preview.shifts[i];
|
|
507
518
|
el.style.transform = shift ? `translateY(${shift}px)` : "";
|
|
508
519
|
});
|
|
509
|
-
if (!state || state.action !== preview.action) badge.textContent = preview.action && preview.action !== "move" ? live.
|
|
520
|
+
if (!state || state.action !== preview.action) badge.textContent = preview.action && preview.action !== "move" ? live().labels.inboxDrop[preview.action] : "";
|
|
510
521
|
state = {
|
|
511
522
|
action: preview.action,
|
|
512
523
|
over: preview.section,
|
|
513
|
-
index: preview.pinnedIndex
|
|
524
|
+
index: preview.pinnedIndex,
|
|
525
|
+
...preview.folder !== void 0 ? { folder: preview.folder } : {}
|
|
514
526
|
};
|
|
515
527
|
}
|
|
516
528
|
function move(e) {
|
|
@@ -548,10 +560,7 @@ function useInboxTriage(options) {
|
|
|
548
560
|
from: rowEl,
|
|
549
561
|
className: "zg-row-dragging"
|
|
550
562
|
});
|
|
551
|
-
if (commit && done) drop(id, from,
|
|
552
|
-
action: done.action,
|
|
553
|
-
index: done.index
|
|
554
|
-
});
|
|
563
|
+
if (commit && done) drop(id, from, done);
|
|
555
564
|
}
|
|
556
565
|
function swallow(e) {
|
|
557
566
|
e.preventDefault();
|
|
@@ -586,9 +595,11 @@ function useInboxTriage(options) {
|
|
|
586
595
|
enabled,
|
|
587
596
|
listRef,
|
|
588
597
|
flip,
|
|
589
|
-
drop
|
|
598
|
+
drop,
|
|
599
|
+
sessionRow,
|
|
600
|
+
live
|
|
590
601
|
]),
|
|
591
|
-
timeField:
|
|
602
|
+
timeField: hasSave ? /* @__PURE__ */ jsx("input", {
|
|
592
603
|
ref: timeInput,
|
|
593
604
|
type: "datetime-local",
|
|
594
605
|
"aria-label": labels.inboxSnoozeTime,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
// src/chat/sidebar/useSessionSearch.ts
|
|
3
|
+
const NO_HITS = [];
|
|
3
4
|
/**
|
|
4
5
|
* Debounce between the last search keystroke and the content search. Title
|
|
5
6
|
* matching is local and instant; only the content scan waits it out.
|
|
@@ -14,35 +15,35 @@ const SEARCH_DEBOUNCE_MS = 200;
|
|
|
14
15
|
*/
|
|
15
16
|
function useSessionSearch(sessions, archiveFilter, search) {
|
|
16
17
|
const [searchQuery, setSearchQuery] = useState("");
|
|
17
|
-
|
|
18
|
-
const [
|
|
18
|
+
/** The last answer, and what it answers: a search is on while the query, the archive or the search differ. */
|
|
19
|
+
const [answer, setAnswer] = useState(null);
|
|
19
20
|
/** The newest search sent: an answer to an older one is a stale scan a newer keystroke superseded. */
|
|
20
21
|
const latest = useRef(0);
|
|
21
22
|
const trimmedQuery = searchQuery.trim();
|
|
22
23
|
const searchMode = trimmedQuery.length > 0;
|
|
24
|
+
const contentSearch = searchMode ? search : void 0;
|
|
25
|
+
if (!contentSearch && answer !== null) setAnswer(null);
|
|
26
|
+
const contentHits = contentSearch && answer ? answer.hits : NO_HITS;
|
|
27
|
+
const searching = contentSearch !== void 0 && !(answer?.query === trimmedQuery && answer.archive === archiveFilter && answer.search === contentSearch);
|
|
23
28
|
useEffect(() => {
|
|
24
|
-
if (!
|
|
25
|
-
setContentHits([]);
|
|
26
|
-
setSearching(false);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
setSearching(true);
|
|
29
|
+
if (!contentSearch) return;
|
|
30
30
|
const timer = setTimeout(() => {
|
|
31
31
|
const ask = ++latest.current;
|
|
32
|
-
|
|
33
|
-
if (ask
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
const answered = (hits) => {
|
|
33
|
+
if (ask === latest.current) setAnswer((prev) => ({
|
|
34
|
+
query: trimmedQuery,
|
|
35
|
+
archive: archiveFilter,
|
|
36
|
+
search: contentSearch,
|
|
37
|
+
hits: hits ?? prev?.hits ?? NO_HITS
|
|
38
|
+
}));
|
|
39
|
+
};
|
|
40
|
+
contentSearch(trimmedQuery, { archive: archiveFilter }).then(answered, () => answered(null));
|
|
39
41
|
}, SEARCH_DEBOUNCE_MS);
|
|
40
42
|
return () => clearTimeout(timer);
|
|
41
43
|
}, [
|
|
42
|
-
|
|
44
|
+
contentSearch,
|
|
43
45
|
trimmedQuery,
|
|
44
|
-
archiveFilter
|
|
45
|
-
search
|
|
46
|
+
archiveFilter
|
|
46
47
|
]);
|
|
47
48
|
/** Local (instant) axis of the merged results: sessions whose TITLE contains every query term. */
|
|
48
49
|
const titleMatches = useMemo(() => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* suggestions played with `suggest`, and the chrome's members
|
|
6
6
|
* (`fixture-composer-chrome.ts`: pickers, meters, the run meter, the strip).
|
|
7
7
|
*/
|
|
8
|
-
import { CommandArgSuggestionSummary, CommandSummary, ComposerHost, ComposerPromptSuggestion, ComposerSharedGhost, ComposerSkillGroup, FileEntry, PromptAttachment, SharedDraft, SkillConfig } from "../headless/composer/host.js";
|
|
8
|
+
import { CommandArgSuggestionSummary, CommandSummary, ComposerArtifactEntry, ComposerHost, ComposerPromptSuggestion, ComposerSharedGhost, ComposerSkillGroup, FileEntry, PromptAttachment, SharedDraft, SkillConfig } from "../headless/composer/host.js";
|
|
9
9
|
import { FixtureComposerChrome, FixtureComposerChromeOptions } from "./fixture-composer-chrome.js";
|
|
10
10
|
import { ChatReferenceEntry } from "zidane/chat/pure";
|
|
11
11
|
/** What {@link createFixtureComposerHost} holds. */
|
|
@@ -20,6 +20,8 @@ export interface FixtureComposerHostOptions extends FixtureComposerChromeOptions
|
|
|
20
20
|
commandArgs?: Record<string, readonly CommandArgSuggestionSummary[]>;
|
|
21
21
|
/** The sessions `#` can reference. */
|
|
22
22
|
chats?: readonly ChatReferenceEntry[];
|
|
23
|
+
/** The artifacts `#` can mention, by the folder whose project holds them. Absent: `#` offers chats only. */
|
|
24
|
+
artifacts?: Readonly<Record<string, readonly ComposerArtifactEntry[]>>;
|
|
23
25
|
/** The enabled skills. */
|
|
24
26
|
skills?: readonly SkillConfig[];
|
|
25
27
|
/** The skill groups `/` offers. */
|
|
@@ -65,6 +65,7 @@ function createFixtureComposerHost(options = {}) {
|
|
|
65
65
|
commands: async () => commands,
|
|
66
66
|
commandArgs: async (_scope, name, prefix) => (commandArgs[name] ?? []).filter((arg) => arg.value.startsWith(prefix)),
|
|
67
67
|
chats: async () => chats,
|
|
68
|
+
...options.artifacts ? { artifacts: async (scope) => options.artifacts?.[scope.cwd] ?? [] } : {},
|
|
68
69
|
watchSkills: (_scope, listener) => {
|
|
69
70
|
listener(skills);
|
|
70
71
|
return () => void 0;
|
|
@@ -4,12 +4,14 @@ import { classifyInlineCode, resolveChipPath } from "../headless/file-chip.js";
|
|
|
4
4
|
import { useChatLabels } from "../useChatLabels.js";
|
|
5
5
|
import { useBadgeMenu } from "./BadgeMenu.js";
|
|
6
6
|
import { FileBadgeIcon, fileBadgeName } from "./badges.js";
|
|
7
|
+
import { useTokenSession } from "./chip-details.js";
|
|
7
8
|
import { useChipResolution, useResolveChipNow } from "./chip-resolve.js";
|
|
8
9
|
import { ChipHover } from "./ChipCard.js";
|
|
9
10
|
import { CommitCard } from "./ChipCards.js";
|
|
10
11
|
import { INLINE_CODE_CLASS, MarkdownContext } from "./markdown-context.js";
|
|
11
12
|
import { ReferenceChip } from "./ReferenceText.js";
|
|
12
13
|
import { classifyInlineRef, refHref } from "./remark-refs.js";
|
|
14
|
+
import { SessionChip } from "./SessionChip.js";
|
|
13
15
|
import { useContext, useRef, useState } from "react";
|
|
14
16
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
17
|
import { GITHUB_ISSUE_PROVIDER_ID, GITHUB_PULL_PROVIDER_ID, githubRefKey } from "zidane/chat/pure";
|
|
@@ -20,6 +22,8 @@ function useChipMenu(target) {
|
|
|
20
22
|
const { cwd } = useContext(MarkdownContext);
|
|
21
23
|
return open && target ? (e) => open(e, target, cwd) : void 0;
|
|
22
24
|
}
|
|
25
|
+
/** A full session id (a UUID). */
|
|
26
|
+
const SESSION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
23
27
|
/** Prose chips are the shared inline badge (the `zg-badge` class); `zg-file-chip` marks them. */
|
|
24
28
|
const CHIP_CLASS = "zg-file-chip zg-badge";
|
|
25
29
|
/** An issue or PR link on GitHub: `owner` / `repo` / `pull` or `issues` / number. */
|
|
@@ -128,6 +132,10 @@ function displayPath(abs, cwd) {
|
|
|
128
132
|
function InlineCode({ text }) {
|
|
129
133
|
const { host } = useContext(MarkdownContext);
|
|
130
134
|
const ref = classifyInlineRef(text);
|
|
135
|
+
if ((ref?.kind === "sha" || SESSION_ID.test(text.trim())) && !host) return /* @__PURE__ */ jsx(IdOrCommit, {
|
|
136
|
+
text,
|
|
137
|
+
commit: ref?.kind === "sha" ? ref : null
|
|
138
|
+
});
|
|
131
139
|
if (ref) return /* @__PURE__ */ jsx(RefChip, {
|
|
132
140
|
parsed: ref,
|
|
133
141
|
label: text.trim()
|
|
@@ -148,6 +156,26 @@ function InlineCode({ text }) {
|
|
|
148
156
|
children: text
|
|
149
157
|
});
|
|
150
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Inline code that may be a session's id: the session's chip when one matches it (an answer naming a chat by id,
|
|
161
|
+
* as `3f5cf5fc`), else the commit chip a sha gets, else code. Code while the sessions are read: never a commit
|
|
162
|
+
* that turns into a chat.
|
|
163
|
+
*/
|
|
164
|
+
function IdOrCommit({ text, commit }) {
|
|
165
|
+
const { session, loading, listed } = useTokenSession(text.trim());
|
|
166
|
+
if (session) return /* @__PURE__ */ jsx(SessionChip, { token: text.trim() });
|
|
167
|
+
if (listed && loading) return /* @__PURE__ */ jsx("code", {
|
|
168
|
+
className: INLINE_CODE_CLASS,
|
|
169
|
+
children: text
|
|
170
|
+
});
|
|
171
|
+
return commit ? /* @__PURE__ */ jsx(RefChip, {
|
|
172
|
+
parsed: commit,
|
|
173
|
+
label: text.trim()
|
|
174
|
+
}) : /* @__PURE__ */ jsx("code", {
|
|
175
|
+
className: INLINE_CODE_CLASS,
|
|
176
|
+
children: text
|
|
177
|
+
});
|
|
178
|
+
}
|
|
151
179
|
/** Could `text` name a branch (`main`, `feat/x`, `origin/main`): the characters branch names use, not a number. */
|
|
152
180
|
function branchShaped(text) {
|
|
153
181
|
const t = text.trim();
|
|
@@ -87,7 +87,7 @@ export interface LazyRowProps {
|
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Renders a root transcript row that mounts its content when it nears the view, and keeps it: until then (and
|
|
90
|
-
* parked) an empty box of the row's height, its last measured height when known
|
|
90
|
+
* parked) an empty box of the row's height, its last measured height when known, without `content-visibility`.
|
|
91
91
|
*
|
|
92
92
|
* @param props - Row props: `itemKey`, `estimatePx`, `style`, `children`, the row's id and the select-mode data attributes.
|
|
93
93
|
*/
|
|
@@ -86,7 +86,7 @@ function useBackgroundMount() {
|
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* Renders a root transcript row that mounts its content when it nears the view, and keeps it: until then (and
|
|
89
|
-
* parked) an empty box of the row's height, its last measured height when known
|
|
89
|
+
* parked) an empty box of the row's height, its last measured height when known, without `content-visibility`.
|
|
90
90
|
*
|
|
91
91
|
* @param props - Row props: `itemKey`, `estimatePx`, `style`, `children`, the row's id and the select-mode data attributes.
|
|
92
92
|
*/
|
|
@@ -132,10 +132,9 @@ function LazyRow({ itemKey, estimatePx, style, children, className, box = false,
|
|
|
132
132
|
const mounted = state.phase === "mounted";
|
|
133
133
|
const known = mounter?.sizeOf(itemKey);
|
|
134
134
|
const px = state.parkedPx ?? known ?? estimatePx;
|
|
135
|
-
const wrapperStyle =
|
|
135
|
+
const wrapperStyle = !mounted ? { height: px } : box ? void 0 : {
|
|
136
136
|
...style,
|
|
137
|
-
containIntrinsicSize: `auto ${Math.round(known ?? estimatePx)}px
|
|
138
|
-
...mounted ? null : { height: px }
|
|
137
|
+
containIntrinsicSize: `auto ${Math.round(known ?? estimatePx)}px`
|
|
139
138
|
};
|
|
140
139
|
const rowKey = rest["data-row"];
|
|
141
140
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useTooltip } from "../../components/Tooltip.js";
|
|
1
2
|
import { commandRef, urlRefs } from "../headless/badge-refs.js";
|
|
2
3
|
import { SKILL_GROUP_REF } from "../headless/composer/skill-groups.js";
|
|
3
4
|
import { chipForPath } from "../headless/file-chip.js";
|
|
@@ -5,14 +6,15 @@ import { useChatLabels } from "../useChatLabels.js";
|
|
|
5
6
|
import { useBadgeMenu } from "./BadgeMenu.js";
|
|
6
7
|
import { BADGE_GLYPH, FileBadgeIcon, LinkBadge, fileBadgeName } from "./badges.js";
|
|
7
8
|
import { ChipHover } from "./ChipCard.js";
|
|
8
|
-
import { CommandCard,
|
|
9
|
+
import { CommandCard, SkillCard, SkillGroupCard } from "./ChipCards.js";
|
|
9
10
|
import { MarkdownContext } from "./markdown-context.js";
|
|
10
11
|
import { PromptLines } from "./prompt-lines.js";
|
|
11
12
|
import { useReferenceMatches } from "./references.js";
|
|
12
13
|
import { ReferenceChip } from "./ReferenceText.js";
|
|
14
|
+
import { SessionChip } from "./SessionChip.js";
|
|
13
15
|
import { useContext } from "react";
|
|
14
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { inferPromptRefs, splitPromptSegments, tidyPromptText } from "zidane/chat/pure";
|
|
16
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { ARTIFACT_MENTION_PROVIDER, inferPromptRefs, splitPromptSegments, tidyPromptText } from "zidane/chat/pure";
|
|
16
18
|
// src/chat/transcript/PromptEcho.tsx
|
|
17
19
|
/** `/command` tokens that name one of the prompt's groups: start of text or after whitespace, as sent. */
|
|
18
20
|
function skillGroupSpans(text, uses) {
|
|
@@ -70,6 +72,17 @@ function PromptEcho({ text: raw, refs, command = false, useCommandArgs = noComma
|
|
|
70
72
|
skillGroups
|
|
71
73
|
}, idx)) });
|
|
72
74
|
}
|
|
75
|
+
/** An artifact mention (`#[label](artifact:…)`): the artifact's glyph and label, as the composer drew it; a long label ends in an ellipsis, in full in the tooltip. A right-to-left label (`dir="auto"`) reads in its own direction, glyph first, and never reorders the prompt around it. */
|
|
76
|
+
function ArtifactBadge({ label }) {
|
|
77
|
+
const tip = useTooltip(label, { maxWidth: 360 });
|
|
78
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
79
|
+
...tip.anchorProps,
|
|
80
|
+
className: `zg-badge ${BADGE_GLYPH.artifact}`,
|
|
81
|
+
"data-kind": "artifact",
|
|
82
|
+
dir: "auto",
|
|
83
|
+
children: label
|
|
84
|
+
}), tip.tip] });
|
|
85
|
+
}
|
|
73
86
|
function PromptBadge({ text, providerId, cwd, skillGroups }) {
|
|
74
87
|
const labels = useChatLabels();
|
|
75
88
|
const openMenu = useBadgeMenu();
|
|
@@ -154,16 +167,8 @@ function PromptBadge({ text, providerId, cwd, skillGroups }) {
|
|
|
154
167
|
text
|
|
155
168
|
})
|
|
156
169
|
});
|
|
157
|
-
case "chats": return /* @__PURE__ */ jsx(
|
|
158
|
-
|
|
159
|
-
trigger: (props) => /* @__PURE__ */ jsx("span", {
|
|
160
|
-
...props,
|
|
161
|
-
className: `zg-badge ${BADGE_GLYPH.chat}`,
|
|
162
|
-
"data-kind": "chat",
|
|
163
|
-
children: text
|
|
164
|
-
}),
|
|
165
|
-
children: /* @__PURE__ */ jsx(SessionCard, { token: text })
|
|
166
|
-
});
|
|
170
|
+
case "chats": return /* @__PURE__ */ jsx(SessionChip, { token: text });
|
|
171
|
+
case ARTIFACT_MENTION_PROVIDER: return /* @__PURE__ */ jsx(ArtifactBadge, { label: text });
|
|
167
172
|
default: return /* @__PURE__ */ jsx("span", {
|
|
168
173
|
className: "zg-badge",
|
|
169
174
|
children: text
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The dim sender line above a prompt that came through a channel or an
|
|
3
|
-
* event (`Alice
|
|
3
|
+
* event (`Alice on slack`, `via slack`, `orchestration`), as the TUI shows it.
|
|
4
4
|
* A schedule's line opens its reminder in the Reminders tab, when the
|
|
5
5
|
* workspace around offers that tab.
|
|
6
6
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Props for {@link SessionChip}. */
|
|
2
|
+
export interface SessionChipProps {
|
|
3
|
+
/** What names the session: a `#token`, an id prefix or a full id. */
|
|
4
|
+
token: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* A session's chip: its title, its card on hover.
|
|
8
|
+
*
|
|
9
|
+
* @param props - The {@link SessionChipProps}.
|
|
10
|
+
*/
|
|
11
|
+
export declare function SessionChip({ token }: SessionChipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useChatLabels } from "../useChatLabels.js";
|
|
2
|
+
import { BADGE_GLYPH } from "./badges.js";
|
|
3
|
+
import { useTokenSession } from "./chip-details.js";
|
|
4
|
+
import { ChipHover } from "./ChipCard.js";
|
|
5
|
+
import { SessionCard } from "./ChipCards.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
// src/chat/transcript/SessionChip.tsx
|
|
8
|
+
/**
|
|
9
|
+
* A session named in a chat: a `#chat` chip of a sent prompt, or a session id an answer wrote in inline code.
|
|
10
|
+
* It reads as the composer's chip does, the session's title (its token until the sessions are read, or when
|
|
11
|
+
* none matches), with the session's card on hover.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* A session's chip: its title, its card on hover.
|
|
15
|
+
*
|
|
16
|
+
* @param props - The {@link SessionChipProps}.
|
|
17
|
+
*/
|
|
18
|
+
function SessionChip({ token }) {
|
|
19
|
+
const labels = useChatLabels();
|
|
20
|
+
const { session } = useTokenSession(token);
|
|
21
|
+
const face = session?.title.trim() || token;
|
|
22
|
+
return /* @__PURE__ */ jsx(ChipHover, {
|
|
23
|
+
ariaLabel: labels.chipChat(token),
|
|
24
|
+
trigger: (props) => /* @__PURE__ */ jsx("span", {
|
|
25
|
+
...props,
|
|
26
|
+
className: `zg-badge ${BADGE_GLYPH.chat}`,
|
|
27
|
+
"data-kind": "chat",
|
|
28
|
+
title: token,
|
|
29
|
+
children: face
|
|
30
|
+
}),
|
|
31
|
+
children: /* @__PURE__ */ jsx(SessionCard, { token })
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
export { SessionChip };
|