@yoka-ui/ui 1.0.10-test → 1.1.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/@Docs-yoka/exports.generated.md +68 -62
- package/README.md +40 -189
- package/dist/es/assets/image/skills.zip +0 -0
- package/dist/es/business/AiChat/index.d.ts +3 -3
- package/dist/es/business/AiChat/index.js +331 -119
- package/dist/es/business/AiChat/index.js.map +3 -3
- package/dist/es/business/AiChat/intentRecognizer.js.map +1 -1
- package/dist/es/business/AiChat/navigationManager.js +6 -6
- package/dist/es/business/AiChat/navigationManager.js.map +2 -2
- package/dist/es/business/AiChat/sse.d.ts +15 -0
- package/dist/es/business/AiChat/sse.js +118 -7
- package/dist/es/business/AiChat/sse.js.map +2 -2
- package/dist/es/business/AiChat/type.d.ts +22 -23
- package/dist/es/business/AiChat/useAiChat.js +105 -75
- package/dist/es/business/AiChat/useAiChat.js.map +3 -3
- package/dist/es/business/AiChat/useTaskWorkflow.d.ts +1 -2
- package/dist/es/business/AiChat/useTaskWorkflow.js +2 -36
- package/dist/es/business/AiChat/useTaskWorkflow.js.map +2 -2
- package/dist/es/business/DrawerPageInfo/index.js.map +1 -1
- package/dist/es/business/Editor/index.d.ts +1 -1
- package/dist/es/business/Editor/index.js.map +2 -2
- package/dist/es/business/Empty/index.js +1 -1
- package/dist/es/business/Empty/index.js.map +1 -1
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js +3 -3
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
- package/dist/es/business/ModCommonFilter/index.d.ts +1 -1
- package/dist/es/business/ModCommonFilter/index.js.map +2 -2
- package/dist/es/business/YkCharts/Area.d.ts +18 -0
- package/dist/es/business/YkCharts/Area.js +336 -0
- package/dist/es/business/YkCharts/Area.js.map +7 -0
- package/dist/es/business/YkCharts/Bar.d.ts +21 -0
- package/dist/es/business/YkCharts/Bar.js +316 -0
- package/dist/es/business/YkCharts/Bar.js.map +7 -0
- package/dist/es/business/YkCharts/BarProperty.d.ts +21 -0
- package/dist/es/business/YkCharts/BarProperty.js +357 -0
- package/dist/es/business/YkCharts/BarProperty.js.map +7 -0
- package/dist/es/business/YkCharts/BarTotal.d.ts +21 -0
- package/dist/es/business/YkCharts/BarTotal.js +292 -0
- package/dist/es/business/YkCharts/BarTotal.js.map +7 -0
- package/dist/es/business/YkCharts/Line.d.ts +21 -0
- package/dist/es/business/YkCharts/Line.js +342 -0
- package/dist/es/business/YkCharts/Line.js.map +7 -0
- package/dist/es/business/YkCharts/Pie.d.ts +19 -0
- package/dist/es/business/YkCharts/Pie.js +107 -0
- package/dist/es/business/YkCharts/Pie.js.map +7 -0
- package/dist/es/business/YkCharts/PieProperty.d.ts +18 -0
- package/dist/es/business/YkCharts/PieProperty.js +180 -0
- package/dist/es/business/YkCharts/PieProperty.js.map +7 -0
- package/dist/es/business/YkCharts/Pies.d.ts +26 -0
- package/dist/es/business/YkCharts/Pies.js +352 -0
- package/dist/es/business/YkCharts/Pies.js.map +7 -0
- package/dist/es/business/YkCharts/constants.d.ts +1 -0
- package/dist/es/business/YkCharts/constants.js +47 -0
- package/dist/es/business/YkCharts/constants.js.map +7 -0
- package/dist/es/business/YkCharts/hooks.d.ts +4 -0
- package/dist/es/business/YkCharts/hooks.js +37 -0
- package/dist/es/business/YkCharts/hooks.js.map +7 -0
- package/dist/es/business/YkCharts/index.d.ts +9 -0
- package/dist/es/business/YkCharts/index.js +20 -0
- package/dist/es/business/YkCharts/index.js.map +7 -0
- package/dist/es/business/YkCharts/index.module.less +164 -0
- package/dist/es/business/YkCharts/tooltip.less +92 -0
- package/dist/es/business/YkCharts/transformData.js +16 -0
- package/dist/es/business/YkCharts/transformData.js.map +7 -0
- package/dist/es/business/YkCharts/typing.d.ts +74 -0
- package/dist/es/business/YkCharts/typing.js +1 -0
- package/dist/es/business/YkCharts/typing.js.map +7 -0
- package/dist/es/business/YkCharts/utils.d.ts +4 -0
- package/dist/es/business/YkCharts/utils.js +109 -0
- package/dist/es/business/YkCharts/utils.js.map +7 -0
- package/dist/es/business/YkCharts/variables.less +13 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.js +178 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.js.map +7 -0
- package/dist/es/business/YkLoginModule/index.d.ts +48 -0
- package/dist/es/business/YkLoginModule/index.js +198 -0
- package/dist/es/business/YkLoginModule/index.js.map +7 -0
- package/dist/es/business/YkLoginModule/styles.module.less +169 -0
- package/dist/es/business/YkPorjectSelect/index.d.ts +1 -1
- package/dist/es/business/YkPorjectSelect/index.js +2 -2
- package/dist/es/business/YkPorjectSelect/index.js.map +2 -2
- package/dist/es/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
- package/dist/es/business/YkSqlEdit/index.d.ts +20 -0
- package/dist/es/business/YkSqlEdit/index.js +180 -0
- package/dist/es/business/YkSqlEdit/index.js.map +7 -0
- package/dist/es/business/YkSqlEdit/sql-language.d.ts +11 -0
- package/dist/es/business/YkSqlEdit/sql-language.js +1460 -0
- package/dist/es/business/YkSqlEdit/sql-language.js.map +7 -0
- package/dist/es/components/DebounceInput/index.js.map +2 -2
- package/dist/es/components/MultipleSelect/index.d.ts +14 -0
- package/dist/es/components/MultipleSelect/index.js +1 -1
- package/dist/es/components/MultipleSelect/index.js.map +2 -2
- package/dist/es/components/RefreshButton/index.js.map +2 -2
- package/dist/es/components/SearchWithHistory/index.js +1 -1
- package/dist/es/components/SearchWithHistory/index.js.map +2 -2
- package/dist/es/components/TextWithToolTip/index.d.ts +1 -1
- package/dist/es/components/TextWithToolTip/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/index.d.ts +1 -24
- package/dist/es/components/TreeTransfer/index.js +8 -8
- package/dist/es/components/TreeTransfer/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/utils/index.d.ts +1 -1
- package/dist/es/components/TreeTransfer/utils/index.js.map +2 -2
- package/dist/es/components/YKMarkdown/index.d.ts +11 -0
- package/dist/es/components/YKMarkdown/index.js +236 -0
- package/dist/es/components/YKMarkdown/index.js.map +7 -0
- package/dist/es/components/YKMarkdown/index.module.less +83 -0
- package/dist/es/components/YkDateRangePicker/YkDateRangePicker.mdx +194 -0
- package/dist/es/components/YkDateRangePicker/index.d.ts +9 -1
- package/dist/es/components/YkDateRangePicker/index.js +127 -61
- package/dist/es/components/YkDateRangePicker/index.js.map +2 -2
- package/dist/es/components/YkDateRangePicker/index.module.less +33 -9
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +23 -3
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/index.d.ts +2 -2
- package/dist/es/components/YkRangeDateWithVS/index.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/index.module.less +22 -4
- package/dist/es/components/YkRangeTimeWithRecent/index.d.ts +1 -1
- package/dist/es/components/YkRangeTimeWithRecent/index.js.map +2 -2
- package/dist/es/creative/ArcCheckbox/index.d.ts +12 -0
- package/dist/es/creative/ArcCheckbox/index.js +49 -0
- package/dist/es/creative/ArcCheckbox/index.js.map +7 -0
- package/dist/es/creative/ArcCheckbox/index.module.less +102 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.js.map +1 -1
- package/dist/es/creative/ButtonWithProgress/index.d.ts +1 -1
- package/dist/es/creative/ButtonWithProgress/index.js.map +2 -2
- package/dist/es/creative/GlassSegmentedRadio/index.d.ts +24 -0
- package/dist/es/creative/GlassSegmentedRadio/index.js +75 -0
- package/dist/es/creative/GlassSegmentedRadio/index.js.map +7 -0
- package/dist/es/creative/GlassSegmentedRadio/index.module.less +241 -0
- package/dist/es/creative/SkillsWriter/index.d.ts +3 -0
- package/dist/es/creative/SkillsWriter/index.js +191 -0
- package/dist/es/creative/SkillsWriter/index.js.map +7 -0
- package/dist/es/creative/SkillsWriter/index.module.less +21 -0
- package/dist/es/index.d.ts +32 -24
- package/dist/es/index.js +90 -80
- package/dist/es/index.js.map +2 -2
- package/dist/es/index.less +44 -0
- package/dist/es/layout/FlexGrid/index.d.ts +1 -1
- package/dist/es/layout/FlexGrid/index.js.map +2 -2
- package/dist/es/layout/YkContainer/index.js.map +1 -1
- package/dist/es/layout/YkDrawer/index.d.ts +1 -1
- package/dist/es/layout/YkDrawer/index.js.map +2 -2
- package/dist/es/ui/LabelSelect/demo.js +1 -1
- package/dist/es/ui/LabelSelect/demo.js.map +2 -2
- package/dist/es/ui/LabelSelect/index.d.ts +1 -1
- package/dist/es/ui/LabelSelect/index.js +1 -1
- package/dist/es/ui/LabelSelect/index.js.map +2 -2
- package/dist/es/ui/LogicOperator/index.d.ts +1 -1
- package/dist/es/ui/LogicOperator/index.js.map +2 -2
- package/dist/es/ui/YkButton/index.d.ts +1 -1
- package/dist/es/ui/YkButton/index.js.map +2 -2
- package/dist/es/ui/YkCard/index.d.ts +1 -1
- package/dist/es/ui/YkCard/index.js +1 -1
- package/dist/es/ui/YkCard/index.js.map +2 -2
- package/dist/es/ui/YkCheckbox/index.d.ts +1 -1
- package/dist/es/ui/YkCheckbox/index.js.map +2 -2
- package/dist/es/ui/YkDescriptions/index.d.ts +1 -1
- package/dist/es/ui/YkDescriptions/index.js.map +2 -2
- package/dist/es/ui/YkPagination/index.d.ts +1 -1
- package/dist/es/ui/YkPagination/index.js.map +2 -2
- package/dist/es/ui/YkRadio/index.d.ts +1 -1
- package/dist/es/ui/YkRadio/index.js.map +2 -2
- package/dist/es/ui/YkSegmented/index.d.ts +1 -1
- package/dist/es/ui/YkSegmented/index.js.map +2 -2
- package/dist/es/ui/YkSelect/index.d.ts +1 -1
- package/dist/es/ui/YkSelect/index.js.map +2 -2
- package/dist/es/ui/YkSpin/index.d.ts +1 -1
- package/dist/es/ui/YkSpin/index.js.map +2 -2
- package/dist/es/ui/YkStatistic/index.d.ts +1 -1
- package/dist/es/ui/YkStatistic/index.js.map +2 -2
- package/dist/es/ui/YkSwitch/index.d.ts +1 -1
- package/dist/es/ui/YkSwitch/index.js.map +2 -2
- package/dist/es/ui/YkTabs/index.d.ts +1 -1
- package/dist/es/ui/YkTabs/index.js.map +2 -2
- package/dist/es/ui/YkTooltip/index.d.ts +1 -1
- package/dist/es/ui/YkTooltip/index.js.map +2 -2
- package/dist/es/utils/styleUtils.js.map +2 -2
- package/dist/es/utils/ykStorybookDoc.d.ts +15 -0
- package/dist/es/utils/ykStorybookDoc.js +24 -2
- package/dist/es/utils/ykStorybookDoc.js.map +2 -2
- package/dist/lib/assets/image/skills.zip +0 -0
- package/dist/lib/business/AiChat/index.d.ts +3 -3
- package/dist/lib/business/AiChat/index.js +320 -111
- package/dist/lib/business/AiChat/index.js.map +3 -3
- package/dist/lib/business/AiChat/intentRecognizer.js.map +1 -1
- package/dist/lib/business/AiChat/navigationManager.js +6 -6
- package/dist/lib/business/AiChat/navigationManager.js.map +2 -2
- package/dist/lib/business/AiChat/sse.d.ts +15 -0
- package/dist/lib/business/AiChat/sse.js +117 -7
- package/dist/lib/business/AiChat/sse.js.map +2 -2
- package/dist/lib/business/AiChat/type.d.ts +22 -23
- package/dist/lib/business/AiChat/type.js.map +1 -1
- package/dist/lib/business/AiChat/useAiChat.js +104 -74
- package/dist/lib/business/AiChat/useAiChat.js.map +3 -3
- package/dist/lib/business/AiChat/useTaskWorkflow.d.ts +1 -2
- package/dist/lib/business/AiChat/useTaskWorkflow.js +0 -34
- package/dist/lib/business/AiChat/useTaskWorkflow.js.map +2 -2
- package/dist/lib/business/DrawerPageInfo/index.js.map +1 -1
- package/dist/lib/business/Editor/index.d.ts +1 -1
- package/dist/lib/business/Editor/index.js.map +2 -2
- package/dist/lib/business/Empty/index.js +1 -1
- package/dist/lib/business/Empty/index.js.map +1 -1
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js +3 -3
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js +4 -4
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js +3 -3
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
- package/dist/lib/business/ModCommonFilter/index.d.ts +1 -1
- package/dist/lib/business/ModCommonFilter/index.js.map +2 -2
- package/dist/lib/business/YkCharts/Area.d.ts +18 -0
- package/dist/lib/business/YkCharts/Area.js +346 -0
- package/dist/lib/business/YkCharts/Area.js.map +7 -0
- package/dist/lib/business/YkCharts/Bar.d.ts +21 -0
- package/dist/lib/business/YkCharts/Bar.js +323 -0
- package/dist/lib/business/YkCharts/Bar.js.map +7 -0
- package/dist/lib/business/YkCharts/BarProperty.d.ts +21 -0
- package/dist/lib/business/YkCharts/BarProperty.js +370 -0
- package/dist/lib/business/YkCharts/BarProperty.js.map +7 -0
- package/dist/lib/business/YkCharts/BarTotal.d.ts +21 -0
- package/dist/lib/business/YkCharts/BarTotal.js +298 -0
- package/dist/lib/business/YkCharts/BarTotal.js.map +7 -0
- package/dist/lib/business/YkCharts/Line.d.ts +21 -0
- package/dist/lib/business/YkCharts/Line.js +349 -0
- package/dist/lib/business/YkCharts/Line.js.map +7 -0
- package/dist/lib/business/YkCharts/Pie.d.ts +19 -0
- package/dist/lib/business/YkCharts/Pie.js +117 -0
- package/dist/lib/business/YkCharts/Pie.js.map +7 -0
- package/dist/lib/business/YkCharts/PieProperty.d.ts +18 -0
- package/dist/lib/business/YkCharts/PieProperty.js +193 -0
- package/dist/lib/business/YkCharts/PieProperty.js.map +7 -0
- package/dist/lib/business/YkCharts/Pies.d.ts +26 -0
- package/dist/lib/business/YkCharts/Pies.js +341 -0
- package/dist/lib/business/YkCharts/Pies.js.map +7 -0
- package/dist/lib/business/YkCharts/constants.d.ts +1 -0
- package/dist/lib/business/YkCharts/constants.js +71 -0
- package/dist/lib/business/YkCharts/constants.js.map +7 -0
- package/dist/lib/business/YkCharts/hooks.d.ts +4 -0
- package/dist/lib/business/YkCharts/hooks.js +62 -0
- package/dist/lib/business/YkCharts/hooks.js.map +7 -0
- package/dist/lib/business/YkCharts/index.d.ts +9 -0
- package/dist/lib/business/YkCharts/index.js +61 -0
- package/dist/lib/business/YkCharts/index.js.map +7 -0
- package/dist/lib/business/YkCharts/index.module.less +164 -0
- package/dist/lib/business/YkCharts/tooltip.less +92 -0
- package/dist/lib/business/YkCharts/transformData.js +40 -0
- package/dist/lib/business/YkCharts/transformData.js.map +7 -0
- package/dist/lib/business/YkCharts/typing.d.ts +74 -0
- package/dist/lib/business/YkCharts/typing.js +18 -0
- package/dist/lib/business/YkCharts/typing.js.map +7 -0
- package/dist/lib/business/YkCharts/utils.d.ts +4 -0
- package/dist/lib/business/YkCharts/utils.js +143 -0
- package/dist/lib/business/YkCharts/utils.js.map +7 -0
- package/dist/lib/business/YkCharts/variables.less +13 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.js +171 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.js.map +7 -0
- package/dist/lib/business/YkLoginModule/index.d.ts +48 -0
- package/dist/lib/business/YkLoginModule/index.js +206 -0
- package/dist/lib/business/YkLoginModule/index.js.map +7 -0
- package/dist/lib/business/YkLoginModule/styles.module.less +169 -0
- package/dist/lib/business/YkPorjectSelect/index.d.ts +1 -1
- package/dist/lib/business/YkPorjectSelect/index.js +3 -3
- package/dist/lib/business/YkPorjectSelect/index.js.map +2 -2
- package/dist/lib/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
- package/dist/lib/business/YkSqlEdit/index.d.ts +20 -0
- package/dist/lib/business/YkSqlEdit/index.js +202 -0
- package/dist/lib/business/YkSqlEdit/index.js.map +7 -0
- package/dist/lib/business/YkSqlEdit/sql-language.d.ts +11 -0
- package/dist/lib/business/YkSqlEdit/sql-language.js +1493 -0
- package/dist/lib/business/YkSqlEdit/sql-language.js.map +7 -0
- package/dist/lib/components/DebounceInput/index.js.map +2 -2
- package/dist/lib/components/MultipleSelect/index.d.ts +14 -0
- package/dist/lib/components/MultipleSelect/index.js +1 -1
- package/dist/lib/components/MultipleSelect/index.js.map +2 -2
- package/dist/lib/components/RefreshButton/index.js.map +2 -2
- package/dist/lib/components/SearchWithHistory/index.js +1 -1
- package/dist/lib/components/SearchWithHistory/index.js.map +2 -2
- package/dist/lib/components/TextWithToolTip/index.d.ts +1 -1
- package/dist/lib/components/TextWithToolTip/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/index.d.ts +1 -24
- package/dist/lib/components/TreeTransfer/index.js +3 -3
- package/dist/lib/components/TreeTransfer/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/utils/index.d.ts +1 -1
- package/dist/lib/components/TreeTransfer/utils/index.js.map +2 -2
- package/dist/lib/components/YKMarkdown/index.d.ts +11 -0
- package/dist/lib/components/YKMarkdown/index.js +188 -0
- package/dist/lib/components/YKMarkdown/index.js.map +7 -0
- package/dist/lib/components/YKMarkdown/index.module.less +83 -0
- package/dist/lib/components/YkDateRangePicker/YkDateRangePicker.mdx +194 -0
- package/dist/lib/components/YkDateRangePicker/index.d.ts +9 -1
- package/dist/lib/components/YkDateRangePicker/index.js +127 -61
- package/dist/lib/components/YkDateRangePicker/index.js.map +2 -2
- package/dist/lib/components/YkDateRangePicker/index.module.less +33 -9
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +22 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/index.d.ts +2 -2
- package/dist/lib/components/YkRangeDateWithVS/index.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/index.module.less +22 -4
- package/dist/lib/components/YkRangeTimeWithRecent/index.d.ts +1 -1
- package/dist/lib/components/YkRangeTimeWithRecent/index.js.map +2 -2
- package/dist/lib/creative/ArcCheckbox/index.d.ts +12 -0
- package/dist/lib/creative/ArcCheckbox/index.js +50 -0
- package/dist/lib/creative/ArcCheckbox/index.js.map +7 -0
- package/dist/lib/creative/ArcCheckbox/index.module.less +102 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.js.map +1 -1
- package/dist/lib/creative/ButtonWithProgress/index.d.ts +1 -1
- package/dist/lib/creative/ButtonWithProgress/index.js.map +2 -2
- package/dist/lib/creative/GlassSegmentedRadio/index.d.ts +24 -0
- package/dist/lib/creative/GlassSegmentedRadio/index.js +78 -0
- package/dist/lib/creative/GlassSegmentedRadio/index.js.map +7 -0
- package/dist/lib/creative/GlassSegmentedRadio/index.module.less +241 -0
- package/dist/lib/creative/SkillsWriter/index.d.ts +3 -0
- package/dist/lib/creative/SkillsWriter/index.js +200 -0
- package/dist/lib/creative/SkillsWriter/index.js.map +7 -0
- package/dist/lib/creative/SkillsWriter/index.module.less +21 -0
- package/dist/lib/index.d.ts +32 -24
- package/dist/lib/index.js +39 -24
- package/dist/lib/index.js.map +2 -2
- package/dist/lib/index.less +44 -0
- package/dist/lib/layout/FlexGrid/index.d.ts +1 -1
- package/dist/lib/layout/FlexGrid/index.js.map +2 -2
- package/dist/lib/layout/YkContainer/index.js.map +1 -1
- package/dist/lib/layout/YkDrawer/index.d.ts +1 -1
- package/dist/lib/layout/YkDrawer/index.js.map +2 -2
- package/dist/lib/ui/LabelSelect/demo.js +1 -1
- package/dist/lib/ui/LabelSelect/demo.js.map +2 -2
- package/dist/lib/ui/LabelSelect/index.d.ts +1 -1
- package/dist/lib/ui/LabelSelect/index.js +1 -1
- package/dist/lib/ui/LabelSelect/index.js.map +2 -2
- package/dist/lib/ui/LogicOperator/index.d.ts +1 -1
- package/dist/lib/ui/LogicOperator/index.js.map +2 -2
- package/dist/lib/ui/YkButton/index.d.ts +1 -1
- package/dist/lib/ui/YkButton/index.js.map +2 -2
- package/dist/lib/ui/YkCard/index.d.ts +1 -1
- package/dist/lib/ui/YkCard/index.js.map +2 -2
- package/dist/lib/ui/YkCheckbox/index.d.ts +1 -1
- package/dist/lib/ui/YkCheckbox/index.js.map +2 -2
- package/dist/lib/ui/YkDescriptions/index.d.ts +1 -1
- package/dist/lib/ui/YkDescriptions/index.js.map +2 -2
- package/dist/lib/ui/YkPagination/index.d.ts +1 -1
- package/dist/lib/ui/YkPagination/index.js.map +2 -2
- package/dist/lib/ui/YkRadio/index.d.ts +1 -1
- package/dist/lib/ui/YkRadio/index.js.map +2 -2
- package/dist/lib/ui/YkSegmented/index.d.ts +1 -1
- package/dist/lib/ui/YkSegmented/index.js.map +2 -2
- package/dist/lib/ui/YkSelect/index.d.ts +1 -1
- package/dist/lib/ui/YkSelect/index.js.map +2 -2
- package/dist/lib/ui/YkSpin/index.d.ts +1 -1
- package/dist/lib/ui/YkSpin/index.js.map +2 -2
- package/dist/lib/ui/YkStatistic/index.d.ts +1 -1
- package/dist/lib/ui/YkStatistic/index.js.map +2 -2
- package/dist/lib/ui/YkSwitch/index.d.ts +1 -1
- package/dist/lib/ui/YkSwitch/index.js.map +2 -2
- package/dist/lib/ui/YkTabs/index.d.ts +1 -1
- package/dist/lib/ui/YkTabs/index.js.map +2 -2
- package/dist/lib/ui/YkTooltip/index.d.ts +1 -1
- package/dist/lib/ui/YkTooltip/index.js.map +2 -2
- package/dist/lib/utils/styleUtils.js.map +2 -2
- package/dist/lib/utils/ykStorybookDoc.d.ts +15 -0
- package/dist/lib/utils/ykStorybookDoc.js +23 -1
- package/dist/lib/utils/ykStorybookDoc.js.map +2 -2
- package/package.json +152 -144
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __async = (__this, __arguments, generator) => {
|
|
18
21
|
return new Promise((resolve, reject) => {
|
|
19
22
|
var fulfilled = (value) => {
|
|
@@ -37,41 +40,47 @@ var __async = (__this, __arguments, generator) => {
|
|
|
37
40
|
|
|
38
41
|
// src/business/AiChat/index.tsx
|
|
39
42
|
import {
|
|
40
|
-
|
|
43
|
+
CloseOutlined,
|
|
44
|
+
CompressOutlined,
|
|
41
45
|
CopyOutlined,
|
|
42
46
|
DeleteOutlined,
|
|
43
|
-
|
|
47
|
+
ExpandOutlined,
|
|
48
|
+
FileImageOutlined,
|
|
44
49
|
MenuOutlined,
|
|
45
50
|
MessageOutlined,
|
|
51
|
+
PaperClipOutlined,
|
|
46
52
|
PlusOutlined,
|
|
47
53
|
ReloadOutlined,
|
|
48
54
|
SendOutlined,
|
|
49
|
-
StopOutlined
|
|
50
|
-
SwitcherOutlined
|
|
55
|
+
StopOutlined
|
|
51
56
|
} from "@ant-design/icons";
|
|
52
|
-
import { Button, Input, List, message, Popconfirm, Space, Tooltip, Typography } from "antd";
|
|
57
|
+
import { Button, Input, List, message, Popconfirm, Space, Tooltip, Typography, Upload } from "antd";
|
|
53
58
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
59
|
+
import { generateSuggestions, isTaskCreationIntent, recognizeIntent } from "./intentRecognizer";
|
|
54
60
|
import MarkdownRender from "./MarkdownRender";
|
|
55
61
|
import { useAiChat } from "./useAiChat";
|
|
56
62
|
import { useTaskWorkflow } from "./useTaskWorkflow";
|
|
57
|
-
import {
|
|
63
|
+
import { generateSuggestions as generateSuggestions2, isTaskCreationIntent as isTaskCreationIntent2, parseTaskDescription, recognizeIntent as recognizeIntent2 } from "./intentRecognizer";
|
|
64
|
+
import { delay, NavigationManager } from "./navigationManager";
|
|
58
65
|
import { useAiChat as useAiChat2 } from "./useAiChat";
|
|
59
66
|
import { useTaskWorkflow as useTaskWorkflow2 } from "./useTaskWorkflow";
|
|
60
|
-
import { recognizeIntent as recognizeIntent2, generateSuggestions as generateSuggestions2, isTaskCreationIntent as isTaskCreationIntent2, parseTaskDescription } from "./intentRecognizer";
|
|
61
|
-
import { NavigationManager, delay } from "./navigationManager";
|
|
62
67
|
var { TextArea } = Input;
|
|
63
68
|
var { Title } = Typography;
|
|
64
69
|
var AiChat = ({
|
|
65
70
|
apiPath = "/api/ai/chat-stream",
|
|
66
71
|
storageKey = "ai_chat_sessions",
|
|
67
|
-
position = { bottom: 24, right: 24 },
|
|
72
|
+
position: initialPosition = { bottom: 24, right: 24 },
|
|
68
73
|
buttonSize = 56,
|
|
69
74
|
zIndex = 1080,
|
|
70
75
|
showSessionPanel = true,
|
|
71
|
-
showExport = true,
|
|
72
76
|
onBeforeSend,
|
|
73
77
|
onError,
|
|
74
78
|
onSuccess,
|
|
79
|
+
onFetchSessions,
|
|
80
|
+
onFetchSessionDetail,
|
|
81
|
+
onCreateSession,
|
|
82
|
+
onSendMessage,
|
|
83
|
+
onUploadFile,
|
|
75
84
|
className,
|
|
76
85
|
style,
|
|
77
86
|
renderTrigger,
|
|
@@ -93,17 +102,25 @@ var AiChat = ({
|
|
|
93
102
|
sendQuestion,
|
|
94
103
|
regenerateAnswer,
|
|
95
104
|
deleteSingleMsg,
|
|
96
|
-
clearCurrentSession,
|
|
97
|
-
exportCurrentSession,
|
|
98
105
|
cancelRequest,
|
|
99
106
|
toggleVisible
|
|
100
|
-
} = useAiChat({
|
|
107
|
+
} = useAiChat({
|
|
108
|
+
apiPath,
|
|
109
|
+
storageKey,
|
|
110
|
+
onBeforeSend,
|
|
111
|
+
onError,
|
|
112
|
+
onSuccess,
|
|
113
|
+
onFetchSessions,
|
|
114
|
+
onFetchSessionDetail,
|
|
115
|
+
onCreateSession,
|
|
116
|
+
onSendMessage,
|
|
117
|
+
onUploadFile
|
|
118
|
+
});
|
|
101
119
|
const {
|
|
102
120
|
tasks,
|
|
103
121
|
createTask,
|
|
104
122
|
updateTaskStatus,
|
|
105
123
|
deleteTask,
|
|
106
|
-
exportTasks,
|
|
107
124
|
createTaskFromNaturalLanguage,
|
|
108
125
|
updateUrlWithTaskId,
|
|
109
126
|
refreshCurrentPage,
|
|
@@ -131,11 +148,63 @@ var AiChat = ({
|
|
|
131
148
|
const [inputValue, setInputValue] = useState("");
|
|
132
149
|
const [showSessions, setShowSessions] = useState(false);
|
|
133
150
|
const [suggestions, setSuggestions] = useState([]);
|
|
151
|
+
const [fileList, setFileList] = useState([]);
|
|
152
|
+
const [isMaximized, setIsMaximized] = useState(false);
|
|
153
|
+
const [dialogPosition, setDialogPosition] = useState({ x: 0, y: 0 });
|
|
154
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
155
|
+
const dragOffset = useRef({ x: 0, y: 0 });
|
|
134
156
|
const messagesEndRef = useRef(null);
|
|
157
|
+
const triggerRef = useRef(null);
|
|
158
|
+
const fileInputRef = useRef(null);
|
|
135
159
|
useEffect(() => {
|
|
136
160
|
var _a;
|
|
137
161
|
(_a = messagesEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
|
|
138
162
|
}, [activeSession == null ? void 0 : activeSession.messages]);
|
|
163
|
+
const handleTriggerMouseDown = useCallback(
|
|
164
|
+
(e) => {
|
|
165
|
+
if (visible)
|
|
166
|
+
return;
|
|
167
|
+
const target = e.target;
|
|
168
|
+
if (target.closest(".ant-upload, .ant-btn"))
|
|
169
|
+
return;
|
|
170
|
+
e.preventDefault();
|
|
171
|
+
const triggerEl = triggerRef.current;
|
|
172
|
+
if (!triggerEl)
|
|
173
|
+
return;
|
|
174
|
+
const rect = triggerEl.getBoundingClientRect();
|
|
175
|
+
dragOffset.current = {
|
|
176
|
+
x: e.clientX - rect.left,
|
|
177
|
+
y: e.clientY - rect.top
|
|
178
|
+
};
|
|
179
|
+
setIsDragging(true);
|
|
180
|
+
},
|
|
181
|
+
[visible]
|
|
182
|
+
);
|
|
183
|
+
const handleTriggerMouseMove = useCallback(
|
|
184
|
+
(e) => {
|
|
185
|
+
if (!isDragging || visible)
|
|
186
|
+
return;
|
|
187
|
+
setDialogPosition({
|
|
188
|
+
x: e.clientX - dragOffset.current.x,
|
|
189
|
+
y: e.clientY - dragOffset.current.y
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
[isDragging, visible]
|
|
193
|
+
);
|
|
194
|
+
const handleTriggerMouseUp = useCallback(() => {
|
|
195
|
+
setIsDragging(false);
|
|
196
|
+
}, []);
|
|
197
|
+
useEffect(() => {
|
|
198
|
+
if (isDragging && !visible) {
|
|
199
|
+
document.addEventListener("mousemove", handleTriggerMouseMove);
|
|
200
|
+
document.addEventListener("mouseup", handleTriggerMouseUp);
|
|
201
|
+
return () => {
|
|
202
|
+
document.removeEventListener("mousemove", handleTriggerMouseMove);
|
|
203
|
+
document.removeEventListener("mouseup", handleTriggerMouseUp);
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
return void 0;
|
|
207
|
+
}, [isDragging, visible, handleTriggerMouseMove, handleTriggerMouseUp]);
|
|
139
208
|
const handleInputChange = useCallback((e) => {
|
|
140
209
|
const value = e.target.value;
|
|
141
210
|
setInputValue(value);
|
|
@@ -147,25 +216,70 @@ var AiChat = ({
|
|
|
147
216
|
setSuggestions([]);
|
|
148
217
|
}
|
|
149
218
|
}, []);
|
|
219
|
+
const handleFileChange = useCallback(
|
|
220
|
+
(info) => __async(void 0, null, function* () {
|
|
221
|
+
const uploadFile = info.file;
|
|
222
|
+
if (!uploadFile || !uploadFile.originFileObj) {
|
|
223
|
+
setFileList(info.fileList);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const file = uploadFile.originFileObj;
|
|
227
|
+
const isImage = file.type.startsWith("image/");
|
|
228
|
+
const fileType = isImage ? "image" : "document";
|
|
229
|
+
try {
|
|
230
|
+
if (onUploadFile && activeSession) {
|
|
231
|
+
const result = yield onUploadFile({
|
|
232
|
+
sessionId: activeSession.id,
|
|
233
|
+
file,
|
|
234
|
+
type: fileType
|
|
235
|
+
});
|
|
236
|
+
const uploadedFile = {
|
|
237
|
+
uid: file.name,
|
|
238
|
+
name: result.name || file.name,
|
|
239
|
+
status: "done",
|
|
240
|
+
url: result.url
|
|
241
|
+
};
|
|
242
|
+
setFileList([...fileList, uploadedFile]);
|
|
243
|
+
message.success(`${fileType === "image" ? "图片" : "文件"}上传成功`);
|
|
244
|
+
} else {
|
|
245
|
+
setFileList([...fileList, uploadFile]);
|
|
246
|
+
}
|
|
247
|
+
} catch (err) {
|
|
248
|
+
console.error("文件上传失败:", err);
|
|
249
|
+
message.error("文件上传失败");
|
|
250
|
+
setFileList(fileList.filter((f) => f.uid !== file.name));
|
|
251
|
+
}
|
|
252
|
+
}),
|
|
253
|
+
[fileList, activeSession, onUploadFile]
|
|
254
|
+
);
|
|
150
255
|
const handleSend = useCallback(() => __async(void 0, null, function* () {
|
|
151
|
-
if (!inputValue.trim()) {
|
|
152
|
-
message.warning("
|
|
256
|
+
if (!inputValue.trim() && fileList.length === 0) {
|
|
257
|
+
message.warning("请输入问题或上传文件");
|
|
153
258
|
return;
|
|
154
259
|
}
|
|
155
|
-
|
|
260
|
+
let content = inputValue.trim();
|
|
261
|
+
if (fileList.length > 0) {
|
|
262
|
+
const fileInfo = fileList.map((f) => f.name).join(", ");
|
|
263
|
+
content += `
|
|
264
|
+
[附件: ${fileInfo}]`;
|
|
265
|
+
}
|
|
156
266
|
setInputValue("");
|
|
157
267
|
setSuggestions([]);
|
|
268
|
+
setFileList([]);
|
|
158
269
|
const intentEnabled = (intentConfig == null ? void 0 : intentConfig.enabled) !== false;
|
|
159
270
|
if (intentEnabled && isTaskCreationIntent(content)) {
|
|
160
271
|
yield executeTaskCreationWorkflow(content);
|
|
161
272
|
return;
|
|
162
273
|
}
|
|
163
274
|
sendQuestion(content);
|
|
164
|
-
}), [inputValue, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
|
|
275
|
+
}), [inputValue, fileList, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
|
|
165
276
|
const copyMsg = (c) => {
|
|
166
277
|
navigator.clipboard.writeText(c);
|
|
167
278
|
message.success("复制成功");
|
|
168
279
|
};
|
|
280
|
+
const toggleMaximize = useCallback(() => {
|
|
281
|
+
setIsMaximized((prev) => !prev);
|
|
282
|
+
}, []);
|
|
169
283
|
const renderMsg = (item) => /* @__PURE__ */ React.createElement(
|
|
170
284
|
List.Item,
|
|
171
285
|
{
|
|
@@ -200,16 +314,29 @@ var AiChat = ({
|
|
|
200
314
|
flexShrink: 0
|
|
201
315
|
}
|
|
202
316
|
}
|
|
203
|
-
)) : item.role === "system" ? /* @__PURE__ */ React.createElement(
|
|
204
|
-
|
|
317
|
+
)) : item.role === "system" ? /* @__PURE__ */ React.createElement(
|
|
318
|
+
"div",
|
|
205
319
|
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
320
|
+
style: {
|
|
321
|
+
display: "flex",
|
|
322
|
+
alignItems: "center",
|
|
323
|
+
gap: 8,
|
|
324
|
+
fontSize: 13
|
|
325
|
+
}
|
|
210
326
|
},
|
|
211
|
-
"
|
|
212
|
-
|
|
327
|
+
/* @__PURE__ */ React.createElement("span", { style: { color: "#52c41a" } }, "✓"),
|
|
328
|
+
/* @__PURE__ */ React.createElement("span", null, item.content),
|
|
329
|
+
item.taskId && /* @__PURE__ */ React.createElement(
|
|
330
|
+
Button,
|
|
331
|
+
{
|
|
332
|
+
type: "link",
|
|
333
|
+
size: "small",
|
|
334
|
+
style: { padding: 0, fontSize: 12 },
|
|
335
|
+
onClick: () => updateUrlWithTaskId(item.taskId)
|
|
336
|
+
},
|
|
337
|
+
"查看任务"
|
|
338
|
+
)
|
|
339
|
+
) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { style: { minHeight: 20 } }, /* @__PURE__ */ React.createElement(MarkdownRender, { content: item.content, msgId: item.id, isAi: true, onDelete: deleteSingleMsg })), item.loading && /* @__PURE__ */ React.createElement("span", { style: { color: "#1677ff", fontSize: 12 } }, " 思考中..."), !item.loading && /* @__PURE__ */ React.createElement(Space, { size: 8, style: { fontSize: 12, marginTop: 6, display: "flex" } }, /* @__PURE__ */ React.createElement(Tooltip, { title: "复制" }, /* @__PURE__ */ React.createElement(CopyOutlined, { onClick: () => copyMsg(item.content), style: { cursor: "pointer", color: "#999" } })), /* @__PURE__ */ React.createElement(Tooltip, { title: "重新生成" }, /* @__PURE__ */ React.createElement(ReloadOutlined, { onClick: () => regenerateAnswer(item), style: { cursor: "pointer", color: "#999" } }))))
|
|
213
340
|
)
|
|
214
341
|
);
|
|
215
342
|
const renderSession = (s) => /* @__PURE__ */ React.createElement(
|
|
@@ -221,14 +348,14 @@ var AiChat = ({
|
|
|
221
348
|
return;
|
|
222
349
|
}
|
|
223
350
|
switchSession(s.id);
|
|
224
|
-
setShowSessions(false);
|
|
225
351
|
},
|
|
226
352
|
style: {
|
|
227
353
|
padding: "10px 12px",
|
|
228
354
|
borderRadius: 8,
|
|
229
355
|
cursor: "pointer",
|
|
230
356
|
backgroundColor: (activeSession == null ? void 0 : activeSession.id) === s.id ? "#e6f7ff" : "#fff",
|
|
231
|
-
transition: "all 0.2s"
|
|
357
|
+
transition: "all 0.2s",
|
|
358
|
+
marginBottom: 8
|
|
232
359
|
}
|
|
233
360
|
},
|
|
234
361
|
/* @__PURE__ */ React.createElement(
|
|
@@ -273,66 +400,126 @@ var AiChat = ({
|
|
|
273
400
|
)
|
|
274
401
|
)
|
|
275
402
|
);
|
|
403
|
+
const getDialogStyle = () => {
|
|
404
|
+
if (isMaximized) {
|
|
405
|
+
return {
|
|
406
|
+
position: "fixed",
|
|
407
|
+
top: 0,
|
|
408
|
+
left: 0,
|
|
409
|
+
width: "100vw",
|
|
410
|
+
height: "100vh",
|
|
411
|
+
borderRadius: 0
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
const baseStyle = {
|
|
415
|
+
position: "relative",
|
|
416
|
+
width: showSessions ? 960 : 720,
|
|
417
|
+
height: 680,
|
|
418
|
+
borderRadius: 12
|
|
419
|
+
};
|
|
420
|
+
if (dialogPosition.x !== 0 || dialogPosition.y !== 0) {
|
|
421
|
+
return __spreadProps(__spreadValues({}, baseStyle), {
|
|
422
|
+
transform: `translate(${dialogPosition.x}px, ${dialogPosition.y}px)`
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
return baseStyle;
|
|
426
|
+
};
|
|
276
427
|
return /* @__PURE__ */ React.createElement(
|
|
277
428
|
"div",
|
|
278
429
|
{
|
|
279
430
|
className,
|
|
280
431
|
style: __spreadValues({
|
|
281
432
|
position: "fixed",
|
|
282
|
-
bottom:
|
|
283
|
-
right:
|
|
433
|
+
bottom: initialPosition.bottom,
|
|
434
|
+
right: initialPosition.right,
|
|
284
435
|
zIndex,
|
|
285
436
|
display: "flex",
|
|
286
437
|
flexDirection: "column",
|
|
287
|
-
alignItems: "flex-end"
|
|
438
|
+
alignItems: "flex-end",
|
|
439
|
+
transform: dialogPosition.x !== 0 || dialogPosition.y !== 0 ? `translate(${dialogPosition.x}px, ${dialogPosition.y}px)` : void 0
|
|
288
440
|
}, style)
|
|
289
441
|
},
|
|
290
|
-
!visible ? renderTrigger ? /* @__PURE__ */ React.createElement(
|
|
291
|
-
|
|
442
|
+
!visible ? renderTrigger ? /* @__PURE__ */ React.createElement(
|
|
443
|
+
"div",
|
|
292
444
|
{
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
445
|
+
ref: triggerRef,
|
|
446
|
+
onMouseDown: handleTriggerMouseDown,
|
|
447
|
+
onClick: () => !isDragging && toggleVisible(true),
|
|
448
|
+
style: { cursor: isDragging ? "grabbing" : "grab" }
|
|
449
|
+
},
|
|
450
|
+
renderTrigger
|
|
451
|
+
) : /* @__PURE__ */ React.createElement(
|
|
452
|
+
"div",
|
|
453
|
+
{
|
|
454
|
+
ref: triggerRef,
|
|
455
|
+
onMouseDown: handleTriggerMouseDown,
|
|
456
|
+
onClick: () => !isDragging && toggleVisible(true),
|
|
457
|
+
style: { cursor: isDragging ? "grabbing" : "grab" }
|
|
458
|
+
},
|
|
459
|
+
/* @__PURE__ */ React.createElement(
|
|
460
|
+
Button,
|
|
461
|
+
{
|
|
462
|
+
type: "primary",
|
|
463
|
+
shape: "circle",
|
|
464
|
+
size: "large",
|
|
465
|
+
icon: /* @__PURE__ */ React.createElement(MessageOutlined, null),
|
|
466
|
+
style: {
|
|
467
|
+
width: buttonSize,
|
|
468
|
+
height: buttonSize,
|
|
469
|
+
boxShadow: "0 4px 16px rgba(22, 119, 255, 0.4)"
|
|
470
|
+
}
|
|
302
471
|
}
|
|
303
|
-
|
|
472
|
+
)
|
|
304
473
|
) : /* @__PURE__ */ React.createElement(
|
|
305
474
|
"div",
|
|
306
475
|
{
|
|
307
|
-
style: {
|
|
308
|
-
width: showSessions ? 960 : 720,
|
|
309
|
-
height: 680,
|
|
476
|
+
style: __spreadProps(__spreadValues({}, getDialogStyle()), {
|
|
310
477
|
background: "#fff",
|
|
311
|
-
borderRadius: 12,
|
|
312
478
|
boxShadow: "0 4px 20px rgba(0,0,0,0.15)",
|
|
313
479
|
overflow: "hidden",
|
|
314
480
|
display: "flex",
|
|
315
481
|
flexDirection: "row",
|
|
316
|
-
marginBottom: 12,
|
|
317
|
-
transition: "
|
|
318
|
-
|
|
319
|
-
}
|
|
482
|
+
marginBottom: isMaximized ? 0 : 12,
|
|
483
|
+
transition: "all 0.3s ease"
|
|
484
|
+
})
|
|
320
485
|
},
|
|
321
|
-
/* @__PURE__ */ React.createElement(
|
|
322
|
-
|
|
486
|
+
showSessionPanel && showSessions && /* @__PURE__ */ React.createElement(
|
|
487
|
+
"div",
|
|
323
488
|
{
|
|
324
|
-
type: "text",
|
|
325
|
-
icon: /* @__PURE__ */ React.createElement(SwitcherOutlined, null),
|
|
326
|
-
onClick: () => toggleVisible(false),
|
|
327
489
|
style: {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
490
|
+
width: 280,
|
|
491
|
+
borderRight: "1px solid #f0f0f0",
|
|
492
|
+
background: "#fafafa",
|
|
493
|
+
display: "flex",
|
|
494
|
+
flexDirection: "column",
|
|
495
|
+
flexShrink: 0
|
|
334
496
|
}
|
|
335
|
-
}
|
|
497
|
+
},
|
|
498
|
+
/* @__PURE__ */ React.createElement(
|
|
499
|
+
"div",
|
|
500
|
+
{
|
|
501
|
+
style: {
|
|
502
|
+
padding: "12px 16px",
|
|
503
|
+
borderBottom: "1px solid #f0f0f0",
|
|
504
|
+
display: "flex",
|
|
505
|
+
justifyContent: "space-between",
|
|
506
|
+
alignItems: "center"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
/* @__PURE__ */ React.createElement(Title, { level: 5, style: { margin: 0, fontSize: 16 } }, "历史会话"),
|
|
510
|
+
/* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(CloseOutlined, null), onClick: () => setShowSessions(false) })
|
|
511
|
+
),
|
|
512
|
+
/* @__PURE__ */ React.createElement("div", { style: { flex: 1, padding: 16, overflowY: "auto" } }, /* @__PURE__ */ React.createElement(
|
|
513
|
+
Button,
|
|
514
|
+
{
|
|
515
|
+
type: "primary",
|
|
516
|
+
block: true,
|
|
517
|
+
icon: /* @__PURE__ */ React.createElement(PlusOutlined, null),
|
|
518
|
+
onClick: createNewSession,
|
|
519
|
+
style: { marginBottom: 12 }
|
|
520
|
+
},
|
|
521
|
+
"新建会话"
|
|
522
|
+
), /* @__PURE__ */ React.createElement(List, { dataSource: sessions, renderItem: renderSession, locale: { emptyText: "暂无会话" } }))
|
|
336
523
|
),
|
|
337
524
|
/* @__PURE__ */ React.createElement(
|
|
338
525
|
"div",
|
|
@@ -347,6 +534,7 @@ var AiChat = ({
|
|
|
347
534
|
renderHeader || /* @__PURE__ */ React.createElement(
|
|
348
535
|
"div",
|
|
349
536
|
{
|
|
537
|
+
className: "ai-chat-header",
|
|
350
538
|
style: {
|
|
351
539
|
padding: "12px 16px",
|
|
352
540
|
background: "#fafafa",
|
|
@@ -357,16 +545,25 @@ var AiChat = ({
|
|
|
357
545
|
flexShrink: 0
|
|
358
546
|
}
|
|
359
547
|
},
|
|
360
|
-
/* @__PURE__ */ React.createElement(Space, null,
|
|
361
|
-
/* @__PURE__ */ React.createElement(Space, null, showExport && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ExportOutlined, null), onClick: exportCurrentSession }, "导出"), (taskWorkflow == null ? void 0 : taskWorkflow.enabled) && /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ExportOutlined, null), onClick: () => exportTasks("json") }, "导出任务")), showSessionPanel && /* @__PURE__ */ React.createElement(
|
|
548
|
+
/* @__PURE__ */ React.createElement(Space, null, showSessionPanel && /* @__PURE__ */ React.createElement(
|
|
362
549
|
Button,
|
|
363
550
|
{
|
|
364
551
|
type: showSessions ? "primary" : "text",
|
|
365
552
|
icon: /* @__PURE__ */ React.createElement(MenuOutlined, null),
|
|
553
|
+
size: "small",
|
|
366
554
|
onClick: () => setShowSessions(!showSessions)
|
|
367
555
|
},
|
|
368
|
-
showSessions ? "
|
|
369
|
-
))
|
|
556
|
+
showSessions ? "收起" : "会话"
|
|
557
|
+
), /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(PlusOutlined, null), onClick: createNewSession, size: "small" }, "新会话")),
|
|
558
|
+
/* @__PURE__ */ React.createElement(Space, null, /* @__PURE__ */ React.createElement(Tooltip, { title: isMaximized ? "还原" : "最大化" }, /* @__PURE__ */ React.createElement(
|
|
559
|
+
Button,
|
|
560
|
+
{
|
|
561
|
+
type: "text",
|
|
562
|
+
icon: isMaximized ? /* @__PURE__ */ React.createElement(CompressOutlined, null) : /* @__PURE__ */ React.createElement(ExpandOutlined, null),
|
|
563
|
+
onClick: toggleMaximize,
|
|
564
|
+
size: "small"
|
|
565
|
+
}
|
|
566
|
+
)), /* @__PURE__ */ React.createElement(Tooltip, { title: "关闭" }, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(CloseOutlined, null), onClick: () => toggleVisible(false), size: "small" })))
|
|
370
567
|
),
|
|
371
568
|
/* @__PURE__ */ React.createElement(
|
|
372
569
|
"div",
|
|
@@ -387,7 +584,7 @@ var AiChat = ({
|
|
|
387
584
|
}
|
|
388
585
|
},
|
|
389
586
|
/* @__PURE__ */ React.createElement(MessageOutlined, { style: { fontSize: 48, color: "#d9d9d9" } }),
|
|
390
|
-
/* @__PURE__ */ React.createElement("div", { style: { marginTop: 16 } }, "开始你的 AI 对话"),
|
|
587
|
+
/* @__PURE__ */ React.createElement("div", { style: { marginTop: 16, fontSize: 16 } }, "开始你的 AI 对话"),
|
|
391
588
|
/* @__PURE__ */ React.createElement("div", { style: { marginTop: 8, fontSize: 13, color: "#bfbfbf" } }, "我可以帮你解答问题、创建任务"),
|
|
392
589
|
/* @__PURE__ */ React.createElement(Button, { type: "primary", onClick: createNewSession, style: { marginTop: 20 } }, "新建会话")
|
|
393
590
|
) : /* @__PURE__ */ React.createElement(List, { dataSource: activeSession.messages, renderItem: renderMsg }),
|
|
@@ -425,7 +622,33 @@ var AiChat = ({
|
|
|
425
622
|
suggestion
|
|
426
623
|
))
|
|
427
624
|
),
|
|
428
|
-
/* @__PURE__ */ React.createElement(
|
|
625
|
+
fileList.length > 0 && /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8 } }, fileList.map((file) => /* @__PURE__ */ React.createElement(
|
|
626
|
+
"div",
|
|
627
|
+
{
|
|
628
|
+
key: file.uid,
|
|
629
|
+
style: {
|
|
630
|
+
display: "inline-block",
|
|
631
|
+
padding: "4px 8px",
|
|
632
|
+
background: "#e6f7ff",
|
|
633
|
+
borderRadius: 4,
|
|
634
|
+
marginRight: 8,
|
|
635
|
+
fontSize: 12
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
file.name,
|
|
639
|
+
/* @__PURE__ */ React.createElement(
|
|
640
|
+
CloseOutlined,
|
|
641
|
+
{
|
|
642
|
+
style: {
|
|
643
|
+
marginLeft: 8,
|
|
644
|
+
cursor: "pointer",
|
|
645
|
+
fontSize: 10
|
|
646
|
+
},
|
|
647
|
+
onClick: () => setFileList(fileList.filter((f) => f.uid !== file.uid))
|
|
648
|
+
}
|
|
649
|
+
)
|
|
650
|
+
))),
|
|
651
|
+
/* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(
|
|
429
652
|
TextArea,
|
|
430
653
|
{
|
|
431
654
|
value: inputValue,
|
|
@@ -438,69 +661,58 @@ var AiChat = ({
|
|
|
438
661
|
handleSend();
|
|
439
662
|
}
|
|
440
663
|
},
|
|
441
|
-
style: {
|
|
664
|
+
style: {
|
|
665
|
+
marginBottom: 8,
|
|
666
|
+
borderRadius: 8,
|
|
667
|
+
paddingRight: 80
|
|
668
|
+
},
|
|
442
669
|
disabled: loading
|
|
443
670
|
}
|
|
444
|
-
),
|
|
445
|
-
/* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React.createElement(Space, null, loading && /* @__PURE__ */ React.createElement(Button, { danger: true, icon: /* @__PURE__ */ React.createElement(StopOutlined, null), onClick: cancelRequest, size: "small" }, "取消"), /* @__PURE__ */ React.createElement(
|
|
446
|
-
Button,
|
|
447
|
-
{
|
|
448
|
-
type: "primary",
|
|
449
|
-
icon: /* @__PURE__ */ React.createElement(SendOutlined, null),
|
|
450
|
-
onClick: handleSend,
|
|
451
|
-
loading,
|
|
452
|
-
disabled: !inputValue.trim(),
|
|
453
|
-
size: "small"
|
|
454
|
-
},
|
|
455
|
-
"发送"
|
|
456
|
-
)))
|
|
457
|
-
),
|
|
458
|
-
showSessionPanel && showSessions && /* @__PURE__ */ React.createElement(
|
|
459
|
-
"div",
|
|
460
|
-
{
|
|
461
|
-
style: {
|
|
462
|
-
width: 240,
|
|
463
|
-
borderLeft: "1px solid #f0f0f0",
|
|
464
|
-
padding: 16,
|
|
465
|
-
background: "#fafafa",
|
|
466
|
-
overflowY: "auto",
|
|
467
|
-
flexShrink: 0
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
/* @__PURE__ */ React.createElement(
|
|
671
|
+
), /* @__PURE__ */ React.createElement(
|
|
471
672
|
"div",
|
|
472
673
|
{
|
|
473
674
|
style: {
|
|
675
|
+
position: "absolute",
|
|
676
|
+
right: 12,
|
|
677
|
+
bottom: 16,
|
|
474
678
|
display: "flex",
|
|
475
|
-
|
|
476
|
-
alignItems: "center",
|
|
477
|
-
marginBottom: 16
|
|
679
|
+
gap: 8
|
|
478
680
|
}
|
|
479
681
|
},
|
|
480
|
-
/* @__PURE__ */ React.createElement(Title, { level: 5, style: { margin: 0 } }, "我的会话"),
|
|
481
682
|
/* @__PURE__ */ React.createElement(
|
|
482
|
-
|
|
683
|
+
Upload,
|
|
483
684
|
{
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
style: { padding: 0 }
|
|
685
|
+
fileList,
|
|
686
|
+
onChange: handleFileChange,
|
|
687
|
+
beforeUpload: () => false,
|
|
688
|
+
showUploadList: false,
|
|
689
|
+
accept: "image/*"
|
|
490
690
|
},
|
|
491
|
-
"
|
|
691
|
+
/* @__PURE__ */ React.createElement(Tooltip, { title: "上传图片" }, /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(FileImageOutlined, null) }))
|
|
692
|
+
),
|
|
693
|
+
/* @__PURE__ */ React.createElement(
|
|
694
|
+
Upload,
|
|
695
|
+
{
|
|
696
|
+
fileList,
|
|
697
|
+
onChange: handleFileChange,
|
|
698
|
+
beforeUpload: () => false,
|
|
699
|
+
showUploadList: false
|
|
700
|
+
},
|
|
701
|
+
/* @__PURE__ */ React.createElement(Tooltip, { title: "上传文件" }, /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(PaperClipOutlined, null) }))
|
|
492
702
|
)
|
|
493
|
-
),
|
|
494
|
-
/* @__PURE__ */ React.createElement(
|
|
495
|
-
|
|
703
|
+
)),
|
|
704
|
+
/* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React.createElement(Space, null, loading && /* @__PURE__ */ React.createElement(Button, { danger: true, icon: /* @__PURE__ */ React.createElement(StopOutlined, null), onClick: cancelRequest, size: "small" }, "终止"), /* @__PURE__ */ React.createElement(
|
|
705
|
+
Button,
|
|
496
706
|
{
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
707
|
+
type: "primary",
|
|
708
|
+
icon: /* @__PURE__ */ React.createElement(SendOutlined, null),
|
|
709
|
+
onClick: handleSend,
|
|
710
|
+
loading,
|
|
711
|
+
disabled: !inputValue.trim() && fileList.length === 0,
|
|
712
|
+
size: "small"
|
|
713
|
+
},
|
|
714
|
+
"发送"
|
|
715
|
+
)))
|
|
504
716
|
)
|
|
505
717
|
)
|
|
506
718
|
)
|