From 46d23bd6b6fe2644e207df80a1ada1bb46243d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=B0=A2=E9=9B=A8?= <554737215@qq.com> Date: Tue, 4 Mar 2025 15:20:01 +0800 Subject: [PATCH] =?UTF-8?q?fetch:=20=E9=A1=B5=E9=9D=A2=E7=A7=BB=E6=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AI应用管理移植 --- package.json | 5 + pnpm-lock.yaml | 346 +++-- src/api/models/index.ts | 20 + src/api/new-ai/app.ts | 60 + src/api/new-ai/appApi.ts | 60 + src/api/new-ai/chat.ts | 77 ++ src/api/new-ai/oss.ts | 72 ++ src/components/Error/src/Error.vue | 2 +- src/components/SvgIcon/index.vue | 21 + src/hooks/setting/index.ts | 48 + src/hooks/setting/useDesignSetting.ts | 34 + src/hooks/setting/useProjectSetting.ts | 58 + src/settings/projectSetting.ts | 59 + src/store/modules/projectSetting.ts | 96 ++ src/utils/copy.ts | 26 + src/utils/log.ts | 25 + src/views/ai/app/ApiTable.vue | 132 ++ src/views/ai/app/base/index.vue | 105 ++ src/views/ai/app/base/prompt/index.vue | 49 + .../ai/app/base/settings/KnowledgeList.vue | 102 ++ src/views/ai/app/base/settings/index.vue | 98 ++ .../ai/app/channel-api/components/docs.vue | 113 ++ src/views/ai/app/channel-api/index.vue | 33 + src/views/ai/app/columns.ts | 64 + src/views/ai/app/edit.vue | 151 +++ src/views/ai/app/index.vue | 189 +++ src/views/ai/app/info.vue | 98 ++ src/views/ai/app/store/index.ts | 63 + src/views/ai/chat/Chat.vue | 244 ++++ src/views/ai/chat/Header.vue | 75 ++ src/views/ai/chat/index.vue | 56 + src/views/ai/chat/message/Message.vue | 143 +++ src/views/ai/chat/message/TextComponent.vue | 139 ++ src/views/ai/chat/message/styles.scss | 122 ++ .../chat/message/styles/github-markdown.less | 1118 +++++++++++++++++ .../ai/chat/message/styles/highlight.less | 222 ++++ src/views/ai/chat/message/styles/index.less | 19 + src/views/ai/chat/message/styles/style.less | 105 ++ src/views/ai/chat/store/chat.d.ts | 24 + src/views/ai/chat/store/useBasicLayout.ts | 23 + src/views/ai/chat/store/useChatStore.ts | 71 ++ src/views/ai/chat/store/useIconRender.ts | 55 + src/views/ai/chat/store/useScroll.ts | 67 + src/views/common/AppSelect.vue | 67 + src/views/common/ModelSelect.vue | 107 ++ types/config.d.ts | 87 ++ vite.config.ts | 6 +- 47 files changed, 4816 insertions(+), 140 deletions(-) create mode 100644 src/api/models/index.ts create mode 100644 src/api/new-ai/app.ts create mode 100644 src/api/new-ai/appApi.ts create mode 100644 src/api/new-ai/chat.ts create mode 100644 src/api/new-ai/oss.ts create mode 100644 src/components/SvgIcon/index.vue create mode 100644 src/hooks/setting/index.ts create mode 100644 src/hooks/setting/useDesignSetting.ts create mode 100644 src/hooks/setting/useProjectSetting.ts create mode 100644 src/settings/projectSetting.ts create mode 100644 src/store/modules/projectSetting.ts create mode 100644 src/utils/copy.ts create mode 100644 src/utils/log.ts create mode 100644 src/views/ai/app/ApiTable.vue create mode 100644 src/views/ai/app/base/index.vue create mode 100644 src/views/ai/app/base/prompt/index.vue create mode 100644 src/views/ai/app/base/settings/KnowledgeList.vue create mode 100644 src/views/ai/app/base/settings/index.vue create mode 100644 src/views/ai/app/channel-api/components/docs.vue create mode 100644 src/views/ai/app/channel-api/index.vue create mode 100644 src/views/ai/app/columns.ts create mode 100644 src/views/ai/app/edit.vue create mode 100644 src/views/ai/app/index.vue create mode 100644 src/views/ai/app/info.vue create mode 100644 src/views/ai/app/store/index.ts create mode 100644 src/views/ai/chat/Chat.vue create mode 100644 src/views/ai/chat/Header.vue create mode 100644 src/views/ai/chat/index.vue create mode 100644 src/views/ai/chat/message/Message.vue create mode 100644 src/views/ai/chat/message/TextComponent.vue create mode 100644 src/views/ai/chat/message/styles.scss create mode 100644 src/views/ai/chat/message/styles/github-markdown.less create mode 100644 src/views/ai/chat/message/styles/highlight.less create mode 100644 src/views/ai/chat/message/styles/index.less create mode 100644 src/views/ai/chat/message/styles/style.less create mode 100644 src/views/ai/chat/store/chat.d.ts create mode 100644 src/views/ai/chat/store/useBasicLayout.ts create mode 100644 src/views/ai/chat/store/useChatStore.ts create mode 100644 src/views/ai/chat/store/useIconRender.ts create mode 100644 src/views/ai/chat/store/useScroll.ts create mode 100644 src/views/common/AppSelect.vue create mode 100644 src/views/common/ModelSelect.vue create mode 100644 types/config.d.ts diff --git a/package.json b/package.json index d2d8b31..e19830a 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,9 @@ "@form-create/designer": "^3.2.6", "@form-create/element-ui": "^3.2.11", "@iconify/iconify": "^3.1.1", + "@iconify/vue": "^4.3.0", "@microsoft/fetch-event-source": "^2.0.1", + "@traptitech/markdown-it-katex": "^3.6.0", "@videojs-player/vue": "^1.0.0", "@vueuse/core": "^10.9.0", "@wangeditor/editor": "^5.1.23", @@ -53,6 +55,7 @@ "jsencrypt": "^3.3.2", "lodash-es": "^4.17.21", "markdown-it": "^14.1.0", + "markdown-it-link-attributes": "^4.0.1", "markmap-common": "^0.16.0", "markmap-lib": "^0.16.1", "markmap-toolbar": "^0.17.0", @@ -67,6 +70,7 @@ "sortablejs": "^1.15.3", "steady-xml": "^0.1.0", "url": "^0.11.3", + "uuid": "^11.1.0", "video.js": "^7.21.5", "vue": "3.5.12", "vue-dompurify-html": "^4.1.4", @@ -88,6 +92,7 @@ "@types/nprogress": "^0.2.3", "@types/qrcode": "^1.5.5", "@types/qs": "^6.9.12", + "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^7.1.0", "@typescript-eslint/parser": "^7.1.0", "@unocss/eslint-config": "^0.57.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f4b94b..da0aeb6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,31 +10,37 @@ importers: dependencies: '@element-plus/icons-vue': specifier: ^2.1.0 - version: 2.3.1(vue@3.5.12) + version: 2.3.1(vue@3.5.12(typescript@5.3.3)) '@form-create/designer': specifier: ^3.2.6 - version: 3.2.8(vue@3.5.12) + version: 3.2.8(vue@3.5.12(typescript@5.3.3)) '@form-create/element-ui': specifier: ^3.2.11 - version: 3.2.14(vue@3.5.12) + version: 3.2.14(vue@3.5.12(typescript@5.3.3)) '@iconify/iconify': specifier: ^3.1.1 version: 3.1.1 + '@iconify/vue': + specifier: ^4.3.0 + version: 4.3.0(vue@3.5.12(typescript@5.3.3)) '@microsoft/fetch-event-source': specifier: ^2.0.1 version: 2.0.1 + '@traptitech/markdown-it-katex': + specifier: ^3.6.0 + version: 3.6.0 '@videojs-player/vue': specifier: ^1.0.0 - version: 1.0.0(@types/video.js@7.3.58)(video.js@7.21.6)(vue@3.5.12) + version: 1.0.0(@types/video.js@7.3.58)(video.js@7.21.6)(vue@3.5.12(typescript@5.3.3)) '@vueuse/core': specifier: ^10.9.0 - version: 10.11.1(vue@3.5.12) + version: 10.11.1(vue@3.5.12(typescript@5.3.3)) '@wangeditor/editor': specifier: ^5.1.23 version: 5.1.23 '@wangeditor/editor-for-vue': specifier: ^5.1.10 - version: 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.12) + version: 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.12(typescript@5.3.3)) '@zxcvbn-ts/core': specifier: ^3.0.4 version: 3.0.4 @@ -76,7 +82,7 @@ importers: version: 2.1.0(echarts@5.5.1) element-plus: specifier: 2.8.4 - version: 2.8.4(vue@3.5.12) + version: 2.8.4(vue@3.5.12(typescript@5.3.3)) fast-xml-parser: specifier: ^4.3.2 version: 4.5.0 @@ -92,6 +98,9 @@ importers: markdown-it: specifier: ^14.1.0 version: 14.1.0 + markdown-it-link-attributes: + specifier: ^4.0.1 + version: 4.0.1 markmap-common: specifier: ^0.16.0 version: 0.16.0 @@ -115,10 +124,10 @@ importers: version: 0.2.0 pinia: specifier: ^2.1.7 - version: 2.2.8(typescript@5.3.3)(vue@3.5.12) + version: 2.2.8(typescript@5.3.3)(vue@3.5.12(typescript@5.3.3)) pinia-plugin-persistedstate: specifier: ^3.2.1 - version: 3.2.3(pinia@2.2.8) + version: 3.2.3(pinia@2.2.8(typescript@5.3.3)(vue@3.5.12(typescript@5.3.3))) qrcode: specifier: ^1.5.3 version: 1.5.4 @@ -134,6 +143,9 @@ importers: url: specifier: ^0.11.3 version: 0.11.4 + uuid: + specifier: ^11.1.0 + version: 11.1.0 video.js: specifier: ^7.21.5 version: 7.21.6 @@ -142,19 +154,19 @@ importers: version: 3.5.12(typescript@5.3.3) vue-dompurify-html: specifier: ^4.1.4 - version: 4.1.4(vue@3.5.12) + version: 4.1.4(vue@3.5.12(typescript@5.3.3)) vue-i18n: specifier: 9.10.2 - version: 9.10.2(vue@3.5.12) + version: 9.10.2(vue@3.5.12(typescript@5.3.3)) vue-router: specifier: 4.4.5 - version: 4.4.5(vue@3.5.12) + version: 4.4.5(vue@3.5.12(typescript@5.3.3)) vue-types: specifier: ^5.1.1 - version: 5.1.3(vue@3.5.12) + version: 5.1.3(vue@3.5.12(typescript@5.3.3)) vuedraggable: specifier: ^4.1.0 - version: 4.1.0(vue@3.5.12) + version: 4.1.0(vue@3.5.12(typescript@5.3.3)) web-storage-cache: specifier: ^1.1.1 version: 1.1.1 @@ -173,7 +185,7 @@ importers: version: 2.2.277 '@intlify/unplugin-vue-i18n': specifier: ^2.0.0 - version: 2.0.0(rollup@4.27.4)(vue-i18n@9.10.2) + version: 2.0.0(rollup@4.27.4)(vue-i18n@9.10.2(vue@3.5.12(typescript@5.3.3))) '@purge-icons/generated': specifier: ^0.9.0 version: 0.9.0 @@ -192,9 +204,12 @@ importers: '@types/qs': specifier: ^6.9.12 version: 6.9.17 + '@types/uuid': + specifier: ^10.0.0 + version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: ^7.1.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0)(eslint@8.57.1)(typescript@5.3.3) + version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.3.3))(eslint@8.57.1)(typescript@5.3.3) '@typescript-eslint/parser': specifier: ^7.1.0 version: 7.18.0(eslint@8.57.1)(typescript@5.3.3) @@ -206,13 +221,13 @@ importers: version: 0.58.9 '@vitejs/plugin-legacy': specifier: ^5.3.1 - version: 5.4.3(terser@5.36.0)(vite@5.1.4) + version: 5.4.3(terser@5.36.0)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.2.1(vite@5.1.4)(vue@3.5.12) + version: 5.2.1(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0))(vue@3.5.12(typescript@5.3.3)) '@vitejs/plugin-vue-jsx': specifier: ^3.1.0 - version: 3.1.0(vite@5.1.4)(vue@3.5.12) + version: 3.1.0(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0))(vue@3.5.12(typescript@5.3.3)) autoprefixer: specifier: ^10.4.17 version: 10.4.20(postcss@8.4.49) @@ -221,7 +236,7 @@ importers: version: 17.11.1 bpmn-js-properties-panel: specifier: 5.23.0 - version: 5.23.0(@bpmn-io/properties-panel@3.25.0)(bpmn-js@17.11.1)(camunda-bpmn-js-behaviors@1.7.2)(diagram-js@12.8.1) + version: 5.23.0(@bpmn-io/properties-panel@3.25.0(@lezer/common@1.2.3))(bpmn-js@17.11.1)(camunda-bpmn-js-behaviors@1.7.2(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.7.0))(diagram-js@12.8.1) consola: specifier: ^3.2.3 version: 3.2.3 @@ -236,7 +251,7 @@ importers: version: 2.1.0 eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@8.57.1)(prettier@3.4.1) + version: 5.2.1(@types/eslint@8.56.12)(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.1) eslint-plugin-vue: specifier: ^9.22.0 version: 9.31.0(eslint@8.57.1) @@ -272,16 +287,16 @@ importers: version: 16.11.0(typescript@5.3.3) stylelint-config-html: specifier: ^1.1.0 - version: 1.1.0(postcss-html@1.7.0)(stylelint@16.11.0) + version: 1.1.0(postcss-html@1.7.0)(stylelint@16.11.0(typescript@5.3.3)) stylelint-config-recommended: specifier: ^14.0.0 - version: 14.0.1(stylelint@16.11.0) + version: 14.0.1(stylelint@16.11.0(typescript@5.3.3)) stylelint-config-standard: specifier: ^36.0.0 - version: 36.0.1(stylelint@16.11.0) + version: 36.0.1(stylelint@16.11.0(typescript@5.3.3)) stylelint-order: specifier: ^6.0.4 - version: 6.0.4(stylelint@16.11.0) + version: 6.0.4(stylelint@16.11.0(typescript@5.3.3)) terser: specifier: ^5.28.1 version: 5.36.0 @@ -290,40 +305,40 @@ importers: version: 5.3.3 unocss: specifier: ^0.58.5 - version: 0.58.9(postcss@8.4.49)(rollup@4.27.4)(vite@5.1.4) + version: 0.58.9(postcss@8.4.49)(rollup@4.27.4)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) unplugin-auto-import: specifier: ^0.16.7 - version: 0.16.7(@vueuse/core@10.11.1)(rollup@4.27.4) + version: 0.16.7(@vueuse/core@10.11.1(vue@3.5.12(typescript@5.3.3)))(rollup@4.27.4) unplugin-element-plus: specifier: ^0.8.0 version: 0.8.0(rollup@4.27.4) unplugin-vue-components: specifier: ^0.25.2 - version: 0.25.2(rollup@4.27.4)(vue@3.5.12) + version: 0.25.2(@babel/parser@7.26.2)(rollup@4.27.4)(vue@3.5.12(typescript@5.3.3)) vite: specifier: 5.1.4 version: 5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0) vite-plugin-compression: specifier: ^0.5.1 - version: 0.5.1(vite@5.1.4) + version: 0.5.1(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) vite-plugin-ejs: specifier: ^1.7.0 - version: 1.7.0(vite@5.1.4) + version: 1.7.0(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) vite-plugin-eslint: specifier: ^1.8.1 - version: 1.8.1(eslint@8.57.1)(vite@5.1.4) + version: 1.8.1(eslint@8.57.1)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) vite-plugin-progress: specifier: ^0.0.7 - version: 0.0.7(vite@5.1.4) + version: 0.0.7(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) vite-plugin-purge-icons: specifier: ^0.10.0 - version: 0.10.0(vite@5.1.4) + version: 0.10.0(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) vite-plugin-svg-icons: specifier: ^2.0.1 - version: 2.0.1(vite@5.1.4) + version: 2.0.1(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) vite-plugin-top-level-await: specifier: ^1.4.4 - version: 1.4.4(rollup@4.27.4)(vite@5.1.4) + version: 1.4.4(rollup@4.27.4)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) vue-eslint-parser: specifier: ^9.3.2 version: 9.4.3(eslint@8.57.1) @@ -1253,6 +1268,11 @@ packages: '@iconify/utils@2.1.33': resolution: {integrity: sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw==, tarball: https://registry.npmmirror.com/@iconify/utils/-/utils-2.1.33.tgz} + '@iconify/vue@4.3.0': + resolution: {integrity: sha512-Xq0h6zMrHBbrW8jXJ9fISi+x8oDQllg5hTDkDuxnWiskJ63rpJu9CvJshj8VniHVTbsxCg9fVoPAaNp3RQI5OQ==, tarball: https://registry.npmmirror.com/@iconify/vue/-/vue-4.3.0.tgz} + peerDependencies: + vue: '>=3' + '@intlify/bundle-utils@7.5.1': resolution: {integrity: sha512-UovJl10oBIlmYEcWw+VIHdKY5Uv5sdPG0b/b6bOYxGLln3UwB75+2dlc0F3Fsa0RhoznQ5Rp589/BZpABpE4Xw==, tarball: https://registry.npmmirror.com/@intlify/bundle-utils/-/bundle-utils-7.5.1.tgz} engines: {node: '>= 14.16'} @@ -1673,6 +1693,9 @@ packages: '@transloadit/prettier-bytes@0.0.7': resolution: {integrity: sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA==, tarball: https://registry.npmmirror.com/@transloadit/prettier-bytes/-/prettier-bytes-0.0.7.tgz} + '@traptitech/markdown-it-katex@3.6.0': + resolution: {integrity: sha512-CnJzTWxsgLGXFdSrWRaGz7GZ1kUUi8g3E9HzJmeveX1YwVJavrKYqysktfHZQsujdnRqV5O7g8FPKEA/aeTkOQ==, tarball: https://registry.npmmirror.com/@traptitech/markdown-it-katex/-/markdown-it-katex-3.6.0.tgz} + '@trysound/sax@0.2.0': resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==, tarball: https://registry.npmmirror.com/@trysound/sax/-/sax-0.2.0.tgz} engines: {node: '>=10.13.0'} @@ -1818,6 +1841,9 @@ packages: '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==, tarball: https://registry.npmmirror.com/@types/trusted-types/-/trusted-types-2.0.7.tgz} + '@types/uuid@10.0.0': + resolution: {integrity: sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==, tarball: https://registry.npmmirror.com/@types/uuid/-/uuid-10.0.0.tgz} + '@types/video.js@7.3.58': resolution: {integrity: sha512-1CQjuSrgbv1/dhmcfQ83eVyYbvGyqhTvb2Opxr0QCV+iJ4J6/J+XWQ3Om59WiwCd1MN3rDUHasx5XRrpUtewYQ==, tarball: https://registry.npmmirror.com/@types/video.js/-/video.js-7.3.58.tgz} @@ -4200,6 +4226,9 @@ packages: resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==, tarball: https://registry.npmmirror.com/map-visit/-/map-visit-1.0.0.tgz} engines: {node: '>=0.10.0'} + markdown-it-link-attributes@4.0.1: + resolution: {integrity: sha512-pg5OK0jPLg62H4k7M9mRJLT61gUp9nvG0XveKYHMOOluASo9OEF13WlXrpAp2aj35LbedAy3QOCgQCw0tkLKAQ==, tarball: https://registry.npmmirror.com/markdown-it-link-attributes/-/markdown-it-link-attributes-4.0.1.tgz} + markdown-it@14.1.0: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==, tarball: https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz} hasBin: true @@ -5479,6 +5508,10 @@ packages: resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==, tarball: https://registry.npmmirror.com/uuid/-/uuid-10.0.0.tgz} hasBin: true + uuid@11.1.0: + resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==, tarball: https://registry.npmmirror.com/uuid/-/uuid-11.1.0.tgz} + hasBin: true + vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==, tarball: https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz} engines: {node: '>= 0.8'} @@ -6610,7 +6643,7 @@ snapshots: '@commitlint/types': 19.5.0 chalk: 5.3.0 cosmiconfig: 9.0.0(typescript@5.3.3) - cosmiconfig-typescript-loader: 5.1.0(@types/node@20.17.9)(cosmiconfig@9.0.0)(typescript@5.3.3) + cosmiconfig-typescript-loader: 5.1.0(@types/node@20.17.9)(cosmiconfig@9.0.0(typescript@5.3.3))(typescript@5.3.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -6667,7 +6700,7 @@ snapshots: '@csstools/css-tokenizer@3.0.3': {} - '@csstools/media-query-list-parser@4.0.2(@csstools/css-parser-algorithms@3.0.4)(@csstools/css-tokenizer@3.0.3)': + '@csstools/media-query-list-parser@4.0.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': dependencies: '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) '@csstools/css-tokenizer': 3.0.3 @@ -6680,7 +6713,7 @@ snapshots: '@dual-bundle/import-meta-resolve@4.1.0': {} - '@element-plus/icons-vue@2.3.1(vue@3.5.12)': + '@element-plus/icons-vue@2.3.1(vue@3.5.12(typescript@5.3.3))': dependencies: vue: 3.5.12(typescript@5.3.3) @@ -6821,24 +6854,24 @@ snapshots: dependencies: wangeditor: 4.7.15 - '@form-create/core@3.2.14(vue@3.5.12)': + '@form-create/core@3.2.14(vue@3.5.12(typescript@5.3.3))': dependencies: '@form-create/utils': 3.2.14 vue: 3.5.12(typescript@5.3.3) - '@form-create/designer@3.2.8(vue@3.5.12)': + '@form-create/designer@3.2.8(vue@3.5.12(typescript@5.3.3))': dependencies: '@form-create/component-wangeditor': 3.2.14 - '@form-create/element-ui': 3.2.14(vue@3.5.12) + '@form-create/element-ui': 3.2.14(vue@3.5.12(typescript@5.3.3)) '@form-create/utils': 3.2.14 codemirror: 6.65.7 - element-plus: 2.8.4(vue@3.5.12) + element-plus: 2.8.4(vue@3.5.12(typescript@5.3.3)) vue: 3.5.12(typescript@5.3.3) - vuedraggable: 4.1.0(vue@3.5.12) + vuedraggable: 4.1.0(vue@3.5.12(typescript@5.3.3)) transitivePeerDependencies: - '@vue/composition-api' - '@form-create/element-ui@3.2.14(vue@3.5.12)': + '@form-create/element-ui@3.2.14(vue@3.5.12(typescript@5.3.3))': dependencies: '@form-create/component-elm-checkbox': 3.2.14 '@form-create/component-elm-frame': 3.2.14 @@ -6848,7 +6881,7 @@ snapshots: '@form-create/component-elm-tree': 3.2.14 '@form-create/component-elm-upload': 3.2.14 '@form-create/component-subform': 3.1.34 - '@form-create/core': 3.2.14(vue@3.5.12) + '@form-create/core': 3.2.14(vue@3.5.12(typescript@5.3.3)) '@form-create/utils': 3.2.14 vue: 3.5.12(typescript@5.3.3) @@ -6899,7 +6932,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@intlify/bundle-utils@7.5.1(vue-i18n@9.10.2)': + '@iconify/vue@4.3.0(vue@3.5.12(typescript@5.3.3))': + dependencies: + '@iconify/types': 2.0.0 + vue: 3.5.12(typescript@5.3.3) + + '@intlify/bundle-utils@7.5.1(vue-i18n@9.10.2(vue@3.5.12(typescript@5.3.3)))': dependencies: '@intlify/message-compiler': 9.14.2 '@intlify/shared': 9.14.2 @@ -6910,8 +6948,9 @@ snapshots: magic-string: 0.30.14 mlly: 1.7.3 source-map-js: 1.2.1 - vue-i18n: 9.10.2(vue@3.5.12) yaml-eslint-parser: 1.2.3 + optionalDependencies: + vue-i18n: 9.10.2(vue@3.5.12(typescript@5.3.3)) '@intlify/core-base@9.10.2': dependencies: @@ -6932,9 +6971,9 @@ snapshots: '@intlify/shared@9.14.2': {} - '@intlify/unplugin-vue-i18n@2.0.0(rollup@4.27.4)(vue-i18n@9.10.2)': + '@intlify/unplugin-vue-i18n@2.0.0(rollup@4.27.4)(vue-i18n@9.10.2(vue@3.5.12(typescript@5.3.3)))': dependencies: - '@intlify/bundle-utils': 7.5.1(vue-i18n@9.10.2) + '@intlify/bundle-utils': 7.5.1(vue-i18n@9.10.2(vue@3.5.12(typescript@5.3.3))) '@intlify/shared': 9.14.2 '@rollup/pluginutils': 5.1.3(rollup@4.27.4) '@vue/compiler-sfc': 3.5.13 @@ -6946,7 +6985,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 unplugin: 1.16.0 - vue-i18n: 9.10.2(vue@3.5.12) + optionalDependencies: + vue-i18n: 9.10.2(vue@3.5.12(typescript@5.3.3)) transitivePeerDependencies: - rollup - supports-color @@ -7103,7 +7143,7 @@ snapshots: '@iconify/iconify': 3.1.1 '@rollup/plugin-virtual@3.0.2(rollup@4.27.4)': - dependencies: + optionalDependencies: rollup: 4.27.4 '@rollup/pluginutils@4.2.1': @@ -7116,6 +7156,7 @@ snapshots: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 4.0.2 + optionalDependencies: rollup: 4.27.4 '@rollup/rollup-android-arm-eabi@4.27.4': @@ -7230,6 +7271,10 @@ snapshots: '@transloadit/prettier-bytes@0.0.7': {} + '@traptitech/markdown-it-katex@3.6.0': + dependencies: + katex: 0.16.11 + '@trysound/sax@0.2.0': {} '@types/conventional-commits-parser@5.0.1': @@ -7395,13 +7440,15 @@ snapshots: '@types/trusted-types@2.0.7': optional: true + '@types/uuid@10.0.0': {} + '@types/video.js@7.3.58': {} '@types/web-bluetooth@0.0.16': {} '@types/web-bluetooth@0.0.20': {} - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0)(eslint@8.57.1)(typescript@5.3.3)': + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.3.3))(eslint@8.57.1)(typescript@5.3.3)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.3.3) @@ -7414,6 +7461,7 @@ snapshots: ignore: 5.3.2 natural-compare: 1.4.0 ts-api-utils: 1.4.3(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -7426,6 +7474,7 @@ snapshots: '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.7 eslint: 8.57.1 + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -7438,6 +7487,7 @@ snapshots: '@typescript-eslint/visitor-keys': 7.18.0 debug: 4.3.7 eslint: 8.57.1 + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -7459,6 +7509,7 @@ snapshots: debug: 4.3.7 eslint: 8.57.1 ts-api-utils: 1.4.3(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -7477,6 +7528,7 @@ snapshots: minimatch: 9.0.3 semver: 7.6.3 ts-api-utils: 1.4.3(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -7491,6 +7543,7 @@ snapshots: minimatch: 9.0.5 semver: 7.6.3 ts-api-utils: 1.4.3(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -7532,11 +7585,12 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@unocss/astro@0.58.9(rollup@4.27.4)(vite@5.1.4)': + '@unocss/astro@0.58.9(rollup@4.27.4)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0))': dependencies: '@unocss/core': 0.58.9 '@unocss/reset': 0.58.9 - '@unocss/vite': 0.58.9(rollup@4.27.4)(vite@5.1.4) + '@unocss/vite': 0.58.9(rollup@4.27.4)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) + optionalDependencies: vite: 5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0) transitivePeerDependencies: - rollup @@ -7695,7 +7749,7 @@ snapshots: dependencies: '@unocss/core': 0.58.9 - '@unocss/vite@0.58.9(rollup@4.27.4)(vite@5.1.4)': + '@unocss/vite@0.58.9(rollup@4.27.4)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0))': dependencies: '@ampproject/remapping': 2.3.0 '@rollup/pluginutils': 5.1.3(rollup@4.27.4) @@ -7740,7 +7794,7 @@ snapshots: '@uppy/utils': 4.1.3 nanoid: 3.3.8 - '@videojs-player/vue@1.0.0(@types/video.js@7.3.58)(video.js@7.21.6)(vue@3.5.12)': + '@videojs-player/vue@1.0.0(@types/video.js@7.3.58)(video.js@7.21.6)(vue@3.5.12(typescript@5.3.3))': dependencies: '@types/video.js': 7.3.58 video.js: 7.21.6 @@ -7769,7 +7823,7 @@ snapshots: global: 4.4.0 is-function: 1.0.2 - '@vitejs/plugin-legacy@5.4.3(terser@5.36.0)(vite@5.1.4)': + '@vitejs/plugin-legacy@5.4.3(terser@5.36.0)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0))': dependencies: '@babel/core': 7.26.0 '@babel/preset-env': 7.26.0(@babel/core@7.26.0) @@ -7784,7 +7838,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue-jsx@3.1.0(vite@5.1.4)(vue@3.5.12)': + '@vitejs/plugin-vue-jsx@3.1.0(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0))(vue@3.5.12(typescript@5.3.3))': dependencies: '@babel/core': 7.26.0 '@babel/plugin-transform-typescript': 7.25.9(@babel/core@7.26.0) @@ -7794,7 +7848,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@5.2.1(vite@5.1.4)(vue@3.5.12)': + '@vitejs/plugin-vue@5.2.1(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0))(vue@3.5.12(typescript@5.3.3))': dependencies: vite: 5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0) vue: 3.5.12(typescript@5.3.3) @@ -7816,7 +7870,6 @@ snapshots: '@vue/babel-plugin-jsx@1.2.5(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.26.0 '@babel/helper-module-imports': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) @@ -7827,6 +7880,8 @@ snapshots: '@vue/babel-plugin-resolve-type': 1.2.5(@babel/core@7.26.0) html-tags: 3.3.1 svg-tags: 1.0.0 + optionalDependencies: + '@babel/core': 7.26.0 transitivePeerDependencies: - supports-color @@ -7913,8 +7968,9 @@ snapshots: minimatch: 9.0.5 muggle-string: 0.3.1 path-browserify: 1.0.1 - typescript: 5.3.3 vue-template-compiler: 2.7.16 + optionalDependencies: + typescript: 5.3.3 '@vue/reactivity@3.5.12': dependencies: @@ -7932,7 +7988,7 @@ snapshots: '@vue/shared': 3.5.12 csstype: 3.1.3 - '@vue/server-renderer@3.5.12(vue@3.5.12)': + '@vue/server-renderer@3.5.12(vue@3.5.12(typescript@5.3.3))': dependencies: '@vue/compiler-ssr': 3.5.12 '@vue/shared': 3.5.12 @@ -7942,22 +7998,22 @@ snapshots: '@vue/shared@3.5.13': {} - '@vueuse/core@10.11.1(vue@3.5.12)': + '@vueuse/core@10.11.1(vue@3.5.12(typescript@5.3.3))': dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 10.11.1 - '@vueuse/shared': 10.11.1(vue@3.5.12) - vue-demi: 0.14.10(vue@3.5.12) + '@vueuse/shared': 10.11.1(vue@3.5.12(typescript@5.3.3)) + vue-demi: 0.14.10(vue@3.5.12(typescript@5.3.3)) transitivePeerDependencies: - '@vue/composition-api' - vue - '@vueuse/core@9.13.0(vue@3.5.12)': + '@vueuse/core@9.13.0(vue@3.5.12(typescript@5.3.3))': dependencies: '@types/web-bluetooth': 0.0.16 '@vueuse/metadata': 9.13.0 - '@vueuse/shared': 9.13.0(vue@3.5.12) - vue-demi: 0.14.10(vue@3.5.12) + '@vueuse/shared': 9.13.0(vue@3.5.12(typescript@5.3.3)) + vue-demi: 0.14.10(vue@3.5.12(typescript@5.3.3)) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -7966,23 +8022,23 @@ snapshots: '@vueuse/metadata@9.13.0': {} - '@vueuse/shared@10.11.1(vue@3.5.12)': + '@vueuse/shared@10.11.1(vue@3.5.12(typescript@5.3.3))': dependencies: - vue-demi: 0.14.10(vue@3.5.12) + vue-demi: 0.14.10(vue@3.5.12(typescript@5.3.3)) transitivePeerDependencies: - '@vue/composition-api' - vue - '@vueuse/shared@9.13.0(vue@3.5.12)': + '@vueuse/shared@9.13.0(vue@3.5.12(typescript@5.3.3))': dependencies: - vue-demi: 0.14.10(vue@3.5.12) + vue-demi: 0.14.10(vue@3.5.12(typescript@5.3.3)) transitivePeerDependencies: - '@vue/composition-api' - vue - '@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19)(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2)': + '@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2)': dependencies: - '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) dom7: 3.0.0 is-url: 1.2.4 lodash.throttle: 4.1.1 @@ -7990,15 +8046,15 @@ snapshots: slate: 0.72.8 snabbdom: 3.6.2 - '@wangeditor/code-highlight@1.0.3(@wangeditor/core@1.1.19)(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2)': + '@wangeditor/code-highlight@1.0.3(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2)': dependencies: - '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) dom7: 3.0.0 prismjs: 1.29.0 slate: 0.72.8 snabbdom: 3.6.2 - '@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2)': + '@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2)': dependencies: '@types/event-emitter': 0.3.5 '@uppy/core': 2.3.4 @@ -8021,7 +8077,7 @@ snapshots: slate-history: 0.66.0(slate@0.72.8) snabbdom: 3.6.2 - '@wangeditor/editor-for-vue@5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.12)': + '@wangeditor/editor-for-vue@5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.12(typescript@5.3.3))': dependencies: '@wangeditor/editor': 5.1.23 vue: 3.5.12(typescript@5.3.3) @@ -8030,13 +8086,13 @@ snapshots: dependencies: '@uppy/core': 2.3.4 '@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4) - '@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19)(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) - '@wangeditor/code-highlight': 1.0.3(@wangeditor/core@1.1.19)(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2) - '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) - '@wangeditor/list-module': 1.0.5(@wangeditor/core@1.1.19)(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2) - '@wangeditor/table-module': 1.1.4(@wangeditor/core@1.1.19)(dom7@3.0.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) - '@wangeditor/upload-image-module': 1.0.2(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(@wangeditor/basic-modules@1.1.7)(@wangeditor/core@1.1.19)(dom7@3.0.0)(lodash.foreach@4.5.0)(slate@0.72.8)(snabbdom@3.6.2) - '@wangeditor/video-module': 1.1.4(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(@wangeditor/core@1.1.19)(dom7@3.0.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/code-highlight': 1.0.3(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/list-module': 1.0.5(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/table-module': 1.1.4(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/upload-image-module': 1.0.2(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.foreach@4.5.0)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/video-module': 1.1.4(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) dom7: 3.0.0 is-hotkey: 0.2.0 lodash.camelcase: 4.3.0 @@ -8050,16 +8106,16 @@ snapshots: slate: 0.72.8 snabbdom: 3.6.2 - '@wangeditor/list-module@1.0.5(@wangeditor/core@1.1.19)(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2)': + '@wangeditor/list-module@1.0.5(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2)': dependencies: - '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) dom7: 3.0.0 slate: 0.72.8 snabbdom: 3.6.2 - '@wangeditor/table-module@1.1.4(@wangeditor/core@1.1.19)(dom7@3.0.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2)': + '@wangeditor/table-module@1.1.4(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2)': dependencies: - '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) dom7: 3.0.0 lodash.isequal: 4.5.0 lodash.throttle: 4.1.1 @@ -8067,22 +8123,22 @@ snapshots: slate: 0.72.8 snabbdom: 3.6.2 - '@wangeditor/upload-image-module@1.0.2(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(@wangeditor/basic-modules@1.1.7)(@wangeditor/core@1.1.19)(dom7@3.0.0)(lodash.foreach@4.5.0)(slate@0.72.8)(snabbdom@3.6.2)': + '@wangeditor/upload-image-module@1.0.2(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.foreach@4.5.0)(slate@0.72.8)(snabbdom@3.6.2)': dependencies: '@uppy/core': 2.3.4 '@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4) - '@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19)(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) - '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) dom7: 3.0.0 lodash.foreach: 4.5.0 slate: 0.72.8 snabbdom: 3.6.2 - '@wangeditor/video-module@1.1.4(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(@wangeditor/core@1.1.19)(dom7@3.0.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2)': + '@wangeditor/video-module@1.1.4(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2)': dependencies: '@uppy/core': 2.3.4 '@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4) - '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3)(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) + '@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.8)(slate@0.72.8)(snabbdom@3.6.2) dom7: 3.0.0 nanoid: 3.3.8 slate: 0.72.8 @@ -8285,7 +8341,7 @@ snapshots: boolbase@1.0.0: {} - bpmn-js-properties-panel@5.23.0(@bpmn-io/properties-panel@3.25.0)(bpmn-js@17.11.1)(camunda-bpmn-js-behaviors@1.7.2)(diagram-js@12.8.1): + bpmn-js-properties-panel@5.23.0(@bpmn-io/properties-panel@3.25.0(@lezer/common@1.2.3))(bpmn-js@17.11.1)(camunda-bpmn-js-behaviors@1.7.2(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.7.0))(diagram-js@12.8.1): dependencies: '@bpmn-io/extract-process-variables': 0.8.0 '@bpmn-io/properties-panel': 3.25.0(@lezer/common@1.2.3) @@ -8590,7 +8646,7 @@ snapshots: object-assign: 4.1.1 vary: 1.1.2 - cosmiconfig-typescript-loader@5.1.0(@types/node@20.17.9)(cosmiconfig@9.0.0)(typescript@5.3.3): + cosmiconfig-typescript-loader@5.1.0(@types/node@20.17.9)(cosmiconfig@9.0.0(typescript@5.3.3))(typescript@5.3.3): dependencies: '@types/node': 20.17.9 cosmiconfig: 9.0.0(typescript@5.3.3) @@ -8603,6 +8659,7 @@ snapshots: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 + optionalDependencies: typescript: 5.3.3 crelt@1.0.6: {} @@ -9041,15 +9098,15 @@ snapshots: electron-to-chromium@1.5.67: {} - element-plus@2.8.4(vue@3.5.12): + element-plus@2.8.4(vue@3.5.12(typescript@5.3.3)): dependencies: '@ctrl/tinycolor': 3.6.1 - '@element-plus/icons-vue': 2.3.1(vue@3.5.12) + '@element-plus/icons-vue': 2.3.1(vue@3.5.12(typescript@5.3.3)) '@floating-ui/dom': 1.6.12 '@popperjs/core': '@sxzz/popperjs-es@2.11.7' '@types/lodash': 4.17.13 '@types/lodash-es': 4.17.12 - '@vueuse/core': 9.13.0(vue@3.5.12) + '@vueuse/core': 9.13.0(vue@3.5.12(typescript@5.3.3)) async-validator: 4.2.5 dayjs: 1.11.13 escape-html: 1.0.3 @@ -9225,13 +9282,15 @@ snapshots: eslint-define-config@2.1.0: {} - eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0)(eslint@8.57.1)(prettier@3.4.1): + eslint-plugin-prettier@5.2.1(@types/eslint@8.56.12)(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.1): dependencies: eslint: 8.57.1 - eslint-config-prettier: 9.1.0(eslint@8.57.1) prettier: 3.4.1 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 + optionalDependencies: + '@types/eslint': 8.56.12 + eslint-config-prettier: 9.1.0(eslint@8.57.1) eslint-plugin-vue@9.31.0(eslint@8.57.1): dependencies: @@ -9418,7 +9477,7 @@ snapshots: reusify: 1.0.4 fdir@6.4.2(picomatch@4.0.2): - dependencies: + optionalDependencies: picomatch: 4.0.2 feelers@1.4.0: @@ -9502,7 +9561,7 @@ snapshots: tabbable: 6.2.0 follow-redirects@1.15.9(debug@4.3.7): - dependencies: + optionalDependencies: debug: 4.3.7 for-each@0.3.3: @@ -10206,6 +10265,8 @@ snapshots: dependencies: object-visit: 1.0.1 + markdown-it-link-attributes@4.0.1: {} + markdown-it@14.1.0: dependencies: argparse: 2.0.1 @@ -10611,16 +10672,17 @@ snapshots: pidtree@0.6.0: {} - pinia-plugin-persistedstate@3.2.3(pinia@2.2.8): + pinia-plugin-persistedstate@3.2.3(pinia@2.2.8(typescript@5.3.3)(vue@3.5.12(typescript@5.3.3))): dependencies: - pinia: 2.2.8(typescript@5.3.3)(vue@3.5.12) + pinia: 2.2.8(typescript@5.3.3)(vue@3.5.12(typescript@5.3.3)) - pinia@2.2.8(typescript@5.3.3)(vue@3.5.12): + pinia@2.2.8(typescript@5.3.3)(vue@3.5.12(typescript@5.3.3)): dependencies: '@vue/devtools-api': 6.6.4 - typescript: 5.3.3 vue: 3.5.12(typescript@5.3.3) - vue-demi: 0.14.10(vue@3.5.12) + vue-demi: 0.14.10(vue@3.5.12(typescript@5.3.3)) + optionalDependencies: + typescript: 5.3.3 pkcs7@1.0.4: dependencies: @@ -11204,21 +11266,21 @@ snapshots: style-mod@4.1.2: {} - stylelint-config-html@1.1.0(postcss-html@1.7.0)(stylelint@16.11.0): + stylelint-config-html@1.1.0(postcss-html@1.7.0)(stylelint@16.11.0(typescript@5.3.3)): dependencies: postcss-html: 1.7.0 stylelint: 16.11.0(typescript@5.3.3) - stylelint-config-recommended@14.0.1(stylelint@16.11.0): + stylelint-config-recommended@14.0.1(stylelint@16.11.0(typescript@5.3.3)): dependencies: stylelint: 16.11.0(typescript@5.3.3) - stylelint-config-standard@36.0.1(stylelint@16.11.0): + stylelint-config-standard@36.0.1(stylelint@16.11.0(typescript@5.3.3)): dependencies: stylelint: 16.11.0(typescript@5.3.3) - stylelint-config-recommended: 14.0.1(stylelint@16.11.0) + stylelint-config-recommended: 14.0.1(stylelint@16.11.0(typescript@5.3.3)) - stylelint-order@6.0.4(stylelint@16.11.0): + stylelint-order@6.0.4(stylelint@16.11.0(typescript@5.3.3)): dependencies: postcss: 8.4.49 postcss-sorting: 8.0.2(postcss@8.4.49) @@ -11228,7 +11290,7 @@ snapshots: dependencies: '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) '@csstools/css-tokenizer': 3.0.3 - '@csstools/media-query-list-parser': 4.0.2(@csstools/css-parser-algorithms@3.0.4)(@csstools/css-tokenizer@3.0.3) + '@csstools/media-query-list-parser': 4.0.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.0.0) '@dual-bundle/import-meta-resolve': 4.1.0 balanced-match: 2.0.0 @@ -11513,9 +11575,9 @@ snapshots: universalify@2.0.1: {} - unocss@0.58.9(postcss@8.4.49)(rollup@4.27.4)(vite@5.1.4): + unocss@0.58.9(postcss@8.4.49)(rollup@4.27.4)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)): dependencies: - '@unocss/astro': 0.58.9(rollup@4.27.4)(vite@5.1.4) + '@unocss/astro': 0.58.9(rollup@4.27.4)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) '@unocss/cli': 0.58.9(rollup@4.27.4) '@unocss/core': 0.58.9 '@unocss/extractor-arbitrary-variants': 0.58.9 @@ -11534,24 +11596,26 @@ snapshots: '@unocss/transformer-compile-class': 0.58.9 '@unocss/transformer-directives': 0.58.9 '@unocss/transformer-variant-group': 0.58.9 - '@unocss/vite': 0.58.9(rollup@4.27.4)(vite@5.1.4) + '@unocss/vite': 0.58.9(rollup@4.27.4)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)) + optionalDependencies: vite: 5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0) transitivePeerDependencies: - postcss - rollup - supports-color - unplugin-auto-import@0.16.7(@vueuse/core@10.11.1)(rollup@4.27.4): + unplugin-auto-import@0.16.7(@vueuse/core@10.11.1(vue@3.5.12(typescript@5.3.3)))(rollup@4.27.4): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.1.3(rollup@4.27.4) - '@vueuse/core': 10.11.1(vue@3.5.12) fast-glob: 3.3.2 local-pkg: 0.5.1 magic-string: 0.30.14 minimatch: 9.0.5 unimport: 3.14.2(rollup@4.27.4) unplugin: 1.16.0 + optionalDependencies: + '@vueuse/core': 10.11.1(vue@3.5.12(typescript@5.3.3)) transitivePeerDependencies: - rollup @@ -11564,7 +11628,7 @@ snapshots: transitivePeerDependencies: - rollup - unplugin-vue-components@0.25.2(rollup@4.27.4)(vue@3.5.12): + unplugin-vue-components@0.25.2(@babel/parser@7.26.2)(rollup@4.27.4)(vue@3.5.12(typescript@5.3.3)): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.1.3(rollup@4.27.4) @@ -11577,6 +11641,8 @@ snapshots: resolve: 1.22.8 unplugin: 1.16.0 vue: 3.5.12(typescript@5.3.3) + optionalDependencies: + '@babel/parser': 7.26.2 transitivePeerDependencies: - rollup - supports-color @@ -11616,6 +11682,8 @@ snapshots: uuid@10.0.0: {} + uuid@11.1.0: {} + vary@1.1.2: {} video.js@7.21.6: @@ -11640,7 +11708,7 @@ snapshots: dependencies: global: 4.4.0 - vite-plugin-compression@0.5.1(vite@5.1.4): + vite-plugin-compression@0.5.1(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)): dependencies: chalk: 4.1.2 debug: 4.3.7 @@ -11649,12 +11717,12 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-ejs@1.7.0(vite@5.1.4): + vite-plugin-ejs@1.7.0(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)): dependencies: ejs: 3.1.10 vite: 5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0) - vite-plugin-eslint@1.8.1(eslint@8.57.1)(vite@5.1.4): + vite-plugin-eslint@1.8.1(eslint@8.57.1)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)): dependencies: '@rollup/pluginutils': 4.2.1 '@types/eslint': 8.56.12 @@ -11662,14 +11730,14 @@ snapshots: rollup: 2.79.2 vite: 5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0) - vite-plugin-progress@0.0.7(vite@5.1.4): + vite-plugin-progress@0.0.7(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)): dependencies: picocolors: 1.1.1 progress: 2.0.3 rd: 2.0.1 vite: 5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0) - vite-plugin-purge-icons@0.10.0(vite@5.1.4): + vite-plugin-purge-icons@0.10.0(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)): dependencies: '@purge-icons/core': 0.10.0 '@purge-icons/generated': 0.10.0 @@ -11679,7 +11747,7 @@ snapshots: - encoding - supports-color - vite-plugin-svg-icons@2.0.1(vite@5.1.4): + vite-plugin-svg-icons@2.0.1(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)): dependencies: '@types/svgo': 2.6.4 cors: 2.8.5 @@ -11693,7 +11761,7 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-top-level-await@1.4.4(rollup@4.27.4)(vite@5.1.4): + vite-plugin-top-level-await@1.4.4(rollup@4.27.4)(vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0)): dependencies: '@rollup/plugin-virtual': 3.0.2(rollup@4.27.4) '@swc/core': 1.9.3 @@ -11705,24 +11773,24 @@ snapshots: vite@5.1.4(@types/node@20.17.9)(sass@1.81.0)(terser@5.36.0): dependencies: - '@types/node': 20.17.9 esbuild: 0.19.12 postcss: 8.4.49 rollup: 4.27.4 + optionalDependencies: + '@types/node': 20.17.9 + fsevents: 2.3.3 sass: 1.81.0 terser: 5.36.0 - optionalDependencies: - fsevents: 2.3.3 - vue-demi@0.14.10(vue@3.5.12): + vue-demi@0.14.10(vue@3.5.12(typescript@5.3.3)): dependencies: vue: 3.5.12(typescript@5.3.3) - vue-dompurify-html@4.1.4(vue@3.5.12): + vue-dompurify-html@4.1.4(vue@3.5.12(typescript@5.3.3)): dependencies: dompurify: 3.2.1 vue: 3.5.12(typescript@5.3.3) - vue-demi: 0.14.10(vue@3.5.12) + vue-demi: 0.14.10(vue@3.5.12(typescript@5.3.3)) transitivePeerDependencies: - '@vue/composition-api' @@ -11739,14 +11807,14 @@ snapshots: transitivePeerDependencies: - supports-color - vue-i18n@9.10.2(vue@3.5.12): + vue-i18n@9.10.2(vue@3.5.12(typescript@5.3.3)): dependencies: '@intlify/core-base': 9.10.2 '@intlify/shared': 9.10.2 '@vue/devtools-api': 6.6.4 vue: 3.5.12(typescript@5.3.3) - vue-router@4.4.5(vue@3.5.12): + vue-router@4.4.5(vue@3.5.12(typescript@5.3.3)): dependencies: '@vue/devtools-api': 6.6.4 vue: 3.5.12(typescript@5.3.3) @@ -11763,9 +11831,10 @@ snapshots: semver: 7.6.3 typescript: 5.3.3 - vue-types@5.1.3(vue@3.5.12): + vue-types@5.1.3(vue@3.5.12(typescript@5.3.3)): dependencies: is-plain-object: 5.0.0 + optionalDependencies: vue: 3.5.12(typescript@5.3.3) vue@3.5.12(typescript@5.3.3): @@ -11773,11 +11842,12 @@ snapshots: '@vue/compiler-dom': 3.5.12 '@vue/compiler-sfc': 3.5.12 '@vue/runtime-dom': 3.5.12 - '@vue/server-renderer': 3.5.12(vue@3.5.12) + '@vue/server-renderer': 3.5.12(vue@3.5.12(typescript@5.3.3)) '@vue/shared': 3.5.12 + optionalDependencies: typescript: 5.3.3 - vuedraggable@4.1.0(vue@3.5.12): + vuedraggable@4.1.0(vue@3.5.12(typescript@5.3.3)): dependencies: sortablejs: 1.14.0 vue: 3.5.12(typescript@5.3.3) diff --git a/src/api/models/index.ts b/src/api/models/index.ts new file mode 100644 index 0000000..0708645 --- /dev/null +++ b/src/api/models/index.ts @@ -0,0 +1,20 @@ +export enum ModelTypeEnum { + CHAT = 'CHAT', + EMBEDDING = 'EMBEDDING', + TEXT_IMAGE = 'TEXT_IMAGE', + WEB_SEARCH = 'WEB_SEARCH', +} + +/** + * 隐藏API密钥中间部分 + * @param key API密钥 + * @returns 隐藏处理后的密钥 + */ +export function hideKey(key: string): string { + if (!key) return '' + const length = key.length + if (length <= 8) return key + const start = key.slice(0, 4) + const end = key.slice(-4) + return `${start}****${end}` +} diff --git a/src/api/new-ai/app.ts b/src/api/new-ai/app.ts new file mode 100644 index 0000000..046e213 --- /dev/null +++ b/src/api/new-ai/app.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import request from '@/config/axios' + +// AI 应用 API +export const AppApi = { + // 获取应用列表 + getAppList: async (params: any) => { + return await request.get({ url: '/aigc/app/list', params }) + }, + + // 获取应用分页数据 + getAppPage: async (params: any) => { + return await request.get({ url: '/aigc/app/page', params }) + }, + + // 获取应用详情 + getApp: async (id: string) => { + return await request.get({ url: `/aigc/app/${id}` }) + }, + + // 根据模型ID获取应用 + getAppByModelId: async (id: string) => { + return await request.get({ url: `/aigc/app/byModelId/${id}` }) + }, + + // 获取应用API通道 + getAppApiChannel: async (appId: string) => { + return await request.get({ url: `/aigc/app/channel/api/${appId}` }) + }, + + // 新增应用 + createApp: async (data: any) => { + return await request.post({ url: '/aigc/app', data }) + }, + + // 更新应用 + updateApp: async (data: any) => { + return await request.put({ url: '/aigc/app', data }) + }, + + // 删除应用 + deleteApp: async (id: string) => { + return await request.delete({ url: `/aigc/app/${id}` }) + } +} diff --git a/src/api/new-ai/appApi.ts b/src/api/new-ai/appApi.ts new file mode 100644 index 0000000..b78eb86 --- /dev/null +++ b/src/api/new-ai/appApi.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import request from '@/config/axios' + +// AI 应用管理 API +export const AppApiManagement = { + // 获取API列表 + getApiList: async (params: any) => { + return await request.get({ url: '/aigc/app/api/list', params }) + }, + + // 获取API分页数据 + getApiPage: async (params: any) => { + return await request.get({ url: '/aigc/app/api/page', params }) + }, + + // 获取API详情 + getApi: async (id: string) => { + return await request.get({ url: `/aigc/app/api/${id}` }) + }, + + // 新增API + createApi: async (data: any) => { + return await request.post({ url: '/aigc/app/api', data }) + }, + + // 更新API + updateApi: async (data: any) => { + return await request.put({ url: '/aigc/app/api', data }) + }, + + // 删除API + deleteApi: async (id: string) => { + return await request.delete({ url: `/aigc/app/api/${id}` }) + }, + + // 发布API + publishApi: async (id: string) => { + return await request.put({ url: `/aigc/app/api/publish/${id}` }) + }, + + // 下线API + offlineApi: async (id: string) => { + return await request.put({ url: `/aigc/app/api/offline/${id}` }) + } +} diff --git a/src/api/new-ai/chat.ts b/src/api/new-ai/chat.ts new file mode 100644 index 0000000..4f3b527 --- /dev/null +++ b/src/api/new-ai/chat.ts @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import request from '@/config/axios' +import { AxiosProgressEvent } from 'axios' + +export function chat( + data: any, + controller: AbortController, + onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void +) { + return request.post({ + url: '/aigc/chat/completions', + data, + signal: controller.signal, + onDownloadProgress, + isReturnNativeResponse: true + }) +} + +export function clean(conversationId: string | null) { + return request.delete({ + url: `/aigc/chat/messages/clean/${conversationId}` + }) +} + +export function getMessages(conversationId?: string) { + return request.get({ + url: `/aigc/chat/messages/${conversationId}` + }) +} + +export function getAppInfo(params: any) { + return request.get({ + url: `/aigc/app/info`, + params + }) +} + +export function getImageModels() { + return request.get({ + url: '/aigc/chat/getImageModels' + }) +} + +/** + * @description 生成图片 + */ +export function genImage(data: any) { + return request.post({ + url: '/aigc/chat/image', + data + }) +} + +/** + * @description: 生成思维导图 + */ +export function genMindMap(data: any) { + return request.post({ + url: '/aigc/chat/mindmap', + data + }) +} diff --git a/src/api/new-ai/oss.ts b/src/api/new-ai/oss.ts new file mode 100644 index 0000000..6fd99ad --- /dev/null +++ b/src/api/new-ai/oss.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import request from '@/config/axios' + +/** + * OSS对象存储服务接口 + */ +export class OssApi { + /** + * 获取OSS上传策略 + */ + static policy() { + return request.get({ + url: '/oss/policy' + }) + } + + /** + * 获取文件列表 + */ + static list(params: any) { + return request.get({ + url: '/oss/list', + params + }) + } + + /** + * 删除文件 + */ + static del(objectName: string) { + return request.delete({ + url: `/oss/${objectName}` + }) + } + + /** + * 上传文件 + */ + static upload(data: FormData) { + return request.post({ + url: '/aigc/oss/upload', + headers: { + 'Content-Type': 'multipart/form-data', + }, + data + }) + } + + /** + * 获取文件访问URL + */ + static getUrl(objectName: string) { + return request.get({ + url: `/oss/url/${objectName}` + }) + } +} diff --git a/src/components/Error/src/Error.vue b/src/components/Error/src/Error.vue index 3fd7a17..2bfab24 100644 --- a/src/components/Error/src/Error.vue +++ b/src/components/Error/src/Error.vue @@ -3,7 +3,7 @@ import pageError from '@/assets/svgs/404.svg' import networkError from '@/assets/svgs/500.svg' import noPermission from '@/assets/svgs/403.svg' import { propTypes } from '@/utils/propTypes' - +import { onBeforeRouteUpdate } from 'vue-router' defineOptions({ name: 'Error' }) interface ErrorMap { diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue new file mode 100644 index 0000000..5b89fb4 --- /dev/null +++ b/src/components/SvgIcon/index.vue @@ -0,0 +1,21 @@ + + + diff --git a/src/hooks/setting/index.ts b/src/hooks/setting/index.ts new file mode 100644 index 0000000..76003b2 --- /dev/null +++ b/src/hooks/setting/index.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { GlobConfig } from '/#/config'; + +import { warn } from '@/utils/log'; +import { getAppEnvConfig } from '@/utils/env'; + +export const useGlobSetting = (): Readonly => { + const { + VITE_GLOB_APP_TITLE, + VITE_GLOB_API_URL, + VITE_GLOB_APP_SHORT_NAME, + VITE_GLOB_API_URL_PREFIX, + VITE_GLOB_UPLOAD_URL, + VITE_GLOB_IMG_URL, + } = getAppEnvConfig(); + + if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) { + warn( + `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.` + ); + } + + // Take global configuration + const glob: Readonly = { + title: VITE_GLOB_APP_TITLE, + apiUrl: VITE_GLOB_API_URL, + shortName: VITE_GLOB_APP_SHORT_NAME, + urlPrefix: VITE_GLOB_API_URL_PREFIX, + uploadUrl: VITE_GLOB_UPLOAD_URL, + imgUrl: VITE_GLOB_IMG_URL, + }; + return glob as Readonly; +}; diff --git a/src/hooks/setting/useDesignSetting.ts b/src/hooks/setting/useDesignSetting.ts new file mode 100644 index 0000000..d93dec1 --- /dev/null +++ b/src/hooks/setting/useDesignSetting.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { computed } from 'vue'; +import { useDesignSettingStore } from '@/store/modules/designSetting'; + +export function useDesignSetting() { + const designStore = useDesignSettingStore(); + + const getDarkTheme = computed(() => designStore.darkTheme); + + const getAppTheme = computed(() => designStore.appTheme); + + const getAppThemeList = computed(() => designStore.appThemeList); + + return { + getDarkTheme, + getAppTheme, + getAppThemeList, + }; +} diff --git a/src/hooks/setting/useProjectSetting.ts b/src/hooks/setting/useProjectSetting.ts new file mode 100644 index 0000000..32a13da --- /dev/null +++ b/src/hooks/setting/useProjectSetting.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { computed } from 'vue'; +import { useProjectSettingStore } from '@/store/modules/projectSetting'; + +export function useProjectSetting() { + const projectStore = useProjectSettingStore(); + + const navMode = computed(() => projectStore.navMode); + + const navTheme = computed(() => projectStore.navTheme); + + const isMobile = computed(() => projectStore.isMobile); + + const headerSetting = computed(() => projectStore.headerSetting); + + const multiTabsSetting = computed(() => projectStore.multiTabsSetting); + + const menuSetting = computed(() => projectStore.menuSetting); + + const crumbsSetting = computed(() => projectStore.crumbsSetting); + + const permissionMode = computed(() => projectStore.permissionMode); + + const showFooter = computed(() => projectStore.showFooter); + + const isPageAnimate = computed(() => projectStore.isPageAnimate); + + const pageAnimateType = computed(() => projectStore.pageAnimateType); + + return { + navMode, + navTheme, + isMobile, + headerSetting, + multiTabsSetting, + menuSetting, + crumbsSetting, + permissionMode, + showFooter, + isPageAnimate, + pageAnimateType, + }; +} diff --git a/src/settings/projectSetting.ts b/src/settings/projectSetting.ts new file mode 100644 index 0000000..b91faa1 --- /dev/null +++ b/src/settings/projectSetting.ts @@ -0,0 +1,59 @@ + + +const setting = { + //导航模式 vertical 左侧菜单模式 horizontal 顶部菜单模式 + navMode: 'vertical', + //导航风格 dark 暗色侧边栏 light 白色侧边栏 header-dark 暗色顶栏 + navTheme: 'dark', + // 是否处于移动端模式 + isMobile: false, + //顶部 + headerSetting: { + //背景色 + bgColor: '#fff', + //固定顶部 + fixed: true, + //显示重载按钮 + isReload: true, + }, + //页脚 + showFooter: false, + //多标签 + multiTabsSetting: { + //背景色 + bgColor: '#fff', + //是否显示 + show: true, + //固定多标签 + fixed: true, + }, + //菜单 + menuSetting: { + //最小宽度 + minMenuWidth: 64, + //菜单宽度 + menuWidth: 200, + //固定菜单 + fixed: true, + //分割菜单 + mixMenu: false, + //触发移动端侧边栏的宽度 + mobileWidth: 800, + // 折叠菜单 + collapsed: false, + }, + //面包屑 + crumbsSetting: { + //是否显示 + show: false, + //显示图标 + showIcon: false, + }, + //菜单权限模式 FIXED 前端固定路由 BACK 动态获取 + permissionMode: 'BACK', + //是否开启路由动画 + isPageAnimate: true, + //路由动画类型 + pageAnimateType: 'fade-slide', +}; +export default setting; diff --git a/src/store/modules/projectSetting.ts b/src/store/modules/projectSetting.ts new file mode 100644 index 0000000..fdf16c8 --- /dev/null +++ b/src/store/modules/projectSetting.ts @@ -0,0 +1,96 @@ + + +import { defineStore } from 'pinia'; +import projectSetting from '@/settings/projectSetting.ts'; +// import {ICrumbsSetting, IHeaderSetting, IMenuSetting, IMultiTabsSetting} from "../../../types/config"; +import type { ICrumbsSetting, IHeaderSetting, IMenuSetting, IMultiTabsSetting } from '/#/config'; +const { + navMode, + navTheme, + isMobile, + headerSetting, + showFooter, + menuSetting, + multiTabsSetting, + crumbsSetting, + permissionMode, + isPageAnimate, + pageAnimateType, +} = projectSetting; + +interface ProjectSettingState { + navMode: string; //导航模式 + navTheme: string; //导航风格 + headerSetting: IHeaderSetting; //顶部设置 + showFooter: boolean; //页脚 + menuSetting: IMenuSetting; //多标签 + multiTabsSetting: IMultiTabsSetting; //多标签 + crumbsSetting: ICrumbsSetting; //面包屑 + permissionMode: string; //权限模式 + isPageAnimate: boolean; //是否开启路由动画 + pageAnimateType: string; //路由动画类型 + isMobile: boolean; // 是否处于移动端模式 +} + +export const useProjectSettingStore = defineStore({ + id: 'app-project-setting', + state: (): ProjectSettingState => ({ + navMode: navMode, + navTheme, + isMobile, + headerSetting, + showFooter, + menuSetting, + multiTabsSetting, + crumbsSetting, + permissionMode, + isPageAnimate, + pageAnimateType, + }), + getters: { + getNavMode(): string { + return this.navMode; + }, + getNavTheme(): string { + return this.navTheme; + }, + getIsMobile(): boolean { + return this.isMobile; + }, + getHeaderSetting(): object { + return this.headerSetting; + }, + getShowFooter(): boolean { + return this.showFooter; + }, + getMenuSetting(): object { + return this.menuSetting; + }, + getMultiTabsSetting(): object { + return this.multiTabsSetting; + }, + getCrumbsSetting(): object { + return this.crumbsSetting; + }, + getPermissionMode(): string { + return this.permissionMode; + }, + getIsPageAnimate(): boolean { + return this.isPageAnimate; + }, + getPageAnimateType(): string { + return this.pageAnimateType; + }, + }, + actions: { + setNavTheme(value: string): void { + this.navTheme = value; + }, + setIsMobile(value: boolean): void { + this.isMobile = value; + }, + setMenuCollapse() { + this.menuSetting.collapsed = true; + }, + }, +}); diff --git a/src/utils/copy.ts b/src/utils/copy.ts new file mode 100644 index 0000000..c1be43b --- /dev/null +++ b/src/utils/copy.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export function copyToClip(text: string) { + return navigator.clipboard + .writeText(text) + .then(() => { + return Promise.resolve(text); + }) + .catch((error) => { + return Promise.reject(error); + }); +} diff --git a/src/utils/log.ts b/src/utils/log.ts new file mode 100644 index 0000000..501715e --- /dev/null +++ b/src/utils/log.ts @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const projectName = import.meta.env.VITE_GLOB_APP_TITLE; + +export function warn(message: string) { + console.warn(`[${projectName} warn]:${message}`); +} + +export function error(message: string) { + throw new Error(`[${projectName} error]:${message}`); +} diff --git a/src/views/ai/app/ApiTable.vue b/src/views/ai/app/ApiTable.vue new file mode 100644 index 0000000..78645f4 --- /dev/null +++ b/src/views/ai/app/ApiTable.vue @@ -0,0 +1,132 @@ + + + + + + diff --git a/src/views/ai/app/base/index.vue b/src/views/ai/app/base/index.vue new file mode 100644 index 0000000..2b7664a --- /dev/null +++ b/src/views/ai/app/base/index.vue @@ -0,0 +1,105 @@ + + + + + + + diff --git a/src/views/ai/app/base/prompt/index.vue b/src/views/ai/app/base/prompt/index.vue new file mode 100644 index 0000000..e167c3c --- /dev/null +++ b/src/views/ai/app/base/prompt/index.vue @@ -0,0 +1,49 @@ + + + + + + + diff --git a/src/views/ai/app/base/settings/KnowledgeList.vue b/src/views/ai/app/base/settings/KnowledgeList.vue new file mode 100644 index 0000000..4d352be --- /dev/null +++ b/src/views/ai/app/base/settings/KnowledgeList.vue @@ -0,0 +1,102 @@ + + + + + + + diff --git a/src/views/ai/app/base/settings/index.vue b/src/views/ai/app/base/settings/index.vue new file mode 100644 index 0000000..39b47eb --- /dev/null +++ b/src/views/ai/app/base/settings/index.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/views/ai/app/channel-api/components/docs.vue b/src/views/ai/app/channel-api/components/docs.vue new file mode 100644 index 0000000..a45c3ba --- /dev/null +++ b/src/views/ai/app/channel-api/components/docs.vue @@ -0,0 +1,113 @@ + + + + + + + diff --git a/src/views/ai/app/channel-api/index.vue b/src/views/ai/app/channel-api/index.vue new file mode 100644 index 0000000..e7ccb0e --- /dev/null +++ b/src/views/ai/app/channel-api/index.vue @@ -0,0 +1,33 @@ + + + + + + + diff --git a/src/views/ai/app/columns.ts b/src/views/ai/app/columns.ts new file mode 100644 index 0000000..fcbf7cc --- /dev/null +++ b/src/views/ai/app/columns.ts @@ -0,0 +1,64 @@ + + +import { FormSchema } from '@/types/form'; + +export const CHANNEL = { + API: 'CHANNEL_API', + WEB: 'CHANNEL_WEB', +}; + +export const searchSchemas: FormSchema[] = [ + { + field: 'title', + component: 'Input', + label: '标题', + componentProps: { + placeholder: '请输入Prompt标题查询', + }, + }, +]; + +export const formSchemas: FormSchema[] = [ + // { + // field: 'id', + // label: 'ID', + // component: 'Input', + // isHidden: true, + // }, + { + field: 'name', + label: '应用名称', + component: 'Input', + formItemProps: { + rules: [{ required: true, message: '请输入应用名称', trigger: ['blur'] }] + }, + }, + { + field: 'modelId', + label: '关联模型', + component: 'Input', + formItemProps: { + rules: [{ required: true, message: '请选择关联模型', trigger: ['blur'] }] + }, + }, + { + field: 'cover', + label: '应用封面', + component: 'Input', + }, + { + field: 'des', + label: '应用描述', + component: 'Input', + componentProps: { + isFull: true, + placeholder: '请输入应用描述', + type: 'textarea', + autosize: { + minRows: 5, + maxRows: 8, + }, + }, + // rules: [{ required: true, message: '请输入应用描述', trigger: ['blur'] }], + }, +]; diff --git a/src/views/ai/app/edit.vue b/src/views/ai/app/edit.vue new file mode 100644 index 0000000..0e38a29 --- /dev/null +++ b/src/views/ai/app/edit.vue @@ -0,0 +1,151 @@ + + + + + diff --git a/src/views/ai/app/index.vue b/src/views/ai/app/index.vue new file mode 100644 index 0000000..08ba0bf --- /dev/null +++ b/src/views/ai/app/index.vue @@ -0,0 +1,189 @@ + + + + + diff --git a/src/views/ai/app/info.vue b/src/views/ai/app/info.vue new file mode 100644 index 0000000..000cb5b --- /dev/null +++ b/src/views/ai/app/info.vue @@ -0,0 +1,98 @@ + + + + + + + diff --git a/src/views/ai/app/store/index.ts b/src/views/ai/app/store/index.ts new file mode 100644 index 0000000..75d71ce --- /dev/null +++ b/src/views/ai/app/store/index.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { defineStore } from 'pinia'; +import { AppApi } from '@/api/new-ai/app'; + +export interface AppState { + activeMenu: string; + info: any; + modelId: string | null; + knowledgeIds: any[]; + knowledges: any[]; +} + +export const useAppStore = defineStore('app-store', { + state: (): AppState => + { + activeMenu: 'setting', + info: {}, + modelId: '', + knowledgeIds: [], + knowledges: [], + }, + + getters: {}, + + actions: { + setActiveMenu(active: string) { + this.activeMenu = active; + }, + addKnowledge(item: any) { + this.knowledgeIds.push(item.id); + this.knowledges.push(item); + this.updateInfo(); + }, + + removeKnowledge(item: any) { + this.knowledgeIds = this.knowledgeIds.filter((i) => i !== item.id); + this.knowledges = this.knowledges.filter((i) => i.id !== item.id); + this.updateInfo(); + }, + + async updateInfo() { + this.info.modelId = this.modelId; + this.info.knowledgeIds = this.knowledgeIds; + this.info.knowledges = this.knowledges; + await AppApi.updateApp({ ...this.info }); + }, + }, +}); diff --git a/src/views/ai/chat/Chat.vue b/src/views/ai/chat/Chat.vue new file mode 100644 index 0000000..cd94470 --- /dev/null +++ b/src/views/ai/chat/Chat.vue @@ -0,0 +1,244 @@ + + + + + + + diff --git a/src/views/ai/chat/Header.vue b/src/views/ai/chat/Header.vue new file mode 100644 index 0000000..98fc68f --- /dev/null +++ b/src/views/ai/chat/Header.vue @@ -0,0 +1,75 @@ + + + + + + + diff --git a/src/views/ai/chat/index.vue b/src/views/ai/chat/index.vue new file mode 100644 index 0000000..510de41 --- /dev/null +++ b/src/views/ai/chat/index.vue @@ -0,0 +1,56 @@ + + + + + + + diff --git a/src/views/ai/chat/message/Message.vue b/src/views/ai/chat/message/Message.vue new file mode 100644 index 0000000..e38343b --- /dev/null +++ b/src/views/ai/chat/message/Message.vue @@ -0,0 +1,143 @@ + + + + + + + diff --git a/src/views/ai/chat/message/TextComponent.vue b/src/views/ai/chat/message/TextComponent.vue new file mode 100644 index 0000000..28b74ad --- /dev/null +++ b/src/views/ai/chat/message/TextComponent.vue @@ -0,0 +1,139 @@ + + + + + + + diff --git a/src/views/ai/chat/message/styles.scss b/src/views/ai/chat/message/styles.scss new file mode 100644 index 0000000..7d85314 --- /dev/null +++ b/src/views/ai/chat/message/styles.scss @@ -0,0 +1,122 @@ +@import 'highlight.js/styles/github.css'; + +.message-reply, +.message-request { + position: relative; + margin-bottom: 0; +} + +.message-reply { + margin-right: 12px; +} + +.message-request { + margin-left: 12px; +} + +.text-wrap { + max-width: 80%; +} + +.code-block-wrapper { + position: relative; + padding-top: 24px; + border-radius: 8px; + margin: 8px 0; + + &:hover { + .code-block-header__copy { + display: block; + } + } + + .code-block-header { + position: absolute; + top: 0; + left: 0; + width: 100%; + padding: 4px 0; + background-color: #f6f8fa; + border-radius: 8px 8px 0 0; + + &__lang { + position: absolute; + left: 8px; + font-size: 12px; + font-weight: 500; + color: #666; + } + + &__copy { + position: absolute; + right: 8px; + font-size: 12px; + font-weight: 500; + color: #666; + cursor: pointer; + display: none; + + &:hover { + color: #000; + } + } + } + + .code-block-body { + margin: 0; + padding: 12px; + border-radius: 0 0 8px 8px; + overflow-x: auto; + font-family: 'Fira Code', monospace; + } +} + +.markdown-body { + background-color: transparent; + margin-bottom: 0; + + pre { + background-color: #f6f8fa; + } + + code { + background-color: transparent; + padding: 0; + } + + table { + width: 100%; + margin-bottom: 16px; + border-collapse: collapse; + + th, + td { + padding: 6px 13px; + border: 1px solid #dfe2e5; + } + + th { + background-color: #f6f8fa; + } + + tr:nth-child(2n) { + background-color: #f6f8fa; + } + } +} + +@keyframes blink { + 0% { + background: #fff; + } + 50% { + background: #000; + } + 100% { + background: #fff; + } +} + +.animate-blink { + animation: blink 1s infinite; +} diff --git a/src/views/ai/chat/message/styles/github-markdown.less b/src/views/ai/chat/message/styles/github-markdown.less new file mode 100644 index 0000000..8874393 --- /dev/null +++ b/src/views/ai/chat/message/styles/github-markdown.less @@ -0,0 +1,1118 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +html.dark { + .markdown-body { + color-scheme: dark; + --color-prettylights-syntax-comment: #8b949e; + --color-prettylights-syntax-constant: #79c0ff; + --color-prettylights-syntax-entity: #d2a8ff; + --color-prettylights-syntax-storage-modifier-import: #c9d1d9; + --color-prettylights-syntax-entity-tag: #7ee787; + --color-prettylights-syntax-keyword: #ff7b72; + --color-prettylights-syntax-string: #a5d6ff; + --color-prettylights-syntax-variable: #ffa657; + --color-prettylights-syntax-brackethighlighter-unmatched: #f85149; + --color-prettylights-syntax-invalid-illegal-text: #f0f6fc; + --color-prettylights-syntax-invalid-illegal-bg: #8e1519; + --color-prettylights-syntax-carriage-return-text: #f0f6fc; + --color-prettylights-syntax-carriage-return-bg: #b62324; + --color-prettylights-syntax-string-regexp: #7ee787; + --color-prettylights-syntax-markup-list: #f2cc60; + --color-prettylights-syntax-markup-heading: #1f6feb; + --color-prettylights-syntax-markup-italic: #c9d1d9; + --color-prettylights-syntax-markup-bold: #c9d1d9; + --color-prettylights-syntax-markup-deleted-text: #ffdcd7; + --color-prettylights-syntax-markup-deleted-bg: #67060c; + --color-prettylights-syntax-markup-inserted-text: #aff5b4; + --color-prettylights-syntax-markup-inserted-bg: #033a16; + --color-prettylights-syntax-markup-changed-text: #ffdfb6; + --color-prettylights-syntax-markup-changed-bg: #5a1e02; + --color-prettylights-syntax-markup-ignored-text: #c9d1d9; + --color-prettylights-syntax-markup-ignored-bg: #1158c7; + --color-prettylights-syntax-meta-diff-range: #d2a8ff; + --color-prettylights-syntax-brackethighlighter-angle: #8b949e; + --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58; + --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; + --color-fg-default: #c9d1d9; + --color-fg-muted: #8b949e; + --color-fg-subtle: #6e7681; + --color-canvas-default: #0d1117; + --color-canvas-subtle: #161b22; + --color-border-default: #30363d; + --color-border-muted: #21262d; + --color-neutral-muted: rgba(110,118,129,0.4); + --color-accent-fg: #58a6ff; + --color-accent-emphasis: #1f6feb; + --color-attention-subtle: rgba(187,128,9,0.15); + --color-danger-fg: #f85149; + } +} + +html { + .markdown-body { + color-scheme: light; + --color-prettylights-syntax-comment: #6e7781; + --color-prettylights-syntax-constant: #0550ae; + --color-prettylights-syntax-entity: #8250df; + --color-prettylights-syntax-storage-modifier-import: #24292f; + --color-prettylights-syntax-entity-tag: #116329; + --color-prettylights-syntax-keyword: #cf222e; + --color-prettylights-syntax-string: #0a3069; + --color-prettylights-syntax-variable: #953800; + --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; + --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; + --color-prettylights-syntax-invalid-illegal-bg: #82071e; + --color-prettylights-syntax-carriage-return-text: #f6f8fa; + --color-prettylights-syntax-carriage-return-bg: #cf222e; + --color-prettylights-syntax-string-regexp: #116329; + --color-prettylights-syntax-markup-list: #3b2300; + --color-prettylights-syntax-markup-heading: #0550ae; + --color-prettylights-syntax-markup-italic: #24292f; + --color-prettylights-syntax-markup-bold: #24292f; + --color-prettylights-syntax-markup-deleted-text: #82071e; + --color-prettylights-syntax-markup-deleted-bg: #ffebe9; + --color-prettylights-syntax-markup-inserted-text: #116329; + --color-prettylights-syntax-markup-inserted-bg: #dafbe1; + --color-prettylights-syntax-markup-changed-text: #953800; + --color-prettylights-syntax-markup-changed-bg: #ffd8b5; + --color-prettylights-syntax-markup-ignored-text: #eaeef2; + --color-prettylights-syntax-markup-ignored-bg: #0550ae; + --color-prettylights-syntax-meta-diff-range: #8250df; + --color-prettylights-syntax-brackethighlighter-angle: #57606a; + --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; + --color-prettylights-syntax-constant-other-reference-link: #0a3069; + --color-fg-default: #24292f; + --color-fg-muted: #57606a; + --color-fg-subtle: #6e7781; + --color-canvas-default: #ffffff; + --color-canvas-subtle: #f6f8fa; + --color-border-default: #d0d7de; + --color-border-muted: hsla(210,18%,87%,1); + --color-neutral-muted: rgba(175,184,193,0.2); + --color-accent-fg: #0969da; + --color-accent-emphasis: #0969da; + --color-attention-subtle: #fff8c5; + --color-danger-fg: #cf222e; + } +} + +.markdown-body { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + margin: 0; + //color: var(--color-fg-default); + background-color: var(--color-canvas-default); + font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; + font-size: 16px; + line-height: 1.5; + word-wrap: break-word; +} + +.markdown-body .octicon { + display: inline-block; + fill: currentColor; + vertical-align: text-bottom; +} + +.markdown-body h1:hover .anchor .octicon-link:before, +.markdown-body h2:hover .anchor .octicon-link:before, +.markdown-body h3:hover .anchor .octicon-link:before, +.markdown-body h4:hover .anchor .octicon-link:before, +.markdown-body h5:hover .anchor .octicon-link:before, +.markdown-body h6:hover .anchor .octicon-link:before { + width: 16px; + height: 16px; + content: ' '; + display: inline-block; + background-color: currentColor; + -webkit-mask-image: url("data:image/svg+xml,"); + mask-image: url("data:image/svg+xml,"); +} + +.markdown-body details, +.markdown-body figcaption, +.markdown-body figure { + display: block; +} + +.markdown-body summary { + display: list-item; +} + +.markdown-body [hidden] { + display: none !important; +} + +.markdown-body a { + background-color: transparent; + color: var(--color-accent-fg); + text-decoration: none; +} + +.markdown-body abbr[title] { + border-bottom: none; + text-decoration: underline dotted; +} + +.markdown-body b, +.markdown-body strong { + font-weight: var(--base-text-weight-semibold, 600); +} + +.markdown-body dfn { + font-style: italic; +} + +.markdown-body h1 { + margin: .67em 0; + font-weight: var(--base-text-weight-semibold, 600); + padding-bottom: .3em; + font-size: 2em; + border-bottom: 1px solid var(--color-border-muted); +} + +.markdown-body mark { + background-color: var(--color-attention-subtle); + color: var(--color-fg-default); +} + +.markdown-body small { + font-size: 90%; +} + +.markdown-body sub, +.markdown-body sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +.markdown-body sub { + bottom: -0.25em; +} + +.markdown-body sup { + top: -0.5em; +} + +.markdown-body img { + border-style: none; + max-width: 100%; + box-sizing: content-box; + background-color: var(--color-canvas-default); +} + +.markdown-body code, +.markdown-body kbd, +.markdown-body pre, +.markdown-body samp { + font-family: monospace; + font-size: 1em; +} + +.markdown-body figure { + margin: 1em 40px; +} + +.markdown-body hr { + box-sizing: content-box; + overflow: hidden; + background: transparent; + border-bottom: 1px solid var(--color-border-muted); + height: .25em; + padding: 0; + margin: 24px 0; + background-color: var(--color-border-default); + border: 0; +} + +.markdown-body input { + font: inherit; + margin: 0; + overflow: visible; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +.markdown-body [type=button], +.markdown-body [type=reset], +.markdown-body [type=submit] { + -webkit-appearance: button; +} + +.markdown-body [type=checkbox], +.markdown-body [type=radio] { + box-sizing: border-box; + padding: 0; +} + +.markdown-body [type=number]::-webkit-inner-spin-button, +.markdown-body [type=number]::-webkit-outer-spin-button { + height: auto; +} + +.markdown-body [type=search]::-webkit-search-cancel-button, +.markdown-body [type=search]::-webkit-search-decoration { + -webkit-appearance: none; +} + +.markdown-body ::-webkit-input-placeholder { + color: inherit; + opacity: .54; +} + +.markdown-body ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; +} + +.markdown-body a:hover { + text-decoration: underline; +} + +.markdown-body ::placeholder { + color: var(--color-fg-subtle); + opacity: 1; +} + +.markdown-body hr::before { + display: table; + content: ""; +} + +.markdown-body hr::after { + display: table; + clear: both; + content: ""; +} + +.markdown-body table { + border-spacing: 0; + border-collapse: collapse; + display: block; + width: max-content; + max-width: 100%; + overflow: auto; +} + +.markdown-body td, +.markdown-body th { + padding: 0; +} + +.markdown-body details summary { + cursor: pointer; +} + +.markdown-body details:not([open])>*:not(summary) { + display: none !important; +} + +.markdown-body a:focus, +.markdown-body [role=button]:focus, +.markdown-body input[type=radio]:focus, +.markdown-body input[type=checkbox]:focus { + outline: 2px solid var(--color-accent-fg); + outline-offset: -2px; + box-shadow: none; +} + +.markdown-body a:focus:not(:focus-visible), +.markdown-body [role=button]:focus:not(:focus-visible), +.markdown-body input[type=radio]:focus:not(:focus-visible), +.markdown-body input[type=checkbox]:focus:not(:focus-visible) { + outline: solid 1px transparent; +} + +.markdown-body a:focus-visible, +.markdown-body [role=button]:focus-visible, +.markdown-body input[type=radio]:focus-visible, +.markdown-body input[type=checkbox]:focus-visible { + outline: 2px solid var(--color-accent-fg); + outline-offset: -2px; + box-shadow: none; +} + +.markdown-body a:not([class]):focus, +.markdown-body a:not([class]):focus-visible, +.markdown-body input[type=radio]:focus, +.markdown-body input[type=radio]:focus-visible, +.markdown-body input[type=checkbox]:focus, +.markdown-body input[type=checkbox]:focus-visible { + outline-offset: 0; +} + +.markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + line-height: 10px; + color: var(--color-fg-default); + vertical-align: middle; + background-color: var(--color-canvas-subtle); + border: solid 1px var(--color-neutral-muted); + border-bottom-color: var(--color-neutral-muted); + border-radius: 6px; + box-shadow: inset 0 -1px 0 var(--color-neutral-muted); +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + margin-top: 24px; + margin-bottom: 16px; + font-weight: var(--base-text-weight-semibold, 600); + line-height: 1.25; +} + +.markdown-body h2 { + font-weight: var(--base-text-weight-semibold, 600); + padding-bottom: .3em; + font-size: 1.5em; + border-bottom: 1px solid var(--color-border-muted); +} + +.markdown-body h3 { + font-weight: var(--base-text-weight-semibold, 600); + font-size: 1.25em; +} + +.markdown-body h4 { + font-weight: var(--base-text-weight-semibold, 600); + font-size: 1em; +} + +.markdown-body h5 { + font-weight: var(--base-text-weight-semibold, 600); + font-size: .875em; +} + +.markdown-body h6 { + font-weight: var(--base-text-weight-semibold, 600); + font-size: .85em; + color: var(--color-fg-muted); +} + +.markdown-body p { + margin-top: 0; + margin-bottom: 10px; +} + +.markdown-body blockquote { + margin: 0; + padding: 0 1em; + color: var(--color-fg-muted); + border-left: .25em solid var(--color-border-default); +} + +.markdown-body ul, +.markdown-body ol { + margin-top: 0; + margin-bottom: 0; + padding-left: 2em; +} + +.markdown-body ol ol, +.markdown-body ul ol { + list-style-type: lower-roman; +} + +.markdown-body ul ul ol, +.markdown-body ul ol ol, +.markdown-body ol ul ol, +.markdown-body ol ol ol { + list-style-type: lower-alpha; +} + +.markdown-body dd { + margin-left: 0; +} + +.markdown-body tt, +.markdown-body code, +.markdown-body samp { + font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-size: 12px; +} + +.markdown-body pre { + margin-top: 0; + margin-bottom: 0; + font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-size: 12px; + word-wrap: normal; +} + +.markdown-body .octicon { + display: inline-block; + overflow: visible !important; + vertical-align: text-bottom; + fill: currentColor; +} + +.markdown-body input::-webkit-outer-spin-button, +.markdown-body input::-webkit-inner-spin-button { + margin: 0; + -webkit-appearance: none; + appearance: none; +} + +.markdown-body::before { + display: table; + content: ""; +} + +.markdown-body::after { + display: table; + clear: both; + content: ""; +} + +.markdown-body>*:first-child { + margin-top: 0 !important; +} + +.markdown-body>*:last-child { + margin-bottom: 0 !important; +} + +.markdown-body a:not([href]) { + color: inherit; + text-decoration: none; +} + +.markdown-body .absent { + color: var(--color-danger-fg); +} + +.markdown-body .anchor { + float: left; + padding-right: 4px; + margin-left: -20px; + line-height: 1; +} + +.markdown-body .anchor:focus { + outline: none; +} + +.markdown-body p, +.markdown-body blockquote, +.markdown-body ul, +.markdown-body ol, +.markdown-body dl, +.markdown-body table, +.markdown-body pre, +.markdown-body details { + margin-top: 0; + margin-bottom: 16px; +} + +.markdown-body blockquote>:first-child { + margin-top: 0; +} + +.markdown-body blockquote>:last-child { + margin-bottom: 0; +} + +.markdown-body h1 .octicon-link, +.markdown-body h2 .octicon-link, +.markdown-body h3 .octicon-link, +.markdown-body h4 .octicon-link, +.markdown-body h5 .octicon-link, +.markdown-body h6 .octicon-link { + color: var(--color-fg-default); + vertical-align: middle; + visibility: hidden; +} + +.markdown-body h1:hover .anchor, +.markdown-body h2:hover .anchor, +.markdown-body h3:hover .anchor, +.markdown-body h4:hover .anchor, +.markdown-body h5:hover .anchor, +.markdown-body h6:hover .anchor { + text-decoration: none; +} + +.markdown-body h1:hover .anchor .octicon-link, +.markdown-body h2:hover .anchor .octicon-link, +.markdown-body h3:hover .anchor .octicon-link, +.markdown-body h4:hover .anchor .octicon-link, +.markdown-body h5:hover .anchor .octicon-link, +.markdown-body h6:hover .anchor .octicon-link { + visibility: visible; +} + +.markdown-body h1 tt, +.markdown-body h1 code, +.markdown-body h2 tt, +.markdown-body h2 code, +.markdown-body h3 tt, +.markdown-body h3 code, +.markdown-body h4 tt, +.markdown-body h4 code, +.markdown-body h5 tt, +.markdown-body h5 code, +.markdown-body h6 tt, +.markdown-body h6 code { + padding: 0 .2em; + font-size: inherit; +} + +.markdown-body summary h1, +.markdown-body summary h2, +.markdown-body summary h3, +.markdown-body summary h4, +.markdown-body summary h5, +.markdown-body summary h6 { + display: inline-block; +} + +.markdown-body summary h1 .anchor, +.markdown-body summary h2 .anchor, +.markdown-body summary h3 .anchor, +.markdown-body summary h4 .anchor, +.markdown-body summary h5 .anchor, +.markdown-body summary h6 .anchor { + margin-left: -40px; +} + +.markdown-body summary h1, +.markdown-body summary h2 { + padding-bottom: 0; + border-bottom: 0; +} + +.markdown-body ul.no-list, +.markdown-body ol.no-list { + padding: 0; + list-style-type: none; +} + +.markdown-body ol[type=a] { + list-style-type: lower-alpha; +} + +.markdown-body ol[type=A] { + list-style-type: upper-alpha; +} + +.markdown-body ol[type=i] { + list-style-type: lower-roman; +} + +.markdown-body ol[type=I] { + list-style-type: upper-roman; +} + +.markdown-body ol[type="1"] { + list-style-type: decimal; +} + +.markdown-body div>ol:not([type]) { + list-style-type: decimal; +} + +.markdown-body ul ul, +.markdown-body ul ol, +.markdown-body ol ol, +.markdown-body ol ul { + margin-top: 0; + margin-bottom: 0; +} + +.markdown-body li>p { + margin-top: 16px; +} + +.markdown-body li+li { + margin-top: .25em; +} + +.markdown-body dl { + padding: 0; +} + +.markdown-body dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: var(--base-text-weight-semibold, 600); +} + +.markdown-body dl dd { + padding: 0 16px; + margin-bottom: 16px; +} + +.markdown-body table th { + font-weight: var(--base-text-weight-semibold, 600); +} + +.markdown-body table th, +.markdown-body table td { + padding: 6px 13px; + border: 1px solid var(--color-border-default); +} + +.markdown-body table tr { + background-color: var(--color-canvas-default); + border-top: 1px solid var(--color-border-muted); +} + +.markdown-body table tr:nth-child(2n) { + background-color: var(--color-canvas-subtle); +} + +.markdown-body table img { + background-color: transparent; +} + +.markdown-body img[align=right] { + padding-left: 20px; +} + +.markdown-body img[align=left] { + padding-right: 20px; +} + +.markdown-body .emoji { + max-width: none; + vertical-align: text-top; + background-color: transparent; +} + +.markdown-body span.frame { + display: block; + overflow: hidden; +} + +.markdown-body span.frame>span { + display: block; + float: left; + width: auto; + padding: 7px; + margin: 13px 0 0; + overflow: hidden; + border: 1px solid var(--color-border-default); +} + +.markdown-body span.frame span img { + display: block; + float: left; +} + +.markdown-body span.frame span span { + display: block; + padding: 5px 0 0; + clear: both; + color: var(--color-fg-default); +} + +.markdown-body span.align-center { + display: block; + overflow: hidden; + clear: both; +} + +.markdown-body span.align-center>span { + display: block; + margin: 13px auto 0; + overflow: hidden; + text-align: center; +} + +.markdown-body span.align-center span img { + margin: 0 auto; + text-align: center; +} + +.markdown-body span.align-right { + display: block; + overflow: hidden; + clear: both; +} + +.markdown-body span.align-right>span { + display: block; + margin: 13px 0 0; + overflow: hidden; + text-align: right; +} + +.markdown-body span.align-right span img { + margin: 0; + text-align: right; +} + +.markdown-body span.float-left { + display: block; + float: left; + margin-right: 13px; + overflow: hidden; +} + +.markdown-body span.float-left span { + margin: 13px 0 0; +} + +.markdown-body span.float-right { + display: block; + float: right; + margin-left: 13px; + overflow: hidden; +} + +.markdown-body span.float-right>span { + display: block; + margin: 13px auto 0; + overflow: hidden; + text-align: right; +} + +.markdown-body code, +.markdown-body tt { + padding: .2em .4em; + margin: 0; + font-size: 85%; + white-space: break-spaces; + background-color: var(--color-neutral-muted); + border-radius: 6px; +} + +.markdown-body code br, +.markdown-body tt br { + display: none; +} + +.markdown-body del code { + text-decoration: inherit; +} + +.markdown-body samp { + font-size: 85%; +} + +.markdown-body pre code { + font-size: 100%; +} + +.markdown-body pre>code { + padding: 0; + margin: 0; + word-break: normal; + white-space: pre; + background: transparent; + border: 0; +} + +.markdown-body .highlight { + margin-bottom: 16px; +} + +.markdown-body .highlight pre { + margin-bottom: 0; + word-break: normal; +} + +.markdown-body .highlight pre, +.markdown-body pre { + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: var(--color-canvas-subtle); + border-radius: 6px; +} + +.markdown-body pre code, +.markdown-body pre tt { + display: inline; + max-width: auto; + padding: 0; + margin: 0; + overflow: visible; + line-height: inherit; + word-wrap: normal; + background-color: transparent; + border: 0; +} + +.markdown-body .csv-data td, +.markdown-body .csv-data th { + padding: 5px; + overflow: hidden; + font-size: 12px; + line-height: 1; + text-align: left; + white-space: nowrap; +} + +.markdown-body .csv-data .blob-num { + padding: 10px 8px 9px; + text-align: right; + background: var(--color-canvas-default); + border: 0; +} + +.markdown-body .csv-data tr { + border-top: 0; +} + +.markdown-body .csv-data th { + font-weight: var(--base-text-weight-semibold, 600); + background: var(--color-canvas-subtle); + border-top: 0; +} + +.markdown-body [data-footnote-ref]::before { + content: "["; +} + +.markdown-body [data-footnote-ref]::after { + content: "]"; +} + +.markdown-body .footnotes { + font-size: 12px; + color: var(--color-fg-muted); + border-top: 1px solid var(--color-border-default); +} + +.markdown-body .footnotes ol { + padding-left: 16px; +} + +.markdown-body .footnotes ol ul { + display: inline-block; + padding-left: 16px; + margin-top: 16px; +} + +.markdown-body .footnotes li { + position: relative; +} + +.markdown-body .footnotes li:target::before { + position: absolute; + top: -8px; + right: -8px; + bottom: -8px; + left: -24px; + pointer-events: none; + content: ""; + border: 2px solid var(--color-accent-emphasis); + border-radius: 6px; +} + +.markdown-body .footnotes li:target { + color: var(--color-fg-default); +} + +.markdown-body .footnotes .data-footnote-backref g-emoji { + font-family: monospace; +} + +.markdown-body .pl-c { + color: var(--color-prettylights-syntax-comment); +} + +.markdown-body .pl-c1, +.markdown-body .pl-s .pl-v { + color: var(--color-prettylights-syntax-constant); +} + +.markdown-body .pl-e, +.markdown-body .pl-en { + color: var(--color-prettylights-syntax-entity); +} + +.markdown-body .pl-smi, +.markdown-body .pl-s .pl-s1 { + color: var(--color-prettylights-syntax-storage-modifier-import); +} + +.markdown-body .pl-ent { + color: var(--color-prettylights-syntax-entity-tag); +} + +.markdown-body .pl-k { + color: var(--color-prettylights-syntax-keyword); +} + +.markdown-body .pl-s, +.markdown-body .pl-pds, +.markdown-body .pl-s .pl-pse .pl-s1, +.markdown-body .pl-sr, +.markdown-body .pl-sr .pl-cce, +.markdown-body .pl-sr .pl-sre, +.markdown-body .pl-sr .pl-sra { + color: var(--color-prettylights-syntax-string); +} + +.markdown-body .pl-v, +.markdown-body .pl-smw { + color: var(--color-prettylights-syntax-variable); +} + +.markdown-body .pl-bu { + color: var(--color-prettylights-syntax-brackethighlighter-unmatched); +} + +.markdown-body .pl-ii { + color: var(--color-prettylights-syntax-invalid-illegal-text); + background-color: var(--color-prettylights-syntax-invalid-illegal-bg); +} + +.markdown-body .pl-c2 { + color: var(--color-prettylights-syntax-carriage-return-text); + background-color: var(--color-prettylights-syntax-carriage-return-bg); +} + +.markdown-body .pl-sr .pl-cce { + font-weight: bold; + color: var(--color-prettylights-syntax-string-regexp); +} + +.markdown-body .pl-ml { + color: var(--color-prettylights-syntax-markup-list); +} + +.markdown-body .pl-mh, +.markdown-body .pl-mh .pl-en, +.markdown-body .pl-ms { + font-weight: bold; + color: var(--color-prettylights-syntax-markup-heading); +} + +.markdown-body .pl-mi { + font-style: italic; + color: var(--color-prettylights-syntax-markup-italic); +} + +.markdown-body .pl-mb { + font-weight: bold; + color: var(--color-prettylights-syntax-markup-bold); +} + +.markdown-body .pl-md { + color: var(--color-prettylights-syntax-markup-deleted-text); + background-color: var(--color-prettylights-syntax-markup-deleted-bg); +} + +.markdown-body .pl-mi1 { + color: var(--color-prettylights-syntax-markup-inserted-text); + background-color: var(--color-prettylights-syntax-markup-inserted-bg); +} + +.markdown-body .pl-mc { + color: var(--color-prettylights-syntax-markup-changed-text); + background-color: var(--color-prettylights-syntax-markup-changed-bg); +} + +.markdown-body .pl-mi2 { + color: var(--color-prettylights-syntax-markup-ignored-text); + background-color: var(--color-prettylights-syntax-markup-ignored-bg); +} + +.markdown-body .pl-mdr { + font-weight: bold; + color: var(--color-prettylights-syntax-meta-diff-range); +} + +.markdown-body .pl-ba { + color: var(--color-prettylights-syntax-brackethighlighter-angle); +} + +.markdown-body .pl-sg { + color: var(--color-prettylights-syntax-sublimelinter-gutter-mark); +} + +.markdown-body .pl-corl { + text-decoration: underline; + color: var(--color-prettylights-syntax-constant-other-reference-link); +} + +.markdown-body g-emoji { + display: inline-block; + min-width: 1ch; + font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; + font-size: 1em; + font-style: normal !important; + font-weight: var(--base-text-weight-normal, 400); + line-height: 1; + vertical-align: -0.075em; +} + +.markdown-body g-emoji img { + width: 1em; + height: 1em; +} + +.markdown-body .task-list-item { + list-style-type: none; +} + +.markdown-body .task-list-item label { + font-weight: var(--base-text-weight-normal, 400); +} + +.markdown-body .task-list-item.enabled label { + cursor: pointer; +} + +.markdown-body .task-list-item+.task-list-item { + margin-top: 4px; +} + +.markdown-body .task-list-item .handle { + display: none; +} + +.markdown-body .task-list-item-checkbox { + margin: 0 .2em .25em -1.4em; + vertical-align: middle; +} + +.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox { + margin: 0 -1.6em .25em .2em; +} + +.markdown-body .contains-task-list { + position: relative; +} + +.markdown-body .contains-task-list:hover .task-list-item-convert-container, +.markdown-body .contains-task-list:focus-within .task-list-item-convert-container { + display: block; + width: auto; + height: 24px; + overflow: visible; + clip: auto; +} + +.markdown-body ::-webkit-calendar-picker-indicator { + filter: invert(50%); +} diff --git a/src/views/ai/chat/message/styles/highlight.less b/src/views/ai/chat/message/styles/highlight.less new file mode 100644 index 0000000..98738c4 --- /dev/null +++ b/src/views/ai/chat/message/styles/highlight.less @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +html.dark { + pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em + } + + code.hljs { + padding: 3px 5px + } + + .hljs { + color: #abb2bf; + background: #282c34 + } + + .hljs-keyword, + .hljs-operator, + .hljs-pattern-match { + color: #f92672 + } + + .hljs-function, + .hljs-pattern-match .hljs-constructor { + color: #61aeee + } + + .hljs-function .hljs-params { + color: #a6e22e + } + + .hljs-function .hljs-params .hljs-typing { + color: #fd971f + } + + .hljs-module-access .hljs-module { + color: #7e57c2 + } + + .hljs-constructor { + color: #e2b93d + } + + .hljs-constructor .hljs-string { + color: #9ccc65 + } + + .hljs-comment, + .hljs-quote { + color: #b18eb1; + font-style: italic + } + + .hljs-doctag, + .hljs-formula { + color: #c678dd + } + + .hljs-deletion, + .hljs-name, + .hljs-section, + .hljs-selector-tag, + .hljs-subst { + color: #e06c75 + } + + .hljs-literal { + color: #56b6c2 + } + + .hljs-addition, + .hljs-attribute, + .hljs-meta .hljs-string, + .hljs-regexp, + .hljs-string { + color: #98c379 + } + + .hljs-built_in, + .hljs-class .hljs-title, + .hljs-title.class_ { + color: #e6c07b + } + + .hljs-attr, + .hljs-number, + .hljs-selector-attr, + .hljs-selector-class, + .hljs-selector-pseudo, + .hljs-template-variable, + .hljs-type, + .hljs-variable { + color: #d19a66 + } + + .hljs-bullet, + .hljs-link, + .hljs-meta, + .hljs-selector-id, + .hljs-symbol, + .hljs-title { + color: #61aeee + } + + .hljs-emphasis { + font-style: italic + } + + .hljs-strong { + font-weight: 700 + } + + .hljs-link { + text-decoration: underline + } +} + +html { + pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em + } + + code.hljs { + padding: 3px 5px; + &::-webkit-scrollbar { + height: 4px; + } + } + + .hljs { + color: #383a42; + background: #fafafa + } + + .hljs-comment, + .hljs-quote { + color: #a0a1a7; + font-style: italic + } + + .hljs-doctag, + .hljs-formula, + .hljs-keyword { + color: #a626a4 + } + + .hljs-deletion, + .hljs-name, + .hljs-section, + .hljs-selector-tag, + .hljs-subst { + color: #e45649 + } + + .hljs-literal { + color: #0184bb + } + + .hljs-addition, + .hljs-attribute, + .hljs-meta .hljs-string, + .hljs-regexp, + .hljs-string { + color: #50a14f + } + + .hljs-attr, + .hljs-number, + .hljs-selector-attr, + .hljs-selector-class, + .hljs-selector-pseudo, + .hljs-template-variable, + .hljs-type, + .hljs-variable { + color: #986801 + } + + .hljs-bullet, + .hljs-link, + .hljs-meta, + .hljs-selector-id, + .hljs-symbol, + .hljs-title { + color: #4078f2 + } + + .hljs-built_in, + .hljs-class .hljs-title, + .hljs-title.class_ { + color: #c18401 + } + + .hljs-emphasis { + font-style: italic + } + + .hljs-strong { + font-weight: 700 + } + + .hljs-link { + text-decoration: underline + } +} diff --git a/src/views/ai/chat/message/styles/index.less b/src/views/ai/chat/message/styles/index.less new file mode 100644 index 0000000..542cc44 --- /dev/null +++ b/src/views/ai/chat/message/styles/index.less @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@import "github-markdown.less"; +@import "highlight.less"; +@import "style.less"; diff --git a/src/views/ai/chat/message/styles/style.less b/src/views/ai/chat/message/styles/style.less new file mode 100644 index 0000000..4c2ae23 --- /dev/null +++ b/src/views/ai/chat/message/styles/style.less @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.markdown-body { + background-color: transparent; + font-size: 14px; + + p { + white-space: pre-wrap; + } + + ol { + list-style-type: decimal; + } + + ul { + list-style-type: disc; + } + + pre code, + pre tt { + line-height: 1.65; + } + + .highlight pre, + pre { + background-color: #fff; + } + + code.hljs { + padding: 0; + } + + .code-block { + &-wrapper { + position: relative; + padding-top: 24px; + margin-top: 10px; + } + + &-header { + position: absolute; + top: 5px; + right: 0; + width: 100%; + padding: 0 1rem; + display: flex; + justify-content: flex-end; + align-items: center; + color: #b3b3b3; + + &__copy { + cursor: pointer; + margin-left: 0.5rem; + user-select: none; + + &:hover { + color: #65a665; + } + } + } + } + +} + +html.dark { + + .message-reply { + .whitespace-pre-wrap { + white-space: pre-wrap; + color: var(--n-text-color); + } + } + + .highlight pre, + pre { + background-color: #282c34; + } +} + +@keyframes blink { + 0%, to { + background-color: currentColor + } + 50% { + background-color: transparent + } +} + +.animate-blink { + animation: blink 1.2s infinite steps(1, start) +} diff --git a/src/views/ai/chat/store/chat.d.ts b/src/views/ai/chat/store/chat.d.ts new file mode 100644 index 0000000..ff5e8ed --- /dev/null +++ b/src/views/ai/chat/store/chat.d.ts @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface ChatState { + messages: any[]; + modelId: string | null; + modelName: string | null; + modelProvider: string | null; + conversationId: string | null; + appId: any; +} diff --git a/src/views/ai/chat/store/useBasicLayout.ts b/src/views/ai/chat/store/useBasicLayout.ts new file mode 100644 index 0000000..0e52551 --- /dev/null +++ b/src/views/ai/chat/store/useBasicLayout.ts @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { breakpointsTailwind, useBreakpoints } from '@vueuse/core'; + +export const useBasicLayout = () => { + const breakpoints = useBreakpoints(breakpointsTailwind); + const isMobile = breakpoints.smaller('sm'); + return { isMobile }; +}; diff --git a/src/views/ai/chat/store/useChatStore.ts b/src/views/ai/chat/store/useChatStore.ts new file mode 100644 index 0000000..15ba87f --- /dev/null +++ b/src/views/ai/chat/store/useChatStore.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { defineStore } from 'pinia'; +import { formatToDateTime } from '@/utils/dateUtil'; +import type { ChatState } from '@/views/ai/chat/store/chat'; + +export const useChatStore = defineStore('chat-store', { + state: (): ChatState => + { + modelId: null, + modelName: '', + modelProvider: '', + conversationId: null, + messages: [], + appId: null, + }, + + getters: {}, + + actions: { + /** + * 新增消息 + */ + async addMessage( + message: string, + role: 'user' | 'assistant' | 'system', + chatId: string + ): Promise { + this.messages.push({ + chatId, + role: role, + message: message, + createTime: formatToDateTime(new Date()), + }); + return true; + }, + + /** + * 更新消息 + * chatId 仅仅用于更新流式消息内容 + */ + async updateMessage(chatId: string, message: string, isError?: boolean) { + const index = this.messages.findIndex((item) => item?.chatId == chatId); + if (index !== -1) { + this.messages[index].message = message; + this.messages[index].isError = isError; + } + }, + + /** + * 删除消息 + */ + async delMessage(item: any) { + this.messages = this.messages.filter((i) => i.promptId !== item.promptId); + }, + }, +}); diff --git a/src/views/ai/chat/store/useIconRender.ts b/src/views/ai/chat/store/useIconRender.ts new file mode 100644 index 0000000..400fb44 --- /dev/null +++ b/src/views/ai/chat/store/useIconRender.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { h } from 'vue'; +import SvgIcon from '@/components/SvgIcon/index.vue'; + +export const useIconRender = () => { + interface IconConfig { + icon?: string; + color?: string; + fontSize?: number; + } + + interface IconStyle { + color?: string; + fontSize?: string; + } + + const iconRender = (config: IconConfig) => { + const { color, fontSize, icon } = config; + + const style: IconStyle = {}; + + if (color) { + style.color = color; + } + + if (fontSize) { + style.fontSize = `${fontSize}px`; + } + + if (!icon) { + window.console.warn('iconRender: icon is required'); + } + + return () => h(SvgIcon, { icon, style }); + }; + + return { + iconRender, + }; +}; diff --git a/src/views/ai/chat/store/useScroll.ts b/src/views/ai/chat/store/useScroll.ts new file mode 100644 index 0000000..3d2fd06 --- /dev/null +++ b/src/views/ai/chat/store/useScroll.ts @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { Ref } from 'vue' +import { nextTick, ref } from 'vue' + +type ScrollElement = HTMLDivElement | null + +interface ScrollReturn { + contentRef: Ref + scrollRef: Ref + scrollToBottom: () => Promise + scrollToTop: () => Promise + scrollToBottomIfAtBottom: () => Promise +} + +export function useScroll(): ScrollReturn { + const scrollRef = ref(null) + const contentRef = ref(null) + + const scrollToBottom = async () => { + await nextTick() + if (contentRef.value) { + contentRef.value.scrollTo({ top: contentRef.value.scrollHeight, behavior: 'smooth' }) + } + } + + const scrollToTop = async () => { + await nextTick() + if (contentRef.value) { + contentRef.value.scrollTo({ top: 0, behavior: 'smooth' }) + } + } + + const scrollToBottomIfAtBottom = async () => { + await nextTick() + if (contentRef.value) { + const threshold = 100 // 阈值,表示滚动条到底部的距离阈值 + const distanceToBottom = + contentRef.value.scrollHeight - contentRef.value.scrollTop - contentRef.value.clientHeight + if (distanceToBottom <= threshold) { + contentRef.value.scrollTo({ top: contentRef.value.scrollHeight, behavior: 'smooth' }) + } + } + } + + return { + scrollRef, + contentRef, + scrollToBottom, + scrollToTop, + scrollToBottomIfAtBottom, + } +} diff --git a/src/views/common/AppSelect.vue b/src/views/common/AppSelect.vue new file mode 100644 index 0000000..35c2c16 --- /dev/null +++ b/src/views/common/AppSelect.vue @@ -0,0 +1,67 @@ + + + + + + + diff --git a/src/views/common/ModelSelect.vue b/src/views/common/ModelSelect.vue new file mode 100644 index 0000000..f1c17eb --- /dev/null +++ b/src/views/common/ModelSelect.vue @@ -0,0 +1,107 @@ + + + + + + + diff --git a/types/config.d.ts b/types/config.d.ts new file mode 100644 index 0000000..2a0d8a3 --- /dev/null +++ b/types/config.d.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved. + * + * Licensed under the GNU Affero General Public License, Version 3 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface ProjectSettingState { + //导航模式 + navMode: string; + //导航风格 + navTheme: string; + //顶部设置 + headerSetting: object; + //页脚 + showFooter: boolean; + //菜单设置 + menuSetting: object; + //多标签 + multiTabsSetting: object; + //面包屑 + crumbsSetting: object; + //权限模式 + permissionMode: string; +} + +export interface IBodySetting { + fixed: boolean; +} + +export interface IHeaderSetting { + bgColor: string; + fixed: boolean; + isReload: boolean; +} + +export interface IMenuSetting { + minMenuWidth: number; + menuWidth: number; + fixed: boolean; + mixMenu: boolean; + collapsed: boolean; + mobileWidth: number; +} + +export interface ICrumbsSetting { + show: boolean; + showIcon: boolean; +} + +export interface IMultiTabsSetting { + bgColor: string; + fixed: boolean; + show: boolean; +} +export interface GlobConfig { + title: string; + apiUrl: string; + shortName: string; + urlPrefix?: string; + uploadUrl?: string; + imgUrl?: string; +} + +export interface GlobEnvConfig { + // 标题 + VITE_GLOB_APP_TITLE: string; + // 接口地址 + VITE_GLOB_API_URL: string; + // 接口前缀 + VITE_GLOB_API_URL_PREFIX?: string; + // Project abbreviation + VITE_GLOB_APP_SHORT_NAME: string; + // 图片上传地址 + VITE_GLOB_UPLOAD_URL?: string; + //图片前缀地址 + VITE_GLOB_IMG_URL?: string; +} diff --git a/vite.config.ts b/vite.config.ts index 66ddb9e..f737e15 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -59,7 +59,11 @@ export default ({command, mode}: ConfigEnv): UserConfig => { { find: /\@\//, replacement: `${pathResolve('src')}/` - } + }, + { + find: /\/#\//, + replacement: pathResolve('types') + '/', + }, ] }, build: {