@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
|
@@ -43,27 +43,31 @@ module.exports = __toCommonJS(AiChat_exports);
|
|
|
43
43
|
var import_icons = require("@ant-design/icons");
|
|
44
44
|
var import_antd = require("antd");
|
|
45
45
|
var import_react = __toESM(require("react"));
|
|
46
|
+
var import_intentRecognizer = require("./intentRecognizer");
|
|
46
47
|
var import_MarkdownRender = __toESM(require("./MarkdownRender"));
|
|
47
48
|
var import_useAiChat = require("./useAiChat");
|
|
48
49
|
var import_useTaskWorkflow = require("./useTaskWorkflow");
|
|
49
|
-
var import_intentRecognizer = require("./intentRecognizer");
|
|
50
|
-
var import_useAiChat2 = require("./useAiChat");
|
|
51
|
-
var import_useTaskWorkflow2 = require("./useTaskWorkflow");
|
|
52
50
|
var import_intentRecognizer2 = require("./intentRecognizer");
|
|
53
51
|
var import_navigationManager = require("./navigationManager");
|
|
52
|
+
var import_useAiChat2 = require("./useAiChat");
|
|
53
|
+
var import_useTaskWorkflow2 = require("./useTaskWorkflow");
|
|
54
54
|
var { TextArea } = import_antd.Input;
|
|
55
55
|
var { Title } = import_antd.Typography;
|
|
56
56
|
var AiChat = ({
|
|
57
57
|
apiPath = "/api/ai/chat-stream",
|
|
58
58
|
storageKey = "ai_chat_sessions",
|
|
59
|
-
position = { bottom: 24, right: 24 },
|
|
59
|
+
position: initialPosition = { bottom: 24, right: 24 },
|
|
60
60
|
buttonSize = 56,
|
|
61
61
|
zIndex = 1080,
|
|
62
62
|
showSessionPanel = true,
|
|
63
|
-
showExport = true,
|
|
64
63
|
onBeforeSend,
|
|
65
64
|
onError,
|
|
66
65
|
onSuccess,
|
|
66
|
+
onFetchSessions,
|
|
67
|
+
onFetchSessionDetail,
|
|
68
|
+
onCreateSession,
|
|
69
|
+
onSendMessage,
|
|
70
|
+
onUploadFile,
|
|
67
71
|
className,
|
|
68
72
|
style,
|
|
69
73
|
renderTrigger,
|
|
@@ -85,17 +89,25 @@ var AiChat = ({
|
|
|
85
89
|
sendQuestion,
|
|
86
90
|
regenerateAnswer,
|
|
87
91
|
deleteSingleMsg,
|
|
88
|
-
clearCurrentSession,
|
|
89
|
-
exportCurrentSession,
|
|
90
92
|
cancelRequest,
|
|
91
93
|
toggleVisible
|
|
92
|
-
} = (0, import_useAiChat.useAiChat)({
|
|
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
|
+
});
|
|
93
106
|
const {
|
|
94
107
|
tasks,
|
|
95
108
|
createTask,
|
|
96
109
|
updateTaskStatus,
|
|
97
110
|
deleteTask,
|
|
98
|
-
exportTasks,
|
|
99
111
|
createTaskFromNaturalLanguage,
|
|
100
112
|
updateUrlWithTaskId,
|
|
101
113
|
refreshCurrentPage,
|
|
@@ -123,11 +135,63 @@ var AiChat = ({
|
|
|
123
135
|
const [inputValue, setInputValue] = (0, import_react.useState)("");
|
|
124
136
|
const [showSessions, setShowSessions] = (0, import_react.useState)(false);
|
|
125
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 });
|
|
126
143
|
const messagesEndRef = (0, import_react.useRef)(null);
|
|
144
|
+
const triggerRef = (0, import_react.useRef)(null);
|
|
145
|
+
const fileInputRef = (0, import_react.useRef)(null);
|
|
127
146
|
(0, import_react.useEffect)(() => {
|
|
128
147
|
var _a;
|
|
129
148
|
(_a = messagesEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
|
|
130
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]);
|
|
131
195
|
const handleInputChange = (0, import_react.useCallback)((e) => {
|
|
132
196
|
const value = e.target.value;
|
|
133
197
|
setInputValue(value);
|
|
@@ -139,25 +203,70 @@ var AiChat = ({
|
|
|
139
203
|
setSuggestions([]);
|
|
140
204
|
}
|
|
141
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
|
+
);
|
|
142
242
|
const handleSend = (0, import_react.useCallback)(async () => {
|
|
143
|
-
if (!inputValue.trim()) {
|
|
144
|
-
import_antd.message.warning("
|
|
243
|
+
if (!inputValue.trim() && fileList.length === 0) {
|
|
244
|
+
import_antd.message.warning("请输入问题或上传文件");
|
|
145
245
|
return;
|
|
146
246
|
}
|
|
147
|
-
|
|
247
|
+
let content = inputValue.trim();
|
|
248
|
+
if (fileList.length > 0) {
|
|
249
|
+
const fileInfo = fileList.map((f) => f.name).join(", ");
|
|
250
|
+
content += `
|
|
251
|
+
[附件: ${fileInfo}]`;
|
|
252
|
+
}
|
|
148
253
|
setInputValue("");
|
|
149
254
|
setSuggestions([]);
|
|
255
|
+
setFileList([]);
|
|
150
256
|
const intentEnabled = (intentConfig == null ? void 0 : intentConfig.enabled) !== false;
|
|
151
257
|
if (intentEnabled && (0, import_intentRecognizer.isTaskCreationIntent)(content)) {
|
|
152
258
|
await executeTaskCreationWorkflow(content);
|
|
153
259
|
return;
|
|
154
260
|
}
|
|
155
261
|
sendQuestion(content);
|
|
156
|
-
}, [inputValue, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
|
|
262
|
+
}, [inputValue, fileList, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
|
|
157
263
|
const copyMsg = (c) => {
|
|
158
264
|
navigator.clipboard.writeText(c);
|
|
159
265
|
import_antd.message.success("复制成功");
|
|
160
266
|
};
|
|
267
|
+
const toggleMaximize = (0, import_react.useCallback)(() => {
|
|
268
|
+
setIsMaximized((prev) => !prev);
|
|
269
|
+
}, []);
|
|
161
270
|
const renderMsg = (item) => /* @__PURE__ */ import_react.default.createElement(
|
|
162
271
|
import_antd.List.Item,
|
|
163
272
|
{
|
|
@@ -192,16 +301,29 @@ var AiChat = ({
|
|
|
192
301
|
flexShrink: 0
|
|
193
302
|
}
|
|
194
303
|
}
|
|
195
|
-
)) : item.role === "system" ? /* @__PURE__ */ import_react.default.createElement(
|
|
196
|
-
|
|
304
|
+
)) : item.role === "system" ? /* @__PURE__ */ import_react.default.createElement(
|
|
305
|
+
"div",
|
|
197
306
|
{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
307
|
+
style: {
|
|
308
|
+
display: "flex",
|
|
309
|
+
alignItems: "center",
|
|
310
|
+
gap: 8,
|
|
311
|
+
fontSize: 13
|
|
312
|
+
}
|
|
202
313
|
},
|
|
203
|
-
"
|
|
204
|
-
|
|
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" } }))))
|
|
205
327
|
)
|
|
206
328
|
);
|
|
207
329
|
const renderSession = (s) => /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -213,14 +335,14 @@ var AiChat = ({
|
|
|
213
335
|
return;
|
|
214
336
|
}
|
|
215
337
|
switchSession(s.id);
|
|
216
|
-
setShowSessions(false);
|
|
217
338
|
},
|
|
218
339
|
style: {
|
|
219
340
|
padding: "10px 12px",
|
|
220
341
|
borderRadius: 8,
|
|
221
342
|
cursor: "pointer",
|
|
222
343
|
backgroundColor: (activeSession == null ? void 0 : activeSession.id) === s.id ? "#e6f7ff" : "#fff",
|
|
223
|
-
transition: "all 0.2s"
|
|
344
|
+
transition: "all 0.2s",
|
|
345
|
+
marginBottom: 8
|
|
224
346
|
}
|
|
225
347
|
},
|
|
226
348
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -265,67 +387,129 @@ var AiChat = ({
|
|
|
265
387
|
)
|
|
266
388
|
)
|
|
267
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
|
+
};
|
|
268
415
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
269
416
|
"div",
|
|
270
417
|
{
|
|
271
418
|
className,
|
|
272
419
|
style: {
|
|
273
420
|
position: "fixed",
|
|
274
|
-
bottom:
|
|
275
|
-
right:
|
|
421
|
+
bottom: initialPosition.bottom,
|
|
422
|
+
right: initialPosition.right,
|
|
276
423
|
zIndex,
|
|
277
424
|
display: "flex",
|
|
278
425
|
flexDirection: "column",
|
|
279
426
|
alignItems: "flex-end",
|
|
427
|
+
transform: dialogPosition.x !== 0 || dialogPosition.y !== 0 ? `translate(${dialogPosition.x}px, ${dialogPosition.y}px)` : void 0,
|
|
280
428
|
...style
|
|
281
429
|
}
|
|
282
430
|
},
|
|
283
|
-
!visible ? renderTrigger ? /* @__PURE__ */ import_react.default.createElement(
|
|
284
|
-
|
|
431
|
+
!visible ? renderTrigger ? /* @__PURE__ */ import_react.default.createElement(
|
|
432
|
+
"div",
|
|
285
433
|
{
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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
|
+
}
|
|
295
460
|
}
|
|
296
|
-
|
|
461
|
+
)
|
|
297
462
|
) : /* @__PURE__ */ import_react.default.createElement(
|
|
298
463
|
"div",
|
|
299
464
|
{
|
|
300
465
|
style: {
|
|
301
|
-
|
|
302
|
-
height: 680,
|
|
466
|
+
...getDialogStyle(),
|
|
303
467
|
background: "#fff",
|
|
304
|
-
borderRadius: 12,
|
|
305
468
|
boxShadow: "0 4px 20px rgba(0,0,0,0.15)",
|
|
306
469
|
overflow: "hidden",
|
|
307
470
|
display: "flex",
|
|
308
471
|
flexDirection: "row",
|
|
309
|
-
marginBottom: 12,
|
|
310
|
-
transition: "
|
|
311
|
-
position: "relative"
|
|
472
|
+
marginBottom: isMaximized ? 0 : 12,
|
|
473
|
+
transition: "all 0.3s ease"
|
|
312
474
|
}
|
|
313
475
|
},
|
|
314
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
315
|
-
|
|
476
|
+
showSessionPanel && showSessions && /* @__PURE__ */ import_react.default.createElement(
|
|
477
|
+
"div",
|
|
316
478
|
{
|
|
317
|
-
type: "text",
|
|
318
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.SwitcherOutlined, null),
|
|
319
|
-
onClick: () => toggleVisible(false),
|
|
320
479
|
style: {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
480
|
+
width: 280,
|
|
481
|
+
borderRight: "1px solid #f0f0f0",
|
|
482
|
+
background: "#fafafa",
|
|
483
|
+
display: "flex",
|
|
484
|
+
flexDirection: "column",
|
|
485
|
+
flexShrink: 0
|
|
327
486
|
}
|
|
328
|
-
}
|
|
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: "暂无会话" } }))
|
|
329
513
|
),
|
|
330
514
|
/* @__PURE__ */ import_react.default.createElement(
|
|
331
515
|
"div",
|
|
@@ -340,6 +524,7 @@ var AiChat = ({
|
|
|
340
524
|
renderHeader || /* @__PURE__ */ import_react.default.createElement(
|
|
341
525
|
"div",
|
|
342
526
|
{
|
|
527
|
+
className: "ai-chat-header",
|
|
343
528
|
style: {
|
|
344
529
|
padding: "12px 16px",
|
|
345
530
|
background: "#fafafa",
|
|
@@ -350,16 +535,25 @@ var AiChat = ({
|
|
|
350
535
|
flexShrink: 0
|
|
351
536
|
}
|
|
352
537
|
},
|
|
353
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null,
|
|
354
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, showExport && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ExportOutlined, null), onClick: exportCurrentSession }, "导出"), (taskWorkflow == null ? void 0 : taskWorkflow.enabled) && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ExportOutlined, null), onClick: () => exportTasks("json") }, "导出任务")), showSessionPanel && /* @__PURE__ */ import_react.default.createElement(
|
|
538
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, showSessionPanel && /* @__PURE__ */ import_react.default.createElement(
|
|
355
539
|
import_antd.Button,
|
|
356
540
|
{
|
|
357
541
|
type: showSessions ? "primary" : "text",
|
|
358
542
|
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.MenuOutlined, null),
|
|
543
|
+
size: "small",
|
|
359
544
|
onClick: () => setShowSessions(!showSessions)
|
|
360
545
|
},
|
|
361
|
-
showSessions ? "
|
|
362
|
-
))
|
|
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" })))
|
|
363
557
|
),
|
|
364
558
|
/* @__PURE__ */ import_react.default.createElement(
|
|
365
559
|
"div",
|
|
@@ -380,7 +574,7 @@ var AiChat = ({
|
|
|
380
574
|
}
|
|
381
575
|
},
|
|
382
576
|
/* @__PURE__ */ import_react.default.createElement(import_icons.MessageOutlined, { style: { fontSize: 48, color: "#d9d9d9" } }),
|
|
383
|
-
/* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 16 } }, "开始你的 AI 对话"),
|
|
577
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 16, fontSize: 16 } }, "开始你的 AI 对话"),
|
|
384
578
|
/* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 8, fontSize: 13, color: "#bfbfbf" } }, "我可以帮你解答问题、创建任务"),
|
|
385
579
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "primary", onClick: createNewSession, style: { marginTop: 20 } }, "新建会话")
|
|
386
580
|
) : /* @__PURE__ */ import_react.default.createElement(import_antd.List, { dataSource: activeSession.messages, renderItem: renderMsg }),
|
|
@@ -418,7 +612,33 @@ var AiChat = ({
|
|
|
418
612
|
suggestion
|
|
419
613
|
))
|
|
420
614
|
),
|
|
421
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
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(
|
|
422
642
|
TextArea,
|
|
423
643
|
{
|
|
424
644
|
value: inputValue,
|
|
@@ -431,69 +651,58 @@ var AiChat = ({
|
|
|
431
651
|
handleSend();
|
|
432
652
|
}
|
|
433
653
|
},
|
|
434
|
-
style: {
|
|
654
|
+
style: {
|
|
655
|
+
marginBottom: 8,
|
|
656
|
+
borderRadius: 8,
|
|
657
|
+
paddingRight: 80
|
|
658
|
+
},
|
|
435
659
|
disabled: loading
|
|
436
660
|
}
|
|
437
|
-
),
|
|
438
|
-
/* @__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(
|
|
439
|
-
import_antd.Button,
|
|
440
|
-
{
|
|
441
|
-
type: "primary",
|
|
442
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.SendOutlined, null),
|
|
443
|
-
onClick: handleSend,
|
|
444
|
-
loading,
|
|
445
|
-
disabled: !inputValue.trim(),
|
|
446
|
-
size: "small"
|
|
447
|
-
},
|
|
448
|
-
"发送"
|
|
449
|
-
)))
|
|
450
|
-
),
|
|
451
|
-
showSessionPanel && showSessions && /* @__PURE__ */ import_react.default.createElement(
|
|
452
|
-
"div",
|
|
453
|
-
{
|
|
454
|
-
style: {
|
|
455
|
-
width: 240,
|
|
456
|
-
borderLeft: "1px solid #f0f0f0",
|
|
457
|
-
padding: 16,
|
|
458
|
-
background: "#fafafa",
|
|
459
|
-
overflowY: "auto",
|
|
460
|
-
flexShrink: 0
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
661
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
464
662
|
"div",
|
|
465
663
|
{
|
|
466
664
|
style: {
|
|
665
|
+
position: "absolute",
|
|
666
|
+
right: 12,
|
|
667
|
+
bottom: 16,
|
|
467
668
|
display: "flex",
|
|
468
|
-
|
|
469
|
-
alignItems: "center",
|
|
470
|
-
marginBottom: 16
|
|
669
|
+
gap: 8
|
|
471
670
|
}
|
|
472
671
|
},
|
|
473
|
-
/* @__PURE__ */ import_react.default.createElement(Title, { level: 5, style: { margin: 0 } }, "我的会话"),
|
|
474
672
|
/* @__PURE__ */ import_react.default.createElement(
|
|
475
|
-
import_antd.
|
|
673
|
+
import_antd.Upload,
|
|
476
674
|
{
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
style: { padding: 0 }
|
|
675
|
+
fileList,
|
|
676
|
+
onChange: handleFileChange,
|
|
677
|
+
beforeUpload: () => false,
|
|
678
|
+
showUploadList: false,
|
|
679
|
+
accept: "image/*"
|
|
483
680
|
},
|
|
484
|
-
"
|
|
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) }))
|
|
485
692
|
)
|
|
486
|
-
),
|
|
487
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
488
|
-
import_antd.
|
|
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,
|
|
489
696
|
{
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
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
|
+
)))
|
|
497
706
|
)
|
|
498
707
|
)
|
|
499
708
|
)
|