@compose-market/theme 0.0.3 → 0.0.5
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/css/effects.css +197 -0
- package/dist/css/index.css +2 -0
- package/dist/css/index.d.ts +1 -1
- package/dist/css/index.d.ts.map +1 -1
- package/dist/css/index.js +1 -0
- package/dist/css/index.js.map +1 -1
- package/dist/css/shell.css +770 -0
- package/dist/effects/styles.d.ts +8 -0
- package/dist/effects/styles.d.ts.map +1 -0
- package/dist/effects/styles.js +205 -0
- package/dist/effects/styles.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/shell/index.d.ts +114 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.js +81 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/shell/styles.d.ts +2 -0
- package/dist/shell/styles.d.ts.map +1 -0
- package/dist/shell/styles.js +772 -0
- package/dist/shell/styles.js.map +1 -0
- package/package.json +37 -7
- package/dist/components/RFAComponent.d.ts +0 -10
- package/dist/components/RFAComponent.d.ts.map +0 -1
- package/dist/components/RFAComponent.js +0 -288
- package/dist/components/RFAComponent.js.map +0 -1
- package/dist/components/RFADetails.d.ts +0 -9
- package/dist/components/RFADetails.d.ts.map +0 -1
- package/dist/components/RFADetails.js +0 -407
- package/dist/components/RFADetails.js.map +0 -1
- package/dist/components/agent-card.d.ts +0 -8
- package/dist/components/agent-card.d.ts.map +0 -1
- package/dist/components/agent-card.js +0 -216
- package/dist/components/agent-card.js.map +0 -1
- package/dist/components/backpack.d.ts +0 -21
- package/dist/components/backpack.d.ts.map +0 -1
- package/dist/components/backpack.js +0 -905
- package/dist/components/backpack.js.map +0 -1
- package/dist/components/blur.d.ts +0 -9
- package/dist/components/blur.d.ts.map +0 -1
- package/dist/components/blur.js +0 -60
- package/dist/components/blur.js.map +0 -1
- package/dist/components/brand/Logo.d.ts +0 -25
- package/dist/components/brand/Logo.d.ts.map +0 -1
- package/dist/components/brand/Logo.js +0 -53
- package/dist/components/brand/Logo.js.map +0 -1
- package/dist/components/brand/index.d.ts +0 -2
- package/dist/components/brand/index.d.ts.map +0 -1
- package/dist/components/brand/index.js +0 -2
- package/dist/components/brand/index.js.map +0 -1
- package/dist/components/chat.d.ts +0 -68
- package/dist/components/chat.d.ts.map +0 -1
- package/dist/components/chat.js +0 -618
- package/dist/components/chat.js.map +0 -1
- package/dist/components/compose/index.d.ts +0 -10
- package/dist/components/compose/index.d.ts.map +0 -1
- package/dist/components/compose/index.js +0 -13
- package/dist/components/compose/index.js.map +0 -1
- package/dist/components/compose/nodes/agent-node.d.ts +0 -11
- package/dist/components/compose/nodes/agent-node.d.ts.map +0 -1
- package/dist/components/compose/nodes/agent-node.js +0 -101
- package/dist/components/compose/nodes/agent-node.js.map +0 -1
- package/dist/components/compose/nodes/hook-node.d.ts +0 -11
- package/dist/components/compose/nodes/hook-node.d.ts.map +0 -1
- package/dist/components/compose/nodes/hook-node.js +0 -100
- package/dist/components/compose/nodes/hook-node.js.map +0 -1
- package/dist/components/compose/nodes/index.d.ts +0 -60
- package/dist/components/compose/nodes/index.d.ts.map +0 -1
- package/dist/components/compose/nodes/index.js +0 -22
- package/dist/components/compose/nodes/index.js.map +0 -1
- package/dist/components/compose/nodes/step-node.d.ts +0 -11
- package/dist/components/compose/nodes/step-node.d.ts.map +0 -1
- package/dist/components/compose/nodes/step-node.js +0 -88
- package/dist/components/compose/nodes/step-node.js.map +0 -1
- package/dist/components/compose/nodes/trigger-node.d.ts +0 -11
- package/dist/components/compose/nodes/trigger-node.d.ts.map +0 -1
- package/dist/components/compose/nodes/trigger-node.js +0 -92
- package/dist/components/compose/nodes/trigger-node.js.map +0 -1
- package/dist/components/compose/overlay.d.ts +0 -26
- package/dist/components/compose/overlay.d.ts.map +0 -1
- package/dist/components/compose/overlay.js +0 -48
- package/dist/components/compose/overlay.js.map +0 -1
- package/dist/components/compose/pickers/agents-picker.d.ts +0 -18
- package/dist/components/compose/pickers/agents-picker.d.ts.map +0 -1
- package/dist/components/compose/pickers/agents-picker.js +0 -180
- package/dist/components/compose/pickers/agents-picker.js.map +0 -1
- package/dist/components/compose/pickers/connector-detail.d.ts +0 -16
- package/dist/components/compose/pickers/connector-detail.d.ts.map +0 -1
- package/dist/components/compose/pickers/connector-detail.js +0 -236
- package/dist/components/compose/pickers/connector-detail.js.map +0 -1
- package/dist/components/compose/pickers/connector-picker.d.ts +0 -13
- package/dist/components/compose/pickers/connector-picker.d.ts.map +0 -1
- package/dist/components/compose/pickers/connector-picker.js +0 -101
- package/dist/components/compose/pickers/connector-picker.js.map +0 -1
- package/dist/components/compose/pickers/index.d.ts +0 -10
- package/dist/components/compose/pickers/index.d.ts.map +0 -1
- package/dist/components/compose/pickers/index.js +0 -10
- package/dist/components/compose/pickers/index.js.map +0 -1
- package/dist/components/compose/pickers/trigger-picker.d.ts +0 -13
- package/dist/components/compose/pickers/trigger-picker.d.ts.map +0 -1
- package/dist/components/compose/pickers/trigger-picker.js +0 -110
- package/dist/components/compose/pickers/trigger-picker.js.map +0 -1
- package/dist/components/compose/toolbox.d.ts +0 -24
- package/dist/components/compose/toolbox.d.ts.map +0 -1
- package/dist/components/compose/toolbox.js +0 -183
- package/dist/components/compose/toolbox.js.map +0 -1
- package/dist/components/connector.d.ts +0 -24
- package/dist/components/connector.d.ts.map +0 -1
- package/dist/components/connector.js +0 -263
- package/dist/components/connector.js.map +0 -1
- package/dist/components/dispenser.d.ts +0 -15
- package/dist/components/dispenser.d.ts.map +0 -1
- package/dist/components/dispenser.js +0 -323
- package/dist/components/dispenser.js.map +0 -1
- package/dist/components/layout/AppLayout.d.ts +0 -60
- package/dist/components/layout/AppLayout.d.ts.map +0 -1
- package/dist/components/layout/AppLayout.js +0 -265
- package/dist/components/layout/AppLayout.js.map +0 -1
- package/dist/components/layout/Layout.d.ts +0 -6
- package/dist/components/layout/Layout.d.ts.map +0 -1
- package/dist/components/layout/Layout.js +0 -186
- package/dist/components/layout/Layout.js.map +0 -1
- package/dist/components/layout/Sidebar.d.ts +0 -3
- package/dist/components/layout/Sidebar.d.ts.map +0 -1
- package/dist/components/layout/Sidebar.js +0 -160
- package/dist/components/layout/Sidebar.js.map +0 -1
- package/dist/components/layout/TopBar.d.ts +0 -6
- package/dist/components/layout/TopBar.d.ts.map +0 -1
- package/dist/components/layout/TopBar.js +0 -36
- package/dist/components/layout/TopBar.js.map +0 -1
- package/dist/components/layout/index.d.ts +0 -2
- package/dist/components/layout/index.d.ts.map +0 -1
- package/dist/components/layout/index.js +0 -2
- package/dist/components/layout/index.js.map +0 -1
- package/dist/components/lyria-player.d.ts +0 -23
- package/dist/components/lyria-player.d.ts.map +0 -1
- package/dist/components/lyria-player.js +0 -241
- package/dist/components/lyria-player.js.map +0 -1
- package/dist/components/manowar-card.d.ts +0 -8
- package/dist/components/manowar-card.d.ts.map +0 -1
- package/dist/components/manowar-card.js +0 -349
- package/dist/components/manowar-card.js.map +0 -1
- package/dist/components/mirror-pane.d.ts +0 -55
- package/dist/components/mirror-pane.d.ts.map +0 -1
- package/dist/components/mirror-pane.js +0 -330
- package/dist/components/mirror-pane.js.map +0 -1
- package/dist/components/model-selector.d.ts +0 -12
- package/dist/components/model-selector.d.ts.map +0 -1
- package/dist/components/model-selector.js +0 -148
- package/dist/components/model-selector.js.map +0 -1
- package/dist/components/output.d.ts +0 -26
- package/dist/components/output.d.ts.map +0 -1
- package/dist/components/output.js +0 -259
- package/dist/components/output.js.map +0 -1
- package/dist/components/partners.d.ts +0 -13
- package/dist/components/partners.d.ts.map +0 -1
- package/dist/components/partners.js +0 -210
- package/dist/components/partners.js.map +0 -1
- package/dist/components/plugin-tester.d.ts +0 -13
- package/dist/components/plugin-tester.d.ts.map +0 -1
- package/dist/components/plugin-tester.js +0 -907
- package/dist/components/plugin-tester.js.map +0 -1
- package/dist/components/session/SessionComponents.d.ts +0 -2
- package/dist/components/session/SessionComponents.d.ts.map +0 -1
- package/dist/components/session/SessionComponents.js +0 -2
- package/dist/components/session/SessionComponents.js.map +0 -1
- package/dist/components/session/index.d.ts +0 -2
- package/dist/components/session/index.d.ts.map +0 -1
- package/dist/components/session/index.js +0 -2
- package/dist/components/session/index.js.map +0 -1
- package/dist/components/session.d.ts +0 -58
- package/dist/components/session.d.ts.map +0 -1
- package/dist/components/session.js +0 -580
- package/dist/components/session.js.map +0 -1
- package/dist/components/share-dialog.d.ts +0 -9
- package/dist/components/share-dialog.d.ts.map +0 -1
- package/dist/components/share-dialog.js +0 -49
- package/dist/components/share-dialog.js.map +0 -1
- package/dist/components/ui/accordion.d.ts +0 -6
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/accordion.js +0 -20
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/alert-dialog.d.ts +0 -20
- package/dist/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/components/ui/alert-dialog.js +0 -29
- package/dist/components/ui/alert-dialog.js.map +0 -1
- package/dist/components/ui/alert.d.ts +0 -5
- package/dist/components/ui/alert.d.ts.map +0 -1
- package/dist/components/ui/alert.js +0 -22
- package/dist/components/ui/alert.js.map +0 -1
- package/dist/components/ui/aspect-ratio.d.ts +0 -3
- package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/components/ui/aspect-ratio.js +0 -4
- package/dist/components/ui/aspect-ratio.js.map +0 -1
- package/dist/components/ui/avatar.d.ts +0 -5
- package/dist/components/ui/avatar.d.ts.map +0 -1
- package/dist/components/ui/avatar.js +0 -12
- package/dist/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/badge.d.ts +0 -8
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/badge.js +0 -24
- package/dist/components/ui/badge.js.map +0 -1
- package/dist/components/ui/breadcrumb.d.ts +0 -16
- package/dist/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/components/ui/breadcrumb.js +0 -28
- package/dist/components/ui/breadcrumb.js.map +0 -1
- package/dist/components/ui/button-group.d.ts +0 -10
- package/dist/components/ui/button-group.d.ts.map +0 -1
- package/dist/components/ui/button-group.js +0 -27
- package/dist/components/ui/button-group.js.map +0 -1
- package/dist/components/ui/button.d.ts +0 -11
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/button.js +0 -42
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/calendar.d.ts +0 -9
- package/dist/components/ui/calendar.d.ts.map +0 -1
- package/dist/components/ui/calendar.js +0 -78
- package/dist/components/ui/calendar.js.map +0 -1
- package/dist/components/ui/card.d.ts +0 -8
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/card.js +0 -17
- package/dist/components/ui/card.js.map +0 -1
- package/dist/components/ui/carousel.d.ts +0 -9
- package/dist/components/ui/carousel.d.ts.map +0 -1
- package/dist/components/ui/carousel.js +0 -110
- package/dist/components/ui/carousel.js.map +0 -1
- package/dist/components/ui/chart.d.ts +0 -28
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/chart.js +0 -168
- package/dist/components/ui/chart.js.map +0 -1
- package/dist/components/ui/checkbox.d.ts +0 -3
- package/dist/components/ui/checkbox.d.ts.map +0 -1
- package/dist/components/ui/checkbox.js +0 -12
- package/dist/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/collapsible.d.ts +0 -5
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/collapsible.js +0 -7
- package/dist/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/command.d.ts +0 -16
- package/dist/components/ui/command.d.ts.map +0 -1
- package/dist/components/ui/command.js +0 -38
- package/dist/components/ui/command.js.map +0 -1
- package/dist/components/ui/context-menu.d.ts +0 -21
- package/dist/components/ui/context-menu.d.ts.map +0 -1
- package/dist/components/ui/context-menu.js +0 -52
- package/dist/components/ui/context-menu.js.map +0 -1
- package/dist/components/ui/dialog.d.ts +0 -19
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/dialog.js +0 -31
- package/dist/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/drawer.d.ts +0 -23
- package/dist/components/ui/drawer.d.ts.map +0 -1
- package/dist/components/ui/drawer.js +0 -28
- package/dist/components/ui/drawer.js.map +0 -1
- package/dist/components/ui/dropdown-menu.d.ts +0 -21
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu.js +0 -55
- package/dist/components/ui/dropdown-menu.js.map +0 -1
- package/dist/components/ui/empty.d.ts +0 -10
- package/dist/components/ui/empty.d.ts.map +0 -1
- package/dist/components/ui/empty.js +0 -33
- package/dist/components/ui/empty.js.map +0 -1
- package/dist/components/ui/field.d.ts +0 -23
- package/dist/components/ui/field.d.ts.map +0 -1
- package/dist/components/ui/field.js +0 -82
- package/dist/components/ui/field.js.map +0 -1
- package/dist/components/ui/form.d.ts +0 -11
- package/dist/components/ui/form.d.ts.map +0 -1
- package/dist/components/ui/form.js +0 -71
- package/dist/components/ui/form.js.map +0 -1
- package/dist/components/ui/hover-card.d.ts +0 -5
- package/dist/components/ui/hover-card.d.ts.map +0 -1
- package/dist/components/ui/hover-card.js +0 -9
- package/dist/components/ui/hover-card.js.map +0 -1
- package/dist/components/ui/index.d.ts +0 -7
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/ui/index.js +0 -7
- package/dist/components/ui/index.js.map +0 -1
- package/dist/components/ui/input-group.d.ts +0 -13
- package/dist/components/ui/input-group.d.ts.map +0 -1
- package/dist/components/ui/input-group.js +0 -63
- package/dist/components/ui/input-group.js.map +0 -1
- package/dist/components/ui/input-otp.d.ts +0 -6
- package/dist/components/ui/input-otp.d.ts.map +0 -1
- package/dist/components/ui/input-otp.js +0 -25
- package/dist/components/ui/input-otp.js.map +0 -1
- package/dist/components/ui/input.d.ts +0 -3
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/input.js +0 -8
- package/dist/components/ui/input.js.map +0 -1
- package/dist/components/ui/item.d.ts +0 -19
- package/dist/components/ui/item.d.ts.map +0 -1
- package/dist/components/ui/item.js +0 -67
- package/dist/components/ui/item.js.map +0 -1
- package/dist/components/ui/kbd.d.ts +0 -4
- package/dist/components/ui/kbd.d.ts.map +0 -1
- package/dist/components/ui/kbd.js +0 -9
- package/dist/components/ui/kbd.js.map +0 -1
- package/dist/components/ui/label.d.ts +0 -3
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/label.js +0 -10
- package/dist/components/ui/label.js.map +0 -1
- package/dist/components/ui/menubar.d.ts +0 -23
- package/dist/components/ui/menubar.d.ts.map +0 -1
- package/dist/components/ui/menubar.js +0 -64
- package/dist/components/ui/menubar.js.map +0 -1
- package/dist/components/ui/navigation-menu.d.ts +0 -11
- package/dist/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/components/ui/navigation-menu.js +0 -34
- package/dist/components/ui/navigation-menu.js.map +0 -1
- package/dist/components/ui/network-selector.d.ts +0 -22
- package/dist/components/ui/network-selector.d.ts.map +0 -1
- package/dist/components/ui/network-selector.js +0 -99
- package/dist/components/ui/network-selector.js.map +0 -1
- package/dist/components/ui/pagination.d.ts +0 -29
- package/dist/components/ui/pagination.d.ts.map +0 -1
- package/dist/components/ui/pagination.js +0 -32
- package/dist/components/ui/pagination.js.map +0 -1
- package/dist/components/ui/popover.d.ts +0 -6
- package/dist/components/ui/popover.d.ts.map +0 -1
- package/dist/components/ui/popover.js +0 -12
- package/dist/components/ui/popover.js.map +0 -1
- package/dist/components/ui/progress.d.ts +0 -3
- package/dist/components/ui/progress.d.ts.map +0 -1
- package/dist/components/ui/progress.js +0 -10
- package/dist/components/ui/progress.js.map +0 -1
- package/dist/components/ui/radio-group.d.ts +0 -4
- package/dist/components/ui/radio-group.d.ts.map +0 -1
- package/dist/components/ui/radio-group.js +0 -18
- package/dist/components/ui/radio-group.js.map +0 -1
- package/dist/components/ui/resizable.d.ts +0 -8
- package/dist/components/ui/resizable.d.ts.map +0 -1
- package/dist/components/ui/resizable.js +0 -13
- package/dist/components/ui/resizable.js.map +0 -1
- package/dist/components/ui/scroll-area.d.ts +0 -4
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.js +0 -19
- package/dist/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/select.d.ts +0 -12
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/select.js +0 -51
- package/dist/components/ui/select.js.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -3
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/components/ui/separator.js +0 -7
- package/dist/components/ui/separator.js.map +0 -1
- package/dist/components/ui/sheet.d.ts +0 -19
- package/dist/components/ui/sheet.d.ts.map +0 -1
- package/dist/components/ui/sheet.js +0 -46
- package/dist/components/ui/sheet.js.map +0 -1
- package/dist/components/ui/sidebar.d.ts +0 -58
- package/dist/components/ui/sidebar.d.ts.map +0 -1
- package/dist/components/ui/sidebar.js +0 -246
- package/dist/components/ui/sidebar.js.map +0 -1
- package/dist/components/ui/skeleton.d.ts +0 -3
- package/dist/components/ui/skeleton.d.ts.map +0 -1
- package/dist/components/ui/skeleton.js +0 -6
- package/dist/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/slider.d.ts +0 -3
- package/dist/components/ui/slider.d.ts.map +0 -1
- package/dist/components/ui/slider.js +0 -12
- package/dist/components/ui/slider.js.map +0 -1
- package/dist/components/ui/sonner.d.ts +0 -5
- package/dist/components/ui/sonner.d.ts.map +0 -1
- package/dist/components/ui/sonner.js +0 -16
- package/dist/components/ui/sonner.js.map +0 -1
- package/dist/components/ui/spinner.d.ts +0 -3
- package/dist/components/ui/spinner.d.ts.map +0 -1
- package/dist/components/ui/spinner.js +0 -7
- package/dist/components/ui/spinner.js.map +0 -1
- package/dist/components/ui/surface-variant.d.ts +0 -4
- package/dist/components/ui/surface-variant.d.ts.map +0 -1
- package/dist/components/ui/surface-variant.js +0 -10
- package/dist/components/ui/surface-variant.js.map +0 -1
- package/dist/components/ui/switch.d.ts +0 -3
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/switch.js +0 -9
- package/dist/components/ui/switch.js.map +0 -1
- package/dist/components/ui/table.d.ts +0 -10
- package/dist/components/ui/table.d.ts.map +0 -1
- package/dist/components/ui/table.js +0 -22
- package/dist/components/ui/table.js.map +0 -1
- package/dist/components/ui/tabs.d.ts +0 -6
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/tabs.js +0 -13
- package/dist/components/ui/tabs.js.map +0 -1
- package/dist/components/ui/textarea.d.ts +0 -3
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/textarea.js +0 -8
- package/dist/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/toast.d.ts +0 -12
- package/dist/components/ui/toast.d.ts.map +0 -1
- package/dist/components/ui/toast.js +0 -35
- package/dist/components/ui/toast.js.map +0 -1
- package/dist/components/ui/toaster.d.ts +0 -2
- package/dist/components/ui/toaster.d.ts.map +0 -1
- package/dist/components/ui/toaster.js +0 -19
- package/dist/components/ui/toaster.js.map +0 -1
- package/dist/components/ui/toggle-group.d.ts +0 -4
- package/dist/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/components/ui/toggle-group.js +0 -27
- package/dist/components/ui/toggle-group.js.map +0 -1
- package/dist/components/ui/toggle.d.ts +0 -4
- package/dist/components/ui/toggle.d.ts.map +0 -1
- package/dist/components/ui/toggle.js +0 -25
- package/dist/components/ui/toggle.js.map +0 -1
- package/dist/components/ui/tooltip.d.ts +0 -6
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/components/ui/tooltip.js +0 -13
- package/dist/components/ui/tooltip.js.map +0 -1
- package/dist/components/visual/ManowarField.d.ts +0 -9
- package/dist/components/visual/ManowarField.d.ts.map +0 -1
- package/dist/components/visual/ManowarField.js +0 -111
- package/dist/components/visual/ManowarField.js.map +0 -1
- package/dist/components/warp-form.d.ts +0 -22
- package/dist/components/warp-form.d.ts.map +0 -1
- package/dist/components/warp-form.js +0 -743
- package/dist/components/warp-form.js.map +0 -1
- package/dist/hooks/use-agents.d.ts +0 -17
- package/dist/hooks/use-agents.d.ts.map +0 -1
- package/dist/hooks/use-agents.js +0 -64
- package/dist/hooks/use-agents.js.map +0 -1
- package/dist/hooks/use-api.d.ts +0 -28
- package/dist/hooks/use-api.d.ts.map +0 -1
- package/dist/hooks/use-api.js +0 -114
- package/dist/hooks/use-api.js.map +0 -1
- package/dist/hooks/use-chat.d.ts +0 -64
- package/dist/hooks/use-chat.d.ts.map +0 -1
- package/dist/hooks/use-chat.js +0 -350
- package/dist/hooks/use-chat.js.map +0 -1
- package/dist/hooks/use-coordinator.d.ts +0 -41
- package/dist/hooks/use-coordinator.d.ts.map +0 -1
- package/dist/hooks/use-coordinator.js +0 -110
- package/dist/hooks/use-coordinator.js.map +0 -1
- package/dist/hooks/use-dispenser.d.ts +0 -68
- package/dist/hooks/use-dispenser.d.ts.map +0 -1
- package/dist/hooks/use-dispenser.js +0 -113
- package/dist/hooks/use-dispenser.js.map +0 -1
- package/dist/hooks/use-lyria.d.ts +0 -58
- package/dist/hooks/use-lyria.d.ts.map +0 -1
- package/dist/hooks/use-lyria.js +0 -254
- package/dist/hooks/use-lyria.js.map +0 -1
- package/dist/hooks/use-mobile.d.ts +0 -2
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/hooks/use-mobile.js +0 -16
- package/dist/hooks/use-mobile.js.map +0 -1
- package/dist/hooks/use-model.d.ts +0 -34
- package/dist/hooks/use-model.d.ts.map +0 -1
- package/dist/hooks/use-model.js +0 -105
- package/dist/hooks/use-model.js.map +0 -1
- package/dist/hooks/use-motion-governor.d.ts +0 -10
- package/dist/hooks/use-motion-governor.d.ts.map +0 -1
- package/dist/hooks/use-motion-governor.js +0 -63
- package/dist/hooks/use-motion-governor.js.map +0 -1
- package/dist/hooks/use-multichain.d.ts +0 -34
- package/dist/hooks/use-multichain.d.ts.map +0 -1
- package/dist/hooks/use-multichain.js +0 -120
- package/dist/hooks/use-multichain.js.map +0 -1
- package/dist/hooks/use-onchain.d.ts +0 -145
- package/dist/hooks/use-onchain.d.ts.map +0 -1
- package/dist/hooks/use-onchain.js +0 -652
- package/dist/hooks/use-onchain.js.map +0 -1
- package/dist/hooks/use-registry.d.ts +0 -140
- package/dist/hooks/use-registry.d.ts.map +0 -1
- package/dist/hooks/use-registry.js +0 -264
- package/dist/hooks/use-registry.js.map +0 -1
- package/dist/hooks/use-services.d.ts +0 -66
- package/dist/hooks/use-services.d.ts.map +0 -1
- package/dist/hooks/use-services.js +0 -216
- package/dist/hooks/use-services.js.map +0 -1
- package/dist/hooks/use-session.d.ts +0 -36
- package/dist/hooks/use-session.d.ts.map +0 -1
- package/dist/hooks/use-session.js +0 -449
- package/dist/hooks/use-session.js.map +0 -1
- package/dist/hooks/use-sse.d.ts +0 -8
- package/dist/hooks/use-sse.d.ts.map +0 -1
- package/dist/hooks/use-sse.js +0 -86
- package/dist/hooks/use-sse.js.map +0 -1
- package/dist/hooks/use-tabs.d.ts +0 -2
- package/dist/hooks/use-tabs.d.ts.map +0 -1
- package/dist/hooks/use-tabs.js +0 -43
- package/dist/hooks/use-tabs.js.map +0 -1
- package/dist/hooks/use-toast.d.ts +0 -41
- package/dist/hooks/use-toast.d.ts.map +0 -1
- package/dist/hooks/use-toast.js +0 -127
- package/dist/hooks/use-toast.js.map +0 -1
- package/dist/hooks/use-triggers.d.ts +0 -51
- package/dist/hooks/use-triggers.d.ts.map +0 -1
- package/dist/hooks/use-triggers.js +0 -212
- package/dist/hooks/use-triggers.js.map +0 -1
- package/dist/hooks/use-warp.d.ts +0 -53
- package/dist/hooks/use-warp.d.ts.map +0 -1
- package/dist/hooks/use-warp.js +0 -231
- package/dist/hooks/use-warp.js.map +0 -1
- package/dist/hooks/use-workflow.d.ts +0 -40
- package/dist/hooks/use-workflow.d.ts.map +0 -1
- package/dist/hooks/use-workflow.js +0 -358
- package/dist/hooks/use-workflow.js.map +0 -1
- package/dist/lib/agents.d.ts +0 -186
- package/dist/lib/agents.d.ts.map +0 -1
- package/dist/lib/agents.js +0 -633
- package/dist/lib/agents.js.map +0 -1
- package/dist/lib/api.d.ts +0 -224
- package/dist/lib/api.d.ts.map +0 -1
- package/dist/lib/api.js +0 -443
- package/dist/lib/api.js.map +0 -1
- package/dist/lib/chains.d.ts +0 -151
- package/dist/lib/chains.d.ts.map +0 -1
- package/dist/lib/chains.js +0 -297
- package/dist/lib/chains.js.map +0 -1
- package/dist/lib/contracts.d.ts +0 -960
- package/dist/lib/contracts.d.ts.map +0 -1
- package/dist/lib/contracts.js +0 -716
- package/dist/lib/contracts.js.map +0 -1
- package/dist/lib/cronos/aa.d.ts +0 -111
- package/dist/lib/cronos/aa.d.ts.map +0 -1
- package/dist/lib/cronos/aa.js +0 -312
- package/dist/lib/cronos/aa.js.map +0 -1
- package/dist/lib/cronos/facilitator.d.ts +0 -87
- package/dist/lib/cronos/facilitator.d.ts.map +0 -1
- package/dist/lib/cronos/facilitator.js +0 -183
- package/dist/lib/cronos/facilitator.js.map +0 -1
- package/dist/lib/evm.d.ts +0 -45
- package/dist/lib/evm.d.ts.map +0 -1
- package/dist/lib/evm.js +0 -78
- package/dist/lib/evm.js.map +0 -1
- package/dist/lib/mockData.d.ts +0 -26
- package/dist/lib/mockData.d.ts.map +0 -1
- package/dist/lib/mockData.js +0 -89
- package/dist/lib/mockData.js.map +0 -1
- package/dist/lib/models.d.ts +0 -122
- package/dist/lib/models.d.ts.map +0 -1
- package/dist/lib/models.js +0 -174
- package/dist/lib/models.js.map +0 -1
- package/dist/lib/multimodal.d.ts +0 -53
- package/dist/lib/multimodal.d.ts.map +0 -1
- package/dist/lib/multimodal.js +0 -204
- package/dist/lib/multimodal.js.map +0 -1
- package/dist/lib/payment.d.ts +0 -67
- package/dist/lib/payment.d.ts.map +0 -1
- package/dist/lib/payment.js +0 -236
- package/dist/lib/payment.js.map +0 -1
- package/dist/lib/pinata.d.ts +0 -140
- package/dist/lib/pinata.d.ts.map +0 -1
- package/dist/lib/pinata.js +0 -209
- package/dist/lib/pinata.js.map +0 -1
- package/dist/lib/queryClient.d.ts +0 -9
- package/dist/lib/queryClient.d.ts.map +0 -1
- package/dist/lib/queryClient.js +0 -42
- package/dist/lib/queryClient.js.map +0 -1
- package/dist/lib/services.d.ts +0 -164
- package/dist/lib/services.d.ts.map +0 -1
- package/dist/lib/services.js +0 -304
- package/dist/lib/services.js.map +0 -1
- package/dist/lib/share.d.ts +0 -12
- package/dist/lib/share.d.ts.map +0 -1
- package/dist/lib/share.js +0 -39
- package/dist/lib/share.js.map +0 -1
- package/dist/lib/triggers.d.ts +0 -128
- package/dist/lib/triggers.d.ts.map +0 -1
- package/dist/lib/triggers.js +0 -305
- package/dist/lib/triggers.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -6
- package/dist/lib/utils.js.map +0 -1
- package/dist/lib/visual-system.d.ts +0 -39
- package/dist/lib/visual-system.d.ts.map +0 -1
- package/dist/lib/visual-system.js +0 -129
- package/dist/lib/visual-system.js.map +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -2
- package/dist/utils/index.js.map +0 -1
package/dist/components/chat.js
DELETED
|
@@ -1,618 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified Chat Component
|
|
3
|
-
*
|
|
4
|
-
* Consolidates:
|
|
5
|
-
* - MultimodalCanvas (chat container with input, attachments, recording)
|
|
6
|
-
* - ChatMessageItem (message bubbles with actions)
|
|
7
|
-
* - MarkdownRenderer (rich content with Mermaid, LaTeX, code)
|
|
8
|
-
*
|
|
9
|
-
* Used by: agent.tsx, manowar.tsx, playground.tsx
|
|
10
|
-
*/
|
|
11
|
-
import React, { useState, useEffect, memo, useCallback } from "react";
|
|
12
|
-
import ReactMarkdown from "react-markdown";
|
|
13
|
-
import remarkGfm from "remark-gfm";
|
|
14
|
-
import remarkMath from "remark-math";
|
|
15
|
-
import rehypeKatex from "rehype-katex";
|
|
16
|
-
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
17
|
-
import { oneDark } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
18
|
-
import { cn } from "@/lib/utils";
|
|
19
|
-
import { Button } from "@/components/ui/button";
|
|
20
|
-
import { Textarea } from "@/components/ui/textarea";
|
|
21
|
-
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
|
22
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip";
|
|
23
|
-
import { Bot, User, Loader2, Send, Play, Paperclip, Mic, MicOff, Music, Video, X, Layers, Trash2, BookOpen, Copy, Check, RefreshCw, ExternalLink, ChevronDown, ChevronUp, Image as ImageIcon, Wrench, } from "lucide-react";
|
|
24
|
-
import mermaid from "mermaid";
|
|
25
|
-
import "katex/dist/katex.min.css";
|
|
26
|
-
import { GenerationCanvas } from "@/components/blur";
|
|
27
|
-
import { LyriaAudioPlayer } from "@/components/lyria-player";
|
|
28
|
-
import { useLyriaWebSocket } from "@/hooks/use-lyria";
|
|
29
|
-
// Initialize Mermaid with dark theme
|
|
30
|
-
mermaid.initialize({
|
|
31
|
-
startOnLoad: false,
|
|
32
|
-
theme: "dark",
|
|
33
|
-
themeVariables: {
|
|
34
|
-
primaryColor: "#06b6d4",
|
|
35
|
-
primaryTextColor: "#fff",
|
|
36
|
-
primaryBorderColor: "#0891b2",
|
|
37
|
-
lineColor: "#64748b",
|
|
38
|
-
secondaryColor: "#6366f1",
|
|
39
|
-
tertiaryColor: "#1e1e1e",
|
|
40
|
-
background: "#1e1e1e",
|
|
41
|
-
mainBkg: "#1e1e1e",
|
|
42
|
-
nodeBorder: "#0891b2",
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
function parseBlocks(raw) {
|
|
46
|
-
if (!raw)
|
|
47
|
-
return [];
|
|
48
|
-
const blocks = [];
|
|
49
|
-
// Regex matches <think>...</think> OR <invoke>...</invoke>
|
|
50
|
-
// Capture groups: 1=think content, 2=invoke content
|
|
51
|
-
const regex = /(?:<think>([\s\S]*?)<\/think>)|(?:<invoke>([\s\S]*?)<\/invoke>)/gi;
|
|
52
|
-
let lastIndex = 0;
|
|
53
|
-
let match;
|
|
54
|
-
while ((match = regex.exec(raw)) !== null) {
|
|
55
|
-
// Add preceding text if any
|
|
56
|
-
if (match.index > lastIndex) {
|
|
57
|
-
const text = raw.substring(lastIndex, match.index).trim();
|
|
58
|
-
if (text)
|
|
59
|
-
blocks.push({ type: 'text', content: text });
|
|
60
|
-
}
|
|
61
|
-
if (match[1]) { // <think>
|
|
62
|
-
blocks.push({ type: 'think', content: match[1].trim() });
|
|
63
|
-
}
|
|
64
|
-
else if (match[2]) { // <invoke>
|
|
65
|
-
const invokeContent = match[2].trim();
|
|
66
|
-
const lines = invokeContent.split('\n');
|
|
67
|
-
const toolName = lines[0]?.trim() || "Unknown Tool";
|
|
68
|
-
// Extract params
|
|
69
|
-
const params = {};
|
|
70
|
-
// Simple XML-like param extraction: <key>value</key>
|
|
71
|
-
const paramRegex = /<(\w+)>([\s\S]*?)<\/\1>/gi;
|
|
72
|
-
let paramMatch;
|
|
73
|
-
while ((paramMatch = paramRegex.exec(invokeContent)) !== null) {
|
|
74
|
-
try {
|
|
75
|
-
// Try parsing as JSON first (for complex objects)
|
|
76
|
-
params[paramMatch[1]] = JSON.parse(paramMatch[2]);
|
|
77
|
-
}
|
|
78
|
-
catch {
|
|
79
|
-
// Fallback to string
|
|
80
|
-
params[paramMatch[1]] = paramMatch[2].trim();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
blocks.push({
|
|
84
|
-
type: 'invoke',
|
|
85
|
-
content: invokeContent,
|
|
86
|
-
toolName,
|
|
87
|
-
params
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
lastIndex = regex.lastIndex;
|
|
91
|
-
}
|
|
92
|
-
// Add remaining text
|
|
93
|
-
if (lastIndex < raw.length) {
|
|
94
|
-
const text = raw.substring(lastIndex).trim();
|
|
95
|
-
if (text)
|
|
96
|
-
blocks.push({ type: 'text', content: text });
|
|
97
|
-
}
|
|
98
|
-
return blocks;
|
|
99
|
-
}
|
|
100
|
-
// =============================================================================
|
|
101
|
-
// Block Components
|
|
102
|
-
// =============================================================================
|
|
103
|
-
function ThinkBlock({ content }) {
|
|
104
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
105
|
-
return (<div className="mb-3 border border-zinc-700/50 rounded-lg overflow-hidden bg-zinc-900/50">
|
|
106
|
-
<button onClick={() => setIsOpen(!isOpen)} className="w-full flex items-center justify-between px-3 py-2 text-xs text-zinc-400 hover:text-zinc-300 hover:bg-zinc-800/50 transition-colors" title="Toggle Chain of Thought">
|
|
107
|
-
<span className="flex items-center gap-2 font-medium">
|
|
108
|
-
<span className="text-cyan-500">💭</span>
|
|
109
|
-
Chain of Thought
|
|
110
|
-
</span>
|
|
111
|
-
{isOpen ? <ChevronUp className="w-3.5 h-3.5"/> : <ChevronDown className="w-3.5 h-3.5"/>}
|
|
112
|
-
</button>
|
|
113
|
-
{isOpen && (<div className="px-3 py-2 border-t border-zinc-700/50 text-xs text-zinc-500 italic whitespace-pre-wrap leading-relaxed animate-in fade-in slide-in-from-top-1 duration-200">
|
|
114
|
-
{content}
|
|
115
|
-
</div>)}
|
|
116
|
-
</div>);
|
|
117
|
-
}
|
|
118
|
-
function InvokeBlock({ toolName, params }) {
|
|
119
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
120
|
-
// Clean tool name (remove Mcp: prefix for display)
|
|
121
|
-
const displayName = toolName.replace(/^Mcp:/i, '');
|
|
122
|
-
return (<div className="mb-3 border border-fuchsia-500/20 rounded-lg overflow-hidden bg-fuchsia-500/5">
|
|
123
|
-
<button onClick={() => setIsOpen(!isOpen)} className="w-full flex items-center justify-between px-3 py-2 text-xs text-fuchsia-300 hover:text-fuchsia-200 hover:bg-fuchsia-500/10 transition-colors" title="Toggle Tool Usage">
|
|
124
|
-
<span className="flex items-center gap-2 font-medium">
|
|
125
|
-
<Wrench className="w-3.5 h-3.5"/>
|
|
126
|
-
Used <span className="font-mono bg-fuchsia-500/20 px-1 py-0.5 rounded text-[10px]">{displayName}</span>
|
|
127
|
-
</span>
|
|
128
|
-
{isOpen ? <ChevronUp className="w-3.5 h-3.5"/> : <ChevronDown className="w-3.5 h-3.5"/>}
|
|
129
|
-
</button>
|
|
130
|
-
{isOpen && params && Object.keys(params).length > 0 && (<div className="px-3 py-2 border-t border-fuchsia-500/20 bg-black/20 text-xs font-mono text-zinc-400 overflow-x-auto animate-in fade-in slide-in-from-top-1 duration-200">
|
|
131
|
-
{Object.entries(params).map(([key, value]) => (<div key={key} className="mb-1 last:mb-0">
|
|
132
|
-
<span className="text-fuchsia-500/70">{key}:</span>{' '}
|
|
133
|
-
<span className="text-zinc-300 whitespace-pre-wrap">
|
|
134
|
-
{typeof value === 'object' ? JSON.stringify(value, null, 2) : String(value)}
|
|
135
|
-
</span>
|
|
136
|
-
</div>))}
|
|
137
|
-
</div>)}
|
|
138
|
-
</div>);
|
|
139
|
-
}
|
|
140
|
-
function EmbeddingBlock({ content }) {
|
|
141
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
142
|
-
const [copied, setCopied] = useState(false);
|
|
143
|
-
// Parse embedding content - try to prettify it
|
|
144
|
-
let formattedContent = content;
|
|
145
|
-
let dimensions = 0;
|
|
146
|
-
try {
|
|
147
|
-
const parsed = JSON.parse(content);
|
|
148
|
-
if (Array.isArray(parsed)) {
|
|
149
|
-
// Handle nested arrays (multiple embeddings)
|
|
150
|
-
if (Array.isArray(parsed[0])) {
|
|
151
|
-
dimensions = parsed[0].length;
|
|
152
|
-
formattedContent = parsed.map((emb, idx) => `[${idx}]:\n ` + emb.map((v, i) => `[${i}]: ${v.toFixed(8)}`).join('\n ')).join('\n\n');
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
// Single embedding array
|
|
156
|
-
dimensions = parsed.length;
|
|
157
|
-
formattedContent = parsed.map((v, i) => `[${i}]: ${v.toFixed(8)}`).join('\n');
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
catch {
|
|
162
|
-
// Keep original content if not valid JSON
|
|
163
|
-
}
|
|
164
|
-
const handleCopy = async () => {
|
|
165
|
-
await navigator.clipboard.writeText(content);
|
|
166
|
-
setCopied(true);
|
|
167
|
-
setTimeout(() => setCopied(false), 2000);
|
|
168
|
-
};
|
|
169
|
-
return (<div className="border border-emerald-500/30 rounded-lg overflow-hidden bg-emerald-500/5">
|
|
170
|
-
<div onClick={() => setIsOpen(!isOpen)} className="w-full flex items-center justify-between px-3 py-2 text-xs text-emerald-400 hover:text-emerald-300 hover:bg-emerald-500/10 transition-colors cursor-pointer" title="Toggle Embedding Vector" role="button" tabIndex={0} onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ')
|
|
171
|
-
setIsOpen(!isOpen); }}>
|
|
172
|
-
<span className="flex items-center gap-2 font-medium">
|
|
173
|
-
<span className="text-emerald-500">📊</span>
|
|
174
|
-
Embedding Vector {dimensions > 0 && <span className="text-emerald-600">({dimensions} dimensions)</span>}
|
|
175
|
-
</span>
|
|
176
|
-
<div className="flex items-center gap-2">
|
|
177
|
-
<button onClick={(e) => { e.stopPropagation(); handleCopy(); }} className="p-1 rounded hover:bg-emerald-500/20 transition-colors" title="Copy raw embedding" type="button">
|
|
178
|
-
{copied ? <Check className="w-3 h-3 text-green-400"/> : <Copy className="w-3 h-3"/>}
|
|
179
|
-
</button>
|
|
180
|
-
{isOpen ? <ChevronUp className="w-3.5 h-3.5"/> : <ChevronDown className="w-3.5 h-3.5"/>}
|
|
181
|
-
</div>
|
|
182
|
-
</div>
|
|
183
|
-
{isOpen && (<div className="px-3 py-2 border-t border-emerald-500/20 bg-black/30 animate-in fade-in slide-in-from-top-1 duration-200">
|
|
184
|
-
<pre className="text-xs font-mono text-emerald-300/80 overflow-auto max-h-80 whitespace-pre leading-relaxed">
|
|
185
|
-
{formattedContent}
|
|
186
|
-
</pre>
|
|
187
|
-
</div>)}
|
|
188
|
-
</div>);
|
|
189
|
-
}
|
|
190
|
-
// =============================================================================
|
|
191
|
-
// Mermaid Diagram
|
|
192
|
-
// =============================================================================
|
|
193
|
-
function MermaidDiagram({ code }) {
|
|
194
|
-
const [svg, setSvg] = useState("");
|
|
195
|
-
const [error, setError] = useState("");
|
|
196
|
-
useEffect(() => {
|
|
197
|
-
const renderDiagram = async () => {
|
|
198
|
-
try {
|
|
199
|
-
const id = `mermaid-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
200
|
-
const { svg } = await mermaid.render(id, code);
|
|
201
|
-
setSvg(svg);
|
|
202
|
-
setError("");
|
|
203
|
-
}
|
|
204
|
-
catch (err) {
|
|
205
|
-
setError(err instanceof Error ? err.message : "Failed to render diagram");
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
renderDiagram();
|
|
209
|
-
}, [code]);
|
|
210
|
-
if (error) {
|
|
211
|
-
return (<div className="bg-red-500/10 border border-red-500/30 rounded-lg p-4 my-3">
|
|
212
|
-
<p className="text-red-400 text-sm">Diagram error: {error}</p>
|
|
213
|
-
<pre className="text-xs text-zinc-500 mt-2 overflow-auto">{code}</pre>
|
|
214
|
-
</div>);
|
|
215
|
-
}
|
|
216
|
-
return (<div className="my-3 p-4 bg-zinc-900 rounded-lg overflow-auto flex justify-center" dangerouslySetInnerHTML={{ __html: svg }}/>);
|
|
217
|
-
}
|
|
218
|
-
// =============================================================================
|
|
219
|
-
// Media Embedding
|
|
220
|
-
// =============================================================================
|
|
221
|
-
function MediaEmbed({ url }) {
|
|
222
|
-
// YouTube
|
|
223
|
-
const youtubeMatch = url.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/);
|
|
224
|
-
if (youtubeMatch) {
|
|
225
|
-
return (<div className="my-3 aspect-video rounded-lg overflow-hidden">
|
|
226
|
-
<iframe src={`https://www.youtube.com/embed/${youtubeMatch[1]}`} className="w-full h-full" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen/>
|
|
227
|
-
</div>);
|
|
228
|
-
}
|
|
229
|
-
// Vimeo
|
|
230
|
-
const vimeoMatch = url.match(/vimeo\.com\/(\d+)/);
|
|
231
|
-
if (vimeoMatch) {
|
|
232
|
-
return (<div className="my-3 aspect-video rounded-lg overflow-hidden">
|
|
233
|
-
<iframe src={`https://player.vimeo.com/video/${vimeoMatch[1]}`} className="w-full h-full" allow="autoplay; fullscreen; picture-in-picture" allowFullScreen/>
|
|
234
|
-
</div>);
|
|
235
|
-
}
|
|
236
|
-
// Direct video files
|
|
237
|
-
if (/\.(mp4|webm|ogg)$/i.test(url)) {
|
|
238
|
-
return (<video controls className="my-3 w-full rounded-lg">
|
|
239
|
-
<source src={url}/>
|
|
240
|
-
</video>);
|
|
241
|
-
}
|
|
242
|
-
// Audio files
|
|
243
|
-
if (/\.(mp3|wav|ogg|m4a)$/i.test(url)) {
|
|
244
|
-
return (<audio controls className="my-3 w-full">
|
|
245
|
-
<source src={url}/>
|
|
246
|
-
</audio>);
|
|
247
|
-
}
|
|
248
|
-
return null;
|
|
249
|
-
}
|
|
250
|
-
// =============================================================================
|
|
251
|
-
// Link Preview
|
|
252
|
-
// =============================================================================
|
|
253
|
-
function LinkPreview({ url, children }) {
|
|
254
|
-
const media = MediaEmbed({ url });
|
|
255
|
-
if (media)
|
|
256
|
-
return media;
|
|
257
|
-
return (<span className="inline">
|
|
258
|
-
<a href={url} target="_blank" rel="noopener noreferrer" className="text-cyan-400 hover:text-cyan-300 underline underline-offset-2 inline-flex items-center gap-1">
|
|
259
|
-
{children}
|
|
260
|
-
<ExternalLink className="w-3 h-3 inline"/>
|
|
261
|
-
</a>
|
|
262
|
-
</span>);
|
|
263
|
-
}
|
|
264
|
-
// =============================================================================
|
|
265
|
-
// Code Block
|
|
266
|
-
// =============================================================================
|
|
267
|
-
function CodeBlock({ inline, className, children, ...props }) {
|
|
268
|
-
const [copied, setCopied] = useState(false);
|
|
269
|
-
const match = /language-(\w+)/.exec(className || "");
|
|
270
|
-
const language = match ? match[1] : "";
|
|
271
|
-
const codeString = String(children).replace(/\n$/, "");
|
|
272
|
-
const handleCopy = async () => {
|
|
273
|
-
await navigator.clipboard.writeText(codeString);
|
|
274
|
-
setCopied(true);
|
|
275
|
-
setTimeout(() => setCopied(false), 2000);
|
|
276
|
-
};
|
|
277
|
-
if (inline) {
|
|
278
|
-
return (<code className="bg-zinc-800 text-cyan-300 px-1.5 py-0.5 rounded text-sm font-mono" {...props}>
|
|
279
|
-
{children}
|
|
280
|
-
</code>);
|
|
281
|
-
}
|
|
282
|
-
if (language === "mermaid") {
|
|
283
|
-
return <MermaidDiagram code={codeString}/>;
|
|
284
|
-
}
|
|
285
|
-
return (<div className="relative group my-3">
|
|
286
|
-
<div className="absolute right-2 top-2 flex items-center gap-2 z-10">
|
|
287
|
-
{language && <span className="text-xs text-zinc-500 font-mono uppercase">{language}</span>}
|
|
288
|
-
<button onClick={handleCopy} className="p-1.5 rounded bg-zinc-700/80 hover:bg-zinc-600 text-zinc-400 hover:text-white transition-colors opacity-0 group-hover:opacity-100" title="Copy code">
|
|
289
|
-
{copied ? <Check className="w-3.5 h-3.5 text-green-400"/> : <Copy className="w-3.5 h-3.5"/>}
|
|
290
|
-
</button>
|
|
291
|
-
</div>
|
|
292
|
-
|
|
293
|
-
<SyntaxHighlighter style={oneDark} language={language || "text"} PreTag="div" customStyle={{
|
|
294
|
-
margin: 0,
|
|
295
|
-
borderRadius: "0.5rem",
|
|
296
|
-
padding: "1rem",
|
|
297
|
-
fontSize: "0.875rem",
|
|
298
|
-
background: "rgb(30 30 30)",
|
|
299
|
-
}} {...props}>
|
|
300
|
-
{codeString}
|
|
301
|
-
</SyntaxHighlighter>
|
|
302
|
-
</div>);
|
|
303
|
-
}
|
|
304
|
-
function MarkdownRendererInner({ content, className }) {
|
|
305
|
-
if (!content) {
|
|
306
|
-
return <span className="text-zinc-500">...</span>;
|
|
307
|
-
}
|
|
308
|
-
const blocks = parseBlocks(content);
|
|
309
|
-
return (<div className={cn("renderer-content text-sm", className)}>
|
|
310
|
-
{blocks.map((block, index) => (<React.Fragment key={index}>
|
|
311
|
-
{block.type === 'think' && <ThinkBlock content={block.content}/>}
|
|
312
|
-
|
|
313
|
-
{block.type === 'invoke' && block.toolName && (<InvokeBlock toolName={block.toolName} params={block.params}/>)}
|
|
314
|
-
|
|
315
|
-
{block.type === 'text' && (<ReactMarkdown remarkPlugins={[remarkGfm, remarkMath]} rehypePlugins={[rehypeKatex]} components={{
|
|
316
|
-
code: CodeBlock,
|
|
317
|
-
h1: ({ children }) => <h1 className="text-xl font-bold mt-4 mb-2 text-white">{children}</h1>,
|
|
318
|
-
h2: ({ children }) => <h2 className="text-lg font-semibold mt-3 mb-2 text-white">{children}</h2>,
|
|
319
|
-
h3: ({ children }) => <h3 className="text-base font-semibold mt-2 mb-1 text-white">{children}</h3>,
|
|
320
|
-
p: ({ children }) => <p className="mb-2 last:mb-0 leading-relaxed">{children}</p>,
|
|
321
|
-
ul: ({ children }) => <ul className="list-disc list-inside mb-2 space-y-1 pl-2">{children}</ul>,
|
|
322
|
-
ol: ({ children }) => <ol className="list-decimal list-inside mb-2 space-y-1 pl-2">{children}</ol>,
|
|
323
|
-
li: ({ children }) => <li className="leading-relaxed">{children}</li>,
|
|
324
|
-
a: ({ href, children }) => href ? <LinkPreview url={href}>{children}</LinkPreview> : <span>{children}</span>,
|
|
325
|
-
img: ({ src, alt }) => <img src={src} alt={alt || "Image"} className="max-w-full rounded-lg my-2" loading="lazy"/>,
|
|
326
|
-
table: ({ children }) => (<div className="overflow-x-auto my-3">
|
|
327
|
-
<table className="w-full border-collapse border border-zinc-700 text-sm">{children}</table>
|
|
328
|
-
</div>),
|
|
329
|
-
thead: ({ children }) => <thead className="bg-zinc-800">{children}</thead>,
|
|
330
|
-
th: ({ children }) => <th className="border border-zinc-700 px-3 py-2 text-left font-semibold text-white">{children}</th>,
|
|
331
|
-
td: ({ children }) => <td className="border border-zinc-700 px-3 py-2">{children}</td>,
|
|
332
|
-
tr: ({ children }) => <tr className="even:bg-zinc-800/50">{children}</tr>,
|
|
333
|
-
blockquote: ({ children }) => <blockquote className="border-l-4 border-cyan-500 pl-4 my-2 italic text-zinc-400">{children}</blockquote>,
|
|
334
|
-
hr: () => <hr className="border-zinc-700 my-4"/>,
|
|
335
|
-
strong: ({ children }) => <strong className="font-semibold text-white">{children}</strong>,
|
|
336
|
-
em: ({ children }) => <em className="italic">{children}</em>,
|
|
337
|
-
del: ({ children }) => <del className="line-through text-zinc-500">{children}</del>,
|
|
338
|
-
}}>
|
|
339
|
-
{block.content}
|
|
340
|
-
</ReactMarkdown>)}
|
|
341
|
-
</React.Fragment>))}
|
|
342
|
-
</div>);
|
|
343
|
-
}
|
|
344
|
-
export const MarkdownRenderer = memo(MarkdownRendererInner);
|
|
345
|
-
const messageVariantStyles = {
|
|
346
|
-
agent: {
|
|
347
|
-
user: "bg-fuchsia-500/20 text-fuchsia-100",
|
|
348
|
-
userAvatar: "bg-fuchsia-500/20 text-fuchsia-400",
|
|
349
|
-
assistant: "bg-sidebar-accent text-foreground",
|
|
350
|
-
assistantAvatar: "bg-cyan-500/20 text-cyan-400",
|
|
351
|
-
},
|
|
352
|
-
manowar: {
|
|
353
|
-
user: "bg-cyan-500/20 text-cyan-100",
|
|
354
|
-
userAvatar: "bg-cyan-500/20 text-cyan-400",
|
|
355
|
-
assistant: "bg-sidebar-accent text-foreground font-mono text-sm",
|
|
356
|
-
assistantAvatar: "bg-fuchsia-500/20 text-fuchsia-400",
|
|
357
|
-
},
|
|
358
|
-
playground: {
|
|
359
|
-
user: "bg-cyan-600 text-white",
|
|
360
|
-
userAvatar: "bg-zinc-700 text-zinc-300",
|
|
361
|
-
assistant: "bg-zinc-800 text-zinc-100",
|
|
362
|
-
assistantAvatar: "bg-cyan-500/20 text-cyan-400",
|
|
363
|
-
},
|
|
364
|
-
};
|
|
365
|
-
function ChatMessageItemInner({ message, variant = "agent", showActions = true, onCopy, onRetry, onDelete, assistantAvatar, }) {
|
|
366
|
-
const styles = messageVariantStyles[variant];
|
|
367
|
-
const isUser = message.role === "user";
|
|
368
|
-
const isLoading = !message.content && message.role === "assistant";
|
|
369
|
-
const getAssistantIcon = () => {
|
|
370
|
-
if (assistantAvatar)
|
|
371
|
-
return assistantAvatar;
|
|
372
|
-
switch (message.type) {
|
|
373
|
-
case "image": return <ImageIcon className="h-4 w-4"/>;
|
|
374
|
-
case "audio": return <Music className="h-4 w-4"/>;
|
|
375
|
-
case "video": return <Video className="h-4 w-4"/>;
|
|
376
|
-
default: return <Bot className="h-4 w-4"/>;
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
return (<div className={cn("flex gap-3", isUser && "justify-end")}>
|
|
380
|
-
{!isUser && (<Avatar className="w-8 h-8 shrink-0">
|
|
381
|
-
<AvatarFallback className={styles.assistantAvatar}>{getAssistantIcon()}</AvatarFallback>
|
|
382
|
-
</Avatar>)}
|
|
383
|
-
|
|
384
|
-
<div className={cn("max-w-[80%] p-3 rounded-lg relative group", isUser ? styles.user : styles.assistant)}>
|
|
385
|
-
{showActions && (<div className="absolute -top-8 right-0 hidden group-hover:flex items-center gap-1 bg-card/90 backdrop-blur-sm border border-sidebar-border rounded-md p-1 shadow-lg z-10">
|
|
386
|
-
{onCopy && (<button onClick={() => onCopy(message.content)} className="p-1 rounded hover:bg-sidebar-accent text-muted-foreground hover:text-foreground transition-colors" title="Copy message">
|
|
387
|
-
<Copy className="w-3.5 h-3.5"/>
|
|
388
|
-
</button>)}
|
|
389
|
-
{isUser && onRetry && (<button onClick={() => onRetry(message.content)} className="p-1 rounded hover:bg-sidebar-accent text-muted-foreground hover:text-foreground transition-colors" title="Retry this message">
|
|
390
|
-
<RefreshCw className="w-3.5 h-3.5"/>
|
|
391
|
-
</button>)}
|
|
392
|
-
{onDelete && (<button onClick={() => onDelete(message.id)} className="p-1 rounded hover:bg-red-500/20 text-muted-foreground hover:text-red-400 transition-colors" title="Delete message">
|
|
393
|
-
<Trash2 className="w-3.5 h-3.5"/>
|
|
394
|
-
</button>)}
|
|
395
|
-
</div>)}
|
|
396
|
-
|
|
397
|
-
{message.imageUrl && <img src={message.imageUrl} alt="Generated" className="rounded-lg max-w-full mb-2"/>}
|
|
398
|
-
{message.audioUrl && <audio controls className="w-full mb-2"><source src={message.audioUrl}/></audio>}
|
|
399
|
-
{message.videoUrl && <video controls className="rounded-lg max-w-full mb-2"><source src={message.videoUrl}/></video>}
|
|
400
|
-
|
|
401
|
-
{message.type === "embedding" ? (<EmbeddingBlock content={message.content || "..."}/>) : isLoading ? (
|
|
402
|
-
// Show GenerationCanvas for media types, spinner for text
|
|
403
|
-
message.type === "image" || message.type === "audio" || message.type === "video" ? (<GenerationCanvas type={message.type} status={message.content || undefined}/>) : (<div className="flex items-center gap-2 text-sm text-zinc-400">
|
|
404
|
-
<Loader2 className="w-4 h-4 animate-spin"/>
|
|
405
|
-
<span>Thinking...</span>
|
|
406
|
-
</div>)) : isUser ? (<p className="whitespace-pre-wrap text-sm">{message.content || "..."}</p>) : (<MarkdownRenderer content={message.content || "..."}/>)}
|
|
407
|
-
</div>
|
|
408
|
-
|
|
409
|
-
{isUser && (<Avatar className="w-8 h-8 shrink-0">
|
|
410
|
-
<AvatarFallback className={styles.userAvatar}><User className="w-4 h-4"/></AvatarFallback>
|
|
411
|
-
</Avatar>)}
|
|
412
|
-
</div>);
|
|
413
|
-
}
|
|
414
|
-
export const ChatMessageItem = memo(ChatMessageItemInner);
|
|
415
|
-
const canvasVariantConfig = {
|
|
416
|
-
agent: {
|
|
417
|
-
border: "border-cyan-500/30",
|
|
418
|
-
headerBg: "bg-cyan-500/5",
|
|
419
|
-
headerText: "text-cyan-400",
|
|
420
|
-
headerIcon: <Bot className="w-4 h-4 text-cyan-400"/>,
|
|
421
|
-
sendButton: "bg-cyan-500 hover:bg-cyan-600 text-black",
|
|
422
|
-
accentColor: "cyan",
|
|
423
|
-
},
|
|
424
|
-
manowar: {
|
|
425
|
-
border: "border-fuchsia-500/30",
|
|
426
|
-
headerBg: "bg-fuchsia-500/5",
|
|
427
|
-
headerText: "text-fuchsia-400",
|
|
428
|
-
headerIcon: <Layers className="w-4 h-4 text-fuchsia-400"/>,
|
|
429
|
-
sendButton: "bg-fuchsia-500 hover:bg-fuchsia-600 text-white",
|
|
430
|
-
accentColor: "fuchsia",
|
|
431
|
-
},
|
|
432
|
-
playground: {
|
|
433
|
-
border: "border-zinc-700",
|
|
434
|
-
headerBg: "bg-zinc-900/50",
|
|
435
|
-
headerText: "text-cyan-400",
|
|
436
|
-
headerIcon: <Bot className="w-4 h-4 text-cyan-400"/>,
|
|
437
|
-
sendButton: "bg-cyan-500 hover:bg-cyan-600 text-black",
|
|
438
|
-
accentColor: "cyan",
|
|
439
|
-
},
|
|
440
|
-
};
|
|
441
|
-
export function MultimodalCanvas({ messages, inputValue, onInputChange, onSend, sending, variant = "agent", title, icon, emptyStateText = "Start a conversation", emptyStateSubtext, emptyStateIcon, showHeader = true, placeholder, status = "idle", error, attachedFiles = [], onFileSelect, onRemoveFile, fileInputRef, onFileInputChange, isRecording = false, recordingSupported = true, onStartRecording, onStopRecording, showMessageActions = true, onCopyMessage, onRetryMessage, onDeleteMessage, onClearChat, onKnowledgeUpload, scrollContainerRef, messagesEndRef, height = "h-64", selectedModel, setMessages, }) {
|
|
442
|
-
const config = canvasVariantConfig[variant];
|
|
443
|
-
// ==========================================================================
|
|
444
|
-
// Lyria RealTime Integration
|
|
445
|
-
// ==========================================================================
|
|
446
|
-
const isLyriaModel = selectedModel?.toLowerCase().includes("lyria");
|
|
447
|
-
const lyria = useLyriaWebSocket();
|
|
448
|
-
const [lyriaMessageId, setLyriaMessageId] = useState(null);
|
|
449
|
-
// Handle Lyria send - intercepts regular onSend for Lyria models
|
|
450
|
-
const handleSend = useCallback(() => {
|
|
451
|
-
if (isLyriaModel && setMessages) {
|
|
452
|
-
// Create user message
|
|
453
|
-
const userMessage = {
|
|
454
|
-
id: crypto.randomUUID(),
|
|
455
|
-
role: "user",
|
|
456
|
-
content: inputValue.trim(),
|
|
457
|
-
timestamp: Date.now(),
|
|
458
|
-
type: "text",
|
|
459
|
-
};
|
|
460
|
-
setMessages((prev) => [...prev, userMessage]);
|
|
461
|
-
// Create assistant placeholder
|
|
462
|
-
const assistantId = crypto.randomUUID();
|
|
463
|
-
setLyriaMessageId(assistantId);
|
|
464
|
-
setMessages((prev) => [
|
|
465
|
-
...prev,
|
|
466
|
-
{
|
|
467
|
-
id: assistantId,
|
|
468
|
-
role: "assistant",
|
|
469
|
-
content: "🎵 Lyria RealTime Music Generation\n\nClick Play to start generating music...",
|
|
470
|
-
timestamp: Date.now(),
|
|
471
|
-
type: "audio",
|
|
472
|
-
},
|
|
473
|
-
]);
|
|
474
|
-
// Connect and configure Lyria
|
|
475
|
-
if (lyria.state === "idle" || lyria.state === "closed" || lyria.state === "error") {
|
|
476
|
-
lyria.connect();
|
|
477
|
-
}
|
|
478
|
-
lyria.setPrompt(inputValue.trim() || "ambient electronic music");
|
|
479
|
-
// Clear input
|
|
480
|
-
onInputChange("");
|
|
481
|
-
}
|
|
482
|
-
else {
|
|
483
|
-
// Regular send for non-Lyria models
|
|
484
|
-
onSend();
|
|
485
|
-
}
|
|
486
|
-
}, [isLyriaModel, setMessages, inputValue, onSend, onInputChange, lyria]);
|
|
487
|
-
// Update Lyria message status based on connection state
|
|
488
|
-
useEffect(() => {
|
|
489
|
-
if (!isLyriaModel || !lyriaMessageId || !setMessages)
|
|
490
|
-
return;
|
|
491
|
-
let statusMessage = "";
|
|
492
|
-
switch (lyria.state) {
|
|
493
|
-
case "connecting":
|
|
494
|
-
statusMessage = "🎵 Connecting to Lyria RealTime...";
|
|
495
|
-
break;
|
|
496
|
-
case "connected":
|
|
497
|
-
statusMessage = "🎵 Connected! Waiting for session ready...";
|
|
498
|
-
break;
|
|
499
|
-
case "ready":
|
|
500
|
-
statusMessage = `🎵 Lyria RealTime Ready\n\nPrompt: "${inputValue}"\n\nClick Play to start generating music`;
|
|
501
|
-
break;
|
|
502
|
-
case "playing":
|
|
503
|
-
statusMessage = `🎵 Generating music...\n\n${lyria.audioQueue.length} audio chunks received`;
|
|
504
|
-
break;
|
|
505
|
-
case "paused":
|
|
506
|
-
statusMessage = "🎵 Music generation paused";
|
|
507
|
-
break;
|
|
508
|
-
case "error":
|
|
509
|
-
statusMessage = `🎵 Error: ${lyria.error || "Unknown error"}`;
|
|
510
|
-
break;
|
|
511
|
-
case "closed":
|
|
512
|
-
statusMessage = "🎵 Lyria session closed";
|
|
513
|
-
break;
|
|
514
|
-
}
|
|
515
|
-
if (statusMessage) {
|
|
516
|
-
setMessages((prev) => prev.map((m) => m.id === lyriaMessageId ? { ...m, content: statusMessage } : m));
|
|
517
|
-
}
|
|
518
|
-
}, [lyria.state, lyria.audioQueue.length, lyria.error, isLyriaModel, lyriaMessageId, setMessages, inputValue]);
|
|
519
|
-
const handleKeyDown = useCallback((e) => {
|
|
520
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
521
|
-
e.preventDefault();
|
|
522
|
-
handleSend();
|
|
523
|
-
}
|
|
524
|
-
}, [handleSend]);
|
|
525
|
-
const canSend = !sending && (inputValue.trim() || attachedFiles.length > 0);
|
|
526
|
-
const isUploading = attachedFiles.some(f => f.uploading);
|
|
527
|
-
return (<div className={cn("border rounded-lg bg-background/50 overflow-hidden flex flex-col", config.border, variant === "manowar" && "shadow-[0_0_30px_-5px_hsl(292_85%_55%/0.1)]", !showHeader && "border-0 rounded-none bg-transparent", height)}>
|
|
528
|
-
{showHeader && (<div className={cn("p-3 border-b border-sidebar-border flex items-center shrink-0", config.headerBg)}>
|
|
529
|
-
<div className="flex items-center gap-2">
|
|
530
|
-
{icon || config.headerIcon}
|
|
531
|
-
<span className={cn("text-sm font-mono", config.headerText)}>{title || "Chat"}</span>
|
|
532
|
-
</div>
|
|
533
|
-
</div>)}
|
|
534
|
-
|
|
535
|
-
<div ref={scrollContainerRef} className="flex-1 min-h-0 p-4 overflow-y-auto">
|
|
536
|
-
{messages.length === 0 ? (<div className="text-center text-muted-foreground text-sm py-8">
|
|
537
|
-
{emptyStateIcon || (variant === "manowar" ? (<Play className={cn("w-12 h-12 mx-auto mb-4 opacity-50", config.headerText)}/>) : (<Bot className="w-8 h-8 mx-auto mb-2 opacity-50"/>))}
|
|
538
|
-
<p>{emptyStateText}</p>
|
|
539
|
-
{emptyStateSubtext && <p className="text-xs mt-1 text-muted-foreground/70">{emptyStateSubtext}</p>}
|
|
540
|
-
</div>) : (<div className="space-y-4">
|
|
541
|
-
{messages.map((msg) => (<React.Fragment key={msg.id}>
|
|
542
|
-
<ChatMessageItem message={msg} variant={variant} showActions={showMessageActions} onCopy={onCopyMessage} onRetry={onRetryMessage} onDelete={onDeleteMessage}/>
|
|
543
|
-
{/* Lyria Audio Player for Lyria messages */}
|
|
544
|
-
{isLyriaModel && msg.id === lyriaMessageId && (<LyriaAudioPlayer audioQueue={lyria.audioQueue} isPlaying={lyria.state === "playing"} onPlay={lyria.play} onPause={lyria.pause} onStop={() => {
|
|
545
|
-
lyria.stop();
|
|
546
|
-
if (setMessages) {
|
|
547
|
-
setMessages((prev) => prev.map((m) => m.id === lyriaMessageId
|
|
548
|
-
? { ...m, content: "🎵 Music generation stopped" }
|
|
549
|
-
: m));
|
|
550
|
-
}
|
|
551
|
-
}} onClearQueue={lyria.clearAudioQueue} config={lyria.currentConfig}/>)}
|
|
552
|
-
</React.Fragment>))}
|
|
553
|
-
<div ref={messagesEndRef}/>
|
|
554
|
-
</div>)}
|
|
555
|
-
</div>
|
|
556
|
-
|
|
557
|
-
{status !== "idle" && (<div className="shrink-0 px-3 py-2 border-t border-dashed border-sidebar-border bg-sidebar-accent/30 flex items-center gap-2 text-xs font-mono">
|
|
558
|
-
<Loader2 className={cn("w-3 h-3 animate-spin", config.headerText)}/>
|
|
559
|
-
<span className="text-muted-foreground">
|
|
560
|
-
{status === "paying" && <><span className="text-yellow-400">Paying...</span> Processing x402 payment</>}
|
|
561
|
-
{status === "waiting" && <><span className="text-orange-400">Waiting...</span> Awaiting response</>}
|
|
562
|
-
{status === "streaming" && <><span className={config.headerText}>Streaming...</span> Receiving response</>}
|
|
563
|
-
</span>
|
|
564
|
-
</div>)}
|
|
565
|
-
|
|
566
|
-
<div className="shrink-0 p-3 border-t border-sidebar-border">
|
|
567
|
-
{error && <div className="text-xs text-red-400 mb-2 p-2 bg-red-500/10 rounded">{error}</div>}
|
|
568
|
-
|
|
569
|
-
{attachedFiles.length > 0 && (<div className="flex flex-wrap gap-2 mb-2">
|
|
570
|
-
{attachedFiles.map((file, index) => (<div key={file.file.name + index} className="relative group">
|
|
571
|
-
<div className="h-12 w-12 rounded-md overflow-hidden bg-zinc-900 border border-zinc-700 flex items-center justify-center">
|
|
572
|
-
{file.type === "image" ? (<img src={file.preview} alt="Preview" className="h-full w-full object-cover"/>) : file.type === "video" ? (file.preview ? <video src={file.preview} className="h-full w-full object-cover" muted/> : <Video className="h-6 w-6 text-pink-500"/>) : (<Music className="h-6 w-6 text-zinc-500"/>)}
|
|
573
|
-
{file.uploading && (<div className="absolute inset-0 bg-black/50 flex items-center justify-center">
|
|
574
|
-
<Loader2 className="h-4 w-4 animate-spin text-white"/>
|
|
575
|
-
</div>)}
|
|
576
|
-
</div>
|
|
577
|
-
{onRemoveFile && (<button onClick={() => onRemoveFile(file.file)} className="absolute -top-1.5 -right-1.5 h-4 w-4 rounded-full bg-zinc-800 border border-zinc-600 flex items-center justify-center text-zinc-400 hover:text-white hover:bg-zinc-700">
|
|
578
|
-
<X className="h-2.5 w-2.5"/>
|
|
579
|
-
</button>)}
|
|
580
|
-
</div>))}
|
|
581
|
-
</div>)}
|
|
582
|
-
|
|
583
|
-
<div className="flex gap-2">
|
|
584
|
-
{onClearChat && (<Button variant="ghost" size="icon" onClick={onClearChat} disabled={sending} className="text-zinc-400 hover:text-white shrink-0" title="Clear chat">
|
|
585
|
-
<Trash2 className="w-4 h-4"/>
|
|
586
|
-
</Button>)}
|
|
587
|
-
|
|
588
|
-
{onFileSelect && (<Button variant="ghost" size="icon" onClick={onFileSelect} disabled={sending || isRecording} className={cn("text-zinc-400 shrink-0 cursor-pointer", `hover:text-${config.accentColor}-400`)} title="Attach file">
|
|
589
|
-
<Paperclip className="w-4 h-4"/>
|
|
590
|
-
</Button>)}
|
|
591
|
-
|
|
592
|
-
{onStartRecording && onStopRecording && (<Button variant="ghost" size="icon" onClick={isRecording ? onStopRecording : onStartRecording} disabled={sending || !recordingSupported} className={cn("shrink-0 transition-colors cursor-pointer", isRecording ? "text-red-500 hover:text-red-400 animate-pulse" : cn("text-zinc-400", `hover:text-${config.accentColor}-400`))} title={isRecording ? "Stop recording" : "Record audio"}>
|
|
593
|
-
{isRecording ? <MicOff className="w-4 h-4"/> : <Mic className="w-4 h-4"/>}
|
|
594
|
-
</Button>)}
|
|
595
|
-
|
|
596
|
-
{onKnowledgeUpload && (<TooltipProvider>
|
|
597
|
-
<Tooltip>
|
|
598
|
-
<TooltipTrigger asChild>
|
|
599
|
-
<Button variant="ghost" size="icon" onClick={onKnowledgeUpload} disabled={sending} className={cn("shrink-0 cursor-pointer text-zinc-400", `hover:text-${config.accentColor}-400`)}>
|
|
600
|
-
<BookOpen className="w-4 h-4"/>
|
|
601
|
-
</Button>
|
|
602
|
-
</TooltipTrigger>
|
|
603
|
-
<TooltipContent><p>Upload Knowledge</p></TooltipContent>
|
|
604
|
-
</Tooltip>
|
|
605
|
-
</TooltipProvider>)}
|
|
606
|
-
|
|
607
|
-
<Textarea placeholder={placeholder || (variant === "manowar" ? "Enter workflow parameters or instruction..." : "Type your message...")} value={inputValue} onChange={(e) => onInputChange(e.target.value)} onKeyDown={handleKeyDown} rows={1} className={cn("resize-none flex-1", variant === "manowar" && "font-mono text-sm")} disabled={sending}/>
|
|
608
|
-
|
|
609
|
-
<Button onClick={handleSend} disabled={!canSend || isUploading} className={config.sendButton}>
|
|
610
|
-
{sending ? <Loader2 className="w-4 h-4 animate-spin"/> : variant === "manowar" ? <Play className="w-4 h-4"/> : <Send className="w-4 h-4"/>}
|
|
611
|
-
</Button>
|
|
612
|
-
</div>
|
|
613
|
-
|
|
614
|
-
{fileInputRef && onFileInputChange && (<input type="file" ref={fileInputRef} onChange={onFileInputChange} accept="image/*,audio/*,video/*" className="hidden"/>)}
|
|
615
|
-
</div>
|
|
616
|
-
</div>);
|
|
617
|
-
}
|
|
618
|
-
//# sourceMappingURL=chat.js.map
|