zidane-ui 9.2.3 → 9.4.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/live.d.ts +8 -0
- package/dist/adapters/live.js +19 -8
- package/dist/adapters/server-composer-host.js +22 -9
- package/dist/adapters/server-git-host.js +5 -2
- package/dist/adapters/server-host.js +158 -27
- package/dist/adapters/server-machines-host.js +7 -0
- package/dist/adapters/server-media.d.ts +9 -1
- package/dist/adapters/server-media.js +14 -1
- package/dist/adapters/server-session-host.js +49 -0
- 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/appearance/ZoomIndicator.js +5 -8
- package/dist/chat/HostTranscript.d.ts +0 -12
- package/dist/chat/HostTranscript.js +20 -1
- package/dist/chat/SessionStreamsProvider.d.ts +9 -1
- package/dist/chat/SessionStreamsProvider.js +11 -2
- package/dist/chat/Transcript.d.ts +21 -11
- package/dist/chat/Transcript.js +346 -161
- 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/use-draft-target.js +15 -3
- package/dist/chat/headless/block-runs.js +26 -1
- package/dist/chat/headless/chip-views.js +1 -1
- package/dist/chat/headless/draft-target.d.ts +28 -1
- package/dist/chat/headless/draft-target.js +22 -1
- package/dist/chat/headless/host.d.ts +43 -7
- package/dist/chat/headless/hosts.d.ts +4 -0
- package/dist/chat/headless/index.d.ts +27 -26
- package/dist/chat/headless/index.js +15 -14
- package/dist/chat/headless/labels.d.ts +17 -0
- package/dist/chat/headless/labels.js +17 -0
- package/dist/chat/headless/markdown-chunks.d.ts +2 -1
- package/dist/chat/headless/markdown-chunks.js +12 -20
- package/dist/chat/headless/markdown-scan.d.ts +64 -0
- package/dist/chat/headless/markdown-scan.js +119 -0
- package/dist/chat/headless/markdown-stream.d.ts +64 -0
- package/dist/chat/headless/markdown-stream.js +143 -0
- package/dist/chat/headless/output-pager.d.ts +68 -0
- package/dist/chat/headless/output-pager.js +113 -0
- package/dist/chat/headless/prompt-origin.d.ts +2 -0
- package/dist/chat/headless/prompt-origin.js +6 -2
- package/dist/chat/headless/session-list.d.ts +10 -0
- package/dist/chat/headless/sidebar/activity.d.ts +14 -0
- package/dist/chat/headless/sidebar/activity.js +32 -0
- package/dist/chat/headless/sidebar/directory.d.ts +19 -2
- package/dist/chat/headless/sidebar/directory.js +19 -51
- package/dist/chat/headless/sidebar/environment.d.ts +15 -4
- package/dist/chat/headless/sidebar/environment.js +27 -9
- package/dist/chat/headless/sidebar/index.d.ts +2 -2
- package/dist/chat/headless/sidebar/index.js +2 -2
- package/dist/chat/headless/sidebar/labels.d.ts +19 -2
- package/dist/chat/headless/sidebar/labels.js +8 -1
- package/dist/chat/headless/sidebar/prewarm.d.ts +68 -0
- package/dist/chat/headless/sidebar/prewarm.js +114 -0
- package/dist/chat/headless/streams/actions.d.ts +4 -2
- package/dist/chat/headless/streams/actions.js +2 -1
- package/dist/chat/headless/streams/event-bytes.d.ts +17 -0
- package/dist/chat/headless/streams/event-bytes.js +46 -0
- package/dist/chat/headless/streams/live-events.d.ts +25 -1
- package/dist/chat/headless/streams/live-events.js +53 -2
- package/dist/chat/headless/streams/selectors.d.ts +3 -0
- package/dist/chat/headless/streams/selectors.js +8 -1
- package/dist/chat/headless/streams/session-streams.d.ts +15 -3
- package/dist/chat/headless/streams/session-streams.js +31 -3
- package/dist/chat/headless/streams/store.d.ts +45 -6
- package/dist/chat/headless/streams/store.js +85 -31
- package/dist/chat/headless/streams/transcript-map.d.ts +57 -0
- package/dist/chat/headless/streams/transcript-map.js +85 -0
- package/dist/chat/headless/streams/transcript.d.ts +4 -2
- package/dist/chat/headless/streams/transcript.js +19 -7
- package/dist/chat/headless/streams/types.d.ts +2 -1
- package/dist/chat/headless/transcript/batch.js +5 -1
- package/dist/chat/headless/transcript/blob-media.d.ts +15 -0
- package/dist/chat/headless/transcript/blob-media.js +23 -0
- package/dist/chat/headless/transcript/collapse.d.ts +10 -0
- package/dist/chat/headless/transcript/collapse.js +35 -6
- package/dist/chat/headless/transcript/derive.d.ts +98 -0
- package/dist/chat/headless/transcript/derive.js +89 -0
- package/dist/chat/headless/transcript/exchange-media.d.ts +3 -1
- package/dist/chat/headless/transcript/exchange-media.js +8 -5
- package/dist/chat/headless/transcript/fold-attachments.d.ts +2 -0
- package/dist/chat/headless/transcript/fold-attachments.js +3 -2
- package/dist/chat/headless/transcript/fold.d.ts +2 -1
- package/dist/chat/headless/transcript/fold.js +16 -6
- package/dist/chat/headless/transcript/incremental.d.ts +53 -0
- package/dist/chat/headless/transcript/incremental.js +181 -0
- package/dist/chat/headless/transcript/index.d.ts +2 -2
- package/dist/chat/headless/transcript/index.js +2 -2
- package/dist/chat/headless/transcript/nesting.js +2 -1
- package/dist/chat/headless/transcript/rail.d.ts +50 -1
- package/dist/chat/headless/transcript/rail.js +165 -23
- package/dist/chat/headless/transcript/rows.d.ts +5 -1
- package/dist/chat/headless/transcript/run-failures.js +2 -1
- package/dist/chat/headless/transcript/seams.d.ts +78 -0
- package/dist/chat/headless/transcript/seams.js +116 -0
- package/dist/chat/headless/transcript/tool-media.d.ts +6 -7
- package/dist/chat/headless/transcript/tool-media.js +27 -9
- package/dist/chat/index.d.ts +9 -8
- package/dist/chat/index.js +18 -17
- package/dist/chat/sidebar/ProjectIcon.js +1 -1
- package/dist/chat/sidebar/RowChips.js +2 -2
- package/dist/chat/sidebar/SessionSidebar.d.ts +6 -0
- package/dist/chat/sidebar/SessionSidebar.js +23 -16
- package/dist/chat/sidebar/SidebarFilterMenu.js +0 -1
- package/dist/chat/sidebar/SidebarFold.js +17 -16
- package/dist/chat/sidebar/SidebarFooter.d.ts +8 -5
- package/dist/chat/sidebar/SidebarFooter.js +6 -6
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +7 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +11 -8
- 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.js +28 -4
- package/dist/chat/sidebar/useInboxRows.js +6 -6
- package/dist/chat/sidebar/useInboxTriage.js +50 -47
- package/dist/chat/sidebar/useSessionSearch.js +19 -18
- package/dist/chat/testing/contract.d.ts +5 -3
- package/dist/chat/testing/contract.js +66 -1
- package/dist/chat/transcript/DiffLines.d.ts +6 -1
- package/dist/chat/transcript/DiffLines.js +35 -20
- package/dist/chat/transcript/EditDiffBlock.d.ts +5 -1
- package/dist/chat/transcript/EditDiffBlock.js +89 -30
- package/dist/chat/transcript/FileChip.js +28 -0
- package/dist/chat/transcript/LazyRow.d.ts +40 -40
- package/dist/chat/transcript/LazyRow.js +100 -149
- package/dist/chat/transcript/MermaidDiagram.js +2 -1
- package/dist/chat/transcript/PromptEcho.js +3 -11
- package/dist/chat/transcript/SessionChip.d.ts +11 -0
- package/dist/chat/transcript/SessionChip.js +34 -0
- package/dist/chat/transcript/SubagentBlock.js +3 -2
- package/dist/chat/transcript/TranscriptRail.d.ts +25 -2
- package/dist/chat/transcript/TranscriptRail.js +175 -17
- package/dist/chat/transcript/TranscriptRow.d.ts +4 -7
- package/dist/chat/transcript/TranscriptRow.js +4 -3
- package/dist/chat/transcript/actions.d.ts +37 -1
- package/dist/chat/transcript/actions.js +27 -1
- package/dist/chat/transcript/chip-details.d.ts +11 -0
- package/dist/chat/transcript/chip-details.js +17 -1
- package/dist/chat/transcript/clipped-output.d.ts +58 -0
- package/dist/chat/transcript/clipped-output.js +131 -0
- package/dist/chat/transcript/fold-attachments.js +10 -5
- package/dist/chat/transcript/fold-worker.js +5 -3
- package/dist/chat/transcript/fold.js +13 -4
- package/dist/chat/transcript/index.d.ts +11 -10
- package/dist/chat/transcript/index.js +10 -9
- package/dist/chat/transcript/markdown-cache.d.ts +17 -2
- package/dist/chat/transcript/markdown-cache.js +48 -4
- package/dist/chat/transcript/markdown.js +110 -55
- package/dist/chat/transcript/media-gallery.d.ts +3 -2
- package/dist/chat/transcript/media-gallery.js +19 -19
- package/dist/chat/transcript/messages.js +5 -4
- package/dist/chat/transcript/notices.js +2 -1
- package/dist/chat/transcript/prompt.d.ts +1 -1
- package/dist/chat/transcript/prompt.js +6 -4
- package/dist/chat/transcript/prose.js +2 -1
- package/dist/chat/transcript/root-items.d.ts +96 -0
- package/dist/chat/transcript/root-items.js +180 -0
- package/dist/chat/transcript/row-mount.d.ts +184 -0
- package/dist/chat/transcript/row-mount.js +532 -0
- package/dist/chat/transcript/row-parking.d.ts +152 -0
- package/dist/chat/transcript/row-parking.js +171 -0
- package/dist/chat/transcript/row-ui-state.d.ts +37 -0
- package/dist/chat/transcript/row-ui-state.js +53 -0
- package/dist/chat/transcript/run-rows.js +3 -2
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/tasks.js +3 -2
- package/dist/chat/transcript/tool-media.d.ts +4 -2
- package/dist/chat/transcript/tool-media.js +15 -7
- package/dist/chat/transcript/tool-parts.d.ts +27 -4
- package/dist/chat/transcript/tool-parts.js +31 -6
- package/dist/chat/transcript/tool-payload.js +26 -11
- package/dist/chat/transcript/tool-row.d.ts +2 -1
- package/dist/chat/transcript/tool-row.js +38 -19
- package/dist/chat/transcript/use-transcript-rows.d.ts +25 -8
- package/dist/chat/transcript/use-transcript-rows.js +28 -46
- package/dist/chat/transcript/useHistoryBackfill.d.ts +42 -0
- package/dist/chat/transcript/useHistoryBackfill.js +170 -0
- package/dist/chat/transcript/useStickToBottom.js +2 -3
- 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 +35 -19
- package/dist/chat/transcript/useTranscriptSelectionCopy.d.ts +5 -5
- package/dist/chat/transcript/useTranscriptSelectionCopy.js +28 -7
- package/dist/chat/transcript/view-scope.d.ts +26 -6
- package/dist/chat/transcript/view-scope.js +106 -20
- package/dist/code/editor/FileTree.d.ts +2 -0
- package/dist/code/editor/FileTree.js +1 -1
- package/dist/code/editor/FileView.js +16 -25
- 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/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/RowActionsMenu.js +7 -14
- package/dist/components/Tooltip.d.ts +4 -1
- package/dist/components/Tooltip.js +8 -6
- package/dist/components/assign-ref.d.ts +8 -0
- package/dist/components/assign-ref.js +12 -0
- package/dist/components/floating/FloatingSurface.js +2 -2
- package/dist/components/floating/HoverCard.js +32 -14
- package/dist/components/floating/Popover.js +4 -7
- package/dist/components/floating/useAnchoredPosition.d.ts +5 -3
- package/dist/components/floating/useAnchoredPosition.js +7 -7
- package/dist/components/object-key.d.ts +7 -0
- package/dist/components/object-key.js +18 -0
- package/dist/components/palette/PaletteList.js +2 -7
- package/dist/components/tooltip-arming.d.ts +3 -0
- package/dist/components/tooltip-arming.js +8 -1
- package/dist/core.css +3 -3
- package/dist/dist/{index-E1Z0aPmi.d.ts → index-BheVJOLc.d.ts} +3 -1
- package/dist/dist/index.d.ts +2 -2
- 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 +3 -7
- 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/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 +5 -3
- package/dist/git/MoveSessionDialog.d.ts +18 -8
- package/dist/git/MoveSessionDialog.js +32 -53
- package/dist/git/MoveToDialog.d.ts +61 -0
- package/dist/git/MoveToDialog.js +240 -0
- package/dist/git/SandboxManager.js +9 -4
- package/dist/git/SyncChip.js +11 -4
- package/dist/git/TeleportSessionDialog.d.ts +69 -0
- package/dist/git/TeleportSessionDialog.js +440 -0
- 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 +44 -1
- package/dist/git/headless/labels.js +50 -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 +4 -2
- package/dist/git/index.js +4 -2
- package/dist/git/useEnvironmentChoices.d.ts +5 -2
- package/dist/git/useEnvironmentChoices.js +12 -4
- 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 +3 -2
- package/dist/index.js +2 -1
- 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/machines/AddServerForm.js +55 -3
- 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/HostsSection.js +5 -1
- package/dist/machines/OrganizationPanel.d.ts +25 -0
- package/dist/machines/OrganizationPanel.js +266 -0
- package/dist/machines/PersonalLayerPanel.d.ts +32 -0
- package/dist/machines/PersonalLayerPanel.js +360 -0
- package/dist/machines/headless/fixture-host.d.ts +10 -0
- package/dist/machines/headless/fixture-host.js +44 -0
- package/dist/machines/headless/host.d.ts +21 -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 +55 -0
- package/dist/machines/headless/labels.js +58 -1
- package/dist/machines/headless/layer.d.ts +64 -0
- package/dist/machines/headless/layer.js +56 -0
- package/dist/machines/headless/organization.d.ts +38 -0
- package/dist/machines/headless/organization.js +44 -0
- package/dist/machines/index.d.ts +3 -1
- package/dist/machines/index.js +3 -1
- package/dist/machines/testing/contract.d.ts +25 -1
- package/dist/machines/testing/contract.js +97 -1
- 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/palette/headless/app-sources.js +37 -0
- package/dist/palette/headless/labels.js +3 -0
- package/dist/server/sse-handler.js +25 -2
- package/dist/session/DiffFileTree.js +1 -4
- package/dist/session/OpenSessionsDialog.d.ts +46 -0
- package/dist/session/OpenSessionsDialog.js +170 -0
- package/dist/session/PlanTracker.js +1 -2
- package/dist/session/ProjectHome.js +10 -9
- package/dist/session/RemindersPanel.js +10 -12
- package/dist/session/SecretsPanel.js +2 -1
- package/dist/session/SessionHeader.js +1 -0
- package/dist/session/SessionPeopleStack.d.ts +23 -0
- package/dist/session/SessionPeopleStack.js +65 -0
- package/dist/session/SessionPlaceMenu.js +5 -4
- package/dist/session/ShareSessionDialog.d.ts +32 -0
- package/dist/session/ShareSessionDialog.js +342 -0
- package/dist/session/TypingLine.d.ts +22 -0
- package/dist/session/TypingLine.js +31 -0
- package/dist/session/headless/host.d.ts +40 -1
- package/dist/session/headless/index.d.ts +4 -2
- package/dist/session/headless/index.js +3 -1
- package/dist/session/headless/labels.d.ts +49 -0
- package/dist/session/headless/labels.js +56 -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/typing.d.ts +37 -0
- package/dist/session/headless/typing.js +60 -0
- package/dist/session/index.d.ts +5 -1
- package/dist/session/index.js +5 -1
- package/dist/settings/headless/fixture-performance.js +4 -2
- package/dist/settings/headless/performance.d.ts +4 -0
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/headless/sections-host.d.ts +7 -2
- package/dist/settings/section.d.ts +15 -3
- package/dist/settings/section.js +15 -3
- package/dist/settings/sections/environments/EnvironmentsSection.js +30 -6
- 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/performance/PerformanceSection.js +8 -1
- package/dist/settings/sections/performance/labels.d.ts +2 -0
- package/dist/settings/sections/performance/labels.js +2 -0
- package/dist/styles.css +65 -9
- 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/views/headless/answers.d.ts +8 -2
- package/dist/views/headless/answers.js +58 -1
- package/dist/views/headless/placement.d.ts +78 -0
- package/dist/views/headless/placement.js +154 -44
- package/dist/workspace/LayoutBudget.js +1 -7
- package/package.json +2 -2
- package/src/styles/chat.css +3 -1
- package/src/styles/palette.css +3 -3
- package/src/styles/transcript.css +50 -5
- /package/dist/dist/{index-De9AbmxS.d.ts → index-ttmMvjgM.d.ts} +0 -0
package/dist/styles.css
CHANGED
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
.i-ph-database{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 24c-53.83 0-96 24.6-96 56v96c0 31.4 42.17 56 96 56s96-24.6 96-56V80c0-31.4-42.17-56-96-56m80 104c0 9.62-7.88 19.43-21.61 26.92C170.93 163.35 150.19 168 128 168s-42.93-4.65-58.39-13.08C55.88 147.43 48 137.62 48 128v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64ZM69.61 53.08C85.07 44.65 105.81 40 128 40s42.93 4.65 58.39 13.08C200.12 60.57 208 70.38 208 80s-7.88 19.43-21.61 26.92C170.93 115.35 150.19 120 128 120s-42.93-4.65-58.39-13.08C55.88 99.43 48 89.62 48 80s7.88-19.43 21.61-26.92m116.78 149.84C170.93 211.35 150.19 216 128 216s-42.93-4.65-58.39-13.08C55.88 195.43 48 185.62 48 176v-16.64c17.06 15 46.23 24.64 80 24.64s62.94-9.68 80-24.64V176c0 9.62-7.88 19.43-21.61 26.92'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
97
97
|
.i-ph-desktop{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M208 40H48a24 24 0 0 0-24 24v112a24 24 0 0 0 24 24h72v16H96a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16h-24v-16h72a24 24 0 0 0 24-24V64a24 24 0 0 0-24-24M48 56h160a8 8 0 0 1 8 8v80H40V64a8 8 0 0 1 8-8m160 128H48a8 8 0 0 1-8-8v-16h176v16a8 8 0 0 1-8 8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
98
98
|
.i-ph-desktop-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M216 72a8 8 0 0 1-8 8h-32a8 8 0 0 1 0-16h32a8 8 0 0 1 8 8m-8 24h-32a8 8 0 0 0 0 16h32a8 8 0 0 0 0-16m40-48v160a16 16 0 0 1-16 16h-80a16 16 0 0 1-16-16v-16H96v16h16a8 8 0 0 1 0 16H64a8 8 0 0 1 0-16h16v-16H32a24 24 0 0 1-24-24V96a24 24 0 0 1 24-24h104V48a16 16 0 0 1 16-16h80a16 16 0 0 1 16 16M136 176V88H32a8 8 0 0 0-8 8v72a8 8 0 0 0 8 8Zm96 32V48h-80v160zm-40-40a12 12 0 1 0 12 12a12 12 0 0 0-12-12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
99
|
+
.i-ph-door-open{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M232 216h-24V40a16 16 0 0 0-16-16H64a16 16 0 0 0-16 16v176H24a8 8 0 0 0 0 16h208a8 8 0 0 0 0-16m-40 0h-16V40h16ZM64 40h96v176H64Zm80 92a12 12 0 1 1-12-12a12 12 0 0 1 12 12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
99
100
|
.i-ph-dot-outline{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 96a32 32 0 1 0 32 32a32 32 0 0 0-32-32m0 48a16 16 0 1 1 16-16a16 16 0 0 1-16 16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
100
101
|
.i-ph-dots-six-vertical{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M104 60a12 12 0 1 1-12-12a12 12 0 0 1 12 12m60 12a12 12 0 1 0-12-12a12 12 0 0 0 12 12m-72 44a12 12 0 1 0 12 12a12 12 0 0 0-12-12m72 0a12 12 0 1 0 12 12a12 12 0 0 0-12-12m-72 68a12 12 0 1 0 12 12a12 12 0 0 0-12-12m72 0a12 12 0 1 0 12 12a12 12 0 0 0-12-12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
101
102
|
.i-ph-dots-three{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M140 128a12 12 0 1 1-12-12a12 12 0 0 1 12 12m56-12a12 12 0 1 0 12 12a12 12 0 0 0-12-12m-136 0a12 12 0 1 0 12 12a12 12 0 0 0-12-12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
@@ -264,6 +265,7 @@
|
|
|
264
265
|
.i-ph-user{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M230.92 212c-15.23-26.33-38.7-45.21-66.09-54.16a72 72 0 1 0-73.66 0c-27.39 8.94-50.86 27.82-66.09 54.16a8 8 0 1 0 13.85 8c18.84-32.56 52.14-52 89.07-52s70.23 19.44 89.07 52a8 8 0 1 0 13.85-8M72 96a56 56 0 1 1 56 56a56.06 56.06 0 0 1-56-56'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
265
266
|
.i-ph-user-circle{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24M74.08 197.5a64 64 0 0 1 107.84 0a87.83 87.83 0 0 1-107.84 0M96 120a32 32 0 1 1 32 32a32 32 0 0 1-32-32m97.76 66.41a79.66 79.66 0 0 0-36.06-28.75a48 48 0 1 0-59.4 0a79.66 79.66 0 0 0-36.06 28.75a88 88 0 1 1 131.52 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
266
267
|
.i-ph-user-switch{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m253.66 133.66l-24 24a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L216 132.69V128A88 88 0 0 0 56.49 76.67a8 8 0 0 1-13-9.34A104 104 0 0 1 232 128v4.69l10.34-10.35a8 8 0 0 1 11.32 11.32m-41.18 55A104 104 0 0 1 24 128v-4.69l-10.34 10.35a8 8 0 0 1-11.32-11.32l24-24a8 8 0 0 1 11.32 0l24 24a8 8 0 0 1-11.32 11.32L40 123.31V128a87.62 87.62 0 0 0 22.24 58.41a79.66 79.66 0 0 1 36.06-28.75a48 48 0 1 1 59.4 0a79.6 79.6 0 0 1 36.08 28.78a90 90 0 0 0 5.71-7.11a8 8 0 0 1 13 9.34ZM128 152a32 32 0 1 0-32-32a32 32 0 0 0 32 32m0 64a88.2 88.2 0 0 0 53.92-18.49a64 64 0 0 0-107.84 0A87.57 87.57 0 0 0 128 216'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
268
|
+
.i-ph-users{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M117.25 157.92a60 60 0 1 0-66.5 0a95.83 95.83 0 0 0-47.22 37.71a8 8 0 1 0 13.4 8.74a80 80 0 0 1 134.14 0a8 8 0 0 0 13.4-8.74a95.83 95.83 0 0 0-47.22-37.71M40 108a44 44 0 1 1 44 44a44.05 44.05 0 0 1-44-44m210.14 98.7a8 8 0 0 1-11.07-2.33A79.83 79.83 0 0 0 172 168a8 8 0 0 1 0-16a44 44 0 1 0-16.34-84.87a8 8 0 1 1-5.94-14.85a60 60 0 0 1 55.53 105.64a95.83 95.83 0 0 1 47.22 37.71a8 8 0 0 1-2.33 11.07'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
267
269
|
.i-ph-users-three{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M244.8 150.4a8 8 0 0 1-11.2-1.6A51.6 51.6 0 0 0 192 128a8 8 0 0 1-7.37-4.89a8 8 0 0 1 0-6.22A8 8 0 0 1 192 112a24 24 0 1 0-23.24-30a8 8 0 1 1-15.5-4A40 40 0 1 1 219 117.51a67.94 67.94 0 0 1 27.43 21.68a8 8 0 0 1-1.63 11.21M190.92 212a8 8 0 1 1-13.84 8a57 57 0 0 0-98.16 0a8 8 0 1 1-13.84-8a72.06 72.06 0 0 1 33.74-29.92a48 48 0 1 1 58.36 0A72.06 72.06 0 0 1 190.92 212M128 176a32 32 0 1 0-32-32a32 32 0 0 0 32 32m-56-56a8 8 0 0 0-8-8a24 24 0 1 1 23.24-30a8 8 0 1 0 15.5-4A40 40 0 1 0 37 117.51a67.94 67.94 0 0 0-27.4 21.68a8 8 0 1 0 12.8 9.61A51.6 51.6 0 0 1 64 128a8 8 0 0 0 8-8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
268
270
|
.i-ph-warning{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72m-13.87 15.71a8.5 8.5 0 0 1-7.48 4.2H40.55a8.5 8.5 0 0 1-7.48-4.2a7.59 7.59 0 0 1 0-7.72l87.45-151.87a8.75 8.75 0 0 1 15 0l87.45 151.87a7.59 7.59 0 0 1-.04 7.72M120 144v-40a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
269
271
|
.i-ph-warning-circle{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m-8-80V80a8 8 0 0 1 16 0v56a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
|
|
@@ -547,6 +549,7 @@
|
|
|
547
549
|
.empty\:hidden:empty{display:none;}
|
|
548
550
|
.aspect-square{aspect-ratio:1/1;}
|
|
549
551
|
.size-1\.5{width:0.375rem;height:0.375rem;}
|
|
552
|
+
.size-5{width:1.25rem;height:1.25rem;}
|
|
550
553
|
.size-7{width:1.75rem;height:1.75rem;}
|
|
551
554
|
.size-9{width:2.25rem;height:2.25rem;}
|
|
552
555
|
.\!h-2{height:0.5rem !important;}
|
|
@@ -606,6 +609,7 @@
|
|
|
606
609
|
.h-full{height:100%;}
|
|
607
610
|
.h-px{height:1px;}
|
|
608
611
|
.h23{height:5.75rem;}
|
|
612
|
+
.max-h-\[140px\]{max-height:140px;}
|
|
609
613
|
.max-h-\[264px\]{max-height:264px;}
|
|
610
614
|
.max-h-\[30\%\]{max-height:30%;}
|
|
611
615
|
.max-h-\[320px\]{max-height:320px;}
|
|
@@ -623,6 +627,7 @@
|
|
|
623
627
|
.max-h-\[min\(360px\,50vh\)\]{max-height:min(360px,50vh);}
|
|
624
628
|
.max-h-\[min\(400px\,55vh\)\]{max-height:min(400px,55vh);}
|
|
625
629
|
.max-h-\[min\(40vh\,280px\)\]{max-height:min(40vh,280px);}
|
|
630
|
+
.max-h-\[min\(440px\,60vh\)\]{max-height:min(440px,60vh);}
|
|
626
631
|
.max-h-\[min\(48vh\,420px\)\]{max-height:min(48vh,420px);}
|
|
627
632
|
.max-h-\[min\(60vh\,460px\)\]{max-height:min(60vh,460px);}
|
|
628
633
|
.max-h-\[min\(60vh\,480px\)\]{max-height:min(60vh,480px);}
|
|
@@ -707,6 +712,7 @@
|
|
|
707
712
|
.min-h-12{min-height:3rem;}
|
|
708
713
|
.min-h-14{min-height:3.5rem;}
|
|
709
714
|
.min-h-20{min-height:5rem;}
|
|
715
|
+
.min-h-32{min-height:8rem;}
|
|
710
716
|
.min-h-4{min-height:1rem;}
|
|
711
717
|
.min-h-40{min-height:10rem;}
|
|
712
718
|
.min-h-48{min-height:12rem;}
|
|
@@ -916,6 +922,7 @@
|
|
|
916
922
|
.gap-y-2{row-gap:0.5rem;}
|
|
917
923
|
.gap-y-3\.5{row-gap:0.875rem;}
|
|
918
924
|
.gap-y-4{row-gap:1rem;}
|
|
925
|
+
.-space-x-1\.5>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(calc(0.375rem * calc(1 - var(--un-space-x-reverse))) * -1);margin-right:calc(calc(0.375rem * var(--un-space-x-reverse)) * -1);}
|
|
919
926
|
.space-y-0\.5>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(0.125rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(0.125rem * var(--un-space-y-reverse));}
|
|
920
927
|
.space-y-1\.5>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(0.375rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(0.375rem * var(--un-space-y-reverse));}
|
|
921
928
|
.space-y-1>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(0.25rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(0.25rem * var(--un-space-y-reverse));}
|
|
@@ -1343,9 +1350,11 @@
|
|
|
1343
1350
|
.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px;}
|
|
1344
1351
|
.ring{--un-ring-width:3px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
|
1345
1352
|
.ring-1{--un-ring-width:1px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
|
1353
|
+
.ring-2{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
|
1346
1354
|
.focus-visible\:ring-1:focus-visible{--un-ring-width:1px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
|
|
1347
1355
|
.\!ring-\[color-mix\(in_srgb\,var\(--zg-warn\)_50\%\,transparent\)\]{--un-ring-color:color-mix(in srgb,var(--zg-warn) 50%,transparent) !important;}
|
|
1348
1356
|
.ring-\[color-mix\(in_srgb\,var\(--zg-accent\)_55\%\,transparent\)\]{--un-ring-color:color-mix(in srgb,var(--zg-accent) 55%,transparent);}
|
|
1357
|
+
.ring-\[var\(--zg-bg\)\]{--un-ring-color:var(--zg-bg);}
|
|
1349
1358
|
.ring-\[var\(--zg-hairline\)\]{--un-ring-color:var(--zg-hairline);}
|
|
1350
1359
|
.ring-\[var\(--zg-text-subtle\)\]{--un-ring-color:var(--zg-text-subtle);}
|
|
1351
1360
|
.focus-visible\:ring-\[var\(--zg-accent\)\]:focus-visible{--un-ring-color:var(--zg-accent);}
|
|
@@ -4738,7 +4747,9 @@ html[data-motion='reduced'] .zg-seg > span:nth-child(-n + 3) {
|
|
|
4738
4747
|
left: 50%;
|
|
4739
4748
|
width: max(100%, 40px);
|
|
4740
4749
|
height: max(100%, 40px);
|
|
4741
|
-
|
|
4750
|
+
/* `translate`, as `.zg-hit::after` (every IconButton) centres it: a `transform` on top would
|
|
4751
|
+
add to it and shift the area a whole width up and left, over the button next to it. */
|
|
4752
|
+
translate: -50% -50%;
|
|
4742
4753
|
}
|
|
4743
4754
|
|
|
4744
4755
|
/* --- Sidebar session rows ------------------------------------------------
|
|
@@ -5915,14 +5926,27 @@ html[data-motion='reduced'] .zg-arc::after {
|
|
|
5915
5926
|
transition: opacity var(--zg-motion-fade);
|
|
5916
5927
|
}
|
|
5917
5928
|
|
|
5929
|
+
/* Past its most ticks (TranscriptRail sets the height) it scrolls; an end with more ticks fades. */
|
|
5918
5930
|
.zg-prompt-rail-ticks {
|
|
5919
5931
|
display: flex;
|
|
5920
5932
|
flex-direction: column;
|
|
5921
|
-
max-height: 192px;
|
|
5922
5933
|
overflow-y: auto;
|
|
5934
|
+
overscroll-behavior: contain;
|
|
5923
5935
|
scrollbar-width: none;
|
|
5924
5936
|
}
|
|
5925
5937
|
|
|
5938
|
+
.zg-prompt-rail-ticks[data-fade-top] {
|
|
5939
|
+
mask-image: linear-gradient(to bottom, transparent, #000 24px);
|
|
5940
|
+
}
|
|
5941
|
+
|
|
5942
|
+
.zg-prompt-rail-ticks[data-fade-bottom] {
|
|
5943
|
+
mask-image: linear-gradient(to top, transparent, #000 24px);
|
|
5944
|
+
}
|
|
5945
|
+
|
|
5946
|
+
.zg-prompt-rail-ticks[data-fade-top][data-fade-bottom] {
|
|
5947
|
+
mask-image: linear-gradient(to bottom, transparent, #000 24px, #000 calc(100% - 24px), transparent);
|
|
5948
|
+
}
|
|
5949
|
+
|
|
5926
5950
|
.zg-prompt-rail-ticks::-webkit-scrollbar {
|
|
5927
5951
|
display: none;
|
|
5928
5952
|
}
|
|
@@ -5930,8 +5954,8 @@ html[data-motion='reduced'] .zg-arc::after {
|
|
|
5930
5954
|
.zg-prompt-rail-tick {
|
|
5931
5955
|
position: relative;
|
|
5932
5956
|
flex: none;
|
|
5933
|
-
width: 100%;
|
|
5934
5957
|
height: 8px;
|
|
5958
|
+
width: 100%;
|
|
5935
5959
|
padding: 0;
|
|
5936
5960
|
border: 0;
|
|
5937
5961
|
background: none;
|
|
@@ -5968,6 +5992,24 @@ html[data-motion='reduced'] .zg-arc::after {
|
|
|
5968
5992
|
background: var(--zg-text);
|
|
5969
5993
|
}
|
|
5970
5994
|
|
|
5995
|
+
/* A prompt whose history is loading for a jump to it. */
|
|
5996
|
+
.zg-prompt-rail-tick[data-pending]::before {
|
|
5997
|
+
background: var(--zg-text-muted);
|
|
5998
|
+
transform: scaleX(1);
|
|
5999
|
+
animation: zg-prompt-rail-pending 0.9s ease-in-out infinite alternate;
|
|
6000
|
+
}
|
|
6001
|
+
|
|
6002
|
+
@keyframes zg-prompt-rail-pending {
|
|
6003
|
+
to {
|
|
6004
|
+
opacity: 0.35;
|
|
6005
|
+
}
|
|
6006
|
+
}
|
|
6007
|
+
|
|
6008
|
+
html[data-motion='off'] .zg-prompt-rail-tick[data-pending]::before,
|
|
6009
|
+
html[data-motion='reduced'] .zg-prompt-rail-tick[data-pending]::before {
|
|
6010
|
+
animation: none;
|
|
6011
|
+
}
|
|
6012
|
+
|
|
5971
6013
|
.zg-prompt-rail-tick:focus-visible {
|
|
5972
6014
|
outline: 2px solid var(--zg-ring);
|
|
5973
6015
|
outline-offset: 1px;
|
|
@@ -6088,6 +6130,12 @@ html[data-motion='reduced'] .zg-arc::after {
|
|
|
6088
6130
|
padding-inline: 6px;
|
|
6089
6131
|
margin-inline: -6px;
|
|
6090
6132
|
}
|
|
6133
|
+
/* A placeholder (`LazyRow` before its content mounts, or parked) is a plain
|
|
6134
|
+
box of its height: the browser checks every `content-visibility: auto`
|
|
6135
|
+
element each scrolled frame, and a long history holds thousands. */
|
|
6136
|
+
.zg-cv-row[data-lazy] {
|
|
6137
|
+
content-visibility: visible;
|
|
6138
|
+
}
|
|
6091
6139
|
/* A row inside a row (an open fold's, a message group's, a worker's) renders
|
|
6092
6140
|
with its parent. Skipped on its own, it lagged a frame behind the parent
|
|
6093
6141
|
coming into view: still at its estimate as it scrolled in, then snapping
|
|
@@ -6931,18 +6979,26 @@ html[data-motion='reduced'] .zg-script-line::after {
|
|
|
6931
6979
|
/* Each streamed line grows in (`Grow`, a grid-row tween): keep that layout
|
|
6932
6980
|
inside the box, not spreading to the scroller and every visible row. */
|
|
6933
6981
|
contain: layout;
|
|
6982
|
+
/* Never taller than a full window: wrapped lines and a burst of rows growing in
|
|
6983
|
+
while others shrink out stay inside, clipped at the top, newest at the bottom. */
|
|
6984
|
+
max-height: calc(var(--zg-live-tail) * 1.5em + 1rem);
|
|
6985
|
+
overflow: hidden;
|
|
6934
6986
|
}
|
|
6935
6987
|
.zg-live-output[data-full] {
|
|
6936
|
-
|
|
6988
|
+
height: calc(var(--zg-live-tail) * 1.5em + 1rem);
|
|
6937
6989
|
}
|
|
6938
|
-
/* A full window: the new line grows in as the oldest shrinks out, on one curve, so the
|
|
6939
|
-
box keeps its height and the lines slide up instead of the box breathing. */
|
|
6940
6990
|
.zg-live-output > .zg-grow,
|
|
6941
6991
|
.zg-live-output > .zg-grow[data-shown] {
|
|
6942
6992
|
transition:
|
|
6943
6993
|
grid-template-rows var(--zg-motion-settle),
|
|
6944
6994
|
opacity var(--zg-motion-fade);
|
|
6945
6995
|
}
|
|
6996
|
+
/* A full window holds still: lines flow through it at once. Animating each one squashes
|
|
6997
|
+
a burst (many growing in as many shrink out) into overlapping, half-drawn rows. */
|
|
6998
|
+
.zg-live-output[data-full] > .zg-grow,
|
|
6999
|
+
.zg-live-output[data-full] > .zg-grow[data-shown] {
|
|
7000
|
+
transition: none;
|
|
7001
|
+
}
|
|
6946
7002
|
.zg-live-output [data-stream='console'],
|
|
6947
7003
|
.zg-live-output [data-stream='stderr'] {
|
|
6948
7004
|
color: var(--zg-text-subtle);
|
|
@@ -8116,8 +8172,8 @@ html[data-motion='reduced'] .tippy-box[data-animation='zg-mention'][data-state]
|
|
|
8116
8172
|
|
|
8117
8173
|
/* Command palette. The cursor is one block under the rows that glides to
|
|
8118
8174
|
the marked row (a transform: no layout, no repaint of the rows); a new list
|
|
8119
|
-
puts
|
|
8120
|
-
own, so hover and keyboard mark the same way. */
|
|
8175
|
+
puts a new one in place at once (`PaletteList` keys it by the list). The rows
|
|
8176
|
+
draw no background of their own, so hover and keyboard mark the same way. */
|
|
8121
8177
|
.zg-palette-cursor {
|
|
8122
8178
|
position: absolute;
|
|
8123
8179
|
top: 0;
|
|
@@ -8161,7 +8217,7 @@ html[data-motion='reduced'] .tippy-box[data-animation='zg-mention'][data-state]
|
|
|
8161
8217
|
/* `snap`'s curve, quicker: the cursor follows a held arrow key, so it must
|
|
8162
8218
|
land before the next repeat. Scaling the duration keeps every motion mode
|
|
8163
8219
|
(springs off: the tween; reduced, off: 0ms). */
|
|
8164
|
-
.zg-palette-cursor
|
|
8220
|
+
.zg-palette-cursor {
|
|
8165
8221
|
transition: transform calc(var(--zg-motion-snap-duration) * 0.6) var(--zg-motion-snap-ease);
|
|
8166
8222
|
}
|
|
8167
8223
|
|
|
@@ -3,6 +3,7 @@ import { Notice } from "../components/Notice.js";
|
|
|
3
3
|
import { errorMessage } from "../components/report-error.js";
|
|
4
4
|
import { RowActionsMenu } from "../components/RowActionsMenu.js";
|
|
5
5
|
import { useLinkRouter } from "../extensions/links.js";
|
|
6
|
+
import { useLatest } from "../hooks/useLatest.js";
|
|
6
7
|
import { getMergedKeybindings } from "../keybindings/headless/overrides.js";
|
|
7
8
|
import { bindingAllowedIn } from "../keybindings/headless/key-scope.js";
|
|
8
9
|
import { useKeybindingsHost } from "../keybindings/KeybindingsProvider.js";
|
|
@@ -59,16 +60,14 @@ function HostTerminalSurface({ scope, terminalId, label, cwd, autoFocus = false,
|
|
|
59
60
|
else term.resize(cols, rows);
|
|
60
61
|
gridChanged.current?.();
|
|
61
62
|
};
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
const latest = useLatest({
|
|
64
|
+
ptySize: {
|
|
65
|
+
cols: ptyCols,
|
|
66
|
+
rows: ptyRows
|
|
67
|
+
},
|
|
68
|
+
applyGrid,
|
|
69
|
+
autoFocus
|
|
65
70
|
});
|
|
66
|
-
ptySize.current = {
|
|
67
|
-
cols: ptyCols,
|
|
68
|
-
rows: ptyRows
|
|
69
|
-
};
|
|
70
|
-
const applyGridRef = useRef(applyGrid);
|
|
71
|
-
applyGridRef.current = applyGrid;
|
|
72
71
|
const [failed, setFailed] = useState(null);
|
|
73
72
|
const [menu, setMenu] = useState(null);
|
|
74
73
|
const palette = usePalette();
|
|
@@ -76,8 +75,7 @@ function HostTerminalSurface({ scope, terminalId, label, cwd, autoFocus = false,
|
|
|
76
75
|
const themeKey = useMemo(() => JSON.stringify(theme), [theme]);
|
|
77
76
|
const { fonts, fontSizes } = useAppearanceState();
|
|
78
77
|
const { family: fontFamily, size: fontSize } = terminalFont(fonts.mono, fontSizes.code);
|
|
79
|
-
const links =
|
|
80
|
-
links.current = {
|
|
78
|
+
const links = useLatest({
|
|
81
79
|
cwd: actions.openFile ? cwd : "",
|
|
82
80
|
unreachable: (url) => serverOnlyLink(url, serverName, labels.terminalLinkOnServer),
|
|
83
81
|
tip: (text) => {
|
|
@@ -102,11 +100,7 @@ function HostTerminalSurface({ scope, terminalId, label, cwd, autoFocus = false,
|
|
|
102
100
|
event
|
|
103
101
|
}, () => actions.openFile?.(scope, abs, event, at));
|
|
104
102
|
}
|
|
105
|
-
};
|
|
106
|
-
const labelRef = useRef(label);
|
|
107
|
-
labelRef.current = label;
|
|
108
|
-
const autoFocusRef = useRef(autoFocus);
|
|
109
|
-
autoFocusRef.current = autoFocus;
|
|
103
|
+
});
|
|
110
104
|
useEffect(() => {
|
|
111
105
|
const term = termRef.current;
|
|
112
106
|
if (!term) return;
|
|
@@ -318,7 +312,7 @@ function HostTerminalSurface({ scope, terminalId, label, cwd, autoFocus = false,
|
|
|
318
312
|
const result = await api.attach(terminalId, clientId);
|
|
319
313
|
if (disposed) api.detach(terminalId, clientId).catch(() => void 0);
|
|
320
314
|
if (disposed || seq !== attachSeq) return;
|
|
321
|
-
|
|
315
|
+
latest().applyGrid(term, result.terminal.cols, result.terminal.rows, result.terminal.sizeSeq);
|
|
322
316
|
replace(result.offset, result.data);
|
|
323
317
|
ack.acked = result.offset;
|
|
324
318
|
attached = true;
|
|
@@ -390,8 +384,9 @@ function HostTerminalSurface({ scope, terminalId, label, cwd, autoFocus = false,
|
|
|
390
384
|
if (!mount) return;
|
|
391
385
|
mountEl = mount;
|
|
392
386
|
hide();
|
|
387
|
+
const { ptySize } = latest();
|
|
393
388
|
term = new GhosttyTerminal({
|
|
394
|
-
...ptySize.
|
|
389
|
+
...ptySize.cols >= 2 && ptySize.rows >= 2 ? ptySize : {},
|
|
395
390
|
fontFamily,
|
|
396
391
|
fontSize,
|
|
397
392
|
theme,
|
|
@@ -477,7 +472,7 @@ function HostTerminalSurface({ scope, terminalId, label, cwd, autoFocus = false,
|
|
|
477
472
|
} : null
|
|
478
473
|
});
|
|
479
474
|
attach();
|
|
480
|
-
if (
|
|
475
|
+
if (latest().autoFocus) term.focus();
|
|
481
476
|
}, (err) => {
|
|
482
477
|
if (!disposed) setFailed({
|
|
483
478
|
message: labels.terminalLoadError,
|
|
@@ -544,7 +539,7 @@ function HostTerminalSurface({ scope, terminalId, label, cwd, autoFocus = false,
|
|
|
544
539
|
if (!term || !menu?.selection) return;
|
|
545
540
|
const range = selectionLines(term);
|
|
546
541
|
actions.addToChat?.(scope, {
|
|
547
|
-
label
|
|
542
|
+
label,
|
|
548
543
|
startLine: range?.start ?? 1,
|
|
549
544
|
endLine: range?.end ?? 1,
|
|
550
545
|
text: menu.selection
|
|
@@ -650,12 +645,12 @@ function bufferText(term) {
|
|
|
650
645
|
* browser; file hyperlinks open in Files (only when the terminal's paths are
|
|
651
646
|
* this machine's); mailto only on Cmd/Ctrl-click.
|
|
652
647
|
*/
|
|
653
|
-
function libraryLinkHandler(
|
|
648
|
+
function libraryLinkHandler(links) {
|
|
654
649
|
return {
|
|
655
650
|
activate: (event, uri) => {
|
|
656
|
-
const c =
|
|
651
|
+
const c = links();
|
|
657
652
|
const target = linkTarget(uri);
|
|
658
|
-
if (!
|
|
653
|
+
if (!target) return;
|
|
659
654
|
const modified = event.metaKey || event.ctrlKey;
|
|
660
655
|
if (target.kind === "web" && c.unreachable(target.url)) return;
|
|
661
656
|
if (target.kind === "web") c.openUrl(target.url, modified, event);
|
|
@@ -668,9 +663,10 @@ function libraryLinkHandler(ctx) {
|
|
|
668
663
|
},
|
|
669
664
|
hover: (_event, uri) => {
|
|
670
665
|
const target = linkTarget(uri);
|
|
671
|
-
|
|
666
|
+
const c = links();
|
|
667
|
+
c.tip(target?.kind === "web" ? c.unreachable(target.url) : null);
|
|
672
668
|
},
|
|
673
|
-
leave: () =>
|
|
669
|
+
leave: () => links().tip(null)
|
|
674
670
|
};
|
|
675
671
|
}
|
|
676
672
|
/** Viewport point of the last on-screen occurrence of `needle` (ASCII), for tests. */
|
|
@@ -691,7 +687,7 @@ function cellCenter(term, mount, needle) {
|
|
|
691
687
|
return null;
|
|
692
688
|
}
|
|
693
689
|
/** Our links: file paths and scheme-less local servers (see `detectLinks`). */
|
|
694
|
-
function linksOnRow(term, y,
|
|
690
|
+
function linksOnRow(term, y, links) {
|
|
695
691
|
const line = term?.buffer.active.getLine(y);
|
|
696
692
|
if (!line) return void 0;
|
|
697
693
|
let text = "";
|
|
@@ -704,7 +700,7 @@ function linksOnRow(term, y, ctx) {
|
|
|
704
700
|
for (let i = 0; i < chars.length; i++) cols.push(x);
|
|
705
701
|
text += chars;
|
|
706
702
|
}
|
|
707
|
-
const found = detectLinks(text).filter((l) => l.kind === "url" ||
|
|
703
|
+
const found = detectLinks(text).filter((l) => l.kind === "url" || links().cwd);
|
|
708
704
|
if (found.length === 0) return void 0;
|
|
709
705
|
return found.map((l) => ({
|
|
710
706
|
text: l.text,
|
|
@@ -718,10 +714,12 @@ function linksOnRow(term, y, ctx) {
|
|
|
718
714
|
y
|
|
719
715
|
}
|
|
720
716
|
},
|
|
721
|
-
hover: (isHovered) =>
|
|
717
|
+
hover: (isHovered) => {
|
|
718
|
+
const c = links();
|
|
719
|
+
c.tip(isHovered && l.kind === "url" ? c.unreachable(l.url) : null);
|
|
720
|
+
},
|
|
722
721
|
activate: (event) => {
|
|
723
|
-
const c =
|
|
724
|
-
if (!c) return;
|
|
722
|
+
const c = links();
|
|
725
723
|
if (l.kind === "url" && c.unreachable(l.url)) return;
|
|
726
724
|
if (l.kind === "url") c.openUrl(l.url, event.metaKey || event.ctrlKey, event);
|
|
727
725
|
else c.openFile(l.path, event, l.line !== void 0 ? {
|
|
@@ -50,7 +50,6 @@ function TerminalPanel({ scope, placement, trailing, className, style }) {
|
|
|
50
50
|
const shown = useMemo(() => terminalHideAgent ? terminals.filter((t) => t.owner !== "agent") : terminals, [terminals, terminalHideAgent]);
|
|
51
51
|
const [focusId, setFocusId] = useState(null);
|
|
52
52
|
const [focusSeq, setFocusSeq] = useState(0);
|
|
53
|
-
const [generation, setGeneration] = useState(0);
|
|
54
53
|
const [recent, setRecent] = useState([]);
|
|
55
54
|
const activeId = data.activeId;
|
|
56
55
|
const rootRef = useRef(null);
|
|
@@ -248,15 +247,11 @@ function TerminalPanel({ scope, placement, trailing, className, style }) {
|
|
|
248
247
|
ptyRows: t.rows,
|
|
249
248
|
ptySeq: t.sizeSeq,
|
|
250
249
|
serverName
|
|
251
|
-
}, t.id
|
|
250
|
+
}, t.id)
|
|
252
251
|
}, t.id))
|
|
253
252
|
}), /* @__PURE__ */ jsx(StatusBar, {
|
|
254
253
|
scope,
|
|
255
|
-
terminal: active
|
|
256
|
-
onReconnect: () => {
|
|
257
|
-
setFocusId(active.id);
|
|
258
|
-
setGeneration((g) => g + 1);
|
|
259
|
-
}
|
|
254
|
+
terminal: active
|
|
260
255
|
})] }) : /* @__PURE__ */ jsx(Empty, { onNew: () => void openNew() })
|
|
261
256
|
})
|
|
262
257
|
]
|
|
@@ -447,15 +442,12 @@ function statusText(t, labels) {
|
|
|
447
442
|
}
|
|
448
443
|
}
|
|
449
444
|
/** Exited / disconnected / failed: one quiet line under the terminal, with the way back. */
|
|
450
|
-
function StatusBar({ scope, terminal: t
|
|
445
|
+
function StatusBar({ scope, terminal: t }) {
|
|
451
446
|
const store = useTerminalStore();
|
|
452
447
|
const labels = useTerminalLabels();
|
|
453
448
|
const text = statusText(t, labels);
|
|
454
449
|
if (!text || t.status === "starting") return null;
|
|
455
|
-
const action = t.status
|
|
456
|
-
label: labels.terminalReconnect,
|
|
457
|
-
run: onReconnect
|
|
458
|
-
} : t.owner === "user" && store.host.restart ? {
|
|
450
|
+
const action = t.status !== "paused" && t.owner === "user" && store.host.restart ? {
|
|
459
451
|
label: labels.terminalRestart,
|
|
460
452
|
run: () => void store.restart(scope, t.id)
|
|
461
453
|
} : null;
|
|
@@ -111,13 +111,21 @@ export declare function useTerminalStore(): TerminalStore;
|
|
|
111
111
|
export declare function useOptionalTerminalStore(): TerminalStore | null;
|
|
112
112
|
/** The app's actions from the nearest {@link TerminalProvider}. */
|
|
113
113
|
export declare function useTerminalActions(): TerminalAppActions;
|
|
114
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* The symbols face's URL for the views.
|
|
116
|
+
*
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
115
119
|
export declare function useSymbolsFontUrl(): string | undefined;
|
|
116
120
|
/** Where the app serves ghostty-web's wasm (`TerminalProvider`'s `wasmUrl`). */
|
|
117
121
|
export declare function useGhosttyWasmUrl(): string | undefined;
|
|
118
122
|
/** Whether terminals are on (`TerminalProvider`'s `enabled`). */
|
|
119
123
|
export declare function useTerminalsEnabled(): boolean;
|
|
120
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Why there are no terminals for a while (`TerminalProvider`'s `waiting`).
|
|
126
|
+
*
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
121
129
|
export declare function useTerminalWaiting(): TerminalWaiting | null;
|
|
122
130
|
/**
|
|
123
131
|
* A scope's terminals (state, active terminal, error, agent badge), re-rendering when they change.
|
|
@@ -64,7 +64,11 @@ function useOptionalTerminalStore() {
|
|
|
64
64
|
function useTerminalActions() {
|
|
65
65
|
return useTerminalContext().actions;
|
|
66
66
|
}
|
|
67
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* The symbols face's URL for the views.
|
|
69
|
+
*
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
68
72
|
function useSymbolsFontUrl() {
|
|
69
73
|
return useTerminalContext().assets.symbolsFontUrl;
|
|
70
74
|
}
|
|
@@ -76,7 +80,11 @@ function useGhosttyWasmUrl() {
|
|
|
76
80
|
function useTerminalsEnabled() {
|
|
77
81
|
return useContext(StatusContext).enabled;
|
|
78
82
|
}
|
|
79
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Why there are no terminals for a while (`TerminalProvider`'s `waiting`).
|
|
85
|
+
*
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
80
88
|
function useTerminalWaiting() {
|
|
81
89
|
return useContext(StatusContext).waiting;
|
|
82
90
|
}
|
|
@@ -40,7 +40,6 @@ export declare const DEFAULT_TERMINAL_LABELS: {
|
|
|
40
40
|
terminalDisconnected: string;
|
|
41
41
|
terminalFailedToStart: string;
|
|
42
42
|
terminalStarting: string;
|
|
43
|
-
terminalReconnect: string;
|
|
44
43
|
terminalRestart: string;
|
|
45
44
|
terminalNoneOpen: string;
|
|
46
45
|
/** Under the empty state's title. */
|
|
@@ -38,10 +38,9 @@ const DEFAULT_TERMINAL_LABELS = {
|
|
|
38
38
|
/** Status lines. */
|
|
39
39
|
terminalExitedWith: (code) => `Exited with code ${code}`,
|
|
40
40
|
terminalExitedPlain: "Exited",
|
|
41
|
-
terminalDisconnected: "
|
|
41
|
+
terminalDisconnected: "Paused with its environment. Type to resume.",
|
|
42
42
|
terminalFailedToStart: "Failed to start",
|
|
43
43
|
terminalStarting: "Starting",
|
|
44
|
-
terminalReconnect: "Reconnect",
|
|
45
44
|
terminalRestart: "Restart",
|
|
46
45
|
terminalNoneOpen: "No terminal open",
|
|
47
46
|
/** Under the empty state's title. */
|
|
@@ -306,7 +306,11 @@ var TerminalStore = class {
|
|
|
306
306
|
* @param scope - The scope or its key (where an error shows).
|
|
307
307
|
* @param terminalId - The terminal.
|
|
308
308
|
*/
|
|
309
|
-
close = (scope, terminalId) => this.act(scope, () =>
|
|
309
|
+
close = (scope, terminalId) => this.act(scope, async () => {
|
|
310
|
+
await this.host.close(terminalId);
|
|
311
|
+
const key = keyOf(scope);
|
|
312
|
+
if (this.get(key).state?.terminals.some((t) => t.id === terminalId)) await this.refresh(this.scopeFor(key));
|
|
313
|
+
});
|
|
310
314
|
/**
|
|
311
315
|
* Restarts a terminal's process.
|
|
312
316
|
*
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* draws again only when its answer changes.
|
|
11
11
|
*/
|
|
12
12
|
import { ChatEvent } from "../../chat/headless/host.js";
|
|
13
|
+
import { TranscriptEvents } from "zidane/chat/pure";
|
|
13
14
|
/** An answer the user sent from a view's input. */
|
|
14
15
|
export interface ViewAnswer {
|
|
15
16
|
/** The text the message showed. */
|
|
@@ -28,6 +29,9 @@ export declare function viewAnswerKey(viewId: string, path: readonly number[]):
|
|
|
28
29
|
export declare class ViewAnswers {
|
|
29
30
|
private map;
|
|
30
31
|
private seen;
|
|
32
|
+
private source;
|
|
33
|
+
/** A transcript store's settled answers, per chunk list. */
|
|
34
|
+
private settled;
|
|
31
35
|
private readonly changed;
|
|
32
36
|
private readonly listeners;
|
|
33
37
|
/** Number of answers held. */
|
|
@@ -35,9 +39,11 @@ export declare class ViewAnswers {
|
|
|
35
39
|
/**
|
|
36
40
|
* Reads the events. Call {@link flush} after to tell the controls whose answer changed.
|
|
37
41
|
*
|
|
38
|
-
* @param events - The session's events, oldest first.
|
|
42
|
+
* @param events - The session's events, oldest first, or its transcript store (its settled exchanges are read once).
|
|
39
43
|
*/
|
|
40
|
-
update(events: readonly ChatEvent[]): void;
|
|
44
|
+
update(events: readonly ChatEvent[] | TranscriptEvents<ChatEvent>): void;
|
|
45
|
+
private updateTranscript;
|
|
46
|
+
private updateArray;
|
|
41
47
|
/** Tells the controls whose answer changed since the last flush. */
|
|
42
48
|
flush(): void;
|
|
43
49
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { promptOriginOf } from "../../chat/headless/prompt-origin.js";
|
|
2
|
+
import { chunkFact, noteTranscriptPass } from "zidane/chat/pure";
|
|
2
3
|
// src/views/headless/answers.ts
|
|
3
4
|
/**
|
|
4
5
|
* The key of one input: its view and its node path.
|
|
@@ -13,10 +14,25 @@ function viewAnswerKey(viewId, path) {
|
|
|
13
14
|
function answerOf(event) {
|
|
14
15
|
return event.kind === "user-prompt" && event.childId === void 0 ? promptOriginOf(event)?.view : void 0;
|
|
15
16
|
}
|
|
17
|
+
/** The answers events hold, in order, each key once (the first answer of an input stands). */
|
|
18
|
+
function answersIn(events) {
|
|
19
|
+
const out = [];
|
|
20
|
+
for (const event of events) {
|
|
21
|
+
const view = answerOf(event);
|
|
22
|
+
if (view) out.push([viewAnswerKey(view.viewId, view.nodePath), {
|
|
23
|
+
text: event.text ?? "",
|
|
24
|
+
value: view.value
|
|
25
|
+
}]);
|
|
26
|
+
}
|
|
27
|
+
return out;
|
|
28
|
+
}
|
|
16
29
|
/** The answers of one transcript, per input. */
|
|
17
30
|
var ViewAnswers = class {
|
|
18
31
|
map = /* @__PURE__ */ new Map();
|
|
19
32
|
seen = [];
|
|
33
|
+
source = null;
|
|
34
|
+
/** A transcript store's settled answers, per chunk list. */
|
|
35
|
+
settled = null;
|
|
20
36
|
changed = /* @__PURE__ */ new Set();
|
|
21
37
|
listeners = /* @__PURE__ */ new Map();
|
|
22
38
|
/** Number of answers held. */
|
|
@@ -26,9 +42,50 @@ var ViewAnswers = class {
|
|
|
26
42
|
/**
|
|
27
43
|
* Reads the events. Call {@link flush} after to tell the controls whose answer changed.
|
|
28
44
|
*
|
|
29
|
-
* @param events - The session's events, oldest first.
|
|
45
|
+
* @param events - The session's events, oldest first, or its transcript store (its settled exchanges are read once).
|
|
30
46
|
*/
|
|
31
47
|
update(events) {
|
|
48
|
+
if (events === this.source) return;
|
|
49
|
+
this.source = events;
|
|
50
|
+
if (!Array.isArray(events)) {
|
|
51
|
+
this.updateTranscript(events);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (this.settled) {
|
|
55
|
+
for (const key of this.map.keys()) this.changed.add(key);
|
|
56
|
+
this.map = /* @__PURE__ */ new Map();
|
|
57
|
+
this.settled = null;
|
|
58
|
+
}
|
|
59
|
+
this.updateArray(events);
|
|
60
|
+
}
|
|
61
|
+
updateTranscript(transcript) {
|
|
62
|
+
this.seen = [];
|
|
63
|
+
let settled = this.settled;
|
|
64
|
+
if (!settled || settled.chunks !== transcript.chunks) {
|
|
65
|
+
const map = /* @__PURE__ */ new Map();
|
|
66
|
+
for (const chunk of transcript.chunks) for (const [key, answer] of chunkFact(chunk, "view-answers", answersIn)) if (!map.has(key)) map.set(key, answer);
|
|
67
|
+
settled = {
|
|
68
|
+
chunks: transcript.chunks,
|
|
69
|
+
map
|
|
70
|
+
};
|
|
71
|
+
this.settled = settled;
|
|
72
|
+
}
|
|
73
|
+
noteTranscriptPass("views:answers", transcript.tail.length);
|
|
74
|
+
const open = answersIn(transcript.tail);
|
|
75
|
+
let next = settled.map;
|
|
76
|
+
if (open.some(([key]) => !next.has(key))) {
|
|
77
|
+
next = new Map(next);
|
|
78
|
+
for (const [key, answer] of open) if (!next.has(key)) next.set(key, answer);
|
|
79
|
+
}
|
|
80
|
+
if (next === this.map) return;
|
|
81
|
+
for (const [key, answer] of next) {
|
|
82
|
+
const before = this.map.get(key);
|
|
83
|
+
if (!before || before.text !== answer.text || before.value !== answer.value) this.changed.add(key);
|
|
84
|
+
}
|
|
85
|
+
for (const key of this.map.keys()) if (!next.has(key)) this.changed.add(key);
|
|
86
|
+
this.map = next;
|
|
87
|
+
}
|
|
88
|
+
updateArray(events) {
|
|
32
89
|
if (events === this.seen) return;
|
|
33
90
|
const last = this.seen.length;
|
|
34
91
|
const grew = events.length >= last && (last === 0 || events[last - 1] === this.seen[last - 1]);
|