themelia-ui 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/themelia-ui/SKILL.md +60 -33
- package/.agents/skills/themelia-ui/manifest.json +23 -0
- package/.agents/skills/themelia-ui/references/api-compatibility.md +5 -4
- package/.agents/skills/themelia-ui/references/blocks.md +123 -0
- package/.agents/skills/themelia-ui/references/composition-ladder.md +8 -8
- package/.agents/skills/themelia-ui/references/composition.md +100 -19
- package/.agents/skills/themelia-ui/references/forms.md +23 -3
- package/.agents/skills/themelia-ui/references/framework-wiring.md +41 -13
- package/.agents/skills/themelia-ui/references/i18n.md +4 -2
- package/.agents/skills/themelia-ui/references/imports.md +104 -104
- package/.agents/skills/themelia-ui/references/installation.md +60 -31
- package/.agents/skills/themelia-ui/references/migration.md +156 -5
- package/.agents/skills/themelia-ui/references/provider-and-scoping.md +37 -25
- package/.agents/skills/themelia-ui/references/reference-workflows.md +43 -0
- package/.agents/skills/themelia-ui/references/structure-and-spacing.md +147 -0
- package/.agents/skills/themelia-ui/references/theming.md +174 -131
- package/.agents/skills/themelia-ui/references/troubleshooting.md +88 -30
- package/.agents/skills/themelia-ui/references/verification.md +60 -5
- package/CHANGELOG.md +212 -0
- package/README.md +48 -60
- package/dist/accordion-CHuzMmWL.js +143 -0
- package/dist/{action-menu-BNLURfMK.js → action-menu-BwiL_F6I.js} +35 -33
- package/dist/{alert-dialog-BMVo6Z-8.js → alert-dialog-Cg2HhuBe.js} +1 -1
- package/dist/avatar-Dc_BNYfB.js +93 -0
- package/dist/badge-VlJVZjdm.js +45 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/alert-dialog.js +1 -1
- package/dist/base/aspect-ratio.js +3 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +2 -2
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +1 -1
- package/dist/base/carousel.js +6 -4
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/context-menu.js +22 -21
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +1 -1
- package/dist/base/dialog.js +1 -1
- package/dist/base/display.js +1 -1
- package/dist/base/dropdown-menu.js +1 -1
- package/dist/base/feedback.js +1 -1
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +1 -1
- package/dist/base/hover-card.js +26 -23
- package/dist/base/input-group.js +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/label.js +1 -1
- package/dist/base/menubar.js +20 -14
- package/dist/base/navigation-menu.js +47 -38
- package/dist/base/navigation.js +1 -1
- package/dist/base/otp-input.js +36 -30
- package/dist/base/overlay.js +1 -1
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +51 -47
- package/dist/base/repeaters.js +1 -1
- package/dist/base/resizable.js +2 -0
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +1 -1
- package/dist/base/timeline.js +1 -1
- package/dist/base/toaster.js +1 -1
- package/dist/base/toggle.js +21 -15
- package/dist/base/toolbar.js +1 -1
- package/dist/base/tooltip.js +1 -1
- package/dist/base/typography.js +2 -2
- package/dist/base/upload.js +1 -1
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-BZYNKXdV.js → batch-action-bar-DZVMVW83.js} +11 -8
- package/dist/{admin/patterns → blocks/admin}/access.js +79 -76
- package/dist/blocks/admin/commerce.js +2493 -0
- package/dist/{patterns → blocks}/analytics.js +312 -303
- package/dist/{patterns → blocks}/onboarding.js +27 -23
- package/dist/{patterns → blocks}/timelines.js +1 -1
- package/dist/buttons-BX2JfL5X.js +173 -0
- package/dist/cards-Ddhz43Bz.js +279 -0
- package/dist/chart-BkK3Xm10.js +201 -0
- package/dist/choice-inputs-NwRxvmZN.js +694 -0
- package/dist/combobox-519ubijc.js +292 -0
- package/dist/command-JjApYFds.js +156 -0
- package/dist/comments-CCQ2QRaU.js +1443 -0
- package/dist/components/base/action-menu/action-menu.d.ts +1 -1
- package/dist/components/base/action-menu/action-menu.types.d.ts +2 -2
- package/dist/components/base/avatar/avatar.d.ts +5 -2
- package/dist/components/base/badge/badge.d.ts +10 -10
- package/dist/components/base/badge/badge.variants.d.ts +1 -2
- package/dist/components/base/badge/index.d.ts +1 -2
- package/dist/components/base/buttons/button.d.ts +9 -8
- package/dist/components/base/buttons/button.types.d.ts +2 -2
- package/dist/components/base/buttons/index.d.ts +1 -1
- package/dist/components/base/buttons/text-button.d.ts +1 -1
- package/dist/components/base/cards/card-actions.d.ts +1 -1
- package/dist/components/base/cards/card.d.ts +3 -1
- package/dist/components/base/cards/partials/card-header.d.ts +2 -1
- package/dist/components/base/choice-inputs/choice.types.d.ts +2 -2
- package/dist/components/base/choice-inputs/partials/choice-parts.d.ts +3 -3
- package/dist/components/base/command/command.d.ts +5 -2
- package/dist/components/base/display/icon-badge.d.ts +5 -3
- package/dist/components/base/display/index.d.ts +1 -1
- package/dist/components/base/display/metadata-list.d.ts +6 -6
- package/dist/components/base/display/metadata-value.d.ts +1 -1
- package/dist/components/base/display/separator.d.ts +2 -2
- package/dist/components/base/feedback/alert.d.ts +3 -2
- package/dist/components/base/feedback/empty.d.ts +5 -4
- package/dist/components/base/feedback/progress-circle.d.ts +2 -2
- package/dist/components/base/feedback/progress.d.ts +3 -1
- package/dist/components/base/forms/form-field.d.ts +2 -2
- package/dist/components/base/input-group/input-group.d.ts +8 -10
- package/dist/components/base/item/item.d.ts +2 -2
- package/dist/components/base/overlay/index.d.ts +1 -1
- package/dist/components/base/overlay/overlay.types.d.ts +7 -5
- package/dist/components/base/qr-code/qr-code.d.ts +4 -4
- package/dist/components/base/sheet/sheet.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +9 -13
- package/dist/components/base/spinner/spinner.d.ts +2 -2
- package/dist/components/base/structure/adaptive-grid.d.ts +3 -3
- package/dist/components/base/structure/bleed.d.ts +4 -2
- package/dist/components/base/structure/grid.d.ts +10 -4
- package/dist/components/base/structure/index.d.ts +1 -1
- package/dist/components/base/structure/split.d.ts +4 -3
- package/dist/components/base/structure/stack.d.ts +5 -5
- package/dist/components/base/structure/structure.maps.d.ts +2 -1
- package/dist/components/base/structure/structure.types.d.ts +10 -4
- package/dist/components/base/toggle/toggle.d.ts +2 -2
- package/dist/components/base/toolbar/toolbar.d.ts +3 -3
- package/dist/components/base/typography/index.d.ts +2 -0
- package/dist/components/base/typography/rich-text/rich-text.variants.d.ts +9 -0
- package/dist/components/base/typography/text/index.d.ts +1 -0
- package/dist/components/base/typography/text/text.d.ts +15 -8
- package/dist/components/base/typography/text/text.variants.d.ts +41 -0
- package/dist/components/base/value-inputs/color-input.d.ts +1 -7
- package/dist/components/base/value-inputs/slider.d.ts +2 -7
- package/dist/components/{admin/patterns → blocks/admin}/commerce/vendor-profile.d.ts +2 -1
- package/dist/components/{patterns → blocks}/analytics/analytics.strings.d.ts +2 -5
- package/dist/components/features/actions/action-adapters.d.ts +3 -3
- package/dist/components/features/actions/actions.types.d.ts +3 -5
- package/dist/components/features/actions/index.d.ts +1 -1
- package/dist/components/features/activities/activities-feed.d.ts +1 -1
- package/dist/components/features/activities/activities.types.d.ts +4 -4
- package/dist/components/features/activities/activity-parts.d.ts +3 -3
- package/dist/components/features/activities/activity-row.d.ts +4 -4
- package/dist/components/features/activities/index.d.ts +1 -1
- package/dist/components/features/ai-chat/ai-chat.types.d.ts +10 -3
- package/dist/components/features/ai-chat/ai-message-surfaces.d.ts +1 -1
- package/dist/components/features/ai-chat/ai-work-surfaces.d.ts +1 -1
- package/dist/components/features/combobox/combobox.strings.d.ts +2 -2
- package/dist/components/features/combobox/fetching-combobox.d.ts +2 -1
- package/dist/components/features/combobox/resource-combobox.d.ts +3 -0
- package/dist/components/features/combobox/use-suggestions.d.ts +7 -0
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +3 -0
- package/dist/components/features/media-library/index.d.ts +1 -1
- package/dist/components/features/media-library/media-library-parts.d.ts +4 -3
- package/dist/components/features/media-library/media-library-views.d.ts +4 -3
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +12 -13
- package/dist/components/features/media-library/media-library.types.d.ts +11 -9
- package/dist/components/features/media-library/media-resource-gallery.d.ts +1 -1
- package/dist/components/features/media-library/use-media-library.d.ts +1 -4
- package/dist/components/features/overlays/action-overlay-frame.d.ts +1 -1
- package/dist/components/features/overlays/index.d.ts +1 -1
- package/dist/components/features/overlays/overlay-parts.d.ts +3 -3
- package/dist/components/features/overlays/overlays.types.d.ts +8 -7
- package/dist/components/features/rich-text-editor/index.d.ts +0 -1
- package/dist/components/features/table/data-table-body.d.ts +1 -1
- package/dist/components/features/table/data-table-expanded-row.d.ts +27 -0
- package/dist/components/features/table/data-table-header.d.ts +1 -1
- package/dist/components/features/table/data-table-size.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +9 -3
- package/dist/components/features/table/table.strings.d.ts +11 -0
- package/dist/components/features/table/table.types.d.ts +60 -2
- package/dist/components/features/theme-tweaker/index.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +6 -10
- package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +22 -6
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/auth/auth.d.ts +1 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -1
- package/dist/components/primitives/value.d.ts +3 -1
- package/dist/containers-B8d8U9GS.js +2 -0
- package/dist/{copyable-H1TUEY-H.js → copyable-D9Okb1w6.js} +12 -11
- package/dist/core.css +2 -2
- package/dist/css/access.css +2 -1
- package/dist/css/accordion.css +2 -1
- package/dist/css/action-menu.css +2 -1
- package/dist/css/activities.css +2 -1
- package/dist/css/ai-chat.css +2 -1
- package/dist/css/analytics.css +2 -1
- package/dist/css/app-shell.css +2 -1
- package/dist/css/aspect-ratio.css +2 -1
- package/dist/css/async-preview.css +2 -1
- package/dist/css/auth.css +2 -1
- package/dist/css/avatar.css +2 -1
- package/dist/css/badge.css +2 -1
- package/dist/css/batch-action-bar.css +2 -1
- package/dist/css/buttons.css +2 -1
- package/dist/css/cards.css +2 -1
- package/dist/css/carousel.css +2 -1
- package/dist/css/chart.css +2 -1
- package/dist/css/choice-inputs.css +2 -1
- package/dist/css/combobox.css +2 -1
- package/dist/css/combobox2.css +2 -1
- package/dist/css/command.css +2 -1
- package/dist/css/comments.css +2 -1
- package/dist/css/commerce.css +2 -1
- package/dist/css/containers.css +2 -1
- package/dist/css/copyable.css +2 -1
- package/dist/css/data-view.css +2 -1
- package/dist/css/date-pickers.css +2 -1
- package/dist/css/display.css +2 -1
- package/dist/css/dropdown-menu.css +2 -1
- package/dist/css/event-calendar.css +2 -1
- package/dist/css/feedback.css +2 -1
- package/dist/css/filters.css +2 -1
- package/dist/css/forms-numeric.css +2 -1
- package/dist/css/forms.css +2 -1
- package/dist/css/global-search.css +2 -1
- package/dist/css/header.css +2 -1
- package/dist/css/hover-card.css +2 -1
- package/dist/css/input-group.css +2 -1
- package/dist/css/item.css +2 -1
- package/dist/css/kanban.css +2 -1
- package/dist/css/label.css +2 -1
- package/dist/css/map.css +2 -1
- package/dist/css/media-library.css +2 -1
- package/dist/css/mentions.css +2 -1
- package/dist/css/menubar.css +2 -1
- package/dist/css/navigation-menu.css +2 -1
- package/dist/css/navigation.css +2 -1
- package/dist/css/navigation2.css +2 -1
- package/dist/css/onboarding.css +2 -1
- package/dist/css/otp-input.css +2 -1
- package/dist/css/overlay.css +2 -1
- package/dist/css/overlays.css +2 -1
- package/dist/css/page.css +2 -1
- package/dist/css/popover-menu.css +2 -1
- package/dist/css/popover.css +2 -1
- package/dist/css/primitives.css +2 -1
- package/dist/css/products.css +2 -1
- package/dist/css/qr-code.css +2 -1
- package/dist/css/repeaters.css +2 -1
- package/dist/css/resizable.css +2 -1
- package/dist/css/resource-assignment.css +2 -1
- package/dist/css/resource.css +2 -1
- package/dist/css/rich-text-editor.css +2 -1
- package/dist/css/schema-form.css +2 -1
- package/dist/css/sidebar.css +2 -1
- package/dist/css/sidebar2.css +2 -1
- package/dist/css/skeleton.css +2 -1
- package/dist/css/spinner.css +2 -1
- package/dist/css/structure.css +2 -1
- package/dist/css/sync.css +2 -1
- package/dist/css/table.css +2 -1
- package/dist/css/table2.css +2 -1
- package/dist/css/text-inputs.css +2 -1
- package/dist/css/theme-tweaker.css +2 -1
- package/dist/css/timeline.css +2 -1
- package/dist/css/timelines.css +2 -1
- package/dist/css/toaster.css +2 -1
- package/dist/css/toggle.css +2 -1
- package/dist/css/toolbar.css +2 -1
- package/dist/css/tooltip.css +2 -1
- package/dist/css/typography.css +2 -1
- package/dist/css/upload.css +2 -1
- package/dist/css/value-inputs.css +2 -1
- package/dist/css/workspace.css +2 -1
- package/dist/css-graph.json +1027 -0
- package/dist/date-pickers-BwCwKIVM.js +685 -0
- package/dist/{dialog-CtFCuTUF.js → dialog-CAnwRNrm.js} +1 -1
- package/dist/display-a7AoX_u7.js +664 -0
- package/dist/dropdown-menu-Br8kvjrF.js +235 -0
- package/dist/empty.js +0 -0
- package/dist/features/actions.js +6 -6
- package/dist/features/activities.js +219 -216
- package/dist/features/ai-chat.js +593 -565
- package/dist/features/async-preview.js +105 -286
- package/dist/features/combobox.js +328 -314
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +56 -55
- package/dist/features/event-calendar.js +189 -185
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +259 -260
- package/dist/features/kanban.js +39 -37
- package/dist/features/map.js +357 -354
- package/dist/features/media-library.js +931 -931
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +950 -942
- package/dist/features/resource-assignment.js +39 -37
- package/dist/features/resource.js +70 -71
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +342 -338
- package/dist/features/sync.js +14 -12
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +1002 -962
- package/dist/feedback-D4qVsKlD.js +430 -0
- package/dist/{filters-DOLKRSmb.js → filters-BhsTkWpZ.js} +386 -383
- package/dist/forms-C0WeNPFF.js +250 -0
- package/dist/forms-numeric-IwQ1ltNf.js +582 -0
- package/dist/hooks/use-native-dialog.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/input-group-HS_Z0Ei_.js +119 -0
- package/dist/item-M2pmpWXh.js +150 -0
- package/dist/{label-DumoMDm6.js → label-HOBXAscw.js} +7 -5
- package/dist/layout/app-shell.js +4 -2
- package/dist/layout/auth.js +102 -100
- package/dist/layout/header.js +190 -180
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +18 -16
- package/dist/layout/settings.js +2 -2
- package/dist/layout/sidebar.js +50 -46
- package/dist/layout/workspace.js +71 -69
- package/dist/lib/action-presentation.d.ts +3 -3
- package/dist/lib/component-vocabulary.d.ts +2 -2
- package/dist/lib/css-length.d.ts +2 -0
- package/dist/lib/responsive.d.ts +1 -1
- package/dist/lib/theming/index.d.ts +1 -0
- package/dist/lib/theming/recipes.d.ts +2 -2
- package/dist/lib/theming/themes/dense.d.ts +3 -0
- package/dist/lib/theming/themes/editorial.d.ts +3 -0
- package/dist/lib/theming/themes/index.d.ts +8 -0
- package/dist/lib/theming/themes/pair.d.ts +7 -0
- package/dist/lib/theming/themes/sharp.d.ts +3 -0
- package/dist/lib/theming/themes/soft.d.ts +3 -0
- package/dist/lib/theming/themes/types.d.ts +12 -0
- package/dist/lib/ui-provider/index.d.ts +1 -1
- package/dist/lib/ui-provider/scope.d.ts +5 -8
- package/dist/lib/ui-provider/tokens.d.ts +11 -3
- package/dist/lib/ui-provider/tokens.generated.d.ts +6 -4
- package/dist/lib/ui-provider/types.d.ts +17 -19
- package/dist/lib/ui-provider/ui-scope.d.ts +1 -1
- package/dist/{mentions-BbsEHlcH.js → mentions-BOxbigwp.js} +113 -111
- package/dist/navigation-Bgu7Vc0M.js +622 -0
- package/dist/navigation-DiYACqpE.js +216 -0
- package/dist/overlay-BuQOl8aP.js +356 -0
- package/dist/{overlays-DvVoS3td.js → overlays-1sULyytH.js} +77 -75
- package/dist/popover-CA7SP_iz.js +127 -0
- package/dist/popover-menu-QXgQeWeG.js +192 -0
- package/dist/{primitives-D0bdDozz.js → primitives-BskKlf35.js} +181 -178
- package/dist/primitives.js +1 -1
- package/dist/profiles/admin.json +6 -36
- package/dist/profiles/general.json +6 -96
- package/dist/repeaters-CeH20dvr.js +445 -0
- package/dist/rich-text-editor-D_Ppm8yh.js +491 -0
- package/dist/{sheet-CKcmRbJ9.js → sheet-CJ1-OAla.js} +3 -3
- package/dist/sidebar-D8uGqxio.js +421 -0
- package/dist/skeleton-BTKNKTdj.js +173 -0
- package/dist/spinner-Tc1QCnxM.js +30 -0
- package/dist/{structure-D0WGQAP3.js → structure-CynEZ-OY.js} +15 -23
- package/dist/style.css +1 -1
- package/dist/styles/TOKENS.md +116 -275
- package/dist/styles/animation.css +114 -0
- package/dist/styles/base.css +7 -6
- package/dist/styles/fields.css +45 -63
- package/dist/styles/focus.css +12 -0
- package/dist/styles/forced-colors.css +11 -10
- package/dist/styles/index.css +23 -30
- package/dist/styles/map.css +45 -34
- package/dist/styles/mentions.css +14 -52
- package/dist/styles/overlays.css +7 -7
- package/dist/styles/tailwind.css +76 -127
- package/dist/styles/targets.css +3 -3
- package/dist/styles/theme/colour.css +86 -0
- package/dist/styles/theme/density.css +31 -0
- package/dist/styles/theme/elevation.css +9 -0
- package/dist/styles/theme/layout.css +18 -0
- package/dist/styles/theme/motion.css +18 -0
- package/dist/styles/theme/shape.css +12 -0
- package/dist/styles/theme/size.css +10 -0
- package/dist/styles/theme/spacing.css +11 -0
- package/dist/styles/theme/typography.css +20 -0
- package/dist/styles/tone.css +61 -0
- package/dist/table-B7dtIFUx.js +1262 -0
- package/dist/table-Ds_eO9av.js +191 -0
- package/dist/tailwind.css +76 -127
- package/dist/text-inputs-BboE77nZ.js +395 -0
- package/dist/theming-C5ygF5uf.js +292 -0
- package/dist/theming.js +2 -2
- package/dist/{timeline-BdaGRyj-.js → timeline-BR_jNgvz.js} +57 -49
- package/dist/{timelines-BB7550mz.js → timelines-DXG1BfIN.js} +69 -67
- package/dist/{toaster-bBMgXm8z.js → toaster-CXL8L7Mm.js} +106 -99
- package/dist/tokens.json +1027 -636
- package/dist/toolbar-DBK-c4yy.js +74 -0
- package/dist/tooltip-BPYP-jUm.js +76 -0
- package/dist/{typography-BkxEiwQ1.js → typography-DmeR05Er.js} +87 -53
- package/dist/{ui-provider-Cmoq6i_D.js → ui-provider-DpzLUD12.js} +117 -69
- package/dist/ui-provider.js +1 -1
- package/dist/upload-CYuoJykZ.js +968 -0
- package/dist/use-async-preview-BFwf9ElY.js +188 -0
- package/dist/value-inputs-ng8aVJJZ.js +728 -0
- package/docs/README.md +13 -3
- package/docs/build/browser-composition-fixture.ts +28 -0
- package/docs/build/recipes.md +11484 -10723
- package/docs/generated/component-index.json +9809 -9169
- package/docs/generated/components/INDEX.md +5 -5
- package/docs/generated/components/base--accordion.md +51 -2
- package/docs/generated/components/base--action-menu.md +14 -15
- package/docs/generated/components/base--alert-dialog.md +3 -4
- package/docs/generated/components/base--aspect-ratio.md +3 -4
- package/docs/generated/components/base--avatar.md +7 -7
- package/docs/generated/components/base--badge.md +159 -27
- package/docs/generated/components/base--batch-action-bar.md +6 -7
- package/docs/generated/components/base--buttons.md +151 -47
- package/docs/generated/components/base--cards.md +107 -14
- package/docs/generated/components/base--carousel.md +1 -2
- package/docs/generated/components/base--chart.md +44 -8
- package/docs/generated/components/base--choice-inputs.md +10 -11
- package/docs/generated/components/base--combobox.md +3 -4
- package/docs/generated/components/base--command.md +6 -6
- package/docs/generated/components/base--context-menu.md +1 -2
- package/docs/generated/components/base--copyable.md +6 -7
- package/docs/generated/components/base--date-pickers.md +6 -7
- package/docs/generated/components/base--dialog.md +6 -7
- package/docs/generated/components/base--direction.md +1 -1
- package/docs/generated/components/base--display.md +234 -54
- package/docs/generated/components/base--dropdown-menu.md +6 -7
- package/docs/generated/components/base--feedback.md +71 -18
- package/docs/generated/components/base--forms-numeric.md +6 -7
- package/docs/generated/components/base--forms.md +84 -14
- package/docs/generated/components/base--hover-card.md +3 -4
- package/docs/generated/components/base--input-group.md +27 -30
- package/docs/generated/components/base--item.md +8 -9
- package/docs/generated/components/base--label.md +2 -3
- package/docs/generated/components/base--menubar.md +2 -4
- package/docs/generated/components/base--navigation-menu.md +2 -3
- package/docs/generated/components/base--navigation.md +2 -3
- package/docs/generated/components/base--otp-input.md +3 -4
- package/docs/generated/components/base--overlay.md +56 -47
- package/docs/generated/components/base--popover-menu.md +7 -8
- package/docs/generated/components/base--popover.md +9 -10
- package/docs/generated/components/base--qr-code.md +7 -8
- package/docs/generated/components/base--repeaters.md +6 -7
- package/docs/generated/components/base--resizable.md +2 -3
- package/docs/generated/components/base--sheet.md +12 -13
- package/docs/generated/components/base--sidebar.md +9 -11
- package/docs/generated/components/base--skeleton.md +6 -7
- package/docs/generated/components/base--slot.md +1 -1
- package/docs/generated/components/base--spinner.md +5 -7
- package/docs/generated/components/base--structure.md +320 -70
- package/docs/generated/components/base--table.md +61 -3
- package/docs/generated/components/base--text-inputs.md +17 -18
- package/docs/generated/components/base--timeline.md +45 -4
- package/docs/generated/components/base--toaster.md +43 -12
- package/docs/generated/components/base--toggle.md +11 -12
- package/docs/generated/components/base--toolbar.md +7 -8
- package/docs/generated/components/base--tooltip.md +5 -6
- package/docs/generated/components/base--typography.md +317 -32
- package/docs/generated/components/base--upload.md +8 -9
- package/docs/generated/components/base--value-inputs.md +9 -38
- package/docs/generated/components/{admin--patterns--access.md → blocks--admin--access.md} +15 -6
- package/docs/generated/components/{admin--patterns--commerce.md → blocks--admin--commerce.md} +40 -41
- package/docs/generated/components/{patterns--analytics.md → blocks--analytics.md} +57 -14
- package/docs/generated/components/{patterns--onboarding.md → blocks--onboarding.md} +6 -7
- package/docs/generated/components/{patterns--timelines.md → blocks--timelines.md} +6 -7
- package/docs/generated/components/features--actions.md +8 -18
- package/docs/generated/components/features--activities.md +31 -32
- package/docs/generated/components/features--ai-chat.md +15 -15
- package/docs/generated/components/features--async-preview.md +5 -6
- package/docs/generated/components/features--combobox.md +71 -5
- package/docs/generated/components/features--comments.md +0 -1
- package/docs/generated/components/features--data-view.md +63 -8
- package/docs/generated/components/features--event-calendar.md +1 -2
- package/docs/generated/components/features--filters.md +11 -2
- package/docs/generated/components/features--global-search.md +1 -2
- package/docs/generated/components/features--kanban.md +1 -2
- package/docs/generated/components/features--map.md +1 -2
- package/docs/generated/components/features--media-library.md +105 -38
- package/docs/generated/components/features--mentions.md +7 -7
- package/docs/generated/components/features--overlays.md +75 -22
- package/docs/generated/components/features--products.md +10 -11
- package/docs/generated/components/features--resource-assignment.md +2 -3
- package/docs/generated/components/features--resource.md +3 -4
- package/docs/generated/components/features--rich-text-editor.md +42 -13
- package/docs/generated/components/features--schema-form.md +1 -2
- package/docs/generated/components/features--sync.md +2 -3
- package/docs/generated/components/features--table.md +162 -12
- package/docs/generated/components/features--theme-tweaker.md +30 -15
- package/docs/generated/components/forms.md +2 -2
- package/docs/generated/components/layout--app-shell.md +41 -11
- package/docs/generated/components/layout--auth.md +8 -9
- package/docs/generated/components/layout--containers.md +40 -1
- package/docs/generated/components/layout--header.md +2 -3
- package/docs/generated/components/layout--navigation.md +0 -1
- package/docs/generated/components/layout--page.md +33 -5
- package/docs/generated/components/layout--settings.md +0 -1
- package/docs/generated/components/layout--sidebar.md +47 -7
- package/docs/generated/components/layout--workspace.md +3 -4
- package/docs/generated/components/primitives.md +128 -17
- package/docs/generated/components/theming.md +147 -4
- package/docs/generated/components/ui-provider.md +96 -78
- package/docs/generated/composition-ladder.md +8 -8
- package/docs/generated/consumer-contract.json +5736 -0
- package/docs/generated/imports.md +104 -104
- package/docs/generated/migration-broad-imports.json +267 -90
- package/docs/generated/migration-broad-imports.md +266 -101
- package/docs/generated/migration-codemod.json +365 -70
- package/docs/generated/migration.md +665 -95
- package/docs/generated/profiles.md +27 -27
- package/docs/generated/public-api.md +104 -102
- package/docs/generated/recipes.json +755 -810
- package/docs/generated/workflows/communications-overview/analytics/communications-reference.tsx +19 -0
- package/docs/generated/workflows/index.json +691 -0
- package/docs/generated/workflows/media-picking/media-library/media-picking-reference.tsx +63 -0
- package/docs/generated/workflows/media-picking/media-library/reference-data.ts +3 -0
- package/docs/generated/workflows/multi-section-form/form-workflow/multi-section-reference.tsx +46 -0
- package/docs/generated/workflows/nested-action-flow/action-overlays/nested-action-reference.tsx +39 -0
- package/docs/generated/workflows/record-detail/page-layout/record-detail-reference.tsx +24 -0
- package/docs/generated/workflows/resource-index/data-view/resource-index-reference.tsx +51 -0
- package/docs/generated/workflows/scoped-resource-selection/combobox/scoped-resource-reference.tsx +50 -0
- package/docs/generated/workflows/website-content-editor/media-library/reference-data.ts +3 -0
- package/docs/generated/workflows/website-content-editor/rich-text-editor/website-content-reference.tsx +33 -0
- package/docs/generated/workflows/workspace-navigation/app-shell/workspace-navigation-reference.tsx +26 -0
- package/docs/learn/api-compatibility.md +5 -4
- package/docs/learn/blocks.md +123 -0
- package/docs/learn/composition.md +100 -19
- package/docs/learn/forms.md +23 -3
- package/docs/learn/framework-wiring.md +41 -13
- package/docs/learn/i18n.md +4 -2
- package/docs/learn/installation.md +60 -31
- package/docs/learn/migration.md +156 -5
- package/docs/learn/provider-and-scoping.md +37 -25
- package/docs/learn/reference-workflows.md +43 -0
- package/docs/learn/structure-and-spacing.md +147 -0
- package/docs/learn/theming.md +174 -131
- package/docs/learn/troubleshooting.md +88 -30
- package/docs/learn/verification.md +60 -5
- package/package.json +42 -473
- package/scripts/consumer/codemod.mjs +50 -32
- package/scripts/consumer/contract-reader.mjs +42 -0
- package/scripts/consumer/css-scan.mjs +51 -0
- package/scripts/consumer/diagnose.mjs +136 -0
- package/scripts/consumer/find-component.mjs +30 -17
- package/scripts/consumer/install-skill.mjs +93 -11
- package/src/styles/TOKENS.md +116 -275
- package/dist/accordion-6YPJ9XRO.js +0 -135
- package/dist/admin/patterns/access.css +0 -15
- package/dist/admin/patterns/commerce.css +0 -29
- package/dist/admin/patterns/commerce.js +0 -2493
- package/dist/avatar-CS7zow2q.js +0 -85
- package/dist/badge-CxOuTfVr.js +0 -63
- package/dist/base/accordion.css +0 -3
- package/dist/base/action-menu.css +0 -6
- package/dist/base/alert-dialog.css +0 -4
- package/dist/base/aspect-ratio.css +0 -2
- package/dist/base/avatar.css +0 -4
- package/dist/base/badge.css +0 -2
- package/dist/base/batch-action-bar.css +0 -5
- package/dist/base/buttons.css +0 -4
- package/dist/base/cards.css +0 -13
- package/dist/base/carousel.css +0 -5
- package/dist/base/chart.css +0 -2
- package/dist/base/choice-inputs.css +0 -10
- package/dist/base/combobox.css +0 -3
- package/dist/base/command.css +0 -9
- package/dist/base/context-menu.css +0 -2
- package/dist/base/copyable.css +0 -6
- package/dist/base/date-pickers.css +0 -11
- package/dist/base/dialog.css +0 -4
- package/dist/base/display.css +0 -8
- package/dist/base/dropdown-menu.css +0 -2
- package/dist/base/feedback.css +0 -5
- package/dist/base/forms-numeric.css +0 -12
- package/dist/base/forms.css +0 -14
- package/dist/base/hover-card.css +0 -2
- package/dist/base/input-group.css +0 -6
- package/dist/base/item.css +0 -9
- package/dist/base/label.css +0 -3
- package/dist/base/menubar.css +0 -2
- package/dist/base/navigation-menu.css +0 -2
- package/dist/base/navigation.css +0 -12
- package/dist/base/otp-input.css +0 -9
- package/dist/base/overlay.css +0 -4
- package/dist/base/popover-menu.css +0 -11
- package/dist/base/popover.css +0 -3
- package/dist/base/qr-code.css +0 -2
- package/dist/base/repeaters.css +0 -18
- package/dist/base/resizable.css +0 -2
- package/dist/base/sheet.css +0 -4
- package/dist/base/sidebar.css +0 -12
- package/dist/base/skeleton.css +0 -9
- package/dist/base/spinner.css +0 -2
- package/dist/base/structure.css +0 -2
- package/dist/base/table.css +0 -3
- package/dist/base/text-inputs.css +0 -2
- package/dist/base/timeline.css +0 -9
- package/dist/base/toaster.css +0 -2
- package/dist/base/toggle.css +0 -2
- package/dist/base/toolbar.css +0 -5
- package/dist/base/tooltip.css +0 -2
- package/dist/base/typography.css +0 -2
- package/dist/base/upload.css +0 -10
- package/dist/base/value-inputs.css +0 -14
- package/dist/buttons-CqXKWty3.js +0 -179
- package/dist/cards-C6Ulbkw7.js +0 -271
- package/dist/chart-nomhJ87z.js +0 -193
- package/dist/choice-inputs-OUDn0kQw.js +0 -680
- package/dist/combobox-C8oP92bT.js +0 -266
- package/dist/command-Bp3B6pUu.js +0 -143
- package/dist/comments-CAnDlyXO.js +0 -1438
- package/dist/components/admin/patterns/index.d.ts +0 -2
- package/dist/components/features/rich-text-editor/exec-command-engine.d.ts +0 -2
- package/dist/components/patterns/index.d.ts +0 -3
- package/dist/css/styles.css +0 -1
- package/dist/date-pickers-DOwIT-Nk.js +0 -661
- package/dist/display-B3Q17h5z.js +0 -645
- package/dist/dropdown-menu-TyNLCLML.js +0 -223
- package/dist/features/actions.css +0 -11
- package/dist/features/activities.css +0 -25
- package/dist/features/ai-chat.css +0 -14
- package/dist/features/async-preview.css +0 -10
- package/dist/features/combobox.css +0 -12
- package/dist/features/comments.css +0 -24
- package/dist/features/data-view.css +0 -31
- package/dist/features/event-calendar.css +0 -17
- package/dist/features/filters.css +0 -24
- package/dist/features/global-search.css +0 -19
- package/dist/features/kanban.css +0 -7
- package/dist/features/map.css +0 -15
- package/dist/features/media-library.css +0 -27
- package/dist/features/mentions.css +0 -17
- package/dist/features/overlays.css +0 -11
- package/dist/features/products.css +0 -29
- package/dist/features/resource-assignment.css +0 -14
- package/dist/features/resource.css +0 -15
- package/dist/features/rich-text-editor.css +0 -8
- package/dist/features/schema-form.css +0 -22
- package/dist/features/sync.css +0 -11
- package/dist/features/table.css +0 -20
- package/dist/features/theme-tweaker.css +0 -27
- package/dist/feedback-DRerHGuV.js +0 -469
- package/dist/forms-CPrGGif_.js +0 -242
- package/dist/forms-numeric-CPVsL7Vf.js +0 -569
- package/dist/index.css +0 -3
- package/dist/input-group-BYe0rhoB.js +0 -126
- package/dist/item-B3yQ26as.js +0 -146
- package/dist/layout/app-shell.css +0 -13
- package/dist/layout/auth.css +0 -14
- package/dist/layout/containers.css +0 -2
- package/dist/layout/header.css +0 -20
- package/dist/layout/navigation.css +0 -11
- package/dist/layout/page.css +0 -15
- package/dist/layout/settings.css +0 -16
- package/dist/layout/sidebar.css +0 -16
- package/dist/layout/workspace.css +0 -15
- package/dist/navigation-CsqTA16F.js +0 -614
- package/dist/navigation-DzxzPuwg.js +0 -202
- package/dist/overlay-WQOsLd69.js +0 -345
- package/dist/patterns/analytics.css +0 -15
- package/dist/patterns/onboarding.css +0 -11
- package/dist/patterns/timelines.css +0 -11
- package/dist/popover-DriLnIFc.js +0 -123
- package/dist/popover-menu-C2UCMAe7.js +0 -189
- package/dist/primitives.css +0 -3
- package/dist/repeaters-DuP1N0nw.js +0 -438
- package/dist/rich-text-editor-BQXFe9oN.js +0 -595
- package/dist/sidebar-D0N6ckJL.js +0 -412
- package/dist/skeleton-DGR9df28.js +0 -172
- package/dist/spinner-CUAVFecI.js +0 -52
- package/dist/styles/FACTORS.md +0 -36
- package/dist/styles/SCOPES.md +0 -86
- package/dist/styles/themes/default.css +0 -164
- package/dist/styles/theming/animation.css +0 -143
- package/dist/styles/theming/colors.css +0 -97
- package/dist/styles/theming/feedback.css +0 -17
- package/dist/styles/theming/field.css +0 -21
- package/dist/styles/theming/focus.css +0 -88
- package/dist/styles/theming/layers.css +0 -13
- package/dist/styles/theming/layout.css +0 -21
- package/dist/styles/theming/motion.css +0 -42
- package/dist/styles/theming/overlay.css +0 -52
- package/dist/styles/theming/sizing.css +0 -118
- package/dist/styles/theming/text.css +0 -30
- package/dist/styles/theming/typography.css +0 -26
- package/dist/styles/tokens/components.css +0 -22
- package/dist/styles/tokens/foundation.css +0 -80
- package/dist/styles/tokens/layout.css +0 -19
- package/dist/styles/tokens/palette.css +0 -88
- package/dist/styles/tokens/primitives.css +0 -18
- package/dist/styles/tokens/states.css +0 -77
- package/dist/table-BC4qqsUb.js +0 -180
- package/dist/table-BHDpjajL.js +0 -982
- package/dist/text-inputs-DF_lD7pA.js +0 -385
- package/dist/theming-D6KRU7hO.js +0 -104
- package/dist/toolbar-DWRywF0R.js +0 -68
- package/dist/tooltip-t1VQQ2tZ.js +0 -73
- package/dist/upload-B38YZeFJ.js +0 -938
- package/dist/value-inputs-Q4ymjXlV.js +0 -716
- package/src/styles/FACTORS.md +0 -36
- package/src/styles/SCOPES.md +0 -86
- /package/dist/components/{admin/patterns → blocks/admin}/access/admin.strings.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/credential-list.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/index.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/role-permissions.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/sensitive-action.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/account.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/address-lines.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/booking.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/cart.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.strings.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.types.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/format-amount.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/index.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/inventory-section.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/invoice.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/loyalty.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-customer.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-detail.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-line-item.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-transactions.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-listing.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-score.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/summary-panel.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/activity-heatmap.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/analytics.types.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/chart-card.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/format-metric-value.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-bar.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-comparison.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-gradient.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-grid.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-micro-grid.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-skeleton.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-trend-chip.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/time-ruler.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/checklist.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/onboarding.strings.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/changelog-timeline.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/milestones-timeline.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/steps.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/timelines.strings.d.ts +0 -0
- /package/dist/styles/{theming/breakpoints.css → breakpoints.css} +0 -0
package/dist/features/ai-chat.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as a } from "../buttons-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
2
|
+
import "#core.css";
|
|
3
|
+
import { a as e, c as t, i as n, s as r } from "../typography-DmeR05Er.js";
|
|
4
|
+
import { t as i } from "../cx--CBrhWH0.js";
|
|
5
|
+
import { c as a } from "../buttons-BX2JfL5X.js";
|
|
6
|
+
import { t as o } from "../strings-Co9_qArR.js";
|
|
7
|
+
import { B as s, H as c, w as l, x as u } from "../primitives-BskKlf35.js";
|
|
8
|
+
import { t as d } from "../badge-VlJVZjdm.js";
|
|
9
|
+
import { p as f } from "../feedback-D4qVsKlD.js";
|
|
10
|
+
import { u as p } from "../display-a7AoX_u7.js";
|
|
11
|
+
import { c as m } from "../text-inputs-BboE77nZ.js";
|
|
12
|
+
import { n as h } from "../copyable-D9Okb1w6.js";
|
|
13
|
+
import { y as g } from "../upload-CYuoJykZ.js";
|
|
14
|
+
import { AlertCircleIcon as _, ArchiveIcon as v, ArrowDownIcon as y, ArrowUpIcon as b, AudioLinesIcon as x, BotIcon as S, BrainIcon as C, CheckIcon as w, ChevronDownIcon as T, CircleDotIcon as E, CircleIcon as D, CopyIcon as O, DownloadIcon as k, ExternalLinkIcon as A, FileCodeIcon as j, FileTextIcon as M, GlobeIcon as ee, ImageIcon as te, Loader2Icon as N, MinusCircleIcon as ne, PaperclipIcon as re, RotateCcwIcon as ie, ShieldCheckIcon as ae, SparklesIcon as P, SquareIcon as oe, UserIcon as se, VideoIcon as ce, WrenchIcon as le, XCircleIcon as ue, XIcon as F } from "lucide-react";
|
|
15
|
+
import { useCallback as I, useEffect as L, useMemo as de, useRef as R, useState as z } from "react";
|
|
16
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
17
|
+
import "#css/ai-chat.css";
|
|
16
18
|
//#region src/components/features/ai-chat/ai-chat.strings.ts
|
|
17
|
-
var
|
|
19
|
+
var U = {
|
|
18
20
|
copyAria: "Copy message",
|
|
19
21
|
copied: "Copied",
|
|
20
22
|
regenerateAria: "Regenerate response"
|
|
21
|
-
},
|
|
23
|
+
}, fe = {
|
|
22
24
|
thinking: "Thinking…",
|
|
23
25
|
thoughtFor: "Thought for {{duration}}",
|
|
24
26
|
thoughtDone: "Reasoning complete",
|
|
25
27
|
expandAria: "Expand reasoning",
|
|
26
28
|
collapseAria: "Collapse reasoning"
|
|
27
|
-
},
|
|
29
|
+
}, pe = {
|
|
28
30
|
title: "Reasoning",
|
|
29
31
|
streamingHint: "Working through the steps…"
|
|
30
|
-
},
|
|
32
|
+
}, me = {
|
|
31
33
|
pending: "Queued",
|
|
32
34
|
running: "Running",
|
|
33
35
|
success: "Success",
|
|
@@ -37,7 +39,7 @@ var V = {
|
|
|
37
39
|
args: "Arguments",
|
|
38
40
|
result: "Result",
|
|
39
41
|
durationLabel: "Took"
|
|
40
|
-
},
|
|
42
|
+
}, he = {
|
|
41
43
|
statusLabels: {
|
|
42
44
|
queued: "Queued",
|
|
43
45
|
running: "Running",
|
|
@@ -48,37 +50,37 @@ var V = {
|
|
|
48
50
|
},
|
|
49
51
|
collapseSubtasks: "Collapse subtasks",
|
|
50
52
|
expandSubtasks: "Expand subtasks"
|
|
51
|
-
},
|
|
53
|
+
}, ge = { statusLabels: {
|
|
52
54
|
idle: "Idle",
|
|
53
55
|
thinking: "Thinking",
|
|
54
56
|
working: "Working",
|
|
55
57
|
done: "Done",
|
|
56
58
|
error: "Error",
|
|
57
59
|
offline: "Offline"
|
|
58
|
-
} },
|
|
60
|
+
} }, _e = {
|
|
59
61
|
approve: "Approve",
|
|
60
62
|
reject: "Reject",
|
|
61
63
|
pending: "Awaiting your approval",
|
|
62
64
|
approved: "Approved",
|
|
63
65
|
rejected: "Rejected",
|
|
64
66
|
detailsLabel: "Details"
|
|
65
|
-
},
|
|
67
|
+
}, ve = {
|
|
66
68
|
copy: "Copy",
|
|
67
69
|
copied: "Copied",
|
|
68
70
|
copyAria: "Copy code",
|
|
69
71
|
defaultLanguageLabel: "Code"
|
|
70
|
-
},
|
|
72
|
+
}, ye = {
|
|
71
73
|
openAria: "Open artifact",
|
|
72
74
|
copy: "Copy",
|
|
73
75
|
copied: "Copied",
|
|
74
76
|
copyAria: "Copy artifact",
|
|
75
77
|
downloadAria: "Download artifact"
|
|
76
|
-
},
|
|
78
|
+
}, be = {
|
|
77
79
|
title: "{{count}} sources",
|
|
78
80
|
expand: "Show all sources",
|
|
79
81
|
collapse: "Hide sources",
|
|
80
82
|
visit: "Visit source"
|
|
81
|
-
},
|
|
83
|
+
}, xe = {
|
|
82
84
|
removeAria: "Remove attachment",
|
|
83
85
|
openAria: "Open attachment",
|
|
84
86
|
uploadProgressAria: "Upload progress"
|
|
@@ -98,7 +100,7 @@ var V = {
|
|
|
98
100
|
cancelAria: "Remove from the queue",
|
|
99
101
|
queuedLabel: "Queued",
|
|
100
102
|
runningLabel: "Running"
|
|
101
|
-
}, q = { header: "Try" }, J = { pending: "Thinking…" },
|
|
103
|
+
}, q = { header: "Try" }, J = { pending: "Thinking…" }, Se = {
|
|
102
104
|
prompt: W,
|
|
103
105
|
conversation: G,
|
|
104
106
|
queue: K,
|
|
@@ -108,11 +110,9 @@ var V = {
|
|
|
108
110
|
emptyDescription: "Ask a question, share context, or attach a file to get going."
|
|
109
111
|
}, Y = {
|
|
110
112
|
grow: "ai-chat__grow___Y8DWx",
|
|
111
|
-
numeric: "ai-chat__numeric___DJfdz",
|
|
112
113
|
preWrap: "ai-chat__preWrap___IOxPO",
|
|
113
114
|
copiedIcon: "ai-chat__copiedIcon____4uce",
|
|
114
115
|
shimmer: "ai-chat__shimmer___98Nfp",
|
|
115
|
-
shimmerSweep: "ai-chat__shimmer-sweep___whyHC",
|
|
116
116
|
turn: "ai-chat__turn___pu7B6",
|
|
117
117
|
avatar: "ai-chat__avatar___uJgyI",
|
|
118
118
|
turnBody: "ai-chat__turnBody___4sCxS",
|
|
@@ -147,8 +147,8 @@ var V = {
|
|
|
147
147
|
toolDetail: "ai-chat__toolDetail____Km_8",
|
|
148
148
|
pre: "ai-chat__pre___LT2fm",
|
|
149
149
|
taskRow: "ai-chat__taskRow___oC6YU",
|
|
150
|
-
taskToggle: "ai-chat__taskToggle___nqH5E",
|
|
151
150
|
taskToggleSpacer: "ai-chat__taskToggleSpacer___odHEt",
|
|
151
|
+
taskToggle: "ai-chat__taskToggle___nqH5E",
|
|
152
152
|
taskIcon: "ai-chat__taskIcon___bNu7w",
|
|
153
153
|
taskTitleRow: "ai-chat__taskTitleRow___V70b4",
|
|
154
154
|
taskTitle: "ai-chat__taskTitle___JccHi",
|
|
@@ -227,206 +227,217 @@ var V = {
|
|
|
227
227
|
composerBarEnd: "ai-chat__composerBarEnd___4qddD",
|
|
228
228
|
stopGlyph: "ai-chat__stopGlyph___vCnz2",
|
|
229
229
|
composerHint: "ai-chat__composerHint___55m4n"
|
|
230
|
-
},
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
}, Ce = 1500, we = t({
|
|
231
|
+
size: "xs",
|
|
232
|
+
lineHeight: "relaxed",
|
|
233
|
+
mono: !0
|
|
234
|
+
});
|
|
235
|
+
function Te({ code: e, language: t, filename: n, showLineNumbers: o = !1, highlightLines: c, hideHeader: l = !1, maxHeight: u, headerActions: d, onCopy: f, className: p, strings: m }) {
|
|
236
|
+
let g = {
|
|
237
|
+
...ve,
|
|
234
238
|
...m
|
|
235
|
-
}, { copied:
|
|
236
|
-
confirmMs:
|
|
239
|
+
}, { copied: _, copy: v } = h({
|
|
240
|
+
confirmMs: Ce,
|
|
237
241
|
onCopy: f
|
|
238
|
-
}),
|
|
239
|
-
return /* @__PURE__ */
|
|
240
|
-
className:
|
|
241
|
-
children: [!l && /* @__PURE__ */
|
|
242
|
+
}), y = de(() => e.split("\n"), [e]), b = de(() => new Set(c ?? []), [c]);
|
|
243
|
+
return /* @__PURE__ */ H("div", {
|
|
244
|
+
className: i("ai-code-block--component", Y.code, p),
|
|
245
|
+
children: [!l && /* @__PURE__ */ H("div", {
|
|
242
246
|
className: Y.codeHeader,
|
|
243
247
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
248
|
+
n ? /* @__PURE__ */ V(s, {
|
|
245
249
|
size: "xs",
|
|
246
|
-
|
|
250
|
+
truncate: !0,
|
|
247
251
|
className: Y.codeLabel,
|
|
248
|
-
children:
|
|
252
|
+
children: n
|
|
253
|
+
}) : /* @__PURE__ */ V(r, {
|
|
254
|
+
tag: "span",
|
|
255
|
+
size: "xs",
|
|
256
|
+
caps: !0,
|
|
257
|
+
truncate: !0,
|
|
258
|
+
className: Y.codeLabel,
|
|
259
|
+
children: t || g.defaultLanguageLabel
|
|
249
260
|
}),
|
|
250
|
-
!!
|
|
261
|
+
!!n && !!t && /* @__PURE__ */ V(s, {
|
|
251
262
|
size: "xs",
|
|
252
263
|
type: "secondary",
|
|
253
264
|
className: Y.codeLanguage,
|
|
254
|
-
children:
|
|
265
|
+
children: t
|
|
255
266
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ H("div", {
|
|
257
268
|
className: Y.codeActions,
|
|
258
|
-
children: [d, /* @__PURE__ */
|
|
269
|
+
children: [d, /* @__PURE__ */ V(a, {
|
|
259
270
|
type: "button",
|
|
260
271
|
tone: "neutral",
|
|
261
|
-
|
|
272
|
+
appearance: "ghost",
|
|
262
273
|
iconOnly: !0,
|
|
263
|
-
"aria-label":
|
|
264
|
-
onClick: () => void
|
|
265
|
-
children:
|
|
274
|
+
"aria-label": g.copyAria,
|
|
275
|
+
onClick: () => void v(e),
|
|
276
|
+
children: _ ? /* @__PURE__ */ V(w, { className: Y.copiedIcon }) : /* @__PURE__ */ V(O, {})
|
|
266
277
|
})]
|
|
267
278
|
})
|
|
268
279
|
]
|
|
269
|
-
}), /* @__PURE__ */
|
|
280
|
+
}), /* @__PURE__ */ V("div", {
|
|
270
281
|
tabIndex: 0,
|
|
271
282
|
style: u === void 0 ? void 0 : { maxHeight: typeof u == "number" ? `${u}px` : u },
|
|
272
283
|
className: Y.codeScroll,
|
|
273
|
-
children:
|
|
274
|
-
className: Y.codeNumbered,
|
|
275
|
-
children:
|
|
284
|
+
children: o ? /* @__PURE__ */ V("pre", {
|
|
285
|
+
className: i(Y.codeNumbered, we),
|
|
286
|
+
children: y.map((e, t) => {
|
|
276
287
|
let n = t + 1;
|
|
277
|
-
return /* @__PURE__ */
|
|
278
|
-
"data-highlight":
|
|
279
|
-
children: [/* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ H("span", {
|
|
289
|
+
"data-highlight": b.has(n) || void 0,
|
|
290
|
+
children: [/* @__PURE__ */ V("span", {
|
|
280
291
|
"aria-hidden": !0,
|
|
281
292
|
className: Y.codeGutter,
|
|
282
293
|
children: n
|
|
283
|
-
}), /* @__PURE__ */
|
|
294
|
+
}), /* @__PURE__ */ V("span", {
|
|
284
295
|
className: Y.codeLine,
|
|
285
296
|
children: e || " "
|
|
286
297
|
})]
|
|
287
298
|
}, t);
|
|
288
299
|
})
|
|
289
|
-
}) : /* @__PURE__ */
|
|
290
|
-
className: Y.codePlain,
|
|
291
|
-
children: /* @__PURE__ */
|
|
300
|
+
}) : /* @__PURE__ */ V("pre", {
|
|
301
|
+
className: i(Y.codePlain, we),
|
|
302
|
+
children: /* @__PURE__ */ V("code", { children: e })
|
|
292
303
|
})
|
|
293
304
|
})]
|
|
294
305
|
});
|
|
295
306
|
}
|
|
296
|
-
function
|
|
307
|
+
function Ee({ title: e, subtitle: t, icon: n = M, copyText: o, children: s, collapsed: c = !1, onOpen: l, actions: u, onDownload: d, className: f, strings: m }) {
|
|
297
308
|
let g = {
|
|
298
|
-
...
|
|
299
|
-
...
|
|
300
|
-
}, { copied: _, copy: v } =
|
|
301
|
-
return /* @__PURE__ */
|
|
302
|
-
className:
|
|
303
|
-
children: [/* @__PURE__ */
|
|
309
|
+
...ye,
|
|
310
|
+
...m
|
|
311
|
+
}, { copied: _, copy: v } = h({ confirmMs: Ce });
|
|
312
|
+
return /* @__PURE__ */ H("div", {
|
|
313
|
+
className: i("ai-artifact--component", Y.artifact, f),
|
|
314
|
+
children: [/* @__PURE__ */ H("div", {
|
|
304
315
|
className: Y.artifactHeader,
|
|
305
316
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
icon:
|
|
317
|
+
/* @__PURE__ */ V(p, {
|
|
318
|
+
icon: n,
|
|
308
319
|
tone: "neutral",
|
|
309
320
|
shape: "rounded"
|
|
310
321
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ H("div", {
|
|
312
323
|
className: Y.artifactText,
|
|
313
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ V(r, {
|
|
314
325
|
weight: "semibold",
|
|
315
326
|
truncate: !0,
|
|
316
|
-
children:
|
|
317
|
-
}), !!
|
|
327
|
+
children: e
|
|
328
|
+
}), !!t && /* @__PURE__ */ V(r, {
|
|
318
329
|
size: "xs",
|
|
319
330
|
type: "secondary",
|
|
320
331
|
truncate: !0,
|
|
321
|
-
children:
|
|
332
|
+
children: t
|
|
322
333
|
})]
|
|
323
334
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ H("div", {
|
|
325
336
|
className: Y.artifactActions,
|
|
326
337
|
children: [
|
|
327
|
-
|
|
338
|
+
u?.map((e) => {
|
|
328
339
|
let t = e.icon;
|
|
329
|
-
return /* @__PURE__ */
|
|
340
|
+
return /* @__PURE__ */ H(a, {
|
|
330
341
|
type: "button",
|
|
331
342
|
tone: "neutral",
|
|
332
|
-
|
|
343
|
+
appearance: "ghost",
|
|
333
344
|
onClick: e.onSelect,
|
|
334
|
-
children: [!!t && /* @__PURE__ */
|
|
345
|
+
children: [!!t && /* @__PURE__ */ V(t, {}), e.label]
|
|
335
346
|
}, e.id);
|
|
336
347
|
}),
|
|
337
|
-
!!
|
|
348
|
+
!!o && /* @__PURE__ */ V(a, {
|
|
338
349
|
type: "button",
|
|
339
350
|
tone: "neutral",
|
|
340
|
-
|
|
351
|
+
appearance: "ghost",
|
|
341
352
|
iconOnly: !0,
|
|
342
353
|
"aria-label": g.copyAria,
|
|
343
|
-
onClick: () => void v(
|
|
344
|
-
children: _ ? /* @__PURE__ */
|
|
354
|
+
onClick: () => void v(o),
|
|
355
|
+
children: _ ? /* @__PURE__ */ V(w, { className: Y.copiedIcon }) : /* @__PURE__ */ V(O, {})
|
|
345
356
|
}),
|
|
346
|
-
!!
|
|
357
|
+
!!d && /* @__PURE__ */ V(a, {
|
|
347
358
|
type: "button",
|
|
348
359
|
tone: "neutral",
|
|
349
|
-
|
|
360
|
+
appearance: "ghost",
|
|
350
361
|
iconOnly: !0,
|
|
351
362
|
"aria-label": g.downloadAria,
|
|
352
|
-
onClick:
|
|
353
|
-
children: /* @__PURE__ */
|
|
363
|
+
onClick: d,
|
|
364
|
+
children: /* @__PURE__ */ V(k, {})
|
|
354
365
|
}),
|
|
355
|
-
!!
|
|
366
|
+
!!l && /* @__PURE__ */ V(a, {
|
|
356
367
|
type: "button",
|
|
357
368
|
tone: "neutral",
|
|
358
|
-
|
|
369
|
+
appearance: "ghost",
|
|
359
370
|
iconOnly: !0,
|
|
360
371
|
"aria-label": g.openAria,
|
|
361
|
-
onClick:
|
|
362
|
-
children: /* @__PURE__ */
|
|
372
|
+
onClick: l,
|
|
373
|
+
children: /* @__PURE__ */ V(A, {})
|
|
363
374
|
})
|
|
364
375
|
]
|
|
365
376
|
})
|
|
366
377
|
]
|
|
367
|
-
}), !
|
|
378
|
+
}), !c && !!s && /* @__PURE__ */ V("div", {
|
|
368
379
|
className: Y.artifactBody,
|
|
369
|
-
children:
|
|
380
|
+
children: s
|
|
370
381
|
})]
|
|
371
382
|
});
|
|
372
383
|
}
|
|
373
|
-
function
|
|
374
|
-
let t = /* @__PURE__ */
|
|
384
|
+
function De({ src: e }) {
|
|
385
|
+
let t = /* @__PURE__ */ V(ee, {
|
|
375
386
|
"aria-hidden": !0,
|
|
376
387
|
className: Y.sourceGlobe
|
|
377
388
|
});
|
|
378
|
-
return e ? /* @__PURE__ */
|
|
389
|
+
return e ? /* @__PURE__ */ V(g, {
|
|
379
390
|
src: e,
|
|
380
391
|
fallback: t,
|
|
381
392
|
className: Y.sourceImage
|
|
382
393
|
}) : t;
|
|
383
394
|
}
|
|
384
|
-
function
|
|
385
|
-
return /* @__PURE__ */
|
|
395
|
+
function Oe({ sources: e, onSelect: t }) {
|
|
396
|
+
return /* @__PURE__ */ V("span", {
|
|
386
397
|
"aria-hidden": !0,
|
|
387
398
|
className: Y.sourceStack,
|
|
388
399
|
children: e.map((e, n) => {
|
|
389
|
-
let r = /* @__PURE__ */
|
|
400
|
+
let r = /* @__PURE__ */ V("span", {
|
|
390
401
|
title: typeof e.title == "string" ? e.title : void 0,
|
|
391
402
|
className: Y.sourceFace,
|
|
392
|
-
children: /* @__PURE__ */
|
|
403
|
+
children: /* @__PURE__ */ V(De, { src: e.faviconUrl })
|
|
393
404
|
});
|
|
394
|
-
return t ? /* @__PURE__ */
|
|
405
|
+
return t ? /* @__PURE__ */ V("button", {
|
|
395
406
|
type: "button",
|
|
396
407
|
onClick: () => t(e, n),
|
|
397
408
|
className: Y.sourceFaceButton,
|
|
398
409
|
children: r
|
|
399
|
-
}, e.id) : /* @__PURE__ */
|
|
410
|
+
}, e.id) : /* @__PURE__ */ V("span", { children: r }, e.id);
|
|
400
411
|
})
|
|
401
412
|
});
|
|
402
413
|
}
|
|
403
|
-
function
|
|
404
|
-
let o = /* @__PURE__ */ B
|
|
414
|
+
function ke({ source: e, index: t, onSelect: i, visitLabel: a }) {
|
|
415
|
+
let o = /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(l, {
|
|
405
416
|
value: t,
|
|
406
417
|
size: "xs",
|
|
407
418
|
weight: "semibold",
|
|
408
419
|
type: "secondary",
|
|
409
420
|
className: Y.sourceIndex
|
|
410
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ H("span", {
|
|
411
422
|
className: Y.sourceText,
|
|
412
423
|
children: [
|
|
413
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ H(r, {
|
|
414
425
|
tag: "span",
|
|
415
426
|
weight: "medium",
|
|
416
427
|
truncate: !0,
|
|
417
|
-
children: [e.title, !!e.url && /* @__PURE__ */
|
|
428
|
+
children: [e.title, !!e.url && /* @__PURE__ */ V(A, {
|
|
418
429
|
"aria-hidden": !0,
|
|
419
430
|
className: Y.sourceExternal
|
|
420
431
|
})]
|
|
421
432
|
}),
|
|
422
|
-
!!e.publisher && /* @__PURE__ */
|
|
433
|
+
!!e.publisher && /* @__PURE__ */ V(r, {
|
|
423
434
|
tag: "span",
|
|
424
435
|
size: "xs",
|
|
425
436
|
type: "secondary",
|
|
426
437
|
truncate: !0,
|
|
427
438
|
children: e.publisher
|
|
428
439
|
}),
|
|
429
|
-
!!e.snippet && /* @__PURE__ */
|
|
440
|
+
!!e.snippet && /* @__PURE__ */ V(r, {
|
|
430
441
|
tag: "span",
|
|
431
442
|
size: "xs",
|
|
432
443
|
type: "secondary",
|
|
@@ -435,49 +446,51 @@ function De({ source: e, index: t, onSelect: i, visitLabel: a }) {
|
|
|
435
446
|
})
|
|
436
447
|
]
|
|
437
448
|
})] });
|
|
438
|
-
return /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ V("li", { children: i ? /* @__PURE__ */ V("button", {
|
|
439
450
|
type: "button",
|
|
440
451
|
onClick: i,
|
|
441
452
|
className: Y.sourceRow,
|
|
442
453
|
children: o
|
|
443
|
-
}) : e.url ? /* @__PURE__ */
|
|
454
|
+
}) : e.url ? /* @__PURE__ */ V(n, {
|
|
444
455
|
href: e.url,
|
|
445
456
|
target: "_blank",
|
|
446
457
|
rel: "noopener noreferrer",
|
|
447
458
|
"aria-label": a,
|
|
448
459
|
className: Y.sourceRow,
|
|
449
460
|
children: o
|
|
450
|
-
}) : /* @__PURE__ */
|
|
461
|
+
}) : /* @__PURE__ */ V("div", {
|
|
451
462
|
className: Y.sourceRow,
|
|
452
463
|
children: o
|
|
453
464
|
}) });
|
|
454
465
|
}
|
|
455
|
-
function
|
|
456
|
-
let
|
|
457
|
-
...
|
|
458
|
-
...
|
|
459
|
-
}, [
|
|
460
|
-
a === void 0 &&
|
|
461
|
-
},
|
|
462
|
-
if (
|
|
463
|
-
let
|
|
464
|
-
return /* @__PURE__ */
|
|
465
|
-
className:
|
|
466
|
+
function Ae({ sources: e, variant: t = "list", maxAvatars: n = 5, expanded: a, defaultExpanded: o = !1, onExpandedChange: s, onSelect: c, className: u, strings: d }) {
|
|
467
|
+
let f = {
|
|
468
|
+
...be,
|
|
469
|
+
...d
|
|
470
|
+
}, [p, m] = z(o), h = a ?? p, g = (e) => {
|
|
471
|
+
a === void 0 && m(e), s?.(e);
|
|
472
|
+
}, _ = f.title.replace(/\{\{\s*count\s*\}\}/g, String(e.length));
|
|
473
|
+
if (t === "avatars") {
|
|
474
|
+
let t = e.slice(0, n), a = e.length - t.length;
|
|
475
|
+
return /* @__PURE__ */ H("div", {
|
|
476
|
+
className: i("ai-sources--component", Y.sourceStrip, u),
|
|
466
477
|
children: [
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
-
sources:
|
|
478
|
+
/* @__PURE__ */ V(Oe, {
|
|
479
|
+
sources: t,
|
|
469
480
|
onSelect: c
|
|
470
481
|
}),
|
|
471
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ V(r, {
|
|
472
483
|
tag: "span",
|
|
473
484
|
size: "xs",
|
|
474
485
|
type: "secondary",
|
|
475
|
-
children:
|
|
486
|
+
children: _
|
|
476
487
|
}),
|
|
477
|
-
a > 0 && /* @__PURE__ */
|
|
488
|
+
a > 0 && /* @__PURE__ */ H(r, {
|
|
489
|
+
tag: "span",
|
|
478
490
|
size: "xs",
|
|
479
|
-
|
|
480
|
-
|
|
491
|
+
type: "secondary",
|
|
492
|
+
numeric: !0,
|
|
493
|
+
children: ["+", /* @__PURE__ */ V(l, {
|
|
481
494
|
value: a,
|
|
482
495
|
size: "xs",
|
|
483
496
|
type: "secondary"
|
|
@@ -486,208 +499,215 @@ function Oe({ sources: t, variant: r = "list", maxAvatars: i = 5, expanded: a, d
|
|
|
486
499
|
]
|
|
487
500
|
});
|
|
488
501
|
}
|
|
489
|
-
return /* @__PURE__ */
|
|
490
|
-
className:
|
|
491
|
-
children: [/* @__PURE__ */
|
|
502
|
+
return /* @__PURE__ */ H("div", {
|
|
503
|
+
className: i("ai-sources--component", Y.sources, u),
|
|
504
|
+
children: [/* @__PURE__ */ H("button", {
|
|
492
505
|
type: "button",
|
|
493
|
-
"aria-expanded":
|
|
494
|
-
"aria-label":
|
|
495
|
-
onClick: () =>
|
|
506
|
+
"aria-expanded": h,
|
|
507
|
+
"aria-label": h ? f.collapse : f.expand,
|
|
508
|
+
onClick: () => g(!h),
|
|
496
509
|
className: Y.disclosureTrigger,
|
|
497
510
|
children: [
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ V(Oe, { sources: e.slice(0, 4) }),
|
|
512
|
+
/* @__PURE__ */ V(r, {
|
|
500
513
|
tag: "span",
|
|
501
514
|
weight: "medium",
|
|
502
515
|
className: Y.grow,
|
|
503
|
-
children:
|
|
516
|
+
children: _
|
|
504
517
|
}),
|
|
505
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ V(T, {
|
|
506
519
|
"aria-hidden": !0,
|
|
507
|
-
"data-expanded":
|
|
520
|
+
"data-expanded": h || void 0,
|
|
508
521
|
className: Y.disclosureChevron
|
|
509
522
|
})
|
|
510
523
|
]
|
|
511
|
-
}),
|
|
524
|
+
}), h && /* @__PURE__ */ V("ol", {
|
|
512
525
|
className: Y.sourceList,
|
|
513
|
-
children:
|
|
526
|
+
children: e.map((e, t) => /* @__PURE__ */ V(ke, {
|
|
514
527
|
source: e,
|
|
515
528
|
index: t + 1,
|
|
516
|
-
visitLabel:
|
|
529
|
+
visitLabel: f.visit,
|
|
517
530
|
onSelect: c ? () => c(e, t) : void 0
|
|
518
531
|
}, e.id))
|
|
519
532
|
})]
|
|
520
533
|
});
|
|
521
534
|
}
|
|
522
|
-
var
|
|
535
|
+
var je = {
|
|
523
536
|
image: te,
|
|
524
|
-
document:
|
|
525
|
-
audio:
|
|
526
|
-
video:
|
|
527
|
-
code:
|
|
528
|
-
archive:
|
|
529
|
-
generic:
|
|
537
|
+
document: M,
|
|
538
|
+
audio: x,
|
|
539
|
+
video: ce,
|
|
540
|
+
code: j,
|
|
541
|
+
archive: v,
|
|
542
|
+
generic: M
|
|
530
543
|
};
|
|
531
|
-
function
|
|
532
|
-
let
|
|
533
|
-
...
|
|
534
|
-
...
|
|
535
|
-
},
|
|
544
|
+
function Me({ name: e, meta: t, kind: n = "generic", icon: o, thumbnailUrl: s, progress: c, errored: l = !1, onOpen: u, onRemove: d, className: f, strings: p }) {
|
|
545
|
+
let m = {
|
|
546
|
+
...xe,
|
|
547
|
+
...p
|
|
548
|
+
}, h = o ?? je[n], g = !l && typeof c == "number" && c >= 0 && c < 1, v = Math.round((c ?? 0) * 100), y = /* @__PURE__ */ H(B, { children: [s ? /* @__PURE__ */ V("span", {
|
|
536
549
|
"aria-hidden": !0,
|
|
537
550
|
style: { backgroundImage: `url(${s})` },
|
|
538
551
|
className: Y.attachmentThumb
|
|
539
|
-
}) : /* @__PURE__ */
|
|
552
|
+
}) : /* @__PURE__ */ V("span", {
|
|
540
553
|
"aria-hidden": !0,
|
|
541
|
-
"data-errored":
|
|
554
|
+
"data-errored": l || void 0,
|
|
542
555
|
className: Y.attachmentIcon,
|
|
543
|
-
children:
|
|
544
|
-
}), /* @__PURE__ */
|
|
556
|
+
children: V(l ? _ : h, {})
|
|
557
|
+
}), /* @__PURE__ */ H("span", {
|
|
545
558
|
className: Y.attachmentText,
|
|
546
559
|
children: [
|
|
547
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ V(r, {
|
|
548
561
|
tag: "span",
|
|
549
562
|
weight: "medium",
|
|
550
563
|
truncate: !0,
|
|
551
|
-
children:
|
|
564
|
+
children: e
|
|
552
565
|
}),
|
|
553
|
-
!!
|
|
566
|
+
!!t && /* @__PURE__ */ V(r, {
|
|
567
|
+
tag: "span",
|
|
554
568
|
size: "xs",
|
|
569
|
+
type: "secondary",
|
|
570
|
+
numeric: !0,
|
|
555
571
|
truncate: !0,
|
|
556
|
-
|
|
557
|
-
children: r
|
|
572
|
+
children: t
|
|
558
573
|
}),
|
|
559
|
-
|
|
574
|
+
g && /* @__PURE__ */ V("span", {
|
|
560
575
|
role: "progressbar",
|
|
561
|
-
"aria-label":
|
|
576
|
+
"aria-label": m.uploadProgressAria,
|
|
562
577
|
"aria-valuemin": 0,
|
|
563
578
|
"aria-valuemax": 100,
|
|
564
|
-
"aria-valuenow":
|
|
579
|
+
"aria-valuenow": v,
|
|
565
580
|
className: Y.attachmentTrack,
|
|
566
|
-
children: /* @__PURE__ */
|
|
567
|
-
style: { "--
|
|
581
|
+
children: /* @__PURE__ */ V("span", {
|
|
582
|
+
style: { "--_ai-progress": `${v}%` },
|
|
568
583
|
className: Y.attachmentBar
|
|
569
584
|
})
|
|
570
585
|
})
|
|
571
586
|
]
|
|
572
587
|
})] });
|
|
573
|
-
return /* @__PURE__ */
|
|
574
|
-
"data-errored":
|
|
575
|
-
className:
|
|
576
|
-
children: [
|
|
588
|
+
return /* @__PURE__ */ H("div", {
|
|
589
|
+
"data-errored": l || void 0,
|
|
590
|
+
className: i("ai-attachment--component", Y.attachment, f),
|
|
591
|
+
children: [u ? /* @__PURE__ */ V("button", {
|
|
577
592
|
type: "button",
|
|
578
|
-
"aria-label":
|
|
579
|
-
onClick:
|
|
593
|
+
"aria-label": m.openAria,
|
|
594
|
+
onClick: u,
|
|
580
595
|
className: Y.attachmentOpen,
|
|
581
|
-
children:
|
|
582
|
-
}) : /* @__PURE__ */
|
|
596
|
+
children: y
|
|
597
|
+
}) : /* @__PURE__ */ V("span", {
|
|
583
598
|
className: Y.attachmentOpen,
|
|
584
|
-
children:
|
|
585
|
-
}), !!
|
|
599
|
+
children: y
|
|
600
|
+
}), !!d && /* @__PURE__ */ V(a, {
|
|
586
601
|
type: "button",
|
|
587
602
|
tone: "neutral",
|
|
588
|
-
|
|
603
|
+
appearance: "ghost",
|
|
589
604
|
iconOnly: !0,
|
|
590
|
-
"aria-label":
|
|
591
|
-
onClick:
|
|
605
|
+
"aria-label": m.removeAria,
|
|
606
|
+
onClick: d,
|
|
592
607
|
className: Y.dismiss,
|
|
593
|
-
children: /* @__PURE__ */
|
|
608
|
+
children: /* @__PURE__ */ V(F, {})
|
|
594
609
|
})]
|
|
595
610
|
});
|
|
596
611
|
}
|
|
597
612
|
//#endregion
|
|
598
613
|
//#region src/components/features/ai-chat/ai-message-surfaces.tsx
|
|
599
|
-
var
|
|
600
|
-
function X({ children:
|
|
601
|
-
if (
|
|
614
|
+
var Ne = 1500;
|
|
615
|
+
function X({ children: e = "Thinking…", paused: t = !1, duration: n, size: a, className: o }) {
|
|
616
|
+
if (t) return /* @__PURE__ */ V(r, {
|
|
602
617
|
tag: "span",
|
|
618
|
+
size: a,
|
|
603
619
|
type: "secondary",
|
|
604
620
|
weight: "medium",
|
|
605
|
-
className:
|
|
606
|
-
children:
|
|
621
|
+
className: o,
|
|
622
|
+
children: e
|
|
607
623
|
});
|
|
608
|
-
let
|
|
609
|
-
return /* @__PURE__ */
|
|
624
|
+
let s = n === void 0 ? {} : { "--_ai-shimmer-duration": `${n}s` };
|
|
625
|
+
return /* @__PURE__ */ V(r, {
|
|
610
626
|
tag: "span",
|
|
627
|
+
size: a,
|
|
611
628
|
type: "inherit",
|
|
612
629
|
weight: "medium",
|
|
613
630
|
role: "status",
|
|
614
631
|
"aria-live": "polite",
|
|
615
|
-
style:
|
|
616
|
-
className:
|
|
617
|
-
children:
|
|
632
|
+
style: s,
|
|
633
|
+
className: i("ai-shimmer--component", Y.shimmer, o),
|
|
634
|
+
children: e
|
|
618
635
|
});
|
|
619
636
|
}
|
|
620
|
-
var
|
|
621
|
-
assistant:
|
|
622
|
-
user:
|
|
623
|
-
system:
|
|
637
|
+
var Pe = {
|
|
638
|
+
assistant: S,
|
|
639
|
+
user: se,
|
|
640
|
+
system: S
|
|
624
641
|
};
|
|
625
|
-
function
|
|
626
|
-
let
|
|
627
|
-
...
|
|
628
|
-
...
|
|
629
|
-
}, { copied:
|
|
630
|
-
confirmMs:
|
|
631
|
-
onCopy:
|
|
632
|
-
}),
|
|
633
|
-
return /* @__PURE__ */
|
|
634
|
-
"data-role":
|
|
635
|
-
className:
|
|
636
|
-
children: [
|
|
637
|
-
"aria-label":
|
|
638
|
-
"data-role":
|
|
642
|
+
function Fe({ role: e = "assistant", avatar: t, avatarLabel: n, authorName: o, timestamp: s, children: c, plainText: l, loading: u = !1, onCopy: d, onRegenerate: f, className: p, strings: m }) {
|
|
643
|
+
let g = {
|
|
644
|
+
...U,
|
|
645
|
+
...m
|
|
646
|
+
}, { copied: _, copy: v } = h({
|
|
647
|
+
confirmMs: Ne,
|
|
648
|
+
onCopy: d
|
|
649
|
+
}), y = Pe[e], b = l ?? (typeof c == "string" ? c : ""), x = d !== void 0 || !!b, S = e === "assistant" && (x || !!f);
|
|
650
|
+
return /* @__PURE__ */ H("div", {
|
|
651
|
+
"data-role": e,
|
|
652
|
+
className: i("ai-message-bubble--component", Y.turn, p),
|
|
653
|
+
children: [t ?? /* @__PURE__ */ V("span", {
|
|
654
|
+
"aria-label": n,
|
|
655
|
+
"data-role": e,
|
|
656
|
+
"data-tone": e === "assistant" ? "primary" : void 0,
|
|
639
657
|
className: Y.avatar,
|
|
640
|
-
children: /* @__PURE__ */
|
|
641
|
-
}), /* @__PURE__ */
|
|
658
|
+
children: /* @__PURE__ */ V(y, { "aria-hidden": !0 })
|
|
659
|
+
}), /* @__PURE__ */ H("div", {
|
|
642
660
|
className: Y.turnBody,
|
|
643
661
|
children: [
|
|
644
|
-
(!!
|
|
662
|
+
(!!o || !!s) && /* @__PURE__ */ H("div", {
|
|
645
663
|
className: Y.turnMeta,
|
|
646
|
-
children: [!!
|
|
664
|
+
children: [!!o && /* @__PURE__ */ V(r, {
|
|
647
665
|
tag: "span",
|
|
648
666
|
weight: "medium",
|
|
649
|
-
children:
|
|
650
|
-
}), !!
|
|
667
|
+
children: o
|
|
668
|
+
}), !!s && /* @__PURE__ */ V(r, {
|
|
669
|
+
tag: "span",
|
|
651
670
|
size: "xs",
|
|
652
|
-
|
|
653
|
-
|
|
671
|
+
type: "secondary",
|
|
672
|
+
numeric: !0,
|
|
673
|
+
children: s
|
|
654
674
|
})]
|
|
655
675
|
}),
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
"data-role":
|
|
658
|
-
"data-loading":
|
|
676
|
+
/* @__PURE__ */ V("div", {
|
|
677
|
+
"data-role": e,
|
|
678
|
+
"data-loading": u || void 0,
|
|
659
679
|
className: Y.bubble,
|
|
660
|
-
children: typeof
|
|
680
|
+
children: typeof c == "string" || typeof c == "number" ? /* @__PURE__ */ V(r, {
|
|
661
681
|
type: "inherit",
|
|
662
682
|
lineHeight: "relaxed",
|
|
663
|
-
children:
|
|
664
|
-
}) :
|
|
683
|
+
children: c
|
|
684
|
+
}) : c
|
|
665
685
|
}),
|
|
666
|
-
|
|
686
|
+
S && /* @__PURE__ */ H("div", {
|
|
667
687
|
className: Y.turnActions,
|
|
668
688
|
children: [
|
|
669
|
-
|
|
689
|
+
x && /* @__PURE__ */ V(a, {
|
|
670
690
|
type: "button",
|
|
671
691
|
tone: "neutral",
|
|
672
|
-
|
|
692
|
+
appearance: "ghost",
|
|
673
693
|
iconOnly: !0,
|
|
674
|
-
"aria-label":
|
|
675
|
-
onClick: () => void
|
|
676
|
-
children: /* @__PURE__ */
|
|
694
|
+
"aria-label": g.copyAria,
|
|
695
|
+
onClick: () => void v(b),
|
|
696
|
+
children: /* @__PURE__ */ V(O, {})
|
|
677
697
|
}),
|
|
678
|
-
|
|
698
|
+
_ && /* @__PURE__ */ V(r, {
|
|
679
699
|
size: "xs",
|
|
680
700
|
type: "success",
|
|
681
|
-
children:
|
|
701
|
+
children: g.copied
|
|
682
702
|
}),
|
|
683
|
-
!!
|
|
703
|
+
!!f && /* @__PURE__ */ V(a, {
|
|
684
704
|
type: "button",
|
|
685
705
|
tone: "neutral",
|
|
686
|
-
|
|
706
|
+
appearance: "ghost",
|
|
687
707
|
iconOnly: !0,
|
|
688
|
-
"aria-label":
|
|
689
|
-
onClick:
|
|
690
|
-
children: /* @__PURE__ */
|
|
708
|
+
"aria-label": g.regenerateAria,
|
|
709
|
+
onClick: f,
|
|
710
|
+
children: /* @__PURE__ */ V(ie, {})
|
|
691
711
|
})
|
|
692
712
|
]
|
|
693
713
|
})
|
|
@@ -695,113 +715,114 @@ function Ne({ role: t = "assistant", avatar: r, avatarLabel: i, authorName: s, t
|
|
|
695
715
|
})]
|
|
696
716
|
});
|
|
697
717
|
}
|
|
698
|
-
function
|
|
718
|
+
function Ie(e, t) {
|
|
699
719
|
let n = e.split(/\{\{\s*duration\s*\}\}/);
|
|
700
|
-
return n.length === 1 ? e : /* @__PURE__ */ B
|
|
720
|
+
return n.length === 1 ? e : /* @__PURE__ */ H(B, { children: [
|
|
701
721
|
n[0],
|
|
702
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ V(u, {
|
|
703
723
|
value: t,
|
|
704
724
|
maxParts: 1
|
|
705
725
|
}),
|
|
706
726
|
n.slice(1).join("{{duration}}")
|
|
707
727
|
] });
|
|
708
728
|
}
|
|
709
|
-
function
|
|
729
|
+
function Le({ children: e, streaming: t = !1, durationSeconds: n, expandWhileStreaming: a = !0, defaultExpanded: o = !1, expanded: s, onExpandedChange: c, className: l, strings: u }) {
|
|
710
730
|
let d = {
|
|
711
|
-
...
|
|
731
|
+
...fe,
|
|
712
732
|
...u
|
|
713
|
-
}, [f, p] =
|
|
733
|
+
}, [f, p] = z(() => o || t && a), m = s ?? f, h = (e) => {
|
|
714
734
|
s === void 0 && p(e), c?.(e);
|
|
715
|
-
}, [g, _] =
|
|
716
|
-
g !==
|
|
717
|
-
let v =
|
|
735
|
+
}, [g, _] = z(t);
|
|
736
|
+
g !== t && (_(t), a && s === void 0 && (t ? p(!0) : o || p(!1)));
|
|
737
|
+
let v = t ? /* @__PURE__ */ V(X, {
|
|
718
738
|
className: Y.grow,
|
|
719
739
|
children: d.thinking
|
|
720
|
-
}) : /* @__PURE__ */
|
|
740
|
+
}) : /* @__PURE__ */ V(r, {
|
|
721
741
|
tag: "span",
|
|
722
742
|
weight: "medium",
|
|
723
743
|
className: Y.grow,
|
|
724
|
-
children:
|
|
744
|
+
children: n === void 0 ? d.thoughtDone : Ie(d.thoughtFor, n)
|
|
725
745
|
});
|
|
726
|
-
return /* @__PURE__ */
|
|
727
|
-
className:
|
|
728
|
-
children: [/* @__PURE__ */
|
|
746
|
+
return /* @__PURE__ */ H("div", {
|
|
747
|
+
className: i("ai-reasoning--component", Y.disclosure, l),
|
|
748
|
+
children: [/* @__PURE__ */ H("button", {
|
|
729
749
|
type: "button",
|
|
730
750
|
"aria-expanded": m,
|
|
731
751
|
"aria-label": m ? d.collapseAria : d.expandAria,
|
|
732
752
|
onClick: () => h(!m),
|
|
733
753
|
className: Y.disclosureTrigger,
|
|
734
754
|
children: [
|
|
735
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ V(C, {
|
|
736
756
|
"aria-hidden": !0,
|
|
737
757
|
className: Y.disclosureIcon
|
|
738
758
|
}),
|
|
739
759
|
v,
|
|
740
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ V(T, {
|
|
741
761
|
"aria-hidden": !0,
|
|
742
762
|
"data-expanded": m || void 0,
|
|
743
763
|
className: Y.disclosureChevron
|
|
744
764
|
})
|
|
745
765
|
]
|
|
746
|
-
}), m && /* @__PURE__ */
|
|
766
|
+
}), m && /* @__PURE__ */ V("div", {
|
|
747
767
|
className: Y.disclosureBody,
|
|
748
|
-
children: typeof
|
|
768
|
+
children: typeof e == "string" ? /* @__PURE__ */ V(r, {
|
|
749
769
|
type: "secondary",
|
|
750
770
|
lineHeight: "relaxed",
|
|
751
771
|
className: Y.preWrap,
|
|
752
|
-
children:
|
|
753
|
-
}) : /* @__PURE__ */
|
|
772
|
+
children: e
|
|
773
|
+
}) : /* @__PURE__ */ V("div", {
|
|
754
774
|
className: Y.preWrap,
|
|
755
|
-
children:
|
|
775
|
+
children: e
|
|
756
776
|
})
|
|
757
777
|
})]
|
|
758
778
|
});
|
|
759
779
|
}
|
|
760
|
-
var
|
|
761
|
-
pending:
|
|
762
|
-
active:
|
|
763
|
-
completed:
|
|
764
|
-
failed:
|
|
780
|
+
var Re = {
|
|
781
|
+
pending: D,
|
|
782
|
+
active: N,
|
|
783
|
+
completed: w,
|
|
784
|
+
failed: _
|
|
765
785
|
};
|
|
766
|
-
function
|
|
786
|
+
function ze({ steps: t, hideHeader: n = !1, streaming: a = !1, className: o, strings: s }) {
|
|
767
787
|
let c = {
|
|
768
|
-
...
|
|
788
|
+
...pe,
|
|
769
789
|
...s
|
|
770
790
|
};
|
|
771
|
-
return /* @__PURE__ */
|
|
772
|
-
className:
|
|
773
|
-
children: [!
|
|
791
|
+
return /* @__PURE__ */ H("div", {
|
|
792
|
+
className: i("ai-chain-of-thought--component", Y.chain, o),
|
|
793
|
+
children: [!n && /* @__PURE__ */ H("div", {
|
|
774
794
|
className: Y.chainHeader,
|
|
775
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ V(e, { children: c.title }), a && /* @__PURE__ */ V(X, {
|
|
796
|
+
size: "xs",
|
|
776
797
|
className: Y.chainHint,
|
|
777
798
|
children: c.streamingHint
|
|
778
799
|
})]
|
|
779
|
-
}), /* @__PURE__ */
|
|
800
|
+
}), /* @__PURE__ */ V("ol", {
|
|
780
801
|
className: Y.chainSteps,
|
|
781
|
-
children:
|
|
782
|
-
let t = e.status ?? "pending",
|
|
783
|
-
return /* @__PURE__ */
|
|
802
|
+
children: t.map((e) => {
|
|
803
|
+
let t = e.status ?? "pending", n = e.icon ?? Re[t];
|
|
804
|
+
return /* @__PURE__ */ H("li", {
|
|
784
805
|
"data-status": t,
|
|
785
806
|
className: Y.chainStep,
|
|
786
|
-
children: [/* @__PURE__ */
|
|
807
|
+
children: [/* @__PURE__ */ V("span", {
|
|
787
808
|
"aria-hidden": !0,
|
|
788
809
|
"data-status": t,
|
|
789
810
|
className: Y.chainMarker,
|
|
790
|
-
children: /* @__PURE__ */
|
|
791
|
-
}), /* @__PURE__ */
|
|
811
|
+
children: /* @__PURE__ */ V(n, { "data-spin": t === "active" || void 0 })
|
|
812
|
+
}), /* @__PURE__ */ H("div", {
|
|
792
813
|
className: Y.chainStepBody,
|
|
793
814
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ V(r, {
|
|
795
816
|
weight: t === "active" ? "semibold" : "medium",
|
|
796
817
|
type: t === "pending" ? "secondary" : "main",
|
|
797
818
|
children: e.title
|
|
798
819
|
}),
|
|
799
|
-
!!e.description && /* @__PURE__ */
|
|
820
|
+
!!e.description && /* @__PURE__ */ V(r, {
|
|
800
821
|
size: "xs",
|
|
801
822
|
type: "secondary",
|
|
802
823
|
children: e.description
|
|
803
824
|
}),
|
|
804
|
-
!!e.body && /* @__PURE__ */
|
|
825
|
+
!!e.body && /* @__PURE__ */ V("div", {
|
|
805
826
|
className: Y.chainStepExtra,
|
|
806
827
|
children: e.body
|
|
807
828
|
})
|
|
@@ -814,31 +835,31 @@ function Le({ steps: r, hideHeader: i = !1, streaming: a = !1, className: o, str
|
|
|
814
835
|
}
|
|
815
836
|
//#endregion
|
|
816
837
|
//#region src/components/features/ai-chat/ai-work-surfaces.tsx
|
|
817
|
-
var
|
|
838
|
+
var Be = {
|
|
818
839
|
pending: {
|
|
819
840
|
tone: "neutral",
|
|
820
|
-
icon:
|
|
841
|
+
icon: E
|
|
821
842
|
},
|
|
822
843
|
running: {
|
|
823
844
|
tone: "primary",
|
|
824
|
-
icon:
|
|
845
|
+
icon: N
|
|
825
846
|
},
|
|
826
847
|
success: {
|
|
827
848
|
tone: "success",
|
|
828
|
-
icon:
|
|
849
|
+
icon: w
|
|
829
850
|
},
|
|
830
851
|
error: {
|
|
831
852
|
tone: "destructive",
|
|
832
|
-
icon:
|
|
853
|
+
icon: _
|
|
833
854
|
}
|
|
834
855
|
};
|
|
835
|
-
function
|
|
836
|
-
return /* @__PURE__ */
|
|
856
|
+
function Ve({ label: e, ms: t }) {
|
|
857
|
+
return /* @__PURE__ */ H("span", {
|
|
837
858
|
className: Y.toolDuration,
|
|
838
|
-
children: [/* @__PURE__ */
|
|
859
|
+
children: [/* @__PURE__ */ V(c, {
|
|
839
860
|
size: "xs",
|
|
840
861
|
children: e
|
|
841
|
-
}), /* @__PURE__ */
|
|
862
|
+
}), /* @__PURE__ */ V(u, {
|
|
842
863
|
value: t,
|
|
843
864
|
from: "milliseconds",
|
|
844
865
|
maxParts: 1,
|
|
@@ -848,104 +869,109 @@ function ze({ label: e, ms: t }) {
|
|
|
848
869
|
})]
|
|
849
870
|
});
|
|
850
871
|
}
|
|
851
|
-
function Z({ label:
|
|
852
|
-
return /* @__PURE__ */
|
|
872
|
+
function Z({ label: n, tone: r, children: a }) {
|
|
873
|
+
return /* @__PURE__ */ H("div", {
|
|
853
874
|
className: Y.toolDetail,
|
|
854
|
-
children: [/* @__PURE__ */
|
|
875
|
+
children: [/* @__PURE__ */ V(e, { children: n }), /* @__PURE__ */ V("pre", {
|
|
855
876
|
tabIndex: 0,
|
|
856
|
-
"data-tone":
|
|
857
|
-
className: Y.pre,
|
|
858
|
-
|
|
877
|
+
"data-tone": r,
|
|
878
|
+
className: i(Y.pre, t({
|
|
879
|
+
size: "xs",
|
|
880
|
+
lineHeight: "relaxed",
|
|
881
|
+
mono: !0
|
|
882
|
+
})),
|
|
883
|
+
children: a
|
|
859
884
|
})]
|
|
860
885
|
});
|
|
861
886
|
}
|
|
862
|
-
function
|
|
887
|
+
function He({ name: e, status: t, icon: n = le, args: r, result: a, error: o, durationMs: c, expanded: l, defaultExpanded: u = !1, onExpandedChange: f, className: p, strings: m }) {
|
|
863
888
|
let h = {
|
|
864
|
-
...
|
|
889
|
+
...me,
|
|
865
890
|
...m
|
|
866
|
-
}, [g, _] =
|
|
867
|
-
l === void 0 && _(e),
|
|
891
|
+
}, [g, _] = z(u), v = l ?? g, y = (e) => {
|
|
892
|
+
l === void 0 && _(e), f?.(e);
|
|
868
893
|
}, b = {
|
|
869
894
|
pending: h.pending,
|
|
870
895
|
running: h.running,
|
|
871
896
|
success: h.success,
|
|
872
897
|
error: h.error
|
|
873
|
-
}, x =
|
|
874
|
-
/* @__PURE__ */
|
|
898
|
+
}, x = Be[t].icon, S = n, C = !!(r || a || o), w = /* @__PURE__ */ H(B, { children: [
|
|
899
|
+
/* @__PURE__ */ V(S, {
|
|
875
900
|
"aria-hidden": !0,
|
|
876
901
|
className: Y.disclosureIcon
|
|
877
902
|
}),
|
|
878
|
-
/* @__PURE__ */
|
|
903
|
+
/* @__PURE__ */ V(s, {
|
|
904
|
+
truncate: !0,
|
|
879
905
|
className: Y.toolName,
|
|
880
|
-
children:
|
|
906
|
+
children: e
|
|
881
907
|
}),
|
|
882
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ H("span", {
|
|
883
909
|
className: Y.toolMeta,
|
|
884
|
-
children: [/* @__PURE__ */
|
|
885
|
-
tone:
|
|
886
|
-
children: [/* @__PURE__ */
|
|
910
|
+
children: [/* @__PURE__ */ H(d, {
|
|
911
|
+
tone: Be[t].tone,
|
|
912
|
+
children: [/* @__PURE__ */ V(x, {
|
|
887
913
|
"aria-hidden": !0,
|
|
888
|
-
"data-spin":
|
|
889
|
-
}), b[
|
|
890
|
-
}), !!
|
|
914
|
+
"data-spin": t === "running" || void 0
|
|
915
|
+
}), b[t]]
|
|
916
|
+
}), !!c && /* @__PURE__ */ V(Ve, {
|
|
891
917
|
label: h.durationLabel,
|
|
892
|
-
ms:
|
|
918
|
+
ms: c
|
|
893
919
|
})]
|
|
894
920
|
}),
|
|
895
|
-
C && /* @__PURE__ */
|
|
921
|
+
C && /* @__PURE__ */ V(T, {
|
|
896
922
|
"aria-hidden": !0,
|
|
897
923
|
"data-expanded": v || void 0,
|
|
898
924
|
className: Y.disclosureChevron
|
|
899
925
|
})
|
|
900
926
|
] });
|
|
901
|
-
return /* @__PURE__ */
|
|
902
|
-
"data-status":
|
|
903
|
-
className:
|
|
904
|
-
children: [C ? /* @__PURE__ */
|
|
927
|
+
return /* @__PURE__ */ H("div", {
|
|
928
|
+
"data-status": t,
|
|
929
|
+
className: i("ai-tool-call--component", Y.tool, p),
|
|
930
|
+
children: [C ? /* @__PURE__ */ V("button", {
|
|
905
931
|
type: "button",
|
|
906
932
|
"aria-expanded": v,
|
|
907
933
|
"aria-label": v ? h.collapse : h.expand,
|
|
908
934
|
onClick: () => y(!v),
|
|
909
935
|
className: Y.toolHeader,
|
|
910
|
-
children:
|
|
911
|
-
}) : /* @__PURE__ */
|
|
936
|
+
children: w
|
|
937
|
+
}) : /* @__PURE__ */ V("div", {
|
|
912
938
|
className: Y.toolHeader,
|
|
913
|
-
children:
|
|
914
|
-
}), v && C && /* @__PURE__ */
|
|
939
|
+
children: w
|
|
940
|
+
}), v && C && /* @__PURE__ */ H("div", {
|
|
915
941
|
className: Y.toolBody,
|
|
916
|
-
children: [!!
|
|
942
|
+
children: [!!r && /* @__PURE__ */ V(Z, {
|
|
917
943
|
label: h.args,
|
|
918
|
-
children:
|
|
919
|
-
}),
|
|
944
|
+
children: r
|
|
945
|
+
}), t === "error" && o ? /* @__PURE__ */ V(Z, {
|
|
920
946
|
label: h.error,
|
|
921
947
|
tone: "destructive",
|
|
922
948
|
children: o
|
|
923
|
-
}) : !!a && /* @__PURE__ */
|
|
949
|
+
}) : !!a && /* @__PURE__ */ V(Z, {
|
|
924
950
|
label: h.result,
|
|
925
951
|
children: a
|
|
926
952
|
})]
|
|
927
953
|
})]
|
|
928
954
|
});
|
|
929
955
|
}
|
|
930
|
-
var
|
|
956
|
+
var Ue = {
|
|
931
957
|
queued: {
|
|
932
|
-
icon:
|
|
958
|
+
icon: D,
|
|
933
959
|
tone: "neutral"
|
|
934
960
|
},
|
|
935
961
|
running: {
|
|
936
|
-
icon:
|
|
962
|
+
icon: N,
|
|
937
963
|
tone: "primary"
|
|
938
964
|
},
|
|
939
965
|
completed: {
|
|
940
|
-
icon:
|
|
966
|
+
icon: w,
|
|
941
967
|
tone: "success"
|
|
942
968
|
},
|
|
943
969
|
failed: {
|
|
944
|
-
icon:
|
|
970
|
+
icon: _,
|
|
945
971
|
tone: "destructive"
|
|
946
972
|
},
|
|
947
973
|
cancelled: {
|
|
948
|
-
icon:
|
|
974
|
+
icon: ue,
|
|
949
975
|
tone: "neutral"
|
|
950
976
|
},
|
|
951
977
|
skipped: {
|
|
@@ -953,78 +979,81 @@ var Ve = {
|
|
|
953
979
|
tone: "neutral"
|
|
954
980
|
}
|
|
955
981
|
};
|
|
956
|
-
function
|
|
957
|
-
let s = e.status ?? "queued", c = e.icon ??
|
|
958
|
-
return /* @__PURE__ */ B
|
|
982
|
+
function We({ item: e, depth: t, defaultExpanded: n, indent: i, copy: o }) {
|
|
983
|
+
let s = e.status ?? "queued", c = e.icon ?? Ue[s].icon, l = !!e.children?.length, [u, f] = z(n || t === 0);
|
|
984
|
+
return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H("div", {
|
|
959
985
|
"data-nested": t > 0 || void 0,
|
|
960
|
-
style: { "--
|
|
986
|
+
style: { "--_ai-task-depth": t * i },
|
|
961
987
|
className: Y.taskRow,
|
|
962
|
-
children: [/* @__PURE__ */
|
|
988
|
+
children: [/* @__PURE__ */ H("div", {
|
|
963
989
|
className: Y.taskTitleRow,
|
|
964
990
|
children: [
|
|
965
|
-
|
|
991
|
+
l ? /* @__PURE__ */ V(a, {
|
|
966
992
|
type: "button",
|
|
967
993
|
tone: "neutral",
|
|
968
|
-
|
|
994
|
+
appearance: "ghost",
|
|
969
995
|
iconOnly: !0,
|
|
970
|
-
"aria-expanded":
|
|
971
|
-
"aria-label":
|
|
972
|
-
onClick: () =>
|
|
996
|
+
"aria-expanded": u,
|
|
997
|
+
"aria-label": u ? o.collapseSubtasks : o.expandSubtasks,
|
|
998
|
+
onClick: () => f((e) => !e),
|
|
973
999
|
className: Y.taskToggle,
|
|
974
|
-
children: /* @__PURE__ */
|
|
975
|
-
}) : /* @__PURE__ */
|
|
1000
|
+
children: /* @__PURE__ */ V(T, { "data-expanded": u || void 0 })
|
|
1001
|
+
}) : /* @__PURE__ */ V("span", {
|
|
976
1002
|
"aria-hidden": !0,
|
|
977
1003
|
className: Y.taskToggleSpacer
|
|
978
1004
|
}),
|
|
979
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ V(c, {
|
|
980
1006
|
"aria-hidden": !0,
|
|
981
1007
|
"data-status": s,
|
|
982
1008
|
"data-spin": s === "running" || void 0,
|
|
983
1009
|
className: Y.taskIcon
|
|
984
1010
|
}),
|
|
985
|
-
/* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ V(r, {
|
|
986
1012
|
weight: s === "running" ? "semibold" : "medium",
|
|
987
1013
|
type: s === "queued" || s === "cancelled" ? "secondary" : "main",
|
|
1014
|
+
truncate: !0,
|
|
988
1015
|
"data-status": s,
|
|
989
1016
|
className: Y.taskTitle,
|
|
990
1017
|
children: e.title
|
|
991
1018
|
}),
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
tone:
|
|
1019
|
+
/* @__PURE__ */ V(d, {
|
|
1020
|
+
tone: Ue[s].tone,
|
|
994
1021
|
children: o.statusLabels[s]
|
|
995
1022
|
}),
|
|
996
|
-
!!e.rightSlot && /* @__PURE__ */
|
|
1023
|
+
!!e.rightSlot && /* @__PURE__ */ V(r, {
|
|
1024
|
+
tag: "span",
|
|
997
1025
|
size: "xs",
|
|
998
|
-
|
|
1026
|
+
type: "secondary",
|
|
1027
|
+
numeric: !0,
|
|
999
1028
|
children: e.rightSlot
|
|
1000
1029
|
})
|
|
1001
1030
|
]
|
|
1002
|
-
}), !!e.body && /* @__PURE__ */
|
|
1031
|
+
}), !!e.body && /* @__PURE__ */ V("div", {
|
|
1003
1032
|
className: Y.taskExtra,
|
|
1004
1033
|
children: e.body
|
|
1005
1034
|
})]
|
|
1006
|
-
}),
|
|
1035
|
+
}), l && u && e.children?.map((e) => /* @__PURE__ */ V(We, {
|
|
1007
1036
|
item: e,
|
|
1008
1037
|
depth: t + 1,
|
|
1009
|
-
|
|
1038
|
+
defaultExpanded: n,
|
|
1010
1039
|
indent: i,
|
|
1011
1040
|
copy: o
|
|
1012
1041
|
}, e.id))] });
|
|
1013
1042
|
}
|
|
1014
|
-
function
|
|
1015
|
-
let
|
|
1016
|
-
return /* @__PURE__ */
|
|
1017
|
-
className:
|
|
1018
|
-
children: /* @__PURE__ */
|
|
1019
|
-
item:
|
|
1043
|
+
function Ge({ task: e, defaultExpanded: t = !1, indent: n = 1.125, className: r, strings: a }) {
|
|
1044
|
+
let s = o(he, a);
|
|
1045
|
+
return /* @__PURE__ */ V("div", {
|
|
1046
|
+
className: i("ai-task--component", Y.task, r),
|
|
1047
|
+
children: /* @__PURE__ */ V(We, {
|
|
1048
|
+
item: e,
|
|
1020
1049
|
depth: 0,
|
|
1021
|
-
|
|
1022
|
-
indent:
|
|
1023
|
-
copy:
|
|
1050
|
+
defaultExpanded: t,
|
|
1051
|
+
indent: n,
|
|
1052
|
+
copy: s
|
|
1024
1053
|
})
|
|
1025
1054
|
});
|
|
1026
1055
|
}
|
|
1027
|
-
var
|
|
1056
|
+
var Ke = {
|
|
1028
1057
|
idle: "neutral",
|
|
1029
1058
|
thinking: "primary",
|
|
1030
1059
|
working: "primary",
|
|
@@ -1032,35 +1061,35 @@ var We = {
|
|
|
1032
1061
|
error: "destructive",
|
|
1033
1062
|
offline: "neutral"
|
|
1034
1063
|
};
|
|
1035
|
-
function
|
|
1036
|
-
let
|
|
1064
|
+
function qe({ name: e, icon: t, avatar: n, subtitle: a, tone: s = "primary", status: c, variant: l = "inline", trailing: u, className: f, strings: p }) {
|
|
1065
|
+
let m = o(ge, p), h = t ?? S, g = n ?? /* @__PURE__ */ V("span", {
|
|
1037
1066
|
"aria-hidden": !0,
|
|
1038
|
-
"data-tone":
|
|
1039
|
-
"data-variant":
|
|
1067
|
+
"data-tone": s,
|
|
1068
|
+
"data-variant": l,
|
|
1040
1069
|
className: Y.avatar,
|
|
1041
|
-
children: /* @__PURE__ */
|
|
1042
|
-
}), _ = !!
|
|
1043
|
-
tone:
|
|
1070
|
+
children: /* @__PURE__ */ V(h, {})
|
|
1071
|
+
}), _ = !!c && /* @__PURE__ */ V(d, {
|
|
1072
|
+
tone: Ke[c],
|
|
1044
1073
|
dot: !0,
|
|
1045
|
-
pulse:
|
|
1046
|
-
children:
|
|
1074
|
+
pulse: c === "thinking" || c === "working",
|
|
1075
|
+
children: m.statusLabels[c]
|
|
1047
1076
|
});
|
|
1048
|
-
return /* @__PURE__ */
|
|
1049
|
-
"data-variant":
|
|
1050
|
-
className:
|
|
1077
|
+
return /* @__PURE__ */ H("div", {
|
|
1078
|
+
"data-variant": l,
|
|
1079
|
+
className: i("ai-agent--component", Y.agent, f),
|
|
1051
1080
|
children: [
|
|
1052
1081
|
g,
|
|
1053
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ H("div", {
|
|
1054
1083
|
className: Y.agentText,
|
|
1055
|
-
children: [/* @__PURE__ */
|
|
1084
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1056
1085
|
className: Y.agentNameRow,
|
|
1057
|
-
children: [/* @__PURE__ */
|
|
1086
|
+
children: [/* @__PURE__ */ V(r, {
|
|
1058
1087
|
tag: "span",
|
|
1059
|
-
weight:
|
|
1088
|
+
weight: l === "card" ? "semibold" : "medium",
|
|
1060
1089
|
truncate: !0,
|
|
1061
|
-
children:
|
|
1062
|
-
}),
|
|
1063
|
-
}), !!a && /* @__PURE__ */
|
|
1090
|
+
children: e
|
|
1091
|
+
}), l === "card" && _]
|
|
1092
|
+
}), !!a && /* @__PURE__ */ V(r, {
|
|
1064
1093
|
tag: "span",
|
|
1065
1094
|
size: "xs",
|
|
1066
1095
|
type: "secondary",
|
|
@@ -1068,96 +1097,96 @@ function Ge({ name: t, icon: r, avatar: i, subtitle: a, tone: o = "primary", sta
|
|
|
1068
1097
|
children: a
|
|
1069
1098
|
})]
|
|
1070
1099
|
}),
|
|
1071
|
-
|
|
1072
|
-
!!
|
|
1100
|
+
l === "inline" && _,
|
|
1101
|
+
!!u && /* @__PURE__ */ V("div", {
|
|
1073
1102
|
className: Y.agentTrailing,
|
|
1074
|
-
children:
|
|
1103
|
+
children: u
|
|
1075
1104
|
})
|
|
1076
1105
|
]
|
|
1077
1106
|
});
|
|
1078
1107
|
}
|
|
1079
|
-
function
|
|
1108
|
+
function Je({ title: e, description: t, icon: n = ae, tone: o = "neutral", status: s = "pending", onApprove: c, onReject: l, approveLabel: u, rejectLabel: d, details: f, className: m, strings: h }) {
|
|
1080
1109
|
let g = {
|
|
1081
|
-
...
|
|
1110
|
+
..._e,
|
|
1082
1111
|
...h
|
|
1083
1112
|
};
|
|
1084
|
-
return /* @__PURE__ */
|
|
1113
|
+
return /* @__PURE__ */ H("div", {
|
|
1085
1114
|
role: "region",
|
|
1086
1115
|
"aria-live": "polite",
|
|
1087
1116
|
"data-tone": o,
|
|
1088
|
-
className:
|
|
1089
|
-
children: [/* @__PURE__ */
|
|
1117
|
+
className: i("ai-confirmation--component", Y.confirmation, m),
|
|
1118
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1090
1119
|
className: Y.confirmationHeader,
|
|
1091
|
-
children: [/* @__PURE__ */
|
|
1092
|
-
icon:
|
|
1120
|
+
children: [/* @__PURE__ */ V(p, {
|
|
1121
|
+
icon: n,
|
|
1093
1122
|
tone: o,
|
|
1094
1123
|
shape: "rounded"
|
|
1095
|
-
}), /* @__PURE__ */
|
|
1124
|
+
}), /* @__PURE__ */ H("div", {
|
|
1096
1125
|
className: Y.confirmationText,
|
|
1097
1126
|
children: [
|
|
1098
|
-
/* @__PURE__ */
|
|
1127
|
+
/* @__PURE__ */ V(r, {
|
|
1099
1128
|
weight: "medium",
|
|
1100
|
-
children:
|
|
1129
|
+
children: e
|
|
1101
1130
|
}),
|
|
1102
|
-
!!
|
|
1131
|
+
!!t && /* @__PURE__ */ V(r, {
|
|
1103
1132
|
type: "secondary",
|
|
1104
|
-
children:
|
|
1133
|
+
children: t
|
|
1105
1134
|
}),
|
|
1106
|
-
!!
|
|
1135
|
+
!!f && /* @__PURE__ */ V("div", {
|
|
1107
1136
|
role: "group",
|
|
1108
1137
|
"aria-label": g.detailsLabel,
|
|
1109
1138
|
className: Y.confirmationDetails,
|
|
1110
|
-
children:
|
|
1139
|
+
children: f
|
|
1111
1140
|
})
|
|
1112
1141
|
]
|
|
1113
1142
|
})]
|
|
1114
|
-
}), /* @__PURE__ */
|
|
1143
|
+
}), /* @__PURE__ */ V("div", {
|
|
1115
1144
|
className: Y.confirmationFooter,
|
|
1116
|
-
children:
|
|
1145
|
+
children: s === "pending" ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(r, {
|
|
1117
1146
|
size: "xs",
|
|
1118
1147
|
type: "secondary",
|
|
1119
1148
|
children: g.pending
|
|
1120
|
-
}), /* @__PURE__ */
|
|
1149
|
+
}), /* @__PURE__ */ H("div", {
|
|
1121
1150
|
className: Y.confirmationActions,
|
|
1122
|
-
children: [/* @__PURE__ */
|
|
1151
|
+
children: [/* @__PURE__ */ H(a, {
|
|
1123
1152
|
type: "button",
|
|
1124
1153
|
tone: "neutral",
|
|
1125
|
-
|
|
1126
|
-
onClick:
|
|
1127
|
-
children: [/* @__PURE__ */
|
|
1128
|
-
}), /* @__PURE__ */
|
|
1154
|
+
appearance: "ghost",
|
|
1155
|
+
onClick: l,
|
|
1156
|
+
children: [/* @__PURE__ */ V(F, {}), d ?? g.reject]
|
|
1157
|
+
}), /* @__PURE__ */ H(a, {
|
|
1129
1158
|
type: "button",
|
|
1130
1159
|
tone: o === "destructive" ? "destructive" : "primary",
|
|
1131
|
-
onClick:
|
|
1132
|
-
children: [/* @__PURE__ */
|
|
1160
|
+
onClick: c,
|
|
1161
|
+
children: [/* @__PURE__ */ V(w, {}), u ?? g.approve]
|
|
1133
1162
|
})]
|
|
1134
|
-
})] }) :
|
|
1163
|
+
})] }) : s === "approved" ? /* @__PURE__ */ H(r, {
|
|
1135
1164
|
size: "xs",
|
|
1136
1165
|
type: "success",
|
|
1137
1166
|
weight: "medium",
|
|
1138
1167
|
className: Y.outcome,
|
|
1139
|
-
children: [/* @__PURE__ */
|
|
1140
|
-
}) : /* @__PURE__ */
|
|
1168
|
+
children: [/* @__PURE__ */ V(w, { "aria-hidden": !0 }), g.approved]
|
|
1169
|
+
}) : /* @__PURE__ */ H(r, {
|
|
1141
1170
|
size: "xs",
|
|
1142
1171
|
type: "secondary",
|
|
1143
1172
|
weight: "medium",
|
|
1144
1173
|
className: Y.outcome,
|
|
1145
|
-
children: [/* @__PURE__ */
|
|
1174
|
+
children: [/* @__PURE__ */ V(F, { "aria-hidden": !0 }), g.rejected]
|
|
1146
1175
|
})
|
|
1147
1176
|
})]
|
|
1148
1177
|
});
|
|
1149
1178
|
}
|
|
1150
1179
|
//#endregion
|
|
1151
1180
|
//#region src/components/features/ai-chat/use-ai-chat-scroll.ts
|
|
1152
|
-
function
|
|
1153
|
-
let r =
|
|
1181
|
+
function Ye({ threshold: e = 80, dependency: t, disableAutoScroll: n = !1 } = {}) {
|
|
1182
|
+
let r = R(null), i = R(null), [a, o] = z(!0), s = I((e = "smooth") => {
|
|
1154
1183
|
let t = r.current;
|
|
1155
1184
|
t && t.scrollTo({
|
|
1156
1185
|
top: t.scrollHeight,
|
|
1157
1186
|
behavior: e
|
|
1158
1187
|
});
|
|
1159
1188
|
}, []);
|
|
1160
|
-
|
|
1189
|
+
L(() => {
|
|
1161
1190
|
let t = r.current;
|
|
1162
1191
|
if (!t) return;
|
|
1163
1192
|
let n = () => {
|
|
@@ -1166,10 +1195,10 @@ function Ke({ threshold: e = 80, dependency: t, disableAutoScroll: n = !1 } = {}
|
|
|
1166
1195
|
};
|
|
1167
1196
|
return n(), t.addEventListener("scroll", n, { passive: !0 }), () => t.removeEventListener("scroll", n);
|
|
1168
1197
|
}, [e]);
|
|
1169
|
-
let c =
|
|
1170
|
-
return
|
|
1198
|
+
let c = R(a);
|
|
1199
|
+
return L(() => {
|
|
1171
1200
|
c.current = a;
|
|
1172
|
-
}, [a]),
|
|
1201
|
+
}, [a]), L(() => {
|
|
1173
1202
|
if (n || !c.current) return;
|
|
1174
1203
|
let e = requestAnimationFrame(() => s("auto"));
|
|
1175
1204
|
return () => cancelAnimationFrame(e);
|
|
@@ -1186,10 +1215,10 @@ function Ke({ threshold: e = 80, dependency: t, disableAutoScroll: n = !1 } = {}
|
|
|
1186
1215
|
}
|
|
1187
1216
|
//#endregion
|
|
1188
1217
|
//#region src/components/features/ai-chat/ai-chat-parts.tsx
|
|
1189
|
-
function
|
|
1190
|
-
return
|
|
1191
|
-
className:
|
|
1192
|
-
children:
|
|
1218
|
+
function Q({ attachments: e, onRemove: t, onOpen: n, className: r }) {
|
|
1219
|
+
return e.length === 0 ? null : /* @__PURE__ */ V("div", {
|
|
1220
|
+
className: i("ai-chat-attachments-strip--component", Y.strip, r),
|
|
1221
|
+
children: e.map((e) => /* @__PURE__ */ V(Me, {
|
|
1193
1222
|
name: e.name,
|
|
1194
1223
|
meta: e.meta,
|
|
1195
1224
|
kind: e.kind,
|
|
@@ -1197,30 +1226,30 @@ function $({ attachments: t, onRemove: n, onOpen: r, className: i }) {
|
|
|
1197
1226
|
thumbnailUrl: e.thumbnailUrl,
|
|
1198
1227
|
progress: e.progress,
|
|
1199
1228
|
errored: e.errored,
|
|
1200
|
-
onOpen:
|
|
1201
|
-
onRemove:
|
|
1229
|
+
onOpen: n ? () => n(e) : void 0,
|
|
1230
|
+
onRemove: t ? () => t(e.id) : void 0
|
|
1202
1231
|
}, e.id))
|
|
1203
1232
|
});
|
|
1204
1233
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(
|
|
1234
|
+
function Xe(e) {
|
|
1235
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Xe).join("") : "";
|
|
1207
1236
|
}
|
|
1208
|
-
function
|
|
1237
|
+
function Ze({ part: e, onAttachmentOpen: t }) {
|
|
1209
1238
|
switch (e.type) {
|
|
1210
|
-
case "text": return /* @__PURE__ */
|
|
1239
|
+
case "text": return /* @__PURE__ */ V(r, {
|
|
1211
1240
|
lineHeight: "relaxed",
|
|
1212
1241
|
children: e.content
|
|
1213
1242
|
});
|
|
1214
|
-
case "reasoning": return /* @__PURE__ */
|
|
1243
|
+
case "reasoning": return /* @__PURE__ */ V(Le, {
|
|
1215
1244
|
streaming: e.streaming,
|
|
1216
1245
|
durationSeconds: e.durationSeconds,
|
|
1217
1246
|
children: e.content
|
|
1218
1247
|
});
|
|
1219
|
-
case "chain-of-thought": return /* @__PURE__ */
|
|
1248
|
+
case "chain-of-thought": return /* @__PURE__ */ V(ze, {
|
|
1220
1249
|
steps: e.steps,
|
|
1221
1250
|
streaming: e.streaming
|
|
1222
1251
|
});
|
|
1223
|
-
case "tool": return /* @__PURE__ */
|
|
1252
|
+
case "tool": return /* @__PURE__ */ V(He, {
|
|
1224
1253
|
name: e.name,
|
|
1225
1254
|
status: e.status,
|
|
1226
1255
|
icon: e.icon,
|
|
@@ -1230,24 +1259,24 @@ function Je({ part: e, onAttachmentOpen: t }) {
|
|
|
1230
1259
|
durationMs: e.durationMs,
|
|
1231
1260
|
defaultExpanded: e.defaultExpanded
|
|
1232
1261
|
});
|
|
1233
|
-
case "code": return /* @__PURE__ */
|
|
1262
|
+
case "code": return /* @__PURE__ */ V(Te, {
|
|
1234
1263
|
code: e.code,
|
|
1235
1264
|
language: e.language,
|
|
1236
1265
|
filename: e.filename,
|
|
1237
1266
|
showLineNumbers: e.showLineNumbers,
|
|
1238
1267
|
highlightLines: e.highlightLines
|
|
1239
1268
|
});
|
|
1240
|
-
case "attachments": return /* @__PURE__ */
|
|
1269
|
+
case "attachments": return /* @__PURE__ */ V(Q, {
|
|
1241
1270
|
attachments: e.items,
|
|
1242
1271
|
onOpen: t ? (e) => t(e.id) : void 0
|
|
1243
1272
|
});
|
|
1244
|
-
case "sources": return /* @__PURE__ */
|
|
1273
|
+
case "sources": return /* @__PURE__ */ V(Ae, {
|
|
1245
1274
|
sources: e.items,
|
|
1246
1275
|
variant: e.variant,
|
|
1247
1276
|
defaultExpanded: e.defaultExpanded
|
|
1248
1277
|
});
|
|
1249
|
-
case "task": return /* @__PURE__ */
|
|
1250
|
-
case "artifact": return /* @__PURE__ */
|
|
1278
|
+
case "task": return /* @__PURE__ */ V(Ge, { task: e.task });
|
|
1279
|
+
case "artifact": return /* @__PURE__ */ V(Ee, {
|
|
1251
1280
|
title: e.title,
|
|
1252
1281
|
subtitle: e.subtitle,
|
|
1253
1282
|
icon: e.icon,
|
|
@@ -1257,7 +1286,7 @@ function Je({ part: e, onAttachmentOpen: t }) {
|
|
|
1257
1286
|
onDownload: e.onDownload,
|
|
1258
1287
|
children: e.body
|
|
1259
1288
|
});
|
|
1260
|
-
case "confirmation": return /* @__PURE__ */
|
|
1289
|
+
case "confirmation": return /* @__PURE__ */ V(Je, {
|
|
1261
1290
|
title: e.title,
|
|
1262
1291
|
description: e.description,
|
|
1263
1292
|
tone: e.tone,
|
|
@@ -1266,134 +1295,133 @@ function Je({ part: e, onAttachmentOpen: t }) {
|
|
|
1266
1295
|
onApprove: e.onApprove,
|
|
1267
1296
|
onReject: e.onReject
|
|
1268
1297
|
});
|
|
1269
|
-
case "custom": return /* @__PURE__ */
|
|
1298
|
+
case "custom": return /* @__PURE__ */ V(B, { children: e.render() });
|
|
1270
1299
|
}
|
|
1271
1300
|
}
|
|
1272
|
-
function
|
|
1301
|
+
function $({ message: e, onCopy: t, onRegenerate: n, onAttachmentOpen: r, className: a, strings: o }) {
|
|
1273
1302
|
let s = {
|
|
1274
1303
|
...J,
|
|
1275
1304
|
...o
|
|
1276
|
-
}, c =
|
|
1277
|
-
for (; l >= 0 &&
|
|
1278
|
-
let u = c < 0 ? [] :
|
|
1305
|
+
}, c = e.parts.findIndex((e) => e.type === "text"), l = c;
|
|
1306
|
+
for (; l >= 0 && e.parts[l + 1]?.type === "text";) l += 1;
|
|
1307
|
+
let u = c < 0 ? [] : e.parts.slice(0, c), d = c < 0 ? [] : e.parts.slice(c, l + 1), f = c < 0 ? [...e.parts] : e.parts.slice(l + 1), p = d.map((e) => e.type === "text" ? e.plain ?? Xe(e.content) : "").filter(Boolean).join("\n") || void 0, m = e.pending ? /* @__PURE__ */ V(X, { children: s.pending }) : d.length === 0 ? null : /* @__PURE__ */ V("div", {
|
|
1279
1308
|
className: Y.bubbleParts,
|
|
1280
|
-
children: d.map((e, t) => /* @__PURE__ */
|
|
1309
|
+
children: d.map((e, t) => /* @__PURE__ */ V("div", {
|
|
1281
1310
|
className: Y.preWrap,
|
|
1282
1311
|
children: e.type === "text" ? e.content : null
|
|
1283
1312
|
}, t))
|
|
1284
1313
|
});
|
|
1285
|
-
return /* @__PURE__ */
|
|
1286
|
-
"data-role":
|
|
1287
|
-
className:
|
|
1314
|
+
return /* @__PURE__ */ H("div", {
|
|
1315
|
+
"data-role": e.role,
|
|
1316
|
+
className: i("ai-chat-message--component", Y.message, a),
|
|
1288
1317
|
children: [
|
|
1289
|
-
u.length > 0 && /* @__PURE__ */
|
|
1318
|
+
u.length > 0 && /* @__PURE__ */ V("div", {
|
|
1290
1319
|
className: Y.messageBelow,
|
|
1291
|
-
children: u.map((e, t) => /* @__PURE__ */
|
|
1320
|
+
children: u.map((e, t) => /* @__PURE__ */ V(Ze, {
|
|
1292
1321
|
part: e,
|
|
1293
|
-
onAttachmentOpen:
|
|
1322
|
+
onAttachmentOpen: r
|
|
1294
1323
|
}, t))
|
|
1295
1324
|
}),
|
|
1296
|
-
(m !== null ||
|
|
1297
|
-
role:
|
|
1298
|
-
avatar:
|
|
1299
|
-
authorName:
|
|
1300
|
-
timestamp:
|
|
1325
|
+
(m !== null || e.pending) && /* @__PURE__ */ V(Fe, {
|
|
1326
|
+
role: e.role,
|
|
1327
|
+
avatar: e.avatar,
|
|
1328
|
+
authorName: e.authorName,
|
|
1329
|
+
timestamp: e.timestamp,
|
|
1301
1330
|
plainText: p,
|
|
1302
|
-
loading:
|
|
1303
|
-
onCopy: p ?
|
|
1304
|
-
onRegenerate:
|
|
1331
|
+
loading: e.loading,
|
|
1332
|
+
onCopy: p ? t ?? (() => void 0) : void 0,
|
|
1333
|
+
onRegenerate: e.pending ? void 0 : n,
|
|
1305
1334
|
children: m
|
|
1306
1335
|
}),
|
|
1307
|
-
f.length > 0 && /* @__PURE__ */
|
|
1336
|
+
f.length > 0 && /* @__PURE__ */ V("div", {
|
|
1308
1337
|
className: Y.messageBelow,
|
|
1309
|
-
children: f.map((e, t) => /* @__PURE__ */
|
|
1338
|
+
children: f.map((e, t) => /* @__PURE__ */ V(Ze, {
|
|
1310
1339
|
part: e,
|
|
1311
|
-
onAttachmentOpen:
|
|
1340
|
+
onAttachmentOpen: r
|
|
1312
1341
|
}, t))
|
|
1313
1342
|
}),
|
|
1314
|
-
!!
|
|
1343
|
+
!!e.trailing && /* @__PURE__ */ V("div", {
|
|
1315
1344
|
className: Y.messageBelow,
|
|
1316
|
-
children:
|
|
1345
|
+
children: e.trailing
|
|
1317
1346
|
})
|
|
1318
1347
|
]
|
|
1319
1348
|
});
|
|
1320
1349
|
}
|
|
1321
|
-
function
|
|
1350
|
+
function Qe({ messages: e, renderMessage: t, intro: n, footer: o, empty: s, disableAutoScroll: c, className: l, strings: u }) {
|
|
1322
1351
|
let d = {
|
|
1323
1352
|
...G,
|
|
1324
1353
|
...u
|
|
1325
|
-
}, { containerRef: f, endRef: p, isAtBottom: m, scrollToBottom: h } =
|
|
1326
|
-
dependency:
|
|
1354
|
+
}, { containerRef: f, endRef: p, isAtBottom: m, scrollToBottom: h } = Ye({
|
|
1355
|
+
dependency: e.length,
|
|
1327
1356
|
disableAutoScroll: c
|
|
1328
|
-
}), g =
|
|
1329
|
-
return /* @__PURE__ */
|
|
1330
|
-
className:
|
|
1331
|
-
children: [/* @__PURE__ */
|
|
1357
|
+
}), g = e.length === 0 && !n;
|
|
1358
|
+
return /* @__PURE__ */ H("div", {
|
|
1359
|
+
className: i("ai-chat-conversation--component", Y.conversation, l),
|
|
1360
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1332
1361
|
ref: f,
|
|
1333
1362
|
tabIndex: 0,
|
|
1334
1363
|
"aria-label": d.transcriptAria,
|
|
1335
1364
|
className: Y.transcript,
|
|
1336
1365
|
children: [
|
|
1337
|
-
!!
|
|
1366
|
+
!!n && /* @__PURE__ */ V("div", {
|
|
1338
1367
|
className: Y.transcriptIntro,
|
|
1339
|
-
children:
|
|
1368
|
+
children: n
|
|
1340
1369
|
}),
|
|
1341
|
-
g ? s ?? /* @__PURE__ */
|
|
1370
|
+
g ? s ?? /* @__PURE__ */ V(r, {
|
|
1342
1371
|
type: "secondary",
|
|
1343
1372
|
children: d.empty
|
|
1344
|
-
}) : /* @__PURE__ */
|
|
1373
|
+
}) : /* @__PURE__ */ V("ol", {
|
|
1345
1374
|
className: Y.messages,
|
|
1346
|
-
children:
|
|
1347
|
-
index:
|
|
1348
|
-
isLast:
|
|
1349
|
-
}) },
|
|
1375
|
+
children: e.map((n, r) => /* @__PURE__ */ V("li", { children: t(n, {
|
|
1376
|
+
index: r,
|
|
1377
|
+
isLast: r === e.length - 1
|
|
1378
|
+
}) }, n.id))
|
|
1350
1379
|
}),
|
|
1351
|
-
!!o && /* @__PURE__ */
|
|
1380
|
+
!!o && /* @__PURE__ */ V("div", {
|
|
1352
1381
|
className: Y.transcriptFooter,
|
|
1353
1382
|
children: o
|
|
1354
1383
|
}),
|
|
1355
|
-
/* @__PURE__ */
|
|
1384
|
+
/* @__PURE__ */ V("div", {
|
|
1356
1385
|
ref: p,
|
|
1357
1386
|
"aria-hidden": !0,
|
|
1358
1387
|
className: Y.sentinel
|
|
1359
1388
|
})
|
|
1360
1389
|
]
|
|
1361
|
-
}), !m && /* @__PURE__ */
|
|
1390
|
+
}), !m && /* @__PURE__ */ V("div", {
|
|
1362
1391
|
className: Y.jump,
|
|
1363
|
-
children: /* @__PURE__ */
|
|
1392
|
+
children: /* @__PURE__ */ H(a, {
|
|
1364
1393
|
type: "button",
|
|
1365
1394
|
tone: "neutral",
|
|
1366
|
-
|
|
1395
|
+
appearance: "outline",
|
|
1367
1396
|
"aria-label": d.scrollToBottomAria,
|
|
1368
1397
|
onClick: () => h("smooth"),
|
|
1369
|
-
children: [/* @__PURE__ */
|
|
1398
|
+
children: [/* @__PURE__ */ V(y, {}), d.scrollToBottom]
|
|
1370
1399
|
})
|
|
1371
1400
|
})]
|
|
1372
1401
|
});
|
|
1373
1402
|
}
|
|
1374
|
-
function
|
|
1375
|
-
return /* @__PURE__ */
|
|
1376
|
-
className:
|
|
1377
|
-
children: [/* @__PURE__ */
|
|
1378
|
-
media:
|
|
1403
|
+
function $e({ title: e, description: t, icon: n = /* @__PURE__ */ V(P, {}), below: r, className: a }) {
|
|
1404
|
+
return /* @__PURE__ */ H("div", {
|
|
1405
|
+
className: i("ai-chat-empty-state--component", Y.emptyState, a),
|
|
1406
|
+
children: [/* @__PURE__ */ V(f, {
|
|
1407
|
+
media: n,
|
|
1379
1408
|
mediaVariant: "icon-soft",
|
|
1380
|
-
title:
|
|
1381
|
-
description:
|
|
1382
|
-
|
|
1383
|
-
}), !!a && /* @__PURE__ */ z("div", {
|
|
1409
|
+
title: e,
|
|
1410
|
+
description: t ?? !1
|
|
1411
|
+
}), !!r && /* @__PURE__ */ V("div", {
|
|
1384
1412
|
className: Y.emptyBelow,
|
|
1385
|
-
children:
|
|
1413
|
+
children: r
|
|
1386
1414
|
})]
|
|
1387
1415
|
});
|
|
1388
1416
|
}
|
|
1389
|
-
function
|
|
1417
|
+
function et({ items: e, hideHeader: t = !1, onCancel: n, className: o, strings: s }) {
|
|
1390
1418
|
let c = {
|
|
1391
1419
|
...K,
|
|
1392
1420
|
...s
|
|
1393
1421
|
};
|
|
1394
|
-
return
|
|
1395
|
-
className:
|
|
1396
|
-
children: [!
|
|
1422
|
+
return e.length === 0 ? null : /* @__PURE__ */ H("div", {
|
|
1423
|
+
className: i("ai-chat-queue--component", Y.queue, o),
|
|
1424
|
+
children: [!t && /* @__PURE__ */ H(r, {
|
|
1397
1425
|
tag: "div",
|
|
1398
1426
|
size: "xs",
|
|
1399
1427
|
type: "secondary",
|
|
@@ -1401,38 +1429,38 @@ function Qe({ items: t, hideHeader: r = !1, onCancel: i, className: o, strings:
|
|
|
1401
1429
|
children: [
|
|
1402
1430
|
c.header,
|
|
1403
1431
|
" · ",
|
|
1404
|
-
|
|
1432
|
+
e.length
|
|
1405
1433
|
]
|
|
1406
|
-
}), /* @__PURE__ */
|
|
1434
|
+
}), /* @__PURE__ */ V("ul", {
|
|
1407
1435
|
className: Y.queueList,
|
|
1408
|
-
children:
|
|
1436
|
+
children: e.map((e) => {
|
|
1409
1437
|
let t = (e.status ?? "queued") === "running";
|
|
1410
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ H("li", {
|
|
1411
1439
|
className: Y.queueRow,
|
|
1412
1440
|
children: [
|
|
1413
|
-
/* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ V(r, {
|
|
1414
1442
|
truncate: !0,
|
|
1415
1443
|
className: Y.grow,
|
|
1416
1444
|
children: e.label
|
|
1417
1445
|
}),
|
|
1418
|
-
/* @__PURE__ */
|
|
1446
|
+
/* @__PURE__ */ V(d, {
|
|
1419
1447
|
tone: t ? "primary" : "neutral",
|
|
1420
1448
|
dot: !0,
|
|
1421
1449
|
pulse: t,
|
|
1422
1450
|
pending: !t,
|
|
1423
1451
|
children: t ? c.runningLabel : c.queuedLabel
|
|
1424
1452
|
}),
|
|
1425
|
-
(!!e.onCancel || !!
|
|
1453
|
+
(!!e.onCancel || !!n) && /* @__PURE__ */ V(a, {
|
|
1426
1454
|
type: "button",
|
|
1427
1455
|
tone: "neutral",
|
|
1428
|
-
|
|
1456
|
+
appearance: "ghost",
|
|
1429
1457
|
iconOnly: !0,
|
|
1430
1458
|
"aria-label": c.cancelAria,
|
|
1431
1459
|
onClick: () => {
|
|
1432
|
-
e.onCancel?.(),
|
|
1460
|
+
e.onCancel?.(), n?.(e.id);
|
|
1433
1461
|
},
|
|
1434
1462
|
className: Y.dismiss,
|
|
1435
|
-
children: /* @__PURE__ */
|
|
1463
|
+
children: /* @__PURE__ */ V(F, {})
|
|
1436
1464
|
})
|
|
1437
1465
|
]
|
|
1438
1466
|
}, e.id);
|
|
@@ -1440,25 +1468,25 @@ function Qe({ items: t, hideHeader: r = !1, onCancel: i, className: o, strings:
|
|
|
1440
1468
|
})]
|
|
1441
1469
|
});
|
|
1442
1470
|
}
|
|
1443
|
-
function
|
|
1471
|
+
function tt({ suggestions: t, onPick: n, hideHeader: a = !1, className: o, strings: s }) {
|
|
1444
1472
|
let c = {
|
|
1445
1473
|
...q,
|
|
1446
1474
|
...s
|
|
1447
1475
|
};
|
|
1448
|
-
return
|
|
1449
|
-
className:
|
|
1450
|
-
children: [!a && /* @__PURE__ */
|
|
1476
|
+
return t.length === 0 ? null : /* @__PURE__ */ H("div", {
|
|
1477
|
+
className: i("ai-chat-suggestions-row--component", Y.suggestions, o),
|
|
1478
|
+
children: [!a && /* @__PURE__ */ H("span", {
|
|
1451
1479
|
className: Y.suggestionsHeader,
|
|
1452
|
-
children: [/* @__PURE__ */
|
|
1453
|
-
}), /* @__PURE__ */
|
|
1480
|
+
children: [/* @__PURE__ */ V(P, { "aria-hidden": !0 }), /* @__PURE__ */ V(e, { children: c.header })]
|
|
1481
|
+
}), /* @__PURE__ */ V("div", {
|
|
1454
1482
|
className: Y.suggestionsScroll,
|
|
1455
|
-
children:
|
|
1483
|
+
children: t.map((e) => {
|
|
1456
1484
|
let t = e.icon;
|
|
1457
|
-
return /* @__PURE__ */
|
|
1485
|
+
return /* @__PURE__ */ H("button", {
|
|
1458
1486
|
type: "button",
|
|
1459
|
-
onClick: () =>
|
|
1487
|
+
onClick: () => n?.(e),
|
|
1460
1488
|
className: Y.suggestion,
|
|
1461
|
-
children: [!!t && /* @__PURE__ */
|
|
1489
|
+
children: [!!t && /* @__PURE__ */ V(t, { "aria-hidden": !0 }), /* @__PURE__ */ V(r, {
|
|
1462
1490
|
tag: "span",
|
|
1463
1491
|
weight: "medium",
|
|
1464
1492
|
children: e.label
|
|
@@ -1468,86 +1496,86 @@ function $e({ suggestions: r, onPick: i, hideHeader: a = !1, className: o, strin
|
|
|
1468
1496
|
})]
|
|
1469
1497
|
});
|
|
1470
1498
|
}
|
|
1471
|
-
function
|
|
1499
|
+
function nt({ value: e, onValueChange: t, onSubmit: n, onStop: o, streaming: s = !1, disabled: c = !1, attachments: l = [], onRemoveAttachment: u, onAttach: d, showAttach: f, leadingActions: p, trailingActions: h, hideHint: g = !1, minRows: _ = 1, maxRows: v = 8, autoFocus: y = !1, submitKeyLabel: x = "↩", className: S, strings: C }) {
|
|
1472
1500
|
let w = {
|
|
1473
1501
|
...W,
|
|
1474
1502
|
...C
|
|
1475
|
-
}, T =
|
|
1476
|
-
E &&
|
|
1477
|
-
text:
|
|
1503
|
+
}, T = R(null), E = !!n && !s && !c && (e.trim().length > 0 || l.length > 0), D = I(() => {
|
|
1504
|
+
E && n?.({
|
|
1505
|
+
text: e,
|
|
1478
1506
|
attachments: l
|
|
1479
1507
|
});
|
|
1480
1508
|
}, [
|
|
1481
1509
|
l,
|
|
1482
1510
|
E,
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
]), O =
|
|
1486
|
-
e.key !== "Enter" || e.shiftKey || e.nativeEvent.isComposing || !
|
|
1487
|
-
}, [
|
|
1488
|
-
return /* @__PURE__ */
|
|
1511
|
+
n,
|
|
1512
|
+
e
|
|
1513
|
+
]), O = I((e) => {
|
|
1514
|
+
e.key !== "Enter" || e.shiftKey || e.nativeEvent.isComposing || !n || (e.preventDefault(), D());
|
|
1515
|
+
}, [n, D]), k = w.hint.replace(/\{\{\s*submitKey\s*\}\}/g, x).replace(/\{\{\s*newlineKey\s*\}\}/g, "⇧↩");
|
|
1516
|
+
return /* @__PURE__ */ H("div", {
|
|
1489
1517
|
"data-disabled": c || void 0,
|
|
1490
|
-
className:
|
|
1518
|
+
className: i("ai-chat-prompt-input--component", Y.composer, S),
|
|
1491
1519
|
children: [
|
|
1492
|
-
l.length > 0 && /* @__PURE__ */
|
|
1520
|
+
l.length > 0 && /* @__PURE__ */ V("div", {
|
|
1493
1521
|
className: Y.composerAttachments,
|
|
1494
|
-
children: /* @__PURE__ */
|
|
1522
|
+
children: /* @__PURE__ */ V(Q, {
|
|
1495
1523
|
attachments: l,
|
|
1496
1524
|
onRemove: u
|
|
1497
1525
|
})
|
|
1498
1526
|
}),
|
|
1499
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ V(m, {
|
|
1500
1528
|
ref: T,
|
|
1501
|
-
value:
|
|
1529
|
+
value: e,
|
|
1502
1530
|
placeholder: w.placeholder,
|
|
1503
1531
|
minRows: _,
|
|
1504
1532
|
maxRows: v,
|
|
1505
|
-
autoFocus:
|
|
1533
|
+
autoFocus: y,
|
|
1506
1534
|
disabled: c,
|
|
1507
|
-
onChange: (e) =>
|
|
1535
|
+
onChange: (e) => t(e.target.value),
|
|
1508
1536
|
onKeyDown: O,
|
|
1509
1537
|
className: Y.composerField
|
|
1510
1538
|
}),
|
|
1511
|
-
/* @__PURE__ */
|
|
1539
|
+
/* @__PURE__ */ H("div", {
|
|
1512
1540
|
className: Y.composerBar,
|
|
1513
1541
|
children: [
|
|
1514
1542
|
p,
|
|
1515
|
-
(f ?? !!d) && /* @__PURE__ */
|
|
1543
|
+
(f ?? !!d) && /* @__PURE__ */ V(a, {
|
|
1516
1544
|
type: "button",
|
|
1517
1545
|
tone: "neutral",
|
|
1518
|
-
|
|
1546
|
+
appearance: "ghost",
|
|
1519
1547
|
iconOnly: !0,
|
|
1520
1548
|
"aria-label": w.attachAria,
|
|
1521
1549
|
disabled: c || !d,
|
|
1522
1550
|
onClick: d,
|
|
1523
|
-
children: /* @__PURE__ */
|
|
1551
|
+
children: /* @__PURE__ */ V(re, {})
|
|
1524
1552
|
}),
|
|
1525
|
-
/* @__PURE__ */
|
|
1553
|
+
/* @__PURE__ */ H("div", {
|
|
1526
1554
|
className: Y.composerBarEnd,
|
|
1527
1555
|
children: [
|
|
1528
|
-
!g && /* @__PURE__ */
|
|
1556
|
+
!g && /* @__PURE__ */ V(r, {
|
|
1529
1557
|
size: "xs",
|
|
1530
1558
|
type: "secondary",
|
|
1531
1559
|
truncate: !0,
|
|
1532
1560
|
className: Y.composerHint,
|
|
1533
1561
|
children: k
|
|
1534
1562
|
}),
|
|
1535
|
-
|
|
1536
|
-
s ? /* @__PURE__ */
|
|
1563
|
+
h,
|
|
1564
|
+
s ? /* @__PURE__ */ V(a, {
|
|
1537
1565
|
type: "button",
|
|
1538
1566
|
tone: "neutral",
|
|
1539
1567
|
iconOnly: !0,
|
|
1540
1568
|
"aria-label": w.stopAria,
|
|
1541
1569
|
disabled: c || !o,
|
|
1542
1570
|
onClick: o,
|
|
1543
|
-
children: /* @__PURE__ */
|
|
1544
|
-
}) : /* @__PURE__ */
|
|
1571
|
+
children: /* @__PURE__ */ V(oe, { className: Y.stopGlyph })
|
|
1572
|
+
}) : /* @__PURE__ */ V(a, {
|
|
1545
1573
|
type: "button",
|
|
1546
1574
|
iconOnly: !0,
|
|
1547
1575
|
"aria-label": w.submitAria,
|
|
1548
1576
|
disabled: !E,
|
|
1549
1577
|
onClick: D,
|
|
1550
|
-
children: /* @__PURE__ */
|
|
1578
|
+
children: /* @__PURE__ */ V(b, {})
|
|
1551
1579
|
})
|
|
1552
1580
|
]
|
|
1553
1581
|
})
|
|
@@ -1558,11 +1586,11 @@ function et({ value: t, onValueChange: r, onSubmit: i, onStop: o, streaming: s =
|
|
|
1558
1586
|
}
|
|
1559
1587
|
//#endregion
|
|
1560
1588
|
//#region src/components/features/ai-chat/ai-chat.tsx
|
|
1561
|
-
function
|
|
1589
|
+
function rt({ messages: e, inputValue: t, onInputChange: n, onSubmit: r, onStop: a, streaming: o = !1, disabled: s = !1, attachments: c = [], onRemoveAttachment: l, onAttach: u, showAttach: d, agent: f, headerActions: p, queue: m = [], onCancelQueueItem: h, suggestions: g = [], onPickSuggestion: _, onMessageCopy: v, onMessageRegenerate: y, onAttachmentOpen: b, disableAutoScroll: x, slots: S, strings: C, className: w }) {
|
|
1562
1590
|
let T = {
|
|
1563
|
-
...
|
|
1591
|
+
...Se,
|
|
1564
1592
|
...C
|
|
1565
|
-
}, E =
|
|
1593
|
+
}, E = I((e, t) => S?.renderMessage ? S.renderMessage(e, t) : /* @__PURE__ */ V($, {
|
|
1566
1594
|
message: e,
|
|
1567
1595
|
strings: T.message,
|
|
1568
1596
|
onCopy: v ? () => v(e) : void 0,
|
|
@@ -1574,9 +1602,9 @@ function tt({ messages: t, inputValue: n, onInputChange: r, onSubmit: i, onStop:
|
|
|
1574
1602
|
v,
|
|
1575
1603
|
y,
|
|
1576
1604
|
S
|
|
1577
|
-
]), D = S?.header ?? (f ? /* @__PURE__ */
|
|
1605
|
+
]), D = S?.header ?? (f ? /* @__PURE__ */ H("div", {
|
|
1578
1606
|
className: Y.header,
|
|
1579
|
-
children: [/* @__PURE__ */
|
|
1607
|
+
children: [/* @__PURE__ */ V(qe, {
|
|
1580
1608
|
name: f.name,
|
|
1581
1609
|
icon: f.icon,
|
|
1582
1610
|
avatar: f.avatar,
|
|
@@ -1584,25 +1612,25 @@ function tt({ messages: t, inputValue: n, onInputChange: r, onSubmit: i, onStop:
|
|
|
1584
1612
|
tone: f.tone,
|
|
1585
1613
|
status: f.status,
|
|
1586
1614
|
variant: "inline"
|
|
1587
|
-
}), !!p && /* @__PURE__ */
|
|
1615
|
+
}), !!p && /* @__PURE__ */ V("div", {
|
|
1588
1616
|
className: Y.headerActions,
|
|
1589
1617
|
children: p
|
|
1590
1618
|
})]
|
|
1591
|
-
}) : null), O = S?.empty ?? (
|
|
1619
|
+
}) : null), O = S?.empty ?? (e.length === 0 ? /* @__PURE__ */ V($e, {
|
|
1592
1620
|
title: T.emptyTitle,
|
|
1593
1621
|
description: T.emptyDescription
|
|
1594
|
-
}) : null), k = S?.queue ?? (m.length > 0 ? /* @__PURE__ */
|
|
1622
|
+
}) : null), k = S?.queue ?? (m.length > 0 ? /* @__PURE__ */ V(et, {
|
|
1595
1623
|
items: m,
|
|
1596
1624
|
onCancel: h,
|
|
1597
1625
|
strings: T.queue
|
|
1598
|
-
}) : null), A = S?.suggestions ?? (g.length > 0 ? /* @__PURE__ */
|
|
1626
|
+
}) : null), A = S?.suggestions ?? (g.length > 0 ? /* @__PURE__ */ V(tt, {
|
|
1599
1627
|
suggestions: g,
|
|
1600
1628
|
onPick: _,
|
|
1601
1629
|
strings: T.suggestions
|
|
1602
|
-
}) : null), j = S?.input ?? /* @__PURE__ */
|
|
1603
|
-
value:
|
|
1604
|
-
onValueChange:
|
|
1605
|
-
onSubmit:
|
|
1630
|
+
}) : null), j = S?.input ?? /* @__PURE__ */ V(nt, {
|
|
1631
|
+
value: t,
|
|
1632
|
+
onValueChange: n,
|
|
1633
|
+
onSubmit: r,
|
|
1606
1634
|
onStop: a,
|
|
1607
1635
|
streaming: o,
|
|
1608
1636
|
disabled: s,
|
|
@@ -1612,12 +1640,12 @@ function tt({ messages: t, inputValue: n, onInputChange: r, onSubmit: i, onStop:
|
|
|
1612
1640
|
showAttach: d,
|
|
1613
1641
|
strings: T.prompt
|
|
1614
1642
|
});
|
|
1615
|
-
return /* @__PURE__ */
|
|
1616
|
-
className:
|
|
1643
|
+
return /* @__PURE__ */ H("div", {
|
|
1644
|
+
className: i("ai-chat--component", Y.chat, w),
|
|
1617
1645
|
children: [
|
|
1618
1646
|
D,
|
|
1619
|
-
/* @__PURE__ */
|
|
1620
|
-
messages:
|
|
1647
|
+
/* @__PURE__ */ V(Qe, {
|
|
1648
|
+
messages: e,
|
|
1621
1649
|
renderMessage: E,
|
|
1622
1650
|
intro: S?.intro,
|
|
1623
1651
|
footer: S?.belowMessages,
|
|
@@ -1625,7 +1653,7 @@ function tt({ messages: t, inputValue: n, onInputChange: r, onSubmit: i, onStop:
|
|
|
1625
1653
|
disableAutoScroll: x,
|
|
1626
1654
|
strings: T.conversation
|
|
1627
1655
|
}),
|
|
1628
|
-
(!!k || !!A || !!j) && /* @__PURE__ */
|
|
1656
|
+
(!!k || !!A || !!j) && /* @__PURE__ */ H("div", {
|
|
1629
1657
|
className: Y.footer,
|
|
1630
1658
|
children: [
|
|
1631
1659
|
k,
|
|
@@ -1637,4 +1665,4 @@ function tt({ messages: t, inputValue: n, onInputChange: r, onSubmit: i, onStop:
|
|
|
1637
1665
|
});
|
|
1638
1666
|
}
|
|
1639
1667
|
//#endregion
|
|
1640
|
-
export {
|
|
1668
|
+
export { qe as AiAgent, Ee as AiArtifact, Me as AiAttachment, ze as AiChainOfThought, rt as AiChat, Q as AiChatAttachmentsStrip, Qe as AiChatConversation, $e as AiChatEmptyState, $ as AiChatMessage, nt as AiChatPromptInput, et as AiChatQueue, tt as AiChatSuggestionsRow, Te as AiCodeBlock, Je as AiConfirmation, Fe as AiMessageBubble, Le as AiReasoning, X as AiShimmer, Ae as AiSources, Ge as AiTask, He as AiToolCall, ge as defaultAiAgentStrings, ye as defaultAiArtifactStrings, xe as defaultAiAttachmentStrings, pe as defaultAiChainOfThoughtStrings, G as defaultAiChatConversationStrings, J as defaultAiChatMessageStrings, W as defaultAiChatPromptInputStrings, K as defaultAiChatQueueStrings, Se as defaultAiChatStrings, q as defaultAiChatSuggestionsStrings, ve as defaultAiCodeBlockStrings, _e as defaultAiConfirmationStrings, U as defaultAiMessageBubbleStrings, fe as defaultAiReasoningStrings, be as defaultAiSourcesStrings, he as defaultAiTaskStrings, me as defaultAiToolCallStrings, Ye as useAiChatScroll };
|