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
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { LoadError } from "../../components/LoadError.js";
|
|
2
|
+
import { createToolOutputPager, toolOutputPagerDone } from "../headless/output-pager.js";
|
|
3
|
+
import { constant, useReadable } from "../headless/store.js";
|
|
4
|
+
import { useChatLabels } from "../useChatLabels.js";
|
|
5
|
+
import { useTranscriptActions } from "./actions.js";
|
|
6
|
+
import { LoadFullOutputButton, useFullOutput } from "./tool-parts.js";
|
|
7
|
+
import { useMemo, useState } from "react";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { formatBytes } from "zidane/chat/pure";
|
|
10
|
+
// src/chat/transcript/clipped-output.tsx
|
|
11
|
+
const IDLE = constant({
|
|
12
|
+
text: "",
|
|
13
|
+
total: null,
|
|
14
|
+
missing: false,
|
|
15
|
+
loading: false,
|
|
16
|
+
error: null
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* The rest of a clipped result, read through the transcript's actions: paged
|
|
20
|
+
* with `toolOutputRange`, whole with `toolOutput` only.
|
|
21
|
+
*
|
|
22
|
+
* @param tool - The clipped tool row. Its `callId` (and `turnId`, a hint) address the result.
|
|
23
|
+
*/
|
|
24
|
+
function useClippedOutput(tool) {
|
|
25
|
+
const { sessionId, toolOutputRange } = useTranscriptActions();
|
|
26
|
+
const whole = useFullOutput(tool);
|
|
27
|
+
const { callId, turnId, resultClipped } = tool;
|
|
28
|
+
const pager = useMemo(() => toolOutputRange && sessionId && callId && resultClipped ? createToolOutputPager((range) => toolOutputRange(callId, range, turnId)) : null, [
|
|
29
|
+
toolOutputRange,
|
|
30
|
+
sessionId,
|
|
31
|
+
callId,
|
|
32
|
+
turnId,
|
|
33
|
+
resultClipped
|
|
34
|
+
]);
|
|
35
|
+
const state = useReadable(pager ?? IDLE);
|
|
36
|
+
const [running, setRunning] = useState(null);
|
|
37
|
+
const [last, setLast] = useState("more");
|
|
38
|
+
if (!pager) return {
|
|
39
|
+
text: typeof whole.full === "string" ? whole.full : null,
|
|
40
|
+
available: whole.available,
|
|
41
|
+
ready: whole.ready,
|
|
42
|
+
paged: null,
|
|
43
|
+
whole: {
|
|
44
|
+
full: whole.full,
|
|
45
|
+
load: whole.load
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const run = (what) => {
|
|
49
|
+
setRunning(what);
|
|
50
|
+
setLast(what);
|
|
51
|
+
(what === "all" ? pager.loadAll() : pager.loadMore()).finally(() => setRunning(null));
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
text: state.total !== null && !state.missing ? state.text : null,
|
|
55
|
+
available: true,
|
|
56
|
+
ready: true,
|
|
57
|
+
paged: {
|
|
58
|
+
...state,
|
|
59
|
+
running: state.loading ? running : null,
|
|
60
|
+
run,
|
|
61
|
+
retry: () => run(last)
|
|
62
|
+
},
|
|
63
|
+
whole: {
|
|
64
|
+
full: whole.full,
|
|
65
|
+
load: whole.load
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* "Load full output" over a clipped result; once a page shows, how much is
|
|
71
|
+
* loaded with "Load more" and "Load all", and a failed read with Retry.
|
|
72
|
+
*
|
|
73
|
+
* @param props - The result's state, `className` and `style`.
|
|
74
|
+
*/
|
|
75
|
+
function ClippedOutputControls({ output, className = "", style }) {
|
|
76
|
+
const labels = useChatLabels();
|
|
77
|
+
const { paged, whole } = output;
|
|
78
|
+
if (!output.available) return null;
|
|
79
|
+
if (!paged) {
|
|
80
|
+
if (typeof whole.full === "string") return null;
|
|
81
|
+
return /* @__PURE__ */ jsx(LoadFullOutputButton, {
|
|
82
|
+
loading: whole.full === "loading",
|
|
83
|
+
disabled: !output.ready,
|
|
84
|
+
onClick: whole.load,
|
|
85
|
+
className,
|
|
86
|
+
...style ? { style } : {}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
if (paged.missing || toolOutputPagerDone(paged) && paged.error === null) return null;
|
|
90
|
+
const failed = paged.error !== null && /* @__PURE__ */ jsx(LoadError, {
|
|
91
|
+
detail: paged.error,
|
|
92
|
+
onRetry: paged.retry,
|
|
93
|
+
children: labels.outputLoadFailed
|
|
94
|
+
});
|
|
95
|
+
if (paged.total === null) return /* @__PURE__ */ jsxs("div", {
|
|
96
|
+
className: `flex flex-col items-start gap-1.5 ${className}`,
|
|
97
|
+
style,
|
|
98
|
+
children: [/* @__PURE__ */ jsx(LoadFullOutputButton, {
|
|
99
|
+
loading: paged.loading,
|
|
100
|
+
disabled: false,
|
|
101
|
+
onClick: () => paged.run("more"),
|
|
102
|
+
className: ""
|
|
103
|
+
}), failed]
|
|
104
|
+
});
|
|
105
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
106
|
+
className: `flex flex-col items-start gap-1.5 ${className}`,
|
|
107
|
+
style,
|
|
108
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
109
|
+
className: "flex flex-wrap items-baseline gap-3",
|
|
110
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
111
|
+
className: "zg-meta",
|
|
112
|
+
children: labels.outputLoaded(formatBytes(paged.text.length), formatBytes(paged.total))
|
|
113
|
+
}), !toolOutputPagerDone(paged) && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(LoadFullOutputButton, {
|
|
114
|
+
loading: paged.running === "more",
|
|
115
|
+
disabled: paged.loading,
|
|
116
|
+
onClick: () => paged.run("more"),
|
|
117
|
+
className: "",
|
|
118
|
+
label: labels.loadMoreOutput,
|
|
119
|
+
loadingLabel: labels.loadingOutput
|
|
120
|
+
}), /* @__PURE__ */ jsx(LoadFullOutputButton, {
|
|
121
|
+
loading: paged.running === "all",
|
|
122
|
+
disabled: paged.loading,
|
|
123
|
+
onClick: () => paged.run("all"),
|
|
124
|
+
className: "",
|
|
125
|
+
label: labels.loadAllOutput,
|
|
126
|
+
loadingLabel: labels.loadingOutput
|
|
127
|
+
})] })]
|
|
128
|
+
}), failed]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
export { ClippedOutputControls, useClippedOutput };
|
|
@@ -3,7 +3,7 @@ import { Grow, GrowPresence } from "../../motion/grow.js";
|
|
|
3
3
|
import { RollingText } from "../../motion/roll.js";
|
|
4
4
|
import { mediumKey } from "../headless/transcript/exchange-media.js";
|
|
5
5
|
import { useChatLabels } from "../useChatLabels.js";
|
|
6
|
-
import { useTranscriptActions } from "./actions.js";
|
|
6
|
+
import { toolMediaSrcOf, useTranscriptActions } from "./actions.js";
|
|
7
7
|
import { useMediaGallery } from "./media-gallery.js";
|
|
8
8
|
import { useThumbnail } from "./thumbnails.js";
|
|
9
9
|
import { memo, useMemo, useState } from "react";
|
|
@@ -41,7 +41,7 @@ function stripLayout(images) {
|
|
|
41
41
|
*/
|
|
42
42
|
const FoldAttachments = memo(({ attachments, className, style }) => {
|
|
43
43
|
const labels = useChatLabels();
|
|
44
|
-
const
|
|
44
|
+
const actions = useTranscriptActions();
|
|
45
45
|
const lightbox = useLightbox();
|
|
46
46
|
const mediaGallery = useMediaGallery();
|
|
47
47
|
const [failed, setFailed] = useState(NO_FAILURES);
|
|
@@ -49,9 +49,14 @@ const FoldAttachments = memo(({ attachments, className, style }) => {
|
|
|
49
49
|
keys: new Set(attachments.map((a) => a.key)),
|
|
50
50
|
counted: attachments.length > STRIP_SIZE
|
|
51
51
|
}));
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const servable = (a) => toolMediaSrcOf(actions, a.callId, a) !== void 0;
|
|
53
|
+
const { tiles, hidden } = useMemo(() => stripLayout(attachments.filter((a) => !failed.has(a.key) && toolMediaSrcOf(actions, a.callId, a) !== void 0)), [
|
|
54
|
+
attachments,
|
|
55
|
+
failed,
|
|
56
|
+
actions
|
|
57
|
+
]);
|
|
58
|
+
if (tiles.length === 0 || !servable(tiles[0])) return null;
|
|
59
|
+
const src = (a) => toolMediaSrcOf(actions, a.callId, a);
|
|
55
60
|
const fail = (a) => {
|
|
56
61
|
mediaGallery?.failed(mediumKey.tool(a.callId, a.index));
|
|
57
62
|
setFailed((prev) => new Set(prev).add(a.key));
|
|
@@ -5,9 +5,11 @@ import { useChatLabels } from "../useChatLabels.js";
|
|
|
5
5
|
import { useModelName } from "./actions.js";
|
|
6
6
|
import { Caret } from "./frame.js";
|
|
7
7
|
import { useTranscriptRenderers } from "./renderers.js";
|
|
8
|
-
import {
|
|
8
|
+
import { useRowPartKey, useRowUiState } from "./row-ui-state.js";
|
|
9
|
+
import { useMemo } from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
// src/chat/transcript/fold-worker.tsx
|
|
12
|
+
const NO_ROWS = [];
|
|
11
13
|
/**
|
|
12
14
|
* A worker, opened: what it was asked (the Task step, closed by default),
|
|
13
15
|
* then its own progress folded like an exchange (`foldWorkerRows`): its
|
|
@@ -19,7 +21,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
19
21
|
*/
|
|
20
22
|
function WorkerDetails({ item, renderRows, className, style }) {
|
|
21
23
|
const labels = useChatLabels();
|
|
22
|
-
const rows = item.workerRows ??
|
|
24
|
+
const rows = item.workerRows ?? NO_ROWS;
|
|
23
25
|
const start = rows.find((r) => r.kind === "spawn-start");
|
|
24
26
|
const own = start?.childId ?? rows.map((r) => "childId" in r ? r.childId : void 0).find(Boolean);
|
|
25
27
|
const live = item.state === "running";
|
|
@@ -64,7 +66,7 @@ function TaskStep({ task, model, type, resume, system }) {
|
|
|
64
66
|
const labels = useChatLabels();
|
|
65
67
|
const modelName = useModelName();
|
|
66
68
|
const { Markdown } = useTranscriptRenderers();
|
|
67
|
-
const [open, setOpen] =
|
|
69
|
+
const [open, setOpen] = useRowUiState(useRowPartKey("worker-task"), false);
|
|
68
70
|
const mounted = useStaysMounted(open);
|
|
69
71
|
const first = task.split("\n").find((line) => line.trim()) ?? "";
|
|
70
72
|
const settings = [
|
|
@@ -14,6 +14,7 @@ import { Caret, Dot, RowFrame } from "./frame.js";
|
|
|
14
14
|
import { CompactMeta } from "./receipt-parts.js";
|
|
15
15
|
import { createRecentMap } from "./recent-map.js";
|
|
16
16
|
import { useTranscriptRenderers } from "./renderers.js";
|
|
17
|
+
import { useRowUiState } from "./row-ui-state.js";
|
|
17
18
|
import { ToolDetails } from "./tool-details.js";
|
|
18
19
|
import { ToolTiming } from "./tool-parts.js";
|
|
19
20
|
import { ModelVerdict } from "./tool-row.js";
|
|
@@ -57,7 +58,7 @@ const ExchangeFoldRow = memo(({ row, renderRows, status: runStatus, showAttachme
|
|
|
57
58
|
const labels = useChatLabels();
|
|
58
59
|
const [openState, setOpenState] = useState(() => FOLD_OPEN_STATE.get(row.id) ?? false);
|
|
59
60
|
const [setupOpened] = useState(() => new Set(openSetupIds(row.rows)));
|
|
60
|
-
const [openIds, setOpenIds] =
|
|
61
|
+
const [openIds, setOpenIds] = useRowUiState(`fold-steps:${row.id}`, setupOpened.size > 0 ? new Set(setupOpened) : NO_OPEN_IDS);
|
|
61
62
|
const setOpen = (next) => {
|
|
62
63
|
FOLD_OPEN_STATE.set(row.id, next);
|
|
63
64
|
setOpenState(next);
|
|
@@ -96,7 +97,11 @@ const ExchangeFoldRow = memo(({ row, renderRows, status: runStatus, showAttachme
|
|
|
96
97
|
if (fresh.length === 0) return;
|
|
97
98
|
fresh.forEach((id) => autoOpened.add(id));
|
|
98
99
|
setOpenIds((prev) => /* @__PURE__ */ new Set([...prev, ...fresh]));
|
|
99
|
-
}, [
|
|
100
|
+
}, [
|
|
101
|
+
running,
|
|
102
|
+
autoOpened,
|
|
103
|
+
setOpenIds
|
|
104
|
+
]);
|
|
100
105
|
const setupStates = items.filter((i) => i.kind === "setup").map((i) => `${i.id}|${i.state}`).join(",");
|
|
101
106
|
useEffect(() => {
|
|
102
107
|
for (const entry of setupStates ? setupStates.split(",") : []) {
|
|
@@ -110,13 +115,17 @@ const ExchangeFoldRow = memo(({ row, renderRows, status: runStatus, showAttachme
|
|
|
110
115
|
return next;
|
|
111
116
|
});
|
|
112
117
|
}
|
|
113
|
-
}, [
|
|
118
|
+
}, [
|
|
119
|
+
setupStates,
|
|
120
|
+
setupOpened,
|
|
121
|
+
setOpenIds
|
|
122
|
+
]);
|
|
114
123
|
const toggleAction = useCallback((id) => setOpenIds((prev) => {
|
|
115
124
|
const next = new Set(prev);
|
|
116
125
|
if (next.has(id)) next.delete(id);
|
|
117
126
|
else next.add(id);
|
|
118
127
|
return next;
|
|
119
|
-
}), []);
|
|
128
|
+
}), [setOpenIds]);
|
|
120
129
|
const shown = useMemo(() => {
|
|
121
130
|
if (open) return items;
|
|
122
131
|
const inStack = new Set(cadenced.map((i) => i.id));
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
* slots (`TranscriptRenderersProvider`) and actions (`TranscriptActionsProvider`).
|
|
4
4
|
* `Transcript` / `HostTranscript` themselves are in `zidane-ui/chat`.
|
|
5
5
|
*/
|
|
6
|
-
import { TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, useModelName, useTranscriptActions } from "./actions.js";
|
|
7
|
-
import { TranscriptRenderersProvider, TranscriptRenderersProviderProps } from "./renderer-slots.js";
|
|
6
|
+
import { TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, attachmentSrcOf, toolMediaSrcOf, useModelName, useTranscriptActions } from "./actions.js";
|
|
8
7
|
import { AnsiSpans, AnsiSpansProps, AnsiText, AnsiTextProps } from "./AnsiText.js";
|
|
9
|
-
import {
|
|
8
|
+
import { TranscriptRenderersProvider, TranscriptRenderersProviderProps } from "./renderer-slots.js";
|
|
10
9
|
import { AuthFailureCard, AuthFailureCardProps } from "./AuthFailureCard.js";
|
|
10
|
+
import { ToolMediaItem, parseToolMedia } from "../headless/transcript/tool-media.js";
|
|
11
11
|
import { BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, OpenBadgeMenu, useBadgeMenu } from "./BadgeMenu.js";
|
|
12
12
|
import { BADGE_GLYPH, FileBadgeIcon, FileBadgeIconProps, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, fileBadgeName, fileBadgeSpec, linkGlyph, siteIconValue } from "./badges.js";
|
|
13
13
|
import { CardMarkdown, CardMarkdownProps } from "./CardMarkdown.js";
|
|
14
|
-
import { useCommand, useCommitInfo, useReferencedSession, useSkill } from "./chip-details.js";
|
|
14
|
+
import { useCommand, useCommitInfo, useReferencedSession, useSkill, useTokenSession } from "./chip-details.js";
|
|
15
15
|
import { useChipResolution, useResolveChipNow } from "./chip-resolve.js";
|
|
16
16
|
import { CHIP_CARD_WIDTH, ChipCard, ChipCardProps, ChipHover, ChipHoverProps } from "./ChipCard.js";
|
|
17
17
|
import { CommandCard, CommandCardProps, CommitCard, CommitCardProps, SessionCard, SessionCardProps, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps } from "./ChipCards.js";
|
|
@@ -27,7 +27,7 @@ import { Caret, CaretProps, Dot, DotProps, FailedMark, FailedMarkProps, GUTTER_S
|
|
|
27
27
|
import { ImageGenerationBlock, ImageGenerationBlockProps, drawsImageGeneration, imageRequestsOf, savedPaths } from "./ImageGenerationBlock.js";
|
|
28
28
|
import { InlineChipText, InlineChipTextProps } from "./InlineChipText.js";
|
|
29
29
|
import { InteractionTool, InteractionToolBody, InteractionToolBodyProps, hasInteractionBody } from "./InteractionToolBody.js";
|
|
30
|
-
import { CvRow, CvRowProps, LazyRow, LazyRowProps, TranscriptSettling, holdForceMountRows,
|
|
30
|
+
import { CvRow, CvRowProps, ForcedRows, LazyRow, LazyRowProps, TranscriptSettling, holdForceMountRows, useBackgroundMount, useForceMountRows, useForcedRows } from "./LazyRow.js";
|
|
31
31
|
import { LiveOutput, LiveOutputProps } from "./LiveOutput.js";
|
|
32
32
|
import { Markdown, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps } from "./markdown.js";
|
|
33
33
|
import { ChipOpener, CommandScope, CommandScopeContext, INLINE_CODE_CLASS, MarkdownContext, MarkdownContextValue, OpenSessionContext } from "./markdown-context.js";
|
|
@@ -44,27 +44,28 @@ import { ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps }
|
|
|
44
44
|
import { ParsedReferenceUrl, parseReferenceUrl, referenceUrl, remarkReferences } from "./remark-references.js";
|
|
45
45
|
import { ParsedRef, RefMatch, classifyInlineRef, findRefs, numberRef, parseRefUrl, refHref, remarkRefs } from "./remark-refs.js";
|
|
46
46
|
import { AttachmentLabelParts, CodeBlockSlotProps, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, InlineTextSlotProps, MarkdownSlotProps, PromptSlotProps, SessionTitleSlotProps, TextPreviewSlotProps, ToolBodySlotProps, TranscriptRenderers, defaultAttachmentLabel, useTranscriptRenderers } from "./renderers.js";
|
|
47
|
+
import { revealRow } from "./row-mount.js";
|
|
47
48
|
import { CompactSummaryRow, CompactSummaryRowProps, RunReceiptInline, RunReceiptInlineProps, RunSummaryRow, RunSummaryRowProps } from "./run-rows.js";
|
|
48
49
|
import { SelectCursor, SelectCursorProps } from "./SelectCursor.js";
|
|
49
50
|
import { SelectTurnExit, SelectTurnHintKeys, SelectTurnHintKeysProps } from "./SelectTurnHint.js";
|
|
50
51
|
import { SelectTurnCommands, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, useSelectTurn } from "./SelectTurnProvider.js";
|
|
51
52
|
import { RunnableCodeBlock, ShellBlockProvider, ShellBlockProviderProps } from "./shell-block.js";
|
|
52
|
-
import { RunnableCodeBlockProps, ShellBlockScope, useShellBlockScope } from "./shell-block-scope.js";
|
|
53
53
|
import { useSiteIcon } from "./site-icons.js";
|
|
54
|
+
import { RunnableCodeBlockProps, ShellBlockScope, useShellBlockScope } from "./shell-block-scope.js";
|
|
54
55
|
import { SubagentBlock, SubagentBlockProps } from "./SubagentBlock.js";
|
|
55
56
|
import { TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps } from "./tasks.js";
|
|
56
57
|
import { ToolBatchRow, ToolBatchRowProps } from "./tool-batch.js";
|
|
57
58
|
import { ToolDetails, ToolDetailsProps } from "./tool-details.js";
|
|
58
59
|
import { ToolMedia, ToolMediaProps, useToolMedia } from "./tool-media.js";
|
|
59
|
-
import { CODE_PANEL, LoadFullOutputButton, LoadFullOutputButtonProps, ReadFileBlock, ReadFileBlockProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolTiming, ToolTimingProps, useFullOutput } from "./tool-parts.js";
|
|
60
|
+
import { CODE_PANEL, LoadFullOutputButton, LoadFullOutputButtonProps, ReadFileBlock, ReadFileBlockProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolTiming, ToolTimingProps, useFullOutput, useFullToolCall } from "./tool-parts.js";
|
|
60
61
|
import { ModelVerdict, ModelVerdictProps, NestedToolCalls, NestedToolCallsProps, ToolRow, ToolRowProps } from "./tool-row.js";
|
|
61
|
-
import { TranscriptRail, TranscriptRailProps, TranscriptRailProvider, TranscriptRailProviderProps, useTranscriptRailStore } from "./TranscriptRail.js";
|
|
62
|
+
import { TranscriptRail, TranscriptRailProps, TranscriptRailProvider, TranscriptRailProviderProps, useRailOutline, useTranscriptRailStore } from "./TranscriptRail.js";
|
|
62
63
|
import { RowContext, SlotEntry, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptTurnMenu, TurnMenuTarget, isHiddenRow } from "./TranscriptRow.js";
|
|
63
64
|
import { TranscriptSearch, TranscriptSearchProps } from "./TranscriptSearch.js";
|
|
64
65
|
import { TurnCommands, TurnCommandsOptions, createTurnCommands, turnViewsOf, useTurnCommands } from "./turn-commands.js";
|
|
65
66
|
import { TurnMenuActions, useTurnMenu } from "./TurnMenu.js";
|
|
66
67
|
import { HostTurnMenuOptions, useHostTurnMenu } from "./use-host-turn-menu.js";
|
|
67
|
-
import { TranscriptRows, TranscriptRowsInput, useSelectStops, useTranscriptRows } from "./use-transcript-rows.js";
|
|
68
|
+
import { TranscriptRows, TranscriptRowsInput, TranscriptSource, useSelectStops, useTranscriptRows } from "./use-transcript-rows.js";
|
|
68
69
|
import { ComposerSearch, useComposerSearch } from "./useComposerSearch.js";
|
|
69
70
|
import { UserBashRow, UserBashRowProps } from "./user-bash.js";
|
|
70
71
|
import { SelectTurnKeysOptions, useSelectTurnKeys } from "./useSelectTurnKeys.js";
|
|
@@ -77,4 +78,4 @@ import { MAX_MATCHES, SearchHighlightStyle, TranscriptSearchOptions, TranscriptS
|
|
|
77
78
|
import { useTranscriptSelectionCopy } from "./useTranscriptSelectionCopy.js";
|
|
78
79
|
import { useWheelHoverPause } from "./useWheelHoverPause.js";
|
|
79
80
|
import { MarkdownViews, MarkdownViewsProps } from "./view-scope.js";
|
|
80
|
-
export { AUTO_FILL_PAGES, AnsiSpans, type AnsiSpansProps, AnsiText, type AnsiTextProps, AttachmentIcon, AttachmentIconProps, AttachmentLabelParts, AuthFailureCard, AuthFailureCardProps, BADGE_GLYPH, BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, CardMarkdownProps, Caret, CaretProps, ChipCard, ChipCardProps, ChipHover, ChipHoverProps, ChipOpener, CodeBlockSlotProps, CodemodeScript, type CodemodeScriptProps, CommandCard, CommandCardProps, CommandDetailRow, CommandDetailRowProps, CommandNoteRow, CommandNoteRowProps, CommandScope, CommandScopeContext, CommitCard, CommitCardProps, CompactSummaryRow, CompactSummaryRowProps, ComposerSearch, CvRow, CvRowProps, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, DiffLines, DiffLinesProps, Dot, DotProps, EditDiffBlock, EditDiffBlockProps, EnvironmentSetupDetails, EnvironmentSetupDetailsProps, EnvironmentSetupRow, EnvironmentSetupRowProps, ErrorRow, ErrorRowProps, ExchangeFoldRow, ExchangeFoldRowProps, FILL_MIN_PROMPTS, FailedMark, FailedMarkProps, FailureRow, FailureRowProps, FileBadgeIcon, FileBadgeIconProps, FoldHeader, FoldHeaderProps, GUTTER_STEP_PX, HostTurnMenuOptions, INLINE_CODE_CLASS, ImageGenerationBlock, ImageGenerationBlockProps, InfoRow, InfoRowProps, InlineChipText, InlineChipTextProps, InlineCode, InlineCodeProps, InlineTextSlotProps, InteractionTool, InteractionToolBody, InteractionToolBodyProps, LazyRow, LazyRowProps, LineState, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, LiveOutput, type LiveOutputProps, LiveScriptsContext, LoadEarlierRow, LoadEarlierRowProps, LoadFullOutputButton, LoadFullOutputButtonProps, MAX_MATCHES, Markdown, MarkdownContext, MarkdownContextValue, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps, MarkdownSlotProps, MarkdownViews, type MarkdownViewsProps, MermaidDiagram, type MermaidDiagramProps, MessageGroupRow, MessageGroupRowProps, ModelVerdict, ModelVerdictProps, NestedToolCalls, NestedToolCallsProps, NoticeRow, NoticeRowProps, OpenBadgeMenu, OpenSessionContext, ParsedRef, ParsedReferenceUrl, PromptEcho, PromptEchoProps, PromptLines, PromptLinesProps, PromptSlotProps, ProseMarkdown, ProseMarkdownProps, ReadFileBlock, ReadFileBlockProps, RefChip, RefChipProps, RefMatch, ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps, RepairedRow, RepairedRowProps, RowContext, RowFrame, RowFrameProps, RowIconsContext, RowPlace, RunReceiptInline, RunReceiptInlineProps, RunSummaryRow, RunSummaryRowProps, RunnableCodeBlock, type RunnableCodeBlockProps, ScrollPosition, SearchHighlightStyle, SelectCursor, SelectCursorProps, SelectTurnCommands, SelectTurnExit, SelectTurnHintKeys, SelectTurnHintKeysProps, SelectTurnKeysOptions, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, SessionCard, SessionCardProps, SessionEventRow, SessionEventRowProps, SessionTitleSlotProps, ShellBlockProvider, type ShellBlockProviderProps, type ShellBlockScope, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps, SlotEntry, SpawnEndRow, SpawnEndRowProps, SpawnStartRow, SpawnStartRowProps, StickToBottomOptions, SubagentBlock, SubagentBlockProps, TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps, TextPreviewSlotProps, TextRow, TextRowProps, ThinkingBatchRow, ThinkingBatchRowProps, ThinkingRow, ThinkingRowProps, ToolBatchRow, ToolBatchRowProps, ToolBodySlotProps, ToolDetails, ToolDetailsProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolMedia, type ToolMediaItem, ToolMediaProps, ToolRow, ToolRowProps, ToolTiming, ToolTimingProps, TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, TranscriptFind, TranscriptFindKeyOptions, TranscriptFindOptions, TranscriptFindTarget, TranscriptRail, type TranscriptRailProps, TranscriptRailProvider, type TranscriptRailProviderProps, TranscriptRenderers, TranscriptRenderersProvider, type TranscriptRenderersProviderProps, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptRows, TranscriptRowsInput, TranscriptScrollInputs, TranscriptSearch, TranscriptSearchOptions, TranscriptSearchProps, TranscriptSearchState, TranscriptSettling, TranscriptTurnMenu, TurnCommands, TurnCommandsOptions, TurnMenuActions, TurnMenuTarget, UserBashRow, UserBashRowProps, UserPromptAttachments, UserPromptAttachmentsProps, UserPromptRow, UserPromptRowProps, WorkerDetails, WorkerDetailsProps, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph,
|
|
81
|
+
export { AUTO_FILL_PAGES, AnsiSpans, type AnsiSpansProps, AnsiText, type AnsiTextProps, AttachmentIcon, AttachmentIconProps, AttachmentLabelParts, AuthFailureCard, AuthFailureCardProps, BADGE_GLYPH, BadgeEffectContext, BadgeMenuBrowser, BadgeMenuComposer, BadgeMenuProvider, BadgeMenuProviderProps, BadgeMenuSystem, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, CardMarkdownProps, Caret, CaretProps, ChipCard, ChipCardProps, ChipHover, ChipHoverProps, ChipOpener, CodeBlockSlotProps, CodemodeScript, type CodemodeScriptProps, CommandCard, CommandCardProps, CommandDetailRow, CommandDetailRowProps, CommandNoteRow, CommandNoteRowProps, CommandScope, CommandScopeContext, CommitCard, CommitCardProps, CompactSummaryRow, CompactSummaryRowProps, ComposerSearch, CvRow, CvRowProps, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultInlineTextProps, DefaultMarkdown, DefaultMarkdownProps, DefaultPrompt, DefaultPromptProps, DefaultSessionTitle, DefaultSessionTitleProps, DiffLines, DiffLinesProps, Dot, DotProps, EditDiffBlock, EditDiffBlockProps, EnvironmentSetupDetails, EnvironmentSetupDetailsProps, EnvironmentSetupRow, EnvironmentSetupRowProps, ErrorRow, ErrorRowProps, ExchangeFoldRow, ExchangeFoldRowProps, FILL_MIN_PROMPTS, FailedMark, FailedMarkProps, FailureRow, FailureRowProps, FileBadgeIcon, FileBadgeIconProps, FoldHeader, FoldHeaderProps, ForcedRows, GUTTER_STEP_PX, HostTurnMenuOptions, INLINE_CODE_CLASS, ImageGenerationBlock, ImageGenerationBlockProps, InfoRow, InfoRowProps, InlineChipText, InlineChipTextProps, InlineCode, InlineCodeProps, InlineTextSlotProps, InteractionTool, InteractionToolBody, InteractionToolBodyProps, LazyRow, LazyRowProps, LineState, LinkBadge, LinkBadgeProps, LinkIcon, LinkIconProps, LiveOutput, type LiveOutputProps, LiveScriptsContext, LoadEarlierRow, LoadEarlierRowProps, LoadFullOutputButton, LoadFullOutputButtonProps, MAX_MATCHES, Markdown, MarkdownContext, MarkdownContextValue, MarkdownDiagrams, MarkdownDiagramsProps, MarkdownImageProps, MarkdownLinkProps, MarkdownProps, MarkdownSlotProps, MarkdownViews, type MarkdownViewsProps, MermaidDiagram, type MermaidDiagramProps, MessageGroupRow, MessageGroupRowProps, ModelVerdict, ModelVerdictProps, NestedToolCalls, NestedToolCallsProps, NoticeRow, NoticeRowProps, OpenBadgeMenu, OpenSessionContext, ParsedRef, ParsedReferenceUrl, PromptEcho, PromptEchoProps, PromptLines, PromptLinesProps, PromptSlotProps, ProseMarkdown, ProseMarkdownProps, ReadFileBlock, ReadFileBlockProps, RefChip, RefChipProps, RefMatch, ReferenceChip, ReferenceChipProps, ReferenceText, ReferenceTextProps, RepairedRow, RepairedRowProps, RowContext, RowFrame, RowFrameProps, RowIconsContext, RowPlace, RunReceiptInline, RunReceiptInlineProps, RunSummaryRow, RunSummaryRowProps, RunnableCodeBlock, type RunnableCodeBlockProps, ScrollPosition, SearchHighlightStyle, SelectCursor, SelectCursorProps, SelectTurnCommands, SelectTurnExit, SelectTurnHintKeys, SelectTurnHintKeysProps, SelectTurnKeysOptions, SelectTurnProvider, SelectTurnProviderProps, SelectTurnState, SelectTurnValue, SessionCard, SessionCardProps, SessionEventRow, SessionEventRowProps, SessionTitleSlotProps, ShellBlockProvider, type ShellBlockProviderProps, type ShellBlockScope, SkillCard, SkillCardProps, SkillGroupCard, SkillGroupCardProps, SlotEntry, SpawnEndRow, SpawnEndRowProps, SpawnStartRow, SpawnStartRowProps, StickToBottomOptions, SubagentBlock, SubagentBlockProps, TaskBatchRow, TaskBatchRowProps, TaskRow, TaskRowProps, TextPreviewSlotProps, TextRow, TextRowProps, ThinkingBatchRow, ThinkingBatchRowProps, ThinkingRow, ThinkingRowProps, ToolBatchRow, ToolBatchRowProps, ToolBodySlotProps, ToolDetails, ToolDetailsProps, ToolGlyph, ToolGlyphProps, ToolInput, ToolInputProps, ToolMedia, type ToolMediaItem, ToolMediaProps, ToolRow, ToolRowProps, ToolTiming, ToolTimingProps, TranscriptAccounts, TranscriptActions, TranscriptActionsProvider, TranscriptActionsProviderProps, TranscriptFind, TranscriptFindKeyOptions, TranscriptFindOptions, TranscriptFindTarget, TranscriptRail, type TranscriptRailProps, TranscriptRailProvider, type TranscriptRailProviderProps, TranscriptRenderers, TranscriptRenderersProvider, type TranscriptRenderersProviderProps, TranscriptRow, TranscriptRowProps, TranscriptRowSlot, TranscriptRowSlotProps, TranscriptRows, TranscriptRowsInput, TranscriptScrollInputs, TranscriptSearch, TranscriptSearchOptions, TranscriptSearchProps, TranscriptSearchState, TranscriptSettling, TranscriptSource, TranscriptTurnMenu, TurnCommands, TurnCommandsOptions, TurnMenuActions, TurnMenuTarget, UserBashRow, UserBashRowProps, UserPromptAttachments, UserPromptAttachmentsProps, UserPromptRow, UserPromptRowProps, WorkerDetails, WorkerDetailsProps, attachmentSrcOf, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, revealRow, savedPaths, siteIconValue, toolMediaSrcOf, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHostTurnMenu, useModelName, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TranscriptActionsProvider, useModelName, useTranscriptActions } from "./actions.js";
|
|
1
|
+
import { TranscriptActionsProvider, attachmentSrcOf, toolMediaSrcOf, useModelName, useTranscriptActions } from "./actions.js";
|
|
2
2
|
import { AnsiSpans, AnsiText } from "./AnsiText.js";
|
|
3
3
|
import { AuthFailureCard } from "./AuthFailureCard.js";
|
|
4
4
|
import { BadgeMenuProvider, useBadgeMenu } from "./BadgeMenu.js";
|
|
5
5
|
import { BADGE_GLYPH, FileBadgeIcon, LinkBadge, LinkIcon, fileBadgeName, fileBadgeSpec, linkGlyph, siteIconValue } from "./badges.js";
|
|
6
6
|
import { CardMarkdown } from "./CardMarkdown.js";
|
|
7
|
-
import { useCommand, useCommitInfo, useReferencedSession, useSkill } from "./chip-details.js";
|
|
7
|
+
import { useCommand, useCommitInfo, useReferencedSession, useSkill, useTokenSession } from "./chip-details.js";
|
|
8
8
|
import { useChipResolution, useResolveChipNow } from "./chip-resolve.js";
|
|
9
9
|
import { CHIP_CARD_WIDTH, ChipCard, ChipHover } from "./ChipCard.js";
|
|
10
10
|
import { CommandCard, CommitCard, SessionCard, SkillCard, SkillGroupCard } from "./ChipCards.js";
|
|
@@ -13,22 +13,22 @@ import { DiffLines } from "./DiffLines.js";
|
|
|
13
13
|
import { AUTO_FILL_PAGES, FILL_MIN_PROMPTS, LoadEarlierRow, useFillViewportScrollback } from "./EarlierHistory.js";
|
|
14
14
|
import { EditDiffBlock } from "./EditDiffBlock.js";
|
|
15
15
|
import { EnvironmentSetupDetails, EnvironmentSetupRow } from "./environment-setup.js";
|
|
16
|
-
import { useShellBlockScope } from "./shell-block-scope.js";
|
|
17
16
|
import { InlineCode, RefChip } from "./FileChip.js";
|
|
17
|
+
import { useShellBlockScope } from "./shell-block-scope.js";
|
|
18
18
|
import { ExchangeFoldRow, FoldHeader, LiveScriptsContext } from "./fold.js";
|
|
19
|
-
import { parseToolMedia } from "../headless/transcript/tool-media.js";
|
|
20
19
|
import { WorkerDetails } from "./fold-worker.js";
|
|
20
|
+
import { parseToolMedia } from "../headless/transcript/tool-media.js";
|
|
21
21
|
import { Caret, Dot, FailedMark, GUTTER_STEP_PX, RowFrame, RowIconsContext, lineStateOf, useRowIcons } from "./frame.js";
|
|
22
22
|
import { ImageGenerationBlock, drawsImageGeneration, imageRequestsOf, savedPaths } from "./ImageGenerationBlock.js";
|
|
23
23
|
import { InlineChipText } from "./InlineChipText.js";
|
|
24
24
|
import { InteractionToolBody, hasInteractionBody } from "./InteractionToolBody.js";
|
|
25
|
-
import { CvRow, LazyRow, TranscriptSettling, holdForceMountRows,
|
|
25
|
+
import { CvRow, LazyRow, TranscriptSettling, holdForceMountRows, useBackgroundMount, useForceMountRows, useForcedRows } from "./LazyRow.js";
|
|
26
26
|
import { LiveOutput } from "./LiveOutput.js";
|
|
27
27
|
import { Markdown, MarkdownDiagrams } from "./markdown.js";
|
|
28
28
|
import { CommandScopeContext, INLINE_CODE_CLASS, MarkdownContext, OpenSessionContext } from "./markdown-context.js";
|
|
29
29
|
import { MermaidDiagram } from "./MermaidDiagram.js";
|
|
30
|
-
import { TranscriptRenderersProvider } from "./renderer-slots.js";
|
|
31
30
|
import { MessageGroupRow } from "./messages.js";
|
|
31
|
+
import { TranscriptRenderersProvider } from "./renderer-slots.js";
|
|
32
32
|
import { COMMAND_DETAIL_LINE, CommandDetailRow, CommandNoteRow, ErrorRow, FailureRow, InfoRow, NoticeRow, RepairedRow, SessionEventRow, SpawnEndRow, SpawnStartRow } from "./notices.js";
|
|
33
33
|
import { AttachmentIcon, UserPromptAttachments, UserPromptRow } from "./prompt.js";
|
|
34
34
|
import { PromptLines, copyPromptLines } from "./prompt-lines.js";
|
|
@@ -40,6 +40,7 @@ import { ReferenceChip, ReferenceText } from "./ReferenceText.js";
|
|
|
40
40
|
import { parseReferenceUrl, referenceUrl, remarkReferences } from "./remark-references.js";
|
|
41
41
|
import { classifyInlineRef, findRefs, numberRef, parseRefUrl, refHref, remarkRefs } from "./remark-refs.js";
|
|
42
42
|
import { DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultMarkdown, DefaultPrompt, DefaultSessionTitle, defaultAttachmentLabel, useTranscriptRenderers } from "./renderers.js";
|
|
43
|
+
import { revealRow } from "./row-mount.js";
|
|
43
44
|
import { CompactSummaryRow, RunReceiptInline, RunSummaryRow } from "./run-rows.js";
|
|
44
45
|
import { SelectCursor } from "./SelectCursor.js";
|
|
45
46
|
import { SelectTurnExit, SelectTurnHintKeys } from "./SelectTurnHint.js";
|
|
@@ -51,9 +52,9 @@ import { TaskBatchRow, TaskRow } from "./tasks.js";
|
|
|
51
52
|
import { ToolBatchRow } from "./tool-batch.js";
|
|
52
53
|
import { ToolDetails } from "./tool-details.js";
|
|
53
54
|
import { ToolMedia, useToolMedia } from "./tool-media.js";
|
|
54
|
-
import { CODE_PANEL, LoadFullOutputButton, ReadFileBlock, ToolGlyph, ToolInput, ToolTiming, useFullOutput } from "./tool-parts.js";
|
|
55
|
+
import { CODE_PANEL, LoadFullOutputButton, ReadFileBlock, ToolGlyph, ToolInput, ToolTiming, useFullOutput, useFullToolCall } from "./tool-parts.js";
|
|
55
56
|
import { ModelVerdict, NestedToolCalls, ToolRow } from "./tool-row.js";
|
|
56
|
-
import { TranscriptRail, TranscriptRailProvider, useTranscriptRailStore } from "./TranscriptRail.js";
|
|
57
|
+
import { TranscriptRail, TranscriptRailProvider, useRailOutline, useTranscriptRailStore } from "./TranscriptRail.js";
|
|
57
58
|
import { TranscriptRow, TranscriptRowSlot, isHiddenRow } from "./TranscriptRow.js";
|
|
58
59
|
import { TranscriptSearch } from "./TranscriptSearch.js";
|
|
59
60
|
import { createTurnCommands, turnViewsOf, useTurnCommands } from "./turn-commands.js";
|
|
@@ -72,4 +73,4 @@ import { MAX_MATCHES, SearchHighlightStyle, useTranscriptSearch } from "./useTra
|
|
|
72
73
|
import { useTranscriptSelectionCopy } from "./useTranscriptSelectionCopy.js";
|
|
73
74
|
import { useWheelHoverPause } from "./useWheelHoverPause.js";
|
|
74
75
|
import { MarkdownViews } from "./view-scope.js";
|
|
75
|
-
export { AUTO_FILL_PAGES, AnsiSpans, AnsiText, AttachmentIcon, AuthFailureCard, BADGE_GLYPH, BadgeMenuProvider, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, Caret, ChipCard, ChipHover, CodemodeScript, CommandCard, CommandDetailRow, CommandNoteRow, CommandScopeContext, CommitCard, CompactSummaryRow, CvRow, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultMarkdown, DefaultPrompt, DefaultSessionTitle, DiffLines, Dot, EditDiffBlock, EnvironmentSetupDetails, EnvironmentSetupRow, ErrorRow, ExchangeFoldRow, FILL_MIN_PROMPTS, FailedMark, FailureRow, FileBadgeIcon, FoldHeader, GUTTER_STEP_PX, INLINE_CODE_CLASS, ImageGenerationBlock, InfoRow, InlineChipText, InlineCode, InteractionToolBody, LazyRow, LinkBadge, LinkIcon, LiveOutput, LiveScriptsContext, LoadEarlierRow, LoadFullOutputButton, MAX_MATCHES, Markdown, MarkdownContext, MarkdownDiagrams, MarkdownViews, MermaidDiagram, MessageGroupRow, ModelVerdict, NestedToolCalls, NoticeRow, OpenSessionContext, PromptEcho, PromptLines, ProseMarkdown, ReadFileBlock, RefChip, ReferenceChip, ReferenceText, RepairedRow, RowFrame, RowIconsContext, RunReceiptInline, RunSummaryRow, RunnableCodeBlock, SearchHighlightStyle, SelectCursor, SelectTurnExit, SelectTurnHintKeys, SelectTurnProvider, SessionCard, SessionEventRow, ShellBlockProvider, SkillCard, SkillGroupCard, SpawnEndRow, SpawnStartRow, SubagentBlock, TaskBatchRow, TaskRow, TextRow, ThinkingBatchRow, ThinkingRow, ToolBatchRow, ToolDetails, ToolGlyph, ToolInput, ToolMedia, ToolRow, ToolTiming, TranscriptActionsProvider, TranscriptRail, TranscriptRailProvider, TranscriptRenderersProvider, TranscriptRow, TranscriptRowSlot, TranscriptSearch, TranscriptSettling, UserBashRow, UserPromptAttachments, UserPromptRow, WorkerDetails, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph,
|
|
76
|
+
export { AUTO_FILL_PAGES, AnsiSpans, AnsiText, AttachmentIcon, AuthFailureCard, BADGE_GLYPH, BadgeMenuProvider, CHIP_CARD_WIDTH, CODE_PANEL, COMMAND_DETAIL_LINE, CardMarkdown, Caret, ChipCard, ChipHover, CodemodeScript, CommandCard, CommandDetailRow, CommandNoteRow, CommandScopeContext, CommitCard, CompactSummaryRow, CvRow, DEFAULT_TRANSCRIPT_RENDERERS, DefaultInlineText, DefaultMarkdown, DefaultPrompt, DefaultSessionTitle, DiffLines, Dot, EditDiffBlock, EnvironmentSetupDetails, EnvironmentSetupRow, ErrorRow, ExchangeFoldRow, FILL_MIN_PROMPTS, FailedMark, FailureRow, FileBadgeIcon, FoldHeader, GUTTER_STEP_PX, INLINE_CODE_CLASS, ImageGenerationBlock, InfoRow, InlineChipText, InlineCode, InteractionToolBody, LazyRow, LinkBadge, LinkIcon, LiveOutput, LiveScriptsContext, LoadEarlierRow, LoadFullOutputButton, MAX_MATCHES, Markdown, MarkdownContext, MarkdownDiagrams, MarkdownViews, MermaidDiagram, MessageGroupRow, ModelVerdict, NestedToolCalls, NoticeRow, OpenSessionContext, PromptEcho, PromptLines, ProseMarkdown, ReadFileBlock, RefChip, ReferenceChip, ReferenceText, RepairedRow, RowFrame, RowIconsContext, RunReceiptInline, RunSummaryRow, RunnableCodeBlock, SearchHighlightStyle, SelectCursor, SelectTurnExit, SelectTurnHintKeys, SelectTurnProvider, SessionCard, SessionEventRow, ShellBlockProvider, SkillCard, SkillGroupCard, SpawnEndRow, SpawnStartRow, SubagentBlock, TaskBatchRow, TaskRow, TextRow, ThinkingBatchRow, ThinkingRow, ToolBatchRow, ToolDetails, ToolGlyph, ToolInput, ToolMedia, ToolRow, ToolTiming, TranscriptActionsProvider, TranscriptRail, TranscriptRailProvider, TranscriptRenderersProvider, TranscriptRow, TranscriptRowSlot, TranscriptSearch, TranscriptSettling, UserBashRow, UserPromptAttachments, UserPromptRow, WorkerDetails, attachmentSrcOf, classifyInlineRef, copyPromptLines, createTurnCommands, defaultAttachmentLabel, drawsImageGeneration, fileBadgeName, fileBadgeSpec, findRefs, hasInteractionBody, holdForceMountRows, imageRequestsOf, isHiddenRow, lineStateOf, linkGlyph, numberRef, parseRefUrl, parseReferenceUrl, parseToolMedia, refHref, referenceUrl, remarkReferences, remarkRefs, revealRow, savedPaths, siteIconValue, toolMediaSrcOf, turnViewsOf, useBackgroundMount, useBadgeMenu, useChipResolution, useCommand, useCommitInfo, useComposerSearch, useFillViewportScrollback, useForceMountRows, useForcedRows, useFullOutput, useFullToolCall, useHostTurnMenu, useModelName, useRailOutline, useReferenceMatches, useReferenceProviders, useReferenceView, useReferencedSession, useResolveChipNow, useRowIcons, useSelectStops, useSelectTurn, useSelectTurnKeys, useSettledReveal, useShellBlockScope, useSiteIcon, useSkill, useStickToBottom, useTokenSession, useToolMedia, useTranscriptActions, useTranscriptFind, useTranscriptFindKey, useTranscriptRailStore, useTranscriptRenderers, useTranscriptRows, useTranscriptScroll, useTranscriptSearch, useTranscriptSelectionCopy, useTurnCommands, useTurnMenu, useWheelHoverPause };
|
|
@@ -23,7 +23,16 @@ export interface MarkdownParseKey {
|
|
|
23
23
|
urlTransform: object | undefined;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* The parse of
|
|
26
|
+
* The parse of a text that still changes (a streaming reply's open tail): parsed every time, never cached,
|
|
27
|
+
* but held among the last few, so the same text settling ({@link cachedMarkdown}) parses nothing.
|
|
28
|
+
*
|
|
29
|
+
* @param text - The markdown.
|
|
30
|
+
* @param key - What else the parse depends on.
|
|
31
|
+
* @param parse - Builds the elements.
|
|
32
|
+
*/
|
|
33
|
+
export declare function liveMarkdown(text: string, key: MarkdownParseKey, parse: () => ReactElement): ReactElement;
|
|
34
|
+
/**
|
|
35
|
+
* The parse of `text`, from the cache when it holds one, or the live parse it settled from.
|
|
27
36
|
*
|
|
28
37
|
* @param text - The markdown.
|
|
29
38
|
* @param key - What else the parse depends on.
|
|
@@ -31,4 +40,10 @@ export interface MarkdownParseKey {
|
|
|
31
40
|
*/
|
|
32
41
|
export declare function cachedMarkdown(text: string, key: MarkdownParseKey, parse: () => ReactElement): ReactElement;
|
|
33
42
|
/** Empties the cache (tests). */
|
|
34
|
-
export declare function clearMarkdownCache(): void;
|
|
43
|
+
export declare function clearMarkdownCache(): void;
|
|
44
|
+
/** What the cache holds, and how many parses it took in since it was last emptied (tests, benches). */
|
|
45
|
+
export declare function markdownCacheStats(): {
|
|
46
|
+
entries: number;
|
|
47
|
+
chars: number;
|
|
48
|
+
inserts: number;
|
|
49
|
+
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
// src/chat/transcript/markdown-cache.ts
|
|
2
2
|
/** Text held, in characters, before the least recently used parse goes. */
|
|
3
3
|
const MAX_CHARS = 4e5;
|
|
4
|
+
/** Live parses held (`liveMarkdown`): one per reply streaming at once. */
|
|
5
|
+
const LIVE_HELD = 8;
|
|
4
6
|
const entries = /* @__PURE__ */ new Map();
|
|
7
|
+
/** The last live parses, oldest first: a tail that settles as it last streamed enters the cache with its parse. */
|
|
8
|
+
const live = /* @__PURE__ */ new Map();
|
|
5
9
|
let chars = 0;
|
|
10
|
+
let inserts = 0;
|
|
6
11
|
const ids = /* @__PURE__ */ new WeakMap();
|
|
7
12
|
let nextId = 1;
|
|
8
13
|
function idOf(value) {
|
|
@@ -17,8 +22,34 @@ function hash(text) {
|
|
|
17
22
|
for (let i = 0; i < text.length; i++) h = Math.imul(h ^ text.charCodeAt(i), 16777619);
|
|
18
23
|
return h >>> 0;
|
|
19
24
|
}
|
|
25
|
+
function idFor(text, key) {
|
|
26
|
+
return `${key.document ? "d" : "r"}${idOf(key.plugins)}.${idOf(key.urlTransform)}:${text.length}:${hash(text)}`;
|
|
27
|
+
}
|
|
20
28
|
/**
|
|
21
|
-
* The parse of
|
|
29
|
+
* The parse of a text that still changes (a streaming reply's open tail): parsed every time, never cached,
|
|
30
|
+
* but held among the last few, so the same text settling ({@link cachedMarkdown}) parses nothing.
|
|
31
|
+
*
|
|
32
|
+
* @param text - The markdown.
|
|
33
|
+
* @param key - What else the parse depends on.
|
|
34
|
+
* @param parse - Builds the elements.
|
|
35
|
+
*/
|
|
36
|
+
function liveMarkdown(text, key, parse) {
|
|
37
|
+
const element = parse();
|
|
38
|
+
if (text.length > MAX_CHARS) return element;
|
|
39
|
+
const id = idFor(text, key);
|
|
40
|
+
live.delete(id);
|
|
41
|
+
live.set(id, {
|
|
42
|
+
element,
|
|
43
|
+
text
|
|
44
|
+
});
|
|
45
|
+
for (const oldest of live.keys()) {
|
|
46
|
+
if (live.size <= LIVE_HELD) break;
|
|
47
|
+
live.delete(oldest);
|
|
48
|
+
}
|
|
49
|
+
return element;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The parse of `text`, from the cache when it holds one, or the live parse it settled from.
|
|
22
53
|
*
|
|
23
54
|
* @param text - The markdown.
|
|
24
55
|
* @param key - What else the parse depends on.
|
|
@@ -26,7 +57,7 @@ function hash(text) {
|
|
|
26
57
|
*/
|
|
27
58
|
function cachedMarkdown(text, key, parse) {
|
|
28
59
|
if (text.length > MAX_CHARS) return parse();
|
|
29
|
-
const id =
|
|
60
|
+
const id = idFor(text, key);
|
|
30
61
|
const hit = entries.get(id);
|
|
31
62
|
if (hit) {
|
|
32
63
|
entries.delete(id);
|
|
@@ -36,7 +67,10 @@ function cachedMarkdown(text, key, parse) {
|
|
|
36
67
|
}
|
|
37
68
|
chars -= hit.text.length;
|
|
38
69
|
}
|
|
39
|
-
const
|
|
70
|
+
const settled = live.get(id);
|
|
71
|
+
live.delete(id);
|
|
72
|
+
const element = settled?.text === text ? settled.element : parse();
|
|
73
|
+
inserts++;
|
|
40
74
|
entries.set(id, {
|
|
41
75
|
element,
|
|
42
76
|
text
|
|
@@ -52,6 +86,16 @@ function cachedMarkdown(text, key, parse) {
|
|
|
52
86
|
/** Empties the cache (tests). */
|
|
53
87
|
function clearMarkdownCache() {
|
|
54
88
|
entries.clear();
|
|
89
|
+
live.clear();
|
|
55
90
|
chars = 0;
|
|
91
|
+
inserts = 0;
|
|
92
|
+
}
|
|
93
|
+
/** What the cache holds, and how many parses it took in since it was last emptied (tests, benches). */
|
|
94
|
+
function markdownCacheStats() {
|
|
95
|
+
return {
|
|
96
|
+
entries: entries.size,
|
|
97
|
+
chars,
|
|
98
|
+
inserts
|
|
99
|
+
};
|
|
56
100
|
}
|
|
57
|
-
export { cachedMarkdown, clearMarkdownCache };
|
|
101
|
+
export { cachedMarkdown, clearMarkdownCache, liveMarkdown, markdownCacheStats };
|