@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
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlertTriangle, BookOpen, Camera, Check, CheckCheck, Copy, Database, Download, FileCode, FileText, FolderOpen, Globe, Info, Package, Plus, Search, Sparkles, Terminal, Trash2, X, } from 'lucide-react';
|
|
4
4
|
import { useState } from 'react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
import { ChatImageLightbox } from './chat-image-lightbox';
|
|
7
|
-
import { ThinkingTimelineMarker } from './thinking-timeline';
|
|
8
|
-
import { ToolApproval, ToolApprovalAction, ToolApprovalActions, ToolApprovalDangerousHelp, ToolApprovalHeader, ToolApprovalHelp, ToolApprovalRequest, ToolApprovalSandboxHelp, } from './tool-approval';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { ChatImageLightbox } from './chat-image-lightbox.js';
|
|
7
|
+
import { ThinkingTimelineMarker } from './thinking-timeline.js';
|
|
8
|
+
import { ToolApproval, ToolApprovalAction, ToolApprovalActions, ToolApprovalDangerousHelp, ToolApprovalHeader, ToolApprovalHelp, ToolApprovalRequest, ToolApprovalSandboxHelp, } from './tool-approval.js';
|
|
9
9
|
/**
|
|
10
10
|
* Code block component for displaying command output or file contents
|
|
11
11
|
*/
|
|
12
12
|
function CodeBlock({ children, maxHeight = 200, className, }) {
|
|
13
|
-
return (_jsx("pre", { className: cn('bg-terminal text-terminal-foreground min-w-0 overflow-auto whitespace-pre-wrap break-all
|
|
13
|
+
return (_jsx("pre", { className: cn('bg-terminal text-terminal-foreground rounded-container text-ui-caption min-w-0 overflow-auto whitespace-pre-wrap break-all p-3 font-mono', className), style: { maxHeight }, children: children }));
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Copy button component
|
|
@@ -22,7 +22,7 @@ function CopyButton({ text }) {
|
|
|
22
22
|
setCopied(true);
|
|
23
23
|
setTimeout(() => setCopied(false), 2000);
|
|
24
24
|
};
|
|
25
|
-
return (_jsx("button", { onClick: handleCopy, className: "text-terminal-muted hover:bg-terminal-border hover:text-terminal-foreground cursor-pointer
|
|
25
|
+
return (_jsx("button", { onClick: handleCopy, className: "text-terminal-muted hover:bg-terminal-border hover:text-terminal-foreground rounded-control cursor-pointer p-1 transition-colors", title: "Copy command", children: copied ? (_jsx(CheckCheck, { className: "text-success size-3.5" })) : (_jsx(Copy, { className: "size-3.5" })) }));
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Summarize a command for the header (truncate long commands)
|
|
@@ -42,7 +42,7 @@ function summarizeCommand(command) {
|
|
|
42
42
|
function TerminalOutput({ command, stdout, stderr, exitCode, error, sandboxed, }) {
|
|
43
43
|
const success = !error && (exitCode === 0 || exitCode === undefined);
|
|
44
44
|
const hasOutput = stdout || stderr || error;
|
|
45
|
-
return (_jsxs("div", { className: "border-terminal-border bg-terminal min-w-0 max-w-full overflow-hidden
|
|
45
|
+
return (_jsxs("div", { className: "border-terminal-border bg-terminal rounded-container min-w-0 max-w-full overflow-hidden border", children: [_jsxs("div", { className: "border-terminal-border bg-terminal-header flex min-w-0 items-center gap-2 border-b px-3 py-1.5", children: [_jsx(Terminal, { className: "text-terminal-muted size-3.5 shrink-0" }), _jsx("code", { className: "text-terminal-foreground text-ui-caption min-w-0 flex-1 truncate font-mono", children: summarizeCommand(command) }), sandboxed === false && (_jsx("span", { className: "rounded-control text-11 shrink-0 bg-amber-500/20 px-1.5 py-0.5 font-medium text-amber-600", children: "unsandboxed" })), _jsx(CopyButton, { text: command }), success ? (_jsx(Check, { className: "text-success size-3.5 shrink-0" })) : (_jsx(X, { className: "text-terminal-error size-3.5 shrink-0" }))] }), _jsxs("div", { className: "max-h-[300px] overflow-auto p-3", children: [_jsxs("div", { className: "text-terminal-foreground text-ui-caption mb-2 break-all font-mono", children: [_jsx("span", { className: "text-terminal-muted", children: "$" }), " ", command] }), hasOutput && (_jsxs("div", { className: "border-terminal-border/50 border-t pt-2", children: [stdout && (_jsx("pre", { className: "text-terminal-stdout text-ui-caption whitespace-pre-wrap break-all font-mono", children: stdout })), stderr && (_jsx("pre", { className: "text-terminal-stderr text-ui-caption whitespace-pre-wrap break-all font-mono", children: stderr })), error && (_jsx("pre", { className: "text-terminal-error text-ui-caption whitespace-pre-wrap break-all font-mono", children: error }))] }))] })] }));
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* File operation indicator (inline, minimal)
|
|
@@ -75,9 +75,9 @@ function FileOperation({ operation, path, status = 'success', children, }) {
|
|
|
75
75
|
const Icon = icons[operation];
|
|
76
76
|
const fileName = getFileName(path);
|
|
77
77
|
const label = status === 'loading' ? loadingLabels[operation] : completedLabels[operation];
|
|
78
|
-
return (_jsxs("div", { className: "my-1 min-w-0", children: [_jsxs("div", { className: cn('inline-flex max-w-full items-center gap-2
|
|
78
|
+
return (_jsxs("div", { className: "my-1 min-w-0", children: [_jsxs("div", { className: cn('rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1', status === 'error'
|
|
79
79
|
? 'bg-destructive/10 text-destructive'
|
|
80
|
-
: 'bg-muted text-muted-foreground'), children: [_jsx(Icon, { className: cn('size-3.5 shrink-0', status === 'loading' && 'animate-pulse') }), _jsx("span", { className: "shrink-0 font-medium", children: label }), _jsx("code", { className: "bg-background/50 min-w-0 truncate
|
|
80
|
+
: 'bg-muted text-muted-foreground'), children: [_jsx(Icon, { className: cn('size-3.5 shrink-0', status === 'loading' && 'animate-pulse') }), _jsx("span", { className: "shrink-0 font-medium", children: label }), _jsx("code", { className: "bg-background/50 rounded-control min-w-0 truncate px-1 font-mono", title: path, children: fileName }), status === 'success' && (_jsx(Check, { className: "size-3 shrink-0 text-green-600" })), status === 'error' && _jsx(X, { className: "size-3 shrink-0" }), status === 'loading' && (_jsx("span", { className: "text-muted-foreground/60 shrink-0", children: "..." }))] }), children] }));
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
83
|
* Extract just the filename from a path
|
|
@@ -133,13 +133,13 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
133
133
|
? `data:${image.mediaType};base64,${image.data}`
|
|
134
134
|
: undefined);
|
|
135
135
|
if (imageSrc) {
|
|
136
|
-
return (_jsxs("details", { className: "border-border bg-muted text-muted-foreground my-1 max-w-2xl overflow-hidden
|
|
136
|
+
return (_jsxs("details", { className: "border-border bg-muted text-muted-foreground rounded-control text-ui-caption my-1 max-w-2xl overflow-hidden border", children: [_jsxs("summary", { className: "flex cursor-pointer list-none items-center gap-2 px-2 py-1.5", children: [_jsx(Sparkles, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "min-w-0 truncate", children: result.imagePath
|
|
137
137
|
? `Viewed ${getFileName(result.imagePath)}`
|
|
138
138
|
: 'Viewed image' })] }), _jsx("div", { className: "border-border border-t p-2", children: _jsx(ChatImageLightbox, { src: imageSrc, alt: result.imagePath
|
|
139
139
|
? getFileName(result.imagePath)
|
|
140
|
-
: 'Image viewed by Moldable', className: "bg-background block size-20
|
|
140
|
+
: 'Image viewed by Moldable', className: "bg-background rounded-container block size-20 border", imageClassName: "size-full object-cover" }) })] }, toolCallId));
|
|
141
141
|
}
|
|
142
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
142
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Sparkles, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "min-w-0 truncate", children: result.imagePath
|
|
143
143
|
? `Viewed ${getFileName(result.imagePath)}`
|
|
144
144
|
: 'Viewed image' })] }, toolCallId));
|
|
145
145
|
},
|
|
@@ -163,7 +163,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
163
163
|
if (!images?.length) {
|
|
164
164
|
return (_jsx(LoadingIndicator, { icon: Sparkles, children: "Showing images..." }, toolCallId));
|
|
165
165
|
}
|
|
166
|
-
return (_jsx("div", { className: "my-2 flex max-w-full gap-2 overflow-x-auto", children: images.map((image, index) => (_jsx(ChatImageLightbox, { src: image.imageUrl, alt: image.altText || image.filename || 'Image shown by Moldable', className: "border-border bg-muted block size-20 shrink-0
|
|
166
|
+
return (_jsx("div", { className: "my-2 flex max-w-full gap-2 overflow-x-auto", children: images.map((image, index) => (_jsx(ChatImageLightbox, { src: image.imageUrl, alt: image.altText || image.filename || 'Image shown by Moldable', className: "border-border bg-muted rounded-container block size-20 shrink-0 border", imageClassName: "size-full object-cover" }, `${image.imageUrl}-${index}`))) }, toolCallId));
|
|
167
167
|
},
|
|
168
168
|
},
|
|
169
169
|
generateImage: {
|
|
@@ -181,7 +181,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
181
181
|
: aspectRatio === 'widescreen'
|
|
182
182
|
? 'aspect-video'
|
|
183
183
|
: 'aspect-square';
|
|
184
|
-
return (_jsx("figure", { className: "my-2 min-w-0 max-w-2xl", children: _jsxs("div", { className: cn('border-border bg-muted relative w-full overflow-hidden
|
|
184
|
+
return (_jsx("figure", { className: "my-2 min-w-0 max-w-2xl", children: _jsxs("div", { className: cn('border-border bg-muted rounded-container relative w-full overflow-hidden border', ratioClass), children: [_jsx("div", { className: "from-muted via-background/45 to-muted absolute inset-0 animate-pulse bg-gradient-to-br" }), _jsx("div", { className: "bg-foreground/5 absolute inset-0" }), _jsxs("div", { className: "text-muted-foreground absolute inset-0 flex flex-col items-center justify-center gap-2 px-6 text-center", children: [_jsx(Sparkles, { className: "size-5 animate-pulse" }), _jsx("span", { className: "text-ui-caption max-w-full truncate font-medium", children: prompt
|
|
185
185
|
? `Generating "${prompt.slice(0, 54)}${prompt.length > 54 ? '...' : ''}"`
|
|
186
186
|
: 'Generating image...' })] })] }) }));
|
|
187
187
|
},
|
|
@@ -199,11 +199,11 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
199
199
|
? `data:${image.mediaType};base64,${image.data}`
|
|
200
200
|
: undefined);
|
|
201
201
|
if (!imageSrc) {
|
|
202
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 flex max-w-full items-start gap-2
|
|
202
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 flex max-w-full items-start gap-2 px-2 py-1.5", children: [_jsx(Sparkles, { className: "mt-0.5 size-3.5 shrink-0" }), _jsx("span", { className: "min-w-0 whitespace-normal break-words leading-relaxed", children: result.imagePath
|
|
203
203
|
? `Generated image saved at ${result.imagePath}.`
|
|
204
204
|
: 'Generated image saved.' })] }, toolCallId));
|
|
205
205
|
}
|
|
206
|
-
return (_jsxs("figure", { className: "my-2 min-w-0 max-w-2xl", children: [_jsx(ChatImageLightbox, { src: imageSrc, alt: result.prompt || 'Generated image', className: "border-border bg-muted block max-w-full
|
|
206
|
+
return (_jsxs("figure", { className: "my-2 min-w-0 max-w-2xl", children: [_jsx(ChatImageLightbox, { src: imageSrc, alt: result.prompt || 'Generated image', className: "border-border bg-muted rounded-container block max-w-full border", imageClassName: "block max-h-[420px] w-full object-contain" }), _jsxs("figcaption", { className: "text-muted-foreground text-ui-caption mt-1 flex min-w-0 items-center gap-1", children: [_jsx(Sparkles, { className: "size-3 shrink-0" }), _jsx("span", { className: "truncate", children: result.imagePath
|
|
207
207
|
? `${getFileName(result.imagePath)}${result.size ? ` - ${result.size}` : ''}`
|
|
208
208
|
: result.size || 'Generated image' })] })] }, toolCallId));
|
|
209
209
|
},
|
|
@@ -219,7 +219,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
219
219
|
return (_jsx(LoadingIndicator, { icon: Camera, children: "Taking screenshot..." }, toolCallId));
|
|
220
220
|
}
|
|
221
221
|
if (result.type === 'error-text') {
|
|
222
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 flex max-w-full items-start gap-2
|
|
222
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 flex max-w-full items-start gap-2 px-2 py-1.5", children: [_jsx(Camera, { className: "mt-0.5 size-3.5 shrink-0" }), _jsx("span", { className: "min-w-0 whitespace-normal break-words leading-relaxed", children: typeof result.value === 'string'
|
|
223
223
|
? result.value
|
|
224
224
|
: 'Screenshot failed' })] }, toolCallId));
|
|
225
225
|
}
|
|
@@ -229,9 +229,9 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
229
229
|
part.mediaType?.startsWith('image/'));
|
|
230
230
|
const text = parts.find((part) => part.type === 'text')?.text;
|
|
231
231
|
if (!image?.data || !image.mediaType) {
|
|
232
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
232
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Camera, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: text || 'Screenshot captured' }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
233
233
|
}
|
|
234
|
-
return (_jsxs("figure", { className: "my-2 min-w-0 max-w-2xl", children: [_jsx(ChatImageLightbox, { src: `data:${image.mediaType};base64,${image.data}`, alt: "Current app screenshot", className: "border-border bg-muted block max-w-full
|
|
234
|
+
return (_jsxs("figure", { className: "my-2 min-w-0 max-w-2xl", children: [_jsx(ChatImageLightbox, { src: `data:${image.mediaType};base64,${image.data}`, alt: "Current app screenshot", className: "border-border bg-muted rounded-container block max-w-full border", imageClassName: "block max-h-[420px] w-full object-contain" }), text && (_jsxs("figcaption", { className: "text-muted-foreground text-ui-caption mt-1 flex items-center gap-1", children: [_jsx(Camera, { className: "size-3" }), _jsx("span", { className: "truncate", children: text })] }))] }, toolCallId));
|
|
235
235
|
},
|
|
236
236
|
},
|
|
237
237
|
listMoldableAppApi: {
|
|
@@ -247,7 +247,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
247
247
|
const apps = result.apps ?? [];
|
|
248
248
|
const scopes = appApiScopes(result);
|
|
249
249
|
const hasError = result.success === false;
|
|
250
|
-
return (_jsx("div", { className: "my-1 min-w-0 max-w-xl", children: _jsxs("div", { className: cn('inline-flex max-w-full items-center gap-2
|
|
250
|
+
return (_jsx("div", { className: "my-1 min-w-0 max-w-xl", children: _jsxs("div", { className: cn('rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1', hasError
|
|
251
251
|
? 'bg-destructive/10 text-destructive'
|
|
252
252
|
: 'bg-muted text-muted-foreground'), children: [_jsx(Database, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: hasError ? 'App API list failed' : 'Listing app APIs' }), !hasError && (_jsxs("span", { className: "truncate", children: [apps.length, " app", apps.length === 1 ? '' : 's', ", ", scopes.length, ' ', "function", scopes.length === 1 ? '' : 's'] })), hasError ? (_jsx(X, { className: "size-3 shrink-0" })) : (_jsx(Check, { className: "size-3 shrink-0 text-green-600" }))] }) }, toolCallId));
|
|
253
253
|
},
|
|
@@ -264,7 +264,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
264
264
|
const response = output;
|
|
265
265
|
const ok = response.ok !== false && !response.error;
|
|
266
266
|
const itemCount = ok ? appApiItemCount(response.result) : 0;
|
|
267
|
-
return (_jsx("div", { className: "my-1 min-w-0 max-w-xl", children: _jsxs("div", { className: cn('inline-flex max-w-full items-center gap-2
|
|
267
|
+
return (_jsx("div", { className: "my-1 min-w-0 max-w-xl", children: _jsxs("div", { className: cn('rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1', ok
|
|
268
268
|
? 'bg-muted text-muted-foreground'
|
|
269
269
|
: 'bg-destructive/10 text-destructive'), children: [_jsx(Database, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: ok ? 'Fetched app data' : 'App API failed' }), _jsx("span", { className: "min-w-0 truncate", children: ok
|
|
270
270
|
? `${itemCount} item${itemCount === 1 ? '' : 's'}`
|
|
@@ -300,7 +300,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
300
300
|
const previewLines = lines.slice(0, 20);
|
|
301
301
|
const preview = previewLines.join('\n').slice(0, 1000);
|
|
302
302
|
const lineCount = lines.length;
|
|
303
|
-
return (_jsxs("div", { className: "my-1 min-w-0", children: [_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
303
|
+
return (_jsxs("div", { className: "my-1 min-w-0", children: [_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(FileText, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "shrink-0 font-medium", children: "Writing" }), _jsx("code", { className: "bg-background/50 rounded-control min-w-0 truncate px-1 font-mono", children: path ? getFileName(path) : 'file' }), _jsxs("span", { className: "text-muted-foreground/70 shrink-0", children: ["(", lineCount, " line", lineCount !== 1 ? 's' : '', ")"] })] }), _jsx("div", { className: "mt-2", children: _jsx(CodeBlock, { maxHeight: 200, children: preview }) })] }));
|
|
304
304
|
}
|
|
305
305
|
// Fallback when content hasn't started streaming yet
|
|
306
306
|
return (_jsx(FileOperation, { operation: "write", path: path || 'file', status: "loading" }));
|
|
@@ -335,7 +335,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
335
335
|
const entries = result.items
|
|
336
336
|
? result.items.map((i) => `${i.type === 'directory' ? '📁' : '📄'} ${i.name}`)
|
|
337
337
|
: result.entries || [];
|
|
338
|
-
return (_jsxs("div", { className: cn('my-1 inline-flex max-w-full items-center gap-2
|
|
338
|
+
return (_jsxs("div", { className: cn('rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1', 'bg-muted text-muted-foreground'), children: [_jsx(FolderOpen, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: "Listed" }), _jsx("code", { className: "bg-background/50 rounded-control min-w-0 truncate px-1 font-mono", title: result.path, children: getFileName(result.path || 'directory') }), _jsxs("span", { className: "text-muted-foreground/70 shrink-0", children: ["(", entries.length, " items)"] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
339
339
|
},
|
|
340
340
|
},
|
|
341
341
|
fileExists: {
|
|
@@ -352,7 +352,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
352
352
|
if (output === undefined || output === null) {
|
|
353
353
|
return (_jsx(FileOperation, { operation: "check", path: "file", status: "loading" }, toolCallId));
|
|
354
354
|
}
|
|
355
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
355
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(FileText, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: "Checked" }), _jsx("code", { className: "bg-background/50 rounded-control min-w-0 truncate px-1 font-mono", title: result.path, children: getFileName(result.path || 'file') }), _jsx("span", { className: "shrink-0", children: result.exists ? 'exists' : 'not found' }), result.exists ? (_jsx(Check, { className: "size-3 shrink-0 text-green-600" })) : (_jsx(X, { className: "size-3 shrink-0 text-amber-500" }))] }, toolCallId));
|
|
356
356
|
},
|
|
357
357
|
},
|
|
358
358
|
executeBashCommand: {
|
|
@@ -363,16 +363,16 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
363
363
|
const { command } = (args ?? {});
|
|
364
364
|
// Show streaming command as it's being written
|
|
365
365
|
if (command && command.trim()) {
|
|
366
|
-
return (_jsxs("div", { className: "border-terminal-border bg-terminal my-2 min-w-0 max-w-full overflow-hidden
|
|
366
|
+
return (_jsxs("div", { className: "border-terminal-border bg-terminal rounded-container my-2 min-w-0 max-w-full overflow-hidden border", children: [_jsxs("div", { className: "bg-terminal-header flex min-w-0 items-center gap-2 px-3 py-1.5", children: [_jsx(Terminal, { className: "text-terminal-muted size-3.5 shrink-0 animate-pulse" }), _jsx("code", { className: "text-terminal-foreground text-ui-caption min-w-0 flex-1 truncate font-mono", children: summarizeCommand(command) }), _jsx("span", { className: "text-terminal-muted text-11 shrink-0", children: "Running..." })] }), _jsx("div", { className: "max-h-[150px] overflow-auto p-3", children: _jsxs("div", { className: "text-terminal-foreground text-ui-caption break-all font-mono", children: [_jsx("span", { className: "text-terminal-muted", children: "$" }), " ", command] }) })] }));
|
|
367
367
|
}
|
|
368
368
|
// Fallback when command hasn't started streaming
|
|
369
|
-
return (_jsx("div", { className: "border-terminal-border bg-terminal my-2 min-w-0 max-w-full overflow-hidden
|
|
369
|
+
return (_jsx("div", { className: "border-terminal-border bg-terminal rounded-container my-2 min-w-0 max-w-full overflow-hidden border", children: _jsxs("div", { className: "bg-terminal-header flex min-w-0 items-center gap-2 px-3 py-1.5", children: [_jsx(Terminal, { className: "text-terminal-muted size-3.5 shrink-0 animate-pulse" }), _jsx("code", { className: "text-terminal-foreground/60 text-ui-caption min-w-0 flex-1 truncate font-mono italic", children: "Generating command..." })] }) }));
|
|
370
370
|
},
|
|
371
371
|
renderOutput: (output, toolCallId) => {
|
|
372
372
|
const result = (output ?? {});
|
|
373
373
|
// If output is empty, tool is still executing
|
|
374
374
|
if (output === undefined || output === null) {
|
|
375
|
-
return (_jsx("div", { className: "border-terminal-border bg-terminal my-2 min-w-0 max-w-full overflow-hidden
|
|
375
|
+
return (_jsx("div", { className: "border-terminal-border bg-terminal rounded-container my-2 min-w-0 max-w-full overflow-hidden border", children: _jsxs("div", { className: "bg-terminal-header flex min-w-0 items-center gap-2 px-3 py-1.5", children: [_jsx(Terminal, { className: "text-terminal-muted size-3.5 shrink-0 animate-pulse" }), _jsx("code", { className: "text-terminal-foreground/60 text-ui-caption min-w-0 flex-1 truncate font-mono italic", children: "Executing..." })] }) }, toolCallId));
|
|
376
376
|
}
|
|
377
377
|
return (_jsx("div", { className: "my-2 min-w-0 max-w-full", children: _jsx(TerminalOutput, { command: result.command || 'command', stdout: result.stdout, stderr: result.stderr, exitCode: result.exitCode, error: result.error }) }, toolCallId));
|
|
378
378
|
},
|
|
@@ -385,10 +385,10 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
385
385
|
const { command, sandbox } = (args ?? {});
|
|
386
386
|
// Show streaming command as it's being written
|
|
387
387
|
if (command && command.trim()) {
|
|
388
|
-
return (_jsxs("div", { className: "border-terminal-border bg-terminal my-2 min-w-0 max-w-full overflow-hidden
|
|
388
|
+
return (_jsxs("div", { className: "border-terminal-border bg-terminal rounded-container my-2 min-w-0 max-w-full overflow-hidden border", children: [_jsxs("div", { className: "bg-terminal-header flex min-w-0 items-center gap-2 px-3 py-1.5", children: [_jsx(Terminal, { className: "text-terminal-muted size-3.5 shrink-0 animate-pulse" }), _jsx("code", { className: "text-terminal-foreground text-ui-caption min-w-0 flex-1 truncate font-mono", children: summarizeCommand(command) }), sandbox === false && (_jsx("span", { className: "rounded-control text-11 shrink-0 bg-amber-500/20 px-1.5 py-0.5 font-medium text-amber-600", children: "unsandboxed" })), _jsx("span", { className: "text-terminal-muted text-11 shrink-0", children: "Running..." })] }), _jsx("div", { className: "max-h-[150px] overflow-auto p-3", children: _jsxs("div", { className: "text-terminal-foreground text-ui-caption break-all font-mono", children: [_jsx("span", { className: "text-terminal-muted", children: "$" }), " ", command] }) })] }));
|
|
389
389
|
}
|
|
390
390
|
// Fallback when command hasn't started streaming
|
|
391
|
-
return (_jsx("div", { className: "border-terminal-border bg-terminal my-2 min-w-0 max-w-full overflow-hidden
|
|
391
|
+
return (_jsx("div", { className: "border-terminal-border bg-terminal rounded-container my-2 min-w-0 max-w-full overflow-hidden border", children: _jsxs("div", { className: "bg-terminal-header flex min-w-0 items-center gap-2 px-3 py-1.5", children: [_jsx(Terminal, { className: "text-terminal-muted size-3.5 shrink-0 animate-pulse" }), _jsx("code", { className: "text-terminal-foreground/60 text-ui-caption min-w-0 flex-1 truncate font-mono italic", children: "Preparing command..." })] }) }));
|
|
392
392
|
},
|
|
393
393
|
// Render with streaming stdout/stderr output
|
|
394
394
|
renderStreaming: (args, progress) => {
|
|
@@ -396,15 +396,15 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
396
396
|
const { stdout, stderr, status } = progress;
|
|
397
397
|
const hasOutput = stdout || stderr;
|
|
398
398
|
const isComplete = status === 'complete';
|
|
399
|
-
return (_jsxs("div", { className: "border-terminal-border bg-terminal my-2 min-w-0 max-w-full overflow-hidden
|
|
399
|
+
return (_jsxs("div", { className: "border-terminal-border bg-terminal rounded-container my-2 min-w-0 max-w-full overflow-hidden border", children: [_jsxs("div", { className: "border-terminal-border bg-terminal-header flex min-w-0 items-center gap-2 border-b px-3 py-1.5", children: [_jsx(Terminal, { className: cn('size-3.5 shrink-0', isComplete
|
|
400
400
|
? 'text-terminal-muted'
|
|
401
|
-
: 'text-terminal-muted animate-pulse') }), _jsx("code", { className: "text-terminal-foreground min-w-0 flex-1 truncate font-mono
|
|
401
|
+
: 'text-terminal-muted animate-pulse') }), _jsx("code", { className: "text-terminal-foreground text-ui-caption min-w-0 flex-1 truncate font-mono", children: command ? summarizeCommand(command) : 'Running...' }), sandbox === false && (_jsx("span", { className: "rounded-control text-11 shrink-0 bg-amber-500/20 px-1.5 py-0.5 font-medium text-amber-600", children: "unsandboxed" })), isComplete ? (_jsx(Check, { className: "text-terminal-stdout size-3.5 shrink-0" })) : (_jsx("span", { className: "text-terminal-muted text-11 shrink-0 animate-pulse", children: "Running..." }))] }), _jsxs("div", { className: "max-h-[300px] overflow-auto p-3", children: [_jsxs("div", { className: "text-terminal-foreground text-ui-caption mb-2 break-all font-mono", children: [_jsx("span", { className: "text-terminal-muted", children: "$" }), " ", command] }), hasOutput && (_jsxs("div", { className: "border-terminal-border/50 border-t pt-2", children: [stdout && (_jsx("pre", { className: "text-terminal-stdout text-ui-caption whitespace-pre-wrap break-all font-mono", children: stdout })), stderr && (_jsx("pre", { className: "text-terminal-stderr text-ui-caption whitespace-pre-wrap break-all font-mono", children: stderr }))] }))] })] }));
|
|
402
402
|
},
|
|
403
403
|
renderOutput: (output, toolCallId) => {
|
|
404
404
|
const result = (output ?? {});
|
|
405
405
|
// If output is empty, tool is still executing
|
|
406
406
|
if (output === undefined || output === null) {
|
|
407
|
-
return (_jsx("div", { className: "border-terminal-border bg-terminal my-2 min-w-0 max-w-full overflow-hidden
|
|
407
|
+
return (_jsx("div", { className: "border-terminal-border bg-terminal rounded-container my-2 min-w-0 max-w-full overflow-hidden border", children: _jsxs("div", { className: "bg-terminal-header flex min-w-0 items-center gap-2 px-3 py-1.5", children: [_jsx(Terminal, { className: "text-terminal-muted size-3.5 shrink-0 animate-pulse" }), _jsx("code", { className: "text-terminal-foreground/60 text-ui-caption min-w-0 flex-1 truncate font-mono italic", children: "Executing..." })] }) }, toolCallId));
|
|
408
408
|
}
|
|
409
409
|
return (_jsx("div", { className: "my-2 min-w-0 max-w-full", children: _jsx(TerminalOutput, { command: result.command || 'command', stdout: result.stdout, stderr: result.stderr, exitCode: result.exitCode, error: result.error, sandboxed: result.sandboxed }) }, toolCallId));
|
|
410
410
|
},
|
|
@@ -416,7 +416,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
416
416
|
const approvalReason = isUnsandboxed
|
|
417
417
|
? 'This command requires running outside the sandbox.'
|
|
418
418
|
: 'This command has been flagged as potentially dangerous.';
|
|
419
|
-
return (_jsxs(ToolApproval, { state: "approval-requested", children: [_jsx(ToolApprovalHeader, { children: _jsxs(ToolApprovalRequest, { children: [_jsx("div", { className: "mb-1
|
|
419
|
+
return (_jsxs(ToolApproval, { state: "approval-requested", children: [_jsx(ToolApprovalHeader, { children: _jsxs(ToolApprovalRequest, { children: [_jsx("div", { className: "text-ui-caption mb-1 font-medium", children: "Command requires approval" }), _jsx("div", { className: "text-muted-foreground text-11 mb-2", children: approvalReason }), _jsx("code", { className: "bg-muted rounded-control text-11 block px-2 py-1.5 font-mono", children: command }), isUnsandboxed ? (_jsx(ToolApprovalSandboxHelp, { className: "mt-2" })) : (_jsx(ToolApprovalDangerousHelp, { className: "mt-2" }))] }) }), _jsxs(ToolApprovalActions, { children: [_jsx(ToolApprovalAction, { variant: "outline", onClick: () => onRespond({
|
|
420
420
|
approvalId: approval.approvalId,
|
|
421
421
|
approved: false,
|
|
422
422
|
reason: 'User rejected command execution',
|
|
@@ -472,7 +472,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
472
472
|
inline: true,
|
|
473
473
|
renderLoading: (args) => {
|
|
474
474
|
const { pattern } = (args ?? {});
|
|
475
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
475
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Search, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Searching", pattern
|
|
476
476
|
? ` for "${pattern.slice(0, 20)}${pattern.length > 20 ? '...' : ''}"`
|
|
477
477
|
: '', "..."] })] }));
|
|
478
478
|
},
|
|
@@ -480,15 +480,15 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
480
480
|
const result = (output ?? {});
|
|
481
481
|
// If output is empty, tool is still executing
|
|
482
482
|
if (output === undefined || output === null) {
|
|
483
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
483
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Search, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Searching..." })] }, toolCallId));
|
|
484
484
|
}
|
|
485
485
|
// Handle raw content output (ripgrep format)
|
|
486
486
|
if (result.content && !result.matches) {
|
|
487
487
|
const lines = result.content.split('\n').filter(Boolean);
|
|
488
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
488
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Search, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: "Search results" }), _jsxs("span", { className: "text-muted-foreground/70 shrink-0", children: ["(", lines.length, " lines)"] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
489
489
|
}
|
|
490
490
|
if (result.success === false || !result.matches?.length) {
|
|
491
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
491
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Search, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: "No matches found" })] }, toolCallId));
|
|
492
492
|
}
|
|
493
493
|
// Group matches by file
|
|
494
494
|
const byFile = result.matches.reduce((acc, match) => {
|
|
@@ -499,7 +499,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
499
499
|
}, {});
|
|
500
500
|
const fileCount = Object.keys(byFile).length;
|
|
501
501
|
const matchCount = result.totalMatches || result.matches.length;
|
|
502
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
502
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Search, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: "Found" }), _jsxs("span", { className: "shrink-0", children: [matchCount, " match", matchCount !== 1 ? 'es' : '', " in ", fileCount, " file", fileCount !== 1 ? 's' : ''] }), result.truncated && (_jsx("span", { className: "shrink-0 text-amber-500", children: "(truncated)" })), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
503
503
|
},
|
|
504
504
|
},
|
|
505
505
|
globFileSearch: {
|
|
@@ -508,18 +508,18 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
508
508
|
inline: true,
|
|
509
509
|
renderLoading: (args) => {
|
|
510
510
|
const { pattern } = (args ?? {});
|
|
511
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
511
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Search, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Finding files", pattern ? ` matching "${pattern}"` : '', "..."] })] }));
|
|
512
512
|
},
|
|
513
513
|
renderOutput: (output, toolCallId) => {
|
|
514
514
|
const result = (output ?? {});
|
|
515
515
|
// If output is empty, tool is still executing
|
|
516
516
|
if (output === undefined || output === null) {
|
|
517
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
517
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Search, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Finding files..." })] }, toolCallId));
|
|
518
518
|
}
|
|
519
519
|
if (result.success === false || !result.files?.length) {
|
|
520
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
520
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Search, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: "No files found" })] }, toolCallId));
|
|
521
521
|
}
|
|
522
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
522
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Search, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: "Found" }), _jsxs("span", { className: "shrink-0", children: [result.files.length, " file", result.files.length !== 1 ? 's' : ''] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
523
523
|
},
|
|
524
524
|
},
|
|
525
525
|
readToolOutput: {
|
|
@@ -541,7 +541,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
541
541
|
}
|
|
542
542
|
const startLine = result.startLine ?? 0;
|
|
543
543
|
const endLine = startLine + (result.linesReturned || 0);
|
|
544
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
544
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(FileText, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: "Read tool output" }), _jsxs("span", { className: "text-muted-foreground/70 shrink-0", children: [startLine, "\u2013", endLine, "/", result.totalLines || 0] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
545
545
|
},
|
|
546
546
|
},
|
|
547
547
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -553,7 +553,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
553
553
|
inline: true,
|
|
554
554
|
renderLoading: (args) => {
|
|
555
555
|
const { query } = (args ?? {});
|
|
556
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
556
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Globe, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Searching", query
|
|
557
557
|
? ` "${query.slice(0, 30)}${query.length > 30 ? '...' : ''}"`
|
|
558
558
|
: ' the web', "..."] })] }));
|
|
559
559
|
},
|
|
@@ -561,12 +561,12 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
561
561
|
const result = (output ?? {});
|
|
562
562
|
// If output is empty, tool is still executing
|
|
563
563
|
if (output === undefined || output === null) {
|
|
564
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
564
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Globe, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Searching the web..." })] }, toolCallId));
|
|
565
565
|
}
|
|
566
566
|
if (result.success === false || !result.results?.length) {
|
|
567
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
567
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Globe, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: "No results found" })] }, toolCallId));
|
|
568
568
|
}
|
|
569
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
569
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Globe, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: "Web search" }), _jsxs("span", { className: "shrink-0", children: [result.results.length, " result", result.results.length !== 1 ? 's' : ''] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
570
570
|
},
|
|
571
571
|
},
|
|
572
572
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -576,13 +576,13 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
576
576
|
loadingLabel: 'Listing skill repositories...',
|
|
577
577
|
marker: ThinkingTimelineMarker.Default,
|
|
578
578
|
inline: true,
|
|
579
|
-
renderLoading: () => (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
579
|
+
renderLoading: () => (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(BookOpen, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Loading skill repositories..." })] })),
|
|
580
580
|
renderOutput: (output, toolCallId) => {
|
|
581
581
|
const result = (output ?? {});
|
|
582
582
|
if (result.success === false || !result.repositories?.length) {
|
|
583
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
583
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(BookOpen, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'No skill repositories configured' })] }, toolCallId));
|
|
584
584
|
}
|
|
585
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
585
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(BookOpen, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: "Skill Repositories" }), _jsxs("span", { className: "shrink-0", children: ["(", result.repositories.length, " repo", result.repositories.length !== 1 ? 's' : '', ")"] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
586
586
|
},
|
|
587
587
|
},
|
|
588
588
|
listAvailableSkills: {
|
|
@@ -591,16 +591,16 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
591
591
|
inline: true,
|
|
592
592
|
renderLoading: (args) => {
|
|
593
593
|
const { repoName } = (args ?? {});
|
|
594
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
594
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Sparkles, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Fetching skills", repoName ? ` from ${repoName}` : '', "..."] })] }));
|
|
595
595
|
},
|
|
596
596
|
renderOutput: (output, toolCallId) => {
|
|
597
597
|
const result = (output ?? {});
|
|
598
598
|
if (result.success === false) {
|
|
599
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 inline-flex max-w-full items-center gap-2
|
|
599
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Sparkles, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Failed to fetch skills' })] }, toolCallId));
|
|
600
600
|
}
|
|
601
601
|
const available = result.available || [];
|
|
602
602
|
const selected = result.selected || [];
|
|
603
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
603
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Sparkles, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "shrink-0 font-medium", children: result.repoName || 'Available Skills' }), _jsxs("span", { className: "shrink-0", children: ["(", selected.length, "/", available.length, " selected)"] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
604
604
|
},
|
|
605
605
|
},
|
|
606
606
|
syncSkills: {
|
|
@@ -609,16 +609,16 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
609
609
|
inline: true,
|
|
610
610
|
renderLoading: (args) => {
|
|
611
611
|
const { repoName } = (args ?? {});
|
|
612
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
612
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Download, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Syncing skills", repoName ? ` from ${repoName}` : '', "..."] })] }));
|
|
613
613
|
},
|
|
614
614
|
renderOutput: (output, toolCallId) => {
|
|
615
615
|
const result = (output ?? {});
|
|
616
616
|
if (result.success === false) {
|
|
617
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 inline-flex max-w-full items-center gap-2
|
|
617
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Download, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Sync failed' })] }, toolCallId));
|
|
618
618
|
}
|
|
619
619
|
const synced = result.synced || 0;
|
|
620
620
|
const failed = result.failed || 0;
|
|
621
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0", children: [_jsxs("div", { className: "inline-flex max-w-full items-center gap-2
|
|
621
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0", children: [_jsxs("div", { className: "rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Download, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "font-medium", children: "Skills synced" }), _jsxs("span", { className: "text-green-600", children: [synced, " synced"] }), failed > 0 && (_jsxs("span", { className: "text-amber-500", children: [failed, " failed"] })), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }), result.skills && result.skills.length > 0 && (_jsx("div", { className: "mt-1.5 flex flex-wrap gap-1 px-2 pb-1", children: result.skills.map((skill) => (_jsxs("span", { className: "bg-primary/10 text-primary rounded-pill text-11 inline-flex items-center gap-1 px-2 py-0.5 font-medium", children: [_jsx(Check, { className: "size-2.5" }), skill] }, skill))) }))] }, toolCallId));
|
|
622
622
|
},
|
|
623
623
|
},
|
|
624
624
|
addSkillRepo: {
|
|
@@ -627,14 +627,14 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
627
627
|
inline: true,
|
|
628
628
|
renderLoading: (args) => {
|
|
629
629
|
const { url } = (args ?? {});
|
|
630
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
630
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Plus, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Adding repository", url ? `: ${url}` : '', "..."] })] }));
|
|
631
631
|
},
|
|
632
632
|
renderOutput: (output, toolCallId) => {
|
|
633
633
|
const result = (output ?? {});
|
|
634
634
|
if (result.success === false) {
|
|
635
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 inline-flex max-w-full items-center gap-2
|
|
635
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Plus, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Failed to add repository' })] }, toolCallId));
|
|
636
636
|
}
|
|
637
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0", children: [_jsxs("div", { className: "inline-flex max-w-full items-center gap-2
|
|
637
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0", children: [_jsxs("div", { className: "rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Plus, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "font-medium", children: "Repository added" }), _jsx("code", { className: "bg-background/50 rounded-control text-11 truncate px-1 font-mono", children: result.url }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }), result.availableSkills && result.availableSkills.length > 0 && (_jsxs("div", { className: "text-muted-foreground text-11 px-2 pb-1", children: [result.availableSkills.length, " skill", result.availableSkills.length !== 1 ? 's' : '', " available:", ' ', result.availableSkills.slice(0, 8).join(', '), result.availableSkills.length > 8 &&
|
|
638
638
|
` +${result.availableSkills.length - 8} more`] }))] }, toolCallId));
|
|
639
639
|
},
|
|
640
640
|
},
|
|
@@ -642,26 +642,26 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
642
642
|
loadingLabel: 'Updating skill selection...',
|
|
643
643
|
marker: ThinkingTimelineMarker.Default,
|
|
644
644
|
inline: true,
|
|
645
|
-
renderLoading: () => (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
645
|
+
renderLoading: () => (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Sparkles, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Updating skill selection..." })] })),
|
|
646
646
|
renderOutput: (output, toolCallId) => {
|
|
647
647
|
const result = (output ?? {});
|
|
648
648
|
if (result.success === false) {
|
|
649
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 inline-flex max-w-full items-center gap-2
|
|
649
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Sparkles, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Update failed' })] }, toolCallId));
|
|
650
650
|
}
|
|
651
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
651
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Sparkles, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "font-medium", children: [result.repoName || 'Selection', " updated"] }), _jsxs("span", { children: ["Mode: ", _jsx("span", { className: "font-medium", children: result.mode })] }), result.skills && result.skills.length > 0 && (_jsxs("span", { className: "truncate", children: ["(", result.skills.length, " skill", result.skills.length !== 1 ? 's' : '', ")"] })), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
652
652
|
},
|
|
653
653
|
},
|
|
654
654
|
initSkillsConfig: {
|
|
655
655
|
loadingLabel: 'Initializing skills config...',
|
|
656
656
|
marker: ThinkingTimelineMarker.Default,
|
|
657
657
|
inline: true,
|
|
658
|
-
renderLoading: () => (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
658
|
+
renderLoading: () => (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(BookOpen, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Initializing skills configuration..." })] })),
|
|
659
659
|
renderOutput: (output, toolCallId) => {
|
|
660
660
|
const result = (output ?? {});
|
|
661
661
|
if (result.success === false) {
|
|
662
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 inline-flex max-w-full items-center gap-2
|
|
662
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(BookOpen, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Initialization failed' })] }, toolCallId));
|
|
663
663
|
}
|
|
664
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0", children: [_jsxs("div", { className: "inline-flex max-w-full items-center gap-2
|
|
664
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0", children: [_jsxs("div", { className: "rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(BookOpen, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "font-medium", children: "Skills config initialized" }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }), result.repositories && result.repositories.length > 0 && (_jsxs("div", { className: "text-muted-foreground text-11 px-2 pb-1", children: ["Added: ", result.repositories.map((r) => r.name).join(', ')] }))] }, toolCallId));
|
|
665
665
|
},
|
|
666
666
|
},
|
|
667
667
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -673,18 +673,18 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
673
673
|
inline: true,
|
|
674
674
|
renderLoading: (args) => {
|
|
675
675
|
const { name, appId } = (args ?? {});
|
|
676
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
676
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Package, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Creating ", name || appId || 'app', "..."] })] }));
|
|
677
677
|
},
|
|
678
678
|
renderOutput: (output, toolCallId) => {
|
|
679
679
|
const result = (output ?? {});
|
|
680
680
|
// If output is empty, tool is still executing
|
|
681
681
|
if (output === undefined || output === null) {
|
|
682
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
682
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Package, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Creating app..." })] }, toolCallId));
|
|
683
683
|
}
|
|
684
684
|
if (result.success === false) {
|
|
685
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 inline-flex max-w-full items-center gap-2
|
|
685
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Package, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Failed to create app' })] }, toolCallId));
|
|
686
686
|
}
|
|
687
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0
|
|
687
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control my-1 min-w-0", children: [_jsxs("div", { className: "text-ui-caption flex items-center gap-2 px-2 py-1.5", children: [_jsx(Package, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "font-medium", children: [result.icon, " ", result.name || result.appId] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }), _jsxs("div", { className: "border-border/50 text-11 flex flex-wrap gap-x-3 gap-y-0.5 border-t px-2 py-1", children: [result.port && (_jsxs("span", { children: ["Port: ", _jsx("code", { className: "font-mono", children: result.port })] })), result.pnpmInstalled && (_jsx("span", { className: "text-green-600", children: "deps installed" })), result.registered && (_jsx("span", { className: "text-green-600", children: "registered" })), result.files && (_jsxs("span", { className: "text-muted-foreground/70", children: [result.files.length, " files"] }))] })] }, toolCallId));
|
|
688
688
|
},
|
|
689
689
|
},
|
|
690
690
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -696,18 +696,18 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
696
696
|
inline: true,
|
|
697
697
|
renderLoading: (args) => {
|
|
698
698
|
const { appId } = (args ?? {});
|
|
699
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
699
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Info, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Getting info for ", appId || 'app', "..."] })] }));
|
|
700
700
|
},
|
|
701
701
|
renderOutput: (output, toolCallId) => {
|
|
702
702
|
const result = (output ?? {});
|
|
703
703
|
if (output === undefined || output === null) {
|
|
704
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
704
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Info, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Getting app info..." })] }, toolCallId));
|
|
705
705
|
}
|
|
706
706
|
if (result.success === false) {
|
|
707
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 inline-flex max-w-full items-center gap-2
|
|
707
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Info, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Failed to get app info' })] }, toolCallId));
|
|
708
708
|
}
|
|
709
709
|
const workspaceCount = result.installedInWorkspaces?.length || 0;
|
|
710
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0
|
|
710
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control my-1 min-w-0", children: [_jsxs("div", { className: "text-ui-caption flex items-center gap-2 px-2 py-1.5", children: [_jsx(Info, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "font-medium", children: result.appName || result.appId }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }), _jsxs("div", { className: "border-border/50 text-11 flex flex-wrap gap-x-3 gap-y-0.5 border-t px-2 py-1", children: [_jsxs("span", { children: ["Installed in ", workspaceCount, " workspace", workspaceCount !== 1 ? 's' : ''] }), result.hasWorkspaceData && (_jsx("span", { className: "text-amber-600", children: "has workspace data" }))] })] }, toolCallId));
|
|
711
711
|
},
|
|
712
712
|
},
|
|
713
713
|
unregisterApp: {
|
|
@@ -716,21 +716,21 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
716
716
|
inline: true,
|
|
717
717
|
renderLoading: (args) => {
|
|
718
718
|
const { appId } = (args ?? {});
|
|
719
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
719
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Package, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Removing ", appId || 'app', " from workspace..."] })] }));
|
|
720
720
|
},
|
|
721
721
|
renderOutput: (output, toolCallId) => {
|
|
722
722
|
const result = (output ?? {});
|
|
723
723
|
if (output === undefined || output === null) {
|
|
724
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
724
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Package, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Removing app from workspace..." })] }, toolCallId));
|
|
725
725
|
}
|
|
726
726
|
if (result.success === false) {
|
|
727
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 inline-flex max-w-full items-center gap-2
|
|
727
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Package, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Failed to remove app' })] }, toolCallId));
|
|
728
728
|
}
|
|
729
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
729
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Package, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "font-medium", children: [result.appName || result.appId, " removed from workspace"] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }, toolCallId));
|
|
730
730
|
},
|
|
731
731
|
renderApproval: (approval, onRespond) => {
|
|
732
732
|
const { appId } = (approval.args ?? {});
|
|
733
|
-
return (_jsxs(ToolApproval, { state: "approval-requested", children: [_jsx(ToolApprovalHeader, { children: _jsxs(ToolApprovalRequest, { children: [_jsx("div", { className: "mb-1
|
|
733
|
+
return (_jsxs(ToolApproval, { state: "approval-requested", children: [_jsx(ToolApprovalHeader, { children: _jsxs(ToolApprovalRequest, { children: [_jsx("div", { className: "text-ui-caption mb-1 font-medium", children: "Remove app from workspace" }), _jsxs("div", { className: "text-muted-foreground text-11 mb-2", children: ["Remove ", _jsx("strong", { children: appId }), " from this workspace?"] }), _jsx("div", { className: "bg-muted/50 rounded-control text-11 px-2 py-1.5", children: "The app's code and data will be preserved. You can add it back later from the app gallery." })] }) }), _jsxs(ToolApprovalActions, { children: [_jsx(ToolApprovalAction, { variant: "outline", onClick: () => onRespond({
|
|
734
734
|
approvalId: approval.approvalId,
|
|
735
735
|
approved: false,
|
|
736
736
|
reason: 'User cancelled',
|
|
@@ -746,21 +746,21 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
746
746
|
inline: true,
|
|
747
747
|
renderLoading: (args) => {
|
|
748
748
|
const { appId, workspaceId } = (args ?? {});
|
|
749
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
749
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Database, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Deleting data for ", appId || 'app', workspaceId ? ` in ${workspaceId}` : '', "..."] })] }));
|
|
750
750
|
},
|
|
751
751
|
renderOutput: (output, toolCallId) => {
|
|
752
752
|
const result = (output ?? {});
|
|
753
753
|
if (output === undefined || output === null) {
|
|
754
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
754
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Database, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Deleting app data..." })] }, toolCallId));
|
|
755
755
|
}
|
|
756
756
|
if (result.success === false) {
|
|
757
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 min-w-0
|
|
757
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control my-1 min-w-0", children: [_jsxs("div", { className: "text-ui-caption flex items-center gap-2 px-2 py-1.5", children: [_jsx(Database, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Failed to delete app data' })] }), (result.workspaceName || result.workspaceId) && (_jsxs("div", { className: "border-destructive/20 text-11 border-t px-2 py-1", children: ["Workspace:", ' ', _jsx("span", { className: "font-medium", children: result.workspaceName || result.workspaceId }), result.workspaceName && result.workspaceId && (_jsxs("span", { className: "text-destructive/70", children: [' ', "(", result.workspaceId, ")"] }))] }))] }, toolCallId));
|
|
758
758
|
}
|
|
759
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0
|
|
759
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control my-1 min-w-0", children: [_jsxs("div", { className: "text-ui-caption flex items-center gap-2 px-2 py-1.5", children: [_jsx(Database, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "font-medium", children: ["Data deleted for ", result.appId] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }), (result.workspaceName || result.workspaceId) && (_jsxs("div", { className: "border-border/50 text-11 border-t px-2 py-1", children: ["Workspace:", ' ', _jsx("span", { className: "font-medium", children: result.workspaceName || result.workspaceId }), result.workspaceName && result.workspaceId && (_jsxs("span", { className: "text-muted-foreground/70", children: [' ', "(", result.workspaceId, ")"] }))] }))] }, toolCallId));
|
|
760
760
|
},
|
|
761
761
|
renderApproval: (approval, onRespond) => {
|
|
762
762
|
const { appId, workspaceId } = (approval.args ?? {});
|
|
763
|
-
return (_jsxs(ToolApproval, { state: "approval-requested", children: [_jsx(ToolApprovalHeader, { children: _jsxs(ToolApprovalRequest, { children: [_jsxs("div", { className: "mb-1 flex items-center gap-1.5
|
|
763
|
+
return (_jsxs(ToolApproval, { state: "approval-requested", children: [_jsx(ToolApprovalHeader, { children: _jsxs(ToolApprovalRequest, { children: [_jsxs("div", { className: "text-ui-caption mb-1 flex items-center gap-1.5 font-medium text-amber-600", children: [_jsx(AlertTriangle, { className: "size-3.5" }), "Delete app data"] }), _jsxs("div", { className: "text-muted-foreground text-11 mb-2", children: ["Delete all data for ", _jsx("strong", { children: appId }), " in workspace ID", ' ', _jsx("strong", { children: workspaceId || 'unknown' }), "?"] }), _jsxs("div", { className: "bg-muted/50 rounded-control text-11 mb-2 grid gap-1 px-2 py-1.5", children: [_jsxs("div", { className: "flex min-w-0 items-center justify-between gap-2", children: [_jsx("span", { className: "text-muted-foreground", children: "App" }), _jsx("code", { className: "bg-background/70 rounded-control truncate px-1 font-mono", children: appId || 'unknown' })] }), _jsxs("div", { className: "flex min-w-0 items-center justify-between gap-2", children: [_jsx("span", { className: "text-muted-foreground", children: "Target workspace ID" }), _jsx("code", { className: "bg-background/70 rounded-control truncate px-1 font-mono", children: workspaceId || 'unknown' })] })] }), _jsx("div", { className: "rounded-control text-11 bg-amber-500/10 px-2 py-1.5 text-amber-700", children: "This permanently deletes this app's database, files, and cache only in the target workspace. The app will remain installed and start fresh there." })] }) }), _jsxs(ToolApprovalActions, { children: [_jsx(ToolApprovalAction, { variant: "outline", onClick: () => onRespond({
|
|
764
764
|
approvalId: approval.approvalId,
|
|
765
765
|
approved: false,
|
|
766
766
|
reason: 'User cancelled',
|
|
@@ -776,22 +776,22 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
776
776
|
inline: true,
|
|
777
777
|
renderLoading: (args) => {
|
|
778
778
|
const { appId } = (args ?? {});
|
|
779
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
779
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Trash2, { className: "size-3.5 shrink-0 animate-pulse" }), _jsxs("span", { className: "truncate", children: ["Deleting ", appId || 'app', " permanently..."] })] }));
|
|
780
780
|
},
|
|
781
781
|
renderOutput: (output, toolCallId) => {
|
|
782
782
|
const result = (output ?? {});
|
|
783
783
|
if (output === undefined || output === null) {
|
|
784
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 inline-flex max-w-full items-center gap-2
|
|
784
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Trash2, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: "Deleting app..." })] }, toolCallId));
|
|
785
785
|
}
|
|
786
786
|
if (result.success === false) {
|
|
787
|
-
return (_jsxs("div", { className: "bg-destructive/10 text-destructive my-1 inline-flex max-w-full items-center gap-2
|
|
787
|
+
return (_jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-ui-caption my-1 inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Trash2, { className: "size-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: result.error || 'Failed to delete app' })] }, toolCallId));
|
|
788
788
|
}
|
|
789
789
|
const affectedCount = result.workspacesAffected?.length || 0;
|
|
790
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground my-1 min-w-0
|
|
790
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control my-1 min-w-0", children: [_jsxs("div", { className: "text-ui-caption flex items-center gap-2 px-2 py-1.5", children: [_jsx(Trash2, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "font-medium", children: [result.appName || result.appId, " deleted permanently"] }), _jsx(Check, { className: "size-3 shrink-0 text-green-600" })] }), affectedCount > 0 && (_jsxs("div", { className: "border-border/50 text-11 border-t px-2 py-1", children: ["Removed from ", affectedCount, " workspace", affectedCount !== 1 ? 's' : ''] }))] }, toolCallId));
|
|
791
791
|
},
|
|
792
792
|
renderApproval: (approval, onRespond) => {
|
|
793
793
|
const { appId } = (approval.args ?? {});
|
|
794
|
-
return (_jsxs(ToolApproval, { state: "approval-requested", children: [_jsx(ToolApprovalHeader, { children: _jsxs(ToolApprovalRequest, { children: [_jsxs("div", { className: "mb-1 flex items-center gap-1.5
|
|
794
|
+
return (_jsxs(ToolApproval, { state: "approval-requested", children: [_jsx(ToolApprovalHeader, { children: _jsxs(ToolApprovalRequest, { children: [_jsxs("div", { className: "text-ui-caption mb-1 flex items-center gap-1.5 font-medium text-red-600", children: [_jsx(AlertTriangle, { className: "size-3.5" }), "Delete app permanently"] }), _jsxs("div", { className: "text-muted-foreground text-11 mb-2", children: ["Permanently delete ", _jsx("strong", { children: appId }), " from Moldable?"] }), _jsxs("div", { className: "bg-destructive/10 text-destructive rounded-control text-11 px-2 py-1.5", children: [_jsx("strong", { children: "This will:" }), _jsxs("ul", { className: "mt-1 list-inside list-disc space-y-0.5", children: [_jsx("li", { children: "Remove the app from ALL workspaces" }), _jsx("li", { children: "Delete all source code from shared/apps/" }), _jsx("li", { children: "Delete all workspace data" })] }), _jsx("p", { className: "mt-1.5 font-medium", children: "This action cannot be undone." })] }), _jsxs(ToolApprovalHelp, { className: "mt-2", children: ["To just hide this app from the current workspace (keeps code and data), ask to ", _jsx("strong", { children: "remove" }), " it instead. To clear the app's data but keep it installed, ask to", ' ', _jsx("strong", { children: "reset" }), " it."] })] }) }), _jsxs(ToolApprovalActions, { children: [_jsx(ToolApprovalAction, { variant: "outline", onClick: () => onRespond({
|
|
795
795
|
approvalId: approval.approvalId,
|
|
796
796
|
approved: false,
|
|
797
797
|
reason: 'User cancelled',
|
|
@@ -806,7 +806,7 @@ export const DEFAULT_TOOL_HANDLERS = {
|
|
|
806
806
|
* Loading indicator for inline tool loading states
|
|
807
807
|
*/
|
|
808
808
|
function LoadingIndicator({ icon: Icon, children, }) {
|
|
809
|
-
return (_jsxs("div", { className: "bg-muted text-muted-foreground inline-flex max-w-full items-center gap-2
|
|
809
|
+
return (_jsxs("div", { className: "bg-muted text-muted-foreground rounded-control text-ui-caption inline-flex max-w-full items-center gap-2 px-2 py-1", children: [_jsx(Icon, { className: "size-3.5 shrink-0 animate-pulse" }), _jsx("span", { className: "truncate", children: children })] }));
|
|
810
810
|
}
|
|
811
811
|
/**
|
|
812
812
|
* Get the handler for a tool
|
|
@@ -828,7 +828,7 @@ export function getToolHandler(toolName) {
|
|
|
828
828
|
: output
|
|
829
829
|
? JSON.stringify(output, null, 2)
|
|
830
830
|
: 'No output';
|
|
831
|
-
return (_jsx("div", { className: "min-w-0 px-2 py-1", children: _jsxs("div", { className: "text-muted-foreground min-w-0 font-mono
|
|
831
|
+
return (_jsx("div", { className: "min-w-0 px-2 py-1", children: _jsxs("div", { className: "text-muted-foreground text-ui-caption min-w-0 font-mono", children: [_jsxs("div", { className: "truncate font-semibold", children: [toolName, " completed"] }), _jsxs(CodeBlock, { maxHeight: 150, className: "mt-1", children: [outputContent.slice(0, 1000), outputContent.length > 1000 && '\n... (truncated)'] })] }) }, toolCallId));
|
|
832
832
|
},
|
|
833
833
|
};
|
|
834
834
|
}
|