@mxmweb/aichat 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/aichat.css +1 -0
- package/{dist/components → components}/AiChat.d.ts +1 -11
- package/{dist/index.js → index.js} +7 -7
- package/package.json +10 -41
- package/.editorconfig +0 -38
- package/.github/workflows/release.yml +0 -60
- package/.prettierignore +0 -16
- package/.prettierrc +0 -17
- package/.releaserc.json +0 -36
- package/CHANGELOG.md +0 -58
- package/CONTRIBUTING.md +0 -111
- package/NPMREADME.md +0 -215
- package/bash.exe.stackdump +0 -40
- package/components.json +0 -21
- package/demo.txt +0 -134
- package/dist/README.md +0 -216
- package/dist/assets/aichat.css +0 -1
- package/dist/package.json +0 -19
- package/eslint.config.js +0 -92
- package/index.html +0 -14
- package/postcss.config.cjs +0 -19
- package/public/icons/answerAwartar.png +0 -0
- package/public/icons/docx-file.png +0 -0
- package/public/icons/folder.png +0 -0
- package/public/icons/html.png +0 -0
- package/public/icons/image.png +0 -0
- package/public/icons/jpg-file.png +0 -0
- package/public/icons/json.png +0 -0
- package/public/icons/md.png +0 -0
- package/public/icons/pdf.png +0 -0
- package/public/icons/pptx.png +0 -0
- package/public/icons/questionAwartar.png +0 -0
- package/public/icons/sheets.png +0 -0
- package/public/icons/txt.png +0 -0
- package/public/icons/xlsx.png +0 -0
- package/public/libs/luckysheet/fontAwesome.otf +0 -0
- package/public/libs/luckysheet/fontawesome-webfont.eot +0 -0
- package/public/libs/luckysheet/fontawesome-webfont.svg +0 -2671
- package/public/libs/luckysheet/fontawesome-webfont.ttf +0 -0
- package/public/libs/luckysheet/fontawesome-webfont.woff +0 -0
- package/public/libs/luckysheet/fontawesome-webfont.woff2 +0 -0
- package/public/libs/luckysheet/fonts/fontawesome-webfont.ttf +0 -0
- package/public/libs/luckysheet/fonts/fontawesome-webfont.woff +0 -0
- package/public/libs/luckysheet/fonts/fontawesome-webfont.woff2 +0 -0
- package/public/libs/luckysheet/iconfont.css +0 -461
- package/public/libs/luckysheet/jquery.min.js +0 -2
- package/public/libs/luckysheet/luckysheet.css +0 -1
- package/public/libs/luckysheet/luckysheet.umd.js +0 -27
- package/public/libs/luckysheet/plugin.js +0 -1
- package/public/libs/luckysheet/plugins.css +0 -10
- package/public/libs/luckysheet/pluginsCss.css +0 -1
- package/public/vite.svg +0 -1
- package/public/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/public/vs/base/common/worker/simpleWorker.nls.de.js +0 -8
- package/public/vs/base/common/worker/simpleWorker.nls.es.js +0 -8
- package/public/vs/base/common/worker/simpleWorker.nls.fr.js +0 -8
- package/public/vs/base/common/worker/simpleWorker.nls.it.js +0 -8
- package/public/vs/base/common/worker/simpleWorker.nls.ja.js +0 -8
- package/public/vs/base/common/worker/simpleWorker.nls.js +0 -8
- package/public/vs/base/common/worker/simpleWorker.nls.ko.js +0 -8
- package/public/vs/base/common/worker/simpleWorker.nls.ru.js +0 -8
- package/public/vs/base/common/worker/simpleWorker.nls.zh-cn.js +0 -8
- package/public/vs/base/common/worker/simpleWorker.nls.zh-tw.js +0 -8
- package/public/vs/base/worker/workerMain.js +0 -27
- package/public/vs/basic-languages/abap/abap.js +0 -10
- package/public/vs/basic-languages/apex/apex.js +0 -10
- package/public/vs/basic-languages/azcli/azcli.js +0 -10
- package/public/vs/basic-languages/bat/bat.js +0 -10
- package/public/vs/basic-languages/bicep/bicep.js +0 -11
- package/public/vs/basic-languages/cameligo/cameligo.js +0 -10
- package/public/vs/basic-languages/clojure/clojure.js +0 -10
- package/public/vs/basic-languages/coffee/coffee.js +0 -10
- package/public/vs/basic-languages/cpp/cpp.js +0 -10
- package/public/vs/basic-languages/csharp/csharp.js +0 -10
- package/public/vs/basic-languages/csp/csp.js +0 -10
- package/public/vs/basic-languages/css/css.js +0 -12
- package/public/vs/basic-languages/cypher/cypher.js +0 -10
- package/public/vs/basic-languages/dart/dart.js +0 -10
- package/public/vs/basic-languages/dockerfile/dockerfile.js +0 -10
- package/public/vs/basic-languages/ecl/ecl.js +0 -10
- package/public/vs/basic-languages/elixir/elixir.js +0 -10
- package/public/vs/basic-languages/flow9/flow9.js +0 -10
- package/public/vs/basic-languages/freemarker2/freemarker2.js +0 -12
- package/public/vs/basic-languages/fsharp/fsharp.js +0 -10
- package/public/vs/basic-languages/go/go.js +0 -10
- package/public/vs/basic-languages/graphql/graphql.js +0 -10
- package/public/vs/basic-languages/handlebars/handlebars.js +0 -10
- package/public/vs/basic-languages/hcl/hcl.js +0 -10
- package/public/vs/basic-languages/html/html.js +0 -10
- package/public/vs/basic-languages/ini/ini.js +0 -10
- package/public/vs/basic-languages/java/java.js +0 -10
- package/public/vs/basic-languages/javascript/javascript.js +0 -10
- package/public/vs/basic-languages/julia/julia.js +0 -10
- package/public/vs/basic-languages/kotlin/kotlin.js +0 -10
- package/public/vs/basic-languages/less/less.js +0 -11
- package/public/vs/basic-languages/lexon/lexon.js +0 -10
- package/public/vs/basic-languages/liquid/liquid.js +0 -10
- package/public/vs/basic-languages/lua/lua.js +0 -10
- package/public/vs/basic-languages/m3/m3.js +0 -10
- package/public/vs/basic-languages/markdown/markdown.js +0 -10
- package/public/vs/basic-languages/mdx/mdx.js +0 -10
- package/public/vs/basic-languages/mips/mips.js +0 -10
- package/public/vs/basic-languages/msdax/msdax.js +0 -10
- package/public/vs/basic-languages/mysql/mysql.js +0 -10
- package/public/vs/basic-languages/objective-c/objective-c.js +0 -10
- package/public/vs/basic-languages/pascal/pascal.js +0 -10
- package/public/vs/basic-languages/pascaligo/pascaligo.js +0 -10
- package/public/vs/basic-languages/perl/perl.js +0 -10
- package/public/vs/basic-languages/pgsql/pgsql.js +0 -10
- package/public/vs/basic-languages/php/php.js +0 -10
- package/public/vs/basic-languages/pla/pla.js +0 -10
- package/public/vs/basic-languages/postiats/postiats.js +0 -10
- package/public/vs/basic-languages/powerquery/powerquery.js +0 -10
- package/public/vs/basic-languages/powershell/powershell.js +0 -10
- package/public/vs/basic-languages/protobuf/protobuf.js +0 -11
- package/public/vs/basic-languages/pug/pug.js +0 -10
- package/public/vs/basic-languages/python/python.js +0 -10
- package/public/vs/basic-languages/qsharp/qsharp.js +0 -10
- package/public/vs/basic-languages/r/r.js +0 -10
- package/public/vs/basic-languages/razor/razor.js +0 -10
- package/public/vs/basic-languages/redis/redis.js +0 -10
- package/public/vs/basic-languages/redshift/redshift.js +0 -10
- package/public/vs/basic-languages/restructuredtext/restructuredtext.js +0 -10
- package/public/vs/basic-languages/ruby/ruby.js +0 -10
- package/public/vs/basic-languages/rust/rust.js +0 -10
- package/public/vs/basic-languages/sb/sb.js +0 -10
- package/public/vs/basic-languages/scala/scala.js +0 -10
- package/public/vs/basic-languages/scheme/scheme.js +0 -10
- package/public/vs/basic-languages/scss/scss.js +0 -12
- package/public/vs/basic-languages/shell/shell.js +0 -10
- package/public/vs/basic-languages/solidity/solidity.js +0 -10
- package/public/vs/basic-languages/sophia/sophia.js +0 -10
- package/public/vs/basic-languages/sparql/sparql.js +0 -10
- package/public/vs/basic-languages/sql/sql.js +0 -10
- package/public/vs/basic-languages/st/st.js +0 -10
- package/public/vs/basic-languages/swift/swift.js +0 -13
- package/public/vs/basic-languages/systemverilog/systemverilog.js +0 -10
- package/public/vs/basic-languages/tcl/tcl.js +0 -10
- package/public/vs/basic-languages/twig/twig.js +0 -10
- package/public/vs/basic-languages/typescript/typescript.js +0 -10
- package/public/vs/basic-languages/vb/vb.js +0 -10
- package/public/vs/basic-languages/wgsl/wgsl.js +0 -307
- package/public/vs/basic-languages/xml/xml.js +0 -10
- package/public/vs/basic-languages/yaml/yaml.js +0 -10
- package/public/vs/editor/editor.main.css +0 -6
- package/public/vs/editor/editor.main.js +0 -745
- package/public/vs/editor/editor.main.js.gz +0 -0
- package/public/vs/editor/editor.main.nls.de.js +0 -31
- package/public/vs/editor/editor.main.nls.es.js +0 -31
- package/public/vs/editor/editor.main.nls.fr.js +0 -29
- package/public/vs/editor/editor.main.nls.it.js +0 -29
- package/public/vs/editor/editor.main.nls.ja.js +0 -31
- package/public/vs/editor/editor.main.nls.js +0 -29
- package/public/vs/editor/editor.main.nls.ko.js +0 -29
- package/public/vs/editor/editor.main.nls.ru.js +0 -31
- package/public/vs/editor/editor.main.nls.zh-cn.js +0 -31
- package/public/vs/editor/editor.main.nls.zh-tw.js +0 -29
- package/public/vs/language/css/cssMode.js +0 -13
- package/public/vs/language/css/cssWorker.js +0 -81
- package/public/vs/language/css/cssWorker.js.gz +0 -0
- package/public/vs/language/html/htmlMode.js +0 -13
- package/public/vs/language/html/htmlWorker.js +0 -453
- package/public/vs/language/json/jsonMode.js +0 -15
- package/public/vs/language/json/jsonWorker.js +0 -36
- package/public/vs/language/typescript/tsMode.js +0 -20
- package/public/vs/language/typescript/tsWorker.js +0 -37016
- package/public/vs/language/typescript/tsWorker.js.gz +0 -0
- package/public/vs/loader.js +0 -11
- package/public/worker/pdf.worker.min.js +0 -32
- package/src/HeadlessChat.tsx +0 -250
- package/src/LoginPage/components/Login/LoginBox/index.tsx +0 -103
- package/src/LoginPage/components/Login/RegisterBox/index.tsx +0 -181
- package/src/LoginPage/components/Login/index.tsx +0 -101
- package/src/LoginPage/index.tsx +0 -103
- package/src/LoginPage/useServices.ts +0 -53
- package/src/LoginPage/utils.ts +0 -42
- package/src/Preview.tsx +0 -278
- package/src/UseLogingHeadless.tsx +0 -238
- package/src/adopters/GientechChat/Conversations/Item.tsx +0 -132
- package/src/adopters/GientechChat/Conversations/List.tsx +0 -127
- package/src/adopters/GientechChat/Conversations/groupByTime.ts +0 -39
- package/src/adopters/GientechChat/Conversations/index.tsx +0 -102
- package/src/adopters/GientechChat/constants.tsx +0 -33
- package/src/adopters/GientechChat/index.tsx +0 -1242
- package/src/adopters/GientechChat/types.ts +0 -17
- package/src/adopters/HeadLessChat/constants.tsx +0 -32
- package/src/adopters/HeadLessChat/index.tsx +0 -1038
- package/src/adopters/HeadLessChat/types.ts +0 -23
- package/src/adopters/gientechCommon/components/AppError.tsx +0 -32
- package/src/adopters/gientechCommon/components/AppLoading.tsx +0 -75
- package/src/adopters/gientechCommon/components/DisplayError.tsx +0 -33
- package/src/adopters/gientechCommon/components/DisplayLoading.tsx +0 -38
- package/src/adopters/gientechCommon/components/FeedBackModal.tsx +0 -310
- package/src/adopters/gientechCommon/components/FileManager/index.tsx +0 -381
- package/src/adopters/gientechCommon/components/FileManager/style.css +0 -5
- package/src/adopters/gientechCommon/components/Messages/AiChatBox.tsx +0 -530
- package/src/adopters/gientechCommon/components/Messages/GientechNewChatWelcome.tsx +0 -245
- package/src/adopters/gientechCommon/components/Messages/ReferenceCard.tsx +0 -302
- package/src/adopters/gientechCommon/components/Messages/RetriveItem.tsx +0 -194
- package/src/adopters/gientechCommon/components/Messages/UserChatBox.tsx +0 -211
- package/src/adopters/gientechCommon/components/RenameModal.tsx +0 -75
- package/src/adopters/gientechCommon/components/style.less +0 -11
- package/src/adopters/gientechCommon/configs/commonConfig.ts +0 -2
- package/src/adopters/gientechCommon/configs/senderConfig.ts +0 -0
- package/src/adopters/gientechCommon/configs/stylesConfig.ts +0 -142
- package/src/adopters/gientechCommon/hooks/AichatUseController.tsx +0 -308
- package/src/adopters/gientechCommon/slate/converters/deserializers.ts +0 -757
- package/src/adopters/gientechCommon/slate/converters/mockData.ts +0 -232
- package/src/adopters/gientechCommon/slate/converters/slateConverters.ts +0 -258
- package/src/adopters/gientechCommon/slate/richElements/index.tsx +0 -476
- package/src/adopters/gientechCommon/utils/request.ts +0 -37
- package/src/adopters/gientechCommon/utils/serverFn.ts +0 -143
- package/src/assets/img/downArrow.png +0 -0
- package/src/assets/img/excel.png +0 -0
- package/src/assets/img/img.png +0 -0
- package/src/assets/img/pdf.png +0 -0
- package/src/assets/img/ppt.png +0 -0
- package/src/assets/img/txt.png +0 -0
- package/src/assets/img/word.png +0 -0
- package/src/assets/login/homeBg.png +0 -0
- package/src/assets/login/left.jpg +0 -0
- package/src/assets/login/logoImg.png +0 -0
- package/src/assets/style.css +0 -1
- package/src/components/AiChat.tsx +0 -647
- package/src/components/AiChat.types.tsx +0 -110
- package/src/components/DefaultAppError.tsx +0 -7
- package/src/components/DefaultAppLoading.tsx +0 -7
- package/src/components/DefaultDisplayError.tsx +0 -7
- package/src/components/DefaultDisplayLoading.tsx +0 -7
- package/src/components/DefaultNewChatWelcome.tsx +0 -10
- package/src/components/Displayer/DefaultAiChatBox.tsx +0 -64
- package/src/components/Displayer/DefaultUserChatBox.tsx +0 -34
- package/src/components/Displayer/index.tsx +0 -107
- package/src/components/Displayer/slate/converters/deserializers.ts +0 -427
- package/src/components/Displayer/slate/converters/mockData.ts +0 -190
- package/src/components/Displayer/slate/converters/slateConverters.ts +0 -258
- package/src/components/Displayer/slate/richElements/index.tsx +0 -308
- package/src/components/DrawerContent.tsx +0 -105
- package/src/components/DrawerPreview.tsx +0 -36
- package/src/components/DynamicForm.tsx +0 -29
- package/src/components/Loading.tsx +0 -0
- package/src/components/RetrieveTest/components/ChatInput.tsx +0 -198
- package/src/components/RetrieveTest/components/ChatMessage.tsx +0 -894
- package/src/components/RetrieveTest/components/ConfigPanel.tsx +0 -472
- package/src/components/RetrieveTest/components/RichTextEditor.tsx +0 -97
- package/src/components/RetrieveTest/components/VoiceInput.tsx +0 -257
- package/src/components/RetrieveTest/components/config/index.ts +0 -0
- package/src/components/RetrieveTest/components/converters/deserializers.ts +0 -393
- package/src/components/RetrieveTest/components/converters/mockData.ts +0 -190
- package/src/components/RetrieveTest/components/converters/slateConverters.ts +0 -164
- package/src/components/RetrieveTest/components/richElements/index.tsx +0 -339
- package/src/components/RetrieveTest/components/style.css +0 -3
- package/src/components/RetrieveTest/index.tsx +0 -679
- package/src/components/Sender/FileUpload.tsx +0 -76
- package/src/components/Sender/FilesDisplay.tsx +0 -103
- package/src/components/Sender/VoiceInput.tsx +0 -81
- package/src/components/Sender/contexts/BadgeContext.tsx +0 -36
- package/src/components/Sender/index.tsx +0 -545
- package/src/components/Sidebar/Loading.tsx +0 -0
- package/src/components/Sidebar/RetriveConfigPanel.tsx +0 -41
- package/src/components/Sidebar/useDynamicFormItems.tsx +0 -176
- package/src/components/SidebarProp.ts +0 -41
- package/src/components/common/FileCardCommon.tsx +0 -82
- package/src/components/defaultStyleSet.tsx +0 -142
- package/src/components/styles.config.ts +0 -4
- package/src/lib_enter.ts +0 -12
- package/src/main.tsx +0 -12
- package/src/mockForm.ts +0 -91
- package/src/servers/chatApi.ts +0 -43
- package/src/servers/fileApi.ts +0 -12
- package/src/servers/modelApi.ts +0 -19
- package/src/style.css +0 -22
- package/src/testj.js +0 -3
- package/src/type.d.ts +0 -0
- package/src/utils/commonFn.tsx +0 -111
- package/src/utils/index.tsx +0 -94
- package/src/vite-env.d.ts +0 -11
- package/tailwind.config.js +0 -18
- package/tsconfig.app.json +0 -29
- package/tsconfig.app.tsbuildinfo +0 -11
- package/tsconfig.json +0 -13
- package/tsconfig.node.json +0 -22
- package/tsconfig.node.tsbuildinfo +0 -1
- package/vite.config.ts +0 -138
- package/vite.config_mainapp.ts +0 -126
- /package/{dist/HeadlessChat.d.ts → HeadlessChat.d.ts} +0 -0
- /package/{dist/LoginPage → LoginPage}/components/Login/LoginBox/index.d.ts +0 -0
- /package/{dist/LoginPage → LoginPage}/components/Login/RegisterBox/index.d.ts +0 -0
- /package/{dist/LoginPage → LoginPage}/components/Login/index.d.ts +0 -0
- /package/{dist/LoginPage → LoginPage}/index.d.ts +0 -0
- /package/{dist/LoginPage → LoginPage}/useServices.d.ts +0 -0
- /package/{dist/LoginPage → LoginPage}/utils.d.ts +0 -0
- /package/{dist/Preview.d.ts → Preview.d.ts} +0 -0
- /package/{dist/UseLogingHeadless.d.ts → UseLogingHeadless.d.ts} +0 -0
- /package/{dist/adopters → adopters}/GientechChat/Conversations/Item.d.ts +0 -0
- /package/{dist/adopters → adopters}/GientechChat/Conversations/List.d.ts +0 -0
- /package/{dist/adopters → adopters}/GientechChat/Conversations/groupByTime.d.ts +0 -0
- /package/{dist/adopters → adopters}/GientechChat/Conversations/index.d.ts +0 -0
- /package/{dist/adopters → adopters}/GientechChat/constants.d.ts +0 -0
- /package/{dist/adopters → adopters}/GientechChat/index.d.ts +0 -0
- /package/{dist/adopters → adopters}/GientechChat/types.d.ts +0 -0
- /package/{dist/adopters → adopters}/HeadLessChat/constants.d.ts +0 -0
- /package/{dist/adopters → adopters}/HeadLessChat/index.d.ts +0 -0
- /package/{dist/adopters → adopters}/HeadLessChat/types.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/AppError.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/AppLoading.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/DisplayError.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/DisplayLoading.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/FeedBackModal.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/FileManager/index.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/Messages/AiChatBox.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/Messages/GientechNewChatWelcome.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/Messages/ReferenceCard.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/Messages/RetriveItem.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/Messages/UserChatBox.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/components/RenameModal.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/configs/commonConfig.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/configs/senderConfig.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/configs/stylesConfig.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/hooks/AichatUseController.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/slate/converters/deserializers.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/slate/converters/mockData.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/slate/converters/slateConverters.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/slate/richElements/index.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/utils/request.d.ts +0 -0
- /package/{dist/adopters → adopters}/gientechCommon/utils/serverFn.d.ts +0 -0
- /package/{dist/components → components}/AiChat.types.d.ts +0 -0
- /package/{dist/components → components}/DefaultAppError.d.ts +0 -0
- /package/{dist/components → components}/DefaultAppLoading.d.ts +0 -0
- /package/{dist/components → components}/DefaultDisplayError.d.ts +0 -0
- /package/{dist/components → components}/DefaultDisplayLoading.d.ts +0 -0
- /package/{dist/components → components}/DefaultNewChatWelcome.d.ts +0 -0
- /package/{dist/components → components}/Displayer/DefaultAiChatBox.d.ts +0 -0
- /package/{dist/components → components}/Displayer/DefaultUserChatBox.d.ts +0 -0
- /package/{dist/components → components}/Displayer/index.d.ts +0 -0
- /package/{dist/components → components}/Displayer/slate/converters/deserializers.d.ts +0 -0
- /package/{dist/components → components}/Displayer/slate/converters/mockData.d.ts +0 -0
- /package/{dist/components → components}/Displayer/slate/converters/slateConverters.d.ts +0 -0
- /package/{dist/components → components}/Displayer/slate/richElements/index.d.ts +0 -0
- /package/{dist/components → components}/DrawerContent.d.ts +0 -0
- /package/{dist/components → components}/DrawerPreview.d.ts +0 -0
- /package/{dist/components → components}/DynamicForm.d.ts +0 -0
- /package/{dist/components → components}/Loading.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/ChatInput.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/ChatMessage.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/ConfigPanel.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/RichTextEditor.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/VoiceInput.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/config/index.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/converters/deserializers.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/converters/mockData.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/converters/slateConverters.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/components/richElements/index.d.ts +0 -0
- /package/{dist/components → components}/RetrieveTest/index.d.ts +0 -0
- /package/{dist/components → components}/Sender/FileUpload.d.ts +0 -0
- /package/{dist/components → components}/Sender/FilesDisplay.d.ts +0 -0
- /package/{dist/components → components}/Sender/VoiceInput.d.ts +0 -0
- /package/{dist/components → components}/Sender/contexts/BadgeContext.d.ts +0 -0
- /package/{dist/components → components}/Sender/index.d.ts +0 -0
- /package/{dist/components → components}/Sidebar/Loading.d.ts +0 -0
- /package/{dist/components → components}/Sidebar/RetriveConfigPanel.d.ts +0 -0
- /package/{dist/components → components}/Sidebar/useDynamicFormItems.d.ts +0 -0
- /package/{dist/components → components}/SidebarProp.d.ts +0 -0
- /package/{dist/components → components}/common/FileCardCommon.d.ts +0 -0
- /package/{dist/components → components}/defaultStyleSet.d.ts +0 -0
- /package/{dist/components → components}/styles.config.d.ts +0 -0
- /package/{dist/icons → icons}/answerAwartar.png +0 -0
- /package/{dist/icons → icons}/docx-file.png +0 -0
- /package/{dist/icons → icons}/folder.png +0 -0
- /package/{dist/icons → icons}/html.png +0 -0
- /package/{dist/icons → icons}/image.png +0 -0
- /package/{dist/icons → icons}/jpg-file.png +0 -0
- /package/{dist/icons → icons}/json.png +0 -0
- /package/{dist/icons → icons}/md.png +0 -0
- /package/{dist/icons → icons}/pdf.png +0 -0
- /package/{dist/icons → icons}/pptx.png +0 -0
- /package/{dist/icons → icons}/questionAwartar.png +0 -0
- /package/{dist/icons → icons}/sheets.png +0 -0
- /package/{dist/icons → icons}/txt.png +0 -0
- /package/{dist/icons → icons}/xlsx.png +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/lib_enter.d.ts → lib_enter.d.ts} +0 -0
- /package/{dist/libs → libs}/luckysheet/fontAwesome.otf +0 -0
- /package/{dist/libs → libs}/luckysheet/fontawesome-webfont.eot +0 -0
- /package/{dist/libs → libs}/luckysheet/fontawesome-webfont.svg +0 -0
- /package/{dist/libs → libs}/luckysheet/fontawesome-webfont.ttf +0 -0
- /package/{dist/libs → libs}/luckysheet/fontawesome-webfont.woff +0 -0
- /package/{dist/libs → libs}/luckysheet/fontawesome-webfont.woff2 +0 -0
- /package/{dist/libs → libs}/luckysheet/fonts/fontawesome-webfont.ttf +0 -0
- /package/{dist/libs → libs}/luckysheet/fonts/fontawesome-webfont.woff +0 -0
- /package/{dist/libs → libs}/luckysheet/fonts/fontawesome-webfont.woff2 +0 -0
- /package/{dist/libs → libs}/luckysheet/iconfont.css +0 -0
- /package/{dist/libs → libs}/luckysheet/jquery.min.js +0 -0
- /package/{dist/libs → libs}/luckysheet/luckysheet.css +0 -0
- /package/{dist/libs → libs}/luckysheet/luckysheet.umd.js +0 -0
- /package/{dist/libs → libs}/luckysheet/plugin.js +0 -0
- /package/{dist/libs → libs}/luckysheet/plugins.css +0 -0
- /package/{dist/libs → libs}/luckysheet/pluginsCss.css +0 -0
- /package/{dist/main.d.ts → main.d.ts} +0 -0
- /package/{dist/mockForm.d.ts → mockForm.d.ts} +0 -0
- /package/{dist/servers → servers}/chatApi.d.ts +0 -0
- /package/{dist/servers → servers}/fileApi.d.ts +0 -0
- /package/{dist/servers → servers}/modelApi.d.ts +0 -0
- /package/{dist/utils → utils}/commonFn.d.ts +0 -0
- /package/{dist/utils → utils}/index.d.ts +0 -0
- /package/{dist/vite.svg → vite.svg} +0 -0
- /package/{dist/vs → vs}/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.de.js +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.es.js +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.fr.js +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.it.js +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.ja.js +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.js +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.ko.js +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.ru.js +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.zh-cn.js +0 -0
- /package/{dist/vs → vs}/base/common/worker/simpleWorker.nls.zh-tw.js +0 -0
- /package/{dist/vs → vs}/base/worker/workerMain.js +0 -0
- /package/{dist/vs → vs}/basic-languages/abap/abap.js +0 -0
- /package/{dist/vs → vs}/basic-languages/apex/apex.js +0 -0
- /package/{dist/vs → vs}/basic-languages/azcli/azcli.js +0 -0
- /package/{dist/vs → vs}/basic-languages/bat/bat.js +0 -0
- /package/{dist/vs → vs}/basic-languages/bicep/bicep.js +0 -0
- /package/{dist/vs → vs}/basic-languages/cameligo/cameligo.js +0 -0
- /package/{dist/vs → vs}/basic-languages/clojure/clojure.js +0 -0
- /package/{dist/vs → vs}/basic-languages/coffee/coffee.js +0 -0
- /package/{dist/vs → vs}/basic-languages/cpp/cpp.js +0 -0
- /package/{dist/vs → vs}/basic-languages/csharp/csharp.js +0 -0
- /package/{dist/vs → vs}/basic-languages/csp/csp.js +0 -0
- /package/{dist/vs → vs}/basic-languages/css/css.js +0 -0
- /package/{dist/vs → vs}/basic-languages/cypher/cypher.js +0 -0
- /package/{dist/vs → vs}/basic-languages/dart/dart.js +0 -0
- /package/{dist/vs → vs}/basic-languages/dockerfile/dockerfile.js +0 -0
- /package/{dist/vs → vs}/basic-languages/ecl/ecl.js +0 -0
- /package/{dist/vs → vs}/basic-languages/elixir/elixir.js +0 -0
- /package/{dist/vs → vs}/basic-languages/flow9/flow9.js +0 -0
- /package/{dist/vs → vs}/basic-languages/freemarker2/freemarker2.js +0 -0
- /package/{dist/vs → vs}/basic-languages/fsharp/fsharp.js +0 -0
- /package/{dist/vs → vs}/basic-languages/go/go.js +0 -0
- /package/{dist/vs → vs}/basic-languages/graphql/graphql.js +0 -0
- /package/{dist/vs → vs}/basic-languages/handlebars/handlebars.js +0 -0
- /package/{dist/vs → vs}/basic-languages/hcl/hcl.js +0 -0
- /package/{dist/vs → vs}/basic-languages/html/html.js +0 -0
- /package/{dist/vs → vs}/basic-languages/ini/ini.js +0 -0
- /package/{dist/vs → vs}/basic-languages/java/java.js +0 -0
- /package/{dist/vs → vs}/basic-languages/javascript/javascript.js +0 -0
- /package/{dist/vs → vs}/basic-languages/julia/julia.js +0 -0
- /package/{dist/vs → vs}/basic-languages/kotlin/kotlin.js +0 -0
- /package/{dist/vs → vs}/basic-languages/less/less.js +0 -0
- /package/{dist/vs → vs}/basic-languages/lexon/lexon.js +0 -0
- /package/{dist/vs → vs}/basic-languages/liquid/liquid.js +0 -0
- /package/{dist/vs → vs}/basic-languages/lua/lua.js +0 -0
- /package/{dist/vs → vs}/basic-languages/m3/m3.js +0 -0
- /package/{dist/vs → vs}/basic-languages/markdown/markdown.js +0 -0
- /package/{dist/vs → vs}/basic-languages/mdx/mdx.js +0 -0
- /package/{dist/vs → vs}/basic-languages/mips/mips.js +0 -0
- /package/{dist/vs → vs}/basic-languages/msdax/msdax.js +0 -0
- /package/{dist/vs → vs}/basic-languages/mysql/mysql.js +0 -0
- /package/{dist/vs → vs}/basic-languages/objective-c/objective-c.js +0 -0
- /package/{dist/vs → vs}/basic-languages/pascal/pascal.js +0 -0
- /package/{dist/vs → vs}/basic-languages/pascaligo/pascaligo.js +0 -0
- /package/{dist/vs → vs}/basic-languages/perl/perl.js +0 -0
- /package/{dist/vs → vs}/basic-languages/pgsql/pgsql.js +0 -0
- /package/{dist/vs → vs}/basic-languages/php/php.js +0 -0
- /package/{dist/vs → vs}/basic-languages/pla/pla.js +0 -0
- /package/{dist/vs → vs}/basic-languages/postiats/postiats.js +0 -0
- /package/{dist/vs → vs}/basic-languages/powerquery/powerquery.js +0 -0
- /package/{dist/vs → vs}/basic-languages/powershell/powershell.js +0 -0
- /package/{dist/vs → vs}/basic-languages/protobuf/protobuf.js +0 -0
- /package/{dist/vs → vs}/basic-languages/pug/pug.js +0 -0
- /package/{dist/vs → vs}/basic-languages/python/python.js +0 -0
- /package/{dist/vs → vs}/basic-languages/qsharp/qsharp.js +0 -0
- /package/{dist/vs → vs}/basic-languages/r/r.js +0 -0
- /package/{dist/vs → vs}/basic-languages/razor/razor.js +0 -0
- /package/{dist/vs → vs}/basic-languages/redis/redis.js +0 -0
- /package/{dist/vs → vs}/basic-languages/redshift/redshift.js +0 -0
- /package/{dist/vs → vs}/basic-languages/restructuredtext/restructuredtext.js +0 -0
- /package/{dist/vs → vs}/basic-languages/ruby/ruby.js +0 -0
- /package/{dist/vs → vs}/basic-languages/rust/rust.js +0 -0
- /package/{dist/vs → vs}/basic-languages/sb/sb.js +0 -0
- /package/{dist/vs → vs}/basic-languages/scala/scala.js +0 -0
- /package/{dist/vs → vs}/basic-languages/scheme/scheme.js +0 -0
- /package/{dist/vs → vs}/basic-languages/scss/scss.js +0 -0
- /package/{dist/vs → vs}/basic-languages/shell/shell.js +0 -0
- /package/{dist/vs → vs}/basic-languages/solidity/solidity.js +0 -0
- /package/{dist/vs → vs}/basic-languages/sophia/sophia.js +0 -0
- /package/{dist/vs → vs}/basic-languages/sparql/sparql.js +0 -0
- /package/{dist/vs → vs}/basic-languages/sql/sql.js +0 -0
- /package/{dist/vs → vs}/basic-languages/st/st.js +0 -0
- /package/{dist/vs → vs}/basic-languages/swift/swift.js +0 -0
- /package/{dist/vs → vs}/basic-languages/systemverilog/systemverilog.js +0 -0
- /package/{dist/vs → vs}/basic-languages/tcl/tcl.js +0 -0
- /package/{dist/vs → vs}/basic-languages/twig/twig.js +0 -0
- /package/{dist/vs → vs}/basic-languages/typescript/typescript.js +0 -0
- /package/{dist/vs → vs}/basic-languages/vb/vb.js +0 -0
- /package/{dist/vs → vs}/basic-languages/wgsl/wgsl.js +0 -0
- /package/{dist/vs → vs}/basic-languages/xml/xml.js +0 -0
- /package/{dist/vs → vs}/basic-languages/yaml/yaml.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.css +0 -0
- /package/{dist/vs → vs}/editor/editor.main.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.js.gz +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.de.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.es.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.fr.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.it.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.ja.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.ko.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.ru.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.zh-cn.js +0 -0
- /package/{dist/vs → vs}/editor/editor.main.nls.zh-tw.js +0 -0
- /package/{dist/vs → vs}/language/css/cssMode.js +0 -0
- /package/{dist/vs → vs}/language/css/cssWorker.js +0 -0
- /package/{dist/vs → vs}/language/css/cssWorker.js.gz +0 -0
- /package/{dist/vs → vs}/language/html/htmlMode.js +0 -0
- /package/{dist/vs → vs}/language/html/htmlWorker.js +0 -0
- /package/{dist/vs → vs}/language/json/jsonMode.js +0 -0
- /package/{dist/vs → vs}/language/json/jsonWorker.js +0 -0
- /package/{dist/vs → vs}/language/typescript/tsMode.js +0 -0
- /package/{dist/vs → vs}/language/typescript/tsWorker.js +0 -0
- /package/{dist/vs → vs}/language/typescript/tsWorker.js.gz +0 -0
- /package/{dist/vs → vs}/loader.js +0 -0
- /package/{dist/worker → worker}/pdf.worker.min.js +0 -0
package/src/utils/commonFn.tsx
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import message from 'antd/es/message';
|
|
2
|
-
import { uid } from 'uid';
|
|
3
|
-
import Clipboard from 'clipboard';
|
|
4
|
-
|
|
5
|
-
export const toCopy = (content: any, event: any) => {
|
|
6
|
-
// 去除 <think>...</think> 标签及内容
|
|
7
|
-
let _content = content ? content.replace(/<think>[\s\S]*?<\/think>/g, '') : content;
|
|
8
|
-
|
|
9
|
-
// 去除 [retrive-tag ...]...[/retrive-tag] 标签及内容
|
|
10
|
-
_content = _content.replace(/\[retrive-tag[^\]]*\][\s\S]*?\[\/retrive-tag\]/g, '');
|
|
11
|
-
|
|
12
|
-
// 去除 <a> 标签(保留原有逻辑)
|
|
13
|
-
_content = _content.replace(/<a\s+[^>]*>(.*?)<\/a>/g, '');
|
|
14
|
-
console.log('_content', _content);
|
|
15
|
-
|
|
16
|
-
const clipboard: any = new Clipboard(event.currentTarget || event.target, {
|
|
17
|
-
text: () => _content,
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
clipboard.on('success', () => {
|
|
22
|
-
message.success('文本复制成功', 2);
|
|
23
|
-
clipboard.destroy();
|
|
24
|
-
});
|
|
25
|
-
clipboard.on('error', e => {
|
|
26
|
-
message.error('复制失败', 2);
|
|
27
|
-
clipboard.destroy();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
clipboard.onClick(event);
|
|
31
|
-
} catch (error) {
|
|
32
|
-
clipboard.destroy();
|
|
33
|
-
message.error('复制失败: ' + error, 2);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// if (navigator.clipboard?.writeText) {
|
|
37
|
-
// console.log('_content1', navigator);
|
|
38
|
-
// navigator.clipboard
|
|
39
|
-
// .writeText(_content)
|
|
40
|
-
// .then(() => {
|
|
41
|
-
// console.log('_content2', _content);
|
|
42
|
-
// message.success('文本复制成功', 2);
|
|
43
|
-
// })
|
|
44
|
-
// .catch(err => {
|
|
45
|
-
// message.error('复制失败: ', 2);
|
|
46
|
-
// console.log('error occurs when copy:', err);
|
|
47
|
-
// });
|
|
48
|
-
// } else {
|
|
49
|
-
// console.log('_content3', _content);
|
|
50
|
-
// const textareaDom = document.createElement('textarea');
|
|
51
|
-
// console.log('_content4', textareaDom);
|
|
52
|
-
// textareaDom.value = _content;
|
|
53
|
-
// textareaDom.style.position = 'absolute';
|
|
54
|
-
// textareaDom.style.opacity = '0';
|
|
55
|
-
// textareaDom.style.left = '-500px';
|
|
56
|
-
// textareaDom.style.top = '-500px';
|
|
57
|
-
// textareaDom.style.height = '0';
|
|
58
|
-
// document.body.appendChild(textareaDom);
|
|
59
|
-
// textareaDom.focus();
|
|
60
|
-
// textareaDom.select();
|
|
61
|
-
// document.execCommand('copy');
|
|
62
|
-
// textareaDom.remove();
|
|
63
|
-
// message.success('文本复制成功', 2);
|
|
64
|
-
// }
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
// 添加文件类型判断辅助函数
|
|
68
|
-
export const getFileTypeByName = (fileName: string): string => {
|
|
69
|
-
const extension = fileName.toLowerCase().split('.').pop() || '';
|
|
70
|
-
if (/^(jpg|jpeg|png|gif|bmp|webp)$/.test(extension)) return 'image';
|
|
71
|
-
if (/^(doc|docx)$/.test(extension)) return 'word';
|
|
72
|
-
if (/^(xls|xlsx|csv)$/.test(extension)) return 'excel';
|
|
73
|
-
if (/^(ppt|pptx)$/.test(extension)) return 'ppt';
|
|
74
|
-
if (extension === 'pdf') return 'pdf';
|
|
75
|
-
if (/^(txt|json|md|markdown)$/.test(extension)) return 'text';
|
|
76
|
-
if (/^(zip|rar|7z)$/.test(extension)) return 'archive';
|
|
77
|
-
return 'file';
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
// 将 query-reply 对列表转换为消息数组
|
|
81
|
-
export function convertQueryReplyPairListToMessages(queryReplyPairList: any[]): any[] {
|
|
82
|
-
console.log('convertQueryReplyPairListToMessages', queryReplyPairList);
|
|
83
|
-
const messages: any[] = [];
|
|
84
|
-
for (const pair of queryReplyPairList) {
|
|
85
|
-
console.log(pair, 'pair');
|
|
86
|
-
if (pair.query) {
|
|
87
|
-
const _queryId = pair.query.queryId || pair.query.id || pair.queryId || pair.id || uid(32);
|
|
88
|
-
messages.push({
|
|
89
|
-
istype: 'user',
|
|
90
|
-
content: pair.query.content,
|
|
91
|
-
time: pair.query.gmtCreate,
|
|
92
|
-
queryId: _queryId,
|
|
93
|
-
clientSideId: _queryId + '-user',
|
|
94
|
-
...pair.query,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
if (pair.reply) {
|
|
98
|
-
const _queryId = pair.reply.queryId || pair.reply.id || pair.queryId || pair.id || uid(32);
|
|
99
|
-
messages.push({
|
|
100
|
-
istype: 'ai',
|
|
101
|
-
content: pair.reply.content,
|
|
102
|
-
isDefault: pair.reply.isDefault,
|
|
103
|
-
time: pair.time || pair.gmtCreate || Date.now(),
|
|
104
|
-
queryId: _queryId,
|
|
105
|
-
clientSideId: _queryId + '-ai',
|
|
106
|
-
...pair.reply,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return messages;
|
|
111
|
-
}
|
package/src/utils/index.tsx
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
|
|
3
|
-
export const dealMinioUrl = (url: string | undefined | string[]) => {
|
|
4
|
-
if (!url) return '';
|
|
5
|
-
if (Array.isArray(url)) {
|
|
6
|
-
const urlArr = url.map(item => {
|
|
7
|
-
const arr = item.split('/').slice(3);
|
|
8
|
-
return `/minio/` + arr.join('/');
|
|
9
|
-
});
|
|
10
|
-
return urlArr;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const arr = url.split('/').slice(3);
|
|
14
|
-
|
|
15
|
-
return `/minio/` + arr.join('/');
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const uniqArr2By = (array1: any[], array2: any[], key: string) => {
|
|
19
|
-
return array2.filter(item2 => !array1.some(item1 => item1[key] === item2[key]));
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const fileViewTypes = [
|
|
23
|
-
'txt',
|
|
24
|
-
'pdf',
|
|
25
|
-
// "xlsx",
|
|
26
|
-
// "xls",
|
|
27
|
-
// "csv",
|
|
28
|
-
'.md',
|
|
29
|
-
'jpeg',
|
|
30
|
-
'jpg',
|
|
31
|
-
'png',
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
export const getMarkExcludeType = (file_type: string) => {
|
|
35
|
-
return [''].includes(file_type); //"xls", "xlsx", "csv"
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const isImage = (type: string) => {
|
|
39
|
-
return ['png', 'jpg', 'jpeg'].includes(type);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const TempBaseUrl = 'http://10.15.12.13:9000/';
|
|
43
|
-
|
|
44
|
-
export const smoothScroll = (container: any, distance?: number) => {
|
|
45
|
-
const d = distance || 20;
|
|
46
|
-
const { scrollTop, scrollHeight, clientHeight } = container;
|
|
47
|
-
const isBottom = scrollTop + clientHeight >= scrollHeight;
|
|
48
|
-
requestAnimationFrame(() => {
|
|
49
|
-
if (!isBottom) {
|
|
50
|
-
if (scrollTop + clientHeight + d < scrollHeight) {
|
|
51
|
-
container.scrollBy({
|
|
52
|
-
top: d,
|
|
53
|
-
behavior: 'smooth',
|
|
54
|
-
});
|
|
55
|
-
smoothScroll(container, d);
|
|
56
|
-
} else {
|
|
57
|
-
container.scrollTo({
|
|
58
|
-
top: scrollHeight,
|
|
59
|
-
behavior: 'smooth',
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const judgeXlS = (item: { type?: string; fileName: string }) => {
|
|
67
|
-
const validTypes = ['xlsx', 'xls', 'csv', 'png', 'jpg', 'jpeg'];
|
|
68
|
-
const fileExtension = item.fileName.split('.').pop()?.toLowerCase();
|
|
69
|
-
return validTypes.includes(item.type || '') || validTypes.includes(fileExtension || '');
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const FileModalSize = {
|
|
73
|
-
width: 960,
|
|
74
|
-
height: 742,
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export const formatTime = (val: string) => {
|
|
78
|
-
return val ? dayjs(val).format('YY-MM-DD HH:mm') : '';
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const getUrlPrefix = () => {
|
|
82
|
-
return import.meta.env.VITE_RAG_PREFIX;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export const getMinioUrlPrefix = () => {
|
|
86
|
-
return import.meta.env.VITE_MINIO_PREFIX;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const getNameFromFile = (fileUrl: string) => {
|
|
90
|
-
if (!fileUrl || typeof fileUrl !== 'string') return '';
|
|
91
|
-
const arr = fileUrl.split('.');
|
|
92
|
-
const len = arr.length;
|
|
93
|
-
return arr[len - 1];
|
|
94
|
-
};
|
package/src/vite-env.d.ts
DELETED
package/tailwind.config.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
|
2
|
-
import typography from '@tailwindcss/typography';
|
|
3
|
-
export default {
|
|
4
|
-
darkMode: ['class'],
|
|
5
|
-
mode: 'jit',
|
|
6
|
-
prefix: 'aichai-',
|
|
7
|
-
corePlugins: {
|
|
8
|
-
preflight: false,
|
|
9
|
-
aspectRatio: true,
|
|
10
|
-
divideStyle: true,
|
|
11
|
-
},
|
|
12
|
-
content: ['./src/**/*.{html,ts,tsx,mdx}'],
|
|
13
|
-
|
|
14
|
-
variants: {
|
|
15
|
-
extend: {},
|
|
16
|
-
},
|
|
17
|
-
plugins: [typography, require('tailwindcss-animate')],
|
|
18
|
-
};
|
package/tsconfig.app.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Bundler mode */
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
// "allowImportingTsExtensions": false,
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"moduleDetection": "force",
|
|
14
|
-
"noEmit": false,
|
|
15
|
-
"jsx": "react-jsx",
|
|
16
|
-
|
|
17
|
-
/* Linting */
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
"noFallthroughCasesInSwitch": true,
|
|
22
|
-
|
|
23
|
-
"forceConsistentCasingInFileNames": true,
|
|
24
|
-
"declaration": true, // 确保生成类型声明文件
|
|
25
|
-
"outDir": "./dist"
|
|
26
|
-
},
|
|
27
|
-
"include": ["src", "type.d.ts"],
|
|
28
|
-
"exclude": ["node_modules", "dist"]
|
|
29
|
-
}
|
package/tsconfig.app.tsbuildinfo
DELETED
package/tsconfig.json
DELETED
package/tsconfig.node.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2023"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
|
|
8
|
-
/* Bundler mode */
|
|
9
|
-
"moduleResolution": "bundler",
|
|
10
|
-
"allowImportingTsExtensions": true,
|
|
11
|
-
"isolatedModules": true,
|
|
12
|
-
"moduleDetection": "force",
|
|
13
|
-
"noEmit": true,
|
|
14
|
-
|
|
15
|
-
/* Linting */
|
|
16
|
-
"strict": true,
|
|
17
|
-
"noUnusedLocals": true,
|
|
18
|
-
"noUnusedParameters": true,
|
|
19
|
-
"noFallthroughCasesInSwitch": true
|
|
20
|
-
},
|
|
21
|
-
"include": ["vite.config.ts", "/src/type.d.ts"]
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./vite.config.ts"],"version":"5.6.3"}
|
package/vite.config.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { defineConfig, loadEnv } from 'vite';
|
|
2
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
3
|
-
import commonjs from 'vite-plugin-commonjs';
|
|
4
|
-
import svgr from 'vite-plugin-svgr';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import react from '@vitejs/plugin-react';
|
|
7
|
-
import generatePackageJson from 'rollup-plugin-generate-package-json';
|
|
8
|
-
import dts from 'vite-plugin-dts';
|
|
9
|
-
import version from 'vite-plugin-package-version';
|
|
10
|
-
import pkg from './package.json';
|
|
11
|
-
import copy from 'rollup-plugin-copy';
|
|
12
|
-
import fs from 'fs';
|
|
13
|
-
function shiftStaticFiles(directories: string[]) {
|
|
14
|
-
return {
|
|
15
|
-
name: 'shift-static-file',
|
|
16
|
-
writeBundle() {
|
|
17
|
-
directories.forEach(dir => {
|
|
18
|
-
const targetDir = path.resolve(__dirname, 'dist', dir);
|
|
19
|
-
if (fs.existsSync(targetDir)) {
|
|
20
|
-
fs.rmSync(targetDir, { recursive: true, force: true });
|
|
21
|
-
console.log(`Deleted directory: ${targetDir}`);
|
|
22
|
-
} else {
|
|
23
|
-
console.warn(`Directory not found: ${targetDir}`);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default ({ mode }: { mode: string }) => {
|
|
31
|
-
const env = loadEnv(mode, process.cwd());
|
|
32
|
-
console.log(env);
|
|
33
|
-
|
|
34
|
-
return defineConfig({
|
|
35
|
-
base: './',
|
|
36
|
-
plugins: [
|
|
37
|
-
resolve(),
|
|
38
|
-
commonjs(),
|
|
39
|
-
svgr(),
|
|
40
|
-
react(),
|
|
41
|
-
version(),
|
|
42
|
-
dts({
|
|
43
|
-
tsconfigPath: './tsconfig.app.json',
|
|
44
|
-
insertTypesEntry: true,
|
|
45
|
-
include: ['src/**/*.ts', 'src/**/*.tsx'], // 覆盖所有源码
|
|
46
|
-
}),
|
|
47
|
-
generatePackageJson({
|
|
48
|
-
outputFolder: 'dist',
|
|
49
|
-
baseContents: {
|
|
50
|
-
name: env.VITE_PUBLISH_NAME || pkg.name,
|
|
51
|
-
main: 'index.js',
|
|
52
|
-
license: 'MIT',
|
|
53
|
-
// @ts-expect-error 这里是因为样式文件可能没有类型定义
|
|
54
|
-
style: 'assets/style.css',
|
|
55
|
-
types: 'index.d.ts',
|
|
56
|
-
private: false,
|
|
57
|
-
version: pkg.version,
|
|
58
|
-
author: pkg.author,
|
|
59
|
-
type: 'module',
|
|
60
|
-
scripts: {
|
|
61
|
-
test: 'yarn link',
|
|
62
|
-
disconnect: 'yarn unlink',
|
|
63
|
-
},
|
|
64
|
-
exports: {
|
|
65
|
-
'.': './index.js',
|
|
66
|
-
'./style.css': './assets/style.css',
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
}),
|
|
70
|
-
copy({
|
|
71
|
-
targets: [{ src: 'README.md', dest: 'dist', rename: 'README.md' }],
|
|
72
|
-
hook: 'writeBundle',
|
|
73
|
-
}),
|
|
74
|
-
shiftStaticFiles(['files']),
|
|
75
|
-
],
|
|
76
|
-
resolve: {
|
|
77
|
-
alias: {
|
|
78
|
-
'@': path.resolve(__dirname, './src'),
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
esbuild: {
|
|
82
|
-
charset: 'ascii',
|
|
83
|
-
},
|
|
84
|
-
// assetsInclude: ['**/*.mjs'], // 确保 Vite 能识别 .mjs 文件为资源
|
|
85
|
-
build: {
|
|
86
|
-
outDir: 'dist',
|
|
87
|
-
lib: {
|
|
88
|
-
entry: path.resolve(__dirname, 'src/lib_enter.ts'),
|
|
89
|
-
formats: ['es'],
|
|
90
|
-
fileName: format => `index.${format === 'es' ? 'js' : 'umd.js'}`,
|
|
91
|
-
},
|
|
92
|
-
rollupOptions: {
|
|
93
|
-
external: ['react', 'react-dom'],
|
|
94
|
-
input: {
|
|
95
|
-
main: path.resolve(__dirname, 'src/lib_enter.ts'), // 改这里
|
|
96
|
-
},
|
|
97
|
-
output: {
|
|
98
|
-
dir: 'dist', // 确保输出在 dist 根目录
|
|
99
|
-
entryFileNames: `index.js`,
|
|
100
|
-
assetFileNames: `assets/[name].[ext]`,
|
|
101
|
-
globals: {
|
|
102
|
-
react: 'React',
|
|
103
|
-
// 'react-dom': 'ReactDOM',
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
// treeshake: true, // 启用 tree-shaking,减少无用代码
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
server: {
|
|
110
|
-
cors: true,
|
|
111
|
-
host: '0.0.0.0',
|
|
112
|
-
port: 8888,
|
|
113
|
-
proxy: {
|
|
114
|
-
'/minio': {
|
|
115
|
-
target: `http://10.15.12.11:9000/`,
|
|
116
|
-
changeOrigin: true,
|
|
117
|
-
rewrite: path => path.replace(/^\/minio/, ''),
|
|
118
|
-
},
|
|
119
|
-
'/proxy': {
|
|
120
|
-
// target: "http://10.64.17.78:9001",
|
|
121
|
-
target: 'http://10.15.12.11:8889',
|
|
122
|
-
changeOrigin: true,
|
|
123
|
-
rewrite: path => path.replace(/^\/proxy/, ''),
|
|
124
|
-
},
|
|
125
|
-
'/api_proxy': {
|
|
126
|
-
target: 'http://10.15.12.11:9005',
|
|
127
|
-
changeOrigin: true,
|
|
128
|
-
secure: false,
|
|
129
|
-
rewrite: path => {
|
|
130
|
-
const newPath = path.replace(/^\/api_proxy/, '/proxy/graph');
|
|
131
|
-
console.log(`Rewriting path from ${path} to ${newPath}`); // 调试用
|
|
132
|
-
return newPath;
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
});
|
|
138
|
-
};
|
package/vite.config_mainapp.ts
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { defineConfig, loadEnv } from 'vite';
|
|
2
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
3
|
-
import commonjs from 'vite-plugin-commonjs';
|
|
4
|
-
import svgr from 'vite-plugin-svgr';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import react from '@vitejs/plugin-react';
|
|
7
|
-
import generatePackageJson from 'rollup-plugin-generate-package-json';
|
|
8
|
-
import dts from 'vite-plugin-dts';
|
|
9
|
-
import version from 'vite-plugin-package-version';
|
|
10
|
-
import pkg from './package.json';
|
|
11
|
-
import copy from 'rollup-plugin-copy';
|
|
12
|
-
import fs from 'fs';
|
|
13
|
-
function shiftStaticFiles(directories: string[]) {
|
|
14
|
-
return {
|
|
15
|
-
name: 'shift-static-file',
|
|
16
|
-
writeBundle() {
|
|
17
|
-
directories.forEach(dir => {
|
|
18
|
-
const targetDir = path.resolve(__dirname, 'dist', dir);
|
|
19
|
-
if (fs.existsSync(targetDir)) {
|
|
20
|
-
fs.rmSync(targetDir, { recursive: true, force: true });
|
|
21
|
-
console.log(`Deleted directory: ${targetDir}`);
|
|
22
|
-
} else {
|
|
23
|
-
console.warn(`Directory not found: ${targetDir}`);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default ({ mode }: { mode: string }) => {
|
|
31
|
-
const env = loadEnv(mode, process.cwd());
|
|
32
|
-
console.log(env);
|
|
33
|
-
|
|
34
|
-
return defineConfig({
|
|
35
|
-
base: './',
|
|
36
|
-
plugins: [
|
|
37
|
-
resolve(),
|
|
38
|
-
// commonjs(),
|
|
39
|
-
svgr(),
|
|
40
|
-
react(),
|
|
41
|
-
// version(),
|
|
42
|
-
// dts({
|
|
43
|
-
// tsconfigPath: './tsconfig.app.json',
|
|
44
|
-
// insertTypesEntry: true,
|
|
45
|
-
// include: ['src/application/**/*.ts'], // 仅包含 application 目录
|
|
46
|
-
// }),
|
|
47
|
-
// generatePackageJson({
|
|
48
|
-
// outputFolder: 'dist',
|
|
49
|
-
// baseContents: {
|
|
50
|
-
// name: env.VITE_PUBLISH_NAME || pkg.name,
|
|
51
|
-
// main: 'index.js',
|
|
52
|
-
// license: 'MIT',
|
|
53
|
-
// // @ts-expect-error 这里是因为样式文件可能没有类型定义
|
|
54
|
-
// style: 'assets/style.css',
|
|
55
|
-
// types: 'index.d.ts',
|
|
56
|
-
// private: false,
|
|
57
|
-
// version: pkg.version,
|
|
58
|
-
// author: pkg.author,
|
|
59
|
-
// type: 'module',
|
|
60
|
-
// scripts: {
|
|
61
|
-
// test: 'yarn link',
|
|
62
|
-
// disconnect: 'yarn unlink',
|
|
63
|
-
// },
|
|
64
|
-
// exports: {
|
|
65
|
-
// '.': './index.js',
|
|
66
|
-
// './style.css': './assets/style.css',
|
|
67
|
-
// },
|
|
68
|
-
// },
|
|
69
|
-
// }),
|
|
70
|
-
copy({
|
|
71
|
-
targets: [{ src: 'NPMREADME.md', dest: 'dist', rename: 'README.md' }],
|
|
72
|
-
hook: 'writeBundle',
|
|
73
|
-
}),
|
|
74
|
-
shiftStaticFiles(['files']),
|
|
75
|
-
],
|
|
76
|
-
resolve: {
|
|
77
|
-
alias: {
|
|
78
|
-
'@': path.resolve(__dirname, './src'),
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
esbuild: {
|
|
82
|
-
charset: 'ascii',
|
|
83
|
-
},
|
|
84
|
-
// assetsInclude: ['**/*.mjs'], // 确保 Vite 能识别 .mjs 文件为资源
|
|
85
|
-
build: {
|
|
86
|
-
outDir: 'dist',
|
|
87
|
-
// lib: {
|
|
88
|
-
// entry: path.resolve(__dirname, 'src/lib_enter.ts'),
|
|
89
|
-
// formats: ['es'],
|
|
90
|
-
// fileName: format => `index.${format === 'es' ? 'js' : 'umd.js'}`,
|
|
91
|
-
// },
|
|
92
|
-
rollupOptions: {
|
|
93
|
-
// external: ['react', 'react-dom'],
|
|
94
|
-
// input: {
|
|
95
|
-
// main: path.resolve(__dirname, 'src/application/lib_enter.ts'),
|
|
96
|
-
// },
|
|
97
|
-
output: {
|
|
98
|
-
// dir: 'dist', // 确保输出在 dist 根目录
|
|
99
|
-
// entryFileNames: `index.js`,
|
|
100
|
-
// assetFileNames: `assets/[name].[ext]`,
|
|
101
|
-
// globals: {
|
|
102
|
-
// react: 'React',
|
|
103
|
-
// },
|
|
104
|
-
},
|
|
105
|
-
// treeshake: true, // 启用 tree-shaking,减少无用代码
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
server: {
|
|
109
|
-
cors: true,
|
|
110
|
-
host: '0.0.0.0',
|
|
111
|
-
port: 8888,
|
|
112
|
-
proxy: {
|
|
113
|
-
'/api_proxy': {
|
|
114
|
-
target: 'http://10.15.12.13:9005',
|
|
115
|
-
changeOrigin: true,
|
|
116
|
-
secure: false,
|
|
117
|
-
rewrite: path => {
|
|
118
|
-
const newPath = path.replace(/^\/api_proxy/, '/proxy/graph');
|
|
119
|
-
console.log(`Rewriting path from ${path} to ${newPath}`); // 调试用
|
|
120
|
-
return newPath;
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{dist/adopters → adopters}/gientechCommon/components/Messages/GientechNewChatWelcome.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|