zidane-ui 9.2.2 → 9.3.1
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/browser-keybindings-host.js +3 -1
- package/dist/adapters/live.d.ts +6 -0
- package/dist/adapters/live.js +16 -8
- package/dist/adapters/server-composer-host.js +22 -9
- package/dist/adapters/server-host.js +143 -18
- package/dist/adapters/server-media.d.ts +9 -1
- package/dist/adapters/server-media.js +14 -1
- package/dist/adapters/server-settings-host.js +30 -3
- package/dist/adapters/server-settings-sections.js +23 -1
- package/dist/adapters/server-sidebar-host.d.ts +3 -1
- package/dist/adapters/server-sidebar-host.js +10 -1
- package/dist/app/ModalProvider.js +1 -1
- package/dist/approvals/ApprovalShell.js +1 -1
- package/dist/chat/DaemonOrb.d.ts +29 -1
- package/dist/chat/DaemonOrb.js +25 -12
- package/dist/chat/HostTranscript.d.ts +0 -12
- package/dist/chat/HostTranscript.js +6 -1
- package/dist/chat/SessionStreamsProvider.d.ts +8 -0
- package/dist/chat/SessionStreamsProvider.js +11 -2
- package/dist/chat/StatusDot.js +8 -2
- package/dist/chat/Transcript.d.ts +20 -11
- package/dist/chat/Transcript.js +335 -162
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/headless/host.d.ts +43 -7
- package/dist/chat/headless/index.d.ts +8 -6
- package/dist/chat/headless/index.js +11 -9
- package/dist/chat/headless/labels.d.ts +30 -0
- package/dist/chat/headless/labels.js +29 -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 +66 -0
- package/dist/chat/headless/markdown-scan.js +124 -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/session-list.d.ts +20 -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 +17 -2
- package/dist/chat/headless/sidebar/directory.js +50 -54
- package/dist/chat/headless/sidebar/environment.d.ts +5 -2
- package/dist/chat/headless/sidebar/environment.js +11 -2
- package/dist/chat/headless/sidebar/host.d.ts +15 -0
- package/dist/chat/headless/sidebar/inbox.d.ts +12 -3
- package/dist/chat/headless/sidebar/inbox.js +18 -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 +38 -2
- package/dist/chat/headless/sidebar/labels.js +16 -0
- 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 +2 -0
- package/dist/chat/headless/streams/actions.js +1 -0
- package/dist/chat/headless/streams/event-bytes.d.ts +6 -0
- package/dist/chat/headless/streams/event-bytes.js +34 -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 +24 -1
- package/dist/chat/headless/streams/store.js +51 -26
- package/dist/chat/headless/streams/transcript-map.d.ts +57 -0
- package/dist/chat/headless/streams/transcript-map.js +88 -0
- package/dist/chat/headless/streams/transcript.d.ts +4 -2
- package/dist/chat/headless/streams/transcript.js +19 -7
- 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 +32 -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-actions.d.ts +8 -3
- package/dist/chat/headless/transcript/fold-actions.js +16 -0
- 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 +4 -2
- package/dist/chat/headless/transcript/fold.js +37 -7
- 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 -1
- package/dist/chat/headless/transcript/index.js +2 -1
- package/dist/chat/headless/transcript/nesting.js +2 -1
- package/dist/chat/headless/transcript/rail.d.ts +142 -0
- package/dist/chat/headless/transcript/rail.js +290 -0
- package/dist/chat/headless/transcript/rows.d.ts +11 -1
- package/dist/chat/headless/transcript/run-failures.d.ts +4 -0
- package/dist/chat/headless/transcript/run-failures.js +31 -2
- 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/headless/transcript-labels.d.ts +1 -0
- package/dist/chat/headless/turn-labels.d.ts +1 -0
- package/dist/chat/headless/turn-labels.js +2 -1
- package/dist/chat/index.d.ts +10 -8
- package/dist/chat/index.js +9 -7
- package/dist/chat/interactions/ElicitationCard.js +1 -1
- package/dist/chat/interactions/InteractionCard.js +1 -1
- package/dist/chat/interactions/PlanCard.js +3 -3
- package/dist/chat/interactions/QuestionField.js +4 -4
- package/dist/chat/interactions/QuestionForm.js +3 -3
- package/dist/chat/interactions/SecretInput.js +1 -1
- package/dist/chat/sidebar/ProjectIcon.d.ts +1 -1
- package/dist/chat/sidebar/ProjectIcon.js +1 -1
- package/dist/chat/sidebar/RowChips.d.ts +3 -2
- package/dist/chat/sidebar/RowChips.js +6 -3
- package/dist/chat/sidebar/SessionSidebar.js +13 -14
- package/dist/chat/sidebar/SidebarFooter.d.ts +8 -5
- package/dist/chat/sidebar/SidebarFooter.js +6 -6
- package/dist/chat/sidebar/SidebarFrame.d.ts +2 -0
- package/dist/chat/sidebar/SidebarFrame.js +5 -2
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +3 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +3 -1
- package/dist/chat/sidebar/SpacesSection.d.ts +20 -1
- package/dist/chat/sidebar/SpacesSection.js +34 -13
- package/dist/chat/sidebar/index.d.ts +2 -2
- package/dist/chat/sidebar/session-menu.d.ts +11 -2
- package/dist/chat/sidebar/session-menu.js +50 -5
- package/dist/chat/sidebar/sidebar-live.js +1 -1
- package/dist/chat/sidebar/useInboxRows.js +43 -2
- package/dist/chat/sidebar/useInboxTriage.js +19 -14
- package/dist/chat/testing/contract.d.ts +5 -3
- package/dist/chat/testing/contract.js +66 -1
- package/dist/chat/testing/fixture-sidebar-host.d.ts +7 -1
- package/dist/chat/testing/fixture-sidebar-host.js +12 -0
- package/dist/chat/testing/sidebar.contract.d.ts +6 -0
- package/dist/chat/testing/sidebar.contract.js +24 -0
- 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/InteractionToolBody.js +1 -1
- package/dist/chat/transcript/LazyRow.d.ts +40 -40
- package/dist/chat/transcript/LazyRow.js +101 -149
- package/dist/chat/transcript/MermaidDiagram.js +2 -1
- package/dist/chat/transcript/SelectCursor.d.ts +11 -1
- package/dist/chat/transcript/SelectCursor.js +10 -5
- package/dist/chat/transcript/SubagentBlock.js +3 -2
- package/dist/chat/transcript/TranscriptRail.d.ts +109 -0
- package/dist/chat/transcript/TranscriptRail.js +579 -0
- package/dist/chat/transcript/TranscriptRow.d.ts +4 -7
- package/dist/chat/transcript/TranscriptRow.js +9 -5
- package/dist/chat/transcript/actions.d.ts +43 -3
- package/dist/chat/transcript/actions.js +27 -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 +3 -2
- package/dist/chat/transcript/fold.js +21 -2
- package/dist/chat/transcript/index.d.ts +11 -9
- package/dist/chat/transcript/index.js +10 -8
- package/dist/chat/transcript/markdown-cache.d.ts +7 -1
- package/dist/chat/transcript/markdown-cache.js +12 -1
- package/dist/chat/transcript/markdown.js +116 -54
- package/dist/chat/transcript/media-gallery.d.ts +3 -2
- package/dist/chat/transcript/media-gallery.js +10 -7
- package/dist/chat/transcript/notices.d.ts +23 -1
- package/dist/chat/transcript/notices.js +110 -28
- package/dist/chat/transcript/prompt.js +6 -4
- package/dist/chat/transcript/prose.js +3 -1
- package/dist/chat/transcript/receipt-parts.d.ts +22 -0
- package/dist/chat/transcript/receipt-parts.js +87 -0
- 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 +165 -0
- package/dist/chat/transcript/row-mount.js +498 -0
- package/dist/chat/transcript/row-parking.d.ts +125 -0
- package/dist/chat/transcript/row-parking.js +135 -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 +6 -78
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/scroll-clamp.js +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 -5
- 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 +24 -7
- package/dist/chat/transcript/use-transcript-rows.js +28 -46
- package/dist/chat/transcript/useSettledReveal.js +15 -3
- package/dist/chat/transcript/useStickToBottom.js +4 -4
- package/dist/chat/transcript/useTranscriptSearch.js +30 -14
- package/dist/chat/transcript/view-scope.d.ts +26 -6
- package/dist/chat/transcript/view-scope.js +106 -20
- package/dist/components/ChoiceCards.js +1 -1
- package/dist/components/ConfirmDialog.js +1 -1
- package/dist/components/CopyValue.d.ts +33 -0
- package/dist/components/CopyValue.js +54 -0
- package/dist/components/Form.js +1 -1
- package/dist/components/HowItWorks.js +1 -1
- package/dist/components/Menu.js +1 -1
- package/dist/components/StepFrame.js +2 -2
- package/dist/components/SwatchPicker.js +1 -1
- package/dist/components/ToggleCard.js +1 -1
- package/dist/components/floating/HoverCard.js +2 -3
- package/dist/components/floating/hover-delay.d.ts +4 -0
- package/dist/components/floating/hover-delay.js +6 -0
- package/dist/core.css +14 -12
- package/dist/dist/{index-Betz0OWq.d.ts → index-C6-t1SS9.d.ts} +21 -2
- package/dist/dist/index-De9AbmxS.d.ts +1 -0
- package/dist/dist/index.d.ts +5 -5
- package/dist/dist/sandbox-CSUihARm.d.ts +2 -0
- package/dist/dist/{timeout-CyU7HLyz.d.ts → timeout-CmTx6V9y.d.ts} +1 -0
- package/dist/extensions/ExtensionDialogHost.js +1 -1
- package/dist/files/TreeColumn.js +3 -1
- package/dist/files/headless/host.d.ts +2 -2
- package/dist/git/ImportRepoDialog.js +1 -1
- package/dist/git/MoveSessionDialog.js +2 -2
- package/dist/git/SandboxManager.d.ts +42 -0
- package/dist/git/SandboxManager.js +297 -0
- package/dist/git/SyncChip.js +1 -1
- package/dist/git/headless/index.d.ts +2 -1
- package/dist/git/headless/index.js +2 -1
- package/dist/git/headless/labels.d.ts +29 -0
- package/dist/git/headless/labels.js +34 -1
- package/dist/git/headless/sandboxes.d.ts +43 -0
- package/dist/git/headless/sandboxes.js +52 -0
- package/dist/git/index.d.ts +2 -1
- package/dist/git/index.js +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/keybindings/headless/catalog.d.ts +1 -1
- package/dist/keybindings/headless/catalog.js +12 -0
- package/dist/machines/HostsSection.d.ts +1 -1
- package/dist/machines/headless/labels.js +2 -2
- package/dist/motion/flip-list.js +3 -10
- package/dist/motion/presence.d.ts +10 -0
- package/dist/motion/presence.js +20 -1
- package/dist/motion/swap.d.ts +8 -2
- package/dist/motion/swap.js +5 -2
- package/dist/onboarding/conversation.js +27 -15
- package/dist/onboarding/demos/how-it-works.js +1 -1
- package/dist/onboarding/skills/parts.js +4 -4
- package/dist/onboarding/sources/SourceBrowser.js +1 -1
- package/dist/onboarding/steps/ReadyStep.js +1 -1
- package/dist/onboarding/steps/connect/KeyForm.js +1 -1
- package/dist/palette/headless/app-sources.js +20 -0
- package/dist/palette/headless/labels.js +2 -0
- package/dist/session/PlanTracker.js +3 -3
- package/dist/session/SecretsPanel.js +1 -1
- package/dist/session/SessionHeader.d.ts +18 -6
- package/dist/session/SessionHeader.js +68 -12
- package/dist/session/SessionPlaceMenu.d.ts +35 -0
- package/dist/session/SessionPlaceMenu.js +299 -0
- package/dist/session/SessionShell.js +1 -1
- package/dist/session/TurnDetailsDialog.js +1 -1
- package/dist/session/headless/index.d.ts +2 -1
- package/dist/session/headless/index.js +2 -1
- package/dist/session/headless/labels.d.ts +73 -0
- package/dist/session/headless/labels.js +73 -0
- package/dist/session/headless/place.d.ts +49 -0
- package/dist/session/headless/place.js +57 -0
- package/dist/session/index.d.ts +2 -1
- package/dist/session/index.js +2 -1
- package/dist/settings/ConversationPresetsCard.js +1 -1
- package/dist/settings/SettingCard.js +2 -2
- package/dist/settings/SettingsRowsPage.js +1 -1
- package/dist/settings/headless/fixture-performance.js +4 -2
- package/dist/settings/headless/fixture-sections.js +7 -0
- package/dist/settings/headless/labels.d.ts +1 -1
- package/dist/settings/headless/labels.js +1 -1
- package/dist/settings/headless/layout.d.ts +4 -4
- package/dist/settings/headless/layout.js +1 -1
- package/dist/settings/headless/performance.d.ts +4 -0
- package/dist/settings/headless/search.d.ts +2 -2
- package/dist/settings/headless/sections-host.d.ts +20 -2
- package/dist/settings/sections/claude-import/ClaudeImportDialog.js +1 -1
- package/dist/settings/sections/enabled-list/EnabledListSection.js +2 -2
- package/dist/settings/sections/environments/EnvironmentsSection.d.ts +9 -3
- package/dist/settings/sections/environments/EnvironmentsSection.js +292 -52
- package/dist/settings/sections/environments/labels.d.ts +15 -0
- package/dist/settings/sections/environments/labels.js +18 -3
- package/dist/settings/sections/extensions/ChangeOriginDialog.js +1 -1
- package/dist/settings/sections/extensions/ExtensionSourceBrowser.js +1 -1
- package/dist/settings/sections/extensions/ExtensionsSection.d.ts +3 -2
- package/dist/settings/sections/extensions/ExtensionsSection.js +9 -3
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +15 -5
- package/dist/settings/sections/keybindings/labels.d.ts +2 -0
- package/dist/settings/sections/keybindings/labels.js +2 -0
- package/dist/settings/sections/keybindings/rows.js +8 -0
- package/dist/settings/sections/models/SpacesDefaultsSection.d.ts +7 -3
- package/dist/settings/sections/models/SpacesDefaultsSection.js +11 -5
- 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/settings/sections/skills/SkillGroups.js +1 -1
- package/dist/settings/server-app.d.ts +4 -2
- package/dist/settings/server-app.js +7 -3
- package/dist/settings/testing/sections.contract.d.ts +7 -1
- package/dist/settings/testing/sections.contract.js +37 -0
- package/dist/styles.css +243 -19
- package/dist/terminal/TerminalDrawer.js +3 -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/SidePanel.js +3 -1
- package/package.json +2 -2
- package/src/styles/base.css +13 -0
- package/src/styles/chat.css +30 -0
- package/src/styles/components.css +0 -10
- package/src/styles/files.css +5 -0
- package/src/styles/sidebar.css +29 -7
- package/src/styles/terminal.css +6 -0
- package/src/styles/tokens.css +5 -0
- package/src/styles/transcript.css +138 -0
- package/src/styles/workspace.css +6 -0
- package/dist/dist/index-QcFzZlao.d.ts +0 -1
- package/dist/dist/sandbox-D0zsW8I1.d.ts +0 -2
- /package/dist/dist/{types-_Dtoq_No.d.ts → execution-failure-SREfl-EZ.d.ts} +0 -0
package/dist/chat/DaemonOrb.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { iconButtonClass } from "../components/IconButton.js";
|
|
2
2
|
import { forwardRef, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
// src/chat/DaemonOrb.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Maps daemon health and activity counts to an {@link OrbState}. A disconnected daemon is `down` and a connecting one is `connecting`; otherwise waiting sessions win over running ones, and no activity is `idle`.
|
|
@@ -16,35 +16,48 @@ function orbState(health, running, attention) {
|
|
|
16
16
|
return running > 0 ? "running" : "idle";
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Renders
|
|
19
|
+
* Renders a status orb in a given state: the daemon's, or another place's (a session's sandbox or server). It
|
|
20
|
+
* ripples once when the state changes or `activity` drops.
|
|
20
21
|
*
|
|
21
|
-
* @param props - The {@link
|
|
22
|
+
* @param props - The {@link StatusOrbProps}.
|
|
22
23
|
*/
|
|
23
|
-
function
|
|
24
|
-
const state = orbState(health, running, attention);
|
|
24
|
+
function StatusOrb({ state, activity = 0, shape = "sphere", size = 10, className, style }) {
|
|
25
25
|
const [ripple, setRipple] = useState(0);
|
|
26
26
|
const last = useRef({
|
|
27
27
|
state,
|
|
28
|
-
|
|
28
|
+
activity
|
|
29
29
|
});
|
|
30
30
|
useEffect(() => {
|
|
31
31
|
const prev = last.current;
|
|
32
32
|
last.current = {
|
|
33
33
|
state,
|
|
34
|
-
|
|
34
|
+
activity
|
|
35
35
|
};
|
|
36
|
-
if (prev.state !== state ||
|
|
37
|
-
}, [state,
|
|
38
|
-
return /* @__PURE__ */
|
|
36
|
+
if (prev.state !== state || activity < prev.activity) setRipple((n) => n + 1);
|
|
37
|
+
}, [state, activity]);
|
|
38
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
39
39
|
className: ["zg-orb", className].filter(Boolean).join(" "),
|
|
40
40
|
"data-state": state,
|
|
41
|
+
"data-shape": shape === "cube" ? "cube" : void 0,
|
|
41
42
|
style: {
|
|
42
43
|
width: size,
|
|
43
44
|
height: size,
|
|
44
45
|
...style
|
|
45
46
|
},
|
|
46
47
|
"aria-hidden": true,
|
|
47
|
-
children: ripple > 0 && /* @__PURE__ */ jsx("span", { className: "zg-orb-ripple" }, ripple)
|
|
48
|
+
children: [shape === "cube" && /* @__PURE__ */ jsx("span", { className: "zg-orb-cube i-ph-cube-fill" }), ripple > 0 && /* @__PURE__ */ jsx("span", { className: "zg-orb-ripple" }, ripple)]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Renders the daemon status orb for the given health and activity counts. It ripples once when the state changes or a run ends.
|
|
53
|
+
*
|
|
54
|
+
* @param props - The {@link DaemonOrbProps}.
|
|
55
|
+
*/
|
|
56
|
+
function DaemonOrb({ health, running = 0, attention = 0, ...rest }) {
|
|
57
|
+
return /* @__PURE__ */ jsx(StatusOrb, {
|
|
58
|
+
state: orbState(health, running, attention),
|
|
59
|
+
activity: running,
|
|
60
|
+
...rest
|
|
48
61
|
});
|
|
49
62
|
}
|
|
50
63
|
/** Renders the daemon orb inside an icon-button-sized `button`. The caller supplies the label (for example `aria-label`) and the click handler. */
|
|
@@ -62,4 +75,4 @@ const DaemonOrbButton = forwardRef(({ health, running, attention, className = ""
|
|
|
62
75
|
});
|
|
63
76
|
});
|
|
64
77
|
DaemonOrbButton.displayName = "DaemonOrbButton";
|
|
65
|
-
export { DaemonOrb, DaemonOrbButton, orbState };
|
|
78
|
+
export { DaemonOrb, DaemonOrbButton, StatusOrb, orbState };
|
|
@@ -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";
|
|
@@ -4,6 +4,7 @@ import { useChatHost } from "./ChatProvider.js";
|
|
|
4
4
|
import { useReadable } from "./headless/store.js";
|
|
5
5
|
import { DEFAULT_TRANSCRIPT_OPTIONS, Transcript } from "./Transcript.js";
|
|
6
6
|
import { TranscriptActionsProvider } from "./transcript/actions.js";
|
|
7
|
+
import { useRailOutline } from "./transcript/TranscriptRail.js";
|
|
7
8
|
import { useChatLabels } from "./useChatLabels.js";
|
|
8
9
|
import { useMemo } from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -23,11 +24,15 @@ function HostTranscript({ sessionId, onOpenSession, onRunInTerminal, onOpenSetti
|
|
|
23
24
|
const labels = useChatLabels();
|
|
24
25
|
const transcript = useMemo(() => host.transcript(sessionId), [host, sessionId]);
|
|
25
26
|
const state = useReadable(transcript);
|
|
27
|
+
useRailOutline(transcript, Boolean(state.hasEarlier));
|
|
26
28
|
const actions = useMemo(() => ({
|
|
27
29
|
sessionId,
|
|
28
30
|
...host.toolOutput ? { toolOutput: (callId) => host.toolOutput(sessionId, callId) } : {},
|
|
31
|
+
...host.toolOutputRange ? { toolOutputRange: (callId, range, turnId) => host.toolOutputRange(sessionId, callId, range, turnId) } : {},
|
|
32
|
+
...host.toolCall ? { toolCall: (callId, turnId) => host.toolCall(sessionId, callId, turnId) } : {},
|
|
29
33
|
...host.cancelTool ? { cancelTool: (callId) => host.cancelTool(sessionId, callId) } : {},
|
|
30
34
|
...host.messageMediaUrl ? { messageMediaUrl: (src) => host.messageMediaUrl(sessionId, src) } : {},
|
|
35
|
+
...host.blobMediaUrl ? { blobMediaUrl: host.blobMediaUrl } : {},
|
|
31
36
|
...onOpenSession ? { openSession: onOpenSession } : {},
|
|
32
37
|
...host.send ? { resume: (prompt) => void host.send({
|
|
33
38
|
sessionId,
|
|
@@ -117,7 +122,7 @@ function HostTranscript({ sessionId, onOpenSession, onRunInTerminal, onOpenSetti
|
|
|
117
122
|
})
|
|
118
123
|
}), /* @__PURE__ */ jsx(Transcript, {
|
|
119
124
|
...props,
|
|
120
|
-
events: state.events,
|
|
125
|
+
events: state.transcript ?? state.events,
|
|
121
126
|
streaming: state.running,
|
|
122
127
|
sessionId
|
|
123
128
|
})]
|
|
@@ -15,6 +15,7 @@ import { SessionStreams } from "./headless/streams/session-streams.js";
|
|
|
15
15
|
import { SessionStreamActions } from "./headless/streams/actions.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 };
|
package/dist/chat/StatusDot.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ZidaneMark } from "../components/ZidaneMark.js";
|
|
2
2
|
import { Presence } from "../motion/swap.js";
|
|
3
3
|
import { useChatLabels } from "./useChatLabels.js";
|
|
4
|
-
import { memo } from "react";
|
|
4
|
+
import { memo, useState } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
// src/chat/StatusDot.tsx
|
|
7
7
|
/**
|
|
@@ -75,9 +75,15 @@ const RIPPLE_STYLE = {
|
|
|
75
75
|
background: "var(--zg-warn-dot)",
|
|
76
76
|
animation: "zg-dot 1.8s ease-in-out infinite"
|
|
77
77
|
};
|
|
78
|
+
/** The completed dot without its pop: drawn so when a row mounts already completed (the pop is for the change). */
|
|
79
|
+
const COMPLETED_STILL = { background: "var(--zg-success-dot)" };
|
|
78
80
|
function StatusDotInner({ state, label, className, style }) {
|
|
79
81
|
const labels = useChatLabels();
|
|
82
|
+
const [stateAtMount] = useState(state);
|
|
83
|
+
const [changed, setChanged] = useState(false);
|
|
84
|
+
if (!changed && state !== stateAtMount) setChanged(true);
|
|
80
85
|
const cfg = STYLES[state];
|
|
86
|
+
const coreStyle = state === "completed" && !changed ? COMPLETED_STILL : cfg.style;
|
|
81
87
|
const name = label ?? labels[cfg.label];
|
|
82
88
|
return /* @__PURE__ */ jsxs("span", {
|
|
83
89
|
role: "img",
|
|
@@ -89,7 +95,7 @@ function StatusDotInner({ state, label, className, style }) {
|
|
|
89
95
|
/* @__PURE__ */ jsx("span", {
|
|
90
96
|
"aria-hidden": true,
|
|
91
97
|
className: `zg-state-tween absolute inset-0 rounded-full${state === "attention" ? " zg-loop" : ""}`,
|
|
92
|
-
style:
|
|
98
|
+
style: coreStyle,
|
|
93
99
|
"data-core": true
|
|
94
100
|
}),
|
|
95
101
|
/* @__PURE__ */ jsx(Presence, {
|
|
@@ -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,26 @@
|
|
|
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 one memoized fiber (`RowRun`), so a stream tick walks the
|
|
24
|
+
* open exchange only.
|
|
20
25
|
*
|
|
21
26
|
* The extensions' `transcript.turn-end` items draw after the turn they name
|
|
22
27
|
* (`turnId`: after the last root row holding it; none holds it, not drawn),
|
|
23
28
|
* the rest once at the end when the run has ended.
|
|
24
29
|
*/
|
|
25
|
-
import { ChatEvent } from "./headless/host.js";
|
|
26
30
|
import { SelectStops } from "./headless/transcript/select-stops.js";
|
|
27
31
|
import "./headless/transcript/index.js";
|
|
28
32
|
import { TranscriptTurnMenu, TurnMenuTarget } from "./transcript/TranscriptRow.js";
|
|
33
|
+
import { TranscriptSource } from "./transcript/use-transcript-rows.js";
|
|
29
34
|
import { CSSProperties, ReactNode } from "react";
|
|
30
35
|
import { RunRetry } from "zidane/chat/pure";
|
|
31
36
|
import { Settings } from "zidane/chat";
|
|
@@ -46,8 +51,12 @@ export interface TranscriptSelection {
|
|
|
46
51
|
}
|
|
47
52
|
/** Props for {@link Transcript}. */
|
|
48
53
|
export interface TranscriptProps {
|
|
49
|
-
/**
|
|
50
|
-
|
|
54
|
+
/**
|
|
55
|
+
* The session's events, oldest first, or its transcript store (`TranscriptEvents`, a session stream store's
|
|
56
|
+
* `getTranscriptSnapshot`). From a store, a streamed delta walks the open exchange only; an array is split into
|
|
57
|
+
* exchanges first (one walk), unless a store made it.
|
|
58
|
+
*/
|
|
59
|
+
events: TranscriptSource;
|
|
51
60
|
/** A run is in flight: the last reply may still be streaming. */
|
|
52
61
|
streaming: boolean;
|
|
53
62
|
/** The session shown; switching it replays the first-paint settle (no enter animations). */
|
|
@@ -79,6 +88,6 @@ export interface TranscriptProps {
|
|
|
79
88
|
/** Rendered after the rows, inside the transcript (a menu the app owns). */
|
|
80
89
|
children?: ReactNode;
|
|
81
90
|
}
|
|
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
|
|
91
|
+
/** 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
92
|
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 };
|
|
93
|
+
export type { TranscriptSource, TranscriptTurnMenu, TurnMenuTarget };
|