@yoka-ui/ui 1.0.1
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/@Docs-yoka/exports.generated.md +93 -0
- package/@Docs-yoka/llms.txt +23 -0
- package/README.md +113 -0
- package/dist/es/Themes/InputTheme/index.d.ts +6 -0
- package/dist/es/Themes/InputTheme/index.js +22 -0
- package/dist/es/Themes/InputTheme/index.js.map +7 -0
- package/dist/es/Themes/TableTheme/index.d.ts +7 -0
- package/dist/es/Themes/TableTheme/index.js +31 -0
- package/dist/es/Themes/TableTheme/index.js.map +7 -0
- package/dist/es/Themes/TableTheme/index.less +46 -0
- package/dist/es/assets/image/YKUI-logo.png +0 -0
- package/dist/es/assets/less/ant-reset.less +402 -0
- package/dist/es/assets/less/index.less +1 -0
- package/dist/es/assets/less/variables.less +16 -0
- package/dist/es/business/AiChat/MarkdownRender.d.ts +9 -0
- package/dist/es/business/AiChat/MarkdownRender.js +72 -0
- package/dist/es/business/AiChat/MarkdownRender.js.map +7 -0
- package/dist/es/business/AiChat/index.d.ts +16 -0
- package/dist/es/business/AiChat/index.js +733 -0
- package/dist/es/business/AiChat/index.js.map +7 -0
- package/dist/es/business/AiChat/intentRecognizer.d.ts +33 -0
- package/dist/es/business/AiChat/intentRecognizer.js +166 -0
- package/dist/es/business/AiChat/intentRecognizer.js.map +7 -0
- package/dist/es/business/AiChat/navigationManager.d.ts +94 -0
- package/dist/es/business/AiChat/navigationManager.js +208 -0
- package/dist/es/business/AiChat/navigationManager.js.map +7 -0
- package/dist/es/business/AiChat/sse.d.ts +16 -0
- package/dist/es/business/AiChat/sse.js +171 -0
- package/dist/es/business/AiChat/sse.js.map +7 -0
- package/dist/es/business/AiChat/type.d.ts +156 -0
- package/dist/es/business/AiChat/type.js +1 -0
- package/dist/es/business/AiChat/type.js.map +7 -0
- package/dist/es/business/AiChat/useAiChat.d.ts +2 -0
- package/dist/es/business/AiChat/useAiChat.js +268 -0
- package/dist/es/business/AiChat/useAiChat.js.map +7 -0
- package/dist/es/business/AiChat/useTaskWorkflow.d.ts +25 -0
- package/dist/es/business/AiChat/useTaskWorkflow.js +196 -0
- package/dist/es/business/AiChat/useTaskWorkflow.js.map +7 -0
- package/dist/es/business/DrawerPageInfo/index.d.ts +35 -0
- package/dist/es/business/DrawerPageInfo/index.js +133 -0
- package/dist/es/business/DrawerPageInfo/index.js.map +7 -0
- package/dist/es/business/DrawerPageInfo/index.module.less +87 -0
- package/dist/es/business/DrawerPageInfo/test.png +0 -0
- package/dist/es/business/Editor/index.d.ts +11 -0
- package/dist/es/business/Editor/index.js +86 -0
- package/dist/es/business/Editor/index.js.map +7 -0
- package/dist/es/business/Editor/index.less +31 -0
- package/dist/es/business/Empty/empty.png +0 -0
- package/dist/es/business/Empty/index.d.ts +19 -0
- package/dist/es/business/Empty/index.js +51 -0
- package/dist/es/business/Empty/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/assets/images/empty.png +0 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconClose.d.ts +13 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconClose.js +51 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconClose.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconXiala.d.ts +13 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconXiala.js +51 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconXiala.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.d.ts +25 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.js +30 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.module.less +97 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.d.ts +18 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js +74 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.d.ts +37 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js +216 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.d.ts +26 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js +102 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.d.ts +51 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.js +71 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.module.less +260 -0
- package/dist/es/business/ModCommonFilter/index.d.ts +53 -0
- package/dist/es/business/ModCommonFilter/index.js +129 -0
- package/dist/es/business/ModCommonFilter/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/index.module.less +7 -0
- package/dist/es/business/ModCommonFilter/typing.d.ts +20 -0
- package/dist/es/business/ModCommonFilter/typing.js +1 -0
- package/dist/es/business/ModCommonFilter/typing.js.map +7 -0
- package/dist/es/business/YkPorjectSelect/icon-product.png +0 -0
- package/dist/es/business/YkPorjectSelect/index.d.ts +51 -0
- package/dist/es/business/YkPorjectSelect/index.js +260 -0
- package/dist/es/business/YkPorjectSelect/index.js.map +7 -0
- package/dist/es/business/YkPorjectSelect/index.module.less +334 -0
- package/dist/es/business/YkPorjectSelect/product-close.png +0 -0
- package/dist/es/components/Clock/index.d.ts +19 -0
- package/dist/es/components/Clock/index.js +55 -0
- package/dist/es/components/Clock/index.js.map +7 -0
- package/dist/es/components/DebounceInput/index.d.ts +16 -0
- package/dist/es/components/DebounceInput/index.js +77 -0
- package/dist/es/components/DebounceInput/index.js.map +7 -0
- package/dist/es/components/DebounceInput/index.module.less +23 -0
- package/dist/es/components/MultipleSelect/index.d.ts +23 -0
- package/dist/es/components/MultipleSelect/index.js +249 -0
- package/dist/es/components/MultipleSelect/index.js.map +7 -0
- package/dist/es/components/MultipleSelect/index.module.less +174 -0
- package/dist/es/components/NumericInput/index.d.ts +19 -0
- package/dist/es/components/NumericInput/index.js +56 -0
- package/dist/es/components/NumericInput/index.js.map +7 -0
- package/dist/es/components/RefreshButton/index.d.ts +8 -0
- package/dist/es/components/RefreshButton/index.js +21 -0
- package/dist/es/components/RefreshButton/index.js.map +7 -0
- package/dist/es/components/SearchWithHistory/index.d.ts +21 -0
- package/dist/es/components/SearchWithHistory/index.js +115 -0
- package/dist/es/components/SearchWithHistory/index.js.map +7 -0
- package/dist/es/components/SearchWithHistory/index.module.less +64 -0
- package/dist/es/components/TextWithInput/index.d.ts +15 -0
- package/dist/es/components/TextWithInput/index.js +35 -0
- package/dist/es/components/TextWithInput/index.js.map +7 -0
- package/dist/es/components/TextWithToolTip/index.d.ts +17 -0
- package/dist/es/components/TextWithToolTip/index.js +118 -0
- package/dist/es/components/TextWithToolTip/index.js.map +7 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +28 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js +161 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js.map +7 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.less +151 -0
- package/dist/es/components/TreeTransfer/index.d.ts +28 -0
- package/dist/es/components/TreeTransfer/index.js +210 -0
- package/dist/es/components/TreeTransfer/index.js.map +7 -0
- package/dist/es/components/TreeTransfer/index.less +69 -0
- package/dist/es/components/TreeTransfer/types.d.ts +122 -0
- package/dist/es/components/TreeTransfer/types.js +6 -0
- package/dist/es/components/TreeTransfer/types.js.map +7 -0
- package/dist/es/components/TreeTransfer/utils/index.d.ts +120 -0
- package/dist/es/components/TreeTransfer/utils/index.js +195 -0
- package/dist/es/components/TreeTransfer/utils/index.js.map +7 -0
- package/dist/es/components/YkDateRangePicker/YkDateRangePicker.mdx +180 -0
- package/dist/es/components/YkDateRangePicker/index.d.ts +61 -0
- package/dist/es/components/YkDateRangePicker/index.js +317 -0
- package/dist/es/components/YkDateRangePicker/index.js.map +7 -0
- package/dist/es/components/YkDateRangePicker/index.module.less +304 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +16 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +193 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +31 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +576 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +16 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js +55 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/index.d.ts +62 -0
- package/dist/es/components/YkRangeDateWithVS/index.js +130 -0
- package/dist/es/components/YkRangeDateWithVS/index.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/index.module.less +566 -0
- package/dist/es/components/YkRangeDateWithVS/styles.d.ts +2 -0
- package/dist/es/components/YkRangeDateWithVS/styles.js +18 -0
- package/dist/es/components/YkRangeDateWithVS/styles.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/typing.d.ts +15 -0
- package/dist/es/components/YkRangeTimeWithRecent/constants.d.ts +48 -0
- package/dist/es/components/YkRangeTimeWithRecent/constants.js +288 -0
- package/dist/es/components/YkRangeTimeWithRecent/constants.js.map +7 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.d.ts +26 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.js +647 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.js.map +7 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.module.less +263 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.d.ts +17 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.js +103 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.js.map +7 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.less +106 -0
- package/dist/es/creative/ButtonWithProgress/index.d.ts +11 -0
- package/dist/es/creative/ButtonWithProgress/index.js +79 -0
- package/dist/es/creative/ButtonWithProgress/index.js.map +7 -0
- package/dist/es/creative/ButtonWithProgress/index.less +66 -0
- package/dist/es/global.less +12 -0
- package/dist/es/index.d.ts +43 -0
- package/dist/es/index.js +87 -0
- package/dist/es/index.js.map +7 -0
- package/dist/es/index.less +35 -0
- package/dist/es/layout/FlexGrid/index.d.ts +25 -0
- package/dist/es/layout/FlexGrid/index.js +63 -0
- package/dist/es/layout/FlexGrid/index.js.map +7 -0
- package/dist/es/layout/YkContainer/index.d.ts +27 -0
- package/dist/es/layout/YkContainer/index.js +79 -0
- package/dist/es/layout/YkContainer/index.js.map +7 -0
- package/dist/es/layout/YkDrawer/index.d.ts +22 -0
- package/dist/es/layout/YkDrawer/index.js +160 -0
- package/dist/es/layout/YkDrawer/index.js.map +7 -0
- package/dist/es/layout/YkDrawer/index.module.less +45 -0
- package/dist/es/ui/LabelSelect/demo.d.ts +3 -0
- package/dist/es/ui/LabelSelect/demo.js +83 -0
- package/dist/es/ui/LabelSelect/demo.js.map +7 -0
- package/dist/es/ui/LabelSelect/index.d.ts +41 -0
- package/dist/es/ui/LabelSelect/index.js +136 -0
- package/dist/es/ui/LabelSelect/index.js.map +7 -0
- package/dist/es/ui/LogicOperator/index.d.ts +10 -0
- package/dist/es/ui/LogicOperator/index.js +12 -0
- package/dist/es/ui/LogicOperator/index.js.map +7 -0
- package/dist/es/ui/LogicOperator/index.module.less +97 -0
- package/dist/es/ui/YkButton/index.d.ts +9 -0
- package/dist/es/ui/YkButton/index.js +59 -0
- package/dist/es/ui/YkButton/index.js.map +7 -0
- package/dist/es/ui/YkCard/index.d.ts +4 -0
- package/dist/es/ui/YkCard/index.js +79 -0
- package/dist/es/ui/YkCard/index.js.map +7 -0
- package/dist/es/ui/YkCard/index.module.less +30 -0
- package/dist/es/ui/YkCheckbox/index.d.ts +4 -0
- package/dist/es/ui/YkCheckbox/index.js +45 -0
- package/dist/es/ui/YkCheckbox/index.js.map +7 -0
- package/dist/es/ui/YkCheckbox/index.module.less +22 -0
- package/dist/es/ui/YkDescriptions/index.d.ts +4 -0
- package/dist/es/ui/YkDescriptions/index.js +41 -0
- package/dist/es/ui/YkDescriptions/index.js.map +7 -0
- package/dist/es/ui/YkPagination/index.d.ts +4 -0
- package/dist/es/ui/YkPagination/index.js +63 -0
- package/dist/es/ui/YkPagination/index.js.map +7 -0
- package/dist/es/ui/YkPagination/index.module.less +22 -0
- package/dist/es/ui/YkRadio/index.d.ts +4 -0
- package/dist/es/ui/YkRadio/index.js +51 -0
- package/dist/es/ui/YkRadio/index.js.map +7 -0
- package/dist/es/ui/YkRadio/index.module.less +22 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.d.ts +15 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.js +23 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.js.map +7 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.module.less +112 -0
- package/dist/es/ui/YkSegmented/index.d.ts +4 -0
- package/dist/es/ui/YkSegmented/index.js +41 -0
- package/dist/es/ui/YkSegmented/index.js.map +7 -0
- package/dist/es/ui/YkSelect/index.d.ts +7 -0
- package/dist/es/ui/YkSelect/index.js +54 -0
- package/dist/es/ui/YkSelect/index.js.map +7 -0
- package/dist/es/ui/YkSpin/index.d.ts +4 -0
- package/dist/es/ui/YkSpin/index.js +41 -0
- package/dist/es/ui/YkSpin/index.js.map +7 -0
- package/dist/es/ui/YkStatistic/index.d.ts +4 -0
- package/dist/es/ui/YkStatistic/index.js +41 -0
- package/dist/es/ui/YkStatistic/index.js.map +7 -0
- package/dist/es/ui/YkSwitch/index.d.ts +4 -0
- package/dist/es/ui/YkSwitch/index.js +51 -0
- package/dist/es/ui/YkSwitch/index.js.map +7 -0
- package/dist/es/ui/YkTabs/index.d.ts +12 -0
- package/dist/es/ui/YkTabs/index.js +75 -0
- package/dist/es/ui/YkTabs/index.js.map +7 -0
- package/dist/es/ui/YkTabs/index.module.less +11 -0
- package/dist/es/ui/YkTooltip/index.d.ts +4 -0
- package/dist/es/ui/YkTooltip/index.js +50 -0
- package/dist/es/ui/YkTooltip/index.js.map +7 -0
- package/dist/es/utils/styleUtils.d.ts +18 -0
- package/dist/es/utils/styleUtils.js +57 -0
- package/dist/es/utils/styleUtils.js.map +7 -0
- package/dist/es/utils/ykStorybookDoc.d.ts +17 -0
- package/dist/es/utils/ykStorybookDoc.js +18 -0
- package/dist/es/utils/ykStorybookDoc.js.map +7 -0
- package/dist/lib/Themes/InputTheme/index.d.ts +6 -0
- package/dist/lib/Themes/InputTheme/index.js +52 -0
- package/dist/lib/Themes/InputTheme/index.js.map +7 -0
- package/dist/lib/Themes/TableTheme/index.d.ts +7 -0
- package/dist/lib/Themes/TableTheme/index.js +61 -0
- package/dist/lib/Themes/TableTheme/index.js.map +7 -0
- package/dist/lib/Themes/TableTheme/index.less +46 -0
- package/dist/lib/assets/image/YKUI-logo.png +0 -0
- package/dist/lib/assets/less/ant-reset.less +402 -0
- package/dist/lib/assets/less/index.less +1 -0
- package/dist/lib/assets/less/variables.less +16 -0
- package/dist/lib/business/AiChat/MarkdownRender.d.ts +9 -0
- package/dist/lib/business/AiChat/MarkdownRender.js +102 -0
- package/dist/lib/business/AiChat/MarkdownRender.js.map +7 -0
- package/dist/lib/business/AiChat/index.d.ts +16 -0
- package/dist/lib/business/AiChat/index.js +723 -0
- package/dist/lib/business/AiChat/index.js.map +7 -0
- package/dist/lib/business/AiChat/intentRecognizer.d.ts +33 -0
- package/dist/lib/business/AiChat/intentRecognizer.js +193 -0
- package/dist/lib/business/AiChat/intentRecognizer.js.map +7 -0
- package/dist/lib/business/AiChat/navigationManager.d.ts +94 -0
- package/dist/lib/business/AiChat/navigationManager.js +214 -0
- package/dist/lib/business/AiChat/navigationManager.js.map +7 -0
- package/dist/lib/business/AiChat/sse.d.ts +16 -0
- package/dist/lib/business/AiChat/sse.js +171 -0
- package/dist/lib/business/AiChat/sse.js.map +7 -0
- package/dist/lib/business/AiChat/type.d.ts +156 -0
- package/dist/lib/business/AiChat/type.js +18 -0
- package/dist/lib/business/AiChat/type.js.map +7 -0
- package/dist/lib/business/AiChat/useAiChat.d.ts +2 -0
- package/dist/lib/business/AiChat/useAiChat.js +252 -0
- package/dist/lib/business/AiChat/useAiChat.js.map +7 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.d.ts +25 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.js +182 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.js.map +7 -0
- package/dist/lib/business/DrawerPageInfo/index.d.ts +35 -0
- package/dist/lib/business/DrawerPageInfo/index.js +163 -0
- package/dist/lib/business/DrawerPageInfo/index.js.map +7 -0
- package/dist/lib/business/DrawerPageInfo/index.module.less +87 -0
- package/dist/lib/business/DrawerPageInfo/test.png +0 -0
- package/dist/lib/business/Editor/index.d.ts +11 -0
- package/dist/lib/business/Editor/index.js +99 -0
- package/dist/lib/business/Editor/index.js.map +7 -0
- package/dist/lib/business/Editor/index.less +31 -0
- package/dist/lib/business/Empty/empty.png +0 -0
- package/dist/lib/business/Empty/index.d.ts +19 -0
- package/dist/lib/business/Empty/index.js +65 -0
- package/dist/lib/business/Empty/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/assets/images/empty.png +0 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconClose.d.ts +13 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconClose.js +50 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconClose.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconXiala.d.ts +13 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconXiala.js +50 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconXiala.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.d.ts +25 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.js +60 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.module.less +97 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.d.ts +18 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js +69 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.d.ts +37 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js +211 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.d.ts +26 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js +97 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.d.ts +51 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.js +101 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.module.less +260 -0
- package/dist/lib/business/ModCommonFilter/index.d.ts +53 -0
- package/dist/lib/business/ModCommonFilter/index.js +143 -0
- package/dist/lib/business/ModCommonFilter/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/index.module.less +7 -0
- package/dist/lib/business/ModCommonFilter/typing.d.ts +20 -0
- package/dist/lib/business/ModCommonFilter/typing.js +18 -0
- package/dist/lib/business/ModCommonFilter/typing.js.map +7 -0
- package/dist/lib/business/YkPorjectSelect/icon-product.png +0 -0
- package/dist/lib/business/YkPorjectSelect/index.d.ts +51 -0
- package/dist/lib/business/YkPorjectSelect/index.js +235 -0
- package/dist/lib/business/YkPorjectSelect/index.js.map +7 -0
- package/dist/lib/business/YkPorjectSelect/index.module.less +334 -0
- package/dist/lib/business/YkPorjectSelect/product-close.png +0 -0
- package/dist/lib/components/Clock/index.d.ts +19 -0
- package/dist/lib/components/Clock/index.js +85 -0
- package/dist/lib/components/Clock/index.js.map +7 -0
- package/dist/lib/components/DebounceInput/index.d.ts +16 -0
- package/dist/lib/components/DebounceInput/index.js +107 -0
- package/dist/lib/components/DebounceInput/index.js.map +7 -0
- package/dist/lib/components/DebounceInput/index.module.less +23 -0
- package/dist/lib/components/MultipleSelect/index.d.ts +23 -0
- package/dist/lib/components/MultipleSelect/index.js +279 -0
- package/dist/lib/components/MultipleSelect/index.js.map +7 -0
- package/dist/lib/components/MultipleSelect/index.module.less +174 -0
- package/dist/lib/components/NumericInput/index.d.ts +19 -0
- package/dist/lib/components/NumericInput/index.js +67 -0
- package/dist/lib/components/NumericInput/index.js.map +7 -0
- package/dist/lib/components/RefreshButton/index.d.ts +8 -0
- package/dist/lib/components/RefreshButton/index.js +51 -0
- package/dist/lib/components/RefreshButton/index.js.map +7 -0
- package/dist/lib/components/SearchWithHistory/index.d.ts +21 -0
- package/dist/lib/components/SearchWithHistory/index.js +145 -0
- package/dist/lib/components/SearchWithHistory/index.js.map +7 -0
- package/dist/lib/components/SearchWithHistory/index.module.less +64 -0
- package/dist/lib/components/TextWithInput/index.d.ts +15 -0
- package/dist/lib/components/TextWithInput/index.js +65 -0
- package/dist/lib/components/TextWithInput/index.js.map +7 -0
- package/dist/lib/components/TextWithToolTip/index.d.ts +17 -0
- package/dist/lib/components/TextWithToolTip/index.js +134 -0
- package/dist/lib/components/TextWithToolTip/index.js.map +7 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +28 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js +191 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js.map +7 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.less +151 -0
- package/dist/lib/components/TreeTransfer/index.d.ts +28 -0
- package/dist/lib/components/TreeTransfer/index.js +214 -0
- package/dist/lib/components/TreeTransfer/index.js.map +7 -0
- package/dist/lib/components/TreeTransfer/index.less +69 -0
- package/dist/lib/components/TreeTransfer/types.d.ts +122 -0
- package/dist/lib/components/TreeTransfer/types.js +30 -0
- package/dist/lib/components/TreeTransfer/types.js.map +7 -0
- package/dist/lib/components/TreeTransfer/utils/index.d.ts +120 -0
- package/dist/lib/components/TreeTransfer/utils/index.js +208 -0
- package/dist/lib/components/TreeTransfer/utils/index.js.map +7 -0
- package/dist/lib/components/YkDateRangePicker/YkDateRangePicker.mdx +180 -0
- package/dist/lib/components/YkDateRangePicker/index.d.ts +61 -0
- package/dist/lib/components/YkDateRangePicker/index.js +338 -0
- package/dist/lib/components/YkDateRangePicker/index.js.map +7 -0
- package/dist/lib/components/YkDateRangePicker/index.module.less +304 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +16 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +223 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +31 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +587 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +16 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js +85 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/index.d.ts +62 -0
- package/dist/lib/components/YkRangeDateWithVS/index.js +140 -0
- package/dist/lib/components/YkRangeDateWithVS/index.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/index.module.less +566 -0
- package/dist/lib/components/YkRangeDateWithVS/styles.d.ts +2 -0
- package/dist/lib/components/YkRangeDateWithVS/styles.js +48 -0
- package/dist/lib/components/YkRangeDateWithVS/styles.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/typing.d.ts +15 -0
- package/dist/lib/components/YkRangeTimeWithRecent/constants.d.ts +48 -0
- package/dist/lib/components/YkRangeTimeWithRecent/constants.js +333 -0
- package/dist/lib/components/YkRangeTimeWithRecent/constants.js.map +7 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.d.ts +26 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.js +647 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.js.map +7 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.module.less +263 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.d.ts +17 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.js +102 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.js.map +7 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.less +106 -0
- package/dist/lib/creative/ButtonWithProgress/index.d.ts +11 -0
- package/dist/lib/creative/ButtonWithProgress/index.js +70 -0
- package/dist/lib/creative/ButtonWithProgress/index.js.map +7 -0
- package/dist/lib/creative/ButtonWithProgress/index.less +66 -0
- package/dist/lib/global.less +12 -0
- package/dist/lib/index.d.ts +43 -0
- package/dist/lib/index.js +161 -0
- package/dist/lib/index.js.map +7 -0
- package/dist/lib/index.less +35 -0
- package/dist/lib/layout/FlexGrid/index.d.ts +25 -0
- package/dist/lib/layout/FlexGrid/index.js +77 -0
- package/dist/lib/layout/FlexGrid/index.js.map +7 -0
- package/dist/lib/layout/YkContainer/index.d.ts +27 -0
- package/dist/lib/layout/YkContainer/index.js +79 -0
- package/dist/lib/layout/YkContainer/index.js.map +7 -0
- package/dist/lib/layout/YkDrawer/index.d.ts +22 -0
- package/dist/lib/layout/YkDrawer/index.js +152 -0
- package/dist/lib/layout/YkDrawer/index.js.map +7 -0
- package/dist/lib/layout/YkDrawer/index.module.less +45 -0
- package/dist/lib/ui/LabelSelect/demo.d.ts +3 -0
- package/dist/lib/ui/LabelSelect/demo.js +113 -0
- package/dist/lib/ui/LabelSelect/demo.js.map +7 -0
- package/dist/lib/ui/LabelSelect/index.d.ts +41 -0
- package/dist/lib/ui/LabelSelect/index.js +124 -0
- package/dist/lib/ui/LabelSelect/index.js.map +7 -0
- package/dist/lib/ui/LogicOperator/index.d.ts +10 -0
- package/dist/lib/ui/LogicOperator/index.js +42 -0
- package/dist/lib/ui/LogicOperator/index.js.map +7 -0
- package/dist/lib/ui/LogicOperator/index.module.less +97 -0
- package/dist/lib/ui/YkButton/index.d.ts +9 -0
- package/dist/lib/ui/YkButton/index.js +55 -0
- package/dist/lib/ui/YkButton/index.js.map +7 -0
- package/dist/lib/ui/YkCard/index.d.ts +4 -0
- package/dist/lib/ui/YkCard/index.js +76 -0
- package/dist/lib/ui/YkCard/index.js.map +7 -0
- package/dist/lib/ui/YkCard/index.module.less +30 -0
- package/dist/lib/ui/YkCheckbox/index.d.ts +4 -0
- package/dist/lib/ui/YkCheckbox/index.js +42 -0
- package/dist/lib/ui/YkCheckbox/index.js.map +7 -0
- package/dist/lib/ui/YkCheckbox/index.module.less +22 -0
- package/dist/lib/ui/YkDescriptions/index.d.ts +4 -0
- package/dist/lib/ui/YkDescriptions/index.js +41 -0
- package/dist/lib/ui/YkDescriptions/index.js.map +7 -0
- package/dist/lib/ui/YkPagination/index.d.ts +4 -0
- package/dist/lib/ui/YkPagination/index.js +60 -0
- package/dist/lib/ui/YkPagination/index.js.map +7 -0
- package/dist/lib/ui/YkPagination/index.module.less +22 -0
- package/dist/lib/ui/YkRadio/index.d.ts +4 -0
- package/dist/lib/ui/YkRadio/index.js +51 -0
- package/dist/lib/ui/YkRadio/index.js.map +7 -0
- package/dist/lib/ui/YkRadio/index.module.less +22 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.d.ts +15 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.js +53 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.js.map +7 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.module.less +112 -0
- package/dist/lib/ui/YkSegmented/index.d.ts +4 -0
- package/dist/lib/ui/YkSegmented/index.js +41 -0
- package/dist/lib/ui/YkSegmented/index.js.map +7 -0
- package/dist/lib/ui/YkSelect/index.d.ts +7 -0
- package/dist/lib/ui/YkSelect/index.js +54 -0
- package/dist/lib/ui/YkSelect/index.js.map +7 -0
- package/dist/lib/ui/YkSpin/index.d.ts +4 -0
- package/dist/lib/ui/YkSpin/index.js +41 -0
- package/dist/lib/ui/YkSpin/index.js.map +7 -0
- package/dist/lib/ui/YkStatistic/index.d.ts +4 -0
- package/dist/lib/ui/YkStatistic/index.js +41 -0
- package/dist/lib/ui/YkStatistic/index.js.map +7 -0
- package/dist/lib/ui/YkSwitch/index.d.ts +4 -0
- package/dist/lib/ui/YkSwitch/index.js +51 -0
- package/dist/lib/ui/YkSwitch/index.js.map +7 -0
- package/dist/lib/ui/YkTabs/index.d.ts +12 -0
- package/dist/lib/ui/YkTabs/index.js +70 -0
- package/dist/lib/ui/YkTabs/index.js.map +7 -0
- package/dist/lib/ui/YkTabs/index.module.less +11 -0
- package/dist/lib/ui/YkTooltip/index.d.ts +4 -0
- package/dist/lib/ui/YkTooltip/index.js +45 -0
- package/dist/lib/ui/YkTooltip/index.js.map +7 -0
- package/dist/lib/utils/styleUtils.d.ts +18 -0
- package/dist/lib/utils/styleUtils.js +84 -0
- package/dist/lib/utils/styleUtils.js.map +7 -0
- package/dist/lib/utils/ykStorybookDoc.d.ts +17 -0
- package/dist/lib/utils/ykStorybookDoc.js +41 -0
- package/dist/lib/utils/ykStorybookDoc.js.map +7 -0
- package/package.json +148 -0
|
@@ -0,0 +1,723 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/business/AiChat/index.tsx
|
|
30
|
+
var AiChat_exports = {};
|
|
31
|
+
__export(AiChat_exports, {
|
|
32
|
+
NavigationManager: () => import_navigationManager.NavigationManager,
|
|
33
|
+
default: () => AiChat_default,
|
|
34
|
+
delay: () => import_navigationManager.delay,
|
|
35
|
+
generateSuggestions: () => import_intentRecognizer2.generateSuggestions,
|
|
36
|
+
isTaskCreationIntent: () => import_intentRecognizer2.isTaskCreationIntent,
|
|
37
|
+
parseTaskDescription: () => import_intentRecognizer2.parseTaskDescription,
|
|
38
|
+
recognizeIntent: () => import_intentRecognizer2.recognizeIntent,
|
|
39
|
+
useAiChat: () => import_useAiChat2.useAiChat,
|
|
40
|
+
useTaskWorkflow: () => import_useTaskWorkflow2.useTaskWorkflow
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(AiChat_exports);
|
|
43
|
+
var import_icons = require("@ant-design/icons");
|
|
44
|
+
var import_antd = require("antd");
|
|
45
|
+
var import_react = __toESM(require("react"));
|
|
46
|
+
var import_intentRecognizer = require("./intentRecognizer");
|
|
47
|
+
var import_MarkdownRender = __toESM(require("./MarkdownRender"));
|
|
48
|
+
var import_useAiChat = require("./useAiChat");
|
|
49
|
+
var import_useTaskWorkflow = require("./useTaskWorkflow");
|
|
50
|
+
var import_intentRecognizer2 = require("./intentRecognizer");
|
|
51
|
+
var import_navigationManager = require("./navigationManager");
|
|
52
|
+
var import_useAiChat2 = require("./useAiChat");
|
|
53
|
+
var import_useTaskWorkflow2 = require("./useTaskWorkflow");
|
|
54
|
+
var { TextArea } = import_antd.Input;
|
|
55
|
+
var { Title } = import_antd.Typography;
|
|
56
|
+
var AiChat = ({
|
|
57
|
+
apiPath = "/api/ai/chat-stream",
|
|
58
|
+
storageKey = "ai_chat_sessions",
|
|
59
|
+
position: initialPosition = { bottom: 24, right: 24 },
|
|
60
|
+
buttonSize = 56,
|
|
61
|
+
zIndex = 1080,
|
|
62
|
+
showSessionPanel = true,
|
|
63
|
+
onBeforeSend,
|
|
64
|
+
onError,
|
|
65
|
+
onSuccess,
|
|
66
|
+
onFetchSessions,
|
|
67
|
+
onFetchSessionDetail,
|
|
68
|
+
onCreateSession,
|
|
69
|
+
onSendMessage,
|
|
70
|
+
onUploadFile,
|
|
71
|
+
className,
|
|
72
|
+
style,
|
|
73
|
+
renderTrigger,
|
|
74
|
+
renderHeader,
|
|
75
|
+
renderFooter,
|
|
76
|
+
// 增强配置
|
|
77
|
+
taskWorkflow,
|
|
78
|
+
intentRecognition: intentConfig,
|
|
79
|
+
navigation: navConfig
|
|
80
|
+
}) => {
|
|
81
|
+
const {
|
|
82
|
+
sessions,
|
|
83
|
+
activeSession,
|
|
84
|
+
loading,
|
|
85
|
+
visible,
|
|
86
|
+
createNewSession,
|
|
87
|
+
switchSession,
|
|
88
|
+
deleteSession,
|
|
89
|
+
sendQuestion,
|
|
90
|
+
regenerateAnswer,
|
|
91
|
+
deleteSingleMsg,
|
|
92
|
+
cancelRequest,
|
|
93
|
+
toggleVisible
|
|
94
|
+
} = (0, import_useAiChat.useAiChat)({
|
|
95
|
+
apiPath,
|
|
96
|
+
storageKey,
|
|
97
|
+
onBeforeSend,
|
|
98
|
+
onError,
|
|
99
|
+
onSuccess,
|
|
100
|
+
onFetchSessions,
|
|
101
|
+
onFetchSessionDetail,
|
|
102
|
+
onCreateSession,
|
|
103
|
+
onSendMessage,
|
|
104
|
+
onUploadFile
|
|
105
|
+
});
|
|
106
|
+
const {
|
|
107
|
+
tasks,
|
|
108
|
+
createTask,
|
|
109
|
+
updateTaskStatus,
|
|
110
|
+
deleteTask,
|
|
111
|
+
createTaskFromNaturalLanguage,
|
|
112
|
+
updateUrlWithTaskId,
|
|
113
|
+
refreshCurrentPage,
|
|
114
|
+
executeTaskCreationWorkflow
|
|
115
|
+
} = (0, import_useTaskWorkflow.useTaskWorkflow)({
|
|
116
|
+
enabled: taskWorkflow == null ? void 0 : taskWorkflow.enabled,
|
|
117
|
+
createTaskApi: taskWorkflow == null ? void 0 : taskWorkflow.createTaskApi,
|
|
118
|
+
supportedTaskTypes: taskWorkflow == null ? void 0 : taskWorkflow.supportedTaskTypes,
|
|
119
|
+
autoNavigate: taskWorkflow == null ? void 0 : taskWorkflow.autoNavigate,
|
|
120
|
+
refreshDelay: navConfig == null ? void 0 : navConfig.refreshDelay,
|
|
121
|
+
taskIdParamName: taskWorkflow == null ? void 0 : taskWorkflow.taskIdParamName,
|
|
122
|
+
taskTypeParamName: taskWorkflow == null ? void 0 : taskWorkflow.taskTypeParamName,
|
|
123
|
+
onTaskCreated: (taskId, taskData) => {
|
|
124
|
+
if (activeSession) {
|
|
125
|
+
const systemMsg = {
|
|
126
|
+
id: `${Date.now()}_sys`,
|
|
127
|
+
role: "system",
|
|
128
|
+
content: `任务创建成功,ID: ${taskId}`,
|
|
129
|
+
taskId
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
onError
|
|
134
|
+
});
|
|
135
|
+
const [inputValue, setInputValue] = (0, import_react.useState)("");
|
|
136
|
+
const [showSessions, setShowSessions] = (0, import_react.useState)(false);
|
|
137
|
+
const [suggestions, setSuggestions] = (0, import_react.useState)([]);
|
|
138
|
+
const [fileList, setFileList] = (0, import_react.useState)([]);
|
|
139
|
+
const [isMaximized, setIsMaximized] = (0, import_react.useState)(false);
|
|
140
|
+
const [dialogPosition, setDialogPosition] = (0, import_react.useState)({ x: 0, y: 0 });
|
|
141
|
+
const [isDragging, setIsDragging] = (0, import_react.useState)(false);
|
|
142
|
+
const dragOffset = (0, import_react.useRef)({ x: 0, y: 0 });
|
|
143
|
+
const messagesEndRef = (0, import_react.useRef)(null);
|
|
144
|
+
const triggerRef = (0, import_react.useRef)(null);
|
|
145
|
+
const fileInputRef = (0, import_react.useRef)(null);
|
|
146
|
+
(0, import_react.useEffect)(() => {
|
|
147
|
+
var _a;
|
|
148
|
+
(_a = messagesEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
|
|
149
|
+
}, [activeSession == null ? void 0 : activeSession.messages]);
|
|
150
|
+
const handleTriggerMouseDown = (0, import_react.useCallback)(
|
|
151
|
+
(e) => {
|
|
152
|
+
if (visible)
|
|
153
|
+
return;
|
|
154
|
+
const target = e.target;
|
|
155
|
+
if (target.closest(".ant-upload, .ant-btn"))
|
|
156
|
+
return;
|
|
157
|
+
e.preventDefault();
|
|
158
|
+
const triggerEl = triggerRef.current;
|
|
159
|
+
if (!triggerEl)
|
|
160
|
+
return;
|
|
161
|
+
const rect = triggerEl.getBoundingClientRect();
|
|
162
|
+
dragOffset.current = {
|
|
163
|
+
x: e.clientX - rect.left,
|
|
164
|
+
y: e.clientY - rect.top
|
|
165
|
+
};
|
|
166
|
+
setIsDragging(true);
|
|
167
|
+
},
|
|
168
|
+
[visible]
|
|
169
|
+
);
|
|
170
|
+
const handleTriggerMouseMove = (0, import_react.useCallback)(
|
|
171
|
+
(e) => {
|
|
172
|
+
if (!isDragging || visible)
|
|
173
|
+
return;
|
|
174
|
+
setDialogPosition({
|
|
175
|
+
x: e.clientX - dragOffset.current.x,
|
|
176
|
+
y: e.clientY - dragOffset.current.y
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
[isDragging, visible]
|
|
180
|
+
);
|
|
181
|
+
const handleTriggerMouseUp = (0, import_react.useCallback)(() => {
|
|
182
|
+
setIsDragging(false);
|
|
183
|
+
}, []);
|
|
184
|
+
(0, import_react.useEffect)(() => {
|
|
185
|
+
if (isDragging && !visible) {
|
|
186
|
+
document.addEventListener("mousemove", handleTriggerMouseMove);
|
|
187
|
+
document.addEventListener("mouseup", handleTriggerMouseUp);
|
|
188
|
+
return () => {
|
|
189
|
+
document.removeEventListener("mousemove", handleTriggerMouseMove);
|
|
190
|
+
document.removeEventListener("mouseup", handleTriggerMouseUp);
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
return void 0;
|
|
194
|
+
}, [isDragging, visible, handleTriggerMouseMove, handleTriggerMouseUp]);
|
|
195
|
+
const handleInputChange = (0, import_react.useCallback)((e) => {
|
|
196
|
+
const value = e.target.value;
|
|
197
|
+
setInputValue(value);
|
|
198
|
+
if (value.length > 3) {
|
|
199
|
+
const intent = (0, import_intentRecognizer.recognizeIntent)(value);
|
|
200
|
+
const newSuggestions = (0, import_intentRecognizer.generateSuggestions)(value, intent);
|
|
201
|
+
setSuggestions(newSuggestions);
|
|
202
|
+
} else {
|
|
203
|
+
setSuggestions([]);
|
|
204
|
+
}
|
|
205
|
+
}, []);
|
|
206
|
+
const handleFileChange = (0, import_react.useCallback)(
|
|
207
|
+
async (info) => {
|
|
208
|
+
const uploadFile = info.file;
|
|
209
|
+
if (!uploadFile || !uploadFile.originFileObj) {
|
|
210
|
+
setFileList(info.fileList);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const file = uploadFile.originFileObj;
|
|
214
|
+
const isImage = file.type.startsWith("image/");
|
|
215
|
+
const fileType = isImage ? "image" : "document";
|
|
216
|
+
try {
|
|
217
|
+
if (onUploadFile && activeSession) {
|
|
218
|
+
const result = await onUploadFile({
|
|
219
|
+
sessionId: activeSession.id,
|
|
220
|
+
file,
|
|
221
|
+
type: fileType
|
|
222
|
+
});
|
|
223
|
+
const uploadedFile = {
|
|
224
|
+
uid: file.name,
|
|
225
|
+
name: result.name || file.name,
|
|
226
|
+
status: "done",
|
|
227
|
+
url: result.url
|
|
228
|
+
};
|
|
229
|
+
setFileList([...fileList, uploadedFile]);
|
|
230
|
+
import_antd.message.success(`${fileType === "image" ? "图片" : "文件"}上传成功`);
|
|
231
|
+
} else {
|
|
232
|
+
setFileList([...fileList, uploadFile]);
|
|
233
|
+
}
|
|
234
|
+
} catch (err) {
|
|
235
|
+
console.error("文件上传失败:", err);
|
|
236
|
+
import_antd.message.error("文件上传失败");
|
|
237
|
+
setFileList(fileList.filter((f) => f.uid !== file.name));
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
[fileList, activeSession, onUploadFile]
|
|
241
|
+
);
|
|
242
|
+
const handleSend = (0, import_react.useCallback)(async () => {
|
|
243
|
+
if (!inputValue.trim() && fileList.length === 0) {
|
|
244
|
+
import_antd.message.warning("请输入问题或上传文件");
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
let content = inputValue.trim();
|
|
248
|
+
if (fileList.length > 0) {
|
|
249
|
+
const fileInfo = fileList.map((f) => f.name).join(", ");
|
|
250
|
+
content += `
|
|
251
|
+
[附件: ${fileInfo}]`;
|
|
252
|
+
}
|
|
253
|
+
setInputValue("");
|
|
254
|
+
setSuggestions([]);
|
|
255
|
+
setFileList([]);
|
|
256
|
+
const intentEnabled = (intentConfig == null ? void 0 : intentConfig.enabled) !== false;
|
|
257
|
+
if (intentEnabled && (0, import_intentRecognizer.isTaskCreationIntent)(content)) {
|
|
258
|
+
await executeTaskCreationWorkflow(content);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
sendQuestion(content);
|
|
262
|
+
}, [inputValue, fileList, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
|
|
263
|
+
const copyMsg = (c) => {
|
|
264
|
+
navigator.clipboard.writeText(c);
|
|
265
|
+
import_antd.message.success("复制成功");
|
|
266
|
+
};
|
|
267
|
+
const toggleMaximize = (0, import_react.useCallback)(() => {
|
|
268
|
+
setIsMaximized((prev) => !prev);
|
|
269
|
+
}, []);
|
|
270
|
+
const renderMsg = (item) => /* @__PURE__ */ import_react.default.createElement(
|
|
271
|
+
import_antd.List.Item,
|
|
272
|
+
{
|
|
273
|
+
key: item.id,
|
|
274
|
+
style: {
|
|
275
|
+
justifyContent: item.role === "user" ? "flex-end" : "flex-start",
|
|
276
|
+
marginBottom: 12,
|
|
277
|
+
padding: "4px 0"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
281
|
+
"div",
|
|
282
|
+
{
|
|
283
|
+
style: {
|
|
284
|
+
maxWidth: "85%",
|
|
285
|
+
padding: "10px 14px",
|
|
286
|
+
borderRadius: 12,
|
|
287
|
+
backgroundColor: item.role === "user" ? "#1677ff" : item.role === "system" ? "#f6ffed" : "#fafafa",
|
|
288
|
+
color: item.role === "user" ? "#fff" : "#333",
|
|
289
|
+
border: item.role === "ai" ? "1px solid #f0f0f0" : item.role === "system" ? "1px solid #b7eb8f" : "none",
|
|
290
|
+
boxShadow: item.role === "user" ? "0 2px 8px rgba(22, 119, 255, 0.3)" : item.role === "system" ? "0 1px 4px rgba(82, 196, 26, 0.1)" : "0 1px 4px rgba(0,0,0,0.05)"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
item.role === "user" ? /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "flex-start", gap: 8 } }, /* @__PURE__ */ import_react.default.createElement("span", null, item.content), /* @__PURE__ */ import_react.default.createElement(
|
|
294
|
+
import_icons.CopyOutlined,
|
|
295
|
+
{
|
|
296
|
+
onClick: () => copyMsg(item.content),
|
|
297
|
+
style: {
|
|
298
|
+
fontSize: 12,
|
|
299
|
+
color: "rgba(255,255,255,0.7)",
|
|
300
|
+
cursor: "pointer",
|
|
301
|
+
flexShrink: 0
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
)) : item.role === "system" ? /* @__PURE__ */ import_react.default.createElement(
|
|
305
|
+
"div",
|
|
306
|
+
{
|
|
307
|
+
style: {
|
|
308
|
+
display: "flex",
|
|
309
|
+
alignItems: "center",
|
|
310
|
+
gap: 8,
|
|
311
|
+
fontSize: 13
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
/* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#52c41a" } }, "✓"),
|
|
315
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, item.content),
|
|
316
|
+
item.taskId && /* @__PURE__ */ import_react.default.createElement(
|
|
317
|
+
import_antd.Button,
|
|
318
|
+
{
|
|
319
|
+
type: "link",
|
|
320
|
+
size: "small",
|
|
321
|
+
style: { padding: 0, fontSize: 12 },
|
|
322
|
+
onClick: () => updateUrlWithTaskId(item.taskId)
|
|
323
|
+
},
|
|
324
|
+
"查看任务"
|
|
325
|
+
)
|
|
326
|
+
) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { style: { minHeight: 20 } }, /* @__PURE__ */ import_react.default.createElement(import_MarkdownRender.default, { content: item.content, msgId: item.id, isAi: true, onDelete: deleteSingleMsg })), item.loading && /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#1677ff", fontSize: 12 } }, " 思考中..."), !item.loading && /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 8, style: { fontSize: 12, marginTop: 6, display: "flex" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "复制" }, /* @__PURE__ */ import_react.default.createElement(import_icons.CopyOutlined, { onClick: () => copyMsg(item.content), style: { cursor: "pointer", color: "#999" } })), /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "重新生成" }, /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, { onClick: () => regenerateAnswer(item), style: { cursor: "pointer", color: "#999" } }))))
|
|
327
|
+
)
|
|
328
|
+
);
|
|
329
|
+
const renderSession = (s) => /* @__PURE__ */ import_react.default.createElement(
|
|
330
|
+
import_antd.List.Item,
|
|
331
|
+
{
|
|
332
|
+
key: s.id,
|
|
333
|
+
onClick: (e) => {
|
|
334
|
+
if (e.target.closest(".ant-popover, .ant-popconfirm")) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
switchSession(s.id);
|
|
338
|
+
},
|
|
339
|
+
style: {
|
|
340
|
+
padding: "10px 12px",
|
|
341
|
+
borderRadius: 8,
|
|
342
|
+
cursor: "pointer",
|
|
343
|
+
backgroundColor: (activeSession == null ? void 0 : activeSession.id) === s.id ? "#e6f7ff" : "#fff",
|
|
344
|
+
transition: "all 0.2s",
|
|
345
|
+
marginBottom: 8
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
349
|
+
"div",
|
|
350
|
+
{
|
|
351
|
+
style: {
|
|
352
|
+
flex: 1,
|
|
353
|
+
overflow: "hidden",
|
|
354
|
+
display: "flex",
|
|
355
|
+
justifyContent: "space-between",
|
|
356
|
+
alignItems: "center"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
360
|
+
"div",
|
|
361
|
+
{
|
|
362
|
+
style: {
|
|
363
|
+
fontSize: 14,
|
|
364
|
+
fontWeight: 500,
|
|
365
|
+
overflow: "hidden",
|
|
366
|
+
textOverflow: "ellipsis",
|
|
367
|
+
whiteSpace: "nowrap"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
s.title
|
|
371
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { style: { fontSize: 12, color: "#999", marginTop: 2 } }, new Date(s.createTime).toLocaleString().slice(0, 16))),
|
|
372
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
373
|
+
import_antd.Popconfirm,
|
|
374
|
+
{
|
|
375
|
+
title: "确定删除?",
|
|
376
|
+
onConfirm: (e) => {
|
|
377
|
+
deleteSession(s.id, e);
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
381
|
+
import_icons.DeleteOutlined,
|
|
382
|
+
{
|
|
383
|
+
style: { color: "#ff4d4f", cursor: "pointer", marginLeft: 8 },
|
|
384
|
+
onClick: (e) => e.stopPropagation()
|
|
385
|
+
}
|
|
386
|
+
)
|
|
387
|
+
)
|
|
388
|
+
)
|
|
389
|
+
);
|
|
390
|
+
const getDialogStyle = () => {
|
|
391
|
+
if (isMaximized) {
|
|
392
|
+
return {
|
|
393
|
+
position: "fixed",
|
|
394
|
+
top: 0,
|
|
395
|
+
left: 0,
|
|
396
|
+
width: "100vw",
|
|
397
|
+
height: "100vh",
|
|
398
|
+
borderRadius: 0
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
const baseStyle = {
|
|
402
|
+
position: "relative",
|
|
403
|
+
width: showSessions ? 960 : 720,
|
|
404
|
+
height: 680,
|
|
405
|
+
borderRadius: 12
|
|
406
|
+
};
|
|
407
|
+
if (dialogPosition.x !== 0 || dialogPosition.y !== 0) {
|
|
408
|
+
return {
|
|
409
|
+
...baseStyle,
|
|
410
|
+
transform: `translate(${dialogPosition.x}px, ${dialogPosition.y}px)`
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
return baseStyle;
|
|
414
|
+
};
|
|
415
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
416
|
+
"div",
|
|
417
|
+
{
|
|
418
|
+
className,
|
|
419
|
+
style: {
|
|
420
|
+
position: "fixed",
|
|
421
|
+
bottom: initialPosition.bottom,
|
|
422
|
+
right: initialPosition.right,
|
|
423
|
+
zIndex,
|
|
424
|
+
display: "flex",
|
|
425
|
+
flexDirection: "column",
|
|
426
|
+
alignItems: "flex-end",
|
|
427
|
+
transform: dialogPosition.x !== 0 || dialogPosition.y !== 0 ? `translate(${dialogPosition.x}px, ${dialogPosition.y}px)` : void 0,
|
|
428
|
+
...style
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
!visible ? renderTrigger ? /* @__PURE__ */ import_react.default.createElement(
|
|
432
|
+
"div",
|
|
433
|
+
{
|
|
434
|
+
ref: triggerRef,
|
|
435
|
+
onMouseDown: handleTriggerMouseDown,
|
|
436
|
+
onClick: () => !isDragging && toggleVisible(true),
|
|
437
|
+
style: { cursor: isDragging ? "grabbing" : "grab" }
|
|
438
|
+
},
|
|
439
|
+
renderTrigger
|
|
440
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
441
|
+
"div",
|
|
442
|
+
{
|
|
443
|
+
ref: triggerRef,
|
|
444
|
+
onMouseDown: handleTriggerMouseDown,
|
|
445
|
+
onClick: () => !isDragging && toggleVisible(true),
|
|
446
|
+
style: { cursor: isDragging ? "grabbing" : "grab" }
|
|
447
|
+
},
|
|
448
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
449
|
+
import_antd.Button,
|
|
450
|
+
{
|
|
451
|
+
type: "primary",
|
|
452
|
+
shape: "circle",
|
|
453
|
+
size: "large",
|
|
454
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.MessageOutlined, null),
|
|
455
|
+
style: {
|
|
456
|
+
width: buttonSize,
|
|
457
|
+
height: buttonSize,
|
|
458
|
+
boxShadow: "0 4px 16px rgba(22, 119, 255, 0.4)"
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
)
|
|
462
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
463
|
+
"div",
|
|
464
|
+
{
|
|
465
|
+
style: {
|
|
466
|
+
...getDialogStyle(),
|
|
467
|
+
background: "#fff",
|
|
468
|
+
boxShadow: "0 4px 20px rgba(0,0,0,0.15)",
|
|
469
|
+
overflow: "hidden",
|
|
470
|
+
display: "flex",
|
|
471
|
+
flexDirection: "row",
|
|
472
|
+
marginBottom: isMaximized ? 0 : 12,
|
|
473
|
+
transition: "all 0.3s ease"
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
showSessionPanel && showSessions && /* @__PURE__ */ import_react.default.createElement(
|
|
477
|
+
"div",
|
|
478
|
+
{
|
|
479
|
+
style: {
|
|
480
|
+
width: 280,
|
|
481
|
+
borderRight: "1px solid #f0f0f0",
|
|
482
|
+
background: "#fafafa",
|
|
483
|
+
display: "flex",
|
|
484
|
+
flexDirection: "column",
|
|
485
|
+
flexShrink: 0
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
489
|
+
"div",
|
|
490
|
+
{
|
|
491
|
+
style: {
|
|
492
|
+
padding: "12px 16px",
|
|
493
|
+
borderBottom: "1px solid #f0f0f0",
|
|
494
|
+
display: "flex",
|
|
495
|
+
justifyContent: "space-between",
|
|
496
|
+
alignItems: "center"
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
/* @__PURE__ */ import_react.default.createElement(Title, { level: 5, style: { margin: 0, fontSize: 16 } }, "历史会话"),
|
|
500
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", size: "small", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, null), onClick: () => setShowSessions(false) })
|
|
501
|
+
),
|
|
502
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, padding: 16, overflowY: "auto" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
503
|
+
import_antd.Button,
|
|
504
|
+
{
|
|
505
|
+
type: "primary",
|
|
506
|
+
block: true,
|
|
507
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.PlusOutlined, null),
|
|
508
|
+
onClick: createNewSession,
|
|
509
|
+
style: { marginBottom: 12 }
|
|
510
|
+
},
|
|
511
|
+
"新建会话"
|
|
512
|
+
), /* @__PURE__ */ import_react.default.createElement(import_antd.List, { dataSource: sessions, renderItem: renderSession, locale: { emptyText: "暂无会话" } }))
|
|
513
|
+
),
|
|
514
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
515
|
+
"div",
|
|
516
|
+
{
|
|
517
|
+
style: {
|
|
518
|
+
flex: 1,
|
|
519
|
+
display: "flex",
|
|
520
|
+
flexDirection: "column",
|
|
521
|
+
minWidth: 0
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
renderHeader || /* @__PURE__ */ import_react.default.createElement(
|
|
525
|
+
"div",
|
|
526
|
+
{
|
|
527
|
+
className: "ai-chat-header",
|
|
528
|
+
style: {
|
|
529
|
+
padding: "12px 16px",
|
|
530
|
+
background: "#fafafa",
|
|
531
|
+
borderBottom: "1px solid #f0f0f0",
|
|
532
|
+
display: "flex",
|
|
533
|
+
justifyContent: "space-between",
|
|
534
|
+
alignItems: "center",
|
|
535
|
+
flexShrink: 0
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, showSessionPanel && /* @__PURE__ */ import_react.default.createElement(
|
|
539
|
+
import_antd.Button,
|
|
540
|
+
{
|
|
541
|
+
type: showSessions ? "primary" : "text",
|
|
542
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.MenuOutlined, null),
|
|
543
|
+
size: "small",
|
|
544
|
+
onClick: () => setShowSessions(!showSessions)
|
|
545
|
+
},
|
|
546
|
+
showSessions ? "收起" : "会话"
|
|
547
|
+
), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.PlusOutlined, null), onClick: createNewSession, size: "small" }, "新会话")),
|
|
548
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: isMaximized ? "还原" : "最大化" }, /* @__PURE__ */ import_react.default.createElement(
|
|
549
|
+
import_antd.Button,
|
|
550
|
+
{
|
|
551
|
+
type: "text",
|
|
552
|
+
icon: isMaximized ? /* @__PURE__ */ import_react.default.createElement(import_icons.CompressOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.ExpandOutlined, null),
|
|
553
|
+
onClick: toggleMaximize,
|
|
554
|
+
size: "small"
|
|
555
|
+
}
|
|
556
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "关闭" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, null), onClick: () => toggleVisible(false), size: "small" })))
|
|
557
|
+
),
|
|
558
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
559
|
+
"div",
|
|
560
|
+
{
|
|
561
|
+
style: {
|
|
562
|
+
flex: 1,
|
|
563
|
+
padding: 16,
|
|
564
|
+
overflowY: "auto"
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
!activeSession || activeSession.messages.length === 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
568
|
+
"div",
|
|
569
|
+
{
|
|
570
|
+
style: {
|
|
571
|
+
textAlign: "center",
|
|
572
|
+
padding: "60px 0",
|
|
573
|
+
color: "#999"
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
/* @__PURE__ */ import_react.default.createElement(import_icons.MessageOutlined, { style: { fontSize: 48, color: "#d9d9d9" } }),
|
|
577
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 16, fontSize: 16 } }, "开始你的 AI 对话"),
|
|
578
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 8, fontSize: 13, color: "#bfbfbf" } }, "我可以帮你解答问题、创建任务"),
|
|
579
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "primary", onClick: createNewSession, style: { marginTop: 20 } }, "新建会话")
|
|
580
|
+
) : /* @__PURE__ */ import_react.default.createElement(import_antd.List, { dataSource: activeSession.messages, renderItem: renderMsg }),
|
|
581
|
+
/* @__PURE__ */ import_react.default.createElement("div", { ref: messagesEndRef })
|
|
582
|
+
),
|
|
583
|
+
renderFooter || /* @__PURE__ */ import_react.default.createElement(
|
|
584
|
+
"div",
|
|
585
|
+
{
|
|
586
|
+
style: {
|
|
587
|
+
padding: 12,
|
|
588
|
+
borderTop: "1px solid #f0f0f0",
|
|
589
|
+
background: "#fafafa",
|
|
590
|
+
flexShrink: 0
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
suggestions.length > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
594
|
+
"div",
|
|
595
|
+
{
|
|
596
|
+
style: {
|
|
597
|
+
marginBottom: 8,
|
|
598
|
+
display: "flex",
|
|
599
|
+
flexWrap: "wrap",
|
|
600
|
+
gap: 4
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
suggestions.slice(0, 3).map((suggestion, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
604
|
+
import_antd.Button,
|
|
605
|
+
{
|
|
606
|
+
key: index,
|
|
607
|
+
size: "small",
|
|
608
|
+
type: "dashed",
|
|
609
|
+
onClick: () => setInputValue(suggestion),
|
|
610
|
+
style: { fontSize: 12 }
|
|
611
|
+
},
|
|
612
|
+
suggestion
|
|
613
|
+
))
|
|
614
|
+
),
|
|
615
|
+
fileList.length > 0 && /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 8 } }, fileList.map((file) => /* @__PURE__ */ import_react.default.createElement(
|
|
616
|
+
"div",
|
|
617
|
+
{
|
|
618
|
+
key: file.uid,
|
|
619
|
+
style: {
|
|
620
|
+
display: "inline-block",
|
|
621
|
+
padding: "4px 8px",
|
|
622
|
+
background: "#e6f7ff",
|
|
623
|
+
borderRadius: 4,
|
|
624
|
+
marginRight: 8,
|
|
625
|
+
fontSize: 12
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
file.name,
|
|
629
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
630
|
+
import_icons.CloseOutlined,
|
|
631
|
+
{
|
|
632
|
+
style: {
|
|
633
|
+
marginLeft: 8,
|
|
634
|
+
cursor: "pointer",
|
|
635
|
+
fontSize: 10
|
|
636
|
+
},
|
|
637
|
+
onClick: () => setFileList(fileList.filter((f) => f.uid !== file.uid))
|
|
638
|
+
}
|
|
639
|
+
)
|
|
640
|
+
))),
|
|
641
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
642
|
+
TextArea,
|
|
643
|
+
{
|
|
644
|
+
value: inputValue,
|
|
645
|
+
onChange: handleInputChange,
|
|
646
|
+
placeholder: "输入问题或任务描述,如:帮我创建一个paimon调用任务",
|
|
647
|
+
autoSize: { minRows: 2, maxRows: 4 },
|
|
648
|
+
onPressEnter: (e) => {
|
|
649
|
+
if (!e.shiftKey) {
|
|
650
|
+
e.preventDefault();
|
|
651
|
+
handleSend();
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
style: {
|
|
655
|
+
marginBottom: 8,
|
|
656
|
+
borderRadius: 8,
|
|
657
|
+
paddingRight: 80
|
|
658
|
+
},
|
|
659
|
+
disabled: loading
|
|
660
|
+
}
|
|
661
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
662
|
+
"div",
|
|
663
|
+
{
|
|
664
|
+
style: {
|
|
665
|
+
position: "absolute",
|
|
666
|
+
right: 12,
|
|
667
|
+
bottom: 16,
|
|
668
|
+
display: "flex",
|
|
669
|
+
gap: 8
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
673
|
+
import_antd.Upload,
|
|
674
|
+
{
|
|
675
|
+
fileList,
|
|
676
|
+
onChange: handleFileChange,
|
|
677
|
+
beforeUpload: () => false,
|
|
678
|
+
showUploadList: false,
|
|
679
|
+
accept: "image/*"
|
|
680
|
+
},
|
|
681
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "上传图片" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", size: "small", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.FileImageOutlined, null) }))
|
|
682
|
+
),
|
|
683
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
684
|
+
import_antd.Upload,
|
|
685
|
+
{
|
|
686
|
+
fileList,
|
|
687
|
+
onChange: handleFileChange,
|
|
688
|
+
beforeUpload: () => false,
|
|
689
|
+
showUploadList: false
|
|
690
|
+
},
|
|
691
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "上传文件" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", size: "small", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.PaperClipOutlined, null) }))
|
|
692
|
+
)
|
|
693
|
+
)),
|
|
694
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, loading && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { danger: true, icon: /* @__PURE__ */ import_react.default.createElement(import_icons.StopOutlined, null), onClick: cancelRequest, size: "small" }, "终止"), /* @__PURE__ */ import_react.default.createElement(
|
|
695
|
+
import_antd.Button,
|
|
696
|
+
{
|
|
697
|
+
type: "primary",
|
|
698
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.SendOutlined, null),
|
|
699
|
+
onClick: handleSend,
|
|
700
|
+
loading,
|
|
701
|
+
disabled: !inputValue.trim() && fileList.length === 0,
|
|
702
|
+
size: "small"
|
|
703
|
+
},
|
|
704
|
+
"发送"
|
|
705
|
+
)))
|
|
706
|
+
)
|
|
707
|
+
)
|
|
708
|
+
)
|
|
709
|
+
);
|
|
710
|
+
};
|
|
711
|
+
var AiChat_default = AiChat;
|
|
712
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
713
|
+
0 && (module.exports = {
|
|
714
|
+
NavigationManager,
|
|
715
|
+
delay,
|
|
716
|
+
generateSuggestions,
|
|
717
|
+
isTaskCreationIntent,
|
|
718
|
+
parseTaskDescription,
|
|
719
|
+
recognizeIntent,
|
|
720
|
+
useAiChat,
|
|
721
|
+
useTaskWorkflow
|
|
722
|
+
});
|
|
723
|
+
//# sourceMappingURL=index.js.map
|