balibabu
commited on
Commit
·
f850783
1
Parent(s):
13b2570
feat: API access key management #2846 (#2865)
Browse files### What problem does this PR solve?
feat: API access key management #2846
feat: Render markdown file with remark-loader #2846
### Type of change
- [ ] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):
- web/.umirc.ts +15 -0
- web/package-lock.json +882 -0
- web/package.json +2 -0
- web/src/assets/svg/api.svg +6 -0
- web/src/components/api-service/chat-api-key-modal/index.tsx +9 -6
- web/src/components/api-service/chat-overview-modal/api-content.tsx +64 -0
- web/src/components/api-service/chat-overview-modal/backend-service-api.tsx +35 -0
- web/src/components/api-service/chat-overview-modal/index.less +3 -5
- web/src/components/api-service/chat-overview-modal/index.tsx +4 -116
- web/src/components/api-service/chat-overview-modal/stats-chart.tsx +40 -0
- web/src/components/api-service/hooks.ts +20 -18
- web/src/components/highlight-markdown/index.less +16 -1
- web/src/components/highlight-markdown/index.tsx +8 -3
- web/src/constants/common.ts +6 -0
- web/src/constants/setting.ts +1 -0
- web/src/hooks/chat-hooks.ts +1 -1
- web/src/hooks/user-setting-hooks.tsx +63 -0
- web/src/layouts/components/right-toolbar/index.tsx +2 -2
- web/src/less/mixins.less +21 -2
- web/src/locales/en.ts +3 -2
- web/src/locales/zh-traditional.ts +2 -2
- web/src/locales/zh.ts +2 -2
- web/src/pages/api/index.tsx +11 -0
- web/src/pages/chat/chat-id-modal/index.less +3 -0
- web/src/pages/chat/chat-id-modal/index.tsx +34 -0
- web/src/pages/chat/index.tsx +5 -5
- web/src/pages/user-setting/constants.tsx +2 -0
- web/src/pages/user-setting/setting-api/index.less +7 -0
- web/src/pages/user-setting/setting-api/index.tsx +13 -0
- web/src/routes.ts +4 -0
- web/src/services/user-service.ts +15 -0
- web/src/utils/api.ts +4 -0
web/.umirc.ts
CHANGED
@@ -25,6 +25,9 @@ export default defineConfig({
|
|
25 |
hack: `true; @import "~@/less/index.less";`,
|
26 |
},
|
27 |
},
|
|
|
|
|
|
|
28 |
devtool: 'source-map',
|
29 |
copy: ['src/conf.json'],
|
30 |
proxy: {
|
@@ -36,4 +39,16 @@ export default defineConfig({
|
|
36 |
// pathRewrite: { '^/v1': '/v1' },
|
37 |
},
|
38 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
});
|
|
|
25 |
hack: `true; @import "~@/less/index.less";`,
|
26 |
},
|
27 |
},
|
28 |
+
mdx: {
|
29 |
+
loader: 'remark-loader',
|
30 |
+
},
|
31 |
devtool: 'source-map',
|
32 |
copy: ['src/conf.json'],
|
33 |
proxy: {
|
|
|
39 |
// pathRewrite: { '^/v1': '/v1' },
|
40 |
},
|
41 |
},
|
42 |
+
chainWebpack(memo, args) {
|
43 |
+
memo.module
|
44 |
+
.rule('markdown')
|
45 |
+
.test(/\.md$/)
|
46 |
+
.use('html-loader')
|
47 |
+
.loader('html-loader')
|
48 |
+
.end()
|
49 |
+
.use('remark-loader')
|
50 |
+
.loader('remark-loader');
|
51 |
+
|
52 |
+
return memo;
|
53 |
+
},
|
54 |
});
|
web/package-lock.json
CHANGED
@@ -67,6 +67,7 @@
|
|
67 |
"@umijs/lint": "^4.1.1",
|
68 |
"@umijs/plugins": "^4.1.0",
|
69 |
"cross-env": "^7.0.3",
|
|
|
70 |
"husky": "^9.0.11",
|
71 |
"jest": "^29.7.0",
|
72 |
"jest-environment-jsdom": "^29.7.0",
|
@@ -75,6 +76,7 @@
|
|
75 |
"prettier-plugin-organize-imports": "^3.2.4",
|
76 |
"prettier-plugin-packagejson": "^2.4.9",
|
77 |
"react-dev-inspector": "^2.0.1",
|
|
|
78 |
"ts-node": "^10.9.2",
|
79 |
"typescript": "^5.0.3",
|
80 |
"umi-plugin-icons": "^0.1.1"
|
@@ -13411,6 +13413,15 @@
|
|
13411 |
}
|
13412 |
]
|
13413 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13414 |
"node_modules/fs-extra": {
|
13415 |
"version": "10.1.0",
|
13416 |
"resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz",
|
@@ -14279,6 +14290,56 @@
|
|
14279 |
"integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
|
14280 |
"devOptional": true
|
14281 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14282 |
"node_modules/html-minifier-terser": {
|
14283 |
"version": "6.1.0",
|
14284 |
"resolved": "https://registry.npmmirror.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz",
|
@@ -19895,6 +19956,16 @@
|
|
19895 |
"node": "*"
|
19896 |
}
|
19897 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19898 |
"node_modules/ms": {
|
19899 |
"version": "2.1.2",
|
19900 |
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
|
@@ -23889,6 +23960,23 @@
|
|
23889 |
"node": ">= 0.10"
|
23890 |
}
|
23891 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23892 |
"node_modules/remark-gfm": {
|
23893 |
"version": "4.0.0",
|
23894 |
"resolved": "https://registry.npmmirror.com/remark-gfm/-/remark-gfm-4.0.0.tgz",
|
@@ -23902,6 +23990,26 @@
|
|
23902 |
"unified": "^11.0.0"
|
23903 |
}
|
23904 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23905 |
"node_modules/remark-parse": {
|
23906 |
"version": "11.0.0",
|
23907 |
"resolved": "https://registry.npmmirror.com/remark-parse/-/remark-parse-11.0.0.tgz",
|
@@ -23935,6 +24043,728 @@
|
|
23935 |
"unified": "^11.0.0"
|
23936 |
}
|
23937 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23938 |
"node_modules/remove-accents": {
|
23939 |
"version": "0.4.2",
|
23940 |
"resolved": "https://registry.npmmirror.com/remove-accents/-/remove-accents-0.4.2.tgz",
|
@@ -24188,6 +25018,19 @@
|
|
24188 |
"queue-microtask": "^1.2.2"
|
24189 |
}
|
24190 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24191 |
"node_modules/safe-array-concat": {
|
24192 |
"version": "1.1.2",
|
24193 |
"resolved": "https://registry.npmmirror.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
|
@@ -26834,6 +27677,45 @@
|
|
26834 |
"uuid": "dist/bin/uuid"
|
26835 |
}
|
26836 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26837 |
"node_modules/v8-compile-cache": {
|
26838 |
"version": "2.4.0",
|
26839 |
"resolved": "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz",
|
|
|
67 |
"@umijs/lint": "^4.1.1",
|
68 |
"@umijs/plugins": "^4.1.0",
|
69 |
"cross-env": "^7.0.3",
|
70 |
+
"html-loader": "^5.1.0",
|
71 |
"husky": "^9.0.11",
|
72 |
"jest": "^29.7.0",
|
73 |
"jest-environment-jsdom": "^29.7.0",
|
|
|
76 |
"prettier-plugin-organize-imports": "^3.2.4",
|
77 |
"prettier-plugin-packagejson": "^2.4.9",
|
78 |
"react-dev-inspector": "^2.0.1",
|
79 |
+
"remark-loader": "^6.0.0",
|
80 |
"ts-node": "^10.9.2",
|
81 |
"typescript": "^5.0.3",
|
82 |
"umi-plugin-icons": "^0.1.1"
|
|
|
13413 |
}
|
13414 |
]
|
13415 |
},
|
13416 |
+
"node_modules/front-matter": {
|
13417 |
+
"version": "4.0.2",
|
13418 |
+
"resolved": "https://registry.npmmirror.com/front-matter/-/front-matter-4.0.2.tgz",
|
13419 |
+
"integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==",
|
13420 |
+
"dev": true,
|
13421 |
+
"dependencies": {
|
13422 |
+
"js-yaml": "^3.13.1"
|
13423 |
+
}
|
13424 |
+
},
|
13425 |
"node_modules/fs-extra": {
|
13426 |
"version": "10.1.0",
|
13427 |
"resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz",
|
|
|
14290 |
"integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
|
14291 |
"devOptional": true
|
14292 |
},
|
14293 |
+
"node_modules/html-loader": {
|
14294 |
+
"version": "5.1.0",
|
14295 |
+
"resolved": "https://registry.npmmirror.com/html-loader/-/html-loader-5.1.0.tgz",
|
14296 |
+
"integrity": "sha512-Jb3xwDbsm0W3qlXrCZwcYqYGnYz55hb6aoKQTlzyZPXsPpi6tHXzAfqalecglMQgNvtEfxrCQPaKT90Irt5XDA==",
|
14297 |
+
"dev": true,
|
14298 |
+
"dependencies": {
|
14299 |
+
"html-minifier-terser": "^7.2.0",
|
14300 |
+
"parse5": "^7.1.2"
|
14301 |
+
},
|
14302 |
+
"engines": {
|
14303 |
+
"node": ">= 18.12.0"
|
14304 |
+
},
|
14305 |
+
"funding": {
|
14306 |
+
"type": "opencollective",
|
14307 |
+
"url": "https://opencollective.com/webpack"
|
14308 |
+
},
|
14309 |
+
"peerDependencies": {
|
14310 |
+
"webpack": "^5.0.0"
|
14311 |
+
}
|
14312 |
+
},
|
14313 |
+
"node_modules/html-loader/node_modules/commander": {
|
14314 |
+
"version": "10.0.1",
|
14315 |
+
"resolved": "https://registry.npmmirror.com/commander/-/commander-10.0.1.tgz",
|
14316 |
+
"integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
|
14317 |
+
"dev": true,
|
14318 |
+
"engines": {
|
14319 |
+
"node": ">=14"
|
14320 |
+
}
|
14321 |
+
},
|
14322 |
+
"node_modules/html-loader/node_modules/html-minifier-terser": {
|
14323 |
+
"version": "7.2.0",
|
14324 |
+
"resolved": "https://registry.npmmirror.com/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz",
|
14325 |
+
"integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==",
|
14326 |
+
"dev": true,
|
14327 |
+
"dependencies": {
|
14328 |
+
"camel-case": "^4.1.2",
|
14329 |
+
"clean-css": "~5.3.2",
|
14330 |
+
"commander": "^10.0.0",
|
14331 |
+
"entities": "^4.4.0",
|
14332 |
+
"param-case": "^3.0.4",
|
14333 |
+
"relateurl": "^0.2.7",
|
14334 |
+
"terser": "^5.15.1"
|
14335 |
+
},
|
14336 |
+
"bin": {
|
14337 |
+
"html-minifier-terser": "cli.js"
|
14338 |
+
},
|
14339 |
+
"engines": {
|
14340 |
+
"node": "^14.13.1 || >=16.0.0"
|
14341 |
+
}
|
14342 |
+
},
|
14343 |
"node_modules/html-minifier-terser": {
|
14344 |
"version": "6.1.0",
|
14345 |
"resolved": "https://registry.npmmirror.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz",
|
|
|
19956 |
"node": "*"
|
19957 |
}
|
19958 |
},
|
19959 |
+
"node_modules/mri": {
|
19960 |
+
"version": "1.2.0",
|
19961 |
+
"resolved": "https://registry.npmmirror.com/mri/-/mri-1.2.0.tgz",
|
19962 |
+
"integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
|
19963 |
+
"dev": true,
|
19964 |
+
"peer": true,
|
19965 |
+
"engines": {
|
19966 |
+
"node": ">=4"
|
19967 |
+
}
|
19968 |
+
},
|
19969 |
"node_modules/ms": {
|
19970 |
"version": "2.1.2",
|
19971 |
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
|
|
|
23960 |
"node": ">= 0.10"
|
23961 |
}
|
23962 |
},
|
23963 |
+
"node_modules/remark": {
|
23964 |
+
"version": "14.0.3",
|
23965 |
+
"resolved": "https://registry.npmmirror.com/remark/-/remark-14.0.3.tgz",
|
23966 |
+
"integrity": "sha512-bfmJW1dmR2LvaMJuAnE88pZP9DktIFYXazkTfOIKZzi3Knk9lT0roItIA24ydOucI3bV/g/tXBA6hzqq3FV9Ew==",
|
23967 |
+
"dev": true,
|
23968 |
+
"peer": true,
|
23969 |
+
"dependencies": {
|
23970 |
+
"@types/mdast": "^3.0.0",
|
23971 |
+
"remark-parse": "^10.0.0",
|
23972 |
+
"remark-stringify": "^10.0.0",
|
23973 |
+
"unified": "^10.0.0"
|
23974 |
+
},
|
23975 |
+
"funding": {
|
23976 |
+
"type": "opencollective",
|
23977 |
+
"url": "https://opencollective.com/unified"
|
23978 |
+
}
|
23979 |
+
},
|
23980 |
"node_modules/remark-gfm": {
|
23981 |
"version": "4.0.0",
|
23982 |
"resolved": "https://registry.npmmirror.com/remark-gfm/-/remark-gfm-4.0.0.tgz",
|
|
|
23990 |
"unified": "^11.0.0"
|
23991 |
}
|
23992 |
},
|
23993 |
+
"node_modules/remark-loader": {
|
23994 |
+
"version": "6.0.0",
|
23995 |
+
"resolved": "https://registry.npmmirror.com/remark-loader/-/remark-loader-6.0.0.tgz",
|
23996 |
+
"integrity": "sha512-3Z4WLyVYbI1F6TQNnA9/iuHsoRcu8ruH2ABixLpgSWiSiYdNgURgLdpbdze8jTm2+VWWcAq9xIH7maWSpi2sSw==",
|
23997 |
+
"dev": true,
|
23998 |
+
"dependencies": {
|
23999 |
+
"front-matter": "^4.0.2"
|
24000 |
+
},
|
24001 |
+
"engines": {
|
24002 |
+
"node": ">= 18.12.0"
|
24003 |
+
},
|
24004 |
+
"funding": {
|
24005 |
+
"type": "opencollective",
|
24006 |
+
"url": "https://opencollective.com/webpack"
|
24007 |
+
},
|
24008 |
+
"peerDependencies": {
|
24009 |
+
"remark": "^14.0.0",
|
24010 |
+
"webpack": "^5.0.0"
|
24011 |
+
}
|
24012 |
+
},
|
24013 |
"node_modules/remark-parse": {
|
24014 |
"version": "11.0.0",
|
24015 |
"resolved": "https://registry.npmmirror.com/remark-parse/-/remark-parse-11.0.0.tgz",
|
|
|
24043 |
"unified": "^11.0.0"
|
24044 |
}
|
24045 |
},
|
24046 |
+
"node_modules/remark/node_modules/@types/mdast": {
|
24047 |
+
"version": "3.0.15",
|
24048 |
+
"resolved": "https://registry.npmmirror.com/@types/mdast/-/mdast-3.0.15.tgz",
|
24049 |
+
"integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==",
|
24050 |
+
"dev": true,
|
24051 |
+
"peer": true,
|
24052 |
+
"dependencies": {
|
24053 |
+
"@types/unist": "^2"
|
24054 |
+
}
|
24055 |
+
},
|
24056 |
+
"node_modules/remark/node_modules/@types/unist": {
|
24057 |
+
"version": "2.0.11",
|
24058 |
+
"resolved": "https://registry.npmmirror.com/@types/unist/-/unist-2.0.11.tgz",
|
24059 |
+
"integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
|
24060 |
+
"dev": true,
|
24061 |
+
"peer": true
|
24062 |
+
},
|
24063 |
+
"node_modules/remark/node_modules/is-buffer": {
|
24064 |
+
"version": "2.0.5",
|
24065 |
+
"resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-2.0.5.tgz",
|
24066 |
+
"integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
|
24067 |
+
"dev": true,
|
24068 |
+
"funding": [
|
24069 |
+
{
|
24070 |
+
"type": "github",
|
24071 |
+
"url": "https://github.com/sponsors/feross"
|
24072 |
+
},
|
24073 |
+
{
|
24074 |
+
"type": "patreon",
|
24075 |
+
"url": "https://www.patreon.com/feross"
|
24076 |
+
},
|
24077 |
+
{
|
24078 |
+
"type": "consulting",
|
24079 |
+
"url": "https://feross.org/support"
|
24080 |
+
}
|
24081 |
+
],
|
24082 |
+
"peer": true,
|
24083 |
+
"engines": {
|
24084 |
+
"node": ">=4"
|
24085 |
+
}
|
24086 |
+
},
|
24087 |
+
"node_modules/remark/node_modules/mdast-util-from-markdown": {
|
24088 |
+
"version": "1.3.1",
|
24089 |
+
"resolved": "https://registry.npmmirror.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz",
|
24090 |
+
"integrity": "sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==",
|
24091 |
+
"dev": true,
|
24092 |
+
"peer": true,
|
24093 |
+
"dependencies": {
|
24094 |
+
"@types/mdast": "^3.0.0",
|
24095 |
+
"@types/unist": "^2.0.0",
|
24096 |
+
"decode-named-character-reference": "^1.0.0",
|
24097 |
+
"mdast-util-to-string": "^3.1.0",
|
24098 |
+
"micromark": "^3.0.0",
|
24099 |
+
"micromark-util-decode-numeric-character-reference": "^1.0.0",
|
24100 |
+
"micromark-util-decode-string": "^1.0.0",
|
24101 |
+
"micromark-util-normalize-identifier": "^1.0.0",
|
24102 |
+
"micromark-util-symbol": "^1.0.0",
|
24103 |
+
"micromark-util-types": "^1.0.0",
|
24104 |
+
"unist-util-stringify-position": "^3.0.0",
|
24105 |
+
"uvu": "^0.5.0"
|
24106 |
+
},
|
24107 |
+
"funding": {
|
24108 |
+
"type": "opencollective",
|
24109 |
+
"url": "https://opencollective.com/unified"
|
24110 |
+
}
|
24111 |
+
},
|
24112 |
+
"node_modules/remark/node_modules/mdast-util-phrasing": {
|
24113 |
+
"version": "3.0.1",
|
24114 |
+
"resolved": "https://registry.npmmirror.com/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz",
|
24115 |
+
"integrity": "sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==",
|
24116 |
+
"dev": true,
|
24117 |
+
"peer": true,
|
24118 |
+
"dependencies": {
|
24119 |
+
"@types/mdast": "^3.0.0",
|
24120 |
+
"unist-util-is": "^5.0.0"
|
24121 |
+
},
|
24122 |
+
"funding": {
|
24123 |
+
"type": "opencollective",
|
24124 |
+
"url": "https://opencollective.com/unified"
|
24125 |
+
}
|
24126 |
+
},
|
24127 |
+
"node_modules/remark/node_modules/mdast-util-to-markdown": {
|
24128 |
+
"version": "1.5.0",
|
24129 |
+
"resolved": "https://registry.npmmirror.com/mdast-util-to-markdown/-/mdast-util-to-markdown-1.5.0.tgz",
|
24130 |
+
"integrity": "sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==",
|
24131 |
+
"dev": true,
|
24132 |
+
"peer": true,
|
24133 |
+
"dependencies": {
|
24134 |
+
"@types/mdast": "^3.0.0",
|
24135 |
+
"@types/unist": "^2.0.0",
|
24136 |
+
"longest-streak": "^3.0.0",
|
24137 |
+
"mdast-util-phrasing": "^3.0.0",
|
24138 |
+
"mdast-util-to-string": "^3.0.0",
|
24139 |
+
"micromark-util-decode-string": "^1.0.0",
|
24140 |
+
"unist-util-visit": "^4.0.0",
|
24141 |
+
"zwitch": "^2.0.0"
|
24142 |
+
},
|
24143 |
+
"funding": {
|
24144 |
+
"type": "opencollective",
|
24145 |
+
"url": "https://opencollective.com/unified"
|
24146 |
+
}
|
24147 |
+
},
|
24148 |
+
"node_modules/remark/node_modules/mdast-util-to-string": {
|
24149 |
+
"version": "3.2.0",
|
24150 |
+
"resolved": "https://registry.npmmirror.com/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz",
|
24151 |
+
"integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==",
|
24152 |
+
"dev": true,
|
24153 |
+
"peer": true,
|
24154 |
+
"dependencies": {
|
24155 |
+
"@types/mdast": "^3.0.0"
|
24156 |
+
},
|
24157 |
+
"funding": {
|
24158 |
+
"type": "opencollective",
|
24159 |
+
"url": "https://opencollective.com/unified"
|
24160 |
+
}
|
24161 |
+
},
|
24162 |
+
"node_modules/remark/node_modules/micromark": {
|
24163 |
+
"version": "3.2.0",
|
24164 |
+
"resolved": "https://registry.npmmirror.com/micromark/-/micromark-3.2.0.tgz",
|
24165 |
+
"integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==",
|
24166 |
+
"dev": true,
|
24167 |
+
"funding": [
|
24168 |
+
{
|
24169 |
+
"type": "GitHub Sponsors",
|
24170 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24171 |
+
},
|
24172 |
+
{
|
24173 |
+
"type": "OpenCollective",
|
24174 |
+
"url": "https://opencollective.com/unified"
|
24175 |
+
}
|
24176 |
+
],
|
24177 |
+
"peer": true,
|
24178 |
+
"dependencies": {
|
24179 |
+
"@types/debug": "^4.0.0",
|
24180 |
+
"debug": "^4.0.0",
|
24181 |
+
"decode-named-character-reference": "^1.0.0",
|
24182 |
+
"micromark-core-commonmark": "^1.0.1",
|
24183 |
+
"micromark-factory-space": "^1.0.0",
|
24184 |
+
"micromark-util-character": "^1.0.0",
|
24185 |
+
"micromark-util-chunked": "^1.0.0",
|
24186 |
+
"micromark-util-combine-extensions": "^1.0.0",
|
24187 |
+
"micromark-util-decode-numeric-character-reference": "^1.0.0",
|
24188 |
+
"micromark-util-encode": "^1.0.0",
|
24189 |
+
"micromark-util-normalize-identifier": "^1.0.0",
|
24190 |
+
"micromark-util-resolve-all": "^1.0.0",
|
24191 |
+
"micromark-util-sanitize-uri": "^1.0.0",
|
24192 |
+
"micromark-util-subtokenize": "^1.0.0",
|
24193 |
+
"micromark-util-symbol": "^1.0.0",
|
24194 |
+
"micromark-util-types": "^1.0.1",
|
24195 |
+
"uvu": "^0.5.0"
|
24196 |
+
}
|
24197 |
+
},
|
24198 |
+
"node_modules/remark/node_modules/micromark-core-commonmark": {
|
24199 |
+
"version": "1.1.0",
|
24200 |
+
"resolved": "https://registry.npmmirror.com/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz",
|
24201 |
+
"integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==",
|
24202 |
+
"dev": true,
|
24203 |
+
"funding": [
|
24204 |
+
{
|
24205 |
+
"type": "GitHub Sponsors",
|
24206 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24207 |
+
},
|
24208 |
+
{
|
24209 |
+
"type": "OpenCollective",
|
24210 |
+
"url": "https://opencollective.com/unified"
|
24211 |
+
}
|
24212 |
+
],
|
24213 |
+
"peer": true,
|
24214 |
+
"dependencies": {
|
24215 |
+
"decode-named-character-reference": "^1.0.0",
|
24216 |
+
"micromark-factory-destination": "^1.0.0",
|
24217 |
+
"micromark-factory-label": "^1.0.0",
|
24218 |
+
"micromark-factory-space": "^1.0.0",
|
24219 |
+
"micromark-factory-title": "^1.0.0",
|
24220 |
+
"micromark-factory-whitespace": "^1.0.0",
|
24221 |
+
"micromark-util-character": "^1.0.0",
|
24222 |
+
"micromark-util-chunked": "^1.0.0",
|
24223 |
+
"micromark-util-classify-character": "^1.0.0",
|
24224 |
+
"micromark-util-html-tag-name": "^1.0.0",
|
24225 |
+
"micromark-util-normalize-identifier": "^1.0.0",
|
24226 |
+
"micromark-util-resolve-all": "^1.0.0",
|
24227 |
+
"micromark-util-subtokenize": "^1.0.0",
|
24228 |
+
"micromark-util-symbol": "^1.0.0",
|
24229 |
+
"micromark-util-types": "^1.0.1",
|
24230 |
+
"uvu": "^0.5.0"
|
24231 |
+
}
|
24232 |
+
},
|
24233 |
+
"node_modules/remark/node_modules/micromark-factory-destination": {
|
24234 |
+
"version": "1.1.0",
|
24235 |
+
"resolved": "https://registry.npmmirror.com/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz",
|
24236 |
+
"integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==",
|
24237 |
+
"dev": true,
|
24238 |
+
"funding": [
|
24239 |
+
{
|
24240 |
+
"type": "GitHub Sponsors",
|
24241 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24242 |
+
},
|
24243 |
+
{
|
24244 |
+
"type": "OpenCollective",
|
24245 |
+
"url": "https://opencollective.com/unified"
|
24246 |
+
}
|
24247 |
+
],
|
24248 |
+
"peer": true,
|
24249 |
+
"dependencies": {
|
24250 |
+
"micromark-util-character": "^1.0.0",
|
24251 |
+
"micromark-util-symbol": "^1.0.0",
|
24252 |
+
"micromark-util-types": "^1.0.0"
|
24253 |
+
}
|
24254 |
+
},
|
24255 |
+
"node_modules/remark/node_modules/micromark-factory-label": {
|
24256 |
+
"version": "1.1.0",
|
24257 |
+
"resolved": "https://registry.npmmirror.com/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz",
|
24258 |
+
"integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==",
|
24259 |
+
"dev": true,
|
24260 |
+
"funding": [
|
24261 |
+
{
|
24262 |
+
"type": "GitHub Sponsors",
|
24263 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24264 |
+
},
|
24265 |
+
{
|
24266 |
+
"type": "OpenCollective",
|
24267 |
+
"url": "https://opencollective.com/unified"
|
24268 |
+
}
|
24269 |
+
],
|
24270 |
+
"peer": true,
|
24271 |
+
"dependencies": {
|
24272 |
+
"micromark-util-character": "^1.0.0",
|
24273 |
+
"micromark-util-symbol": "^1.0.0",
|
24274 |
+
"micromark-util-types": "^1.0.0",
|
24275 |
+
"uvu": "^0.5.0"
|
24276 |
+
}
|
24277 |
+
},
|
24278 |
+
"node_modules/remark/node_modules/micromark-factory-space": {
|
24279 |
+
"version": "1.1.0",
|
24280 |
+
"resolved": "https://registry.npmmirror.com/micromark-factory-space/-/micromark-factory-space-1.1.0.tgz",
|
24281 |
+
"integrity": "sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==",
|
24282 |
+
"dev": true,
|
24283 |
+
"funding": [
|
24284 |
+
{
|
24285 |
+
"type": "GitHub Sponsors",
|
24286 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24287 |
+
},
|
24288 |
+
{
|
24289 |
+
"type": "OpenCollective",
|
24290 |
+
"url": "https://opencollective.com/unified"
|
24291 |
+
}
|
24292 |
+
],
|
24293 |
+
"peer": true,
|
24294 |
+
"dependencies": {
|
24295 |
+
"micromark-util-character": "^1.0.0",
|
24296 |
+
"micromark-util-types": "^1.0.0"
|
24297 |
+
}
|
24298 |
+
},
|
24299 |
+
"node_modules/remark/node_modules/micromark-factory-title": {
|
24300 |
+
"version": "1.1.0",
|
24301 |
+
"resolved": "https://registry.npmmirror.com/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz",
|
24302 |
+
"integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==",
|
24303 |
+
"dev": true,
|
24304 |
+
"funding": [
|
24305 |
+
{
|
24306 |
+
"type": "GitHub Sponsors",
|
24307 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24308 |
+
},
|
24309 |
+
{
|
24310 |
+
"type": "OpenCollective",
|
24311 |
+
"url": "https://opencollective.com/unified"
|
24312 |
+
}
|
24313 |
+
],
|
24314 |
+
"peer": true,
|
24315 |
+
"dependencies": {
|
24316 |
+
"micromark-factory-space": "^1.0.0",
|
24317 |
+
"micromark-util-character": "^1.0.0",
|
24318 |
+
"micromark-util-symbol": "^1.0.0",
|
24319 |
+
"micromark-util-types": "^1.0.0"
|
24320 |
+
}
|
24321 |
+
},
|
24322 |
+
"node_modules/remark/node_modules/micromark-factory-whitespace": {
|
24323 |
+
"version": "1.1.0",
|
24324 |
+
"resolved": "https://registry.npmmirror.com/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz",
|
24325 |
+
"integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==",
|
24326 |
+
"dev": true,
|
24327 |
+
"funding": [
|
24328 |
+
{
|
24329 |
+
"type": "GitHub Sponsors",
|
24330 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24331 |
+
},
|
24332 |
+
{
|
24333 |
+
"type": "OpenCollective",
|
24334 |
+
"url": "https://opencollective.com/unified"
|
24335 |
+
}
|
24336 |
+
],
|
24337 |
+
"peer": true,
|
24338 |
+
"dependencies": {
|
24339 |
+
"micromark-factory-space": "^1.0.0",
|
24340 |
+
"micromark-util-character": "^1.0.0",
|
24341 |
+
"micromark-util-symbol": "^1.0.0",
|
24342 |
+
"micromark-util-types": "^1.0.0"
|
24343 |
+
}
|
24344 |
+
},
|
24345 |
+
"node_modules/remark/node_modules/micromark-util-character": {
|
24346 |
+
"version": "1.2.0",
|
24347 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-character/-/micromark-util-character-1.2.0.tgz",
|
24348 |
+
"integrity": "sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==",
|
24349 |
+
"dev": true,
|
24350 |
+
"funding": [
|
24351 |
+
{
|
24352 |
+
"type": "GitHub Sponsors",
|
24353 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24354 |
+
},
|
24355 |
+
{
|
24356 |
+
"type": "OpenCollective",
|
24357 |
+
"url": "https://opencollective.com/unified"
|
24358 |
+
}
|
24359 |
+
],
|
24360 |
+
"peer": true,
|
24361 |
+
"dependencies": {
|
24362 |
+
"micromark-util-symbol": "^1.0.0",
|
24363 |
+
"micromark-util-types": "^1.0.0"
|
24364 |
+
}
|
24365 |
+
},
|
24366 |
+
"node_modules/remark/node_modules/micromark-util-chunked": {
|
24367 |
+
"version": "1.1.0",
|
24368 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz",
|
24369 |
+
"integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==",
|
24370 |
+
"dev": true,
|
24371 |
+
"funding": [
|
24372 |
+
{
|
24373 |
+
"type": "GitHub Sponsors",
|
24374 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24375 |
+
},
|
24376 |
+
{
|
24377 |
+
"type": "OpenCollective",
|
24378 |
+
"url": "https://opencollective.com/unified"
|
24379 |
+
}
|
24380 |
+
],
|
24381 |
+
"peer": true,
|
24382 |
+
"dependencies": {
|
24383 |
+
"micromark-util-symbol": "^1.0.0"
|
24384 |
+
}
|
24385 |
+
},
|
24386 |
+
"node_modules/remark/node_modules/micromark-util-classify-character": {
|
24387 |
+
"version": "1.1.0",
|
24388 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz",
|
24389 |
+
"integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==",
|
24390 |
+
"dev": true,
|
24391 |
+
"funding": [
|
24392 |
+
{
|
24393 |
+
"type": "GitHub Sponsors",
|
24394 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24395 |
+
},
|
24396 |
+
{
|
24397 |
+
"type": "OpenCollective",
|
24398 |
+
"url": "https://opencollective.com/unified"
|
24399 |
+
}
|
24400 |
+
],
|
24401 |
+
"peer": true,
|
24402 |
+
"dependencies": {
|
24403 |
+
"micromark-util-character": "^1.0.0",
|
24404 |
+
"micromark-util-symbol": "^1.0.0",
|
24405 |
+
"micromark-util-types": "^1.0.0"
|
24406 |
+
}
|
24407 |
+
},
|
24408 |
+
"node_modules/remark/node_modules/micromark-util-combine-extensions": {
|
24409 |
+
"version": "1.1.0",
|
24410 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz",
|
24411 |
+
"integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==",
|
24412 |
+
"dev": true,
|
24413 |
+
"funding": [
|
24414 |
+
{
|
24415 |
+
"type": "GitHub Sponsors",
|
24416 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24417 |
+
},
|
24418 |
+
{
|
24419 |
+
"type": "OpenCollective",
|
24420 |
+
"url": "https://opencollective.com/unified"
|
24421 |
+
}
|
24422 |
+
],
|
24423 |
+
"peer": true,
|
24424 |
+
"dependencies": {
|
24425 |
+
"micromark-util-chunked": "^1.0.0",
|
24426 |
+
"micromark-util-types": "^1.0.0"
|
24427 |
+
}
|
24428 |
+
},
|
24429 |
+
"node_modules/remark/node_modules/micromark-util-decode-numeric-character-reference": {
|
24430 |
+
"version": "1.1.0",
|
24431 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz",
|
24432 |
+
"integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==",
|
24433 |
+
"dev": true,
|
24434 |
+
"funding": [
|
24435 |
+
{
|
24436 |
+
"type": "GitHub Sponsors",
|
24437 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24438 |
+
},
|
24439 |
+
{
|
24440 |
+
"type": "OpenCollective",
|
24441 |
+
"url": "https://opencollective.com/unified"
|
24442 |
+
}
|
24443 |
+
],
|
24444 |
+
"peer": true,
|
24445 |
+
"dependencies": {
|
24446 |
+
"micromark-util-symbol": "^1.0.0"
|
24447 |
+
}
|
24448 |
+
},
|
24449 |
+
"node_modules/remark/node_modules/micromark-util-decode-string": {
|
24450 |
+
"version": "1.1.0",
|
24451 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz",
|
24452 |
+
"integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==",
|
24453 |
+
"dev": true,
|
24454 |
+
"funding": [
|
24455 |
+
{
|
24456 |
+
"type": "GitHub Sponsors",
|
24457 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24458 |
+
},
|
24459 |
+
{
|
24460 |
+
"type": "OpenCollective",
|
24461 |
+
"url": "https://opencollective.com/unified"
|
24462 |
+
}
|
24463 |
+
],
|
24464 |
+
"peer": true,
|
24465 |
+
"dependencies": {
|
24466 |
+
"decode-named-character-reference": "^1.0.0",
|
24467 |
+
"micromark-util-character": "^1.0.0",
|
24468 |
+
"micromark-util-decode-numeric-character-reference": "^1.0.0",
|
24469 |
+
"micromark-util-symbol": "^1.0.0"
|
24470 |
+
}
|
24471 |
+
},
|
24472 |
+
"node_modules/remark/node_modules/micromark-util-encode": {
|
24473 |
+
"version": "1.1.0",
|
24474 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz",
|
24475 |
+
"integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==",
|
24476 |
+
"dev": true,
|
24477 |
+
"funding": [
|
24478 |
+
{
|
24479 |
+
"type": "GitHub Sponsors",
|
24480 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24481 |
+
},
|
24482 |
+
{
|
24483 |
+
"type": "OpenCollective",
|
24484 |
+
"url": "https://opencollective.com/unified"
|
24485 |
+
}
|
24486 |
+
],
|
24487 |
+
"peer": true
|
24488 |
+
},
|
24489 |
+
"node_modules/remark/node_modules/micromark-util-html-tag-name": {
|
24490 |
+
"version": "1.2.0",
|
24491 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz",
|
24492 |
+
"integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==",
|
24493 |
+
"dev": true,
|
24494 |
+
"funding": [
|
24495 |
+
{
|
24496 |
+
"type": "GitHub Sponsors",
|
24497 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24498 |
+
},
|
24499 |
+
{
|
24500 |
+
"type": "OpenCollective",
|
24501 |
+
"url": "https://opencollective.com/unified"
|
24502 |
+
}
|
24503 |
+
],
|
24504 |
+
"peer": true
|
24505 |
+
},
|
24506 |
+
"node_modules/remark/node_modules/micromark-util-normalize-identifier": {
|
24507 |
+
"version": "1.1.0",
|
24508 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz",
|
24509 |
+
"integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==",
|
24510 |
+
"dev": true,
|
24511 |
+
"funding": [
|
24512 |
+
{
|
24513 |
+
"type": "GitHub Sponsors",
|
24514 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24515 |
+
},
|
24516 |
+
{
|
24517 |
+
"type": "OpenCollective",
|
24518 |
+
"url": "https://opencollective.com/unified"
|
24519 |
+
}
|
24520 |
+
],
|
24521 |
+
"peer": true,
|
24522 |
+
"dependencies": {
|
24523 |
+
"micromark-util-symbol": "^1.0.0"
|
24524 |
+
}
|
24525 |
+
},
|
24526 |
+
"node_modules/remark/node_modules/micromark-util-resolve-all": {
|
24527 |
+
"version": "1.1.0",
|
24528 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz",
|
24529 |
+
"integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==",
|
24530 |
+
"dev": true,
|
24531 |
+
"funding": [
|
24532 |
+
{
|
24533 |
+
"type": "GitHub Sponsors",
|
24534 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24535 |
+
},
|
24536 |
+
{
|
24537 |
+
"type": "OpenCollective",
|
24538 |
+
"url": "https://opencollective.com/unified"
|
24539 |
+
}
|
24540 |
+
],
|
24541 |
+
"peer": true,
|
24542 |
+
"dependencies": {
|
24543 |
+
"micromark-util-types": "^1.0.0"
|
24544 |
+
}
|
24545 |
+
},
|
24546 |
+
"node_modules/remark/node_modules/micromark-util-sanitize-uri": {
|
24547 |
+
"version": "1.2.0",
|
24548 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz",
|
24549 |
+
"integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==",
|
24550 |
+
"dev": true,
|
24551 |
+
"funding": [
|
24552 |
+
{
|
24553 |
+
"type": "GitHub Sponsors",
|
24554 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24555 |
+
},
|
24556 |
+
{
|
24557 |
+
"type": "OpenCollective",
|
24558 |
+
"url": "https://opencollective.com/unified"
|
24559 |
+
}
|
24560 |
+
],
|
24561 |
+
"peer": true,
|
24562 |
+
"dependencies": {
|
24563 |
+
"micromark-util-character": "^1.0.0",
|
24564 |
+
"micromark-util-encode": "^1.0.0",
|
24565 |
+
"micromark-util-symbol": "^1.0.0"
|
24566 |
+
}
|
24567 |
+
},
|
24568 |
+
"node_modules/remark/node_modules/micromark-util-subtokenize": {
|
24569 |
+
"version": "1.1.0",
|
24570 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz",
|
24571 |
+
"integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==",
|
24572 |
+
"dev": true,
|
24573 |
+
"funding": [
|
24574 |
+
{
|
24575 |
+
"type": "GitHub Sponsors",
|
24576 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24577 |
+
},
|
24578 |
+
{
|
24579 |
+
"type": "OpenCollective",
|
24580 |
+
"url": "https://opencollective.com/unified"
|
24581 |
+
}
|
24582 |
+
],
|
24583 |
+
"peer": true,
|
24584 |
+
"dependencies": {
|
24585 |
+
"micromark-util-chunked": "^1.0.0",
|
24586 |
+
"micromark-util-symbol": "^1.0.0",
|
24587 |
+
"micromark-util-types": "^1.0.0",
|
24588 |
+
"uvu": "^0.5.0"
|
24589 |
+
}
|
24590 |
+
},
|
24591 |
+
"node_modules/remark/node_modules/micromark-util-symbol": {
|
24592 |
+
"version": "1.1.0",
|
24593 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-symbol/-/micromark-util-symbol-1.1.0.tgz",
|
24594 |
+
"integrity": "sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==",
|
24595 |
+
"dev": true,
|
24596 |
+
"funding": [
|
24597 |
+
{
|
24598 |
+
"type": "GitHub Sponsors",
|
24599 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24600 |
+
},
|
24601 |
+
{
|
24602 |
+
"type": "OpenCollective",
|
24603 |
+
"url": "https://opencollective.com/unified"
|
24604 |
+
}
|
24605 |
+
],
|
24606 |
+
"peer": true
|
24607 |
+
},
|
24608 |
+
"node_modules/remark/node_modules/micromark-util-types": {
|
24609 |
+
"version": "1.1.0",
|
24610 |
+
"resolved": "https://registry.npmmirror.com/micromark-util-types/-/micromark-util-types-1.1.0.tgz",
|
24611 |
+
"integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==",
|
24612 |
+
"dev": true,
|
24613 |
+
"funding": [
|
24614 |
+
{
|
24615 |
+
"type": "GitHub Sponsors",
|
24616 |
+
"url": "https://github.com/sponsors/unifiedjs"
|
24617 |
+
},
|
24618 |
+
{
|
24619 |
+
"type": "OpenCollective",
|
24620 |
+
"url": "https://opencollective.com/unified"
|
24621 |
+
}
|
24622 |
+
],
|
24623 |
+
"peer": true
|
24624 |
+
},
|
24625 |
+
"node_modules/remark/node_modules/remark-parse": {
|
24626 |
+
"version": "10.0.2",
|
24627 |
+
"resolved": "https://registry.npmmirror.com/remark-parse/-/remark-parse-10.0.2.tgz",
|
24628 |
+
"integrity": "sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==",
|
24629 |
+
"dev": true,
|
24630 |
+
"peer": true,
|
24631 |
+
"dependencies": {
|
24632 |
+
"@types/mdast": "^3.0.0",
|
24633 |
+
"mdast-util-from-markdown": "^1.0.0",
|
24634 |
+
"unified": "^10.0.0"
|
24635 |
+
},
|
24636 |
+
"funding": {
|
24637 |
+
"type": "opencollective",
|
24638 |
+
"url": "https://opencollective.com/unified"
|
24639 |
+
}
|
24640 |
+
},
|
24641 |
+
"node_modules/remark/node_modules/remark-stringify": {
|
24642 |
+
"version": "10.0.3",
|
24643 |
+
"resolved": "https://registry.npmmirror.com/remark-stringify/-/remark-stringify-10.0.3.tgz",
|
24644 |
+
"integrity": "sha512-koyOzCMYoUHudypbj4XpnAKFbkddRMYZHwghnxd7ue5210WzGw6kOBwauJTRUMq16jsovXx8dYNvSSWP89kZ3A==",
|
24645 |
+
"dev": true,
|
24646 |
+
"peer": true,
|
24647 |
+
"dependencies": {
|
24648 |
+
"@types/mdast": "^3.0.0",
|
24649 |
+
"mdast-util-to-markdown": "^1.0.0",
|
24650 |
+
"unified": "^10.0.0"
|
24651 |
+
},
|
24652 |
+
"funding": {
|
24653 |
+
"type": "opencollective",
|
24654 |
+
"url": "https://opencollective.com/unified"
|
24655 |
+
}
|
24656 |
+
},
|
24657 |
+
"node_modules/remark/node_modules/unified": {
|
24658 |
+
"version": "10.1.2",
|
24659 |
+
"resolved": "https://registry.npmmirror.com/unified/-/unified-10.1.2.tgz",
|
24660 |
+
"integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==",
|
24661 |
+
"dev": true,
|
24662 |
+
"peer": true,
|
24663 |
+
"dependencies": {
|
24664 |
+
"@types/unist": "^2.0.0",
|
24665 |
+
"bail": "^2.0.0",
|
24666 |
+
"extend": "^3.0.0",
|
24667 |
+
"is-buffer": "^2.0.0",
|
24668 |
+
"is-plain-obj": "^4.0.0",
|
24669 |
+
"trough": "^2.0.0",
|
24670 |
+
"vfile": "^5.0.0"
|
24671 |
+
},
|
24672 |
+
"funding": {
|
24673 |
+
"type": "opencollective",
|
24674 |
+
"url": "https://opencollective.com/unified"
|
24675 |
+
}
|
24676 |
+
},
|
24677 |
+
"node_modules/remark/node_modules/unist-util-is": {
|
24678 |
+
"version": "5.2.1",
|
24679 |
+
"resolved": "https://registry.npmmirror.com/unist-util-is/-/unist-util-is-5.2.1.tgz",
|
24680 |
+
"integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==",
|
24681 |
+
"dev": true,
|
24682 |
+
"peer": true,
|
24683 |
+
"dependencies": {
|
24684 |
+
"@types/unist": "^2.0.0"
|
24685 |
+
},
|
24686 |
+
"funding": {
|
24687 |
+
"type": "opencollective",
|
24688 |
+
"url": "https://opencollective.com/unified"
|
24689 |
+
}
|
24690 |
+
},
|
24691 |
+
"node_modules/remark/node_modules/unist-util-stringify-position": {
|
24692 |
+
"version": "3.0.3",
|
24693 |
+
"resolved": "https://registry.npmmirror.com/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz",
|
24694 |
+
"integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==",
|
24695 |
+
"dev": true,
|
24696 |
+
"peer": true,
|
24697 |
+
"dependencies": {
|
24698 |
+
"@types/unist": "^2.0.0"
|
24699 |
+
},
|
24700 |
+
"funding": {
|
24701 |
+
"type": "opencollective",
|
24702 |
+
"url": "https://opencollective.com/unified"
|
24703 |
+
}
|
24704 |
+
},
|
24705 |
+
"node_modules/remark/node_modules/unist-util-visit": {
|
24706 |
+
"version": "4.1.2",
|
24707 |
+
"resolved": "https://registry.npmmirror.com/unist-util-visit/-/unist-util-visit-4.1.2.tgz",
|
24708 |
+
"integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==",
|
24709 |
+
"dev": true,
|
24710 |
+
"peer": true,
|
24711 |
+
"dependencies": {
|
24712 |
+
"@types/unist": "^2.0.0",
|
24713 |
+
"unist-util-is": "^5.0.0",
|
24714 |
+
"unist-util-visit-parents": "^5.1.1"
|
24715 |
+
},
|
24716 |
+
"funding": {
|
24717 |
+
"type": "opencollective",
|
24718 |
+
"url": "https://opencollective.com/unified"
|
24719 |
+
}
|
24720 |
+
},
|
24721 |
+
"node_modules/remark/node_modules/unist-util-visit-parents": {
|
24722 |
+
"version": "5.1.3",
|
24723 |
+
"resolved": "https://registry.npmmirror.com/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz",
|
24724 |
+
"integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==",
|
24725 |
+
"dev": true,
|
24726 |
+
"peer": true,
|
24727 |
+
"dependencies": {
|
24728 |
+
"@types/unist": "^2.0.0",
|
24729 |
+
"unist-util-is": "^5.0.0"
|
24730 |
+
},
|
24731 |
+
"funding": {
|
24732 |
+
"type": "opencollective",
|
24733 |
+
"url": "https://opencollective.com/unified"
|
24734 |
+
}
|
24735 |
+
},
|
24736 |
+
"node_modules/remark/node_modules/vfile": {
|
24737 |
+
"version": "5.3.7",
|
24738 |
+
"resolved": "https://registry.npmmirror.com/vfile/-/vfile-5.3.7.tgz",
|
24739 |
+
"integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==",
|
24740 |
+
"dev": true,
|
24741 |
+
"peer": true,
|
24742 |
+
"dependencies": {
|
24743 |
+
"@types/unist": "^2.0.0",
|
24744 |
+
"is-buffer": "^2.0.0",
|
24745 |
+
"unist-util-stringify-position": "^3.0.0",
|
24746 |
+
"vfile-message": "^3.0.0"
|
24747 |
+
},
|
24748 |
+
"funding": {
|
24749 |
+
"type": "opencollective",
|
24750 |
+
"url": "https://opencollective.com/unified"
|
24751 |
+
}
|
24752 |
+
},
|
24753 |
+
"node_modules/remark/node_modules/vfile-message": {
|
24754 |
+
"version": "3.1.4",
|
24755 |
+
"resolved": "https://registry.npmmirror.com/vfile-message/-/vfile-message-3.1.4.tgz",
|
24756 |
+
"integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==",
|
24757 |
+
"dev": true,
|
24758 |
+
"peer": true,
|
24759 |
+
"dependencies": {
|
24760 |
+
"@types/unist": "^2.0.0",
|
24761 |
+
"unist-util-stringify-position": "^3.0.0"
|
24762 |
+
},
|
24763 |
+
"funding": {
|
24764 |
+
"type": "opencollective",
|
24765 |
+
"url": "https://opencollective.com/unified"
|
24766 |
+
}
|
24767 |
+
},
|
24768 |
"node_modules/remove-accents": {
|
24769 |
"version": "0.4.2",
|
24770 |
"resolved": "https://registry.npmmirror.com/remove-accents/-/remove-accents-0.4.2.tgz",
|
|
|
25018 |
"queue-microtask": "^1.2.2"
|
25019 |
}
|
25020 |
},
|
25021 |
+
"node_modules/sade": {
|
25022 |
+
"version": "1.8.1",
|
25023 |
+
"resolved": "https://registry.npmmirror.com/sade/-/sade-1.8.1.tgz",
|
25024 |
+
"integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
|
25025 |
+
"dev": true,
|
25026 |
+
"peer": true,
|
25027 |
+
"dependencies": {
|
25028 |
+
"mri": "^1.1.0"
|
25029 |
+
},
|
25030 |
+
"engines": {
|
25031 |
+
"node": ">=6"
|
25032 |
+
}
|
25033 |
+
},
|
25034 |
"node_modules/safe-array-concat": {
|
25035 |
"version": "1.1.2",
|
25036 |
"resolved": "https://registry.npmmirror.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
|
|
|
27677 |
"uuid": "dist/bin/uuid"
|
27678 |
}
|
27679 |
},
|
27680 |
+
"node_modules/uvu": {
|
27681 |
+
"version": "0.5.6",
|
27682 |
+
"resolved": "https://registry.npmmirror.com/uvu/-/uvu-0.5.6.tgz",
|
27683 |
+
"integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==",
|
27684 |
+
"dev": true,
|
27685 |
+
"peer": true,
|
27686 |
+
"dependencies": {
|
27687 |
+
"dequal": "^2.0.0",
|
27688 |
+
"diff": "^5.0.0",
|
27689 |
+
"kleur": "^4.0.3",
|
27690 |
+
"sade": "^1.7.3"
|
27691 |
+
},
|
27692 |
+
"bin": {
|
27693 |
+
"uvu": "bin.js"
|
27694 |
+
},
|
27695 |
+
"engines": {
|
27696 |
+
"node": ">=8"
|
27697 |
+
}
|
27698 |
+
},
|
27699 |
+
"node_modules/uvu/node_modules/diff": {
|
27700 |
+
"version": "5.2.0",
|
27701 |
+
"resolved": "https://registry.npmmirror.com/diff/-/diff-5.2.0.tgz",
|
27702 |
+
"integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
|
27703 |
+
"dev": true,
|
27704 |
+
"peer": true,
|
27705 |
+
"engines": {
|
27706 |
+
"node": ">=0.3.1"
|
27707 |
+
}
|
27708 |
+
},
|
27709 |
+
"node_modules/uvu/node_modules/kleur": {
|
27710 |
+
"version": "4.1.5",
|
27711 |
+
"resolved": "https://registry.npmmirror.com/kleur/-/kleur-4.1.5.tgz",
|
27712 |
+
"integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
|
27713 |
+
"dev": true,
|
27714 |
+
"peer": true,
|
27715 |
+
"engines": {
|
27716 |
+
"node": ">=6"
|
27717 |
+
}
|
27718 |
+
},
|
27719 |
"node_modules/v8-compile-cache": {
|
27720 |
"version": "2.4.0",
|
27721 |
"resolved": "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz",
|
web/package.json
CHANGED
@@ -78,6 +78,7 @@
|
|
78 |
"@umijs/lint": "^4.1.1",
|
79 |
"@umijs/plugins": "^4.1.0",
|
80 |
"cross-env": "^7.0.3",
|
|
|
81 |
"husky": "^9.0.11",
|
82 |
"jest": "^29.7.0",
|
83 |
"jest-environment-jsdom": "^29.7.0",
|
@@ -86,6 +87,7 @@
|
|
86 |
"prettier-plugin-organize-imports": "^3.2.4",
|
87 |
"prettier-plugin-packagejson": "^2.4.9",
|
88 |
"react-dev-inspector": "^2.0.1",
|
|
|
89 |
"ts-node": "^10.9.2",
|
90 |
"typescript": "^5.0.3",
|
91 |
"umi-plugin-icons": "^0.1.1"
|
|
|
78 |
"@umijs/lint": "^4.1.1",
|
79 |
"@umijs/plugins": "^4.1.0",
|
80 |
"cross-env": "^7.0.3",
|
81 |
+
"html-loader": "^5.1.0",
|
82 |
"husky": "^9.0.11",
|
83 |
"jest": "^29.7.0",
|
84 |
"jest-environment-jsdom": "^29.7.0",
|
|
|
87 |
"prettier-plugin-organize-imports": "^3.2.4",
|
88 |
"prettier-plugin-packagejson": "^2.4.9",
|
89 |
"react-dev-inspector": "^2.0.1",
|
90 |
+
"remark-loader": "^6.0.0",
|
91 |
"ts-node": "^10.9.2",
|
92 |
"typescript": "^5.0.3",
|
93 |
"umi-plugin-icons": "^0.1.1"
|
web/src/assets/svg/api.svg
ADDED
|
web/src/components/api-service/chat-api-key-modal/index.tsx
CHANGED
@@ -12,9 +12,9 @@ const ChatApiKeyModal = ({
|
|
12 |
dialogId,
|
13 |
hideModal,
|
14 |
idKey,
|
15 |
-
}: IModalProps<any> & { dialogId
|
16 |
const { createToken, removeToken, tokenList, listLoading, creatingLoading } =
|
17 |
-
useOperateApiKey(
|
18 |
const { t } = useTranslate('chat');
|
19 |
|
20 |
const columns: TableProps<IToken>['columns'] = [
|
@@ -36,9 +36,7 @@ const ChatApiKeyModal = ({
|
|
36 |
render: (_, record) => (
|
37 |
<Space size="middle">
|
38 |
<CopyToClipboard text={record.token}></CopyToClipboard>
|
39 |
-
<DeleteOutlined
|
40 |
-
onClick={() => removeToken(record.token, record.tenant_id)}
|
41 |
-
/>
|
42 |
</Space>
|
43 |
),
|
44 |
},
|
@@ -60,8 +58,13 @@ const ChatApiKeyModal = ({
|
|
60 |
dataSource={tokenList}
|
61 |
rowKey={'token'}
|
62 |
loading={listLoading}
|
|
|
63 |
/>
|
64 |
-
<Button
|
|
|
|
|
|
|
|
|
65 |
{t('createNewKey')}
|
66 |
</Button>
|
67 |
</Modal>
|
|
|
12 |
dialogId,
|
13 |
hideModal,
|
14 |
idKey,
|
15 |
+
}: IModalProps<any> & { dialogId?: string; idKey: string }) => {
|
16 |
const { createToken, removeToken, tokenList, listLoading, creatingLoading } =
|
17 |
+
useOperateApiKey(idKey, dialogId);
|
18 |
const { t } = useTranslate('chat');
|
19 |
|
20 |
const columns: TableProps<IToken>['columns'] = [
|
|
|
36 |
render: (_, record) => (
|
37 |
<Space size="middle">
|
38 |
<CopyToClipboard text={record.token}></CopyToClipboard>
|
39 |
+
<DeleteOutlined onClick={() => removeToken(record.token)} />
|
|
|
|
|
40 |
</Space>
|
41 |
),
|
42 |
},
|
|
|
58 |
dataSource={tokenList}
|
59 |
rowKey={'token'}
|
60 |
loading={listLoading}
|
61 |
+
pagination={false}
|
62 |
/>
|
63 |
+
<Button
|
64 |
+
onClick={createToken}
|
65 |
+
loading={creatingLoading}
|
66 |
+
disabled={tokenList.length > 0}
|
67 |
+
>
|
68 |
{t('createNewKey')}
|
69 |
</Button>
|
70 |
</Modal>
|
web/src/components/api-service/chat-overview-modal/api-content.tsx
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import HightLightMarkdown from '@/components/highlight-markdown';
|
2 |
+
import { useSetModalState, useTranslate } from '@/hooks/common-hooks';
|
3 |
+
import { Button, Card, Flex, Space } from 'antd';
|
4 |
+
import apiDoc from '../../../../../docs/references/api.md';
|
5 |
+
import ChatApiKeyModal from '../chat-api-key-modal';
|
6 |
+
import EmbedModal from '../embed-modal';
|
7 |
+
import { usePreviewChat, useShowEmbedModal } from '../hooks';
|
8 |
+
import BackendServiceApi from './backend-service-api';
|
9 |
+
|
10 |
+
const ApiContent = ({
|
11 |
+
id,
|
12 |
+
idKey,
|
13 |
+
hideChatPreviewCard = false,
|
14 |
+
}: {
|
15 |
+
id?: string;
|
16 |
+
idKey: string;
|
17 |
+
hideChatPreviewCard?: boolean;
|
18 |
+
}) => {
|
19 |
+
const { t } = useTranslate('chat');
|
20 |
+
const {
|
21 |
+
visible: apiKeyVisible,
|
22 |
+
hideModal: hideApiKeyModal,
|
23 |
+
showModal: showApiKeyModal,
|
24 |
+
} = useSetModalState();
|
25 |
+
const { embedVisible, hideEmbedModal, showEmbedModal, embedToken } =
|
26 |
+
useShowEmbedModal(idKey, id);
|
27 |
+
|
28 |
+
const { handlePreview } = usePreviewChat(idKey, id);
|
29 |
+
|
30 |
+
return (
|
31 |
+
<div>
|
32 |
+
<Flex vertical gap={'middle'}>
|
33 |
+
<BackendServiceApi show={showApiKeyModal}></BackendServiceApi>
|
34 |
+
{!hideChatPreviewCard && (
|
35 |
+
<Card title={`${name} Web App`}>
|
36 |
+
<Flex gap={8} vertical>
|
37 |
+
<Space size={'middle'}>
|
38 |
+
<Button onClick={handlePreview}>{t('preview')}</Button>
|
39 |
+
<Button onClick={showEmbedModal}>{t('embedded')}</Button>
|
40 |
+
</Space>
|
41 |
+
</Flex>
|
42 |
+
</Card>
|
43 |
+
)}
|
44 |
+
<HightLightMarkdown>{apiDoc}</HightLightMarkdown>
|
45 |
+
</Flex>
|
46 |
+
{apiKeyVisible && (
|
47 |
+
<ChatApiKeyModal
|
48 |
+
hideModal={hideApiKeyModal}
|
49 |
+
dialogId={id}
|
50 |
+
idKey={idKey}
|
51 |
+
></ChatApiKeyModal>
|
52 |
+
)}
|
53 |
+
{embedVisible && (
|
54 |
+
<EmbedModal
|
55 |
+
token={embedToken}
|
56 |
+
visible={embedVisible}
|
57 |
+
hideModal={hideEmbedModal}
|
58 |
+
></EmbedModal>
|
59 |
+
)}
|
60 |
+
</div>
|
61 |
+
);
|
62 |
+
};
|
63 |
+
|
64 |
+
export default ApiContent;
|
web/src/components/api-service/chat-overview-modal/backend-service-api.tsx
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Button, Card, Flex, Space, Typography } from 'antd';
|
2 |
+
|
3 |
+
import { useTranslate } from '@/hooks/common-hooks';
|
4 |
+
import styles from './index.less';
|
5 |
+
|
6 |
+
const { Paragraph } = Typography;
|
7 |
+
|
8 |
+
const BackendServiceApi = ({ show }: { show(): void }) => {
|
9 |
+
const { t } = useTranslate('chat');
|
10 |
+
|
11 |
+
return (
|
12 |
+
<Card
|
13 |
+
title={
|
14 |
+
<Space size={'large'}>
|
15 |
+
<span>RAGFlow API</span>
|
16 |
+
<Button onClick={show} type="primary">
|
17 |
+
{t('apiKey')}
|
18 |
+
</Button>
|
19 |
+
</Space>
|
20 |
+
}
|
21 |
+
>
|
22 |
+
<Flex gap={8} align="center">
|
23 |
+
<b>{t('backendServiceApi')}</b>
|
24 |
+
<Paragraph
|
25 |
+
copyable={{ text: `${location.origin}/v1/api/` }}
|
26 |
+
className={styles.apiLinkText}
|
27 |
+
>
|
28 |
+
{location.origin}/v1/api/
|
29 |
+
</Paragraph>
|
30 |
+
</Flex>
|
31 |
+
</Card>
|
32 |
+
);
|
33 |
+
};
|
34 |
+
|
35 |
+
export default BackendServiceApi;
|
web/src/components/api-service/chat-overview-modal/index.less
CHANGED
@@ -13,9 +13,7 @@
|
|
13 |
padding-left: 60px;
|
14 |
padding-bottom: 20px;
|
15 |
}
|
16 |
-
.
|
17 |
-
|
18 |
-
|
19 |
-
background-color: #eff8ff;
|
20 |
-
border: 1px;
|
21 |
}
|
|
|
13 |
padding-left: 60px;
|
14 |
padding-bottom: 20px;
|
15 |
}
|
16 |
+
.apiLinkText {
|
17 |
+
.linkText();
|
18 |
+
margin: 0 !important;
|
|
|
|
|
19 |
}
|
web/src/components/api-service/chat-overview-modal/index.tsx
CHANGED
@@ -1,65 +1,15 @@
|
|
1 |
-
import
|
2 |
-
import { useFetchNextStats } from '@/hooks/chat-hooks';
|
3 |
-
import { useSetModalState, useTranslate } from '@/hooks/common-hooks';
|
4 |
import { IModalProps } from '@/interfaces/common';
|
5 |
-
import {
|
6 |
-
import
|
7 |
-
import { Button, Card, DatePicker, Flex, Modal, Space, Typography } from 'antd';
|
8 |
-
import { RangePickerProps } from 'antd/es/date-picker';
|
9 |
-
import dayjs from 'dayjs';
|
10 |
-
import camelCase from 'lodash/camelCase';
|
11 |
-
import ChatApiKeyModal from '../chat-api-key-modal';
|
12 |
-
import EmbedModal from '../embed-modal';
|
13 |
-
import {
|
14 |
-
usePreviewChat,
|
15 |
-
useSelectChartStatsList,
|
16 |
-
useShowEmbedModal,
|
17 |
-
} from '../hooks';
|
18 |
-
import styles from './index.less';
|
19 |
-
|
20 |
-
const { Paragraph } = Typography;
|
21 |
-
const { RangePicker } = DatePicker;
|
22 |
-
|
23 |
-
const StatsLineChart = ({ statsType }: { statsType: keyof IStats }) => {
|
24 |
-
const { t } = useTranslate('chat');
|
25 |
-
const chartList = useSelectChartStatsList();
|
26 |
-
const list =
|
27 |
-
chartList[statsType]?.map((x) => ({
|
28 |
-
...x,
|
29 |
-
xAxis: formatDate(x.xAxis),
|
30 |
-
})) ?? [];
|
31 |
-
|
32 |
-
return (
|
33 |
-
<div className={styles.chartItem}>
|
34 |
-
<b className={styles.chartLabel}>{t(camelCase(statsType))}</b>
|
35 |
-
<LineChart data={list}></LineChart>
|
36 |
-
</div>
|
37 |
-
);
|
38 |
-
};
|
39 |
|
40 |
const ChatOverviewModal = ({
|
41 |
visible,
|
42 |
hideModal,
|
43 |
id,
|
44 |
-
name = '',
|
45 |
idKey,
|
46 |
}: IModalProps<any> & { id: string; name?: string; idKey: string }) => {
|
47 |
const { t } = useTranslate('chat');
|
48 |
-
const {
|
49 |
-
visible: apiKeyVisible,
|
50 |
-
hideModal: hideApiKeyModal,
|
51 |
-
showModal: showApiKeyModal,
|
52 |
-
} = useSetModalState();
|
53 |
-
const { embedVisible, hideEmbedModal, showEmbedModal, embedToken } =
|
54 |
-
useShowEmbedModal(id, idKey);
|
55 |
-
|
56 |
-
const { pickerValue, setPickerValue } = useFetchNextStats();
|
57 |
-
|
58 |
-
const disabledDate: RangePickerProps['disabledDate'] = (current) => {
|
59 |
-
return current && current > dayjs().endOf('day');
|
60 |
-
};
|
61 |
-
|
62 |
-
const { handlePreview } = usePreviewChat(id, idKey);
|
63 |
|
64 |
return (
|
65 |
<>
|
@@ -72,69 +22,7 @@ const ChatOverviewModal = ({
|
|
72 |
width={'100vw'}
|
73 |
okText={t('close', { keyPrefix: 'common' })}
|
74 |
>
|
75 |
-
<
|
76 |
-
<Card title={t('backendServiceApi')}>
|
77 |
-
<Flex gap={8} vertical>
|
78 |
-
{t('serviceApiEndpoint')}
|
79 |
-
<Paragraph
|
80 |
-
copyable={{ text: `${location.origin}/v1/api/` }}
|
81 |
-
className={styles.linkText}
|
82 |
-
>
|
83 |
-
{location.origin}/v1/api/
|
84 |
-
</Paragraph>
|
85 |
-
</Flex>
|
86 |
-
<Space size={'middle'}>
|
87 |
-
<Button onClick={showApiKeyModal}>{t('apiKey')}</Button>
|
88 |
-
<a
|
89 |
-
href={
|
90 |
-
'https://github.com/infiniflow/ragflow/blob/main/docs/references/api.md'
|
91 |
-
}
|
92 |
-
target="_blank"
|
93 |
-
rel="noreferrer"
|
94 |
-
>
|
95 |
-
<Button>{t('apiReference')}</Button>
|
96 |
-
</a>
|
97 |
-
</Space>
|
98 |
-
</Card>
|
99 |
-
<Card title={`${name} Web App`}>
|
100 |
-
<Flex gap={8} vertical>
|
101 |
-
<Space size={'middle'}>
|
102 |
-
<Button onClick={handlePreview}>{t('preview')}</Button>
|
103 |
-
<Button onClick={showEmbedModal}>{t('embedded')}</Button>
|
104 |
-
</Space>
|
105 |
-
</Flex>
|
106 |
-
</Card>
|
107 |
-
|
108 |
-
<Space>
|
109 |
-
<b>{t('dateRange')}</b>
|
110 |
-
<RangePicker
|
111 |
-
disabledDate={disabledDate}
|
112 |
-
value={pickerValue}
|
113 |
-
onChange={setPickerValue}
|
114 |
-
allowClear={false}
|
115 |
-
/>
|
116 |
-
</Space>
|
117 |
-
<div className={styles.chartWrapper}>
|
118 |
-
<StatsLineChart statsType={'pv'}></StatsLineChart>
|
119 |
-
<StatsLineChart statsType={'round'}></StatsLineChart>
|
120 |
-
<StatsLineChart statsType={'speed'}></StatsLineChart>
|
121 |
-
<StatsLineChart statsType={'thumb_up'}></StatsLineChart>
|
122 |
-
<StatsLineChart statsType={'tokens'}></StatsLineChart>
|
123 |
-
<StatsLineChart statsType={'uv'}></StatsLineChart>
|
124 |
-
</div>
|
125 |
-
</Flex>
|
126 |
-
{apiKeyVisible && (
|
127 |
-
<ChatApiKeyModal
|
128 |
-
hideModal={hideApiKeyModal}
|
129 |
-
dialogId={id}
|
130 |
-
idKey={idKey}
|
131 |
-
></ChatApiKeyModal>
|
132 |
-
)}
|
133 |
-
<EmbedModal
|
134 |
-
token={embedToken}
|
135 |
-
visible={embedVisible}
|
136 |
-
hideModal={hideEmbedModal}
|
137 |
-
></EmbedModal>
|
138 |
</Modal>
|
139 |
</>
|
140 |
);
|
|
|
1 |
+
import { useTranslate } from '@/hooks/common-hooks';
|
|
|
|
|
2 |
import { IModalProps } from '@/interfaces/common';
|
3 |
+
import { Modal } from 'antd';
|
4 |
+
import ApiContent from './api-content';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
const ChatOverviewModal = ({
|
7 |
visible,
|
8 |
hideModal,
|
9 |
id,
|
|
|
10 |
idKey,
|
11 |
}: IModalProps<any> & { id: string; name?: string; idKey: string }) => {
|
12 |
const { t } = useTranslate('chat');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
return (
|
15 |
<>
|
|
|
22 |
width={'100vw'}
|
23 |
okText={t('close', { keyPrefix: 'common' })}
|
24 |
>
|
25 |
+
<ApiContent id={id} idKey={idKey}></ApiContent>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
</Modal>
|
27 |
</>
|
28 |
);
|
web/src/components/api-service/chat-overview-modal/stats-chart.tsx
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import LineChart from '@/components/line-chart';
|
2 |
+
import { useTranslate } from '@/hooks/common-hooks';
|
3 |
+
import { IStats } from '@/interfaces/database/chat';
|
4 |
+
import { formatDate } from '@/utils/date';
|
5 |
+
import camelCase from 'lodash/camelCase';
|
6 |
+
import { useSelectChartStatsList } from '../hooks';
|
7 |
+
|
8 |
+
import styles from './index.less';
|
9 |
+
|
10 |
+
const StatsLineChart = ({ statsType }: { statsType: keyof IStats }) => {
|
11 |
+
const { t } = useTranslate('chat');
|
12 |
+
const chartList = useSelectChartStatsList();
|
13 |
+
const list =
|
14 |
+
chartList[statsType]?.map((x) => ({
|
15 |
+
...x,
|
16 |
+
xAxis: formatDate(x.xAxis),
|
17 |
+
})) ?? [];
|
18 |
+
|
19 |
+
return (
|
20 |
+
<div className={styles.chartItem}>
|
21 |
+
<b className={styles.chartLabel}>{t(camelCase(statsType))}</b>
|
22 |
+
<LineChart data={list}></LineChart>
|
23 |
+
</div>
|
24 |
+
);
|
25 |
+
};
|
26 |
+
|
27 |
+
const StatsChart = () => {
|
28 |
+
return (
|
29 |
+
<div className={styles.chartWrapper}>
|
30 |
+
<StatsLineChart statsType={'pv'}></StatsLineChart>
|
31 |
+
<StatsLineChart statsType={'round'}></StatsLineChart>
|
32 |
+
<StatsLineChart statsType={'speed'}></StatsLineChart>
|
33 |
+
<StatsLineChart statsType={'thumb_up'}></StatsLineChart>
|
34 |
+
<StatsLineChart statsType={'tokens'}></StatsLineChart>
|
35 |
+
<StatsLineChart statsType={'uv'}></StatsLineChart>
|
36 |
+
</div>
|
37 |
+
);
|
38 |
+
};
|
39 |
+
|
40 |
+
export default StatsChart;
|
web/src/components/api-service/hooks.ts
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
import { SharedFrom } from '@/constants/chat';
|
2 |
-
import {
|
3 |
-
useCreateNextToken,
|
4 |
-
useFetchTokenList,
|
5 |
-
useRemoveNextToken,
|
6 |
-
} from '@/hooks/chat-hooks';
|
7 |
import {
|
8 |
useSetModalState,
|
9 |
useShowDeleteConfirm,
|
10 |
useTranslate,
|
11 |
} from '@/hooks/common-hooks';
|
|
|
|
|
|
|
|
|
|
|
12 |
import { IStats } from '@/interfaces/database/chat';
|
13 |
import { useQueryClient } from '@tanstack/react-query';
|
14 |
import { message } from 'antd';
|
15 |
import { useCallback } from 'react';
|
16 |
|
17 |
-
export const useOperateApiKey = (
|
18 |
-
const { removeToken } =
|
19 |
-
const { createToken, loading: creatingLoading } =
|
20 |
-
const { data: tokenList, loading: listLoading } =
|
21 |
[idKey]: dialogId,
|
22 |
});
|
23 |
|
24 |
const showDeleteConfirm = useShowDeleteConfirm();
|
25 |
|
26 |
-
const onRemoveToken = (token: string
|
27 |
showDeleteConfirm({
|
28 |
-
onOk: () => removeToken(
|
29 |
});
|
30 |
};
|
31 |
|
@@ -49,7 +49,7 @@ type ChartStatsType = {
|
|
49 |
export const useSelectChartStatsList = (): ChartStatsType => {
|
50 |
const queryClient = useQueryClient();
|
51 |
const data = queryClient.getQueriesData({ queryKey: ['fetchStats'] });
|
52 |
-
const stats: IStats = data[0][1] as IStats;
|
53 |
|
54 |
return Object.keys(stats).reduce((pre, cur) => {
|
55 |
const item = stats[cur as keyof IStats];
|
@@ -77,10 +77,12 @@ const getUrlWithToken = (token: string, from: string = 'chat') => {
|
|
77 |
return `${protocol}//${host}/chat/share?shared_id=${token}&from=${from}`;
|
78 |
};
|
79 |
|
80 |
-
const useFetchTokenListBeforeOtherStep = (
|
81 |
const { showTokenEmptyError } = useShowTokenEmptyError();
|
82 |
|
83 |
-
const { data: tokenList, refetch } =
|
|
|
|
|
84 |
|
85 |
const token =
|
86 |
Array.isArray(tokenList) && tokenList.length > 0 ? tokenList[0].token : '';
|
@@ -102,7 +104,7 @@ const useFetchTokenListBeforeOtherStep = (dialogId: string, idKey: string) => {
|
|
102 |
};
|
103 |
};
|
104 |
|
105 |
-
export const useShowEmbedModal = (
|
106 |
const {
|
107 |
visible: embedVisible,
|
108 |
hideModal: hideEmbedModal,
|
@@ -110,8 +112,8 @@ export const useShowEmbedModal = (dialogId: string, idKey: string) => {
|
|
110 |
} = useSetModalState();
|
111 |
|
112 |
const { handleOperate, token } = useFetchTokenListBeforeOtherStep(
|
113 |
-
dialogId,
|
114 |
idKey,
|
|
|
115 |
);
|
116 |
|
117 |
const handleShowEmbedModal = useCallback(async () => {
|
@@ -129,8 +131,8 @@ export const useShowEmbedModal = (dialogId: string, idKey: string) => {
|
|
129 |
};
|
130 |
};
|
131 |
|
132 |
-
export const usePreviewChat = (
|
133 |
-
const { handleOperate } = useFetchTokenListBeforeOtherStep(
|
134 |
|
135 |
const open = useCallback(
|
136 |
(t: string) => {
|
|
|
1 |
import { SharedFrom } from '@/constants/chat';
|
|
|
|
|
|
|
|
|
|
|
2 |
import {
|
3 |
useSetModalState,
|
4 |
useShowDeleteConfirm,
|
5 |
useTranslate,
|
6 |
} from '@/hooks/common-hooks';
|
7 |
+
import {
|
8 |
+
useCreateSystemToken,
|
9 |
+
useFetchSystemTokenList,
|
10 |
+
useRemoveSystemToken,
|
11 |
+
} from '@/hooks/user-setting-hooks';
|
12 |
import { IStats } from '@/interfaces/database/chat';
|
13 |
import { useQueryClient } from '@tanstack/react-query';
|
14 |
import { message } from 'antd';
|
15 |
import { useCallback } from 'react';
|
16 |
|
17 |
+
export const useOperateApiKey = (idKey: string, dialogId?: string) => {
|
18 |
+
const { removeToken } = useRemoveSystemToken();
|
19 |
+
const { createToken, loading: creatingLoading } = useCreateSystemToken();
|
20 |
+
const { data: tokenList, loading: listLoading } = useFetchSystemTokenList({
|
21 |
[idKey]: dialogId,
|
22 |
});
|
23 |
|
24 |
const showDeleteConfirm = useShowDeleteConfirm();
|
25 |
|
26 |
+
const onRemoveToken = (token: string) => {
|
27 |
showDeleteConfirm({
|
28 |
+
onOk: () => removeToken(token),
|
29 |
});
|
30 |
};
|
31 |
|
|
|
49 |
export const useSelectChartStatsList = (): ChartStatsType => {
|
50 |
const queryClient = useQueryClient();
|
51 |
const data = queryClient.getQueriesData({ queryKey: ['fetchStats'] });
|
52 |
+
const stats: IStats = (data.length > 0 ? data[0][1] : {}) as IStats;
|
53 |
|
54 |
return Object.keys(stats).reduce((pre, cur) => {
|
55 |
const item = stats[cur as keyof IStats];
|
|
|
77 |
return `${protocol}//${host}/chat/share?shared_id=${token}&from=${from}`;
|
78 |
};
|
79 |
|
80 |
+
const useFetchTokenListBeforeOtherStep = (idKey: string, dialogId?: string) => {
|
81 |
const { showTokenEmptyError } = useShowTokenEmptyError();
|
82 |
|
83 |
+
const { data: tokenList, refetch } = useFetchSystemTokenList({
|
84 |
+
[idKey]: dialogId,
|
85 |
+
});
|
86 |
|
87 |
const token =
|
88 |
Array.isArray(tokenList) && tokenList.length > 0 ? tokenList[0].token : '';
|
|
|
104 |
};
|
105 |
};
|
106 |
|
107 |
+
export const useShowEmbedModal = (idKey: string, dialogId?: string) => {
|
108 |
const {
|
109 |
visible: embedVisible,
|
110 |
hideModal: hideEmbedModal,
|
|
|
112 |
} = useSetModalState();
|
113 |
|
114 |
const { handleOperate, token } = useFetchTokenListBeforeOtherStep(
|
|
|
115 |
idKey,
|
116 |
+
dialogId,
|
117 |
);
|
118 |
|
119 |
const handleShowEmbedModal = useCallback(async () => {
|
|
|
131 |
};
|
132 |
};
|
133 |
|
134 |
+
export const usePreviewChat = (idKey: string, dialogId?: string) => {
|
135 |
+
const { handleOperate } = useFetchTokenListBeforeOtherStep(idKey, dialogId);
|
136 |
|
137 |
const open = useCallback(
|
138 |
(t: string) => {
|
web/src/components/highlight-markdown/index.less
CHANGED
@@ -1,4 +1,19 @@
|
|
1 |
.text {
|
2 |
-
white-space: pre-wrap; // https://stackoverflow.com/questions/60332183/new-line-with-react-markdown
|
3 |
.chunkText;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
|
|
1 |
.text {
|
|
|
2 |
.chunkText;
|
3 |
+
font-size: 16px;
|
4 |
+
li {
|
5 |
+
padding: 4px 0px;
|
6 |
+
}
|
7 |
+
p {
|
8 |
+
white-space: pre-wrap; // https://stackoverflow.com/questions/60332183/new-line-with-react-markdown
|
9 |
+
}
|
10 |
+
}
|
11 |
+
|
12 |
+
.code {
|
13 |
+
padding: 3px 6px 6px;
|
14 |
+
margin: 0;
|
15 |
+
white-space: break-spaces;
|
16 |
+
background-color: rgba(129, 139, 152, 0.12);
|
17 |
+
border-radius: 4px;
|
18 |
+
color: rgb(31, 35, 40);
|
19 |
}
|
web/src/components/highlight-markdown/index.tsx
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import classNames from 'classnames';
|
2 |
import Markdown from 'react-markdown';
|
3 |
-
import SyntaxHighlighter from 'react-syntax-highlighter';
|
4 |
import rehypeRaw from 'rehype-raw';
|
5 |
import remarkGfm from 'remark-gfm';
|
6 |
|
@@ -22,11 +22,16 @@ const HightLightMarkdown = ({
|
|
22 |
const { children, className, node, ...rest } = props;
|
23 |
const match = /language-(\w+)/.exec(className || '');
|
24 |
return match ? (
|
25 |
-
<SyntaxHighlighter
|
|
|
|
|
|
|
|
|
|
|
26 |
{String(children).replace(/\n$/, '')}
|
27 |
</SyntaxHighlighter>
|
28 |
) : (
|
29 |
-
<code {...rest} className={className}>
|
30 |
{children}
|
31 |
</code>
|
32 |
);
|
|
|
1 |
import classNames from 'classnames';
|
2 |
import Markdown from 'react-markdown';
|
3 |
+
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
4 |
import rehypeRaw from 'rehype-raw';
|
5 |
import remarkGfm from 'remark-gfm';
|
6 |
|
|
|
22 |
const { children, className, node, ...rest } = props;
|
23 |
const match = /language-(\w+)/.exec(className || '');
|
24 |
return match ? (
|
25 |
+
<SyntaxHighlighter
|
26 |
+
{...rest}
|
27 |
+
PreTag="div"
|
28 |
+
language={match[1]}
|
29 |
+
// style={dark}
|
30 |
+
>
|
31 |
{String(children).replace(/\n$/, '')}
|
32 |
</SyntaxHighlighter>
|
33 |
) : (
|
34 |
+
<code {...rest} className={`${className} ${styles.code}`}>
|
35 |
{children}
|
36 |
</code>
|
37 |
);
|
web/src/constants/common.ts
CHANGED
@@ -41,6 +41,12 @@ export const fileIconMap = {
|
|
41 |
|
42 |
export const LanguageList = ['English', 'Chinese', 'Traditional Chinese'];
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
export const LanguageTranslationMap = {
|
45 |
English: 'en',
|
46 |
Chinese: 'zh',
|
|
|
41 |
|
42 |
export const LanguageList = ['English', 'Chinese', 'Traditional Chinese'];
|
43 |
|
44 |
+
export const LanguageMap = {
|
45 |
+
English: 'English',
|
46 |
+
Chinese: '简体中文',
|
47 |
+
'Traditional Chinese': '繁體中文',
|
48 |
+
};
|
49 |
+
|
50 |
export const LanguageTranslationMap = {
|
51 |
English: 'en',
|
52 |
Chinese: 'zh',
|
web/src/constants/setting.ts
CHANGED
@@ -5,6 +5,7 @@ export enum UserSettingRouteKey {
|
|
5 |
Password = 'password',
|
6 |
Model = 'model',
|
7 |
System = 'system',
|
|
|
8 |
Team = 'team',
|
9 |
Logout = 'logout',
|
10 |
}
|
|
|
5 |
Password = 'password',
|
6 |
Model = 'model',
|
7 |
System = 'system',
|
8 |
+
Api = 'api',
|
9 |
Team = 'team',
|
10 |
Logout = 'logout',
|
11 |
}
|
web/src/hooks/chat-hooks.ts
CHANGED
@@ -441,7 +441,7 @@ export const useRemoveNextToken = () => {
|
|
441 |
mutationKey: ['removeToken'],
|
442 |
mutationFn: async (params: {
|
443 |
tenantId: string;
|
444 |
-
dialogId
|
445 |
tokens: string[];
|
446 |
}) => {
|
447 |
const { data } = await chatService.removeToken(params);
|
|
|
441 |
mutationKey: ['removeToken'],
|
442 |
mutationFn: async (params: {
|
443 |
tenantId: string;
|
444 |
+
dialogId?: string;
|
445 |
tokens: string[];
|
446 |
}) => {
|
447 |
const { data } = await chatService.removeToken(params);
|
web/src/hooks/user-setting-hooks.tsx
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import { LanguageTranslationMap } from '@/constants/common';
|
2 |
import { ResponseGetType } from '@/interfaces/database/base';
|
|
|
3 |
import { ITenantInfo } from '@/interfaces/database/knowledge';
|
4 |
import { ISystemStatus, IUserInfo } from '@/interfaces/database/user-setting';
|
5 |
import userService from '@/services/user-service';
|
@@ -152,3 +153,65 @@ export const useFetchSystemStatus = () => {
|
|
152 |
loading,
|
153 |
};
|
154 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import { LanguageTranslationMap } from '@/constants/common';
|
2 |
import { ResponseGetType } from '@/interfaces/database/base';
|
3 |
+
import { IToken } from '@/interfaces/database/chat';
|
4 |
import { ITenantInfo } from '@/interfaces/database/knowledge';
|
5 |
import { ISystemStatus, IUserInfo } from '@/interfaces/database/user-setting';
|
6 |
import userService from '@/services/user-service';
|
|
|
153 |
loading,
|
154 |
};
|
155 |
};
|
156 |
+
|
157 |
+
export const useFetchSystemTokenList = (params: Record<string, any>) => {
|
158 |
+
const {
|
159 |
+
data,
|
160 |
+
isFetching: loading,
|
161 |
+
refetch,
|
162 |
+
} = useQuery<IToken[]>({
|
163 |
+
queryKey: ['fetchSystemTokenList', params],
|
164 |
+
initialData: [],
|
165 |
+
gcTime: 0,
|
166 |
+
queryFn: async () => {
|
167 |
+
const { data } = await userService.listToken(params);
|
168 |
+
|
169 |
+
return data?.data ?? [];
|
170 |
+
},
|
171 |
+
});
|
172 |
+
|
173 |
+
return { data, loading, refetch };
|
174 |
+
};
|
175 |
+
|
176 |
+
export const useRemoveSystemToken = () => {
|
177 |
+
const queryClient = useQueryClient();
|
178 |
+
const { t } = useTranslation();
|
179 |
+
|
180 |
+
const {
|
181 |
+
data,
|
182 |
+
isPending: loading,
|
183 |
+
mutateAsync,
|
184 |
+
} = useMutation({
|
185 |
+
mutationKey: ['removeSystemToken'],
|
186 |
+
mutationFn: async (token: string) => {
|
187 |
+
const { data } = await userService.removeToken({}, token);
|
188 |
+
if (data.retcode === 0) {
|
189 |
+
message.success(t('message.deleted'));
|
190 |
+
queryClient.invalidateQueries({ queryKey: ['fetchSystemTokenList'] });
|
191 |
+
}
|
192 |
+
return data?.data ?? [];
|
193 |
+
},
|
194 |
+
});
|
195 |
+
|
196 |
+
return { data, loading, removeToken: mutateAsync };
|
197 |
+
};
|
198 |
+
|
199 |
+
export const useCreateSystemToken = () => {
|
200 |
+
const queryClient = useQueryClient();
|
201 |
+
const {
|
202 |
+
data,
|
203 |
+
isPending: loading,
|
204 |
+
mutateAsync,
|
205 |
+
} = useMutation({
|
206 |
+
mutationKey: ['createSystemToken'],
|
207 |
+
mutationFn: async (params: Record<string, any>) => {
|
208 |
+
const { data } = await userService.createToken(params);
|
209 |
+
if (data.retcode === 0) {
|
210 |
+
queryClient.invalidateQueries({ queryKey: ['fetchSystemTokenList'] });
|
211 |
+
}
|
212 |
+
return data?.data ?? [];
|
213 |
+
},
|
214 |
+
});
|
215 |
+
|
216 |
+
return { data, loading, createToken: mutateAsync };
|
217 |
+
};
|
web/src/layouts/components/right-toolbar/index.tsx
CHANGED
@@ -5,7 +5,7 @@ import camelCase from 'lodash/camelCase';
|
|
5 |
import React from 'react';
|
6 |
import User from '../user';
|
7 |
|
8 |
-
import { LanguageList } from '@/constants/common';
|
9 |
import { useChangeLanguage } from '@/hooks/logic-hooks';
|
10 |
import { useFetchUserInfo } from '@/hooks/user-setting-hooks';
|
11 |
import styled from './index.less';
|
@@ -35,7 +35,7 @@ const RightToolBar = () => {
|
|
35 |
|
36 |
const items: MenuProps['items'] = LanguageList.map((x) => ({
|
37 |
key: x,
|
38 |
-
label: <span>{
|
39 |
})).reduce<MenuProps['items']>((pre, cur) => {
|
40 |
return [...pre!, { type: 'divider' }, cur];
|
41 |
}, []);
|
|
|
5 |
import React from 'react';
|
6 |
import User from '../user';
|
7 |
|
8 |
+
import { LanguageList, LanguageMap } from '@/constants/common';
|
9 |
import { useChangeLanguage } from '@/hooks/logic-hooks';
|
10 |
import { useFetchUserInfo } from '@/hooks/user-setting-hooks';
|
11 |
import styled from './index.less';
|
|
|
35 |
|
36 |
const items: MenuProps['items'] = LanguageList.map((x) => ({
|
37 |
key: x,
|
38 |
+
label: <span>{LanguageMap[x as keyof typeof LanguageMap]}</span>,
|
39 |
})).reduce<MenuProps['items']>((pre, cur) => {
|
40 |
return [...pre!, { type: 'divider' }, cur];
|
41 |
}, []);
|
web/src/less/mixins.less
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.chunkText() {
|
2 |
em {
|
3 |
color: red;
|
@@ -5,6 +10,8 @@
|
|
5 |
}
|
6 |
table {
|
7 |
width: 100%;
|
|
|
|
|
8 |
}
|
9 |
|
10 |
caption {
|
@@ -17,8 +24,13 @@
|
|
17 |
}
|
18 |
|
19 |
th {
|
20 |
-
color: #fff;
|
21 |
-
background-color: @blurBackground;
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
23 |
|
24 |
td:hover {
|
@@ -56,3 +68,10 @@
|
|
56 |
overflow: hidden;
|
57 |
text-overflow: ellipsis;
|
58 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.tableCell() {
|
2 |
+
padding: 6px 13px;
|
3 |
+
border: 1px solid #d1d9e0;
|
4 |
+
}
|
5 |
+
|
6 |
.chunkText() {
|
7 |
em {
|
8 |
color: red;
|
|
|
10 |
}
|
11 |
table {
|
12 |
width: 100%;
|
13 |
+
box-sizing: border-box;
|
14 |
+
border-collapse: collapse;
|
15 |
}
|
16 |
|
17 |
caption {
|
|
|
24 |
}
|
25 |
|
26 |
th {
|
27 |
+
// color: #fff;
|
28 |
+
// background-color: @blurBackground;
|
29 |
+
.tableCell;
|
30 |
+
}
|
31 |
+
|
32 |
+
td {
|
33 |
+
.tableCell;
|
34 |
}
|
35 |
|
36 |
td:hover {
|
|
|
68 |
overflow: hidden;
|
69 |
text-overflow: ellipsis;
|
70 |
}
|
71 |
+
|
72 |
+
.linkText() {
|
73 |
+
border-radius: 6px;
|
74 |
+
padding: 6px 10px;
|
75 |
+
background-color: #eff8ff;
|
76 |
+
border: 1px;
|
77 |
+
}
|
web/src/locales/en.ts
CHANGED
@@ -400,7 +400,7 @@ The above is the content you need to summarize.`,
|
|
400 |
quoteTip: 'Should the source of the original text be displayed?',
|
401 |
selfRag: 'Self-RAG',
|
402 |
selfRagTip: 'Please refer to: https://huggingface.co/papers/2310.11511',
|
403 |
-
overview: 'Chat
|
404 |
pv: 'Number of messages',
|
405 |
uv: 'Active user number',
|
406 |
speed: 'Token output speed',
|
@@ -413,7 +413,7 @@ The above is the content you need to summarize.`,
|
|
413 |
apiKey: 'API Key',
|
414 |
apiReference: 'API Documents',
|
415 |
dateRange: 'Date Range:',
|
416 |
-
backendServiceApi: '
|
417 |
createNewKey: 'Create new key',
|
418 |
created: 'Created',
|
419 |
action: 'Action',
|
@@ -451,6 +451,7 @@ The above is the content you need to summarize.`,
|
|
451 |
team: 'Team',
|
452 |
system: 'System',
|
453 |
logout: 'Log out',
|
|
|
454 |
username: 'Username',
|
455 |
usernameMessage: 'Please input your username!',
|
456 |
photo: 'Your photo',
|
|
|
400 |
quoteTip: 'Should the source of the original text be displayed?',
|
401 |
selfRag: 'Self-RAG',
|
402 |
selfRagTip: 'Please refer to: https://huggingface.co/papers/2310.11511',
|
403 |
+
overview: 'Chat ID',
|
404 |
pv: 'Number of messages',
|
405 |
uv: 'Active user number',
|
406 |
speed: 'Token output speed',
|
|
|
413 |
apiKey: 'API Key',
|
414 |
apiReference: 'API Documents',
|
415 |
dateRange: 'Date Range:',
|
416 |
+
backendServiceApi: 'API Server',
|
417 |
createNewKey: 'Create new key',
|
418 |
created: 'Created',
|
419 |
action: 'Action',
|
|
|
451 |
team: 'Team',
|
452 |
system: 'System',
|
453 |
logout: 'Log out',
|
454 |
+
api: 'API',
|
455 |
username: 'Username',
|
456 |
usernameMessage: 'Please input your username!',
|
457 |
photo: 'Your photo',
|
web/src/locales/zh-traditional.ts
CHANGED
@@ -371,7 +371,7 @@ export default {
|
|
371 |
quoteTip: '是否應該顯示原文出處?',
|
372 |
selfRag: 'Self-RAG',
|
373 |
selfRagTip: '請參考: https://huggingface.co/papers/2310.11511',
|
374 |
-
overview: '聊天
|
375 |
pv: '消息數',
|
376 |
uv: '活躍用戶數',
|
377 |
speed: 'Token 輸出速度',
|
@@ -384,7 +384,7 @@ export default {
|
|
384 |
apiKey: 'API 鍵',
|
385 |
apiReference: 'API 文檔',
|
386 |
dateRange: '日期範圍:',
|
387 |
-
backendServiceApi: '
|
388 |
createNewKey: '創建新密鑰',
|
389 |
created: '創建於',
|
390 |
action: '操作',
|
|
|
371 |
quoteTip: '是否應該顯示原文出處?',
|
372 |
selfRag: 'Self-RAG',
|
373 |
selfRagTip: '請參考: https://huggingface.co/papers/2310.11511',
|
374 |
+
overview: '聊天 ID',
|
375 |
pv: '消息數',
|
376 |
uv: '活躍用戶數',
|
377 |
speed: 'Token 輸出速度',
|
|
|
384 |
apiKey: 'API 鍵',
|
385 |
apiReference: 'API 文檔',
|
386 |
dateRange: '日期範圍:',
|
387 |
+
backendServiceApi: 'API 伺服器',
|
388 |
createNewKey: '創建新密鑰',
|
389 |
created: '創建於',
|
390 |
action: '操作',
|
web/src/locales/zh.ts
CHANGED
@@ -388,7 +388,7 @@ export default {
|
|
388 |
quoteTip: '是否应该显示原文出处?',
|
389 |
selfRag: 'Self-RAG',
|
390 |
selfRagTip: '请参考: https://huggingface.co/papers/2310.11511',
|
391 |
-
overview: '聊天
|
392 |
pv: '消息数',
|
393 |
uv: '活跃用户数',
|
394 |
speed: 'Token 输出速度',
|
@@ -401,7 +401,7 @@ export default {
|
|
401 |
apiKey: 'API 键',
|
402 |
apiReference: 'API 文档',
|
403 |
dateRange: '日期范围:',
|
404 |
-
backendServiceApi: '
|
405 |
createNewKey: '创建新密钥',
|
406 |
created: '创建于',
|
407 |
action: '操作',
|
|
|
388 |
quoteTip: '是否应该显示原文出处?',
|
389 |
selfRag: 'Self-RAG',
|
390 |
selfRagTip: '请参考: https://huggingface.co/papers/2310.11511',
|
391 |
+
overview: '聊天 ID',
|
392 |
pv: '消息数',
|
393 |
uv: '活跃用户数',
|
394 |
speed: 'Token 输出速度',
|
|
|
401 |
apiKey: 'API 键',
|
402 |
apiReference: 'API 文档',
|
403 |
dateRange: '日期范围:',
|
404 |
+
backendServiceApi: 'API 服务器',
|
405 |
createNewKey: '创建新密钥',
|
406 |
created: '创建于',
|
407 |
action: '操作',
|
web/src/pages/api/index.tsx
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ApiContent from '@/components/api-service/chat-overview-modal/api-content';
|
2 |
+
|
3 |
+
const ApiPage = () => {
|
4 |
+
return (
|
5 |
+
<div>
|
6 |
+
<ApiContent idKey="dialogId"></ApiContent>
|
7 |
+
</div>
|
8 |
+
);
|
9 |
+
};
|
10 |
+
|
11 |
+
export default ApiPage;
|
web/src/pages/chat/chat-id-modal/index.less
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
.id {
|
2 |
+
.linkText();
|
3 |
+
}
|
web/src/pages/chat/chat-id-modal/index.tsx
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { useTranslate } from '@/hooks/common-hooks';
|
2 |
+
import { IModalProps } from '@/interfaces/common';
|
3 |
+
import { Modal, Typography } from 'antd';
|
4 |
+
|
5 |
+
import styles from './index.less';
|
6 |
+
|
7 |
+
const { Paragraph } = Typography;
|
8 |
+
|
9 |
+
const ChatIdModal = ({
|
10 |
+
visible,
|
11 |
+
hideModal,
|
12 |
+
id,
|
13 |
+
}: IModalProps<any> & { id: string; name?: string; idKey: string }) => {
|
14 |
+
const { t } = useTranslate('chat');
|
15 |
+
|
16 |
+
return (
|
17 |
+
<>
|
18 |
+
<Modal
|
19 |
+
title={t('overview')}
|
20 |
+
open={visible}
|
21 |
+
onCancel={hideModal}
|
22 |
+
cancelButtonProps={{ style: { display: 'none' } }}
|
23 |
+
onOk={hideModal}
|
24 |
+
okText={t('close', { keyPrefix: 'common' })}
|
25 |
+
>
|
26 |
+
<Paragraph copyable={{ text: id }} className={styles.id}>
|
27 |
+
{id}
|
28 |
+
</Paragraph>
|
29 |
+
</Modal>
|
30 |
+
</>
|
31 |
+
);
|
32 |
+
};
|
33 |
+
|
34 |
+
export default ChatIdModal;
|
web/src/pages/chat/index.tsx
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import { ReactComponent as ChatAppCube } from '@/assets/svg/chat-app-cube.svg';
|
2 |
import RenameModal from '@/components/rename-modal';
|
3 |
-
import {
|
4 |
import {
|
5 |
Avatar,
|
6 |
Button,
|
@@ -29,7 +29,6 @@ import {
|
|
29 |
useSelectDerivedConversationList,
|
30 |
} from './hooks';
|
31 |
|
32 |
-
import ChatOverviewModal from '@/components/api-service/chat-overview-modal';
|
33 |
import SvgIcon from '@/components/svg-icon';
|
34 |
import {
|
35 |
useClickConversationCard,
|
@@ -40,6 +39,7 @@ import {
|
|
40 |
import { useSetModalState, useTranslate } from '@/hooks/common-hooks';
|
41 |
import { useSetSelectedRecord } from '@/hooks/logic-hooks';
|
42 |
import { IDialog } from '@/interfaces/database/chat';
|
|
|
43 |
import styles from './index.less';
|
44 |
|
45 |
const { Text } = Typography;
|
@@ -190,7 +190,7 @@ const Chat = () => {
|
|
190 |
onClick: handleShowOverviewModal(dialog),
|
191 |
label: (
|
192 |
<Space>
|
193 |
-
<
|
194 |
{t('overview')}
|
195 |
</Space>
|
196 |
),
|
@@ -367,13 +367,13 @@ const Chat = () => {
|
|
367 |
loading={conversationRenameLoading}
|
368 |
></RenameModal>
|
369 |
{overviewVisible && (
|
370 |
-
<
|
371 |
visible={overviewVisible}
|
372 |
hideModal={hideOverviewModal}
|
373 |
id={currentRecord.id}
|
374 |
name={currentRecord.name}
|
375 |
idKey="dialogId"
|
376 |
-
></
|
377 |
)}
|
378 |
</Flex>
|
379 |
);
|
|
|
1 |
import { ReactComponent as ChatAppCube } from '@/assets/svg/chat-app-cube.svg';
|
2 |
import RenameModal from '@/components/rename-modal';
|
3 |
+
import { DeleteOutlined, EditOutlined, KeyOutlined } from '@ant-design/icons';
|
4 |
import {
|
5 |
Avatar,
|
6 |
Button,
|
|
|
29 |
useSelectDerivedConversationList,
|
30 |
} from './hooks';
|
31 |
|
|
|
32 |
import SvgIcon from '@/components/svg-icon';
|
33 |
import {
|
34 |
useClickConversationCard,
|
|
|
39 |
import { useSetModalState, useTranslate } from '@/hooks/common-hooks';
|
40 |
import { useSetSelectedRecord } from '@/hooks/logic-hooks';
|
41 |
import { IDialog } from '@/interfaces/database/chat';
|
42 |
+
import ChatIdModal from './chat-id-modal';
|
43 |
import styles from './index.less';
|
44 |
|
45 |
const { Text } = Typography;
|
|
|
190 |
onClick: handleShowOverviewModal(dialog),
|
191 |
label: (
|
192 |
<Space>
|
193 |
+
<KeyOutlined />
|
194 |
{t('overview')}
|
195 |
</Space>
|
196 |
),
|
|
|
367 |
loading={conversationRenameLoading}
|
368 |
></RenameModal>
|
369 |
{overviewVisible && (
|
370 |
+
<ChatIdModal
|
371 |
visible={overviewVisible}
|
372 |
hideModal={hideOverviewModal}
|
373 |
id={currentRecord.id}
|
374 |
name={currentRecord.name}
|
375 |
idKey="dialogId"
|
376 |
+
></ChatIdModal>
|
377 |
)}
|
378 |
</Flex>
|
379 |
);
|
web/src/pages/user-setting/constants.tsx
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import { ReactComponent as LogoutIcon } from '@/assets/svg/logout.svg';
|
2 |
import { ReactComponent as ModelIcon } from '@/assets/svg/model-providers.svg';
|
3 |
import { ReactComponent as PasswordIcon } from '@/assets/svg/password.svg';
|
@@ -13,6 +14,7 @@ export const UserSettingIconMap = {
|
|
13 |
[UserSettingRouteKey.System]: <MonitorOutlined style={{ fontSize: 24 }} />,
|
14 |
[UserSettingRouteKey.Team]: <TeamIcon />,
|
15 |
[UserSettingRouteKey.Logout]: <LogoutIcon />,
|
|
|
16 |
};
|
17 |
|
18 |
export * from '@/constants/setting';
|
|
|
1 |
+
import { ReactComponent as ApiIcon } from '@/assets/svg/api.svg';
|
2 |
import { ReactComponent as LogoutIcon } from '@/assets/svg/logout.svg';
|
3 |
import { ReactComponent as ModelIcon } from '@/assets/svg/model-providers.svg';
|
4 |
import { ReactComponent as PasswordIcon } from '@/assets/svg/password.svg';
|
|
|
14 |
[UserSettingRouteKey.System]: <MonitorOutlined style={{ fontSize: 24 }} />,
|
15 |
[UserSettingRouteKey.Team]: <TeamIcon />,
|
16 |
[UserSettingRouteKey.Logout]: <LogoutIcon />,
|
17 |
+
[UserSettingRouteKey.Api]: <ApiIcon />,
|
18 |
};
|
19 |
|
20 |
export * from '@/constants/setting';
|
web/src/pages/user-setting/setting-api/index.less
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.apiWrapper {
|
2 |
+
width: 100%;
|
3 |
+
|
4 |
+
div[class^='chartWrapper'] {
|
5 |
+
height: auto !important;
|
6 |
+
}
|
7 |
+
}
|
web/src/pages/user-setting/setting-api/index.tsx
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ApiContent from '@/components/api-service/chat-overview-modal/api-content';
|
2 |
+
|
3 |
+
import styles from './index.less';
|
4 |
+
|
5 |
+
const ApiPage = () => {
|
6 |
+
return (
|
7 |
+
<div className={styles.apiWrapper}>
|
8 |
+
<ApiContent idKey="dialogId" hideChatPreviewCard></ApiContent>
|
9 |
+
</div>
|
10 |
+
);
|
11 |
+
};
|
12 |
+
|
13 |
+
export default ApiPage;
|
web/src/routes.ts
CHANGED
@@ -77,6 +77,10 @@ const routes = [
|
|
77 |
path: '/user-setting/system',
|
78 |
component: '@/pages/user-setting/setting-system',
|
79 |
},
|
|
|
|
|
|
|
|
|
80 |
],
|
81 |
},
|
82 |
{
|
|
|
77 |
path: '/user-setting/system',
|
78 |
component: '@/pages/user-setting/setting-system',
|
79 |
},
|
80 |
+
{
|
81 |
+
path: '/user-setting/api',
|
82 |
+
component: '@/pages/user-setting/setting-api',
|
83 |
+
},
|
84 |
],
|
85 |
},
|
86 |
{
|
web/src/services/user-service.ts
CHANGED
@@ -19,6 +19,9 @@ const {
|
|
19 |
deleteFactory,
|
20 |
getSystemStatus,
|
21 |
getSystemVersion,
|
|
|
|
|
|
|
22 |
} = api;
|
23 |
|
24 |
const methods = {
|
@@ -86,6 +89,18 @@ const methods = {
|
|
86 |
url: deleteFactory,
|
87 |
method: 'post',
|
88 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
} as const;
|
90 |
|
91 |
const userService = registerServer<keyof typeof methods>(methods, request);
|
|
|
19 |
deleteFactory,
|
20 |
getSystemStatus,
|
21 |
getSystemVersion,
|
22 |
+
getSystemTokenList,
|
23 |
+
removeSystemToken,
|
24 |
+
createSystemToken,
|
25 |
} = api;
|
26 |
|
27 |
const methods = {
|
|
|
89 |
url: deleteFactory,
|
90 |
method: 'post',
|
91 |
},
|
92 |
+
listToken: {
|
93 |
+
url: getSystemTokenList,
|
94 |
+
method: 'get',
|
95 |
+
},
|
96 |
+
createToken: {
|
97 |
+
url: createSystemToken,
|
98 |
+
method: 'post',
|
99 |
+
},
|
100 |
+
removeToken: {
|
101 |
+
url: removeSystemToken,
|
102 |
+
method: 'delete',
|
103 |
+
},
|
104 |
} as const;
|
105 |
|
106 |
const userService = registerServer<keyof typeof methods>(methods, request);
|
web/src/utils/api.ts
CHANGED
@@ -94,6 +94,10 @@ export default {
|
|
94 |
// system
|
95 |
getSystemVersion: `${api_host}/system/version`,
|
96 |
getSystemStatus: `${api_host}/system/status`,
|
|
|
|
|
|
|
|
|
97 |
|
98 |
// flow
|
99 |
listTemplates: `${api_host}/canvas/templates`,
|
|
|
94 |
// system
|
95 |
getSystemVersion: `${api_host}/system/version`,
|
96 |
getSystemStatus: `${api_host}/system/status`,
|
97 |
+
getSystemTokenList: `${api_host}/system/token_list`,
|
98 |
+
createSystemToken: `${api_host}/system/new_token`,
|
99 |
+
listSystemToken: `${api_host}/system/token_list`,
|
100 |
+
removeSystemToken: `${api_host}/system/token`,
|
101 |
|
102 |
// flow
|
103 |
listTemplates: `${api_host}/canvas/templates`,
|