@vvedantb/ui 0.67.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/src/auth/useStableAuth.ts +0 -2
- package/app/src/confirm/ConfirmSkipHint.tsx +0 -2
- package/app/src/confirm/useAltHeld.ts +0 -17
- package/app/src/convex/ConvexClerkProvider.tsx +0 -3
- package/app/src/convex/env.ts +0 -4
- package/app/src/convex/errorMessage.ts +0 -1
- package/app/src/convex/useHeldResult.ts +0 -3
- package/app/src/page-motion/PageMotionProvider.tsx +0 -6
- package/app/src/page-title/createPageTitleContext.tsx +0 -14
- package/app/src/settings/SettingsEmptyState.tsx +0 -4
- package/app/src/settings/SettingsField.tsx +0 -4
- package/app/src/settings/SettingsPage.tsx +0 -12
- package/app/src/settings/SettingsSection.tsx +0 -14
- package/app/src/settings/ThemeModePicker.tsx +0 -6
- package/app/src/theme/createThemeProvider.tsx +0 -33
- package/app/src/time/compactRelativeTime.ts +0 -16
- package/app/src/update/staleDeployReload.ts +0 -40
- package/app/src/update/updateWatcher.ts +0 -8
- package/dist/app/src/auth/useStableAuth.js +0 -1
- package/dist/app/src/confirm/ConfirmSkipHint.js +0 -3
- package/dist/app/src/confirm/useAltHeld.js +0 -17
- package/dist/app/src/convex/env.js +0 -3
- package/dist/app/src/convex/errorMessage.js +0 -2
- package/dist/app/src/settings/ThemeModePicker.js +0 -1
- package/dist/app/src/theme/createThemeProvider.js +1 -11
- package/dist/app/src/time/compactRelativeTime.js +0 -8
- package/dist/app/src/update/staleDeployReload.js +3 -38
- package/dist/app/src/update/updateWatcher.js +1 -3
- package/dist/shell/src/AppShell.js +0 -14
- package/dist/shell/src/PageHeaderBar.js +0 -3
- package/dist/shell/src/SessionsHoverCard.js +0 -9
- package/dist/shell/src/SidePanelTabs.js +0 -36
- package/dist/shell/src/Sidebar.js +0 -1
- package/dist/shell/src/SidebarChrome.js +0 -19
- package/dist/shell/src/SidebarIconTooltip.js +0 -1
- package/dist/shell/src/SidebarRail.js +0 -12
- package/dist/shell/src/SidebarResize.js +1 -4
- package/dist/shell/src/app-shell-classes.js +0 -10
- package/dist/shell/src/index.js +0 -1
- package/dist/shell/src/shell-panel-motion.js +0 -12
- package/dist/src/ai-elements/activity-shared.js +0 -6
- package/dist/src/ai-elements/activity-step-label.js +0 -6
- package/dist/src/ai-elements/activity-step-types.js +0 -4
- package/dist/src/ai-elements/activity-tasks-utils.js +0 -17
- package/dist/src/ai-elements/activity-tasks.js +0 -55
- package/dist/src/ai-elements/artifact.js +0 -4
- package/dist/src/ai-elements/attachments.js +0 -41
- package/dist/src/ai-elements/code-block.js +0 -18
- package/dist/src/ai-elements/collapsible-user-message-body.js +0 -2
- package/dist/src/ai-elements/context.js +0 -13
- package/dist/src/ai-elements/conversation.js +0 -4
- package/dist/src/ai-elements/jump-rail.js +0 -5
- package/dist/src/ai-elements/message.js +0 -7
- package/dist/src/ai-elements/model-picker-types.js +0 -1
- package/dist/src/ai-elements/model-picker.js +1 -6
- package/dist/src/ai-elements/model-selector.js +0 -4
- package/dist/src/ai-elements/prompt-input-speech.js +0 -13
- package/dist/src/ai-elements/prompt-input.js +0 -1
- package/dist/src/ai-elements/provider-icon.js +0 -4
- package/dist/src/ai-elements/queue.js +0 -15
- package/dist/src/ai-elements/shimmer.js +0 -14
- package/dist/src/ai-elements/speech-input.js +0 -7
- package/dist/src/artifacts/artifact-frame.js +0 -2
- package/dist/src/audio/playChime.js +0 -2
- package/dist/src/audio/playTone.js +1 -4
- package/dist/src/brand/AppWordmark.js +0 -5
- package/dist/src/brand/svg.js +0 -6
- package/dist/src/client.js +0 -43
- package/dist/src/composer/Composer.js +0 -27
- package/dist/src/composer/input-area/InputArea.js +0 -3
- package/dist/src/composer/input-area/InputAreaEditor.js +1 -50
- package/dist/src/composer/input-area/composerPrediction.js +0 -3
- package/dist/src/generative-ui/content.js +0 -2
- package/dist/src/generative-ui/index.js +0 -3
- package/dist/src/generative-ui/layout.js +0 -5
- package/dist/src/hooks/use-count-up-display.js +0 -2
- package/dist/src/hooks/use-idle-callback.js +0 -3
- package/dist/src/hooks/use-persisted-scroll-parent.js +1 -8
- package/dist/src/icons/animated/index.js +0 -4
- package/dist/src/icons/board-icon.js +74 -41
- package/dist/src/icons/bolt-icon.js +30 -20
- package/dist/src/icons/building-icon.js +125 -61
- package/dist/src/icons/files-icon.js +103 -43
- package/dist/src/icons/inbox-icon.js +101 -49
- package/dist/src/icons/index.js +2 -1
- package/dist/src/icons/memory-icon.js +135 -58
- package/dist/src/icons/search-icon.js +143 -46
- package/dist/src/icons/settings-icon.js +113 -53
- package/dist/src/icons/solid-icons.js +665 -0
- package/dist/src/icons/with-active.js +25 -0
- package/dist/src/index.js +0 -40
- package/dist/src/kibo/gantt-features.js +0 -10
- package/dist/src/kibo/gantt-provider.js +0 -34
- package/dist/src/kibo/kanban.js +0 -15
- package/dist/src/kibo/list.js +0 -3
- package/dist/src/kibo/video-player.js +0 -7
- package/dist/src/logos/index.js +0 -4
- package/dist/src/markdown/Markdown.js +0 -15
- package/dist/src/markdown/MarkdownCodeBlock.js +0 -16
- package/dist/src/markdown/MarkdownInlineCode.js +0 -6
- package/dist/src/markdown/MarkdownLink.js +0 -5
- package/dist/src/markdown/codeFence.js +0 -1
- package/dist/src/markdown/codeHighlight.js +0 -19
- package/dist/src/markdown/incrementalBlocks.js +0 -45
- package/dist/src/markdown/markdownClipboard.js +0 -13
- package/dist/src/markdown/mermaid.js +0 -25
- package/dist/src/markdown/rehypeGithubAlerts.js +0 -4
- package/dist/src/markdown/useSmoothText.js +0 -5
- package/dist/src/marketing/PricingModal.js +0 -2
- package/dist/src/marketing/ProductHero.js +0 -2
- package/dist/src/marketing/createLandingKit.js +0 -5
- package/dist/src/marketing/marketing-classes.js +0 -7
- package/dist/src/motion/dock-motion.js +0 -27
- package/dist/src/motion/panel-transition.js +0 -2
- package/dist/src/ui/_field-classes.js +0 -3
- package/dist/src/ui/_menu-classes.js +0 -6
- package/dist/src/ui/_picker-classes.js +0 -9
- package/dist/src/ui/accordion.alt.js +0 -12
- package/dist/src/ui/badge.js +0 -1
- package/dist/src/ui/border-beam.js +0 -2
- package/dist/src/ui/breadcrumb.js +0 -15
- package/dist/src/ui/bulk-action-bar.js +0 -11
- package/dist/src/ui/button.js +0 -20
- package/dist/src/ui/calendar.js +1 -20
- package/dist/src/ui/card.js +0 -3
- package/dist/src/ui/carousel.js +0 -1
- package/dist/src/ui/clear-input.alt.js +0 -9
- package/dist/src/ui/clearInputDissolve.js +0 -4
- package/dist/src/ui/command.js +0 -15
- package/dist/src/ui/confetti-burst.js +0 -3
- package/dist/src/ui/confirm-dialog-parts.js +0 -11
- package/dist/src/ui/confirm-dialog.js +0 -6
- package/dist/src/ui/crossfade-icon.js +0 -2
- package/dist/src/ui/date-picker.js +0 -22
- package/dist/src/ui/dialog.js +0 -5
- package/dist/src/ui/empty-state.js +0 -7
- package/dist/src/ui/field.js +0 -21
- package/dist/src/ui/image-lightbox.js +0 -5
- package/dist/src/ui/input-group.alt.js +0 -24
- package/dist/src/ui/input-group.js +0 -4
- package/dist/src/ui/kbd.js +0 -3
- package/dist/src/ui/loading-state.js +0 -17
- package/dist/src/ui/marquee-on-hover.js +0 -3
- package/dist/src/ui/media-preview.js +0 -2
- package/dist/src/ui/modalTransition.js +0 -33
- package/dist/src/ui/overlay-a11y.js +0 -1
- package/dist/src/ui/page-title.js +0 -3
- package/dist/src/ui/refresh-spin-icon.js +0 -12
- package/dist/src/ui/search-input.js +0 -1
- package/dist/src/ui/select-field.js +0 -1
- package/dist/src/ui/send-queue-icon.js +0 -3
- package/dist/src/ui/sheet.js +0 -33
- package/dist/src/ui/slider.js +103 -82
- package/dist/src/ui/sonner-icons.js +0 -5
- package/dist/src/ui/sonner.js +0 -60
- package/dist/src/ui/spinner.js +0 -35
- package/dist/src/ui/status-dot.js +0 -2
- package/dist/src/ui/surface.js +0 -14
- package/dist/src/ui/switch.js +213 -36
- package/dist/src/ui/table.js +0 -1
- package/dist/src/ui/tabs-transition.js +0 -1
- package/dist/src/ui/tabs.js +0 -17
- package/dist/src/ui/tabsSliding.js +0 -6
- package/dist/src/ui/time-picker.js +0 -15
- package/dist/src/ui/toggle-search.js +0 -3
- package/dist/src/ui/ui-config.js +0 -16
- package/dist/src/utils/cat-color.js +0 -17
- package/dist/src/utils/cn.js +0 -5
- package/dist/src/utils/gesture.js +0 -8
- package/dist/src/utils/ref.js +0 -1
- package/dist/src/utils/runtimeVisibility.js +1 -22
- package/dist/src/utils/surface-radius.js +0 -11
- package/dist/src/utils/useDragSensors.js +0 -4
- package/dist/tokens/src/tailwind-preset.mjs +0 -3
- package/package.json +1 -1
- package/scripts/build-brand-assets.mjs +0 -8
- package/shell/src/AppShell.tsx +0 -37
- package/shell/src/AppSidebar.tsx +0 -14
- package/shell/src/ButtonTrack.tsx +0 -1
- package/shell/src/PageHeaderBar.tsx +0 -61
- package/shell/src/PageWrapper.tsx +0 -26
- package/shell/src/PillTabs.tsx +0 -1
- package/shell/src/SessionsHoverCard.tsx +0 -40
- package/shell/src/SidePanelTabs.tsx +0 -61
- package/shell/src/Sidebar.tsx +0 -1
- package/shell/src/SidebarAccountMenu.tsx +0 -40
- package/shell/src/SidebarChrome.tsx +0 -32
- package/shell/src/SidebarIconTooltip.tsx +0 -3
- package/shell/src/SidebarPanel.tsx +0 -20
- package/shell/src/SidebarRail.tsx +0 -44
- package/shell/src/SidebarResize.tsx +0 -6
- package/shell/src/SidebarUpgradeCard.tsx +0 -2
- package/shell/src/SignOutDialog.tsx +0 -6
- package/shell/src/app-shell-classes.ts +0 -15
- package/shell/src/index.ts +0 -1
- package/shell/src/shell-panel-motion.ts +0 -11
- package/shell/src/shell-variant.ts +0 -6
- package/src/ai-elements/activity-question.tsx +0 -2
- package/src/ai-elements/activity-shared.tsx +0 -11
- package/src/ai-elements/activity-step-detail.tsx +0 -2
- package/src/ai-elements/activity-step-label.ts +0 -5
- package/src/ai-elements/activity-step-types.ts +0 -24
- package/src/ai-elements/activity-tasks-utils.ts +0 -13
- package/src/ai-elements/activity-tasks.tsx +0 -61
- package/src/ai-elements/artifact.tsx +0 -7
- package/src/ai-elements/attachments.tsx +0 -33
- package/src/ai-elements/chat-day-divider.tsx +0 -3
- package/src/ai-elements/chat-jump-rail.tsx +0 -9
- package/src/ai-elements/code-block.tsx +0 -28
- package/src/ai-elements/collapsible-user-message-body.tsx +0 -2
- package/src/ai-elements/context.tsx +0 -10
- package/src/ai-elements/conversation.tsx +0 -16
- package/src/ai-elements/jump-rail.tsx +0 -31
- package/src/ai-elements/message.tsx +0 -32
- package/src/ai-elements/model-picker-content.tsx +0 -17
- package/src/ai-elements/model-picker-types.ts +0 -5
- package/src/ai-elements/model-picker.tsx +0 -36
- package/src/ai-elements/model-selector.tsx +0 -5
- package/src/ai-elements/prompt-input-speech.tsx +0 -11
- package/src/ai-elements/prompt-input.tsx +0 -26
- package/src/ai-elements/provider-icon.tsx +0 -2
- package/src/ai-elements/queue.tsx +0 -19
- package/src/ai-elements/reasoning.tsx +0 -4
- package/src/ai-elements/shimmer.tsx +0 -16
- package/src/ai-elements/simple-model-ladder.tsx +0 -1
- package/src/ai-elements/speech-input.tsx +0 -6
- package/src/ai-elements/test-results.tsx +0 -5
- package/src/ai-elements/trace.tsx +0 -2
- package/src/ai-elements/web-preview.tsx +0 -7
- package/src/artifacts/artifact-card.tsx +0 -7
- package/src/artifacts/artifact-dialogs.tsx +0 -4
- package/src/artifacts/artifact-frame.tsx +0 -10
- package/src/artifacts/artifact-list-toolbar.tsx +0 -6
- package/src/artifacts/artifact-list.tsx +0 -4
- package/src/artifacts/artifact-type-icon.tsx +0 -1
- package/src/artifacts/artifact-versions-menu.tsx +0 -3
- package/src/artifacts/artifact-viewer.tsx +0 -5
- package/src/artifacts/types.ts +0 -1
- package/src/audio/playChime.ts +0 -1
- package/src/audio/playTone.ts +0 -7
- package/src/brand/AppIcons.tsx +0 -5
- package/src/brand/AppMark.tsx +0 -6
- package/src/brand/AppWordmark.tsx +0 -10
- package/src/brand/familyApps.ts +0 -2
- package/src/brand/svg.ts +0 -9
- package/src/client.ts +0 -34
- package/src/composer/Composer.tsx +0 -70
- package/src/composer/input-area/ComposerSlashMenu.tsx +0 -1
- package/src/composer/input-area/ConnectionStatusMenuItem.tsx +0 -2
- package/src/composer/input-area/FadePresence.tsx +0 -4
- package/src/composer/input-area/InputActions.tsx +0 -5
- package/src/composer/input-area/InputArea.tsx +1 -28
- package/src/composer/input-area/InputAreaEditor.tsx +0 -39
- package/src/composer/input-area/InputBanners.tsx +0 -1
- package/src/composer/input-area/PromoBanner.tsx +0 -1
- package/src/composer/input-area/composerPrediction.ts +0 -2
- package/src/composer/input-area/useComposerSlashMenu.ts +0 -1
- package/src/composer/input-area/useInputAreaPrediction.ts +0 -1
- package/src/composer/prediction.ts +0 -6
- package/src/composer/useComposerPrediction.ts +0 -2
- package/src/generative-ui/GenerativeUiPanel.tsx +0 -11
- package/src/generative-ui/content.tsx +0 -2
- package/src/generative-ui/index.ts +0 -3
- package/src/generative-ui/layout.tsx +0 -5
- package/src/hooks/use-count-up-display.ts +0 -1
- package/src/hooks/use-idle-callback.ts +0 -5
- package/src/hooks/use-persisted-scroll-parent.ts +0 -4
- package/src/hooks/use-single-flight.ts +0 -5
- package/src/icons/animated/animated-bell-icon.tsx +0 -6
- package/src/icons/animated/animated-counter.tsx +0 -5
- package/src/icons/animated/animated-key-icon.tsx +0 -4
- package/src/icons/animated/animated-notification-icon.tsx +0 -14
- package/src/icons/animated/animated-progress.tsx +0 -10
- package/src/icons/animated/animated-status-dot.tsx +0 -4
- package/src/icons/animated/index.ts +0 -4
- package/src/icons/animated/morphing-menu-icon.tsx +0 -5
- package/src/icons/animated/morphing-mic-icon.tsx +0 -2
- package/src/icons/animated/pulsing-rings.tsx +0 -4
- package/src/icons/automation-icon.tsx +0 -1
- package/src/icons/board-icon.tsx +13 -10
- package/src/icons/bolt-icon.tsx +5 -4
- package/src/icons/building-icon.tsx +11 -9
- package/src/icons/draft-icon.tsx +0 -1
- package/src/icons/files-icon.tsx +9 -5
- package/src/icons/inbox-arrow-icon.tsx +0 -1
- package/src/icons/inbox-icon.tsx +9 -5
- package/src/icons/index.ts +12 -1
- package/src/icons/memory-icon.tsx +9 -11
- package/src/icons/nav-icon-base.tsx +0 -10
- package/src/icons/search-icon.tsx +7 -6
- package/src/icons/settings-icon.tsx +11 -13
- package/src/icons/sidebar-toggle-icon.tsx +0 -1
- package/src/icons/solid-icons.tsx +138 -0
- package/src/icons/with-active.tsx +14 -0
- package/src/index.ts +0 -30
- package/src/kibo/gantt-features.tsx +0 -16
- package/src/kibo/gantt-header.tsx +0 -4
- package/src/kibo/gantt-provider.tsx +0 -36
- package/src/kibo/gantt-sidebar.tsx +0 -7
- package/src/kibo/gantt-timeline.tsx +0 -4
- package/src/kibo/kanban.tsx +0 -49
- package/src/kibo/list.tsx +0 -8
- package/src/kibo/theme-switcher.tsx +0 -5
- package/src/kibo/video-player.tsx +0 -9
- package/src/logos/index.ts +0 -3
- package/src/logos/logo-svg.tsx +0 -5
- package/src/markdown/Markdown.tsx +0 -20
- package/src/markdown/MarkdownCodeBlock.tsx +0 -14
- package/src/markdown/MarkdownInlineCode.tsx +0 -6
- package/src/markdown/MarkdownLink.tsx +0 -4
- package/src/markdown/codeFence.ts +0 -3
- package/src/markdown/codeHighlight.ts +0 -16
- package/src/markdown/incrementalBlocks.ts +0 -49
- package/src/markdown/markdownClipboard.ts +0 -12
- package/src/markdown/mermaid.ts +0 -22
- package/src/markdown/rehypeGithubAlerts.ts +0 -3
- package/src/markdown/useSmoothText.ts +0 -5
- package/src/marketing/FloatingBar.tsx +0 -3
- package/src/marketing/PricingModal.tsx +0 -45
- package/src/marketing/ProductHero.tsx +0 -23
- package/src/marketing/ProductHeroOrbit.tsx +0 -5
- package/src/marketing/SiteFooter.tsx +0 -23
- package/src/marketing/SiteHeader.tsx +0 -14
- package/src/marketing/VProPricingModal.tsx +0 -5
- package/src/marketing/createLandingKit.tsx +0 -12
- package/src/marketing/landing.tsx +0 -12
- package/src/marketing/marketing-classes.ts +0 -7
- package/src/motion/dock-motion.ts +0 -25
- package/src/motion/list-enter.tsx +0 -4
- package/src/motion/panel-transition.tsx +0 -5
- package/src/ui/_field-classes.ts +0 -2
- package/src/ui/_menu-classes.ts +0 -4
- package/src/ui/_menu-parts.tsx +0 -5
- package/src/ui/_picker-classes.ts +0 -6
- package/src/ui/accordion.alt.tsx +0 -8
- package/src/ui/accordion.tsx +0 -4
- package/src/ui/badge.tsx +0 -1
- package/src/ui/border-beam.tsx +0 -11
- package/src/ui/breadcrumb.tsx +0 -13
- package/src/ui/bulk-action-bar.tsx +0 -24
- package/src/ui/button.tsx +0 -27
- package/src/ui/calendar.tsx +0 -18
- package/src/ui/card.tsx +0 -3
- package/src/ui/carousel.tsx +0 -4
- package/src/ui/checkbox.tsx +0 -1
- package/src/ui/clear-input.alt.tsx +0 -8
- package/src/ui/clear-input.tsx +0 -16
- package/src/ui/clearInputDissolve.ts +0 -4
- package/src/ui/command.tsx +0 -22
- package/src/ui/confetti-burst.tsx +0 -4
- package/src/ui/confirm-dialog-parts.tsx +0 -45
- package/src/ui/confirm-dialog.tsx +0 -26
- package/src/ui/context-menu.tsx +0 -10
- package/src/ui/count-pop.tsx +0 -2
- package/src/ui/crossfade-icon.tsx +0 -3
- package/src/ui/date-picker.tsx +0 -40
- package/src/ui/dialog.tsx +0 -18
- package/src/ui/dropdown-menu.tsx +0 -11
- package/src/ui/empty-state.tsx +0 -15
- package/src/ui/error-boundary.tsx +0 -7
- package/src/ui/field.tsx +0 -18
- package/src/ui/hover-card.tsx +0 -6
- package/src/ui/image-lightbox.tsx +0 -7
- package/src/ui/input-group.alt.tsx +0 -16
- package/src/ui/input-group.tsx +0 -3
- package/src/ui/kbd.tsx +0 -3
- package/src/ui/label.tsx +0 -1
- package/src/ui/labeled-slider-row.tsx +0 -2
- package/src/ui/list-row.tsx +0 -46
- package/src/ui/loading-state.tsx +0 -23
- package/src/ui/marquee-on-hover.tsx +1 -6
- package/src/ui/media-preview.tsx +0 -5
- package/src/ui/modalTransition.ts +0 -25
- package/src/ui/overlay-a11y.ts +0 -1
- package/src/ui/page-title.tsx +0 -4
- package/src/ui/popover.tsx +0 -8
- package/src/ui/progress.tsx +0 -1
- package/src/ui/refresh-spin-icon.tsx +0 -11
- package/src/ui/relative-date-time.tsx +0 -3
- package/src/ui/rolling-number.tsx +0 -2
- package/src/ui/search-input.tsx +0 -9
- package/src/ui/select-field.tsx +0 -5
- package/src/ui/select.tsx +0 -8
- package/src/ui/send-queue-icon.tsx +0 -3
- package/src/ui/separator.tsx +0 -1
- package/src/ui/sheet.tsx +0 -42
- package/src/ui/slide-over-panel.tsx +0 -2
- package/src/ui/slider.tsx +21 -9
- package/src/ui/sonner-icons.tsx +0 -4
- package/src/ui/sonner.tsx +0 -78
- package/src/ui/spinner.tsx +0 -50
- package/src/ui/status-dot.tsx +0 -10
- package/src/ui/surface.tsx +0 -13
- package/src/ui/switch.tsx +72 -3
- package/src/ui/table.tsx +0 -3
- package/src/ui/tabs-transition.tsx +0 -12
- package/src/ui/tabs.tsx +0 -17
- package/src/ui/tabsSliding.ts +0 -5
- package/src/ui/time-picker.tsx +0 -17
- package/src/ui/toggle-search.tsx +0 -6
- package/src/ui/toolbar-search-input.tsx +0 -3
- package/src/ui/tooltip.tsx +0 -5
- package/src/ui/ui-config.tsx +0 -19
- package/src/utils/cat-color.ts +0 -20
- package/src/utils/cn.ts +0 -4
- package/src/utils/gesture.ts +0 -8
- package/src/utils/ref.ts +0 -1
- package/src/utils/runtimeVisibility.ts +0 -19
- package/src/utils/surface-radius.ts +0 -11
- package/src/utils/useDragSensors.ts +0 -2
- package/tokens/examples/compat-shadcn-rgb/vite.config.ts +0 -2
- package/tokens/examples/toaster/Fixture.tsx +0 -4
- package/tokens/examples/toaster/UpdateToastFixture.tsx +0 -4
- package/tokens/examples/toaster/vite.config.ts +0 -2
- package/tokens/examples/tokens-moved/Fixture.tsx +0 -4
- package/tokens/examples/tokens-moved/vite.config.ts +0 -2
- package/tokens/src/tailwind-preset.mjs +0 -3
|
@@ -810,10 +810,6 @@ function joinCommandText(verb: string, target: string): string {
|
|
|
810
810
|
return `${verb} ${target}`;
|
|
811
811
|
}
|
|
812
812
|
|
|
813
|
-
/**
|
|
814
|
-
* Past-tense phrase used when a step type is folded into a group summary line.
|
|
815
|
-
* Deliberately plural/vague — the exact call is one click away in the fold.
|
|
816
|
-
*/
|
|
817
813
|
const GROUP_PHRASES: Record<ActivityStep["type"], string> = {
|
|
818
814
|
read: "read files",
|
|
819
815
|
edit: "edited files",
|
|
@@ -841,7 +837,6 @@ function groupPhraseForStep(step: ActivityStep): string {
|
|
|
841
837
|
if (step.type !== "tool") {
|
|
842
838
|
return GROUP_PHRASES[step.type];
|
|
843
839
|
}
|
|
844
|
-
// Codex reports edits as a `file_change` tool call, not an edit step.
|
|
845
840
|
if (isFileChangeTool(step)) {
|
|
846
841
|
return GROUP_PHRASES.edit;
|
|
847
842
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// Pure step types for the activity timeline: no React, so `@vvedantb/native-ui`
|
|
2
|
-
// keeps a byte-identical copy (`src/ai/activity-step-types.ts`), with the step
|
|
3
|
-
// labels and grouping that read them.
|
|
4
|
-
|
|
5
1
|
/** One item in a todo checklist step (type "todos"). */
|
|
6
2
|
export interface ActivityTodoItem {
|
|
7
3
|
content: string;
|
|
@@ -54,43 +50,23 @@ export interface ActivityStep {
|
|
|
54
50
|
| "notice"
|
|
55
51
|
| "hook"
|
|
56
52
|
| "status"
|
|
57
|
-
/** A queued user message the agent took into this live turn (Steer). */
|
|
58
53
|
| "steer";
|
|
59
54
|
label: string;
|
|
60
55
|
detail?: string;
|
|
61
|
-
/** Full, unshortened path for file-type steps. Powers the chat File Viewer. */
|
|
62
56
|
path?: string;
|
|
63
|
-
/** `pending`: a planned step that has not started (sandbox startup stages). */
|
|
64
57
|
status: "complete" | "active" | "pending";
|
|
65
|
-
/** The tool_use id that produced this step (Claude only). */
|
|
66
58
|
toolUseId?: string;
|
|
67
|
-
/** Parent `Agent` tool_use id — set on steps that ran inside a subagent. */
|
|
68
59
|
parentToolUseId?: string;
|
|
69
|
-
/** Todo checklist snapshot (type "todos" only). */
|
|
70
60
|
todos?: ActivityTodoItem[];
|
|
71
|
-
/** Bash command (fuller than detail, capped). */
|
|
72
61
|
command?: string;
|
|
73
|
-
/** Tool result transcript (tail-capped). */
|
|
74
62
|
output?: ActivityStepOutput;
|
|
75
|
-
/** Edit before/after snippets. */
|
|
76
63
|
edits?: ActivityStepEdit[];
|
|
77
|
-
/** Codex file_change paths. */
|
|
78
64
|
files?: string[];
|
|
79
|
-
/** Write tool content head preview. */
|
|
80
65
|
contentPreview?: string;
|
|
81
|
-
/** True when the tool failed or exited non-zero. */
|
|
82
66
|
isError?: boolean;
|
|
83
|
-
/** Wall time from push → complete (ms). */
|
|
84
67
|
durationMs?: number;
|
|
85
|
-
/** AskUserQuestion prompt (type "question" only): the questions and options shown to the user. */
|
|
86
68
|
questions?: ActivityQuestion[];
|
|
87
|
-
/** AskUserQuestion answers keyed by question text. Absent when the turn ended without a structured answer. */
|
|
88
69
|
answers?: Record<string, string>;
|
|
89
|
-
/**
|
|
90
|
-
* The transcript query stripped this step's expanded-only fields (`output`,
|
|
91
|
-
* `edits`, `contentPreview`) to keep the chat subscription small. The row
|
|
92
|
-
* still opens; the body fills in once the full payload is fetched.
|
|
93
|
-
*/
|
|
94
70
|
hasHiddenDetail?: boolean;
|
|
95
71
|
}
|
|
96
72
|
|
|
@@ -9,11 +9,6 @@ export interface ActivityRow {
|
|
|
9
9
|
children?: ActivityRow[];
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* Status-filler thinking labels emitted by older callback versions (and by
|
|
14
|
-
* prod until the current callback deploys). The response/reasoning text is
|
|
15
|
-
* shown directly, so these narration rows are pure noise — hide them.
|
|
16
|
-
*/
|
|
17
12
|
const LEGACY_NOISE_LABELS = new Set([
|
|
18
13
|
"Generating response...",
|
|
19
14
|
"Generated response",
|
|
@@ -22,10 +17,8 @@ const LEGACY_NOISE_LABELS = new Set([
|
|
|
22
17
|
"Finalizing response...",
|
|
23
18
|
]);
|
|
24
19
|
|
|
25
|
-
/** Thinking labels that mark model reasoning rather than status narration. */
|
|
26
20
|
const REASONING_LABELS = new Set(["Thinking...", "Thought"]);
|
|
27
21
|
|
|
28
|
-
/** Placeholder details older callbacks attached to reasoning-label steps. */
|
|
29
22
|
const FILLER_DETAILS = new Set([
|
|
30
23
|
"Claude is reasoning...",
|
|
31
24
|
"Codex is reasoning...",
|
|
@@ -51,7 +44,6 @@ export function normalizeStep(step: ActivityStep): ActivityStep | null {
|
|
|
51
44
|
return step;
|
|
52
45
|
}
|
|
53
46
|
|
|
54
|
-
/** Builds one row per normalized step (no consecutive-type merging). */
|
|
55
47
|
function stepsToRows(steps: ActivityStep[]): ActivityRow[] {
|
|
56
48
|
const rows: ActivityRow[] = [];
|
|
57
49
|
for (const raw of steps) {
|
|
@@ -62,10 +54,6 @@ function stepsToRows(steps: ActivityStep[]): ActivityRow[] {
|
|
|
62
54
|
return rows;
|
|
63
55
|
}
|
|
64
56
|
|
|
65
|
-
/**
|
|
66
|
-
* Row types that read as narration rather than work: they already summarise
|
|
67
|
-
* themselves, so folding them into an action group would hide their only text.
|
|
68
|
-
*/
|
|
69
57
|
const STANDALONE_TYPES = new Set<ActivityStep["type"]>([
|
|
70
58
|
"todos",
|
|
71
59
|
"notice",
|
|
@@ -95,7 +83,6 @@ export function groupActivityRows(rows: ActivityRow[]): ActivitySegment[] {
|
|
|
95
83
|
segments.push({ kind: "reasoning", step: row.step });
|
|
96
84
|
continue;
|
|
97
85
|
}
|
|
98
|
-
// Mid-turn reply text: it ends the tool run before it, like reasoning.
|
|
99
86
|
if (row.step.type === "response") {
|
|
100
87
|
segments.push({ kind: "response", step: row.step });
|
|
101
88
|
continue;
|
|
@@ -59,7 +59,6 @@ import {
|
|
|
59
59
|
import { useStreamingDisclosure } from "./use-streaming-disclosure";
|
|
60
60
|
import { RollingNumber } from "../ui/rolling-number";
|
|
61
61
|
|
|
62
|
-
/** The app's Markdown renderer (`UiConfig.ActivityTasks.markdown`), or the package `Markdown`. */
|
|
63
62
|
function useActivityMarkdown(): ComponentType<ActivityMarkdownProps> {
|
|
64
63
|
return useUiConfig("ActivityTasks")?.markdown ?? PackageMarkdown;
|
|
65
64
|
}
|
|
@@ -76,7 +75,6 @@ const ActivityStreamingHeader = memo(function ActivityStreamingHeader({
|
|
|
76
75
|
const verb = useActivitySpinnerVerb(true);
|
|
77
76
|
const elapsed = useActivityElapsedSeconds(startedAt, true);
|
|
78
77
|
const defaultName = useUiConfig("ActivityTasks")?.name ?? "Agent";
|
|
79
|
-
// Reply text is not a status: label the header from the work steps only.
|
|
80
78
|
const work = steps.filter((s) => s.type !== "response");
|
|
81
79
|
const activeStep = work.find((s) => s.status === "active") ?? work[0];
|
|
82
80
|
const headerText =
|
|
@@ -88,7 +86,6 @@ const ActivityStreamingHeader = memo(function ActivityStreamingHeader({
|
|
|
88
86
|
<Shimmer as="span" duration={2.5} spread={1.5}>
|
|
89
87
|
{headerText}
|
|
90
88
|
</Shimmer>
|
|
91
|
-
{/* Outside the shimmer: it takes a string, and the clock rolls. */}
|
|
92
89
|
{startedAt ? (
|
|
93
90
|
<>
|
|
94
91
|
{" ("}
|
|
@@ -101,19 +98,12 @@ const ActivityStreamingHeader = memo(function ActivityStreamingHeader({
|
|
|
101
98
|
);
|
|
102
99
|
});
|
|
103
100
|
|
|
104
|
-
/** Max timeline blocks shown before the overflow toggle appears. */
|
|
105
101
|
const MAX_VISIBLE_ROWS = 8;
|
|
106
102
|
|
|
107
|
-
/** Max nested child rows shown under a subtask before "+N more". */
|
|
108
103
|
const MAX_VISIBLE_CHILDREN = 8;
|
|
109
104
|
|
|
110
|
-
/**
|
|
111
|
-
* Both layouts show mid-turn reply text in the timeline, in the order it was
|
|
112
|
-
* written, so a live turn never stacks its first words below newer steps.
|
|
113
|
-
*/
|
|
114
105
|
const HIDDEN_TYPES = new Set<ActivityStep["type"]>(["thinking"]);
|
|
115
106
|
|
|
116
|
-
/** A subagent's own text belongs to its child thread view, not under its row. */
|
|
117
107
|
const HIDDEN_CHILD_TYPES = new Set<ActivityStep["type"]>([
|
|
118
108
|
"thinking",
|
|
119
109
|
"response",
|
|
@@ -126,7 +116,6 @@ const HIDDEN_CHILD_TYPES = new Set<ActivityStep["type"]>([
|
|
|
126
116
|
*/
|
|
127
117
|
export type ActivityLayout = "folded" | "inline";
|
|
128
118
|
|
|
129
|
-
/** Nearest ancestor that actually scrolls — used to keep the overflow toggle pinned. */
|
|
130
119
|
function findScrollParent(el: HTMLElement): HTMLElement | null {
|
|
131
120
|
let current = el.parentElement;
|
|
132
121
|
while (current) {
|
|
@@ -144,11 +133,6 @@ function findScrollParent(el: HTMLElement): HTMLElement | null {
|
|
|
144
133
|
return null;
|
|
145
134
|
}
|
|
146
135
|
|
|
147
|
-
/**
|
|
148
|
-
* Expand/collapse while keeping `anchor` visually fixed (t3code work-group
|
|
149
|
-
* toggle pattern). Content inserted above the control would otherwise shove it
|
|
150
|
-
* down the viewport.
|
|
151
|
-
*/
|
|
152
136
|
function toggleWithScrollCompensation(
|
|
153
137
|
anchor: HTMLElement,
|
|
154
138
|
toggle: () => void,
|
|
@@ -165,11 +149,6 @@ function toggleWithScrollCompensation(
|
|
|
165
149
|
|
|
166
150
|
export type { ActivityStep };
|
|
167
151
|
|
|
168
|
-
/**
|
|
169
|
-
* Asks the owner of the payload for the untrimmed steps. Passed by context
|
|
170
|
-
* rather than props because all three collapsibles that can reveal a stripped
|
|
171
|
-
* row sit at different depths, and none of them otherwise needs the callback.
|
|
172
|
-
*/
|
|
173
152
|
const RequestFullDetailContext = createContext<(() => void) | undefined>(
|
|
174
153
|
undefined,
|
|
175
154
|
);
|
|
@@ -183,7 +162,6 @@ export const OpenSubagentContext = createContext<
|
|
|
183
162
|
((toolUseId: string) => void) | undefined
|
|
184
163
|
>(undefined);
|
|
185
164
|
|
|
186
|
-
/** "View" link on a subtask row that opens its child thread. */
|
|
187
165
|
function OpenSubagentButton({ toolUseId }: { toolUseId: string | undefined }) {
|
|
188
166
|
const open = useContext(OpenSubagentContext);
|
|
189
167
|
if (!open || !toolUseId) return null;
|
|
@@ -202,7 +180,6 @@ function OpenSubagentButton({ toolUseId }: { toolUseId: string | undefined }) {
|
|
|
202
180
|
);
|
|
203
181
|
}
|
|
204
182
|
|
|
205
|
-
/** `onOpenChange` handler that asks for the full payload the first time a fold opens. */
|
|
206
183
|
function useRequestFullDetailOnOpen(): (open: boolean) => void {
|
|
207
184
|
const request = useContext(RequestFullDetailContext);
|
|
208
185
|
return (open: boolean) => {
|
|
@@ -217,24 +194,12 @@ export interface ActivityTasksProps extends ComponentProps<"div"> {
|
|
|
217
194
|
icon?: ReactNode;
|
|
218
195
|
startedAt?: number;
|
|
219
196
|
duration?: string;
|
|
220
|
-
/** @deprecated Unused; kept so existing call sites compile unchanged. */
|
|
221
197
|
finalText?: string;
|
|
222
|
-
/**
|
|
223
|
-
* When provided, file chips with a known full path become clickable and call
|
|
224
|
-
* this with the path. Pass a stable callback — {@link ActivityTasks} is memoised.
|
|
225
|
-
*/
|
|
226
198
|
onOpenFile?: (path: string) => void;
|
|
227
|
-
/**
|
|
228
|
-
* Called when a reader opens a fold that may contain step detail the
|
|
229
|
-
* transcript query stripped (see {@link ActivityStep.hasHiddenDetail}). Fires
|
|
230
|
-
* on every open, so the owner is responsible for fetching once.
|
|
231
|
-
*/
|
|
232
199
|
onRequestFullDetail?: () => void;
|
|
233
|
-
/** Defaults to `folded`. See {@link ActivityLayout}. */
|
|
234
200
|
layout?: ActivityLayout;
|
|
235
201
|
}
|
|
236
202
|
|
|
237
|
-
/** Status glyph for one todo row. */
|
|
238
203
|
function TodoStatusIcon({ status }: { status: ActivityTodoItem["status"] }) {
|
|
239
204
|
return (
|
|
240
205
|
<CrossfadeIconSlot
|
|
@@ -253,7 +218,6 @@ function TodoStatusIcon({ status }: { status: ActivityTodoItem["status"] }) {
|
|
|
253
218
|
);
|
|
254
219
|
}
|
|
255
220
|
|
|
256
|
-
/** Renders a todo checklist, or a plain fallback line for legacy/empty snapshots. */
|
|
257
221
|
function TodoChecklist({
|
|
258
222
|
todos,
|
|
259
223
|
fallback,
|
|
@@ -299,7 +263,6 @@ function bashIconForKind(kind: CommandVisualKind) {
|
|
|
299
263
|
return IconTerminal2;
|
|
300
264
|
}
|
|
301
265
|
|
|
302
|
-
/** Glyph for a step — shell steps swap in a glyph matching what they ran. */
|
|
303
266
|
function iconForStep(step: ActivityStep) {
|
|
304
267
|
if (step.type === "bash" && step.detail) {
|
|
305
268
|
return bashIconForKind(resolveCommandVisualKind(step.detail));
|
|
@@ -314,17 +277,12 @@ function traceStatusForStep(step: ActivityStep): AgentTraceStatus | undefined {
|
|
|
314
277
|
return undefined;
|
|
315
278
|
}
|
|
316
279
|
|
|
317
|
-
/** Whole seconds a finished step took; undefined when unknown or under 1s. */
|
|
318
280
|
function stepSeconds(step: ActivityStep): number | undefined {
|
|
319
281
|
if (step.status !== "complete" || !step.durationMs) return undefined;
|
|
320
282
|
const seconds = Math.round(step.durationMs / 1000);
|
|
321
283
|
return seconds >= 1 ? seconds : undefined;
|
|
322
284
|
}
|
|
323
285
|
|
|
324
|
-
/**
|
|
325
|
-
* One thinking block behind a "Thought 12s" line. Streaming steps open
|
|
326
|
-
* themselves so live thinking is readable as it lands, then auto-close.
|
|
327
|
-
*/
|
|
328
286
|
function ActivityReasoningLine({ step }: { step: ActivityStep }) {
|
|
329
287
|
const thoughts = step.detail?.trim() ?? "";
|
|
330
288
|
const isActive = step.status === "active";
|
|
@@ -355,7 +313,6 @@ function ActivityReasoningLine({ step }: { step: ActivityStep }) {
|
|
|
355
313
|
);
|
|
356
314
|
}
|
|
357
315
|
|
|
358
|
-
/** The to-do snapshot as one line with done/total, folding open to the checklist. */
|
|
359
316
|
function ActivityTodosLine({ step }: { step: ActivityStep }) {
|
|
360
317
|
const isActive = step.status === "active";
|
|
361
318
|
const todos = step.todos ?? [];
|
|
@@ -384,7 +341,6 @@ function ActivityTodosLine({ step }: { step: ActivityStep }) {
|
|
|
384
341
|
);
|
|
385
342
|
}
|
|
386
343
|
|
|
387
|
-
/** One per-call activity line with Synara-style humanized label. */
|
|
388
344
|
function ActivityStepRow({
|
|
389
345
|
row,
|
|
390
346
|
onOpenFile,
|
|
@@ -452,14 +408,11 @@ function ActivityStepRow({
|
|
|
452
408
|
);
|
|
453
409
|
}
|
|
454
410
|
|
|
455
|
-
// Subagent steps start open so their inner steps stay visible, as before.
|
|
456
411
|
return (
|
|
457
412
|
<AgentTraceCollapsible
|
|
458
413
|
defaultOpen={shownChildren.length > 0}
|
|
459
414
|
onOpenChange={requestFullDetail}
|
|
460
415
|
>
|
|
461
|
-
{/* The file chip opens the file viewer, so it sits beside the trigger:
|
|
462
|
-
a button inside the trigger button would be invalid HTML. */}
|
|
463
416
|
<AgentTraceCollapsibleTrigger
|
|
464
417
|
trailing={
|
|
465
418
|
fileChip || openSubagent ? (
|
|
@@ -495,8 +448,6 @@ function ActivityStepRow({
|
|
|
495
448
|
);
|
|
496
449
|
}
|
|
497
450
|
|
|
498
|
-
/** Model reasoning, shown as ordinary prose rather than another muted row. */
|
|
499
|
-
/** Reply text the agent wrote between tool runs, set like the final reply. */
|
|
500
451
|
function ActivityResponseBlock({ step }: { step: ActivityStep }) {
|
|
501
452
|
const Markdown = useActivityMarkdown();
|
|
502
453
|
const text = step.detail?.trim();
|
|
@@ -522,7 +473,6 @@ function ActivityReasoningBlock({ step }: { step: ActivityStep }) {
|
|
|
522
473
|
);
|
|
523
474
|
}
|
|
524
475
|
|
|
525
|
-
/** A run of tool calls, folded behind one muted "what happened" summary line. */
|
|
526
476
|
function ActivityActionGroup({
|
|
527
477
|
rows,
|
|
528
478
|
onOpenFile,
|
|
@@ -539,9 +489,6 @@ function ActivityActionGroup({
|
|
|
539
489
|
|
|
540
490
|
return (
|
|
541
491
|
<AgentTraceCollapsible defaultOpen={isActive} onOpenChange={requestFullDetail}>
|
|
542
|
-
{/* Summary stays muted even when a call inside failed: agents run failing
|
|
543
|
-
commands on purpose, so one non-zero exit should not paint the run red.
|
|
544
|
-
The failed line itself is still red once the fold is open. */}
|
|
545
492
|
<AgentTraceCollapsibleTrigger>
|
|
546
493
|
<AgentTraceLine status={isActive ? "running" : undefined}>
|
|
547
494
|
<AgentTraceIcon iconKey={isActive ? "group-active" : "group-idle"}>
|
|
@@ -584,10 +531,6 @@ function ActivitySegmentBlock({
|
|
|
584
531
|
return <ActivityActionGroup rows={segment.rows} onOpenFile={onOpenFile} />;
|
|
585
532
|
}
|
|
586
533
|
|
|
587
|
-
/**
|
|
588
|
-
* Renders timeline blocks with an overflow cap. Settled turns cap from the front
|
|
589
|
-
* (first N); streaming turns cap from the end (newest N) so latest stays visible.
|
|
590
|
-
*/
|
|
591
534
|
function ActivityRowList({
|
|
592
535
|
rows,
|
|
593
536
|
isStreaming,
|
|
@@ -699,8 +642,6 @@ export const ActivityTasks = memo(
|
|
|
699
642
|
const rows = buildActivityRows(steps).filter(
|
|
700
643
|
(row) =>
|
|
701
644
|
!HIDDEN_TYPES.has(row.step.type) &&
|
|
702
|
-
// A subagent's text whose Agent row is missing still belongs to its
|
|
703
|
-
// child thread, never to the parent's inline reply.
|
|
704
645
|
!(row.step.type === "response" && row.step.parentToolUseId),
|
|
705
646
|
);
|
|
706
647
|
|
|
@@ -714,8 +655,6 @@ export const ActivityTasks = memo(
|
|
|
714
655
|
<Collapsible
|
|
715
656
|
className={merge("group text-sm", className)}
|
|
716
657
|
defaultOpen={false}
|
|
717
|
-
// Opening the turn prefetches the stripped detail, so the rows
|
|
718
|
-
// inside already have their bodies by the time one is clicked.
|
|
719
658
|
onOpenChange={(open) => {
|
|
720
659
|
if (open) onRequestFullDetail?.();
|
|
721
660
|
}}
|
|
@@ -23,7 +23,6 @@ export interface ArtifactConfig {
|
|
|
23
23
|
description?: string;
|
|
24
24
|
actions?: string;
|
|
25
25
|
action?: string;
|
|
26
|
-
/** Class of an icon given as a component (`icon={IconCopy}`). */
|
|
27
26
|
actionIcon?: string;
|
|
28
27
|
content?: string;
|
|
29
28
|
};
|
|
@@ -105,10 +104,8 @@ export const ArtifactActions = ({
|
|
|
105
104
|
|
|
106
105
|
type ArtifactIcon = ComponentType<{ className?: string }>;
|
|
107
106
|
|
|
108
|
-
/** A component (`IconCopy`) rather than a rendered node (`<IconCopy />`). */
|
|
109
107
|
function isIconComponent(icon: ReactNode | ArtifactIcon): icon is ArtifactIcon {
|
|
110
108
|
if (typeof icon === "function") return true;
|
|
111
|
-
// forwardRef / memo components are objects with `render` / `type`.
|
|
112
109
|
return (
|
|
113
110
|
typeof icon === "object" &&
|
|
114
111
|
icon !== null &&
|
|
@@ -119,7 +116,6 @@ function isIconComponent(icon: ReactNode | ArtifactIcon): icon is ArtifactIcon {
|
|
|
119
116
|
|
|
120
117
|
const renderIcon = (Icon: ArtifactIcon, className: string) => <Icon className={className} />;
|
|
121
118
|
|
|
122
|
-
/** Button shared by `ArtifactAction` and `ArtifactClose`. */
|
|
123
119
|
function ArtifactActionButton({
|
|
124
120
|
label,
|
|
125
121
|
className,
|
|
@@ -146,9 +142,7 @@ function ArtifactActionButton({
|
|
|
146
142
|
}
|
|
147
143
|
|
|
148
144
|
export type ArtifactActionProps = ComponentProps<typeof Button> & {
|
|
149
|
-
/** Without it the button renders alone, with no tooltip. */
|
|
150
145
|
tooltip?: string;
|
|
151
|
-
/** A node (`<IconCopy />`) or an icon component (`IconCopy`). */
|
|
152
146
|
icon?: ReactNode | ArtifactIcon;
|
|
153
147
|
label?: string;
|
|
154
148
|
};
|
|
@@ -180,7 +174,6 @@ export const ArtifactAction = ({
|
|
|
180
174
|
};
|
|
181
175
|
|
|
182
176
|
export type ArtifactCloseProps = ComponentProps<typeof Button> & {
|
|
183
|
-
/** Accessible name. Default `"Close"`. */
|
|
184
177
|
label?: string;
|
|
185
178
|
};
|
|
186
179
|
|
|
@@ -22,9 +22,6 @@ import {
|
|
|
22
22
|
IconX,
|
|
23
23
|
} from "@tabler/icons-react";
|
|
24
24
|
import { createContext, useContext } from "react";
|
|
25
|
-
// ============================================================================
|
|
26
|
-
// Types
|
|
27
|
-
// ============================================================================
|
|
28
25
|
export type AttachmentData =
|
|
29
26
|
| (FileUIPart & {
|
|
30
27
|
id: string;
|
|
@@ -60,9 +57,6 @@ const mediaCategoryIcons: Record<AttachmentMediaCategory, typeof IconPhoto> = {
|
|
|
60
57
|
unknown: IconPaperclip,
|
|
61
58
|
video: IconVideo,
|
|
62
59
|
};
|
|
63
|
-
// ============================================================================
|
|
64
|
-
// Utility Functions
|
|
65
|
-
// ============================================================================
|
|
66
60
|
export const getMediaCategory = (
|
|
67
61
|
data: AttachmentData,
|
|
68
62
|
): AttachmentMediaCategory => {
|
|
@@ -113,9 +107,6 @@ const renderAttachmentImage = (
|
|
|
113
107
|
width={20}
|
|
114
108
|
/>
|
|
115
109
|
);
|
|
116
|
-
// ============================================================================
|
|
117
|
-
// Contexts
|
|
118
|
-
// ============================================================================
|
|
119
110
|
interface AttachmentsContextValue {
|
|
120
111
|
variant: AttachmentVariant;
|
|
121
112
|
}
|
|
@@ -127,9 +118,6 @@ interface AttachmentContextValue {
|
|
|
127
118
|
variant: AttachmentVariant;
|
|
128
119
|
}
|
|
129
120
|
const AttachmentContext = createContext<AttachmentContextValue | null>(null);
|
|
130
|
-
// ============================================================================
|
|
131
|
-
// Hooks
|
|
132
|
-
// ============================================================================
|
|
133
121
|
export const useAttachmentsContext = () =>
|
|
134
122
|
useContext(AttachmentsContext) ?? { variant: "grid" as const };
|
|
135
123
|
export const useAttachmentContext = () => {
|
|
@@ -139,9 +127,6 @@ export const useAttachmentContext = () => {
|
|
|
139
127
|
}
|
|
140
128
|
return ctx;
|
|
141
129
|
};
|
|
142
|
-
// ============================================================================
|
|
143
|
-
// Attachments - Container
|
|
144
|
-
// ============================================================================
|
|
145
130
|
export type AttachmentsProps = HTMLAttributes<HTMLDivElement> & {
|
|
146
131
|
variant?: AttachmentVariant;
|
|
147
132
|
};
|
|
@@ -169,9 +154,6 @@ export const Attachments = ({
|
|
|
169
154
|
</AttachmentsContext.Provider>
|
|
170
155
|
);
|
|
171
156
|
};
|
|
172
|
-
// ============================================================================
|
|
173
|
-
// Attachment - Item
|
|
174
|
-
// ============================================================================
|
|
175
157
|
export type AttachmentProps = HTMLAttributes<HTMLDivElement> & {
|
|
176
158
|
data: AttachmentData;
|
|
177
159
|
onRemove?: () => void;
|
|
@@ -214,9 +196,6 @@ export const Attachment = ({
|
|
|
214
196
|
</AttachmentContext.Provider>
|
|
215
197
|
);
|
|
216
198
|
};
|
|
217
|
-
// ============================================================================
|
|
218
|
-
// AttachmentPreview - Media preview
|
|
219
|
-
// ============================================================================
|
|
220
199
|
export type AttachmentPreviewProps = HTMLAttributes<HTMLDivElement> & {
|
|
221
200
|
fallbackIcon?: ReactNode;
|
|
222
201
|
};
|
|
@@ -258,9 +237,6 @@ export const AttachmentPreview = ({
|
|
|
258
237
|
</div>
|
|
259
238
|
);
|
|
260
239
|
};
|
|
261
|
-
// ============================================================================
|
|
262
|
-
// AttachmentInfo - Name and type display
|
|
263
|
-
// ============================================================================
|
|
264
240
|
export type AttachmentInfoProps = HTMLAttributes<HTMLDivElement> & {
|
|
265
241
|
showMediaType?: boolean;
|
|
266
242
|
};
|
|
@@ -286,9 +262,6 @@ export const AttachmentInfo = ({
|
|
|
286
262
|
</div>
|
|
287
263
|
);
|
|
288
264
|
};
|
|
289
|
-
// ============================================================================
|
|
290
|
-
// AttachmentRemove - Remove button
|
|
291
|
-
// ============================================================================
|
|
292
265
|
export type AttachmentRemoveProps = ComponentProps<typeof Button> & {
|
|
293
266
|
label?: string;
|
|
294
267
|
};
|
|
@@ -337,9 +310,6 @@ export const AttachmentRemove = ({
|
|
|
337
310
|
</Button>
|
|
338
311
|
);
|
|
339
312
|
};
|
|
340
|
-
// ============================================================================
|
|
341
|
-
// AttachmentHoverCard - Hover preview
|
|
342
|
-
// ============================================================================
|
|
343
313
|
export type AttachmentHoverCardProps = ComponentProps<typeof HoverCard>;
|
|
344
314
|
export const AttachmentHoverCard = ({
|
|
345
315
|
openDelay = 0,
|
|
@@ -371,9 +341,6 @@ export const AttachmentHoverCardContent = ({
|
|
|
371
341
|
/>
|
|
372
342
|
);
|
|
373
343
|
};
|
|
374
|
-
// ============================================================================
|
|
375
|
-
// AttachmentEmpty - Empty state
|
|
376
|
-
// ============================================================================
|
|
377
344
|
export type AttachmentEmptyProps = HTMLAttributes<HTMLDivElement>;
|
|
378
345
|
export const AttachmentEmpty = ({
|
|
379
346
|
className,
|
|
@@ -24,11 +24,8 @@ export function formatChatClockTime(timestamp: number): string {
|
|
|
24
24
|
|
|
25
25
|
export interface ChatDayDividerProps {
|
|
26
26
|
timestamp: number;
|
|
27
|
-
/** Override the day label. Defaults to {@link formatChatDayLabel}. */
|
|
28
27
|
formatDay?: (timestamp: number) => string;
|
|
29
|
-
/** Override the time label. Defaults to {@link formatChatClockTime}. */
|
|
30
28
|
formatTime?: (timestamp: number) => string;
|
|
31
|
-
/** Merged after the base classes; use to set the label size (e.g. `text-3xs`). */
|
|
32
29
|
className?: string;
|
|
33
30
|
}
|
|
34
31
|
|
|
@@ -14,7 +14,6 @@ export interface ChatJumpRailTranscriptMessage {
|
|
|
14
14
|
id: string;
|
|
15
15
|
role: string;
|
|
16
16
|
content: string;
|
|
17
|
-
/** System alerts are skipped, both as ticks and as replies. */
|
|
18
17
|
isSystemAlert?: boolean;
|
|
19
18
|
}
|
|
20
19
|
|
|
@@ -77,16 +76,9 @@ export interface ChatJumpRailProps
|
|
|
77
76
|
JumpRailProps,
|
|
78
77
|
"items" | "scrollRef" | "getScrollElement" | "onReveal" | "onBeforeScroll" | "observeKey"
|
|
79
78
|
> {
|
|
80
|
-
/** The whole transcript as ticks (see `buildChatJumpRailTicks`), rendered or not. */
|
|
81
79
|
messages: readonly ChatJumpRailMessage[];
|
|
82
|
-
/**
|
|
83
|
-
* First row the transcript renders. A window that grows upwards has to
|
|
84
|
-
* re-observe, so a change here does.
|
|
85
|
-
*/
|
|
86
80
|
renderedFromId?: string;
|
|
87
|
-
/** Renders an older turn outside the transcript window, then scrolls to it. */
|
|
88
81
|
onRevealMessage?: (messageId: string) => void;
|
|
89
|
-
/** Raw text to display text. Default: the text as is. */
|
|
90
82
|
formatPreview?: (text: string) => string;
|
|
91
83
|
}
|
|
92
84
|
|
|
@@ -105,7 +97,6 @@ export function ChatJumpRail({
|
|
|
105
97
|
...rest
|
|
106
98
|
}: ChatJumpRailProps) {
|
|
107
99
|
const { scrollRef, stopScroll } = useStickToBottomContext();
|
|
108
|
-
// Memoised on `messages`, which keeps its identity while a turn streams.
|
|
109
100
|
const items = useMemo(
|
|
110
101
|
() => buildChatJumpRailItems(messages, formatPreview),
|
|
111
102
|
[messages, formatPreview],
|