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
|
@@ -23,17 +23,14 @@ function ZoomIndicator({ durationMs = 3e3, avoid, className = "", style }) {
|
|
|
23
23
|
const transition = useWithFade("pop");
|
|
24
24
|
const [shown, setShown] = useState(false);
|
|
25
25
|
const [hovered, setHovered] = useState(false);
|
|
26
|
-
const last = useRef(scale);
|
|
27
26
|
const box = useRef(null);
|
|
28
27
|
const [lift, setLift] = useState(0);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const [seenScale, setSeenScale] = useState(scale);
|
|
29
|
+
if (seenScale !== scale) {
|
|
30
|
+
setSeenScale(scale);
|
|
32
31
|
if (enabled) setShown(true);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (!enabled) setShown(false);
|
|
36
|
-
}, [enabled]);
|
|
32
|
+
}
|
|
33
|
+
if (!enabled && shown) setShown(false);
|
|
37
34
|
useEffect(() => {
|
|
38
35
|
if (!shown || hovered) return void 0;
|
|
39
36
|
const id = setTimeout(setShown, durationMs, false);
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `Transcript` over a `ChatHost`: reads `host.transcript(sessionId)`,
|
|
3
|
-
* shows a loading line until its history has arrived, an "Earlier messages"
|
|
4
|
-
* control while older events exist, and binds the rows' actions to the host
|
|
5
|
-
* (full tool output, stopping a call, continuing a failed run through
|
|
6
|
-
* `send`, fixing a failed sign-in over the nearest settings host's accounts).
|
|
7
|
-
* An action the host leaves out hides its control.
|
|
8
|
-
*
|
|
9
|
-
* <ChatProvider host={host}>
|
|
10
|
-
* <HostTranscript sessionId={id} onOpenSession={setActive} />
|
|
11
|
-
* </ChatProvider>
|
|
12
|
-
*/
|
|
13
1
|
import { AuthSettingsTarget } from "./headless/transcript/auth-failure.js";
|
|
14
2
|
import "./headless/transcript/index.js";
|
|
15
3
|
import { TranscriptProps } from "./Transcript.js";
|
|
@@ -2,8 +2,11 @@ import { Skeleton } from "../components/Skeleton.js";
|
|
|
2
2
|
import { useSettingsHost } from "../settings/SettingsProvider.js";
|
|
3
3
|
import { useChatHost } from "./ChatProvider.js";
|
|
4
4
|
import { useReadable } from "./headless/store.js";
|
|
5
|
+
import { eventsBytes, transcriptBytes } from "./headless/streams/event-bytes.js";
|
|
5
6
|
import { DEFAULT_TRANSCRIPT_OPTIONS, Transcript } from "./Transcript.js";
|
|
6
7
|
import { TranscriptActionsProvider } from "./transcript/actions.js";
|
|
8
|
+
import { useRailOutline } from "./transcript/TranscriptRail.js";
|
|
9
|
+
import { useHistoryBackfill } from "./transcript/useHistoryBackfill.js";
|
|
7
10
|
import { useChatLabels } from "./useChatLabels.js";
|
|
8
11
|
import { useMemo } from "react";
|
|
9
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -23,11 +26,27 @@ function HostTranscript({ sessionId, onOpenSession, onRunInTerminal, onOpenSetti
|
|
|
23
26
|
const labels = useChatLabels();
|
|
24
27
|
const transcript = useMemo(() => host.transcript(sessionId), [host, sessionId]);
|
|
25
28
|
const state = useReadable(transcript);
|
|
29
|
+
useRailOutline(transcript, Boolean(state.hasEarlier));
|
|
30
|
+
const rows = state.transcript ?? state.events;
|
|
31
|
+
useHistoryBackfill(sessionId, {
|
|
32
|
+
ready: state.hydrated,
|
|
33
|
+
hasMore: Boolean(state.hasEarlier && transcript.loadEarlier),
|
|
34
|
+
loading: Boolean(state.loadingEarlier),
|
|
35
|
+
loaded: rows.length,
|
|
36
|
+
load: () => transcript.loadEarlier?.(),
|
|
37
|
+
bytes: () => {
|
|
38
|
+
const { transcript: held, events } = transcript.get();
|
|
39
|
+
return held ? transcriptBytes(held) : eventsBytes(events);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
26
42
|
const actions = useMemo(() => ({
|
|
27
43
|
sessionId,
|
|
28
44
|
...host.toolOutput ? { toolOutput: (callId) => host.toolOutput(sessionId, callId) } : {},
|
|
45
|
+
...host.toolOutputRange ? { toolOutputRange: (callId, range, turnId) => host.toolOutputRange(sessionId, callId, range, turnId) } : {},
|
|
46
|
+
...host.toolCall ? { toolCall: (callId, turnId) => host.toolCall(sessionId, callId, turnId) } : {},
|
|
29
47
|
...host.cancelTool ? { cancelTool: (callId) => host.cancelTool(sessionId, callId) } : {},
|
|
30
48
|
...host.messageMediaUrl ? { messageMediaUrl: (src) => host.messageMediaUrl(sessionId, src) } : {},
|
|
49
|
+
...host.blobMediaUrl ? { blobMediaUrl: host.blobMediaUrl } : {},
|
|
31
50
|
...onOpenSession ? { openSession: onOpenSession } : {},
|
|
32
51
|
...host.send ? { resume: (prompt) => void host.send({
|
|
33
52
|
sessionId,
|
|
@@ -117,7 +136,7 @@ function HostTranscript({ sessionId, onOpenSession, onRunInTerminal, onOpenSetti
|
|
|
117
136
|
})
|
|
118
137
|
}), /* @__PURE__ */ jsx(Transcript, {
|
|
119
138
|
...props,
|
|
120
|
-
events:
|
|
139
|
+
events: rows,
|
|
121
140
|
streaming: state.running,
|
|
122
141
|
sessionId
|
|
123
142
|
})]
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
* dispatch hooks return the bound writes of `createSessionStreamActions`:
|
|
10
10
|
* stable functions that never subscribe their caller.
|
|
11
11
|
*/
|
|
12
|
-
import { ChatEvent } from "./headless/host.js";
|
|
13
12
|
import { SessionFallbackModel, SessionPageState, SessionRetryState } from "./headless/streams/types.js";
|
|
14
13
|
import { SessionStreams } from "./headless/streams/session-streams.js";
|
|
15
14
|
import { SessionStreamActions } from "./headless/streams/actions.js";
|
|
15
|
+
import { ChatEvent } from "./headless/host.js";
|
|
16
16
|
import "./headless/streams/index.js";
|
|
17
17
|
import { ReactNode } from "react";
|
|
18
|
+
import { TranscriptEvents } from "zidane/chat/pure";
|
|
18
19
|
import { SystemMdFile } from "zidane/chat";
|
|
19
20
|
/** Props of {@link SessionStreamsProvider}. */
|
|
20
21
|
export interface SessionStreamsProviderProps<K extends string = string> {
|
|
@@ -41,6 +42,13 @@ export declare function useSessionStreamActions<K extends string = string>(): Se
|
|
|
41
42
|
* @param sessionId - The session (`null`: none).
|
|
42
43
|
*/
|
|
43
44
|
export declare function useSessionEvents<K extends string>(sessionId: K | null): readonly ChatEvent[];
|
|
45
|
+
/**
|
|
46
|
+
* The session's events as the store holds them: settled exchanges and the open one (`TranscriptEvents`). A
|
|
47
|
+
* `Transcript` handed it walks only the open exchange per streamed delta, and no whole-session array is made.
|
|
48
|
+
*
|
|
49
|
+
* @param sessionId - The session (`null`: none).
|
|
50
|
+
*/
|
|
51
|
+
export declare function useSessionTranscript<K extends string>(sessionId: K | null): TranscriptEvents<ChatEvent>;
|
|
44
52
|
/**
|
|
45
53
|
* A value derived from the session's events, recomputed only when the events
|
|
46
54
|
* change. `select` should be stable (module-level or memoised) and return a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createSessionStreamActions } from "./headless/streams/actions.js";
|
|
2
|
-
import { readSessionEvents, readSessionFallback, readSessionPage, readSessionRetry, readSessionRunning, readSessionSystemMd, selectEditEvents, stableSelection } from "./headless/streams/selectors.js";
|
|
2
|
+
import { readSessionEvents, readSessionFallback, readSessionPage, readSessionRetry, readSessionRunning, readSessionSystemMd, readSessionTranscript, selectEditEvents, stableSelection } from "./headless/streams/selectors.js";
|
|
3
3
|
import { createContext, useCallback, useContext, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
// src/chat/SessionStreamsProvider.tsx
|
|
@@ -63,6 +63,15 @@ function useSessionEvents(sessionId) {
|
|
|
63
63
|
return useSessionSnapshot(sessionId, readSessionEvents);
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
+
* The session's events as the store holds them: settled exchanges and the open one (`TranscriptEvents`). A
|
|
67
|
+
* `Transcript` handed it walks only the open exchange per streamed delta, and no whole-session array is made.
|
|
68
|
+
*
|
|
69
|
+
* @param sessionId - The session (`null`: none).
|
|
70
|
+
*/
|
|
71
|
+
function useSessionTranscript(sessionId) {
|
|
72
|
+
return useSessionSnapshot(sessionId, readSessionTranscript);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
66
75
|
* A value derived from the session's events, recomputed only when the events
|
|
67
76
|
* change. `select` should be stable (module-level or memoised) and return a
|
|
68
77
|
* stable reference for unchanged input.
|
|
@@ -183,4 +192,4 @@ function useCaptureRunState() {
|
|
|
183
192
|
return () => store.runStateVersion === version;
|
|
184
193
|
}, [store]);
|
|
185
194
|
}
|
|
186
|
-
export { SessionStreamsProvider, useCaptureRunState, useHasSessionEvents, useIsSessionHydrated, useOptionalSessionStreamActions, usePeekRunSeq, usePeekSessionEvents, usePeekSessionRunning, useSessionEdits, useSessionEvents, useSessionEventsSelector, useSessionFallbackModel, useSessionPage, useSessionRetry, useSessionRunning, useSessionStreamActions, useSessionStreams, useSessionSystemMd };
|
|
195
|
+
export { SessionStreamsProvider, useCaptureRunState, useHasSessionEvents, useIsSessionHydrated, useOptionalSessionStreamActions, usePeekRunSeq, usePeekSessionEvents, usePeekSessionRunning, useSessionEdits, useSessionEvents, useSessionEventsSelector, useSessionFallbackModel, useSessionPage, useSessionRetry, useSessionRunning, useSessionStreamActions, useSessionStreams, useSessionSystemMd, useSessionTranscript };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The chat transcript: zidane events in, the rows of a session out. Runs the
|
|
3
3
|
* headless pipeline (`use-transcript-rows.ts`) with the display options,
|
|
4
|
-
* walks the rows into subagent blocks and
|
|
4
|
+
* walks the rows into subagent blocks and virtual root rows, and paints the
|
|
5
5
|
* select-turn cursor when the app drives that mode.
|
|
6
6
|
*
|
|
7
7
|
* <Transcript events={events} streaming={running} sessionId={id} options={{ transcriptDensity: 'compact' }} />
|
|
@@ -11,21 +11,27 @@
|
|
|
11
11
|
* the actions (`TranscriptActionsProvider`), both provided around it.
|
|
12
12
|
* `HostTranscript` is this component over a `ChatHost`.
|
|
13
13
|
*
|
|
14
|
-
* Scroll performance (keep it at frame rate on
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* Scroll performance (keep it at frame rate on 10,000+ row sessions): every
|
|
15
|
+
* root item is a lazy wrapper (`LazyRow`) that mounts its content on
|
|
16
|
+
* approach and keeps it, at its measured height before and after
|
|
17
|
+
* (`row-mount.ts`); only past a budget, while the reader is idle, do rows far
|
|
18
|
+
* from the view park. Scrolling back over rows already seen mounts nothing.
|
|
19
|
+
* Rows keep their identity across stream ticks, each renders through the
|
|
20
|
+
* memoized `TranscriptRow` with one shared `RowContext`, and a root row whose
|
|
17
21
|
* inputs did not change reuses its element (React skips it without a props
|
|
18
|
-
* compare)
|
|
19
|
-
* `
|
|
22
|
+
* compare). The settled exchanges' elements are made once per settled list
|
|
23
|
+
* and sit behind memoized fibers of {@link RUN_ROWS} rows each (`RowRun`), so
|
|
24
|
+
* a stream tick walks the open exchange only, and a row mounting walks its
|
|
25
|
+
* run and the list of runs, not every row of a long history.
|
|
20
26
|
*
|
|
21
27
|
* The extensions' `transcript.turn-end` items draw after the turn they name
|
|
22
28
|
* (`turnId`: after the last root row holding it; none holds it, not drawn),
|
|
23
29
|
* the rest once at the end when the run has ended.
|
|
24
30
|
*/
|
|
25
|
-
import { ChatEvent } from "./headless/host.js";
|
|
26
31
|
import { SelectStops } from "./headless/transcript/select-stops.js";
|
|
27
32
|
import "./headless/transcript/index.js";
|
|
28
33
|
import { TranscriptTurnMenu, TurnMenuTarget } from "./transcript/TranscriptRow.js";
|
|
34
|
+
import { TranscriptSource } from "./transcript/use-transcript-rows.js";
|
|
29
35
|
import { CSSProperties, ReactNode } from "react";
|
|
30
36
|
import { RunRetry } from "zidane/chat/pure";
|
|
31
37
|
import { Settings } from "zidane/chat";
|
|
@@ -46,8 +52,12 @@ export interface TranscriptSelection {
|
|
|
46
52
|
}
|
|
47
53
|
/** Props for {@link Transcript}. */
|
|
48
54
|
export interface TranscriptProps {
|
|
49
|
-
/**
|
|
50
|
-
|
|
55
|
+
/**
|
|
56
|
+
* The session's events, oldest first, or its transcript store (`TranscriptEvents`, a session stream store's
|
|
57
|
+
* `getTranscriptSnapshot`). From a store, a streamed delta walks the open exchange only; an array is split into
|
|
58
|
+
* exchanges first (one walk), unless a store made it.
|
|
59
|
+
*/
|
|
60
|
+
events: TranscriptSource;
|
|
51
61
|
/** A run is in flight: the last reply may still be streaming. */
|
|
52
62
|
streaming: boolean;
|
|
53
63
|
/** The session shown; switching it replays the first-paint settle (no enter animations). */
|
|
@@ -79,6 +89,6 @@ export interface TranscriptProps {
|
|
|
79
89
|
/** Rendered after the rows, inside the transcript (a menu the app owns). */
|
|
80
90
|
children?: ReactNode;
|
|
81
91
|
}
|
|
82
|
-
/** Renders a session's events as transcript rows: messages, tool calls grouped by the display options, subagent blocks, notices, and the select-turn cursor. Rows mount
|
|
92
|
+
/** Renders a session's events as transcript rows: messages, tool calls grouped by the display options, subagent blocks, notices, and the select-turn cursor. Rows mount as they near the view, and stay. */
|
|
83
93
|
export declare const Transcript: import("react").MemoExoticComponent<({ events, streaming, sessionId, options, selection, turnMenu, runStatus, liveScripts, className, style, children }: TranscriptProps) => import("react").JSX.Element>;
|
|
84
|
-
export type { TranscriptTurnMenu, TurnMenuTarget };
|
|
94
|
+
export type { TranscriptSource, TranscriptTurnMenu, TurnMenuTarget };
|