@moldable-ai/ui 0.2.21 → 0.2.24
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/catalog/catalog-coverage.d.ts +1 -1
- package/dist/catalog/catalog-manifest.d.ts +1 -1
- package/dist/catalog/catalog-manifest.js +1 -1
- package/dist/catalog/catalog-types.d.ts +7 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -1
- package/dist/catalog/catalog-types.js +1 -0
- package/dist/catalog/component-catalog.d.ts +1 -1
- package/dist/catalog/component-catalog.js +2 -2
- package/dist/catalog/core-catalog-exclusions.d.ts +1 -1
- package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -1
- package/dist/catalog/core-catalog-exclusions.js +1 -146
- package/dist/catalog/core-catalog.d.ts +1 -1
- package/dist/catalog/core-catalog.d.ts.map +1 -1
- package/dist/catalog/core-catalog.js +11 -7
- package/dist/catalog/core-collection-stories.d.ts +1 -1
- package/dist/catalog/core-collection-stories.d.ts.map +1 -1
- package/dist/catalog/core-collection-stories.js +41 -9
- package/dist/catalog/core-control-stories.d.ts +1 -1
- package/dist/catalog/core-control-stories.d.ts.map +1 -1
- package/dist/catalog/core-control-stories.js +53 -22
- package/dist/catalog/core-feedback-stories.d.ts +1 -1
- package/dist/catalog/core-feedback-stories.d.ts.map +1 -1
- package/dist/catalog/core-feedback-stories.js +89 -10
- package/dist/catalog/core-form-stories.d.ts +3 -0
- package/dist/catalog/core-form-stories.d.ts.map +1 -0
- package/dist/catalog/core-form-stories.js +56 -0
- package/dist/catalog/core-foundation-stories.d.ts +1 -1
- package/dist/catalog/core-foundation-stories.js +7 -7
- package/dist/catalog/core-layout-stories.d.ts +3 -0
- package/dist/catalog/core-layout-stories.d.ts.map +1 -0
- package/dist/catalog/core-layout-stories.js +78 -0
- package/dist/catalog/core-navigation-stories.d.ts +1 -1
- package/dist/catalog/core-navigation-stories.d.ts.map +1 -1
- package/dist/catalog/core-navigation-stories.js +25 -3
- package/dist/catalog/core-overlay-stories.d.ts +1 -1
- package/dist/catalog/core-overlay-stories.d.ts.map +1 -1
- package/dist/catalog/core-overlay-stories.js +113 -8
- package/dist/catalog/index.d.ts +6 -6
- package/dist/catalog/index.js +6 -6
- package/dist/components/app-error-boundary.d.ts.map +1 -1
- package/dist/components/app-error-boundary.js +4 -3
- package/dist/components/chat/chat-image-lightbox.js +3 -3
- package/dist/components/chat/chat-input.js +5 -5
- package/dist/components/chat/chat-message.js +17 -17
- package/dist/components/chat/chat-messages.d.ts +1 -1
- package/dist/components/chat/chat-messages.js +3 -3
- package/dist/components/chat/chat-panel.d.ts +6 -6
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +33 -33
- package/dist/components/chat/checkpoint-badge.js +3 -3
- package/dist/components/chat/conversation-history.d.ts.map +1 -1
- package/dist/components/chat/conversation-history.js +13 -13
- package/dist/components/chat/index.d.ts +20 -15
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +20 -15
- package/dist/components/chat/markdown.js +1 -1
- package/dist/components/chat/model-effort-selector.js +10 -10
- package/dist/components/chat/model-selector.js +4 -4
- package/dist/components/chat/reasoning-effort-selector.js +4 -4
- package/dist/components/chat/restore-dialog.js +3 -3
- package/dist/components/chat/thinking-timeline.js +2 -2
- package/dist/components/chat/tool-approval.d.ts +1 -1
- package/dist/components/chat/tool-approval.d.ts.map +1 -1
- package/dist/components/chat/tool-approval.js +9 -9
- package/dist/components/chat/tool-handlers.d.ts +2 -2
- package/dist/components/chat/tool-handlers.js +90 -90
- package/dist/components/chat/voice-orb-audio.d.ts +16 -0
- package/dist/components/chat/voice-orb-audio.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-audio.js +110 -0
- package/dist/components/chat/voice-orb-renderer.d.ts +51 -0
- package/dist/components/chat/voice-orb-renderer.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-renderer.js +410 -0
- package/dist/components/chat/voice-orb-shaders.d.ts +3 -0
- package/dist/components/chat/voice-orb-shaders.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-shaders.js +355 -0
- package/dist/components/chat/voice-orb-types.d.ts +24 -0
- package/dist/components/chat/voice-orb-types.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-types.js +73 -0
- package/dist/components/chat/voice-orb.d.ts +20 -0
- package/dist/components/chat/voice-orb.d.ts.map +1 -0
- package/dist/components/chat/voice-orb.js +67 -0
- package/dist/components/code-block.js +1 -1
- package/dist/components/hardware/bluetooth-panel.d.ts +2 -2
- package/dist/components/hardware/bluetooth-panel.js +10 -10
- package/dist/components/hardware/camera-preview.js +6 -6
- package/dist/components/hardware/capability-badge.d.ts +2 -2
- package/dist/components/hardware/capability-badge.js +2 -2
- package/dist/components/hardware/capability-matrix.d.ts +1 -1
- package/dist/components/hardware/capability-matrix.js +5 -5
- package/dist/components/hardware/clipboard-button.d.ts +1 -1
- package/dist/components/hardware/clipboard-button.js +2 -2
- package/dist/components/hardware/device-list.js +1 -1
- package/dist/components/hardware/display-map.d.ts +1 -1
- package/dist/components/hardware/display-map.js +7 -7
- package/dist/components/hardware/haptic-button.d.ts +2 -2
- package/dist/components/hardware/haptic-button.js +3 -3
- package/dist/components/hardware/hardware-panel.js +1 -1
- package/dist/components/hardware/hid-panel.d.ts +2 -2
- package/dist/components/hardware/hid-panel.js +10 -10
- package/dist/components/hardware/index.d.ts +26 -26
- package/dist/components/hardware/index.js +26 -26
- package/dist/components/hardware/live-indicator.js +1 -1
- package/dist/components/hardware/local-auth-button.d.ts +2 -2
- package/dist/components/hardware/local-auth-button.js +4 -4
- package/dist/components/hardware/location-panel.d.ts +1 -1
- package/dist/components/hardware/location-panel.js +6 -6
- package/dist/components/hardware/microphone-meter.js +7 -7
- package/dist/components/hardware/midi-monitor.d.ts +2 -2
- package/dist/components/hardware/midi-monitor.js +9 -9
- package/dist/components/hardware/notification-panel.d.ts +1 -1
- package/dist/components/hardware/notification-panel.js +8 -8
- package/dist/components/hardware/power-blocker-controller.d.ts +1 -1
- package/dist/components/hardware/power-blocker-controller.js +1 -1
- package/dist/components/hardware/power-panel.d.ts +1 -1
- package/dist/components/hardware/power-panel.js +9 -9
- package/dist/components/hardware/readout.js +1 -1
- package/dist/components/hardware/screen-share-preview.js +5 -5
- package/dist/components/hardware/secure-storage-panel.d.ts +1 -1
- package/dist/components/hardware/secure-storage-panel.js +9 -9
- package/dist/components/hardware/serial-console.d.ts +2 -2
- package/dist/components/hardware/serial-console.js +10 -10
- package/dist/components/hardware/shortcut-recorder.d.ts +1 -1
- package/dist/components/hardware/shortcut-recorder.js +4 -4
- package/dist/components/hardware/stream-log.js +1 -1
- package/dist/components/hardware/system-audio-monitor.d.ts +1 -1
- package/dist/components/hardware/system-audio-monitor.js +9 -9
- package/dist/components/hardware/usb-panel.d.ts +5 -5
- package/dist/components/hardware/usb-panel.js +10 -10
- package/dist/components/hardware/use-capability.d.ts +1 -1
- package/dist/components/hardware/use-capability.js +1 -1
- package/dist/components/markdown.js +5 -5
- package/dist/components/native-capabilities/bluetooth-panel.d.ts +2 -2
- package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/bluetooth-panel.js +17 -17
- package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -1
- package/dist/components/native-capabilities/camera-preview.js +7 -7
- package/dist/components/native-capabilities/capability-badge.d.ts +2 -2
- package/dist/components/native-capabilities/capability-badge.js +4 -4
- package/dist/components/native-capabilities/capability-matrix.d.ts +1 -1
- package/dist/components/native-capabilities/capability-matrix.js +7 -7
- package/dist/components/native-capabilities/clipboard-button.d.ts +1 -1
- package/dist/components/native-capabilities/clipboard-button.js +2 -2
- package/dist/components/native-capabilities/device-list.js +4 -4
- package/dist/components/native-capabilities/display-map.d.ts +1 -1
- package/dist/components/native-capabilities/display-map.d.ts.map +1 -1
- package/dist/components/native-capabilities/display-map.js +11 -11
- package/dist/components/native-capabilities/haptic-button.d.ts +2 -2
- package/dist/components/native-capabilities/haptic-button.js +3 -3
- package/dist/components/native-capabilities/hid-panel.d.ts +2 -2
- package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/hid-panel.js +14 -14
- package/dist/components/native-capabilities/index.d.ts +26 -26
- package/dist/components/native-capabilities/index.js +26 -26
- package/dist/components/native-capabilities/live-indicator.js +3 -3
- package/dist/components/native-capabilities/local-auth-button.d.ts +2 -2
- package/dist/components/native-capabilities/local-auth-button.js +4 -4
- package/dist/components/native-capabilities/location-panel.d.ts +1 -1
- package/dist/components/native-capabilities/location-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/location-panel.js +8 -8
- package/dist/components/native-capabilities/microphone-meter.js +9 -9
- package/dist/components/native-capabilities/midi-monitor.d.ts +2 -2
- package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -1
- package/dist/components/native-capabilities/midi-monitor.js +11 -11
- package/dist/components/native-capabilities/native-capability-panel.js +6 -6
- package/dist/components/native-capabilities/notification-panel.d.ts +1 -1
- package/dist/components/native-capabilities/notification-panel.js +9 -9
- package/dist/components/native-capabilities/power-blocker-controller.d.ts +1 -1
- package/dist/components/native-capabilities/power-blocker-controller.js +1 -1
- package/dist/components/native-capabilities/power-panel.d.ts +1 -1
- package/dist/components/native-capabilities/power-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/power-panel.js +12 -12
- package/dist/components/native-capabilities/readout.d.ts.map +1 -1
- package/dist/components/native-capabilities/readout.js +2 -2
- package/dist/components/native-capabilities/screen-share-preview.js +6 -6
- package/dist/components/native-capabilities/secure-storage-panel.d.ts +1 -1
- package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/secure-storage-panel.js +11 -11
- package/dist/components/native-capabilities/serial-console.d.ts +2 -2
- package/dist/components/native-capabilities/serial-console.d.ts.map +1 -1
- package/dist/components/native-capabilities/serial-console.js +11 -11
- package/dist/components/native-capabilities/shortcut-recorder.d.ts +1 -1
- package/dist/components/native-capabilities/shortcut-recorder.js +5 -5
- package/dist/components/native-capabilities/stream-log.js +3 -3
- package/dist/components/native-capabilities/system-audio-monitor.d.ts +1 -1
- package/dist/components/native-capabilities/system-audio-monitor.js +12 -12
- package/dist/components/native-capabilities/usb-panel.d.ts +5 -5
- package/dist/components/native-capabilities/usb-panel.js +15 -15
- package/dist/components/native-capabilities/use-capability.d.ts +1 -1
- package/dist/components/native-capabilities/use-capability.js +1 -1
- package/dist/components/rich-media-player.js +3 -3
- package/dist/components/ui/accordion.js +3 -3
- package/dist/components/ui/alert-dialog.d.ts +5 -3
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +20 -10
- package/dist/components/ui/alert.d.ts +2 -2
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +11 -11
- package/dist/components/ui/app-frame.d.ts +7 -1
- package/dist/components/ui/app-frame.d.ts.map +1 -1
- package/dist/components/ui/app-frame.js +52 -16
- package/dist/components/ui/avatar.js +5 -5
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +4 -4
- package/dist/components/ui/breadcrumb.js +2 -2
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.js +4 -4
- package/dist/components/ui/button.d.ts +6 -4
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +50 -18
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +15 -15
- package/dist/components/ui/card.js +3 -3
- package/dist/components/ui/carousel.d.ts +1 -1
- package/dist/components/ui/carousel.js +4 -4
- package/dist/components/ui/chart.js +5 -5
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/collapsible.js +3 -3
- package/dist/components/ui/color-well.js +2 -2
- package/dist/components/ui/combobox.js +9 -9
- package/dist/components/ui/command.d.ts +1 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +9 -9
- package/dist/components/ui/confirm-dialog.d.ts +1 -1
- package/dist/components/ui/confirm-dialog.d.ts.map +1 -1
- package/dist/components/ui/confirm-dialog.js +2 -2
- package/dist/components/ui/context-menu.d.ts +16 -5
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +92 -16
- package/dist/components/ui/date-field.d.ts.map +1 -1
- package/dist/components/ui/date-field.js +8 -8
- package/dist/components/ui/date-picker.d.ts +2 -2
- package/dist/components/ui/date-picker.js +7 -7
- package/dist/components/ui/dialog-primary-action.d.ts +4 -0
- package/dist/components/ui/dialog-primary-action.d.ts.map +1 -0
- package/dist/components/ui/dialog-primary-action.js +37 -0
- package/dist/components/ui/dialog.d.ts +6 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +20 -7
- package/dist/components/ui/drawer.js +4 -4
- package/dist/components/ui/dropdown-menu.d.ts +15 -5
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +98 -16
- package/dist/components/ui/edge-fade.js +1 -1
- package/dist/components/ui/empty.d.ts +1 -1
- package/dist/components/ui/empty.js +5 -5
- package/dist/components/ui/error-boundary-view.d.ts +12 -0
- package/dist/components/ui/error-boundary-view.d.ts.map +1 -0
- package/dist/components/ui/error-boundary-view.js +8 -0
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/field.d.ts.map +1 -1
- package/dist/components/ui/field.js +9 -9
- package/dist/components/ui/form.js +4 -4
- package/dist/components/ui/grid.d.ts.map +1 -1
- package/dist/components/ui/grid.js +5 -5
- package/dist/components/ui/hover-card.js +2 -2
- package/dist/components/ui/icon-button.d.ts +1 -1
- package/dist/components/ui/icon-button.d.ts.map +1 -1
- package/dist/components/ui/icon-button.js +3 -4
- package/dist/components/ui/index.d.ts +77 -76
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +77 -76
- package/dist/components/ui/input-group.d.ts +3 -3
- package/dist/components/ui/input-group.js +14 -14
- package/dist/components/ui/input-otp.js +3 -3
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/inspector.d.ts +1 -1
- package/dist/components/ui/inspector.js +6 -6
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/item.js +7 -7
- package/dist/components/ui/kbd.js +2 -2
- package/dist/components/ui/label.js +2 -2
- package/dist/components/ui/list.d.ts.map +1 -1
- package/dist/components/ui/list.js +5 -5
- package/dist/components/ui/material.js +3 -3
- package/dist/components/ui/menu-items.d.ts +28 -0
- package/dist/components/ui/menu-items.d.ts.map +1 -0
- package/dist/components/ui/menu-items.js +111 -0
- package/dist/components/ui/menubar.js +11 -11
- package/dist/components/ui/message-scroller-controller.d.ts +1 -1
- package/dist/components/ui/message-scroller-controller.js +1 -1
- package/dist/components/ui/message-scroller-primitive.d.ts +1 -1
- package/dist/components/ui/message-scroller-primitive.js +1 -1
- package/dist/components/ui/message-scroller.d.ts +2 -2
- package/dist/components/ui/message-scroller.js +3 -3
- package/dist/components/ui/navigation-button-group.d.ts +2 -2
- package/dist/components/ui/navigation-button-group.js +2 -2
- package/dist/components/ui/navigation-menu.js +6 -6
- package/dist/components/ui/notification-dot.js +2 -2
- package/dist/components/ui/number-input.js +8 -8
- package/dist/components/ui/pagination.d.ts +1 -1
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/panel.d.ts +1 -1
- package/dist/components/ui/panel.js +3 -3
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/popover.js +3 -3
- package/dist/components/ui/progress.js +2 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +2 -2
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +15 -4
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +3 -3
- package/dist/components/ui/search-field.js +7 -7
- package/dist/components/ui/segmented-control.js +9 -9
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +6 -6
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sheet.js +4 -4
- package/dist/components/ui/sidebar.d.ts +5 -5
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +111 -24
- package/dist/components/ui/skeleton.js +2 -2
- package/dist/components/ui/slider.d.ts +3 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +3 -3
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +2 -2
- package/dist/components/ui/split-view.js +1 -1
- package/dist/components/ui/status.d.ts +1 -1
- package/dist/components/ui/status.d.ts.map +1 -1
- package/dist/components/ui/status.js +10 -9
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +7 -7
- package/dist/components/ui/tabs.js +3 -3
- package/dist/components/ui/text.d.ts +2 -2
- package/dist/components/ui/text.js +19 -19
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/toggle-group.d.ts +1 -1
- package/dist/components/ui/toggle-group.js +4 -4
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.js +10 -10
- package/dist/components/ui/toolbar.d.ts +7 -7
- package/dist/components/ui/toolbar.js +7 -7
- package/dist/components/ui/tooltip.d.ts +2 -2
- package/dist/components/ui/tooltip.js +5 -5
- package/dist/index.d.ts +21 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -15
- package/dist/lib/frame-lifecycle.d.ts +49 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +163 -1
- package/dist/lib/host-date-time-picker.d.ts +36 -0
- package/dist/lib/host-date-time-picker.d.ts.map +1 -0
- package/dist/lib/host-date-time-picker.js +162 -0
- package/dist/lib/host-file-dialog.d.ts +66 -0
- package/dist/lib/host-file-dialog.d.ts.map +1 -0
- package/dist/lib/host-file-dialog.js +221 -0
- package/dist/lib/host-native-menu.d.ts +116 -0
- package/dist/lib/host-native-menu.d.ts.map +1 -0
- package/dist/lib/host-native-menu.js +242 -0
- package/dist/lib/host-services.d.ts +13 -0
- package/dist/lib/host-services.d.ts.map +1 -0
- package/dist/lib/host-services.js +161 -0
- package/dist/lib/host-share.d.ts +39 -0
- package/dist/lib/host-share.d.ts.map +1 -0
- package/dist/lib/host-share.js +161 -0
- package/dist/lib/host-web-surface.d.ts +31 -0
- package/dist/lib/host-web-surface.d.ts.map +1 -0
- package/dist/lib/host-web-surface.js +116 -0
- package/dist/lib/native-capabilities/access.d.ts +2 -2
- package/dist/lib/native-capabilities/access.js +2 -2
- package/dist/lib/native-capabilities/bluetooth-access.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-access.js +2 -2
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-connection.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-gatt.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts +2 -2
- package/dist/lib/native-capabilities/bluetooth-internal.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +2 -2
- package/dist/lib/native-capabilities/bluetooth-native-fallback.js +2 -2
- package/dist/lib/native-capabilities/bluetooth.d.ts +6 -6
- package/dist/lib/native-capabilities/bluetooth.js +4 -4
- package/dist/lib/native-capabilities/bridge.d.ts +1 -1
- package/dist/lib/native-capabilities/bridge.js +2 -2
- package/dist/lib/native-capabilities/capabilities.d.ts +1 -1
- package/dist/lib/native-capabilities/capabilities.js +1 -1
- package/dist/lib/native-capabilities/clipboard.js +2 -2
- package/dist/lib/native-capabilities/device-io-errors.d.ts +1 -1
- package/dist/lib/native-capabilities/device-io-errors.js +1 -1
- package/dist/lib/native-capabilities/displays.d.ts +1 -1
- package/dist/lib/native-capabilities/displays.js +1 -1
- package/dist/lib/native-capabilities/global-shortcuts.d.ts +2 -2
- package/dist/lib/native-capabilities/global-shortcuts.js +1 -1
- package/dist/lib/native-capabilities/haptics.d.ts +1 -1
- package/dist/lib/native-capabilities/haptics.js +1 -1
- package/dist/lib/native-capabilities/hid-native.d.ts +2 -2
- package/dist/lib/native-capabilities/hid-native.js +3 -3
- package/dist/lib/native-capabilities/hid.js +5 -5
- package/dist/lib/native-capabilities/index.d.ts +39 -39
- package/dist/lib/native-capabilities/index.js +21 -21
- package/dist/lib/native-capabilities/local-authentication.d.ts +1 -1
- package/dist/lib/native-capabilities/local-authentication.js +1 -1
- package/dist/lib/native-capabilities/location.js +1 -1
- package/dist/lib/native-capabilities/media-permissions.d.ts +1 -1
- package/dist/lib/native-capabilities/media-permissions.js +1 -1
- package/dist/lib/native-capabilities/media.d.ts +1 -1
- package/dist/lib/native-capabilities/media.js +2 -2
- package/dist/lib/native-capabilities/midi-access.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-access.js +3 -3
- package/dist/lib/native-capabilities/midi-internal.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-internal.js +1 -1
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-native-fallback.js +2 -2
- package/dist/lib/native-capabilities/midi-ports.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-ports.js +1 -1
- package/dist/lib/native-capabilities/midi.d.ts +5 -5
- package/dist/lib/native-capabilities/midi.js +3 -3
- package/dist/lib/native-capabilities/native-device-io.d.ts +1 -1
- package/dist/lib/native-capabilities/native-device-io.js +1 -1
- package/dist/lib/native-capabilities/native-device-lifecycle.js +1 -1
- package/dist/lib/native-capabilities/notifications.d.ts +2 -2
- package/dist/lib/native-capabilities/notifications.js +1 -1
- package/dist/lib/native-capabilities/power-session.d.ts +2 -2
- package/dist/lib/native-capabilities/power-session.js +1 -1
- package/dist/lib/native-capabilities/secure-storage.d.ts +1 -1
- package/dist/lib/native-capabilities/secure-storage.js +1 -1
- package/dist/lib/native-capabilities/serial-native.d.ts +2 -2
- package/dist/lib/native-capabilities/serial-native.js +3 -3
- package/dist/lib/native-capabilities/serial.js +5 -5
- package/dist/lib/native-capabilities/system-audio.d.ts +1 -1
- package/dist/lib/native-capabilities/system-audio.js +1 -1
- package/dist/lib/native-capabilities/usb-native.d.ts +2 -2
- package/dist/lib/native-capabilities/usb-native.js +3 -3
- package/dist/lib/native-capabilities/usb.js +5 -5
- package/dist/lib/native-hardware/bluetooth-access.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-access.js +1 -1
- package/dist/lib/native-hardware/bluetooth-connection.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-connection.js +1 -1
- package/dist/lib/native-hardware/bluetooth-gatt.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-gatt.js +1 -1
- package/dist/lib/native-hardware/bluetooth-internal.d.ts +2 -2
- package/dist/lib/native-hardware/bluetooth-internal.js +1 -1
- package/dist/lib/native-hardware/bluetooth-native-fallback.d.ts +2 -2
- package/dist/lib/native-hardware/bluetooth-native-fallback.js +2 -2
- package/dist/lib/native-hardware/bluetooth.d.ts +6 -6
- package/dist/lib/native-hardware/bluetooth.js +4 -4
- package/dist/lib/native-hardware/bridge.d.ts +1 -1
- package/dist/lib/native-hardware/bridge.js +2 -2
- package/dist/lib/native-hardware/capabilities.d.ts +1 -1
- package/dist/lib/native-hardware/capabilities.js +1 -1
- package/dist/lib/native-hardware/clipboard.js +1 -1
- package/dist/lib/native-hardware/device-io-errors.d.ts +1 -1
- package/dist/lib/native-hardware/device-io-errors.js +1 -1
- package/dist/lib/native-hardware/displays.d.ts +1 -1
- package/dist/lib/native-hardware/displays.js +1 -1
- package/dist/lib/native-hardware/global-shortcuts.d.ts +2 -2
- package/dist/lib/native-hardware/global-shortcuts.js +1 -1
- package/dist/lib/native-hardware/haptics.d.ts +1 -1
- package/dist/lib/native-hardware/haptics.js +1 -1
- package/dist/lib/native-hardware/hid-native.d.ts +2 -2
- package/dist/lib/native-hardware/hid-native.js +3 -3
- package/dist/lib/native-hardware/hid.js +4 -4
- package/dist/lib/native-hardware/index.d.ts +37 -37
- package/dist/lib/native-hardware/index.js +20 -20
- package/dist/lib/native-hardware/local-authentication.d.ts +1 -1
- package/dist/lib/native-hardware/local-authentication.js +1 -1
- package/dist/lib/native-hardware/location.js +1 -1
- package/dist/lib/native-hardware/media-permissions.d.ts +1 -1
- package/dist/lib/native-hardware/media-permissions.js +1 -1
- package/dist/lib/native-hardware/media.d.ts +1 -1
- package/dist/lib/native-hardware/media.js +1 -1
- package/dist/lib/native-hardware/midi-access.d.ts +1 -1
- package/dist/lib/native-hardware/midi-access.js +2 -2
- package/dist/lib/native-hardware/midi-internal.d.ts +1 -1
- package/dist/lib/native-hardware/midi-internal.js +1 -1
- package/dist/lib/native-hardware/midi-native-fallback.d.ts +1 -1
- package/dist/lib/native-hardware/midi-native-fallback.js +2 -2
- package/dist/lib/native-hardware/midi-ports.d.ts +1 -1
- package/dist/lib/native-hardware/midi-ports.js +1 -1
- package/dist/lib/native-hardware/midi.d.ts +5 -5
- package/dist/lib/native-hardware/midi.js +3 -3
- package/dist/lib/native-hardware/native-device-io.d.ts +1 -1
- package/dist/lib/native-hardware/native-device-io.js +1 -1
- package/dist/lib/native-hardware/native-device-lifecycle.js +1 -1
- package/dist/lib/native-hardware/notifications.d.ts +2 -2
- package/dist/lib/native-hardware/notifications.js +1 -1
- package/dist/lib/native-hardware/power-session.d.ts +2 -2
- package/dist/lib/native-hardware/power-session.js +1 -1
- package/dist/lib/native-hardware/secure-storage.d.ts +1 -1
- package/dist/lib/native-hardware/secure-storage.js +1 -1
- package/dist/lib/native-hardware/serial-native.d.ts +2 -2
- package/dist/lib/native-hardware/serial-native.js +3 -3
- package/dist/lib/native-hardware/serial.js +4 -4
- package/dist/lib/native-hardware/system-audio.d.ts +1 -1
- package/dist/lib/native-hardware/system-audio.js +1 -1
- package/dist/lib/native-hardware/usb-native.d.ts +2 -2
- package/dist/lib/native-hardware/usb-native.js +3 -3
- package/dist/lib/native-hardware/usb.js +4 -4
- package/dist/lib/theme.js +1 -1
- package/docs/README.md +1 -0
- package/docs/design-tokens.md +28 -6
- package/docs/foundations.md +4 -2
- package/docs/visual-regression.md +78 -0
- package/package.json +15 -4
- package/src/components/ui/alert-dialog.md +27 -0
- package/src/components/ui/button.md +10 -3
- package/src/components/ui/confirm-dialog.md +97 -0
- package/src/components/ui/context-menu.md +158 -0
- package/src/components/ui/dialog.md +23 -4
- package/src/components/ui/dropdown-menu.md +165 -0
- package/src/components/ui/error-boundary-view.md +98 -0
- package/src/components/ui/hover-card.md +90 -0
- package/src/components/ui/select.md +111 -0
- package/src/lib/host-date-time-picker.md +29 -0
- package/src/lib/host-file-dialog.md +76 -0
- package/src/lib/host-native-menu.md +67 -0
- package/src/lib/host-share.md +36 -0
- package/src/lib/host-web-surface.md +66 -0
- package/src/styles/index.css +141 -68
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Archive, ChevronDown, Folder, LoaderCircle, MessageCircle, Plus, } from 'lucide-react';
|
|
3
3
|
import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '../ui/alert-dialog';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
7
|
-
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
|
|
8
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '../ui/tooltip';
|
|
9
|
-
import { getVerticalScrollMask, } from './vertical-scroll-fade';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '../ui/alert-dialog.js';
|
|
6
|
+
import { Button } from '../ui/button.js';
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover.js';
|
|
8
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '../ui/tooltip.js';
|
|
9
|
+
import { getVerticalScrollMask, } from './vertical-scroll-fade.js';
|
|
10
10
|
const CHATS_GROUP_ID = 'scope:chats';
|
|
11
11
|
const CUSTOM_GROUP_PREFIX = 'scope:group:';
|
|
12
12
|
const COLLAPSED_GROUP_CONVERSATION_LIMIT = 5;
|
|
@@ -69,10 +69,10 @@ function AppScopeIcon({ icon, isChats, }) {
|
|
|
69
69
|
if (isChats)
|
|
70
70
|
return _jsx(MessageCircle, { className: "size-4" });
|
|
71
71
|
if (isConversationIconImageSource(icon)) {
|
|
72
|
-
return _jsx("img", { src: icon, alt: "", className: "size-4
|
|
72
|
+
return (_jsx("img", { src: icon, alt: "", className: "rounded-control size-4 object-cover" }));
|
|
73
73
|
}
|
|
74
74
|
if (icon)
|
|
75
|
-
return _jsx("span", { className: "text-
|
|
75
|
+
return _jsx("span", { className: "text-ui-body leading-none", children: icon });
|
|
76
76
|
return _jsx(Folder, { className: "size-4" });
|
|
77
77
|
}
|
|
78
78
|
function ConversationList({ conversations, currentConversationId, currentAppId, onSelect, onArchive, onArchiveGroup, disabled = false, className, }) {
|
|
@@ -96,19 +96,19 @@ function ConversationList({ conversations, currentConversationId, currentAppId,
|
|
|
96
96
|
else
|
|
97
97
|
next.add(group.id);
|
|
98
98
|
return next;
|
|
99
|
-
}), className: "text-foreground hover:bg-accent/60 flex h-9 min-w-0 flex-1 cursor-pointer items-center gap-2
|
|
99
|
+
}), className: "text-foreground hover:bg-accent/60 rounded-container text-ui-body flex h-9 min-w-0 flex-1 cursor-pointer items-center gap-2 px-2 pr-9 text-left font-medium transition-colors", children: [_jsx(ChevronDown, { className: cn('text-muted-foreground size-3.5 shrink-0 transition-transform', isCollapsed && '-rotate-90') }), _jsx("span", { className: "text-muted-foreground flex size-4 shrink-0 items-center justify-center", children: _jsx(AppScopeIcon, { icon: group.icon, isChats: group.id === CHATS_GROUP_ID }) }), _jsx("span", { className: "truncate", children: group.label })] }), onArchiveGroup && (_jsx("button", { type: "button", onClick: () => setGroupPendingArchive(group), className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring rounded-control absolute right-1 flex size-7 cursor-pointer items-center justify-center opacity-0 transition-opacity focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 group-focus-within/conversation-scope:opacity-100 group-hover/conversation-scope:opacity-100", "aria-label": `Archive all chats in ${group.label}`, children: _jsx(Archive, { className: "size-3.5" }) }))] }), !isCollapsed && (_jsxs("ul", { id: listId, className: "ml-5 space-y-0.5 py-0.5", children: [visibleConversations.map((conversation) => (_jsxs("li", { "data-conversation-id": conversation.id, className: cn('group/conversation rounded-container relative flex min-w-0 items-center', conversation.id === currentConversationId && 'bg-accent'), children: [_jsx("button", { type: "button", disabled: disabled, onClick: () => onSelect(conversation.id), "aria-current": conversation.id === currentConversationId
|
|
100
100
|
? 'page'
|
|
101
|
-
: undefined, className: "min-w-0 flex-1 cursor-pointer truncate
|
|
101
|
+
: undefined, className: "rounded-container text-ui-body min-w-0 flex-1 cursor-pointer truncate py-1.5 pl-3 pr-8 text-left disabled:cursor-default", children: conversation.title }), conversation.isActive && (_jsx(LoaderCircle, { className: "text-muted-foreground absolute right-2 size-3.5 animate-spin", "aria-label": "Conversation is working" })), onArchive && !conversation.isActive && (_jsx("button", { type: "button", onClick: (event) => {
|
|
102
102
|
event.stopPropagation();
|
|
103
103
|
onArchive(conversation.id);
|
|
104
|
-
}, disabled: disabled, className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring absolute right-1 flex size-7 cursor-pointer items-center justify-center
|
|
104
|
+
}, disabled: disabled, className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring rounded-control absolute right-1 flex size-7 cursor-pointer items-center justify-center opacity-0 transition-opacity focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 disabled:cursor-default group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100", "aria-label": `Archive ${conversation.title}`, children: _jsx(Archive, { className: "size-3.5" }) }))] }, conversation.id))), hasMoreConversations && (_jsx("li", { children: _jsx("button", { type: "button", onClick: () => setExpandedGroups((current) => {
|
|
105
105
|
const next = new Set(current);
|
|
106
106
|
if (next.has(group.id))
|
|
107
107
|
next.delete(group.id);
|
|
108
108
|
else
|
|
109
109
|
next.add(group.id);
|
|
110
110
|
return next;
|
|
111
|
-
}), className: "text-muted-foreground hover:bg-accent/60 hover:text-foreground flex h-7 w-full cursor-pointer items-center
|
|
111
|
+
}), className: "text-muted-foreground hover:bg-accent/60 hover:text-foreground rounded-container text-ui-caption flex h-7 w-full cursor-pointer items-center px-3 text-left transition-colors", "aria-label": `${isShowingAll ? 'Show fewer' : 'Show all'} ${group.label} conversations`, children: isShowingAll ? 'Show less' : 'Show all' }) }))] }))] }, group.id));
|
|
112
112
|
}), _jsx(AlertDialog, { open: groupPendingArchive !== null, onOpenChange: (open) => {
|
|
113
113
|
if (!open)
|
|
114
114
|
setGroupPendingArchive(null);
|
|
@@ -181,7 +181,7 @@ export function ConversationHistory({ conversations, currentConversationId, curr
|
|
|
181
181
|
return (_jsx(TooltipProvider, { children: _jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(PopoverTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-sm", disabled: disabled, className: cn('text-muted-foreground hover:text-foreground cursor-pointer', className), "aria-label": "Conversations", children: _jsx(MessageCircle, { className: "size-4" }) }) }) }), _jsx(TooltipContent, { side: tooltipSide, children: "Conversations" })] }), _jsxs(PopoverContent, { align: dropdownAlign, side: dropdownSide, className: "w-72 p-2", children: [onNewChat && (_jsxs(Button, { type: "button", variant: "ghost", onClick: () => {
|
|
182
182
|
onNewChat();
|
|
183
183
|
setIsOpen(false);
|
|
184
|
-
}, disabled: newChatDisabled, title: "New conversation (Cmd+Shift+O)", className: "mb-1 flex w-full cursor-pointer items-center justify-start gap-2", children: [_jsx(Plus, { className: "size-4" }), _jsx("span", { children: "New conversation" }), _jsx("span", { className: "text-muted-foreground ml-auto
|
|
184
|
+
}, disabled: newChatDisabled, title: "New conversation (Cmd+Shift+O)", className: "mb-1 flex w-full cursor-pointer items-center justify-start gap-2", children: [_jsx(Plus, { className: "size-4" }), _jsx("span", { children: "New conversation" }), _jsx("span", { className: "text-muted-foreground text-ui-caption ml-auto", children: "\u2318\u21E7O" })] })), _jsxs("div", { className: "max-h-80 overflow-y-auto", onScroll: (event) => {
|
|
185
185
|
const element = event.currentTarget;
|
|
186
186
|
if (hasMoreConversations &&
|
|
187
187
|
!isLoadingMoreConversations &&
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
export { ChatInput, type ChatImageAttachment, type ChatSlashCommandOption, type ChatSubmitMode, } from './chat-input';
|
|
2
|
-
export { CompactingMessage, Message, ThinkingMessage, type ChatMessage, type ChatMessagePart, } from './chat-message';
|
|
3
|
-
export { Messages, type MessageCheckpoint } from './chat-messages';
|
|
4
|
-
export { CheckpointBadge, type CheckpointBadgeProps } from './checkpoint-badge';
|
|
5
|
-
export { RestoreDialog, type CheckpointInfo, type RestoreDialogProps, } from './restore-dialog';
|
|
6
|
-
export { ModelSelector, type ModelOption } from './model-selector';
|
|
7
|
-
export { ModelEffortSelector, resolveModelEffortPresetIndex, type ModelEffortPresetOption, type ModelProviderOption, } from './model-effort-selector';
|
|
8
|
-
export { ReasoningEffortSelector, type ReasoningEffortOption, } from './reasoning-effort-selector';
|
|
9
|
-
export { ConversationHistory, ConversationSidebar, groupConversations, type ConversationGroup, type ConversationMeta, } from './conversation-history';
|
|
10
|
-
export { ChatPanel, type ChatAuthIssue, type ChatContextUsage, type ChatPlanUsage, type ChatPlanUsageWindow, type ChatPanelProps, type QueuedChatMessage, type ToolProgressData, resolveChatAuthIssue, } from './chat-panel';
|
|
11
|
-
export { ThinkingTimeline, ThinkingTimelineMarker, type ThinkingTimelineItem, type ThinkingTimelineProps, } from './thinking-timeline';
|
|
12
|
-
export { getToolHandler, DEFAULT_TOOL_HANDLERS, type ToolHandler, } from './tool-handlers';
|
|
13
|
-
export { ToolProgressProvider, useToolProgress, useToolCallProgress, } from './tool-progress-context';
|
|
14
|
-
export { ToolApprovalProvider, useToolApprovalResponse, type ApprovalResponseHandler, } from './tool-approval-context';
|
|
15
|
-
export { ToolApproval, ToolApprovalHeader, ToolApprovalRequest, ToolApprovalAccepted, ToolApprovalRejected, ToolApprovalActions, ToolApprovalAction, type ToolApprovalState, } from './tool-approval';
|
|
1
|
+
export { ChatInput, type ChatImageAttachment, type ChatSlashCommandOption, type ChatSubmitMode, } from './chat-input.js';
|
|
2
|
+
export { CompactingMessage, Message, ThinkingMessage, type ChatMessage, type ChatMessagePart, } from './chat-message.js';
|
|
3
|
+
export { Messages, type MessageCheckpoint } from './chat-messages.js';
|
|
4
|
+
export { CheckpointBadge, type CheckpointBadgeProps } from './checkpoint-badge.js';
|
|
5
|
+
export { RestoreDialog, type CheckpointInfo, type RestoreDialogProps, } from './restore-dialog.js';
|
|
6
|
+
export { ModelSelector, type ModelOption } from './model-selector.js';
|
|
7
|
+
export { ModelEffortSelector, resolveModelEffortPresetIndex, type ModelEffortPresetOption, type ModelProviderOption, } from './model-effort-selector.js';
|
|
8
|
+
export { ReasoningEffortSelector, type ReasoningEffortOption, } from './reasoning-effort-selector.js';
|
|
9
|
+
export { ConversationHistory, ConversationSidebar, groupConversations, type ConversationGroup, type ConversationMeta, } from './conversation-history.js';
|
|
10
|
+
export { ChatPanel, type ChatAuthIssue, type ChatContextUsage, type ChatPlanUsage, type ChatPlanUsageWindow, type ChatPanelProps, type QueuedChatMessage, type ToolProgressData, resolveChatAuthIssue, } from './chat-panel.js';
|
|
11
|
+
export { ThinkingTimeline, ThinkingTimelineMarker, type ThinkingTimelineItem, type ThinkingTimelineProps, } from './thinking-timeline.js';
|
|
12
|
+
export { getToolHandler, DEFAULT_TOOL_HANDLERS, type ToolHandler, } from './tool-handlers.js';
|
|
13
|
+
export { ToolProgressProvider, useToolProgress, useToolCallProgress, } from './tool-progress-context.js';
|
|
14
|
+
export { ToolApprovalProvider, useToolApprovalResponse, type ApprovalResponseHandler, } from './tool-approval-context.js';
|
|
15
|
+
export { ToolApproval, ToolApprovalHeader, ToolApprovalRequest, ToolApprovalAccepted, ToolApprovalRejected, ToolApprovalActions, ToolApprovalAction, type ToolApprovalState, } from './tool-approval.js';
|
|
16
|
+
export { VoiceOrb, type VoiceOrbProps } from './voice-orb.js';
|
|
17
|
+
export { VoiceOrbRenderer } from './voice-orb-renderer.js';
|
|
18
|
+
export { voiceOrbFragmentShader, voiceOrbVertexShader, } from './voice-orb-shaders.js';
|
|
19
|
+
export { summarizeVoiceOrbSpectrum, VoiceOrbStreamAnalyser, } from './voice-orb-audio.js';
|
|
20
|
+
export { getVoiceOrbStateLabel, getVoiceOrbStateTargets, normalizeVoiceOrbAudioLevels, silentVoiceOrbAudioLevels, voiceOrbSilenceHoldMs, voiceOrbSilenceThreshold, voiceOrbSpeakingThreshold, voiceOrbStateTransitionSeconds, voiceOrbStates, type VoiceOrbAudioLevels, type VoiceOrbState, type VoiceOrbStateTargets, } from './voice-orb-types.js';
|
|
16
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,GACpB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC/E,OAAO,EACL,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,uBAAuB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,oBAAoB,GACrB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,KAAK,WAAW,GACjB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,GACpB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC/E,OAAO,EACL,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,uBAAuB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,oBAAoB,GACrB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,KAAK,WAAW,GACjB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAA"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
export { ChatInput, } from './chat-input';
|
|
2
|
-
export { CompactingMessage, Message, ThinkingMessage, } from './chat-message';
|
|
3
|
-
export { Messages } from './chat-messages';
|
|
4
|
-
export { CheckpointBadge } from './checkpoint-badge';
|
|
5
|
-
export { RestoreDialog, } from './restore-dialog';
|
|
6
|
-
export { ModelSelector } from './model-selector';
|
|
7
|
-
export { ModelEffortSelector, resolveModelEffortPresetIndex, } from './model-effort-selector';
|
|
8
|
-
export { ReasoningEffortSelector, } from './reasoning-effort-selector';
|
|
9
|
-
export { ConversationHistory, ConversationSidebar, groupConversations, } from './conversation-history';
|
|
10
|
-
export { ChatPanel, resolveChatAuthIssue, } from './chat-panel';
|
|
11
|
-
export { ThinkingTimeline, ThinkingTimelineMarker, } from './thinking-timeline';
|
|
12
|
-
export { getToolHandler, DEFAULT_TOOL_HANDLERS, } from './tool-handlers';
|
|
13
|
-
export { ToolProgressProvider, useToolProgress, useToolCallProgress, } from './tool-progress-context';
|
|
14
|
-
export { ToolApprovalProvider, useToolApprovalResponse, } from './tool-approval-context';
|
|
15
|
-
export { ToolApproval, ToolApprovalHeader, ToolApprovalRequest, ToolApprovalAccepted, ToolApprovalRejected, ToolApprovalActions, ToolApprovalAction, } from './tool-approval';
|
|
1
|
+
export { ChatInput, } from './chat-input.js';
|
|
2
|
+
export { CompactingMessage, Message, ThinkingMessage, } from './chat-message.js';
|
|
3
|
+
export { Messages } from './chat-messages.js';
|
|
4
|
+
export { CheckpointBadge } from './checkpoint-badge.js';
|
|
5
|
+
export { RestoreDialog, } from './restore-dialog.js';
|
|
6
|
+
export { ModelSelector } from './model-selector.js';
|
|
7
|
+
export { ModelEffortSelector, resolveModelEffortPresetIndex, } from './model-effort-selector.js';
|
|
8
|
+
export { ReasoningEffortSelector, } from './reasoning-effort-selector.js';
|
|
9
|
+
export { ConversationHistory, ConversationSidebar, groupConversations, } from './conversation-history.js';
|
|
10
|
+
export { ChatPanel, resolveChatAuthIssue, } from './chat-panel.js';
|
|
11
|
+
export { ThinkingTimeline, ThinkingTimelineMarker, } from './thinking-timeline.js';
|
|
12
|
+
export { getToolHandler, DEFAULT_TOOL_HANDLERS, } from './tool-handlers.js';
|
|
13
|
+
export { ToolProgressProvider, useToolProgress, useToolCallProgress, } from './tool-progress-context.js';
|
|
14
|
+
export { ToolApprovalProvider, useToolApprovalResponse, } from './tool-approval-context.js';
|
|
15
|
+
export { ToolApproval, ToolApprovalHeader, ToolApprovalRequest, ToolApprovalAccepted, ToolApprovalRejected, ToolApprovalActions, ToolApprovalAction, } from './tool-approval.js';
|
|
16
|
+
export { VoiceOrb } from './voice-orb.js';
|
|
17
|
+
export { VoiceOrbRenderer } from './voice-orb-renderer.js';
|
|
18
|
+
export { voiceOrbFragmentShader, voiceOrbVertexShader, } from './voice-orb-shaders.js';
|
|
19
|
+
export { summarizeVoiceOrbSpectrum, VoiceOrbStreamAnalyser, } from './voice-orb-audio.js';
|
|
20
|
+
export { getVoiceOrbStateLabel, getVoiceOrbStateTargets, normalizeVoiceOrbAudioLevels, silentVoiceOrbAudioLevels, voiceOrbSilenceHoldMs, voiceOrbSilenceThreshold, voiceOrbSpeakingThreshold, voiceOrbStateTransitionSeconds, voiceOrbStates, } from './voice-orb-types.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import ReactMarkdown from 'react-markdown';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
5
|
import rehypeRaw from 'rehype-raw';
|
|
6
6
|
import remarkGfm from 'remark-gfm';
|
|
7
7
|
const components = {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronDown, Zap } from 'lucide-react';
|
|
4
4
|
import { useEffect, useLayoutEffect, useRef, useState, } from 'react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
7
|
-
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
|
|
8
|
-
import { Slider } from '../ui/slider';
|
|
9
|
-
import { MaxThumbBurst, ModelEffortRangeEffects, } from './model-effort-power-effects';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { Button } from '../ui/button.js';
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover.js';
|
|
8
|
+
import { Slider } from '../ui/slider.js';
|
|
9
|
+
import { MaxThumbBurst, ModelEffortRangeEffects, } from './model-effort-power-effects.js';
|
|
10
10
|
const EXPANDED_TRIGGER_WIDTH = 252;
|
|
11
11
|
const TRIGGER_MOTION_MS = 320;
|
|
12
12
|
export function resolveModelEffortPresetIndex(presets, selectedModel, selectedEffort) {
|
|
@@ -144,12 +144,12 @@ export function ModelEffortSelector({ providers, presets, selectedModel, selecte
|
|
|
144
144
|
setPreviewPresetIndex(null);
|
|
145
145
|
onSelectionChange(nextPreset.modelId, nextPreset.effort);
|
|
146
146
|
};
|
|
147
|
-
return (_jsxs(Popover, { open: open, onOpenChange: handleOpenChange, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { ref: triggerRef, type: "button", variant: "ghost", size: "sm", disabled: disabled || !currentPreset, "aria-label": `Model and effort: ${currentPreset?.modelName ?? 'Unavailable'}, ${currentPreset?.effortLabel ?? 'Unavailable'}`, className: cn('text-foreground hover:bg-muted h-8 min-w-0 cursor-pointer gap-1.5 overflow-hidden
|
|
147
|
+
return (_jsxs(Popover, { open: open, onOpenChange: handleOpenChange, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { ref: triggerRef, type: "button", variant: "ghost", size: "sm", disabled: disabled || !currentPreset, "aria-label": `Model and effort: ${currentPreset?.modelName ?? 'Unavailable'}, ${currentPreset?.effortLabel ?? 'Unavailable'}`, className: cn('text-foreground hover:bg-muted rounded-pill text-ui-caption h-8 min-w-0 cursor-pointer gap-1.5 overflow-hidden px-2.5 font-medium transition-colors', open ? 'max-w-none' : 'w-auto max-w-[220px]'), style: { width: open ? EXPANDED_TRIGGER_WIDTH : undefined }, children: [_jsx(Zap, { className: "size-4 shrink-0" }), _jsx("span", { className: "min-w-0 max-w-[110px] truncate", children: currentPreset?.modelName }), _jsx("span", { className: cn('shrink-0 font-normal transition-colors duration-300', isMaxPower ? 'text-model-effort-purple' : 'text-muted-foreground'), children: currentPreset?.effortLabel }), _jsx(ChevronDown, { className: "text-muted-foreground size-3 shrink-0" })] }) }), _jsxs(PopoverContent, { align: "end", side: "top", sideOffset: 8, collisionPadding: 12, className: "model-effort-popover rounded-container p-2.5 shadow-xl", style: { width: EXPANDED_TRIGGER_WIDTH }, children: [showProviderToggle ? (_jsxs("div", { className: "border-border bg-muted rounded-pill relative mx-auto mb-2.5 flex w-fit items-center border p-0.5", role: "group", "aria-label": "AI provider", children: [_jsx("div", { "aria-hidden": "true", className: "bg-background rounded-pill absolute inset-y-0.5 left-0.5 w-12 shadow-sm transition-transform duration-200 ease-out", style: {
|
|
148
148
|
transform: `translateX(${activeProviderIndex * 3}rem)`,
|
|
149
149
|
} }), providers.map((provider) => {
|
|
150
150
|
const active = provider.id === activeProviderId;
|
|
151
|
-
return (_jsx("button", { type: "button", onClick: () => handleProviderChange(provider.id), disabled: disabled, "aria-label": provider.name, "aria-pressed": active, className: cn('relative z-10 inline-flex h-8 w-12 cursor-pointer items-center justify-center
|
|
152
|
-
})] })) : null, _jsxs("div", { className: "text-muted-foreground flex items-center justify-between px-1
|
|
151
|
+
return (_jsx("button", { type: "button", onClick: () => handleProviderChange(provider.id), disabled: disabled, "aria-label": provider.name, "aria-pressed": active, className: cn('rounded-pill relative z-10 inline-flex h-8 w-12 cursor-pointer items-center justify-center transition-opacity disabled:cursor-not-allowed disabled:opacity-50', active ? 'opacity-100' : 'opacity-45 hover:opacity-80'), children: _jsx("span", { className: "flex size-4 items-center justify-center [&>img]:size-4", children: provider.icon }) }, provider.id));
|
|
152
|
+
})] })) : null, _jsxs("div", { className: "text-muted-foreground text-11 flex items-center justify-between px-1 font-medium", children: [_jsx("span", { children: "Faster" }), _jsx("span", { children: "Smarter" })] }), _jsxs("div", { className: "relative mt-1.5 h-8", children: [_jsx(Slider, { "aria-label": "Model intelligence", value: [visiblePresetIndex], min: 0, max: maxPresetIndex, step: 1, disabled: disabled || activePresets.length === 0, onValueChange: ([nextIndex]) => {
|
|
153
153
|
if (typeof nextIndex === 'number') {
|
|
154
154
|
preparePresetEffects(activePresets[nextIndex]);
|
|
155
155
|
setPreviewPresetIndex(nextIndex);
|
|
@@ -165,13 +165,13 @@ export function ModelEffortSelector({ providers, presets, selectedModel, selecte
|
|
|
165
165
|
? '[&>span:last-child]:duration-0'
|
|
166
166
|
: isDragging
|
|
167
167
|
? '[&>span:last-child]:duration-150'
|
|
168
|
-
: '[&>span:last-child]:duration-300') }), _jsx("div", { "aria-hidden": "true", className: cn('bg-model-effort-blue pointer-events-none absolute left-px top-[5px] z-[1] h-[22px] overflow-hidden
|
|
168
|
+
: '[&>span:last-child]:duration-300') }), _jsx("div", { "aria-hidden": "true", className: cn('bg-model-effort-blue rounded-pill pointer-events-none absolute left-px top-[5px] z-[1] h-[22px] overflow-hidden transition-[width] ease-[cubic-bezier(.23,1,.32,1)]', !thumbMotionReady
|
|
169
169
|
? 'duration-0'
|
|
170
170
|
: isDragging
|
|
171
171
|
? 'duration-150'
|
|
172
172
|
: 'duration-300'), style: { width: fillWidth(visiblePresetIndex, maxPresetIndex) }, children: powerLevel !== null ? (_jsx(ModelEffortRangeEffects, { level: powerLevel, reveal: revealMax }, powerLevel)) : null }), _jsx("div", { className: cn('pointer-events-none absolute inset-0 z-[1] transition-[opacity,transform] ease-[cubic-bezier(.23,1,.32,1)]', isMaxPower
|
|
173
173
|
? 'scale-75 opacity-0 delay-100 duration-[400ms]'
|
|
174
|
-
: 'scale-100 opacity-100 duration-300'), "aria-hidden": true, children: activePresets.map((preset, index) => (_jsx("span", { className: cn('absolute top-1/2 size-1 -translate-x-1/2 -translate-y-1/2
|
|
174
|
+
: 'scale-100 opacity-100 duration-300'), "aria-hidden": true, children: activePresets.map((preset, index) => (_jsx("span", { className: cn('rounded-pill absolute top-1/2 size-1 -translate-x-1/2 -translate-y-1/2 transition-[background-color,transform] duration-300 ease-[cubic-bezier(.23,1,.32,1)]', index <= visiblePresetIndex
|
|
175
175
|
? powerLevel === 'light' || powerLevel === 'medium'
|
|
176
176
|
? 'bg-model-effort-blue/45'
|
|
177
177
|
: 'bg-white/55'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Check, ChevronDown } from 'lucide-react';
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
4
|
-
import { Button } from '../ui/button';
|
|
5
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '../ui/dropdown-menu';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
import { Button } from '../ui/button.js';
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '../ui/dropdown-menu.js';
|
|
6
6
|
export function ModelSelector({ models, selectedModel, onModelChange, disabled = false, className, dropdownAlign = 'start', dropdownSide = 'bottom', }) {
|
|
7
7
|
const currentModel = models.find((m) => m.id === selectedModel) ?? models[0];
|
|
8
|
-
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: "sm", disabled: disabled, className: cn('text-muted-foreground hover:text-foreground h-8 min-w-0 max-w-[180px] cursor-pointer gap-1
|
|
8
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: "sm", disabled: disabled, className: cn('text-muted-foreground hover:text-foreground rounded-pill text-ui-caption h-8 min-w-0 max-w-[180px] cursor-pointer gap-1 px-2.5 font-medium', className), children: [_jsx("span", { className: "min-w-0 truncate", children: currentModel?.name }), _jsx(ChevronDown, { className: "size-3 opacity-50" })] }) }), _jsx(DropdownMenuContent, { align: dropdownAlign, side: dropdownSide, className: "min-w-[160px]", children: models.map((model) => (_jsxs(DropdownMenuItem, { onClick: () => onModelChange(model.id), className: "flex cursor-pointer items-center gap-2", children: [_jsx("span", { children: model.icon }), _jsx("span", { className: "flex-1", children: model.name }), model.id === selectedModel && (_jsx(Check, { className: "text-primary size-4" }))] }, model.id))) })] }));
|
|
9
9
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Brain, Check, ChevronDown } from 'lucide-react';
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
4
|
-
import { Button } from '../ui/button';
|
|
5
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger, } from '../ui/dropdown-menu';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
import { Button } from '../ui/button.js';
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger, } from '../ui/dropdown-menu.js';
|
|
6
6
|
export function ReasoningEffortSelector({ options, selectedEffort, onEffortChange, disabled = false, className, showLabel = false, dropdownAlign = 'start', dropdownSide = 'bottom', }) {
|
|
7
7
|
const currentOption = options.find((o) => o.value === selectedEffort) ?? options[1]; // Default to medium
|
|
8
8
|
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-sm", disabled: disabled, className: cn('text-muted-foreground hover:text-foreground cursor-pointer', showLabel &&
|
|
9
|
-
'h-8 w-auto gap-1.5
|
|
9
|
+
'rounded-pill text-ui-caption h-8 w-auto gap-1.5 px-3 font-medium', className), children: showLabel ? (_jsxs(_Fragment, { children: [_jsx("span", { children: currentOption?.label }), _jsx(ChevronDown, { className: "size-3 opacity-50" })] })) : (_jsx(Brain, { className: "size-4" })) }) }), _jsxs(DropdownMenuContent, { align: dropdownAlign, side: dropdownSide, className: "min-w-[140px]", children: [_jsx(DropdownMenuLabel, { className: "text-muted-foreground font-normal", children: "Reasoning" }), options.map((option) => (_jsxs(DropdownMenuItem, { onClick: () => onEffortChange(option.value), className: "flex cursor-pointer items-center gap-2", children: [!showLabel && _jsx(Brain, { className: "text-muted-foreground size-3.5" }), _jsx("span", { className: "flex-1", children: option.label }), option.value === selectedEffort && (_jsx(Check, { className: "text-primary size-4" }))] }, option.value)))] })] }));
|
|
10
10
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlertTriangle, History } from 'lucide-react';
|
|
4
|
-
import { Button } from '../ui/button';
|
|
5
|
-
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '../ui/dialog';
|
|
4
|
+
import { Button } from '../ui/button.js';
|
|
5
|
+
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '../ui/dialog.js';
|
|
6
6
|
import { formatDistanceToNow } from 'date-fns';
|
|
7
7
|
/**
|
|
8
8
|
* Dialog for confirming checkpoint restoration.
|
|
@@ -19,5 +19,5 @@ export function RestoreDialog({ open, onOpenChange, checkpoint, onConfirm, isRes
|
|
|
19
19
|
const remainingCount = files.length - displayFiles.length;
|
|
20
20
|
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "sm:max-w-md", children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { className: "flex items-center gap-2", children: [_jsx(History, { className: "text-muted-foreground size-5" }), "Restore to this point?"] }), _jsxs(DialogDescription, { children: ["This will undo all changes made from", ' ', formatDistanceToNow(new Date(checkpoint.createdAt), {
|
|
21
21
|
addSuffix: true,
|
|
22
|
-
}), ' ', "onwards."] })] }), _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "bg-destructive/10 flex items-start gap-2
|
|
22
|
+
}), ' ', "onwards."] })] }), _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "bg-destructive/10 rounded-container text-ui-body flex items-start gap-2 p-3", children: [_jsx(AlertTriangle, { className: "text-destructive mt-0.5 size-4 shrink-0" }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-foreground", children: "All changes after this point will be reverted. Files created after this checkpoint will be deleted." }), _jsx("p", { className: "text-muted-foreground", children: "This action cannot be undone." })] })] }), files.length > 0 && (_jsxs("div", { className: "text-muted-foreground text-ui-body", children: [_jsx("p", { className: "text-foreground mb-2 font-medium", children: "Files in this checkpoint:" }), _jsxs("ul", { className: "bg-muted/50 rounded-control text-ui-caption space-y-1 p-2 font-mono", children: [displayFiles.map((file) => (_jsx("li", { className: "truncate", children: file }, file))), remainingCount > 0 && (_jsxs("li", { className: "text-muted-foreground/70", children: ["...and ", remainingCount, " more"] }))] })] })), _jsxs("p", { className: "text-muted-foreground text-ui-caption", children: [checkpoint.fileCount, " file", checkpoint.fileCount !== 1 ? 's' : '', ' ', "captured"] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: () => onOpenChange(false), disabled: isRestoring, className: "cursor-pointer", children: "Cancel" }), _jsx(Button, { variant: "destructive", onClick: onConfirm, disabled: isRestoring, className: "cursor-pointer", children: isRestoring ? 'Restoring...' : 'Restore' })] })] }) }));
|
|
23
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Eye, FileText, FolderOpen, Globe, Loader2, Terminal, } from 'lucide-react';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
5
|
export var ThinkingTimelineMarker;
|
|
6
6
|
(function (ThinkingTimelineMarker) {
|
|
7
7
|
ThinkingTimelineMarker["Default"] = "default";
|
|
@@ -41,6 +41,6 @@ function getMarkerVisual(marker) {
|
|
|
41
41
|
return _jsx(FolderOpen, { className: "size-4" });
|
|
42
42
|
case ThinkingTimelineMarker.Default:
|
|
43
43
|
default:
|
|
44
|
-
return (_jsx("span", { className: "bg-foreground/70 block h-[6px] w-[6px]
|
|
44
|
+
return (_jsx("span", { className: "bg-foreground/70 rounded-pill block h-[6px] w-[6px]" }));
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-approval.d.ts","sourceRoot":"","sources":["../../../src/components/chat/tool-approval.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,oBAAoB,GACpB,oBAAoB,GACpB,kBAAkB,GAClB,eAAe,CAAA;AAenB;;GAEG;AACH,UAAU,iBAAiB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,oCAAoC;IACpC,KAAK,EAAE,iBAAiB,CAAA;IACxB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE,iBAAiB,2CAanB;AAED;;GAEG;AACH,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,2CAqBzB;AAED;;GAEG;AACH,UAAU,wBAAwB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,GACV,EAAE,wBAAwB,kDAQ1B;AAED;;GAEG;AACH,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,SAAS,GACV,EAAE,qBAAqB,kDAkCvB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAc5E;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,2CAaA;AAED;;GAEG;AACH,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,SAAS,GACV,EAAE,yBAAyB,kDAqB3B;AAED;;GAEG;AACH,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,SAAS,GACV,EAAE,yBAAyB,kDAuB3B;AAED;;GAEG;AACH,UAAU,wBAAwB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,GACV,EAAE,wBAAwB,kDAkB1B;AAED;;GAEG;AACH,KAAK,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAA;AAElE,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,IAAW,EACX,GAAG,KAAK,EACT,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"tool-approval.d.ts","sourceRoot":"","sources":["../../../src/components/chat/tool-approval.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,oBAAoB,GACpB,oBAAoB,GACpB,kBAAkB,GAClB,eAAe,CAAA;AAenB;;GAEG;AACH,UAAU,iBAAiB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,oCAAoC;IACpC,KAAK,EAAE,iBAAiB,CAAA;IACxB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE,iBAAiB,2CAanB;AAED;;GAEG;AACH,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,2CAqBzB;AAED;;GAEG;AACH,UAAU,wBAAwB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,GACV,EAAE,wBAAwB,kDAQ1B;AAED;;GAEG;AACH,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,SAAS,GACV,EAAE,qBAAqB,kDAkCvB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAc5E;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,2CAaA;AAED;;GAEG;AACH,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,SAAS,GACV,EAAE,yBAAyB,kDAqB3B;AAED;;GAEG;AACH,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,SAAS,GACV,EAAE,yBAAyB,kDAuB3B;AAED;;GAEG;AACH,UAAU,wBAAwB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,GACV,EAAE,wBAAwB,kDAkB1B;AAED;;GAEG;AACH,KAAK,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAA;AAElE,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,IAAW,EACX,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAQzB"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Check, ChevronDown, HelpCircle, ShieldAlert, X } from 'lucide-react';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { Button } from '../ui/button.js';
|
|
7
7
|
const ToolApprovalContext = React.createContext({
|
|
8
8
|
state: 'approval-requested',
|
|
9
9
|
});
|
|
@@ -11,7 +11,7 @@ function useToolApprovalContext() {
|
|
|
11
11
|
return React.useContext(ToolApprovalContext);
|
|
12
12
|
}
|
|
13
13
|
export function ToolApproval({ children, state, approved, className, }) {
|
|
14
|
-
return (_jsx(ToolApprovalContext.Provider, { value: { state, approved }, children: _jsx("div", { className: cn('bg-card border-border my-2 overflow-hidden
|
|
14
|
+
return (_jsx(ToolApprovalContext.Provider, { value: { state, approved }, children: _jsx("div", { className: cn('bg-card border-border rounded-container my-2 overflow-hidden border', className), children: children }) }));
|
|
15
15
|
}
|
|
16
16
|
export function ToolApprovalHeader({ children, className, }) {
|
|
17
17
|
const { state, approved } = useToolApprovalContext();
|
|
@@ -24,7 +24,7 @@ export function ToolApprovalRequest({ children, className, }) {
|
|
|
24
24
|
if (state !== 'approval-requested') {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
|
-
return _jsx("div", { className: cn('text-
|
|
27
|
+
return _jsx("div", { className: cn('text-ui-caption', className), children: children });
|
|
28
28
|
}
|
|
29
29
|
export function ToolApprovalHelp({ children, className, }) {
|
|
30
30
|
const { state } = useToolApprovalContext();
|
|
@@ -33,13 +33,13 @@ export function ToolApprovalHelp({ children, className, }) {
|
|
|
33
33
|
if (state !== 'approval-requested') {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
|
-
return (_jsxs("div", { className: cn('', className), children: [_jsxs("button", { type: "button", onClick: () => setIsOpen(!isOpen), className: "text-muted-foreground hover:text-foreground flex cursor-pointer items-center gap-1
|
|
36
|
+
return (_jsxs("div", { className: cn('', className), children: [_jsxs("button", { type: "button", onClick: () => setIsOpen(!isOpen), className: "text-muted-foreground hover:text-foreground text-11 flex cursor-pointer items-center gap-1 transition-colors", children: [_jsx(HelpCircle, { className: "size-2.5" }), _jsx("span", { children: "What does this mean?" }), _jsx(ChevronDown, { className: cn('size-2.5 transition-transform', isOpen && 'rotate-180') })] }), isOpen && (_jsx("div", { className: "bg-muted/30 rounded-control mt-1.5 px-2 py-1.5", children: _jsx("p", { className: "text-muted-foreground text-11 leading-relaxed", children: children }) }))] }));
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Pre-built help content for sandboxing explanation
|
|
40
40
|
*/
|
|
41
41
|
export function ToolApprovalSandboxHelp({ className }) {
|
|
42
|
-
return (_jsxs(ToolApprovalHelp, { className: className, children: [_jsx("strong", { className: "text-foreground", children: "Sandboxing" }), " restricts commands from accessing the network and writing to sensitive locations. Package managers like", ' ', _jsx("code", { className: "bg-muted rounded px-1 py-0.5", children: "pnpm install" }), "
|
|
42
|
+
return (_jsxs(ToolApprovalHelp, { className: className, children: [_jsx("strong", { className: "text-foreground", children: "Sandboxing" }), " restricts commands from accessing the network and writing to sensitive locations. Package managers like", ' ', _jsx("code", { className: "bg-muted rounded-control px-1 py-0.5", children: "pnpm install" }), ' ', "need network access to download packages, so they run unsandboxed.", _jsxs("strong", { className: "text-foreground", children: [' ', "Only approve commands you trust."] })] }));
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Pre-built help content for dangerous command explanation
|
|
@@ -54,7 +54,7 @@ export function ToolApprovalAccepted({ children, className, }) {
|
|
|
54
54
|
if (!shouldShow) {
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
|
-
return (_jsx("div", { className: cn('text-success flex items-center gap-1.5
|
|
57
|
+
return (_jsx("div", { className: cn('text-success text-ui-caption flex items-center gap-1.5', className), children: children ?? 'Approved' }));
|
|
58
58
|
}
|
|
59
59
|
export function ToolApprovalRejected({ children, className, }) {
|
|
60
60
|
const { state, approved } = useToolApprovalContext();
|
|
@@ -65,7 +65,7 @@ export function ToolApprovalRejected({ children, className, }) {
|
|
|
65
65
|
if (!shouldShow) {
|
|
66
66
|
return null;
|
|
67
67
|
}
|
|
68
|
-
return (_jsx("div", { className: cn('text-destructive flex items-center gap-1.5
|
|
68
|
+
return (_jsx("div", { className: cn('text-destructive text-ui-caption flex items-center gap-1.5', className), children: children ?? 'Rejected' }));
|
|
69
69
|
}
|
|
70
70
|
export function ToolApprovalActions({ children, className, }) {
|
|
71
71
|
const { state } = useToolApprovalContext();
|
|
@@ -76,5 +76,5 @@ export function ToolApprovalActions({ children, className, }) {
|
|
|
76
76
|
return (_jsx("div", { className: cn('border-border flex items-center justify-end gap-2 border-t px-3 py-2', className), children: children }));
|
|
77
77
|
}
|
|
78
78
|
export function ToolApprovalAction({ className, size = 'sm', ...props }) {
|
|
79
|
-
return (_jsx(Button, { className: cn('h-7
|
|
79
|
+
return (_jsx(Button, { className: cn('text-ui-caption h-7', className), size: size, ...props }));
|
|
80
80
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { ThinkingTimelineMarker } from './thinking-timeline';
|
|
3
|
-
import { type ApprovalResponseHandler } from './tool-approval-context';
|
|
2
|
+
import { ThinkingTimelineMarker } from './thinking-timeline.js';
|
|
3
|
+
import { type ApprovalResponseHandler } from './tool-approval-context.js';
|
|
4
4
|
/**
|
|
5
5
|
* Progress data for streaming tool execution (e.g., command stdout/stderr)
|
|
6
6
|
*/
|