zidane-ui 9.4.0 → 9.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/index.d.ts +2 -1
- package/dist/adapters/index.js +2 -1
- package/dist/adapters/live.d.ts +7 -2
- package/dist/adapters/live.js +5 -2
- package/dist/adapters/server-approvals-host.js +3 -1
- package/dist/adapters/server-channels-host.d.ts +32 -0
- package/dist/adapters/server-channels-host.js +49 -0
- package/dist/adapters/server-composer-host.js +13 -0
- package/dist/adapters/server-files-host.js +12 -31
- package/dist/adapters/server-host.js +27 -3
- package/dist/adapters/server-machines-host.d.ts +5 -0
- package/dist/adapters/server-machines-host.js +13 -6
- package/dist/adapters/server-oauth-flow.d.ts +2 -1
- package/dist/adapters/server-projects.d.ts +15 -0
- package/dist/adapters/server-projects.js +225 -0
- package/dist/adapters/server-session-host.d.ts +2 -0
- package/dist/adapters/server-session-host.js +20 -1
- package/dist/app/AppHostProvider.d.ts +1 -1
- package/dist/app/AppHostProvider.js +7 -2
- package/dist/app/ModalProvider.d.ts +6 -2
- package/dist/app/ModalProvider.js +38 -10
- package/dist/app/headless/app-host.d.ts +3 -0
- package/dist/approvals/ApprovalsProvider.d.ts +2 -1
- package/dist/approvals/ApprovalsProvider.js +12 -4
- package/dist/approvals/headless/host.d.ts +13 -2
- package/dist/approvals/headless/index.d.ts +3 -3
- package/dist/approvals/headless/index.js +2 -2
- package/dist/approvals/headless/labels.d.ts +12 -2
- package/dist/approvals/headless/labels.js +19 -1
- package/dist/channels/BindingEditorDialog.d.ts +18 -0
- package/dist/channels/BindingEditorDialog.js +637 -0
- package/dist/channels/ChannelAlertsList.d.ts +25 -0
- package/dist/channels/ChannelAlertsList.js +107 -0
- package/dist/channels/ChannelDefaultsSection.d.ts +20 -0
- package/dist/channels/ChannelDefaultsSection.js +133 -0
- package/dist/channels/ChannelsProvider.d.ts +31 -0
- package/dist/channels/ChannelsProvider.js +29 -0
- package/dist/channels/ChannelsSettingsSection.d.ts +40 -0
- package/dist/channels/ChannelsSettingsSection.js +456 -0
- package/dist/channels/ConnectionSetupDialog.d.ts +16 -0
- package/dist/channels/ConnectionSetupDialog.js +470 -0
- package/dist/channels/HeldRepliesList.d.ts +27 -0
- package/dist/channels/HeldRepliesList.js +173 -0
- package/dist/channels/ProjectChannelsSection.d.ts +55 -0
- package/dist/channels/ProjectChannelsSection.js +433 -0
- package/dist/channels/ReadinessChecklist.d.ts +102 -0
- package/dist/channels/ReadinessChecklist.js +273 -0
- package/dist/channels/TestSessionBanner.d.ts +24 -0
- package/dist/channels/TestSessionBanner.js +44 -0
- package/dist/channels/channels-parts.d.ts +104 -0
- package/dist/channels/channels-parts.js +203 -0
- package/dist/channels/context.d.ts +9 -0
- package/dist/channels/context.js +14 -0
- package/dist/channels/headless/access.d.ts +127 -0
- package/dist/channels/headless/access.js +187 -0
- package/dist/channels/headless/fixture-host.d.ts +83 -0
- package/dist/channels/headless/fixture-host.js +557 -0
- package/dist/channels/headless/host.d.ts +245 -0
- package/dist/channels/headless/host.js +39 -0
- package/dist/channels/headless/index.d.ts +10 -0
- package/dist/channels/headless/index.js +5 -0
- package/dist/channels/headless/labels.d.ts +217 -0
- package/dist/channels/headless/labels.js +260 -0
- package/dist/channels/headless/state.d.ts +22 -0
- package/dist/channels/headless/state.js +303 -0
- package/dist/channels/index.d.ts +21 -0
- package/dist/channels/index.js +13 -0
- package/dist/channels/testing/contract.d.ts +31 -0
- package/dist/channels/testing/contract.js +378 -0
- package/dist/channels/testing/index.d.ts +7 -0
- package/dist/channels/testing/index.js +1 -0
- package/dist/chat/HostBadge.js +1 -0
- package/dist/chat/OrchestratorBadge.d.ts +23 -0
- package/dist/chat/OrchestratorBadge.js +22 -0
- package/dist/chat/SessionGroupHeader.d.ts +11 -1
- package/dist/chat/SessionGroupHeader.js +25 -14
- package/dist/chat/SessionList.d.ts +1 -1
- package/dist/chat/SessionList.js +1 -1
- package/dist/chat/SessionRow.d.ts +141 -0
- package/dist/chat/SessionRow.js +215 -0
- package/dist/chat/StatusDot.d.ts +7 -2
- package/dist/chat/StatusDot.js +3 -2
- package/dist/chat/Transcript.js +6 -2
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/composer/ContextBreakdown.d.ts +27 -2
- package/dist/chat/composer/ContextBreakdown.js +123 -2
- package/dist/chat/composer/DraftPickers.d.ts +8 -2
- package/dist/chat/composer/DraftPickers.js +7 -3
- package/dist/chat/composer/HostContextOrb.d.ts +2 -0
- package/dist/chat/composer/HostContextOrb.js +17 -2
- package/dist/chat/composer/ProjectMenu.d.ts +16 -3
- package/dist/chat/composer/ProjectMenu.js +102 -20
- package/dist/chat/composer/ScopeToggle.d.ts +7 -2
- package/dist/chat/composer/ScopeToggle.js +4 -2
- package/dist/chat/composer/ServerScopeToggle.d.ts +7 -2
- package/dist/chat/composer/ServerScopeToggle.js +3 -1
- package/dist/chat/composer/index.d.ts +2 -2
- package/dist/chat/composer/index.js +2 -2
- package/dist/chat/composer/use-draft-target.d.ts +12 -1
- package/dist/chat/composer/use-draft-target.js +22 -10
- package/dist/chat/composer/use-send-prompt.d.ts +2 -0
- package/dist/chat/composer/use-send-prompt.js +4 -1
- package/dist/chat/headless/answered-first.d.ts +28 -0
- package/dist/chat/headless/answered-first.js +14 -0
- package/dist/chat/headless/chip-labels.d.ts +2 -0
- package/dist/chat/headless/chip-labels.js +2 -0
- package/dist/chat/headless/composer/composer-sources.d.ts +5 -2
- package/dist/chat/headless/composer/composer-sources.js +6 -0
- package/dist/chat/headless/composer/host.d.ts +13 -0
- package/dist/chat/headless/composer/index.d.ts +2 -2
- package/dist/chat/headless/composer/labels-chrome.d.ts +3 -0
- package/dist/chat/headless/composer/labels-chrome.js +4 -1
- package/dist/chat/headless/composer/labels-editor.d.ts +2 -0
- package/dist/chat/headless/composer/labels-editor.js +2 -0
- package/dist/chat/headless/draft-target.d.ts +2 -0
- package/dist/chat/headless/fixtures/demo-transcript-all-kinds.d.ts +6 -0
- package/dist/chat/headless/fixtures/demo-transcript-all-kinds.js +90 -2
- package/dist/chat/headless/folder-groups.d.ts +41 -0
- package/dist/chat/headless/folder-groups.js +76 -0
- package/dist/chat/headless/host.d.ts +16 -1
- package/dist/chat/headless/hosts.d.ts +1 -1
- package/dist/chat/headless/index.d.ts +15 -10
- package/dist/chat/headless/index.js +35 -30
- package/dist/chat/headless/labels.d.ts +43 -4
- package/dist/chat/headless/labels.js +40 -9
- package/dist/chat/headless/prompt-origin.d.ts +2 -2
- package/dist/chat/headless/prompt-origin.js +3 -3
- package/dist/chat/headless/send-flow.d.ts +2 -0
- package/dist/chat/headless/session-list.d.ts +36 -2
- package/dist/chat/headless/session-list.js +7 -0
- package/dist/chat/headless/sidebar/directory.d.ts +5 -0
- package/dist/chat/headless/sidebar/directory.js +2 -0
- package/dist/chat/headless/sidebar/inbox.d.ts +33 -7
- package/dist/chat/headless/sidebar/inbox.js +65 -26
- package/dist/chat/headless/sidebar/index.d.ts +6 -4
- package/dist/chat/headless/sidebar/index.js +5 -3
- package/dist/chat/headless/sidebar/labels.d.ts +36 -7
- package/dist/chat/headless/sidebar/labels.js +1 -4
- package/dist/chat/headless/sidebar/project-main.d.ts +43 -0
- package/dist/chat/headless/sidebar/project-main.js +46 -0
- package/dist/chat/headless/sidebar/row-changes.d.ts +43 -0
- package/dist/chat/headless/sidebar/row-changes.js +43 -0
- package/dist/chat/headless/sidebar/rows.d.ts +64 -6
- package/dist/chat/headless/sidebar/rows.js +98 -18
- package/dist/chat/headless/sidebar/types.d.ts +12 -0
- package/dist/chat/headless/streams/live-events.d.ts +12 -0
- package/dist/chat/headless/streams/live-events.js +21 -2
- package/dist/chat/headless/streams/store.d.ts +17 -0
- package/dist/chat/headless/streams/store.js +38 -15
- package/dist/chat/headless/streams/types.d.ts +2 -1
- package/dist/chat/headless/transcript/collapse.js +3 -1
- package/dist/chat/headless/transcript/derive.d.ts +1 -0
- package/dist/chat/headless/transcript/derive.js +3 -1
- package/dist/chat/headless/transcript/fold.js +1 -0
- package/dist/chat/headless/transcript/index.d.ts +3 -2
- package/dist/chat/headless/transcript/index.js +2 -1
- package/dist/chat/headless/transcript/rail.d.ts +8 -1
- package/dist/chat/headless/transcript/rail.js +10 -2
- package/dist/chat/headless/transcript/rows.d.ts +31 -3
- package/dist/chat/headless/transcript/select-stops.js +1 -0
- package/dist/chat/headless/transcript/session-groups.d.ts +36 -0
- package/dist/chat/headless/transcript/session-groups.js +94 -0
- package/dist/chat/headless/transcript-labels.d.ts +1 -0
- package/dist/chat/index.d.ts +8 -5
- package/dist/chat/index.js +9 -6
- package/dist/chat/interactions/HostInteractions.js +4 -2
- package/dist/chat/interactions/InboxPanel.js +6 -4
- package/dist/chat/interactions/use-answer-interaction.d.ts +11 -0
- package/dist/chat/interactions/use-answer-interaction.js +19 -0
- package/dist/chat/rich-composer/artifact-mentions.d.ts +29 -0
- package/dist/chat/rich-composer/artifact-mentions.js +40 -0
- package/dist/chat/rich-composer/composer-extensions.d.ts +3 -2
- package/dist/chat/rich-composer/composer-extensions.js +12 -9
- package/dist/chat/rich-composer/use-composer-sources.js +1 -0
- package/dist/chat/sidebar/InboxList.d.ts +26 -2
- package/dist/chat/sidebar/InboxList.js +65 -49
- package/dist/chat/sidebar/MainSessionRow.d.ts +2 -1
- package/dist/chat/sidebar/MainSessionRow.js +1 -1
- package/dist/chat/sidebar/ProjectIcon.d.ts +8 -4
- package/dist/chat/sidebar/ProjectIcon.js +15 -3
- package/dist/chat/sidebar/SessionSidebar.d.ts +51 -2
- package/dist/chat/sidebar/SessionSidebar.js +87 -17
- package/dist/chat/sidebar/SidebarFooter.d.ts +2 -23
- package/dist/chat/sidebar/SidebarFooter.js +2 -43
- package/dist/chat/sidebar/SidebarGroupHeader.d.ts +12 -3
- package/dist/chat/sidebar/SidebarGroupHeader.js +36 -15
- package/dist/chat/sidebar/SidebarLiveProvider.d.ts +22 -0
- package/dist/chat/sidebar/SidebarLiveProvider.js +20 -0
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +6 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +16 -7
- package/dist/chat/sidebar/inbox-triage.d.ts +18 -2
- package/dist/chat/sidebar/inbox-triage.js +39 -12
- package/dist/chat/sidebar/index.d.ts +5 -4
- package/dist/chat/sidebar/index.js +3 -2
- package/dist/chat/sidebar/sidebar-live.d.ts +29 -2
- package/dist/chat/sidebar/sidebar-live.js +36 -2
- package/dist/chat/sidebar/useInboxRows.d.ts +4 -1
- package/dist/chat/sidebar/useInboxRows.js +8 -6
- package/dist/chat/sidebar/useInboxTriage.d.ts +8 -2
- package/dist/chat/sidebar/useInboxTriage.js +29 -20
- package/dist/chat/testing/fixture-composer-host.d.ts +3 -1
- package/dist/chat/testing/fixture-composer-host.js +1 -0
- package/dist/chat/testing/index.d.ts +2 -2
- package/dist/chat/testing/index.js +2 -2
- package/dist/chat/transcript/BadgeMenu.d.ts +9 -2
- package/dist/chat/transcript/BadgeMenu.js +20 -2
- package/dist/chat/transcript/PromptEcho.js +15 -2
- package/dist/chat/transcript/PromptOriginLabel.d.ts +1 -1
- package/dist/chat/transcript/SubagentBlock.js +24 -7
- package/dist/chat/transcript/TranscriptRail.d.ts +3 -1
- package/dist/chat/transcript/TranscriptRail.js +15 -5
- package/dist/chat/transcript/TranscriptRow.js +9 -0
- package/dist/chat/transcript/badges.d.ts +1 -0
- package/dist/chat/transcript/badges.js +1 -0
- package/dist/chat/transcript/fold.js +2 -1
- package/dist/chat/transcript/frame.d.ts +7 -0
- package/dist/chat/transcript/frame.js +51 -5
- package/dist/chat/transcript/index.d.ts +5 -4
- package/dist/chat/transcript/index.js +4 -3
- package/dist/chat/transcript/inline-facts.d.ts +9 -0
- package/dist/chat/transcript/inline-facts.js +20 -0
- package/dist/chat/transcript/notices.d.ts +34 -12
- package/dist/chat/transcript/notices.js +213 -97
- package/dist/chat/transcript/prompt.js +8 -1
- package/dist/chat/transcript/receipt-parts.d.ts +29 -2
- package/dist/chat/transcript/receipt-parts.js +40 -7
- package/dist/chat/transcript/row-estimate.js +4 -1
- package/dist/chat/transcript/run-rows.js +2 -5
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/session-groups.d.ts +21 -0
- package/dist/chat/transcript/session-groups.js +154 -0
- package/dist/chat/transcript/session-line.d.ts +63 -0
- package/dist/chat/transcript/session-line.js +114 -0
- package/dist/chat/transcript/tasks.d.ts +1 -1
- package/dist/chat/transcript/tasks.js +1 -1
- package/dist/chat/transcript/tool-row.js +3 -2
- package/dist/code/editor/FileView.js +1 -3
- package/dist/components/Form.d.ts +28 -1
- package/dist/components/Form.js +43 -7
- package/dist/components/HelpTip.d.ts +22 -0
- package/dist/components/HelpTip.js +26 -0
- package/dist/components/Menu.js +1 -1
- package/dist/components/Notice.d.ts +6 -4
- package/dist/components/Notice.js +73 -27
- package/dist/components/Progress.js +10 -4
- package/dist/components/SearchField.d.ts +46 -0
- package/dist/components/SearchField.js +50 -0
- package/dist/components/ShowMore.d.ts +48 -0
- package/dist/components/ShowMore.js +57 -0
- package/dist/components/Tooltip.js +8 -5
- package/dist/components/charts/ScatterChart.js +13 -6
- package/dist/components/floating/FloatingSurface.js +2 -2
- package/dist/components/floating/useAnchoredPosition.d.ts +15 -1
- package/dist/components/floating/useAnchoredPosition.js +41 -7
- package/dist/components/palette/PaletteList.d.ts +5 -5
- package/dist/components/palette/PaletteList.js +2 -3
- package/dist/components/palette/PalettePanel.js +18 -12
- package/dist/components/palette/palette-layout.d.ts +5 -1
- package/dist/components/palette/palette-layout.js +13 -10
- package/dist/core.css +45 -20
- package/dist/dist/index-BmO8bRgK.d.ts +1 -0
- package/dist/dist/{index-BheVJOLc.d.ts → index-DPbpsCtl.d.ts} +248 -118
- package/dist/dist/index.d.ts +5 -5
- package/dist/dist/sandbox-Bzg_jJK2.d.ts +2 -0
- package/dist/dist/{timeout-CmTx6V9y.d.ts → timeout-NoG7ppkm.d.ts} +1 -1
- package/dist/files/FilesProvider.d.ts +2 -0
- package/dist/files/FilesProvider.js +5 -1
- package/dist/files/headless/host.d.ts +6 -2
- package/dist/files/index.d.ts +2 -2
- package/dist/files/index.js +2 -2
- package/dist/git/GitBar.js +8 -2
- package/dist/git/MoveSessionDialog.js +8 -5
- package/dist/git/MoveToDialog.d.ts +3 -1
- package/dist/git/MoveToDialog.js +43 -16
- package/dist/git/TeleportSessionDialog.d.ts +11 -4
- package/dist/git/TeleportSessionDialog.js +263 -107
- package/dist/git/WherePicker.js +4 -1
- package/dist/git/headless/labels.d.ts +8 -0
- package/dist/git/headless/labels.js +24 -16
- package/dist/git/index.d.ts +2 -2
- package/dist/git/index.js +2 -2
- package/dist/git/useEnvironmentChoices.d.ts +19 -0
- package/dist/git/useEnvironmentChoices.js +34 -10
- package/dist/hooks/useLastCount.d.ts +9 -0
- package/dist/hooks/useLastCount.js +29 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +7 -3
- package/dist/keybindings/headless/overrides.d.ts +1 -1
- package/dist/keybindings/headless/overrides.js +14 -3
- package/dist/labels.d.ts +7 -0
- package/dist/labels.js +10 -3
- package/dist/machines/AddMachineDialog.js +1 -1
- package/dist/machines/AddServerForm.d.ts +14 -2
- package/dist/machines/AddServerForm.js +167 -51
- package/dist/machines/HostCapabilities.js +8 -4
- package/dist/machines/HostSignIn.d.ts +2 -1
- package/dist/machines/HostSignIn.js +1 -0
- package/dist/machines/HostSyncPanel.d.ts +4 -1
- package/dist/machines/HostSyncPanel.js +248 -132
- package/dist/machines/HostsSection.d.ts +2 -2
- package/dist/machines/HostsSection.js +91 -52
- package/dist/machines/LinkedAccountsPanel.d.ts +29 -0
- package/dist/machines/LinkedAccountsPanel.js +268 -0
- package/dist/machines/MachinesExplainer.d.ts +4 -4
- package/dist/machines/MachinesExplainer.js +27 -17
- package/dist/machines/OrganizationPanel.d.ts +12 -5
- package/dist/machines/OrganizationPanel.js +420 -133
- package/dist/machines/ProjectsSpendPanel.d.ts +22 -0
- package/dist/machines/ProjectsSpendPanel.js +160 -0
- package/dist/machines/ServerMachinesPanel.js +19 -4
- package/dist/machines/ServerUpdatePanel.js +3 -3
- package/dist/machines/SyncAccounts.d.ts +14 -7
- package/dist/machines/SyncAccounts.js +67 -81
- package/dist/machines/TokensPanel.js +54 -30
- package/dist/machines/headless/fixture-host.d.ts +15 -10
- package/dist/machines/headless/fixture-host.js +75 -44
- package/dist/machines/headless/fixtures.d.ts +12 -0
- package/dist/machines/headless/fixtures.js +71 -1
- package/dist/machines/headless/host.d.ts +13 -9
- package/dist/machines/headless/index.d.ts +3 -3
- package/dist/machines/headless/index.js +2 -2
- package/dist/machines/headless/labels.d.ts +81 -40
- package/dist/machines/headless/labels.js +103 -60
- package/dist/machines/headless/linked-accounts.d.ts +42 -0
- package/dist/machines/headless/linked-accounts.js +31 -0
- package/dist/machines/headless/organization.d.ts +9 -3
- package/dist/machines/headless/organization.js +12 -2
- package/dist/machines/headless/sync.d.ts +2 -0
- package/dist/machines/index.d.ts +3 -2
- package/dist/machines/index.js +3 -2
- package/dist/machines/sync-rows.d.ts +8 -0
- package/dist/machines/sync-rows.js +10 -0
- package/dist/machines/testing/contract.d.ts +1 -25
- package/dist/machines/testing/contract.js +1 -97
- package/dist/machines/testing/index.d.ts +3 -3
- package/dist/machines/testing/index.js +2 -2
- package/dist/onboarding/demos/extensions.d.ts +4 -0
- package/dist/onboarding/demos/extensions.js +27 -1
- package/dist/onboarding/demos/sidebar-layout.d.ts +4 -2
- package/dist/onboarding/demos/sidebar-layout.js +5 -2
- package/dist/onboarding/headless/labels.d.ts +9 -0
- package/dist/onboarding/headless/labels.js +2 -0
- package/dist/onboarding/steps/SidebarStep.js +4 -2
- package/dist/onboarding/steps/setting-cards.d.ts +4 -2
- package/dist/onboarding/steps/setting-cards.js +3 -2
- package/dist/palette/PaletteDialog.js +4 -4
- package/dist/palette/PaletteRows.js +34 -16
- package/dist/palette/headless/app-sources.js +3 -1
- package/dist/palette/headless/labels.js +2 -2
- package/dist/palette/usePaletteController.js +4 -8
- package/dist/session/ArtifactsPanel.js +11 -23
- package/dist/session/NewProjectDialog.d.ts +33 -0
- package/dist/session/NewProjectDialog.js +216 -0
- package/dist/session/OpenProjectsDialog.d.ts +56 -0
- package/dist/session/OpenProjectsDialog.js +324 -0
- package/dist/session/OpenSessionsDialog.js +186 -61
- package/dist/session/ProjectArtifactsHome.d.ts +42 -0
- package/dist/session/ProjectArtifactsHome.js +98 -0
- package/dist/session/ProjectArtifactsSection.d.ts +13 -0
- package/dist/session/ProjectArtifactsSection.js +367 -0
- package/dist/session/ProjectBudgetsSection.d.ts +7 -0
- package/dist/session/ProjectBudgetsSection.js +377 -0
- package/dist/session/ProjectContextSection.d.ts +20 -0
- package/dist/session/ProjectContextSection.js +139 -0
- package/dist/session/ProjectHome.d.ts +32 -5
- package/dist/session/ProjectHome.js +496 -249
- package/dist/session/ProjectInstructionsSection.d.ts +7 -0
- package/dist/session/ProjectInstructionsSection.js +179 -0
- package/dist/session/ProjectMainButton.d.ts +35 -0
- package/dist/session/ProjectMainButton.js +73 -0
- package/dist/session/ProjectName.d.ts +76 -0
- package/dist/session/ProjectName.js +140 -0
- package/dist/session/ProjectOrchestratorSection.d.ts +14 -0
- package/dist/session/ProjectOrchestratorSection.js +117 -0
- package/dist/session/ProjectPublishDialog.d.ts +30 -0
- package/dist/session/ProjectPublishDialog.js +420 -0
- package/dist/session/ProjectSessionAccessSection.d.ts +13 -0
- package/dist/session/ProjectSessionAccessSection.js +109 -0
- package/dist/session/ProjectSessionsList.d.ts +53 -0
- package/dist/session/ProjectSessionsList.js +316 -0
- package/dist/session/ProjectSettingsDialog.d.ts +30 -0
- package/dist/session/ProjectSettingsDialog.js +693 -0
- package/dist/session/ProjectShareDialog.d.ts +36 -0
- package/dist/session/ProjectShareDialog.js +190 -0
- package/dist/session/ProjectSkillsSection.d.ts +7 -0
- package/dist/session/ProjectSkillsSection.js +197 -0
- package/dist/session/ProjectToolsSection.d.ts +16 -0
- package/dist/session/ProjectToolsSection.js +347 -0
- package/dist/session/ProjectUsage.d.ts +61 -0
- package/dist/session/ProjectUsage.js +344 -0
- package/dist/session/ProviderUsageProvider.d.ts +2 -3
- package/dist/session/QueueTab.js +11 -1
- package/dist/session/SessionAccessNotice.d.ts +31 -0
- package/dist/session/SessionAccessNotice.js +69 -0
- package/dist/session/SessionDetailsDialog.d.ts +3 -1
- package/dist/session/SessionDetailsDialog.js +16 -1
- package/dist/session/SessionHeader.d.ts +10 -3
- package/dist/session/SessionHeader.js +20 -8
- package/dist/session/SessionPeopleStack.d.ts +3 -2
- package/dist/session/SessionPeopleStack.js +51 -17
- package/dist/session/SessionPlaceMenu.js +2 -2
- package/dist/session/SessionProvider.d.ts +13 -1
- package/dist/session/SessionProvider.js +21 -1
- package/dist/session/ShareSessionDialog.d.ts +4 -4
- package/dist/session/ShareSessionDialog.js +182 -283
- package/dist/session/TypingLine.d.ts +9 -4
- package/dist/session/TypingLine.js +16 -5
- package/dist/session/{UsagePanel.d.ts → UsageSection.d.ts} +9 -13
- package/dist/session/{UsagePanel.js → UsageSection.js} +40 -41
- package/dist/session/artifact-row-parts.d.ts +32 -0
- package/dist/session/artifact-row-parts.js +51 -0
- package/dist/session/headless/access.d.ts +33 -0
- package/dist/session/headless/access.js +48 -0
- package/dist/session/headless/fixture-host.d.ts +48 -9
- package/dist/session/headless/fixture-host.js +139 -1
- package/dist/session/headless/fixture-project-artifacts.d.ts +77 -0
- package/dist/session/headless/fixture-project-artifacts.js +168 -0
- package/dist/session/headless/fixture-project-content.d.ts +67 -0
- package/dist/session/headless/fixture-project-content.js +176 -0
- package/dist/session/headless/fixture-projects.d.ts +175 -0
- package/dist/session/headless/fixture-projects.js +498 -0
- package/dist/session/headless/home-layout.d.ts +18 -2
- package/dist/session/headless/home-layout.js +20 -7
- package/dist/session/headless/host.d.ts +263 -7
- package/dist/session/headless/index.d.ts +10 -5
- package/dist/session/headless/index.js +8 -3
- package/dist/session/headless/labels.d.ts +381 -6
- package/dist/session/headless/labels.js +72 -24
- package/dist/session/headless/orchestration-labels.d.ts +52 -0
- package/dist/session/headless/orchestration-labels.js +59 -0
- package/dist/session/headless/project-artifact-labels.d.ts +67 -0
- package/dist/session/headless/project-artifact-labels.js +96 -0
- package/dist/session/headless/project-artifacts.d.ts +124 -0
- package/dist/session/headless/project-artifacts.js +271 -0
- package/dist/session/headless/project-content-labels.d.ts +88 -0
- package/dist/session/headless/project-content-labels.js +152 -0
- package/dist/session/headless/project-labels.d.ts +123 -0
- package/dist/session/headless/project-labels.js +128 -0
- package/dist/session/headless/project-sessions.d.ts +37 -0
- package/dist/session/headless/project-sessions.js +57 -0
- package/dist/session/headless/project-usage-labels.d.ts +74 -0
- package/dist/session/headless/project-usage-labels.js +81 -0
- package/dist/session/headless/project-usage.d.ts +65 -0
- package/dist/session/headless/project-usage.js +92 -0
- package/dist/session/headless/projects.d.ts +158 -0
- package/dist/session/headless/projects.js +301 -0
- package/dist/session/headless/pushed-once.d.ts +22 -0
- package/dist/session/headless/pushed-once.js +28 -0
- package/dist/session/headless/queue.js +2 -1
- package/dist/session/headless/typing.d.ts +20 -1
- package/dist/session/headless/typing.js +58 -3
- package/dist/session/home-block-parts.d.ts +40 -0
- package/dist/session/home-block-parts.js +46 -0
- package/dist/session/index.d.ts +17 -4
- package/dist/session/index.js +16 -3
- package/dist/session/modal-shell.d.ts +1 -1
- package/dist/session/modal-shell.js +1 -1
- package/dist/session/project-artifact-parts.d.ts +59 -0
- package/dist/session/project-artifact-parts.js +222 -0
- package/dist/session/project-content-parts.d.ts +176 -0
- package/dist/session/project-content-parts.js +546 -0
- package/dist/session/project-files.d.ts +48 -0
- package/dist/session/project-files.js +54 -0
- package/dist/session/project-folder-actions.d.ts +11 -0
- package/dist/session/project-folder-actions.js +39 -0
- package/dist/session/project-mcp-add.d.ts +23 -0
- package/dist/session/project-mcp-add.js +107 -0
- package/dist/session/project-record-document.d.ts +48 -0
- package/dist/session/project-record-document.js +225 -0
- package/dist/session/project-settings-parts.d.ts +69 -0
- package/dist/session/project-settings-parts.js +90 -0
- package/dist/session/share-people.d.ts +222 -0
- package/dist/session/share-people.js +457 -0
- package/dist/session/testing/contract.d.ts +67 -8
- package/dist/session/testing/contract.js +343 -6
- package/dist/session/testing/index.d.ts +5 -2
- package/dist/session/testing/index.js +4 -1
- package/dist/session/testing/project-artifacts.contract.js +159 -0
- package/dist/session/testing/project-content.contract.d.ts +19 -0
- package/dist/session/testing/project-content.contract.js +221 -0
- package/dist/session/testing/project-sessions.contract.js +134 -0
- package/dist/session/use-folder-missing.d.ts +6 -0
- package/dist/session/use-folder-missing.js +31 -0
- package/dist/session/use-folder-project.d.ts +14 -0
- package/dist/session/use-folder-project.js +37 -0
- package/dist/session/use-home-projects.d.ts +55 -0
- package/dist/session/use-home-projects.js +154 -0
- package/dist/session/use-project-home-layout.d.ts +33 -0
- package/dist/session/use-project-home-layout.js +134 -0
- package/dist/session/use-project-home-on.d.ts +2 -0
- package/dist/session/use-project-home-on.js +14 -0
- package/dist/settings/SettingCard.d.ts +3 -1
- package/dist/settings/SettingCard.js +2 -1
- package/dist/settings/SettingDemo.d.ts +3 -1
- package/dist/settings/SettingDemo.js +4 -3
- package/dist/settings/SettingsShell.d.ts +2 -1
- package/dist/settings/SettingsShell.js +55 -43
- package/dist/settings/headless/index.d.ts +2 -1
- package/dist/settings/headless/index.js +2 -1
- package/dist/settings/headless/mcp-requirement.d.ts +93 -0
- package/dist/settings/headless/mcp-requirement.js +117 -0
- package/dist/settings/headless/mcp.d.ts +2 -0
- package/dist/settings/headless/mcp.js +3 -2
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/index.d.ts +3 -2
- package/dist/settings/index.js +13 -12
- package/dist/settings/section.d.ts +9 -0
- package/dist/settings/section.js +12 -1
- package/dist/settings/sections/editor/labels.js +1 -1
- package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +6 -2
- package/dist/settings/sections/extensions/ExtensionConfigRows.js +10 -1
- package/dist/settings/sections/extensions/ExtensionOptionsSection.js +1 -0
- package/dist/settings/sections/extensions/ExtensionsSection.d.ts +6 -3
- package/dist/settings/sections/extensions/ExtensionsSection.js +24 -3
- package/dist/settings/sections/extensions/McpRequirementRow.d.ts +45 -0
- package/dist/settings/sections/extensions/McpRequirementRow.js +298 -0
- package/dist/settings/sections/extensions/labels.d.ts +4 -0
- package/dist/settings/sections/extensions/labels.js +4 -0
- package/dist/settings/sections/extensions/options-labels.d.ts +39 -0
- package/dist/settings/sections/extensions/options-labels.js +48 -1
- package/dist/settings/sections/extensions/use-mcp-setup.d.ts +6 -0
- package/dist/settings/sections/extensions/use-mcp-setup.js +41 -0
- package/dist/settings/sections/host-catalog/HostCatalogSection.js +3 -0
- package/dist/settings/sections/index.d.ts +4 -3
- package/dist/settings/sections/index.js +4 -3
- package/dist/settings/sections/instructions/InstructionsSection.d.ts +69 -1
- package/dist/settings/sections/instructions/InstructionsSection.js +181 -109
- package/dist/settings/sections/mcp/McpAddForm.d.ts +9 -2
- package/dist/settings/sections/mcp/McpAddForm.js +15 -7
- package/dist/settings/sections/mcp/McpSection.js +3 -5
- package/dist/settings/sections/mcp/McpServerRow.js +7 -47
- package/dist/settings/sections/mcp/McpSignIn.d.ts +38 -0
- package/dist/settings/sections/mcp/McpSignIn.js +72 -0
- package/dist/settings/sections/mcp/labels.js +1 -1
- package/dist/settings/sections/models/AgentDefaults.d.ts +12 -4
- package/dist/settings/sections/models/AgentDefaults.js +102 -70
- package/dist/settings/sections/models/ModelPickField.d.ts +10 -1
- package/dist/settings/sections/models/ModelPickField.js +87 -39
- package/dist/settings/sections/models/labels.d.ts +8 -0
- package/dist/settings/sections/models/labels.js +8 -0
- package/dist/settings/sections/performance/labels.js +2 -2
- package/dist/settings/sections/providers/ServerSignIn.d.ts +6 -1
- package/dist/settings/sections/providers/ServerSignIn.js +66 -61
- package/dist/settings/sections/skills/SkillList.d.ts +45 -0
- package/dist/settings/sections/skills/SkillList.js +58 -40
- package/dist/settings/server-app.d.ts +2 -0
- package/dist/settings/server-app.js +16 -4
- package/dist/styles.css +170 -34
- package/dist/theme/runtime-icons.js +7 -3
- package/dist/workspace/PanelContentView.js +1 -1
- package/package.json +26 -2
- package/src/styles/app.css +6 -3
- package/src/styles/palette.css +15 -19
- package/src/styles/primitives.css +3 -1
- package/src/styles/transcript.css +61 -0
- package/dist/dist/index-ttmMvjgM.d.ts +0 -1
- package/dist/dist/sandbox-CSUihARm.d.ts +0 -2
- package/dist/machines/PersonalLayerPanel.d.ts +0 -32
- package/dist/machines/PersonalLayerPanel.js +0 -360
- package/dist/machines/headless/layer.d.ts +0 -64
- package/dist/machines/headless/layer.js +0 -56
- /package/dist/dist/{execution-failure-SREfl-EZ.d.ts → execution-failure-_L2r_Qd-.d.ts} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Fragment } from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
// src/chat/transcript/inline-facts.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Facts on one line that truncates (a tool row's meta line). Kit {@link Facts} wraps between facts, so a
|
|
6
|
+
* one-line row that must truncate uses this inline form instead. Internal: not exported from the entry.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Facts on one line that truncates: each its own inline block, a gap apart, never a dot.
|
|
10
|
+
*
|
|
11
|
+
* @param props - Component props.
|
|
12
|
+
* @param props.facts - The facts, in order.
|
|
13
|
+
*/
|
|
14
|
+
function InlineFacts({ facts }) {
|
|
15
|
+
return facts.map((fact, i) => /* @__PURE__ */ jsxs(Fragment, { children: [i > 0 && " ", /* @__PURE__ */ jsx("span", {
|
|
16
|
+
className: i > 0 ? "ml-1.5" : void 0,
|
|
17
|
+
children: fact
|
|
18
|
+
})] }, i));
|
|
19
|
+
}
|
|
20
|
+
export { InlineFacts };
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* The transcript's quiet rows: notices and errors, a stopped run (with its
|
|
3
3
|
* resume button when the app can resume), a worker's report
|
|
4
4
|
* (`SessionEventRow`), a `/` command's note and detail, and the spawn
|
|
5
|
-
* markers inside a subagent block
|
|
5
|
+
* markers inside a subagent block, and the line that says a run's setup
|
|
6
|
+
* changed (`SetupChangedRow`). App services come in as props
|
|
6
7
|
* (`onResume`, `onOpenSession`) and renderer slots (`renderers.tsx`).
|
|
7
8
|
*/
|
|
8
9
|
import { Row } from "../headless/transcript/rows.js";
|
|
@@ -37,6 +38,22 @@ export interface InfoRowProps {
|
|
|
37
38
|
}
|
|
38
39
|
/** Renders a plain informational line from the harness, in muted text. */
|
|
39
40
|
export declare const InfoRow: import("react").MemoExoticComponent<({ text, className, style }: InfoRowProps) => import("react").JSX.Element>;
|
|
41
|
+
/** Props for {@link SetupChangedRow}. */
|
|
42
|
+
export interface SetupChangedRowProps {
|
|
43
|
+
/** The notice's text: the summary on its first line, then one change per line. */
|
|
44
|
+
text: string;
|
|
45
|
+
/** Extra classes on the root element. */
|
|
46
|
+
className?: string;
|
|
47
|
+
/** Inline styles on the root element, merged after the component's own. */
|
|
48
|
+
style?: CSSProperties;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A run's setup changed since the previous run (docs/PROJECTS.md § Setup record): one small muted line, its summary
|
|
52
|
+
* ("Setup changed: 2 added, 1 removed"), with a caret that opens the changes, one per line in the meta voice
|
|
53
|
+
* (`+ skill foo`, `- mcp linear`, who saved a record). Collapsed at first; a row with no changes listed has no caret.
|
|
54
|
+
* A long list shows its first {@link SETUP_CHANGES_SHOWN} changes and a button for the rest.
|
|
55
|
+
*/
|
|
56
|
+
export declare const SetupChangedRow: import("react").MemoExoticComponent<({ text, className, style }: SetupChangedRowProps) => import("react").JSX.Element>;
|
|
40
57
|
/** Props for {@link NoticeRow}. */
|
|
41
58
|
export interface NoticeRowProps {
|
|
42
59
|
/** The structured notice: its severity and label. */
|
|
@@ -53,7 +70,10 @@ export interface NoticeRowProps {
|
|
|
53
70
|
* GUI counterpart of the TUI's `NoticeRow` (which keeps the glyph + label,
|
|
54
71
|
* this surface has color). Rendered for `info` events that carry
|
|
55
72
|
* `notice` (run-end stop reasons, model fallback, repeat guard, …); plain
|
|
56
|
-
* `info` events keep the quiet `InfoRow`.
|
|
73
|
+
* `info` events keep the quiet `InfoRow`. A run's setup change
|
|
74
|
+
* (`SETUP_CHANGED_LABEL`) is the quieter `SetupChangedRow`. A refused
|
|
75
|
+
* run's budget notice gets the labels' "Budget reached" as its badge, its
|
|
76
|
+
* sentence (which budget, how much, when runs start again) beneath in full.
|
|
57
77
|
*/
|
|
58
78
|
export declare const NoticeRow: import("react").MemoExoticComponent<({ notice, text, className, style }: NoticeRowProps) => import("react").JSX.Element>;
|
|
59
79
|
/** Props for {@link ErrorRow}. */
|
|
@@ -93,6 +113,8 @@ export interface FailureRowProps {
|
|
|
93
113
|
detail?: StreamEvent['detail'];
|
|
94
114
|
/** How the run ended and how it would resume. */
|
|
95
115
|
failure: RunFailure;
|
|
116
|
+
/** The name of who stopped the run, when a named person or client did: reads "Stopped by <name>". */
|
|
117
|
+
stoppedBy?: string;
|
|
96
118
|
/** The row is the transcript's last word: it offers Continue or Retry. */
|
|
97
119
|
resumable: boolean;
|
|
98
120
|
/** Called with the prompt that resumes the run. Absent: no button. */
|
|
@@ -115,7 +137,7 @@ export interface FailureRowProps {
|
|
|
115
137
|
* host's queue until it is back. Setting a gone one up anew asks first (the
|
|
116
138
|
* app's confirm dialog), as it can cost work.
|
|
117
139
|
*/
|
|
118
|
-
export declare const FailureRow: import("react").MemoExoticComponent<({ text, detail, failure, resumable, onResume, className, style }: FailureRowProps) => import("react").JSX.Element>;
|
|
140
|
+
export declare const FailureRow: import("react").MemoExoticComponent<({ text, detail, failure, stoppedBy, resumable, onResume, className, style }: FailureRowProps) => import("react").JSX.Element>;
|
|
119
141
|
/** Props for {@link SessionEventRow}. */
|
|
120
142
|
export interface SessionEventRowProps {
|
|
121
143
|
/** The worker's report. */
|
|
@@ -130,15 +152,15 @@ export interface SessionEventRowProps {
|
|
|
130
152
|
style?: CSSProperties;
|
|
131
153
|
}
|
|
132
154
|
/**
|
|
133
|
-
* Orchestration: a worker session reported an outcome.
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* the
|
|
141
|
-
* when `sessionEvent` is absent (malformed signal).
|
|
155
|
+
* Orchestration: a worker session reported an outcome. One bar at the
|
|
156
|
+
* conversation's size (`SessionLine`): the sidebar's status dot (its color
|
|
157
|
+
* is the outcome, so there is no verb on screen), the title, the report's
|
|
158
|
+
* excerpt, then the run's duration and turns in their fixed slots, the open
|
|
159
|
+
* button, the caret. Opened, the report shows in full, rendered as markdown,
|
|
160
|
+
* with the rest of the run's receipt under it. Under its conversation's
|
|
161
|
+
* header the bar reads its time instead of the title. Where the session ran
|
|
162
|
+
* is the group's to say (its project and worktree sections). Falls back to a
|
|
163
|
+
* plain text row when `sessionEvent` is absent (malformed signal).
|
|
142
164
|
*/
|
|
143
165
|
export declare const SessionEventRow: import("react").MemoExoticComponent<({ event, onOpenSession, className, style }: SessionEventRowProps) => import("react").JSX.Element>;
|
|
144
166
|
/**
|
|
@@ -2,15 +2,18 @@ import { useOptionalConfirm } from "../../app/useConfirm.js";
|
|
|
2
2
|
import { useTooltip } from "../../components/Tooltip.js";
|
|
3
3
|
import { useStaysMounted } from "../../motion/collapse.js";
|
|
4
4
|
import { failureTooltip } from "../headless/transcript/run-failures.js";
|
|
5
|
+
import { StatusDot } from "../StatusDot.js";
|
|
5
6
|
import { useChatLabels } from "../useChatLabels.js";
|
|
6
7
|
import { useTranscriptActions } from "./actions.js";
|
|
7
8
|
import { AuthFailureCard } from "./AuthFailureCard.js";
|
|
8
|
-
import { Caret } from "./frame.js";
|
|
9
|
+
import { Caret, SESSION_EVENT_DOT, useRowIcons } from "./frame.js";
|
|
10
|
+
import { ProseMarkdown } from "./ProseMarkdown.js";
|
|
9
11
|
import { useTranscriptRenderers } from "./renderers.js";
|
|
10
12
|
import { useRowPartKey, useRowUiState } from "./row-ui-state.js";
|
|
11
|
-
import {
|
|
13
|
+
import { SessionLine, useSessionEventScope } from "./session-line.js";
|
|
14
|
+
import { memo, useEffect, useId, useRef, useState } from "react";
|
|
12
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { CONTINUE_PROMPT, SESSION_EVENT_STATUS_STYLE, describeSpawnEnd,
|
|
16
|
+
import { CONTINUE_PROMPT, SESSION_EVENT_STATUS_STYLE, SETUP_CHANGED_LABEL, describeSpawnEnd, fmtCost, formatTokenCount, sessionEventExcerpt, sessionEventReport, shortSessionId, spawnStartParts } from "zidane/chat/pure";
|
|
14
17
|
// src/chat/transcript/notices.tsx
|
|
15
18
|
/**
|
|
16
19
|
* Command steps, outputs and a run's error line read at the transcript's
|
|
@@ -41,6 +44,96 @@ const InfoRow = memo(({ text, className, style }) => {
|
|
|
41
44
|
children: text
|
|
42
45
|
});
|
|
43
46
|
});
|
|
47
|
+
/** How many of a run's setup changes show before the button for the rest. */
|
|
48
|
+
const SETUP_CHANGES_SHOWN = 12;
|
|
49
|
+
/**
|
|
50
|
+
* A run's setup changed since the previous run (docs/PROJECTS.md § Setup record): one small muted line, its summary
|
|
51
|
+
* ("Setup changed: 2 added, 1 removed"), with a caret that opens the changes, one per line in the meta voice
|
|
52
|
+
* (`+ skill foo`, `- mcp linear`, who saved a record). Collapsed at first; a row with no changes listed has no caret.
|
|
53
|
+
* A long list shows its first {@link SETUP_CHANGES_SHOWN} changes and a button for the rest.
|
|
54
|
+
*/
|
|
55
|
+
const SetupChangedRow = memo(({ text, className, style }) => {
|
|
56
|
+
const labels = useChatLabels();
|
|
57
|
+
const [open, setOpen] = useRowUiState(useRowPartKey("setup-changed"), false);
|
|
58
|
+
const [all, setAll] = useRowUiState(useRowPartKey("setup-changed-all"), false);
|
|
59
|
+
const firstHidden = useRef(null);
|
|
60
|
+
const focusShown = useRef(false);
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (all && focusShown.current) {
|
|
63
|
+
focusShown.current = false;
|
|
64
|
+
firstHidden.current?.focus();
|
|
65
|
+
}
|
|
66
|
+
}, [all]);
|
|
67
|
+
const mounted = useStaysMounted(open);
|
|
68
|
+
const listId = useId();
|
|
69
|
+
const [head = "", ...changes] = text.split("\n").filter((line) => line.trim() !== "");
|
|
70
|
+
const clipped = !all && changes.length > 15;
|
|
71
|
+
const root = ["text-xs text-[var(--zg-text-muted)]", className].filter(Boolean).join(" ");
|
|
72
|
+
const glyph = /* @__PURE__ */ jsx("span", {
|
|
73
|
+
"aria-hidden": true,
|
|
74
|
+
className: "i-ph-sliders-horizontal shrink-0"
|
|
75
|
+
});
|
|
76
|
+
if (changes.length === 0) return /* @__PURE__ */ jsxs("div", {
|
|
77
|
+
className: `${root} flex items-center gap-1.5 min-w-0 py-0.5`,
|
|
78
|
+
style,
|
|
79
|
+
"data-testid": "setup-changed",
|
|
80
|
+
children: [glyph, /* @__PURE__ */ jsx("span", {
|
|
81
|
+
className: "min-w-0 truncate",
|
|
82
|
+
children: head
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: root,
|
|
87
|
+
style,
|
|
88
|
+
"data-testid": "setup-changed",
|
|
89
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
90
|
+
type: "button",
|
|
91
|
+
"aria-expanded": open,
|
|
92
|
+
"aria-controls": listId,
|
|
93
|
+
onClick: () => setOpen((current) => !current),
|
|
94
|
+
className: "zg-press-subtle zg-disclosure zg-focus-ring flex items-center gap-1.5 w-full min-w-0 py-0.5 rounded-zg-sm text-left",
|
|
95
|
+
children: [
|
|
96
|
+
glyph,
|
|
97
|
+
/* @__PURE__ */ jsx("span", {
|
|
98
|
+
className: "min-w-0 truncate",
|
|
99
|
+
children: head
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsx(Caret, {
|
|
102
|
+
open,
|
|
103
|
+
className: "self-center"
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
107
|
+
className: "zg-collapsible",
|
|
108
|
+
"data-open": open,
|
|
109
|
+
id: listId,
|
|
110
|
+
inert: !open || void 0,
|
|
111
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
112
|
+
className: "zg-collapsible-inner",
|
|
113
|
+
children: mounted && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("ul", {
|
|
114
|
+
className: "zg-setup-changes zg-meta m-0 p-0 pt-1 pl-5 list-none flex flex-col gap-0.5",
|
|
115
|
+
children: (clipped ? changes.slice(0, SETUP_CHANGES_SHOWN) : changes).map((line, i) => /* @__PURE__ */ jsx("li", {
|
|
116
|
+
ref: i === SETUP_CHANGES_SHOWN ? firstHidden : void 0,
|
|
117
|
+
tabIndex: i === SETUP_CHANGES_SHOWN ? -1 : void 0,
|
|
118
|
+
className: "break-words outline-none",
|
|
119
|
+
children: line
|
|
120
|
+
}, i))
|
|
121
|
+
}), clipped && /* @__PURE__ */ jsx("button", {
|
|
122
|
+
type: "button",
|
|
123
|
+
onClick: () => {
|
|
124
|
+
focusShown.current = true;
|
|
125
|
+
setAll(true);
|
|
126
|
+
},
|
|
127
|
+
className: "zg-press-subtle zg-focus-ring ml-5 mt-1 px-1 -mx-1 rounded-zg-sm text-[var(--zg-text-muted)] hover:text-[var(--zg-text)] transition-colors",
|
|
128
|
+
children: labels.setupChangedMore(changes.length - SETUP_CHANGES_SHOWN)
|
|
129
|
+
})] })
|
|
130
|
+
})
|
|
131
|
+
})]
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
SetupChangedRow.displayName = "SetupChangedRow";
|
|
135
|
+
/** The label of the notice a refused run leaves (`emitSessionNotice` in `src/chat/host/runs/prepare.ts`): its text is a full sentence, so the badge says the headline and the sentence goes under it. */
|
|
136
|
+
const BUDGET_NOTICE_LABEL = "budget";
|
|
44
137
|
/** A notice's badge tone and icon, by severity. */
|
|
45
138
|
const NOTICE_STYLE = {
|
|
46
139
|
error: {
|
|
@@ -61,31 +154,60 @@ const NOTICE_STYLE = {
|
|
|
61
154
|
* GUI counterpart of the TUI's `NoticeRow` (which keeps the glyph + label,
|
|
62
155
|
* this surface has color). Rendered for `info` events that carry
|
|
63
156
|
* `notice` (run-end stop reasons, model fallback, repeat guard, …); plain
|
|
64
|
-
* `info` events keep the quiet `InfoRow`.
|
|
157
|
+
* `info` events keep the quiet `InfoRow`. A run's setup change
|
|
158
|
+
* (`SETUP_CHANGED_LABEL`) is the quieter `SetupChangedRow`. A refused
|
|
159
|
+
* run's budget notice gets the labels' "Budget reached" as its badge, its
|
|
160
|
+
* sentence (which budget, how much, when runs start again) beneath in full.
|
|
65
161
|
*/
|
|
66
162
|
const NoticeRow = memo(({ notice, text, className, style }) => {
|
|
163
|
+
const labels = useChatLabels();
|
|
164
|
+
if (notice.label === SETUP_CHANGED_LABEL) return /* @__PURE__ */ jsx(SetupChangedRow, {
|
|
165
|
+
text,
|
|
166
|
+
className,
|
|
167
|
+
style
|
|
168
|
+
});
|
|
67
169
|
const { tone, icon } = NOTICE_STYLE[notice.severity] ?? NOTICE_STYLE.info;
|
|
68
|
-
const
|
|
170
|
+
const lines = text.split("\n").filter((line) => line.trim() !== "");
|
|
171
|
+
const [head = "", ...details] = notice.label === BUDGET_NOTICE_LABEL ? [labels.noticeBudgetReached, ...lines.flatMap(sentencesOf)] : lines;
|
|
172
|
+
return /* @__PURE__ */ jsx(NoticeBody, {
|
|
173
|
+
head,
|
|
174
|
+
details,
|
|
175
|
+
tone,
|
|
176
|
+
icon,
|
|
177
|
+
className,
|
|
178
|
+
style
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
/** Splits prose into its sentences: a period, then a space and a capital ("$1.50" stays whole). */
|
|
182
|
+
function sentencesOf(line) {
|
|
183
|
+
return line.split(/(?<=[.!?])\s+(?=\p{Lu})/u);
|
|
184
|
+
}
|
|
185
|
+
/** A notice's badge (its headline, the full text in a tooltip when it truncates) and its facts beneath, one per line. */
|
|
186
|
+
function NoticeBody({ head, details, tone, icon, className, style }) {
|
|
187
|
+
const tip = useTooltip(head, { maxWidth: 420 });
|
|
69
188
|
return /* @__PURE__ */ jsxs("div", {
|
|
70
189
|
className: ["flex flex-col items-start gap-1 text-xs", className].filter(Boolean).join(" "),
|
|
71
190
|
style,
|
|
72
|
-
title: notice.label,
|
|
73
191
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
74
192
|
className: `inline-flex max-w-full items-center gap-1.5 px-2 py-0.5 rounded-full shadow-[inset_0_0_0_1px_var(--zg-hairline)] font-medium ${tone}`,
|
|
75
|
-
children: [
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ jsx("span", {
|
|
195
|
+
"aria-hidden": true,
|
|
196
|
+
className: `${icon} shrink-0`
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ jsx("span", {
|
|
199
|
+
...tip.anchorProps,
|
|
200
|
+
className: "min-w-0 truncate",
|
|
201
|
+
children: head
|
|
202
|
+
}),
|
|
203
|
+
tip.tip
|
|
204
|
+
]
|
|
83
205
|
}), details.length > 0 && /* @__PURE__ */ jsx("span", {
|
|
84
206
|
className: "min-w-0 max-w-full flex flex-col gap-0.5 px-2 break-words text-[var(--zg-text-muted)]",
|
|
85
207
|
children: details.map((line, i) => /* @__PURE__ */ jsx("span", { children: line }, i))
|
|
86
208
|
})]
|
|
87
209
|
});
|
|
88
|
-
}
|
|
210
|
+
}
|
|
89
211
|
/** The transcript's one error tone (the `error` / `tool-err` Dot glyphs share it). */
|
|
90
212
|
const ERROR_TONE = "text-zg-danger";
|
|
91
213
|
/** Renders an error line in the transcript's error tone. */
|
|
@@ -141,7 +263,7 @@ RepairedRow.displayName = "RepairedRow";
|
|
|
141
263
|
* host's queue until it is back. Setting a gone one up anew asks first (the
|
|
142
264
|
* app's confirm dialog), as it can cost work.
|
|
143
265
|
*/
|
|
144
|
-
const FailureRow = memo(({ text, detail, failure, resumable, onResume, className, style }) => {
|
|
266
|
+
const FailureRow = memo(({ text, detail, failure, stoppedBy, resumable, onResume, className, style }) => {
|
|
145
267
|
const labels = useChatLabels();
|
|
146
268
|
const { retryEnvironment } = useTranscriptActions();
|
|
147
269
|
const confirm = useOptionalConfirm();
|
|
@@ -199,7 +321,7 @@ const FailureRow = memo(({ text, detail, failure, resumable, onResume, className
|
|
|
199
321
|
className: "min-w-0 truncate",
|
|
200
322
|
children: [/* @__PURE__ */ jsx("span", {
|
|
201
323
|
className: byUser ? "text-[var(--zg-text-muted)]" : ERROR_TONE,
|
|
202
|
-
children: byUser ? labels.stoppedByYou : labels.stopped
|
|
324
|
+
children: byUser ? stoppedBy ? labels.stoppedByName(stoppedBy) : labels.stoppedByYou : labels.stopped
|
|
203
325
|
}), text && /* @__PURE__ */ jsxs("span", {
|
|
204
326
|
className: "text-[var(--zg-text-muted)]",
|
|
205
327
|
children: [" ", text]
|
|
@@ -221,30 +343,22 @@ const FailureRow = memo(({ text, detail, failure, resumable, onResume, className
|
|
|
221
343
|
});
|
|
222
344
|
});
|
|
223
345
|
/**
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
};
|
|
234
|
-
/**
|
|
235
|
-
* Orchestration: a worker session reported an outcome. Drawn as a session
|
|
236
|
-
* thread draws its steps (the fold head / ToolRow idiom): a flat
|
|
237
|
-
* `.zg-disclosure` row, the title in the content voice, the receipt in
|
|
238
|
-
* `.zg-meta`, and a muted two-line excerpt of the worker's last word. No
|
|
239
|
-
* card, tint or line: status lives on the timeline dot and the verb's color. The whole row is a button that jumps to the
|
|
240
|
-
* reporting session (`onOpenSession`; without it the row is inert);
|
|
241
|
-
* `needs-attention` is the loud one, since it is the one status a human, not
|
|
242
|
-
* the main, has to act on. Falls back to a plain, non-clickable text row
|
|
243
|
-
* when `sessionEvent` is absent (malformed signal).
|
|
346
|
+
* Orchestration: a worker session reported an outcome. One bar at the
|
|
347
|
+
* conversation's size (`SessionLine`): the sidebar's status dot (its color
|
|
348
|
+
* is the outcome, so there is no verb on screen), the title, the report's
|
|
349
|
+
* excerpt, then the run's duration and turns in their fixed slots, the open
|
|
350
|
+
* button, the caret. Opened, the report shows in full, rendered as markdown,
|
|
351
|
+
* with the rest of the run's receipt under it. Under its conversation's
|
|
352
|
+
* header the bar reads its time instead of the title. Where the session ran
|
|
353
|
+
* is the group's to say (its project and worktree sections). Falls back to a
|
|
354
|
+
* plain text row when `sessionEvent` is absent (malformed signal).
|
|
244
355
|
*/
|
|
245
356
|
const SessionEventRow = memo(({ event, onOpenSession, className, style }) => {
|
|
246
|
-
const labels = useChatLabels();
|
|
247
357
|
const { SessionTitle } = useTranscriptRenderers();
|
|
358
|
+
const scope = useSessionEventScope();
|
|
359
|
+
const icons = useRowIcons();
|
|
360
|
+
const [open, setOpen] = useRowUiState(useRowPartKey("session-event"), false);
|
|
361
|
+
const mounted = useStaysMounted(open);
|
|
248
362
|
const id = useId();
|
|
249
363
|
if (!event.sessionEvent) return /* @__PURE__ */ jsxs("div", {
|
|
250
364
|
className: ["flex items-start gap-2 text-xs", className].filter(Boolean).join(" "),
|
|
@@ -259,68 +373,70 @@ const SessionEventRow = memo(({ event, onOpenSession, className, style }) => {
|
|
|
259
373
|
})]
|
|
260
374
|
});
|
|
261
375
|
const sessionEvent = event.sessionEvent;
|
|
262
|
-
const {
|
|
263
|
-
const
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
disabled: !onOpenSession,
|
|
272
|
-
"aria-labelledby": `${id}-title ${id}-verb${needsAttention && onOpenSession ? ` ${id}-answer` : ""}`,
|
|
273
|
-
className: [`group zg-disclosure zg-press-subtle flex items-start w-full py-1 text-left ${onOpenSession ? "cursor-pointer" : "cursor-default"}`, className].filter(Boolean).join(" "),
|
|
376
|
+
const { sessionId } = sessionEvent;
|
|
377
|
+
const report = sessionEventReport(sessionEvent);
|
|
378
|
+
const receipt = [
|
|
379
|
+
...sessionEvent.tokens !== void 0 ? [`${formatTokenCount(sessionEvent.tokens)} tok`] : [],
|
|
380
|
+
...sessionEvent.costUsd !== void 0 ? [fmtCost(sessionEvent.costUsd)] : [],
|
|
381
|
+
shortSessionId(sessionId)
|
|
382
|
+
];
|
|
383
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
384
|
+
className,
|
|
274
385
|
style,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
386
|
+
"data-testid": "session-event",
|
|
387
|
+
children: [/* @__PURE__ */ jsx(SessionLine, {
|
|
388
|
+
session: {
|
|
389
|
+
id: sessionId,
|
|
390
|
+
title: sessionEvent.title,
|
|
391
|
+
link: sessionEvent.link
|
|
392
|
+
},
|
|
393
|
+
id,
|
|
394
|
+
open,
|
|
395
|
+
onToggle: () => setOpen((current) => !current),
|
|
396
|
+
lead: icons ? void 0 : /* @__PURE__ */ jsx(StatusDot, {
|
|
397
|
+
state: SESSION_EVENT_DOT[sessionEvent.status],
|
|
398
|
+
className: "self-center"
|
|
399
|
+
}),
|
|
400
|
+
title: scope.conversation ? updateTime(sessionEvent.at) : /* @__PURE__ */ jsx(SessionTitle, {
|
|
401
|
+
id: sessionId,
|
|
402
|
+
fallback: sessionEvent.title,
|
|
403
|
+
plain: true
|
|
404
|
+
}),
|
|
405
|
+
titleIsMeta: scope.conversation,
|
|
406
|
+
spoken: SESSION_EVENT_STATUS_STYLE[sessionEvent.status].verb,
|
|
407
|
+
excerpt: sessionEventExcerpt(sessionEvent),
|
|
408
|
+
durationMs: sessionEvent.durationMs,
|
|
409
|
+
turns: sessionEvent.turns,
|
|
410
|
+
answer: sessionEvent.status === "needs-attention",
|
|
411
|
+
onOpen: onOpenSession ? () => onOpenSession(sessionId) : void 0
|
|
412
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
413
|
+
className: "zg-collapsible",
|
|
414
|
+
"data-open": open,
|
|
415
|
+
id: `${id}-body`,
|
|
416
|
+
inert: !open || void 0,
|
|
417
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
418
|
+
className: "zg-collapsible-inner",
|
|
419
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
420
|
+
className: "pt-1 flex flex-col gap-1.5",
|
|
421
|
+
children: mounted && /* @__PURE__ */ jsxs(Fragment$1, { children: [report.trim() && /* @__PURE__ */ jsx(ProseMarkdown, { children: report }), /* @__PURE__ */ jsx("div", {
|
|
422
|
+
className: "zg-meta flex flex-wrap gap-x-3",
|
|
423
|
+
children: receipt.map((cell, i) => /* @__PURE__ */ jsx("span", {
|
|
424
|
+
className: i === receipt.length - 1 ? "opacity-60" : void 0,
|
|
305
425
|
children: cell
|
|
306
|
-
}, cell))
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
needsAttention && onOpenSession && /* @__PURE__ */ jsx("span", {
|
|
312
|
-
id: `${id}-answer`,
|
|
313
|
-
className: "zg-meta-chip shrink-0 self-center text-zg-meta text-zg-warn",
|
|
314
|
-
children: labels.clickToAnswer
|
|
315
|
-
})
|
|
316
|
-
]
|
|
317
|
-
}), excerpt && /* @__PURE__ */ jsx("div", {
|
|
318
|
-
className: "zg-line-clamp-2 mt-0.5 text-zg-ui leading-zg-ui text-[var(--zg-text-muted)]",
|
|
319
|
-
children: excerpt
|
|
320
|
-
})]
|
|
321
|
-
})
|
|
426
|
+
}, cell))
|
|
427
|
+
})] })
|
|
428
|
+
})
|
|
429
|
+
})
|
|
430
|
+
})]
|
|
322
431
|
});
|
|
323
432
|
});
|
|
433
|
+
/** An update's time of day, as its line's name under its conversation's header. */
|
|
434
|
+
function updateTime(at) {
|
|
435
|
+
return new Date(at).toLocaleTimeString(void 0, {
|
|
436
|
+
hour: "numeric",
|
|
437
|
+
minute: "2-digit"
|
|
438
|
+
});
|
|
439
|
+
}
|
|
324
440
|
/**
|
|
325
441
|
* The gutter line height of a command-detail row's Dot: a `text-sm` × 1.6
|
|
326
442
|
* line (22.4px) plus the header button's `py-0.5`. A body-less detail has
|
|
@@ -426,4 +542,4 @@ const SpawnEndRow = memo(({ row, className, style }) => {
|
|
|
426
542
|
}, value))]
|
|
427
543
|
});
|
|
428
544
|
});
|
|
429
|
-
export { COMMAND_DETAIL_LINE, CommandDetailRow, CommandNoteRow, ErrorRow, FailureRow, InfoRow, NoticeRow, RepairedRow, SessionEventRow, SpawnEndRow, SpawnStartRow };
|
|
545
|
+
export { COMMAND_DETAIL_LINE, CommandDetailRow, CommandNoteRow, ErrorRow, FailureRow, InfoRow, NoticeRow, RepairedRow, SessionEventRow, SetupChangedRow, SpawnEndRow, SpawnStartRow };
|
|
@@ -23,6 +23,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
23
23
|
function UserPromptRow({ row, onBubblePointerEnter, onBubbleContextMenu, className, style }) {
|
|
24
24
|
const { Prompt } = useTranscriptRenderers();
|
|
25
25
|
const icons = useRowIcons();
|
|
26
|
+
const labels = useChatLabels();
|
|
26
27
|
const attachments = row.attachments ?? [];
|
|
27
28
|
return /* @__PURE__ */ jsxs("div", {
|
|
28
29
|
className: ["zg-row-enter relative flex items-start gap-3 pb-[var(--zg-row-gap,12px)]", className].filter(Boolean).join(" "),
|
|
@@ -49,7 +50,13 @@ function UserPromptRow({ row, onBubblePointerEnter, onBubbleContextMenu, classNa
|
|
|
49
50
|
promptMediaOf(row.text).map((m) => /* @__PURE__ */ jsx(MessageMedia, {
|
|
50
51
|
src: m.src,
|
|
51
52
|
alt: m.alt
|
|
52
|
-
}, m.src))
|
|
53
|
+
}, m.src)),
|
|
54
|
+
row.heldFor !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
55
|
+
className: "text-zg-label text-[var(--zg-text-muted)]",
|
|
56
|
+
role: "status",
|
|
57
|
+
"data-testid": "prompt-held",
|
|
58
|
+
children: labels.promptHeldFor(row.heldFor)
|
|
59
|
+
})
|
|
53
60
|
]
|
|
54
61
|
})]
|
|
55
62
|
});
|
|
@@ -4,13 +4,40 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { RunReceiptCell, RunReceiptSegment } from "zidane/chat/pure";
|
|
6
6
|
import { StreamEvent } from "zidane/chat";
|
|
7
|
+
import { ThinkingLevel } from "zidane/types";
|
|
7
8
|
export declare const RUN_RECEIPT_TINT: Record<RunReceiptCell['kind'], string>;
|
|
8
9
|
export declare const RUN_RECEIPT_SEGMENT_TINT: Record<RunReceiptSegment['kind'], string>;
|
|
9
|
-
/** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. */
|
|
10
|
-
export declare function ReceiptValue({ text, className }: {
|
|
10
|
+
/** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. `label` names the glyph for assistive tech, else it reads the glyph. */
|
|
11
|
+
export declare function ReceiptValue({ text, className, label }: {
|
|
11
12
|
text: string;
|
|
12
13
|
className: string;
|
|
14
|
+
label?: string;
|
|
13
15
|
}): import("react").JSX.Element;
|
|
16
|
+
/** A cell's parts, each tinted by meaning: the token cell's halves, or a model badge's name, effort and fast icon. Spaced by the parent's gap, no other mark. */
|
|
17
|
+
export declare function ReceiptSegments({ segments }: {
|
|
18
|
+
segments: readonly RunReceiptSegment[];
|
|
19
|
+
}): import("react").JSX.Element[];
|
|
20
|
+
/** Props for {@link ModelBadge}. */
|
|
21
|
+
export interface ModelBadgeProps {
|
|
22
|
+
/** Model id, named as the surface's picker names it. */
|
|
23
|
+
model: string;
|
|
24
|
+
/** Provider key, so the name reads as the picker's. */
|
|
25
|
+
providerKey?: string;
|
|
26
|
+
/** The reasoning effort it ran with, absent with thinking off. */
|
|
27
|
+
effort?: ThinkingLevel;
|
|
28
|
+
/** It ran in fast mode. */
|
|
29
|
+
fast?: boolean;
|
|
30
|
+
/** Extra classes on the root element. */
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A model with the effort and fast mode it ran with, as the receipt's model
|
|
35
|
+
* cell draws it (`Opus 4.8 high` and a lightning icon). The subagent header
|
|
36
|
+
* shows it.
|
|
37
|
+
*
|
|
38
|
+
* @param props - Component props.
|
|
39
|
+
*/
|
|
40
|
+
export declare function ModelBadge({ model, providerKey, effort, fast, className }: ModelBadgeProps): import("react").JSX.Element;
|
|
14
41
|
/**
|
|
15
42
|
* A compaction's facts as one quiet line: the summary call's model, its cost
|
|
16
43
|
* when priced, and the tokens it sent and received. The compaction card and
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { useChatLabels } from "../useChatLabels.js";
|
|
1
2
|
import { useModelName } from "./actions.js";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { RUN_RECEIPT_SWITCH_GLYPH, RUN_RECEIPT_TURN_GLYPH, formatCostUsd, formatTokenCount } from "zidane/chat/pure";
|
|
4
|
+
import { RUN_RECEIPT_FAST_GLYPH, RUN_RECEIPT_SWITCH_GLYPH, RUN_RECEIPT_TURN_GLYPH, formatCostUsd, formatTokenCount, modelBadgeSegments } from "zidane/chat/pure";
|
|
4
5
|
// src/chat/transcript/receipt-parts.tsx
|
|
5
6
|
const RUN_RECEIPT_TINT = {
|
|
6
7
|
agent: "text-zg-text/80",
|
|
@@ -13,16 +14,20 @@ const RUN_RECEIPT_TINT = {
|
|
|
13
14
|
};
|
|
14
15
|
const RUN_RECEIPT_SEGMENT_TINT = {
|
|
15
16
|
"tokens-in": "zg-soft-tint zg-tint-accent",
|
|
16
|
-
"tokens-out": "zg-soft-tint zg-tint-accent-alt"
|
|
17
|
+
"tokens-out": "zg-soft-tint zg-tint-accent-alt",
|
|
18
|
+
"model": RUN_RECEIPT_TINT.model,
|
|
19
|
+
"effort": "text-[var(--zg-text-muted)]",
|
|
20
|
+
"fast": "zg-soft-tint zg-tint-warn"
|
|
17
21
|
};
|
|
18
22
|
const RECEIPT_GLYPH_ICON = {
|
|
19
23
|
[RUN_RECEIPT_TURN_GLYPH]: "i-ph-arrow-clockwise-bold",
|
|
20
24
|
[RUN_RECEIPT_SWITCH_GLYPH]: "i-ph-arrows-left-right-bold",
|
|
21
25
|
"↑": "i-ph-arrow-up-bold",
|
|
22
|
-
"↓": "i-ph-arrow-down-bold"
|
|
26
|
+
"↓": "i-ph-arrow-down-bold",
|
|
27
|
+
[RUN_RECEIPT_FAST_GLYPH]: "i-ph-lightning-fill"
|
|
23
28
|
};
|
|
24
|
-
/** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. */
|
|
25
|
-
function ReceiptValue({ text, className }) {
|
|
29
|
+
/** A receipt value (`↻3`, `↑520k`), its leading glyph as an icon. `label` names the glyph for assistive tech, else it reads the glyph. */
|
|
30
|
+
function ReceiptValue({ text, className, label }) {
|
|
26
31
|
const icon = RECEIPT_GLYPH_ICON[text.charAt(0)];
|
|
27
32
|
if (!icon) return /* @__PURE__ */ jsx("span", {
|
|
28
33
|
className,
|
|
@@ -32,11 +37,39 @@ function ReceiptValue({ text, className }) {
|
|
|
32
37
|
className,
|
|
33
38
|
children: [/* @__PURE__ */ jsx("span", {
|
|
34
39
|
role: "img",
|
|
35
|
-
"aria-label": text.charAt(0),
|
|
40
|
+
"aria-label": label ?? text.charAt(0),
|
|
36
41
|
className: `${icon} inline-block mr-px text-[0.8em] align-[calc(0.625cap_-_0.5em)]`
|
|
37
42
|
}), text.slice(1)]
|
|
38
43
|
});
|
|
39
44
|
}
|
|
45
|
+
/** A cell's parts, each tinted by meaning: the token cell's halves, or a model badge's name, effort and fast icon. Spaced by the parent's gap, no other mark. */
|
|
46
|
+
function ReceiptSegments({ segments }) {
|
|
47
|
+
const labels = useChatLabels();
|
|
48
|
+
return segments.map((seg, j) => /* @__PURE__ */ jsx(ReceiptValue, {
|
|
49
|
+
text: seg.text,
|
|
50
|
+
className: RUN_RECEIPT_SEGMENT_TINT[seg.kind],
|
|
51
|
+
...seg.kind === "fast" ? { label: labels.receiptFast } : {}
|
|
52
|
+
}, `${seg.kind}-${j}`));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A model with the effort and fast mode it ran with, as the receipt's model
|
|
56
|
+
* cell draws it (`Opus 4.8 high` and a lightning icon). The subagent header
|
|
57
|
+
* shows it.
|
|
58
|
+
*
|
|
59
|
+
* @param props - Component props.
|
|
60
|
+
*/
|
|
61
|
+
function ModelBadge({ model, providerKey, effort, fast, className = "" }) {
|
|
62
|
+
const modelName = useModelName();
|
|
63
|
+
const segments = modelBadgeSegments(modelName(model, providerKey), {
|
|
64
|
+
...effort ? { effort } : {},
|
|
65
|
+
...fast ? { fast } : {}
|
|
66
|
+
});
|
|
67
|
+
return /* @__PURE__ */ jsx("span", {
|
|
68
|
+
className: `zg-meta inline-flex items-center gap-1 shrink-0 ${className}`,
|
|
69
|
+
title: model,
|
|
70
|
+
children: /* @__PURE__ */ jsx(ReceiptSegments, { segments })
|
|
71
|
+
});
|
|
72
|
+
}
|
|
40
73
|
/**
|
|
41
74
|
* A compaction's facts as one quiet line: the summary call's model, its cost
|
|
42
75
|
* when priced, and the tokens it sent and received. The compaction card and
|
|
@@ -84,4 +117,4 @@ function CompactMeta({ meta, className = "" }) {
|
|
|
84
117
|
]
|
|
85
118
|
});
|
|
86
119
|
}
|
|
87
|
-
export { CompactMeta, RUN_RECEIPT_SEGMENT_TINT, RUN_RECEIPT_TINT, ReceiptValue };
|
|
120
|
+
export { CompactMeta, ModelBadge, RUN_RECEIPT_SEGMENT_TINT, RUN_RECEIPT_TINT, ReceiptSegments, ReceiptValue };
|