balibabu commited on
Commit
aa396c5
·
1 Parent(s): 6943c52

feat: render message reference and add avatar to MessageItem (#73)

Browse files

* feat: add temporary conversation

* feat: add avatar to MessageItem

* feat: render message reference

web/package-lock.json CHANGED
@@ -21,8 +21,11 @@
21
  "react-chat-elements": "^12.0.13",
22
  "react-i18next": "^14.0.0",
23
  "react-infinite-scroll-component": "^6.1.0",
 
 
24
  "umi": "^4.0.90",
25
  "umi-request": "^1.4.0",
 
26
  "uuid": "^9.0.1"
27
  },
28
  "devDependencies": {
@@ -2667,6 +2670,14 @@
2667
  "@babel/types": "^7.20.7"
2668
  }
2669
  },
 
 
 
 
 
 
 
 
2670
  "node_modules/@types/eslint": {
2671
  "version": "8.56.1",
2672
  "resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-8.56.1.tgz",
@@ -2690,8 +2701,15 @@
2690
  "node_modules/@types/estree": {
2691
  "version": "1.0.5",
2692
  "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz",
2693
- "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
2694
- "peer": true
 
 
 
 
 
 
 
2695
  },
2696
  "node_modules/@types/glob": {
2697
  "version": "7.2.0",
@@ -2716,6 +2734,14 @@
2716
  "resolved": "https://registry.npmmirror.com/@types/hapi__joi/-/hapi__joi-17.1.9.tgz",
2717
  "integrity": "sha512-oOMFT8vmCTFncsF1engrs04jatz8/Anwx3De9uxnOK4chgSEgWBvFtpSoJo8u3784JNO+ql5tzRR6phHoRnscQ=="
2718
  },
 
 
 
 
 
 
 
 
2719
  "node_modules/@types/history": {
2720
  "version": "5.0.0",
2721
  "resolved": "https://registry.npmmirror.com/@types/history/-/history-5.0.0.tgz",
@@ -2787,6 +2813,14 @@
2787
  "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==",
2788
  "dev": true
2789
  },
 
 
 
 
 
 
 
 
2790
  "node_modules/@types/minimatch": {
2791
  "version": "5.1.2",
2792
  "resolved": "https://registry.npmmirror.com/@types/minimatch/-/minimatch-5.1.2.tgz",
@@ -2799,6 +2833,11 @@
2799
  "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==",
2800
  "peer": true
2801
  },
 
 
 
 
 
2802
  "node_modules/@types/node": {
2803
  "version": "20.10.6",
2804
  "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.10.6.tgz",
@@ -2821,8 +2860,7 @@
2821
  "node_modules/@types/prop-types": {
2822
  "version": "15.7.11",
2823
  "resolved": "https://registry.npmmirror.com/@types/prop-types/-/prop-types-15.7.11.tgz",
2824
- "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==",
2825
- "dev": true
2826
  },
2827
  "node_modules/@types/q": {
2828
  "version": "1.5.8",
@@ -2834,7 +2872,6 @@
2834
  "version": "18.2.46",
2835
  "resolved": "https://registry.npmmirror.com/@types/react/-/react-18.2.46.tgz",
2836
  "integrity": "sha512-nNCvVBcZlvX4NU1nRRNV/mFl1nNRuTuslAJglQsq+8ldXe5Xv0Wd2f7WTE3jOxhLH2BFfiZGC6GCp+kHQbgG+w==",
2837
- "dev": true,
2838
  "dependencies": {
2839
  "@types/prop-types": "*",
2840
  "@types/scheduler": "*",
@@ -2912,8 +2949,7 @@
2912
  "node_modules/@types/scheduler": {
2913
  "version": "0.16.8",
2914
  "resolved": "https://registry.npmmirror.com/@types/scheduler/-/scheduler-0.16.8.tgz",
2915
- "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==",
2916
- "dev": true
2917
  },
2918
  "node_modules/@types/semver": {
2919
  "version": "7.5.6",
@@ -2926,6 +2962,11 @@
2926
  "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==",
2927
  "dev": true
2928
  },
 
 
 
 
 
2929
  "node_modules/@types/use-sync-external-store": {
2930
  "version": "0.0.3",
2931
  "resolved": "https://registry.npmmirror.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz",
@@ -4364,8 +4405,7 @@
4364
  "node_modules/@ungap/structured-clone": {
4365
  "version": "1.2.0",
4366
  "resolved": "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
4367
- "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
4368
- "peer": true
4369
  },
4370
  "node_modules/@vitejs/plugin-react": {
4371
  "version": "4.0.0",
@@ -5216,6 +5256,11 @@
5216
  "@babel/core": "^7.0.0"
5217
  }
5218
  },
 
 
 
 
 
5219
  "node_modules/balanced-match": {
5220
  "version": "1.0.2",
5221
  "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -5557,6 +5602,11 @@
5557
  "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz",
5558
  "integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg=="
5559
  },
 
 
 
 
 
5560
  "node_modules/chalk": {
5561
  "version": "2.4.2",
5562
  "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz",
@@ -5570,6 +5620,26 @@
5570
  "node": ">=4"
5571
  }
5572
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5573
  "node_modules/chokidar": {
5574
  "version": "3.5.3",
5575
  "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz",
@@ -5777,6 +5847,11 @@
5777
  "node": ">= 0.8"
5778
  }
5779
  },
 
 
 
 
 
5780
  "node_modules/commander": {
5781
  "version": "8.3.0",
5782
  "resolved": "https://registry.npmmirror.com/commander/-/commander-8.3.0.tgz",
@@ -6588,6 +6663,14 @@
6588
  "node": ">=0.10.0"
6589
  }
6590
  },
 
 
 
 
 
 
 
 
6591
  "node_modules/decode-uri-component": {
6592
  "version": "0.2.2",
6593
  "resolved": "https://registry.npmmirror.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
@@ -6772,6 +6855,14 @@
6772
  "node": ">=0.4.0"
6773
  }
6774
  },
 
 
 
 
 
 
 
 
6775
  "node_modules/des.js": {
6776
  "version": "1.1.0",
6777
  "resolved": "https://registry.npmmirror.com/des.js/-/des.js-1.1.0.tgz",
@@ -6845,6 +6936,14 @@
6845
  "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
6846
  "dev": true
6847
  },
 
 
 
 
 
 
 
 
6848
  "node_modules/diffie-hellman": {
6849
  "version": "5.0.3",
6850
  "resolved": "https://registry.npmmirror.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
@@ -7981,6 +8080,11 @@
7981
  "node": ">=4.0"
7982
  }
7983
  },
 
 
 
 
 
7984
  "node_modules/esutils": {
7985
  "version": "2.0.3",
7986
  "resolved": "https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz",
@@ -8129,6 +8233,11 @@
8129
  "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==",
8130
  "dev": true
8131
  },
 
 
 
 
 
8132
  "node_modules/extend-shallow": {
8133
  "version": "3.0.2",
8134
  "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-3.0.2.tgz",
@@ -9038,6 +9147,36 @@
9038
  "node": ">= 0.4"
9039
  }
9040
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9041
  "node_modules/he": {
9042
  "version": "1.2.0",
9043
  "resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz",
@@ -9203,6 +9342,11 @@
9203
  "node": ">=8"
9204
  }
9205
  },
 
 
 
 
 
9206
  "node_modules/html-webpack-plugin": {
9207
  "version": "5.5.0",
9208
  "resolved": "https://registry.npmmirror.com/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz",
@@ -9400,6 +9544,11 @@
9400
  "resolved": "https://registry.npmmirror.com/ini/-/ini-1.3.8.tgz",
9401
  "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
9402
  },
 
 
 
 
 
9403
  "node_modules/insert-css": {
9404
  "version": "2.0.0",
9405
  "resolved": "https://registry.npmmirror.com/insert-css/-/insert-css-2.0.0.tgz",
@@ -9471,6 +9620,20 @@
9471
  "node": ">= 0.10"
9472
  }
9473
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9474
  "node_modules/is-arguments": {
9475
  "version": "1.1.1",
9476
  "resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.1.1.tgz",
@@ -9596,6 +9759,11 @@
9596
  "node": ">= 0.4"
9597
  }
9598
  },
 
 
 
 
 
9599
  "node_modules/is-descriptor": {
9600
  "version": "1.0.3",
9601
  "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.3.tgz",
@@ -9710,6 +9878,11 @@
9710
  "node": ">=0.10.0"
9711
  }
9712
  },
 
 
 
 
 
9713
  "node_modules/is-inside-container": {
9714
  "version": "1.0.0",
9715
  "resolved": "https://registry.npmmirror.com/is-inside-container/-/is-inside-container-1.0.0.tgz",
@@ -10779,6 +10952,11 @@
10779
  "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==",
10780
  "dev": true
10781
  },
 
 
 
 
 
10782
  "node_modules/loose-envify": {
10783
  "version": "1.4.0",
10784
  "resolved": "https://registry.npmmirror.com/loose-envify/-/loose-envify-1.4.0.tgz",
@@ -10882,6 +11060,119 @@
10882
  "safe-buffer": "^5.1.2"
10883
  }
10884
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10885
  "node_modules/mdn-data": {
10886
  "version": "2.0.14",
10887
  "resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.14.tgz",
@@ -10934,6 +11225,217 @@
10934
  "node": ">= 8"
10935
  }
10936
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10937
  "node_modules/micromatch": {
10938
  "version": "4.0.5",
10939
  "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz",
@@ -11787,6 +12289,26 @@
11787
  "safe-buffer": "^5.1.1"
11788
  }
11789
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11790
  "node_modules/parse-json": {
11791
  "version": "5.2.0",
11792
  "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz",
@@ -12717,6 +13239,11 @@
12717
  "resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz",
12718
  "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
12719
  },
 
 
 
 
 
12720
  "node_modules/proxy-compare": {
12721
  "version": "2.5.1",
12722
  "resolved": "https://registry.npmmirror.com/proxy-compare/-/proxy-compare-2.5.1.tgz",
@@ -13860,6 +14387,27 @@
13860
  "resolved": "https://registry.npmmirror.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
13861
  "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
13862
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13863
  "node_modules/react-merge-refs": {
13864
  "version": "1.1.0",
13865
  "resolved": "https://registry.npmmirror.com/react-merge-refs/-/react-merge-refs-1.1.0.tgz",
@@ -13982,6 +14530,14 @@
13982
  "prop-types": "^15.5.8"
13983
  }
13984
  },
 
 
 
 
 
 
 
 
13985
  "node_modules/reactcss": {
13986
  "version": "1.2.3",
13987
  "resolved": "https://registry.npmmirror.com/reactcss/-/reactcss-1.2.3.tgz",
@@ -14270,6 +14826,29 @@
14270
  "node": ">= 0.10"
14271
  }
14272
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14273
  "node_modules/remove-accents": {
14274
  "version": "0.4.2",
14275
  "resolved": "https://registry.npmmirror.com/remove-accents/-/remove-accents-0.4.2.tgz",
@@ -15043,6 +15622,11 @@
15043
  "deprecated": "See https://github.com/lydell/source-map-url#deprecated",
15044
  "dev": true
15045
  },
 
 
 
 
 
15046
  "node_modules/spdx-correct": {
15047
  "version": "3.2.0",
15048
  "resolved": "https://registry.npmmirror.com/spdx-correct/-/spdx-correct-3.2.0.tgz",
@@ -15369,6 +15953,15 @@
15369
  "es-abstract": "^1.22.1"
15370
  }
15371
  },
 
 
 
 
 
 
 
 
 
15372
  "node_modules/strip-ansi": {
15373
  "version": "6.0.1",
15374
  "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
@@ -15415,6 +16008,14 @@
15415
  "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==",
15416
  "peer": true
15417
  },
 
 
 
 
 
 
 
 
15418
  "node_modules/style-utils": {
15419
  "version": "0.3.8",
15420
  "resolved": "https://registry.npmmirror.com/style-utils/-/style-utils-0.3.8.tgz",
@@ -15983,6 +16584,11 @@
15983
  "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
15984
  "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
15985
  },
 
 
 
 
 
15986
  "node_modules/trim-newlines": {
15987
  "version": "3.0.1",
15988
  "resolved": "https://registry.npmmirror.com/trim-newlines/-/trim-newlines-3.0.1.tgz",
@@ -15992,6 +16598,11 @@
15992
  "node": ">=8"
15993
  }
15994
  },
 
 
 
 
 
15995
  "node_modules/tslib": {
15996
  "version": "2.6.2",
15997
  "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.6.2.tgz",
@@ -16718,6 +17329,20 @@
16718
  "./packages/isomorphic-unfetch"
16719
  ]
16720
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16721
  "node_modules/union-value": {
16722
  "version": "1.0.1",
16723
  "resolved": "https://registry.npmmirror.com/union-value/-/union-value-1.0.1.tgz",
@@ -16742,6 +17367,58 @@
16742
  "node": ">=0.10.0"
16743
  }
16744
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16745
  "node_modules/universalify": {
16746
  "version": "2.0.1",
16747
  "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz",
@@ -16994,6 +17671,25 @@
16994
  "node": ">= 0.8"
16995
  }
16996
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16997
  "node_modules/vite": {
16998
  "version": "4.3.1",
16999
  "resolved": "https://registry.npmmirror.com/vite/-/vite-4.3.1.tgz",
@@ -17370,6 +18066,11 @@
17370
  "engines": {
17371
  "node": ">=10"
17372
  }
 
 
 
 
 
17373
  }
17374
  }
17375
  }
 
21
  "react-chat-elements": "^12.0.13",
22
  "react-i18next": "^14.0.0",
23
  "react-infinite-scroll-component": "^6.1.0",
24
+ "react-markdown": "^9.0.1",
25
+ "react-string-replace": "^1.1.1",
26
  "umi": "^4.0.90",
27
  "umi-request": "^1.4.0",
28
+ "unist-util-visit-parents": "^6.0.1",
29
  "uuid": "^9.0.1"
30
  },
31
  "devDependencies": {
 
2670
  "@babel/types": "^7.20.7"
2671
  }
2672
  },
2673
+ "node_modules/@types/debug": {
2674
+ "version": "4.1.12",
2675
+ "resolved": "https://registry.npmmirror.com/@types/debug/-/debug-4.1.12.tgz",
2676
+ "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==",
2677
+ "dependencies": {
2678
+ "@types/ms": "*"
2679
+ }
2680
+ },
2681
  "node_modules/@types/eslint": {
2682
  "version": "8.56.1",
2683
  "resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-8.56.1.tgz",
 
2701
  "node_modules/@types/estree": {
2702
  "version": "1.0.5",
2703
  "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz",
2704
+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw=="
2705
+ },
2706
+ "node_modules/@types/estree-jsx": {
2707
+ "version": "1.0.5",
2708
+ "resolved": "https://registry.npmmirror.com/@types/estree-jsx/-/estree-jsx-1.0.5.tgz",
2709
+ "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==",
2710
+ "dependencies": {
2711
+ "@types/estree": "*"
2712
+ }
2713
  },
2714
  "node_modules/@types/glob": {
2715
  "version": "7.2.0",
 
2734
  "resolved": "https://registry.npmmirror.com/@types/hapi__joi/-/hapi__joi-17.1.9.tgz",
2735
  "integrity": "sha512-oOMFT8vmCTFncsF1engrs04jatz8/Anwx3De9uxnOK4chgSEgWBvFtpSoJo8u3784JNO+ql5tzRR6phHoRnscQ=="
2736
  },
2737
+ "node_modules/@types/hast": {
2738
+ "version": "3.0.4",
2739
+ "resolved": "https://registry.npmmirror.com/@types/hast/-/hast-3.0.4.tgz",
2740
+ "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==",
2741
+ "dependencies": {
2742
+ "@types/unist": "*"
2743
+ }
2744
+ },
2745
  "node_modules/@types/history": {
2746
  "version": "5.0.0",
2747
  "resolved": "https://registry.npmmirror.com/@types/history/-/history-5.0.0.tgz",
 
2813
  "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==",
2814
  "dev": true
2815
  },
2816
+ "node_modules/@types/mdast": {
2817
+ "version": "4.0.3",
2818
+ "resolved": "https://registry.npmmirror.com/@types/mdast/-/mdast-4.0.3.tgz",
2819
+ "integrity": "sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==",
2820
+ "dependencies": {
2821
+ "@types/unist": "*"
2822
+ }
2823
+ },
2824
  "node_modules/@types/minimatch": {
2825
  "version": "5.1.2",
2826
  "resolved": "https://registry.npmmirror.com/@types/minimatch/-/minimatch-5.1.2.tgz",
 
2833
  "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==",
2834
  "peer": true
2835
  },
2836
+ "node_modules/@types/ms": {
2837
+ "version": "0.7.34",
2838
+ "resolved": "https://registry.npmmirror.com/@types/ms/-/ms-0.7.34.tgz",
2839
+ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g=="
2840
+ },
2841
  "node_modules/@types/node": {
2842
  "version": "20.10.6",
2843
  "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.10.6.tgz",
 
2860
  "node_modules/@types/prop-types": {
2861
  "version": "15.7.11",
2862
  "resolved": "https://registry.npmmirror.com/@types/prop-types/-/prop-types-15.7.11.tgz",
2863
+ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng=="
 
2864
  },
2865
  "node_modules/@types/q": {
2866
  "version": "1.5.8",
 
2872
  "version": "18.2.46",
2873
  "resolved": "https://registry.npmmirror.com/@types/react/-/react-18.2.46.tgz",
2874
  "integrity": "sha512-nNCvVBcZlvX4NU1nRRNV/mFl1nNRuTuslAJglQsq+8ldXe5Xv0Wd2f7WTE3jOxhLH2BFfiZGC6GCp+kHQbgG+w==",
 
2875
  "dependencies": {
2876
  "@types/prop-types": "*",
2877
  "@types/scheduler": "*",
 
2949
  "node_modules/@types/scheduler": {
2950
  "version": "0.16.8",
2951
  "resolved": "https://registry.npmmirror.com/@types/scheduler/-/scheduler-0.16.8.tgz",
2952
+ "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A=="
 
2953
  },
2954
  "node_modules/@types/semver": {
2955
  "version": "7.5.6",
 
2962
  "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==",
2963
  "dev": true
2964
  },
2965
+ "node_modules/@types/unist": {
2966
+ "version": "3.0.2",
2967
+ "resolved": "https://registry.npmmirror.com/@types/unist/-/unist-3.0.2.tgz",
2968
+ "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ=="
2969
+ },
2970
  "node_modules/@types/use-sync-external-store": {
2971
  "version": "0.0.3",
2972
  "resolved": "https://registry.npmmirror.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz",
 
4405
  "node_modules/@ungap/structured-clone": {
4406
  "version": "1.2.0",
4407
  "resolved": "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
4408
+ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ=="
 
4409
  },
4410
  "node_modules/@vitejs/plugin-react": {
4411
  "version": "4.0.0",
 
5256
  "@babel/core": "^7.0.0"
5257
  }
5258
  },
5259
+ "node_modules/bail": {
5260
+ "version": "2.0.2",
5261
+ "resolved": "https://registry.npmmirror.com/bail/-/bail-2.0.2.tgz",
5262
+ "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="
5263
+ },
5264
  "node_modules/balanced-match": {
5265
  "version": "1.0.2",
5266
  "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
 
5602
  "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz",
5603
  "integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg=="
5604
  },
5605
+ "node_modules/ccount": {
5606
+ "version": "2.0.1",
5607
+ "resolved": "https://registry.npmmirror.com/ccount/-/ccount-2.0.1.tgz",
5608
+ "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="
5609
+ },
5610
  "node_modules/chalk": {
5611
  "version": "2.4.2",
5612
  "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz",
 
5620
  "node": ">=4"
5621
  }
5622
  },
5623
+ "node_modules/character-entities": {
5624
+ "version": "2.0.2",
5625
+ "resolved": "https://registry.npmmirror.com/character-entities/-/character-entities-2.0.2.tgz",
5626
+ "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="
5627
+ },
5628
+ "node_modules/character-entities-html4": {
5629
+ "version": "2.1.0",
5630
+ "resolved": "https://registry.npmmirror.com/character-entities-html4/-/character-entities-html4-2.1.0.tgz",
5631
+ "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="
5632
+ },
5633
+ "node_modules/character-entities-legacy": {
5634
+ "version": "3.0.0",
5635
+ "resolved": "https://registry.npmmirror.com/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz",
5636
+ "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="
5637
+ },
5638
+ "node_modules/character-reference-invalid": {
5639
+ "version": "2.0.1",
5640
+ "resolved": "https://registry.npmmirror.com/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz",
5641
+ "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw=="
5642
+ },
5643
  "node_modules/chokidar": {
5644
  "version": "3.5.3",
5645
  "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz",
 
5847
  "node": ">= 0.8"
5848
  }
5849
  },
5850
+ "node_modules/comma-separated-tokens": {
5851
+ "version": "2.0.3",
5852
+ "resolved": "https://registry.npmmirror.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",
5853
+ "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="
5854
+ },
5855
  "node_modules/commander": {
5856
  "version": "8.3.0",
5857
  "resolved": "https://registry.npmmirror.com/commander/-/commander-8.3.0.tgz",
 
6663
  "node": ">=0.10.0"
6664
  }
6665
  },
6666
+ "node_modules/decode-named-character-reference": {
6667
+ "version": "1.0.2",
6668
+ "resolved": "https://registry.npmmirror.com/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz",
6669
+ "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==",
6670
+ "dependencies": {
6671
+ "character-entities": "^2.0.0"
6672
+ }
6673
+ },
6674
  "node_modules/decode-uri-component": {
6675
  "version": "0.2.2",
6676
  "resolved": "https://registry.npmmirror.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
 
6855
  "node": ">=0.4.0"
6856
  }
6857
  },
6858
+ "node_modules/dequal": {
6859
+ "version": "2.0.3",
6860
+ "resolved": "https://registry.npmmirror.com/dequal/-/dequal-2.0.3.tgz",
6861
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
6862
+ "engines": {
6863
+ "node": ">=6"
6864
+ }
6865
+ },
6866
  "node_modules/des.js": {
6867
  "version": "1.1.0",
6868
  "resolved": "https://registry.npmmirror.com/des.js/-/des.js-1.1.0.tgz",
 
6936
  "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
6937
  "dev": true
6938
  },
6939
+ "node_modules/devlop": {
6940
+ "version": "1.1.0",
6941
+ "resolved": "https://registry.npmmirror.com/devlop/-/devlop-1.1.0.tgz",
6942
+ "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==",
6943
+ "dependencies": {
6944
+ "dequal": "^2.0.0"
6945
+ }
6946
+ },
6947
  "node_modules/diffie-hellman": {
6948
  "version": "5.0.3",
6949
  "resolved": "https://registry.npmmirror.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
 
8080
  "node": ">=4.0"
8081
  }
8082
  },
8083
+ "node_modules/estree-util-is-identifier-name": {
8084
+ "version": "3.0.0",
8085
+ "resolved": "https://registry.npmmirror.com/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz",
8086
+ "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="
8087
+ },
8088
  "node_modules/esutils": {
8089
  "version": "2.0.3",
8090
  "resolved": "https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz",
 
8233
  "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==",
8234
  "dev": true
8235
  },
8236
+ "node_modules/extend": {
8237
+ "version": "3.0.2",
8238
+ "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz",
8239
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
8240
+ },
8241
  "node_modules/extend-shallow": {
8242
  "version": "3.0.2",
8243
  "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-3.0.2.tgz",
 
9147
  "node": ">= 0.4"
9148
  }
9149
  },
9150
+ "node_modules/hast-util-to-jsx-runtime": {
9151
+ "version": "2.3.0",
9152
+ "resolved": "https://registry.npmmirror.com/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.0.tgz",
9153
+ "integrity": "sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==",
9154
+ "dependencies": {
9155
+ "@types/estree": "^1.0.0",
9156
+ "@types/hast": "^3.0.0",
9157
+ "@types/unist": "^3.0.0",
9158
+ "comma-separated-tokens": "^2.0.0",
9159
+ "devlop": "^1.0.0",
9160
+ "estree-util-is-identifier-name": "^3.0.0",
9161
+ "hast-util-whitespace": "^3.0.0",
9162
+ "mdast-util-mdx-expression": "^2.0.0",
9163
+ "mdast-util-mdx-jsx": "^3.0.0",
9164
+ "mdast-util-mdxjs-esm": "^2.0.0",
9165
+ "property-information": "^6.0.0",
9166
+ "space-separated-tokens": "^2.0.0",
9167
+ "style-to-object": "^1.0.0",
9168
+ "unist-util-position": "^5.0.0",
9169
+ "vfile-message": "^4.0.0"
9170
+ }
9171
+ },
9172
+ "node_modules/hast-util-whitespace": {
9173
+ "version": "3.0.0",
9174
+ "resolved": "https://registry.npmmirror.com/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
9175
+ "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==",
9176
+ "dependencies": {
9177
+ "@types/hast": "^3.0.0"
9178
+ }
9179
+ },
9180
  "node_modules/he": {
9181
  "version": "1.2.0",
9182
  "resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz",
 
9342
  "node": ">=8"
9343
  }
9344
  },
9345
+ "node_modules/html-url-attributes": {
9346
+ "version": "3.0.0",
9347
+ "resolved": "https://registry.npmmirror.com/html-url-attributes/-/html-url-attributes-3.0.0.tgz",
9348
+ "integrity": "sha512-/sXbVCWayk6GDVg3ctOX6nxaVj7So40FcFAnWlWGNAB1LpYKcV5Cd10APjPjW80O7zYW2MsjBV4zZ7IZO5fVow=="
9349
+ },
9350
  "node_modules/html-webpack-plugin": {
9351
  "version": "5.5.0",
9352
  "resolved": "https://registry.npmmirror.com/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz",
 
9544
  "resolved": "https://registry.npmmirror.com/ini/-/ini-1.3.8.tgz",
9545
  "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
9546
  },
9547
+ "node_modules/inline-style-parser": {
9548
+ "version": "0.2.2",
9549
+ "resolved": "https://registry.npmmirror.com/inline-style-parser/-/inline-style-parser-0.2.2.tgz",
9550
+ "integrity": "sha512-EcKzdTHVe8wFVOGEYXiW9WmJXPjqi1T+234YpJr98RiFYKHV3cdy1+3mkTE+KHTHxFFLH51SfaGOoUdW+v7ViQ=="
9551
+ },
9552
  "node_modules/insert-css": {
9553
  "version": "2.0.0",
9554
  "resolved": "https://registry.npmmirror.com/insert-css/-/insert-css-2.0.0.tgz",
 
9620
  "node": ">= 0.10"
9621
  }
9622
  },
9623
+ "node_modules/is-alphabetical": {
9624
+ "version": "2.0.1",
9625
+ "resolved": "https://registry.npmmirror.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz",
9626
+ "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="
9627
+ },
9628
+ "node_modules/is-alphanumerical": {
9629
+ "version": "2.0.1",
9630
+ "resolved": "https://registry.npmmirror.com/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz",
9631
+ "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==",
9632
+ "dependencies": {
9633
+ "is-alphabetical": "^2.0.0",
9634
+ "is-decimal": "^2.0.0"
9635
+ }
9636
+ },
9637
  "node_modules/is-arguments": {
9638
  "version": "1.1.1",
9639
  "resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.1.1.tgz",
 
9759
  "node": ">= 0.4"
9760
  }
9761
  },
9762
+ "node_modules/is-decimal": {
9763
+ "version": "2.0.1",
9764
+ "resolved": "https://registry.npmmirror.com/is-decimal/-/is-decimal-2.0.1.tgz",
9765
+ "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="
9766
+ },
9767
  "node_modules/is-descriptor": {
9768
  "version": "1.0.3",
9769
  "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.3.tgz",
 
9878
  "node": ">=0.10.0"
9879
  }
9880
  },
9881
+ "node_modules/is-hexadecimal": {
9882
+ "version": "2.0.1",
9883
+ "resolved": "https://registry.npmmirror.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz",
9884
+ "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="
9885
+ },
9886
  "node_modules/is-inside-container": {
9887
  "version": "1.0.0",
9888
  "resolved": "https://registry.npmmirror.com/is-inside-container/-/is-inside-container-1.0.0.tgz",
 
10952
  "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==",
10953
  "dev": true
10954
  },
10955
+ "node_modules/longest-streak": {
10956
+ "version": "3.1.0",
10957
+ "resolved": "https://registry.npmmirror.com/longest-streak/-/longest-streak-3.1.0.tgz",
10958
+ "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="
10959
+ },
10960
  "node_modules/loose-envify": {
10961
  "version": "1.4.0",
10962
  "resolved": "https://registry.npmmirror.com/loose-envify/-/loose-envify-1.4.0.tgz",
 
11060
  "safe-buffer": "^5.1.2"
11061
  }
11062
  },
11063
+ "node_modules/mdast-util-from-markdown": {
11064
+ "version": "2.0.0",
11065
+ "resolved": "https://registry.npmmirror.com/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.0.tgz",
11066
+ "integrity": "sha512-n7MTOr/z+8NAX/wmhhDji8O3bRvPTV/U0oTCaZJkjhPSKTPhS3xufVhKGF8s1pJ7Ox4QgoIU7KHseh09S+9rTA==",
11067
+ "dependencies": {
11068
+ "@types/mdast": "^4.0.0",
11069
+ "@types/unist": "^3.0.0",
11070
+ "decode-named-character-reference": "^1.0.0",
11071
+ "devlop": "^1.0.0",
11072
+ "mdast-util-to-string": "^4.0.0",
11073
+ "micromark": "^4.0.0",
11074
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
11075
+ "micromark-util-decode-string": "^2.0.0",
11076
+ "micromark-util-normalize-identifier": "^2.0.0",
11077
+ "micromark-util-symbol": "^2.0.0",
11078
+ "micromark-util-types": "^2.0.0",
11079
+ "unist-util-stringify-position": "^4.0.0"
11080
+ }
11081
+ },
11082
+ "node_modules/mdast-util-mdx-expression": {
11083
+ "version": "2.0.0",
11084
+ "resolved": "https://registry.npmmirror.com/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.0.tgz",
11085
+ "integrity": "sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==",
11086
+ "dependencies": {
11087
+ "@types/estree-jsx": "^1.0.0",
11088
+ "@types/hast": "^3.0.0",
11089
+ "@types/mdast": "^4.0.0",
11090
+ "devlop": "^1.0.0",
11091
+ "mdast-util-from-markdown": "^2.0.0",
11092
+ "mdast-util-to-markdown": "^2.0.0"
11093
+ }
11094
+ },
11095
+ "node_modules/mdast-util-mdx-jsx": {
11096
+ "version": "3.1.0",
11097
+ "resolved": "https://registry.npmmirror.com/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.1.0.tgz",
11098
+ "integrity": "sha512-A8AJHlR7/wPQ3+Jre1+1rq040fX9A4Q1jG8JxmSNp/PLPHg80A6475wxTp3KzHpApFH6yWxFotHrJQA3dXP6/w==",
11099
+ "dependencies": {
11100
+ "@types/estree-jsx": "^1.0.0",
11101
+ "@types/hast": "^3.0.0",
11102
+ "@types/mdast": "^4.0.0",
11103
+ "@types/unist": "^3.0.0",
11104
+ "ccount": "^2.0.0",
11105
+ "devlop": "^1.1.0",
11106
+ "mdast-util-from-markdown": "^2.0.0",
11107
+ "mdast-util-to-markdown": "^2.0.0",
11108
+ "parse-entities": "^4.0.0",
11109
+ "stringify-entities": "^4.0.0",
11110
+ "unist-util-remove-position": "^5.0.0",
11111
+ "unist-util-stringify-position": "^4.0.0",
11112
+ "vfile-message": "^4.0.0"
11113
+ }
11114
+ },
11115
+ "node_modules/mdast-util-mdxjs-esm": {
11116
+ "version": "2.0.1",
11117
+ "resolved": "https://registry.npmmirror.com/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz",
11118
+ "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==",
11119
+ "dependencies": {
11120
+ "@types/estree-jsx": "^1.0.0",
11121
+ "@types/hast": "^3.0.0",
11122
+ "@types/mdast": "^4.0.0",
11123
+ "devlop": "^1.0.0",
11124
+ "mdast-util-from-markdown": "^2.0.0",
11125
+ "mdast-util-to-markdown": "^2.0.0"
11126
+ }
11127
+ },
11128
+ "node_modules/mdast-util-phrasing": {
11129
+ "version": "4.1.0",
11130
+ "resolved": "https://registry.npmmirror.com/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz",
11131
+ "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==",
11132
+ "dependencies": {
11133
+ "@types/mdast": "^4.0.0",
11134
+ "unist-util-is": "^6.0.0"
11135
+ }
11136
+ },
11137
+ "node_modules/mdast-util-to-hast": {
11138
+ "version": "13.1.0",
11139
+ "resolved": "https://registry.npmmirror.com/mdast-util-to-hast/-/mdast-util-to-hast-13.1.0.tgz",
11140
+ "integrity": "sha512-/e2l/6+OdGp/FB+ctrJ9Avz71AN/GRH3oi/3KAx/kMnoUsD6q0woXlDT8lLEeViVKE7oZxE7RXzvO3T8kF2/sA==",
11141
+ "dependencies": {
11142
+ "@types/hast": "^3.0.0",
11143
+ "@types/mdast": "^4.0.0",
11144
+ "@ungap/structured-clone": "^1.0.0",
11145
+ "devlop": "^1.0.0",
11146
+ "micromark-util-sanitize-uri": "^2.0.0",
11147
+ "trim-lines": "^3.0.0",
11148
+ "unist-util-position": "^5.0.0",
11149
+ "unist-util-visit": "^5.0.0",
11150
+ "vfile": "^6.0.0"
11151
+ }
11152
+ },
11153
+ "node_modules/mdast-util-to-markdown": {
11154
+ "version": "2.1.0",
11155
+ "resolved": "https://registry.npmmirror.com/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.0.tgz",
11156
+ "integrity": "sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==",
11157
+ "dependencies": {
11158
+ "@types/mdast": "^4.0.0",
11159
+ "@types/unist": "^3.0.0",
11160
+ "longest-streak": "^3.0.0",
11161
+ "mdast-util-phrasing": "^4.0.0",
11162
+ "mdast-util-to-string": "^4.0.0",
11163
+ "micromark-util-decode-string": "^2.0.0",
11164
+ "unist-util-visit": "^5.0.0",
11165
+ "zwitch": "^2.0.0"
11166
+ }
11167
+ },
11168
+ "node_modules/mdast-util-to-string": {
11169
+ "version": "4.0.0",
11170
+ "resolved": "https://registry.npmmirror.com/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz",
11171
+ "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==",
11172
+ "dependencies": {
11173
+ "@types/mdast": "^4.0.0"
11174
+ }
11175
+ },
11176
  "node_modules/mdn-data": {
11177
  "version": "2.0.14",
11178
  "resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.14.tgz",
 
11225
  "node": ">= 8"
11226
  }
11227
  },
11228
+ "node_modules/micromark": {
11229
+ "version": "4.0.0",
11230
+ "resolved": "https://registry.npmmirror.com/micromark/-/micromark-4.0.0.tgz",
11231
+ "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==",
11232
+ "dependencies": {
11233
+ "@types/debug": "^4.0.0",
11234
+ "debug": "^4.0.0",
11235
+ "decode-named-character-reference": "^1.0.0",
11236
+ "devlop": "^1.0.0",
11237
+ "micromark-core-commonmark": "^2.0.0",
11238
+ "micromark-factory-space": "^2.0.0",
11239
+ "micromark-util-character": "^2.0.0",
11240
+ "micromark-util-chunked": "^2.0.0",
11241
+ "micromark-util-combine-extensions": "^2.0.0",
11242
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
11243
+ "micromark-util-encode": "^2.0.0",
11244
+ "micromark-util-normalize-identifier": "^2.0.0",
11245
+ "micromark-util-resolve-all": "^2.0.0",
11246
+ "micromark-util-sanitize-uri": "^2.0.0",
11247
+ "micromark-util-subtokenize": "^2.0.0",
11248
+ "micromark-util-symbol": "^2.0.0",
11249
+ "micromark-util-types": "^2.0.0"
11250
+ }
11251
+ },
11252
+ "node_modules/micromark-core-commonmark": {
11253
+ "version": "2.0.0",
11254
+ "resolved": "https://registry.npmmirror.com/micromark-core-commonmark/-/micromark-core-commonmark-2.0.0.tgz",
11255
+ "integrity": "sha512-jThOz/pVmAYUtkroV3D5c1osFXAMv9e0ypGDOIZuCeAe91/sD6BoE2Sjzt30yuXtwOYUmySOhMas/PVyh02itA==",
11256
+ "dependencies": {
11257
+ "decode-named-character-reference": "^1.0.0",
11258
+ "devlop": "^1.0.0",
11259
+ "micromark-factory-destination": "^2.0.0",
11260
+ "micromark-factory-label": "^2.0.0",
11261
+ "micromark-factory-space": "^2.0.0",
11262
+ "micromark-factory-title": "^2.0.0",
11263
+ "micromark-factory-whitespace": "^2.0.0",
11264
+ "micromark-util-character": "^2.0.0",
11265
+ "micromark-util-chunked": "^2.0.0",
11266
+ "micromark-util-classify-character": "^2.0.0",
11267
+ "micromark-util-html-tag-name": "^2.0.0",
11268
+ "micromark-util-normalize-identifier": "^2.0.0",
11269
+ "micromark-util-resolve-all": "^2.0.0",
11270
+ "micromark-util-subtokenize": "^2.0.0",
11271
+ "micromark-util-symbol": "^2.0.0",
11272
+ "micromark-util-types": "^2.0.0"
11273
+ }
11274
+ },
11275
+ "node_modules/micromark-factory-destination": {
11276
+ "version": "2.0.0",
11277
+ "resolved": "https://registry.npmmirror.com/micromark-factory-destination/-/micromark-factory-destination-2.0.0.tgz",
11278
+ "integrity": "sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==",
11279
+ "dependencies": {
11280
+ "micromark-util-character": "^2.0.0",
11281
+ "micromark-util-symbol": "^2.0.0",
11282
+ "micromark-util-types": "^2.0.0"
11283
+ }
11284
+ },
11285
+ "node_modules/micromark-factory-label": {
11286
+ "version": "2.0.0",
11287
+ "resolved": "https://registry.npmmirror.com/micromark-factory-label/-/micromark-factory-label-2.0.0.tgz",
11288
+ "integrity": "sha512-RR3i96ohZGde//4WSe/dJsxOX6vxIg9TimLAS3i4EhBAFx8Sm5SmqVfR8E87DPSR31nEAjZfbt91OMZWcNgdZw==",
11289
+ "dependencies": {
11290
+ "devlop": "^1.0.0",
11291
+ "micromark-util-character": "^2.0.0",
11292
+ "micromark-util-symbol": "^2.0.0",
11293
+ "micromark-util-types": "^2.0.0"
11294
+ }
11295
+ },
11296
+ "node_modules/micromark-factory-space": {
11297
+ "version": "2.0.0",
11298
+ "resolved": "https://registry.npmmirror.com/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz",
11299
+ "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==",
11300
+ "dependencies": {
11301
+ "micromark-util-character": "^2.0.0",
11302
+ "micromark-util-types": "^2.0.0"
11303
+ }
11304
+ },
11305
+ "node_modules/micromark-factory-title": {
11306
+ "version": "2.0.0",
11307
+ "resolved": "https://registry.npmmirror.com/micromark-factory-title/-/micromark-factory-title-2.0.0.tgz",
11308
+ "integrity": "sha512-jY8CSxmpWLOxS+t8W+FG3Xigc0RDQA9bKMY/EwILvsesiRniiVMejYTE4wumNc2f4UbAa4WsHqe3J1QS1sli+A==",
11309
+ "dependencies": {
11310
+ "micromark-factory-space": "^2.0.0",
11311
+ "micromark-util-character": "^2.0.0",
11312
+ "micromark-util-symbol": "^2.0.0",
11313
+ "micromark-util-types": "^2.0.0"
11314
+ }
11315
+ },
11316
+ "node_modules/micromark-factory-whitespace": {
11317
+ "version": "2.0.0",
11318
+ "resolved": "https://registry.npmmirror.com/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.0.tgz",
11319
+ "integrity": "sha512-28kbwaBjc5yAI1XadbdPYHX/eDnqaUFVikLwrO7FDnKG7lpgxnvk/XGRhX/PN0mOZ+dBSZ+LgunHS+6tYQAzhA==",
11320
+ "dependencies": {
11321
+ "micromark-factory-space": "^2.0.0",
11322
+ "micromark-util-character": "^2.0.0",
11323
+ "micromark-util-symbol": "^2.0.0",
11324
+ "micromark-util-types": "^2.0.0"
11325
+ }
11326
+ },
11327
+ "node_modules/micromark-util-character": {
11328
+ "version": "2.1.0",
11329
+ "resolved": "https://registry.npmmirror.com/micromark-util-character/-/micromark-util-character-2.1.0.tgz",
11330
+ "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==",
11331
+ "dependencies": {
11332
+ "micromark-util-symbol": "^2.0.0",
11333
+ "micromark-util-types": "^2.0.0"
11334
+ }
11335
+ },
11336
+ "node_modules/micromark-util-chunked": {
11337
+ "version": "2.0.0",
11338
+ "resolved": "https://registry.npmmirror.com/micromark-util-chunked/-/micromark-util-chunked-2.0.0.tgz",
11339
+ "integrity": "sha512-anK8SWmNphkXdaKgz5hJvGa7l00qmcaUQoMYsBwDlSKFKjc6gjGXPDw3FNL3Nbwq5L8gE+RCbGqTw49FK5Qyvg==",
11340
+ "dependencies": {
11341
+ "micromark-util-symbol": "^2.0.0"
11342
+ }
11343
+ },
11344
+ "node_modules/micromark-util-classify-character": {
11345
+ "version": "2.0.0",
11346
+ "resolved": "https://registry.npmmirror.com/micromark-util-classify-character/-/micromark-util-classify-character-2.0.0.tgz",
11347
+ "integrity": "sha512-S0ze2R9GH+fu41FA7pbSqNWObo/kzwf8rN/+IGlW/4tC6oACOs8B++bh+i9bVyNnwCcuksbFwsBme5OCKXCwIw==",
11348
+ "dependencies": {
11349
+ "micromark-util-character": "^2.0.0",
11350
+ "micromark-util-symbol": "^2.0.0",
11351
+ "micromark-util-types": "^2.0.0"
11352
+ }
11353
+ },
11354
+ "node_modules/micromark-util-combine-extensions": {
11355
+ "version": "2.0.0",
11356
+ "resolved": "https://registry.npmmirror.com/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.0.tgz",
11357
+ "integrity": "sha512-vZZio48k7ON0fVS3CUgFatWHoKbbLTK/rT7pzpJ4Bjp5JjkZeasRfrS9wsBdDJK2cJLHMckXZdzPSSr1B8a4oQ==",
11358
+ "dependencies": {
11359
+ "micromark-util-chunked": "^2.0.0",
11360
+ "micromark-util-types": "^2.0.0"
11361
+ }
11362
+ },
11363
+ "node_modules/micromark-util-decode-numeric-character-reference": {
11364
+ "version": "2.0.1",
11365
+ "resolved": "https://registry.npmmirror.com/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.1.tgz",
11366
+ "integrity": "sha512-bmkNc7z8Wn6kgjZmVHOX3SowGmVdhYS7yBpMnuMnPzDq/6xwVA604DuOXMZTO1lvq01g+Adfa0pE2UKGlxL1XQ==",
11367
+ "dependencies": {
11368
+ "micromark-util-symbol": "^2.0.0"
11369
+ }
11370
+ },
11371
+ "node_modules/micromark-util-decode-string": {
11372
+ "version": "2.0.0",
11373
+ "resolved": "https://registry.npmmirror.com/micromark-util-decode-string/-/micromark-util-decode-string-2.0.0.tgz",
11374
+ "integrity": "sha512-r4Sc6leeUTn3P6gk20aFMj2ntPwn6qpDZqWvYmAG6NgvFTIlj4WtrAudLi65qYoaGdXYViXYw2pkmn7QnIFasA==",
11375
+ "dependencies": {
11376
+ "decode-named-character-reference": "^1.0.0",
11377
+ "micromark-util-character": "^2.0.0",
11378
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
11379
+ "micromark-util-symbol": "^2.0.0"
11380
+ }
11381
+ },
11382
+ "node_modules/micromark-util-encode": {
11383
+ "version": "2.0.0",
11384
+ "resolved": "https://registry.npmmirror.com/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz",
11385
+ "integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA=="
11386
+ },
11387
+ "node_modules/micromark-util-html-tag-name": {
11388
+ "version": "2.0.0",
11389
+ "resolved": "https://registry.npmmirror.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.0.tgz",
11390
+ "integrity": "sha512-xNn4Pqkj2puRhKdKTm8t1YHC/BAjx6CEwRFXntTaRf/x16aqka6ouVoutm+QdkISTlT7e2zU7U4ZdlDLJd2Mcw=="
11391
+ },
11392
+ "node_modules/micromark-util-normalize-identifier": {
11393
+ "version": "2.0.0",
11394
+ "resolved": "https://registry.npmmirror.com/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.0.tgz",
11395
+ "integrity": "sha512-2xhYT0sfo85FMrUPtHcPo2rrp1lwbDEEzpx7jiH2xXJLqBuy4H0GgXk5ToU8IEwoROtXuL8ND0ttVa4rNqYK3w==",
11396
+ "dependencies": {
11397
+ "micromark-util-symbol": "^2.0.0"
11398
+ }
11399
+ },
11400
+ "node_modules/micromark-util-resolve-all": {
11401
+ "version": "2.0.0",
11402
+ "resolved": "https://registry.npmmirror.com/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.0.tgz",
11403
+ "integrity": "sha512-6KU6qO7DZ7GJkaCgwBNtplXCvGkJToU86ybBAUdavvgsCiG8lSSvYxr9MhwmQ+udpzywHsl4RpGJsYWG1pDOcA==",
11404
+ "dependencies": {
11405
+ "micromark-util-types": "^2.0.0"
11406
+ }
11407
+ },
11408
+ "node_modules/micromark-util-sanitize-uri": {
11409
+ "version": "2.0.0",
11410
+ "resolved": "https://registry.npmmirror.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz",
11411
+ "integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==",
11412
+ "dependencies": {
11413
+ "micromark-util-character": "^2.0.0",
11414
+ "micromark-util-encode": "^2.0.0",
11415
+ "micromark-util-symbol": "^2.0.0"
11416
+ }
11417
+ },
11418
+ "node_modules/micromark-util-subtokenize": {
11419
+ "version": "2.0.0",
11420
+ "resolved": "https://registry.npmmirror.com/micromark-util-subtokenize/-/micromark-util-subtokenize-2.0.0.tgz",
11421
+ "integrity": "sha512-vc93L1t+gpR3p8jxeVdaYlbV2jTYteDje19rNSS/H5dlhxUYll5Fy6vJ2cDwP8RnsXi818yGty1ayP55y3W6fg==",
11422
+ "dependencies": {
11423
+ "devlop": "^1.0.0",
11424
+ "micromark-util-chunked": "^2.0.0",
11425
+ "micromark-util-symbol": "^2.0.0",
11426
+ "micromark-util-types": "^2.0.0"
11427
+ }
11428
+ },
11429
+ "node_modules/micromark-util-symbol": {
11430
+ "version": "2.0.0",
11431
+ "resolved": "https://registry.npmmirror.com/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz",
11432
+ "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw=="
11433
+ },
11434
+ "node_modules/micromark-util-types": {
11435
+ "version": "2.0.0",
11436
+ "resolved": "https://registry.npmmirror.com/micromark-util-types/-/micromark-util-types-2.0.0.tgz",
11437
+ "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w=="
11438
+ },
11439
  "node_modules/micromatch": {
11440
  "version": "4.0.5",
11441
  "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz",
 
12289
  "safe-buffer": "^5.1.1"
12290
  }
12291
  },
12292
+ "node_modules/parse-entities": {
12293
+ "version": "4.0.1",
12294
+ "resolved": "https://registry.npmmirror.com/parse-entities/-/parse-entities-4.0.1.tgz",
12295
+ "integrity": "sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==",
12296
+ "dependencies": {
12297
+ "@types/unist": "^2.0.0",
12298
+ "character-entities": "^2.0.0",
12299
+ "character-entities-legacy": "^3.0.0",
12300
+ "character-reference-invalid": "^2.0.0",
12301
+ "decode-named-character-reference": "^1.0.0",
12302
+ "is-alphanumerical": "^2.0.0",
12303
+ "is-decimal": "^2.0.0",
12304
+ "is-hexadecimal": "^2.0.0"
12305
+ }
12306
+ },
12307
+ "node_modules/parse-entities/node_modules/@types/unist": {
12308
+ "version": "2.0.10",
12309
+ "resolved": "https://registry.npmmirror.com/@types/unist/-/unist-2.0.10.tgz",
12310
+ "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA=="
12311
+ },
12312
  "node_modules/parse-json": {
12313
  "version": "5.2.0",
12314
  "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz",
 
13239
  "resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz",
13240
  "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
13241
  },
13242
+ "node_modules/property-information": {
13243
+ "version": "6.4.1",
13244
+ "resolved": "https://registry.npmmirror.com/property-information/-/property-information-6.4.1.tgz",
13245
+ "integrity": "sha512-OHYtXfu5aI2sS2LWFSN5rgJjrQ4pCy8i1jubJLe2QvMF8JJ++HXTUIVWFLfXJoaOfvYYjk2SN8J2wFUWIGXT4w=="
13246
+ },
13247
  "node_modules/proxy-compare": {
13248
  "version": "2.5.1",
13249
  "resolved": "https://registry.npmmirror.com/proxy-compare/-/proxy-compare-2.5.1.tgz",
 
14387
  "resolved": "https://registry.npmmirror.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
14388
  "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
14389
  },
14390
+ "node_modules/react-markdown": {
14391
+ "version": "9.0.1",
14392
+ "resolved": "https://registry.npmmirror.com/react-markdown/-/react-markdown-9.0.1.tgz",
14393
+ "integrity": "sha512-186Gw/vF1uRkydbsOIkcGXw7aHq0sZOCRFFjGrr7b9+nVZg4UfA4enXCaxm4fUzecU38sWfrNDitGhshuU7rdg==",
14394
+ "dependencies": {
14395
+ "@types/hast": "^3.0.0",
14396
+ "devlop": "^1.0.0",
14397
+ "hast-util-to-jsx-runtime": "^2.0.0",
14398
+ "html-url-attributes": "^3.0.0",
14399
+ "mdast-util-to-hast": "^13.0.0",
14400
+ "remark-parse": "^11.0.0",
14401
+ "remark-rehype": "^11.0.0",
14402
+ "unified": "^11.0.0",
14403
+ "unist-util-visit": "^5.0.0",
14404
+ "vfile": "^6.0.0"
14405
+ },
14406
+ "peerDependencies": {
14407
+ "@types/react": ">=18",
14408
+ "react": ">=18"
14409
+ }
14410
+ },
14411
  "node_modules/react-merge-refs": {
14412
  "version": "1.1.0",
14413
  "resolved": "https://registry.npmmirror.com/react-merge-refs/-/react-merge-refs-1.1.0.tgz",
 
14530
  "prop-types": "^15.5.8"
14531
  }
14532
  },
14533
+ "node_modules/react-string-replace": {
14534
+ "version": "1.1.1",
14535
+ "resolved": "https://registry.npmmirror.com/react-string-replace/-/react-string-replace-1.1.1.tgz",
14536
+ "integrity": "sha512-26TUbLzLfHQ5jO5N7y3Mx88eeKo0Ml0UjCQuX4BMfOd/JX+enQqlKpL1CZnmjeBRvQE8TR+ds9j1rqx9CxhKHQ==",
14537
+ "engines": {
14538
+ "node": ">=0.12.0"
14539
+ }
14540
+ },
14541
  "node_modules/reactcss": {
14542
  "version": "1.2.3",
14543
  "resolved": "https://registry.npmmirror.com/reactcss/-/reactcss-1.2.3.tgz",
 
14826
  "node": ">= 0.10"
14827
  }
14828
  },
14829
+ "node_modules/remark-parse": {
14830
+ "version": "11.0.0",
14831
+ "resolved": "https://registry.npmmirror.com/remark-parse/-/remark-parse-11.0.0.tgz",
14832
+ "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==",
14833
+ "dependencies": {
14834
+ "@types/mdast": "^4.0.0",
14835
+ "mdast-util-from-markdown": "^2.0.0",
14836
+ "micromark-util-types": "^2.0.0",
14837
+ "unified": "^11.0.0"
14838
+ }
14839
+ },
14840
+ "node_modules/remark-rehype": {
14841
+ "version": "11.1.0",
14842
+ "resolved": "https://registry.npmmirror.com/remark-rehype/-/remark-rehype-11.1.0.tgz",
14843
+ "integrity": "sha512-z3tJrAs2kIs1AqIIy6pzHmAHlF1hWQ+OdY4/hv+Wxe35EhyLKcajL33iUEn3ScxtFox9nUvRufR/Zre8Q08H/g==",
14844
+ "dependencies": {
14845
+ "@types/hast": "^3.0.0",
14846
+ "@types/mdast": "^4.0.0",
14847
+ "mdast-util-to-hast": "^13.0.0",
14848
+ "unified": "^11.0.0",
14849
+ "vfile": "^6.0.0"
14850
+ }
14851
+ },
14852
  "node_modules/remove-accents": {
14853
  "version": "0.4.2",
14854
  "resolved": "https://registry.npmmirror.com/remove-accents/-/remove-accents-0.4.2.tgz",
 
15622
  "deprecated": "See https://github.com/lydell/source-map-url#deprecated",
15623
  "dev": true
15624
  },
15625
+ "node_modules/space-separated-tokens": {
15626
+ "version": "2.0.2",
15627
+ "resolved": "https://registry.npmmirror.com/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz",
15628
+ "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="
15629
+ },
15630
  "node_modules/spdx-correct": {
15631
  "version": "3.2.0",
15632
  "resolved": "https://registry.npmmirror.com/spdx-correct/-/spdx-correct-3.2.0.tgz",
 
15953
  "es-abstract": "^1.22.1"
15954
  }
15955
  },
15956
+ "node_modules/stringify-entities": {
15957
+ "version": "4.0.3",
15958
+ "resolved": "https://registry.npmmirror.com/stringify-entities/-/stringify-entities-4.0.3.tgz",
15959
+ "integrity": "sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==",
15960
+ "dependencies": {
15961
+ "character-entities-html4": "^2.0.0",
15962
+ "character-entities-legacy": "^3.0.0"
15963
+ }
15964
+ },
15965
  "node_modules/strip-ansi": {
15966
  "version": "6.0.1",
15967
  "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
 
16008
  "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==",
16009
  "peer": true
16010
  },
16011
+ "node_modules/style-to-object": {
16012
+ "version": "1.0.5",
16013
+ "resolved": "https://registry.npmmirror.com/style-to-object/-/style-to-object-1.0.5.tgz",
16014
+ "integrity": "sha512-rDRwHtoDD3UMMrmZ6BzOW0naTjMsVZLIjsGleSKS/0Oz+cgCfAPRspaqJuE8rDzpKha/nEvnM0IF4seEAZUTKQ==",
16015
+ "dependencies": {
16016
+ "inline-style-parser": "0.2.2"
16017
+ }
16018
+ },
16019
  "node_modules/style-utils": {
16020
  "version": "0.3.8",
16021
  "resolved": "https://registry.npmmirror.com/style-utils/-/style-utils-0.3.8.tgz",
 
16584
  "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
16585
  "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
16586
  },
16587
+ "node_modules/trim-lines": {
16588
+ "version": "3.0.1",
16589
+ "resolved": "https://registry.npmmirror.com/trim-lines/-/trim-lines-3.0.1.tgz",
16590
+ "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="
16591
+ },
16592
  "node_modules/trim-newlines": {
16593
  "version": "3.0.1",
16594
  "resolved": "https://registry.npmmirror.com/trim-newlines/-/trim-newlines-3.0.1.tgz",
 
16598
  "node": ">=8"
16599
  }
16600
  },
16601
+ "node_modules/trough": {
16602
+ "version": "2.2.0",
16603
+ "resolved": "https://registry.npmmirror.com/trough/-/trough-2.2.0.tgz",
16604
+ "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="
16605
+ },
16606
  "node_modules/tslib": {
16607
  "version": "2.6.2",
16608
  "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.6.2.tgz",
 
17329
  "./packages/isomorphic-unfetch"
17330
  ]
17331
  },
17332
+ "node_modules/unified": {
17333
+ "version": "11.0.4",
17334
+ "resolved": "https://registry.npmmirror.com/unified/-/unified-11.0.4.tgz",
17335
+ "integrity": "sha512-apMPnyLjAX+ty4OrNap7yumyVAMlKx5IWU2wlzzUdYJO9A8f1p9m/gywF/GM2ZDFcjQPrx59Mc90KwmxsoklxQ==",
17336
+ "dependencies": {
17337
+ "@types/unist": "^3.0.0",
17338
+ "bail": "^2.0.0",
17339
+ "devlop": "^1.0.0",
17340
+ "extend": "^3.0.0",
17341
+ "is-plain-obj": "^4.0.0",
17342
+ "trough": "^2.0.0",
17343
+ "vfile": "^6.0.0"
17344
+ }
17345
+ },
17346
  "node_modules/union-value": {
17347
  "version": "1.0.1",
17348
  "resolved": "https://registry.npmmirror.com/union-value/-/union-value-1.0.1.tgz",
 
17367
  "node": ">=0.10.0"
17368
  }
17369
  },
17370
+ "node_modules/unist-util-is": {
17371
+ "version": "6.0.0",
17372
+ "resolved": "https://registry.npmmirror.com/unist-util-is/-/unist-util-is-6.0.0.tgz",
17373
+ "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==",
17374
+ "dependencies": {
17375
+ "@types/unist": "^3.0.0"
17376
+ }
17377
+ },
17378
+ "node_modules/unist-util-position": {
17379
+ "version": "5.0.0",
17380
+ "resolved": "https://registry.npmmirror.com/unist-util-position/-/unist-util-position-5.0.0.tgz",
17381
+ "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==",
17382
+ "dependencies": {
17383
+ "@types/unist": "^3.0.0"
17384
+ }
17385
+ },
17386
+ "node_modules/unist-util-remove-position": {
17387
+ "version": "5.0.0",
17388
+ "resolved": "https://registry.npmmirror.com/unist-util-remove-position/-/unist-util-remove-position-5.0.0.tgz",
17389
+ "integrity": "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==",
17390
+ "dependencies": {
17391
+ "@types/unist": "^3.0.0",
17392
+ "unist-util-visit": "^5.0.0"
17393
+ }
17394
+ },
17395
+ "node_modules/unist-util-stringify-position": {
17396
+ "version": "4.0.0",
17397
+ "resolved": "https://registry.npmmirror.com/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
17398
+ "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==",
17399
+ "dependencies": {
17400
+ "@types/unist": "^3.0.0"
17401
+ }
17402
+ },
17403
+ "node_modules/unist-util-visit": {
17404
+ "version": "5.0.0",
17405
+ "resolved": "https://registry.npmmirror.com/unist-util-visit/-/unist-util-visit-5.0.0.tgz",
17406
+ "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==",
17407
+ "dependencies": {
17408
+ "@types/unist": "^3.0.0",
17409
+ "unist-util-is": "^6.0.0",
17410
+ "unist-util-visit-parents": "^6.0.0"
17411
+ }
17412
+ },
17413
+ "node_modules/unist-util-visit-parents": {
17414
+ "version": "6.0.1",
17415
+ "resolved": "https://registry.npmmirror.com/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz",
17416
+ "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==",
17417
+ "dependencies": {
17418
+ "@types/unist": "^3.0.0",
17419
+ "unist-util-is": "^6.0.0"
17420
+ }
17421
+ },
17422
  "node_modules/universalify": {
17423
  "version": "2.0.1",
17424
  "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz",
 
17671
  "node": ">= 0.8"
17672
  }
17673
  },
17674
+ "node_modules/vfile": {
17675
+ "version": "6.0.1",
17676
+ "resolved": "https://registry.npmmirror.com/vfile/-/vfile-6.0.1.tgz",
17677
+ "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==",
17678
+ "dependencies": {
17679
+ "@types/unist": "^3.0.0",
17680
+ "unist-util-stringify-position": "^4.0.0",
17681
+ "vfile-message": "^4.0.0"
17682
+ }
17683
+ },
17684
+ "node_modules/vfile-message": {
17685
+ "version": "4.0.2",
17686
+ "resolved": "https://registry.npmmirror.com/vfile-message/-/vfile-message-4.0.2.tgz",
17687
+ "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==",
17688
+ "dependencies": {
17689
+ "@types/unist": "^3.0.0",
17690
+ "unist-util-stringify-position": "^4.0.0"
17691
+ }
17692
+ },
17693
  "node_modules/vite": {
17694
  "version": "4.3.1",
17695
  "resolved": "https://registry.npmmirror.com/vite/-/vite-4.3.1.tgz",
 
18066
  "engines": {
18067
  "node": ">=10"
18068
  }
18069
+ },
18070
+ "node_modules/zwitch": {
18071
+ "version": "2.0.4",
18072
+ "resolved": "https://registry.npmmirror.com/zwitch/-/zwitch-2.0.4.tgz",
18073
+ "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="
18074
  }
18075
  }
18076
  }
web/package.json CHANGED
@@ -25,8 +25,11 @@
25
  "react-chat-elements": "^12.0.13",
26
  "react-i18next": "^14.0.0",
27
  "react-infinite-scroll-component": "^6.1.0",
 
 
28
  "umi": "^4.0.90",
29
  "umi-request": "^1.4.0",
 
30
  "uuid": "^9.0.1"
31
  },
32
  "devDependencies": {
 
25
  "react-chat-elements": "^12.0.13",
26
  "react-i18next": "^14.0.0",
27
  "react-infinite-scroll-component": "^6.1.0",
28
+ "react-markdown": "^9.0.1",
29
+ "react-string-replace": "^1.1.1",
30
  "umi": "^4.0.90",
31
  "umi-request": "^1.4.0",
32
+ "unist-util-visit-parents": "^6.0.1",
33
  "uuid": "^9.0.1"
34
  },
35
  "devDependencies": {
web/src/assets/svg/assistant.svg ADDED
web/src/hooks/userSettingHook.ts ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { IUserInfo } from '@/interfaces/database/userSetting';
2
+ import { useCallback, useEffect } from 'react';
3
+ import { useDispatch, useSelector } from 'umi';
4
+
5
+ export const useFetchUserInfo = () => {
6
+ const dispatch = useDispatch();
7
+ const fetchUserInfo = useCallback(() => {
8
+ dispatch({ type: 'settingModel/getUserInfo' });
9
+ }, [dispatch]);
10
+
11
+ useEffect(() => {
12
+ fetchUserInfo();
13
+ }, [fetchUserInfo]);
14
+ };
15
+
16
+ export const useSelectUserInfo = () => {
17
+ const userInfo: IUserInfo = useSelector(
18
+ (state: any) => state.settingModel.userInfo,
19
+ );
20
+
21
+ return userInfo;
22
+ };
web/src/interfaces/database/chat.ts CHANGED
@@ -54,7 +54,7 @@ export interface IConversation {
54
  dialog_id: string;
55
  id: string;
56
  message: Message[];
57
- reference: any[];
58
  name: string;
59
  update_date: string;
60
  update_time: number;
@@ -64,3 +64,29 @@ export interface Message {
64
  content: string;
65
  role: MessageType;
66
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  dialog_id: string;
55
  id: string;
56
  message: Message[];
57
+ reference: IReference[];
58
  name: string;
59
  update_date: string;
60
  update_time: number;
 
64
  content: string;
65
  role: MessageType;
66
  }
67
+
68
+ export interface IReference {
69
+ chunks: Chunk[];
70
+ doc_aggs: Docagg[];
71
+ total: number;
72
+ }
73
+
74
+ interface Docagg {
75
+ count: number;
76
+ doc_id: string;
77
+ doc_name: string;
78
+ }
79
+
80
+ interface Chunk {
81
+ chunk_id: string;
82
+ content_ltks: string;
83
+ content_with_weight: string;
84
+ doc_id: string;
85
+ docnm_kwd: string;
86
+ img_id: string;
87
+ important_kwd: any[];
88
+ kb_id: string;
89
+ similarity: number;
90
+ term_similarity: number;
91
+ vector_similarity: number;
92
+ }
web/src/interfaces/database/userSetting.ts ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export interface IUserInfo {
2
+ access_token: string;
3
+ avatar?: any;
4
+ color_schema: string;
5
+ create_date: string;
6
+ create_time: number;
7
+ email: string;
8
+ id: string;
9
+ is_active: string;
10
+ is_anonymous: string;
11
+ is_authenticated: string;
12
+ is_superuser: boolean;
13
+ language: string;
14
+ last_login_time: string;
15
+ login_channel: string;
16
+ nickname: string;
17
+ password: string;
18
+ status: string;
19
+ update_date: string;
20
+ update_time: number;
21
+ }
web/src/layouts/components/header/index.tsx CHANGED
@@ -19,17 +19,20 @@ const RagHeader = () => {
19
  const navigate = useNavigate();
20
  const { pathname } = useLocation();
21
 
22
- const tagsData = [
23
- { path: '/knowledge', name: 'Knowledge Base', icon: KnowledgeBaseIcon },
24
- { path: '/chat', name: 'Chat', icon: StarIon },
25
- { path: '/file', name: 'File Management', icon: FileIcon },
26
- ];
 
 
 
27
 
28
  const currentPath = useMemo(() => {
29
  return (
30
  tagsData.find((x) => pathname.startsWith(x.path))?.name || 'knowledge'
31
  );
32
- }, [pathname]);
33
 
34
  const handleChange = (path: string) => {
35
  navigate(path);
@@ -48,7 +51,7 @@ const RagHeader = () => {
48
  >
49
  <Space size={12}>
50
  <Logo className={styles.appIcon}></Logo>
51
- <label className={styles.appName}>Infinity flow</label>
52
  </Space>
53
  <Space size={[0, 8]} wrap>
54
  <Radio.Group
 
19
  const navigate = useNavigate();
20
  const { pathname } = useLocation();
21
 
22
+ const tagsData = useMemo(
23
+ () => [
24
+ { path: '/knowledge', name: 'Knowledge Base', icon: KnowledgeBaseIcon },
25
+ { path: '/chat', name: 'Chat', icon: StarIon },
26
+ { path: '/file', name: 'File Management', icon: FileIcon },
27
+ ],
28
+ [],
29
+ );
30
 
31
  const currentPath = useMemo(() => {
32
  return (
33
  tagsData.find((x) => pathname.startsWith(x.path))?.name || 'knowledge'
34
  );
35
+ }, [pathname, tagsData]);
36
 
37
  const handleChange = (path: string) => {
38
  navigate(path);
 
51
  >
52
  <Space size={12}>
53
  <Logo className={styles.appIcon}></Logo>
54
+ <label className={styles.appName}>RagFlow</label>
55
  </Space>
56
  <Space size={[0, 8]} wrap>
57
  <Radio.Group
web/src/layouts/components/user/index.tsx CHANGED
@@ -1,3 +1,4 @@
 
1
  import authorizationUtil from '@/utils/authorizationUtil';
2
  import type { MenuProps } from 'antd';
3
  import { Avatar, Button, Dropdown } from 'antd';
@@ -7,6 +8,7 @@ import { history } from 'umi';
7
 
8
  const App: React.FC = () => {
9
  const { t } = useTranslation();
 
10
 
11
  const logout = () => {
12
  authorizationUtil.removeAll();
@@ -36,13 +38,18 @@ const App: React.FC = () => {
36
  ),
37
  },
38
  ];
39
- }, []);
 
 
40
 
41
  return (
42
  <Dropdown menu={{ items }} placement="bottomLeft" arrow>
43
  <Avatar
44
  size={32}
45
- src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
 
 
 
46
  />
47
  </Dropdown>
48
  );
 
1
+ import { useFetchUserInfo, useSelectUserInfo } from '@/hooks/userSettingHook';
2
  import authorizationUtil from '@/utils/authorizationUtil';
3
  import type { MenuProps } from 'antd';
4
  import { Avatar, Button, Dropdown } from 'antd';
 
8
 
9
  const App: React.FC = () => {
10
  const { t } = useTranslation();
11
+ const userInfo = useSelectUserInfo();
12
 
13
  const logout = () => {
14
  authorizationUtil.removeAll();
 
38
  ),
39
  },
40
  ];
41
+ }, [t]);
42
+
43
+ useFetchUserInfo();
44
 
45
  return (
46
  <Dropdown menu={{ items }} placement="bottomLeft" arrow>
47
  <Avatar
48
  size={32}
49
+ src={
50
+ userInfo.avatar ??
51
+ 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
52
+ }
53
  />
54
  </Dropdown>
55
  );
web/src/pages/chat/chat-container/index.less CHANGED
@@ -1,11 +1,34 @@
1
  .chatContainer {
2
  padding: 0 24px 24px;
 
 
 
3
  }
4
 
5
  .messageItem {
6
- .messageItemContent {
 
7
  display: inline-block;
8
- width: 300px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  }
10
  }
11
 
 
1
  .chatContainer {
2
  padding: 0 24px 24px;
3
+ .messageContainer {
4
+ overflow-y: auto;
5
+ }
6
  }
7
 
8
  .messageItem {
9
+ padding: 24px 0;
10
+ .messageItemSection {
11
  display: inline-block;
12
+ }
13
+ .messageItemSectionLeft {
14
+ width: 70%;
15
+ }
16
+ .messageItemSectionRight {
17
+ width: 30%;
18
+ }
19
+ .messageItemContent {
20
+ display: inline-flex;
21
+ gap: 20px;
22
+ }
23
+ .messageItemContentReverse {
24
+ flex-direction: row-reverse;
25
+ }
26
+ .messageText {
27
+ padding: 0 14px;
28
+ background-color: rgba(249, 250, 251, 1);
29
+ }
30
+ .referenceIcon {
31
+ padding: 0 6px;
32
  }
33
  }
34
 
web/src/pages/chat/chat-container/index.tsx CHANGED
@@ -1,17 +1,59 @@
1
- import { Button, Flex, Input, Typography } from 'antd';
2
- import { ChangeEventHandler, useState } from 'react';
3
-
4
- import { Message } from '@/interfaces/database/chat';
 
 
5
  import classNames from 'classnames';
 
 
6
  import { useFetchConversation, useSendMessage } from '../hooks';
7
-
8
- import { MessageType } from '@/constants/chat';
9
  import { IClientConversation } from '../interface';
 
 
 
 
10
  import styles from './index.less';
11
 
12
- const { Paragraph } = Typography;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- const MessageItem = ({ item }: { item: Message }) => {
15
  return (
16
  <div
17
  className={classNames(styles.messageItem, {
@@ -19,11 +61,50 @@ const MessageItem = ({ item }: { item: Message }) => {
19
  [styles.messageItemRight]: item.role === MessageType.User,
20
  })}
21
  >
22
- <span className={styles.messageItemContent}>
23
- <Paragraph ellipsis={{ tooltip: item.content, rows: 3 }}>
24
- {item.content}
25
- </Paragraph>
26
- </span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  </div>
28
  );
29
  };
@@ -32,9 +113,13 @@ const ChatContainer = () => {
32
  const [value, setValue] = useState('');
33
  const conversation: IClientConversation = useFetchConversation();
34
  const { sendMessage } = useSendMessage();
 
 
 
 
35
 
36
  const handlePressEnter = () => {
37
- console.info(value);
38
  sendMessage(value);
39
  };
40
 
@@ -44,17 +129,23 @@ const ChatContainer = () => {
44
 
45
  return (
46
  <Flex flex={1} className={styles.chatContainer} vertical>
47
- <Flex flex={1} vertical>
48
- {conversation?.message?.map((message) => (
49
- <MessageItem key={message.id} item={message}></MessageItem>
50
- ))}
 
 
 
 
 
 
51
  </Flex>
52
  <Input
53
  size="large"
54
  placeholder="Message Resume Assistant..."
55
  value={value}
56
  suffix={
57
- <Button type="primary" onClick={handlePressEnter}>
58
  Send
59
  </Button>
60
  }
 
1
+ import { ReactComponent as AssistantIcon } from '@/assets/svg/assistant.svg';
2
+ import { MessageType } from '@/constants/chat';
3
+ import { useOneNamespaceEffectsLoading } from '@/hooks/storeHooks';
4
+ import { useSelectUserInfo } from '@/hooks/userSettingHook';
5
+ import { IReference, Message } from '@/interfaces/database/chat';
6
+ import { Avatar, Button, Flex, Input, Popover } from 'antd';
7
  import classNames from 'classnames';
8
+ import { ChangeEventHandler, useCallback, useMemo, useState } from 'react';
9
+ import reactStringReplace from 'react-string-replace';
10
  import { useFetchConversation, useSendMessage } from '../hooks';
 
 
11
  import { IClientConversation } from '../interface';
12
+
13
+ import { InfoCircleOutlined } from '@ant-design/icons';
14
+ import Markdown from 'react-markdown';
15
+ import { visitParents } from 'unist-util-visit-parents';
16
  import styles from './index.less';
17
 
18
+ const rehypeWrapReference = () => {
19
+ return function wrapTextTransform(tree: any) {
20
+ visitParents(tree, 'text', (node, ancestors) => {
21
+ if (ancestors.at(-1).tagName !== 'custom-typography') {
22
+ node.type = 'element';
23
+ node.tagName = 'custom-typography';
24
+ node.properties = {};
25
+ node.children = [{ type: 'text', value: node.value }];
26
+ }
27
+ });
28
+ };
29
+ };
30
+
31
+ const MessageItem = ({ item }: { item: Message; references: IReference[] }) => {
32
+ const userInfo = useSelectUserInfo();
33
+
34
+ const popoverContent = useMemo(
35
+ () => (
36
+ <div>
37
+ <p>Content</p>
38
+ <p>Content</p>
39
+ </div>
40
+ ),
41
+ [],
42
+ );
43
+
44
+ const renderReference = useCallback(
45
+ (text: string) => {
46
+ return reactStringReplace(text, /#{2}\d{1,}\${2}/g, (match, i) => {
47
+ return (
48
+ <Popover content={popoverContent}>
49
+ <InfoCircleOutlined key={i} className={styles.referenceIcon} />
50
+ </Popover>
51
+ );
52
+ });
53
+ },
54
+ [popoverContent],
55
+ );
56
 
 
57
  return (
58
  <div
59
  className={classNames(styles.messageItem, {
 
61
  [styles.messageItemRight]: item.role === MessageType.User,
62
  })}
63
  >
64
+ <section
65
+ className={classNames(styles.messageItemSection, {
66
+ [styles.messageItemSectionLeft]: item.role === MessageType.Assistant,
67
+ [styles.messageItemSectionRight]: item.role === MessageType.User,
68
+ })}
69
+ >
70
+ <div
71
+ className={classNames(styles.messageItemContent, {
72
+ [styles.messageItemContentReverse]: item.role === MessageType.User,
73
+ })}
74
+ >
75
+ {item.role === MessageType.User ? (
76
+ userInfo.avatar ?? (
77
+ <Avatar
78
+ size={40}
79
+ src={
80
+ userInfo.avatar ??
81
+ 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
82
+ }
83
+ />
84
+ )
85
+ ) : (
86
+ <AssistantIcon></AssistantIcon>
87
+ )}
88
+ <Flex vertical gap={8} flex={1}>
89
+ <b>
90
+ {item.role === MessageType.Assistant ? 'Resume Assistant' : 'You'}
91
+ </b>
92
+ <div className={styles.messageText}>
93
+ <Markdown
94
+ rehypePlugins={[rehypeWrapReference]}
95
+ components={
96
+ {
97
+ 'custom-typography': ({ children }: { children: string }) =>
98
+ renderReference(children),
99
+ } as any
100
+ }
101
+ >
102
+ {item.content}
103
+ </Markdown>
104
+ </div>
105
+ </Flex>
106
+ </div>
107
+ </section>
108
  </div>
109
  );
110
  };
 
113
  const [value, setValue] = useState('');
114
  const conversation: IClientConversation = useFetchConversation();
115
  const { sendMessage } = useSendMessage();
116
+ const loading = useOneNamespaceEffectsLoading('chatModel', [
117
+ 'completeConversation',
118
+ 'getConversation',
119
+ ]);
120
 
121
  const handlePressEnter = () => {
122
+ setValue('');
123
  sendMessage(value);
124
  };
125
 
 
129
 
130
  return (
131
  <Flex flex={1} className={styles.chatContainer} vertical>
132
+ <Flex flex={1} vertical className={styles.messageContainer}>
133
+ <div>
134
+ {conversation?.message?.map((message) => (
135
+ <MessageItem
136
+ key={message.id}
137
+ item={message}
138
+ references={conversation.reference}
139
+ ></MessageItem>
140
+ ))}
141
+ </div>
142
  </Flex>
143
  <Input
144
  size="large"
145
  placeholder="Message Resume Assistant..."
146
  value={value}
147
  suffix={
148
+ <Button type="primary" onClick={handlePressEnter} loading={loading}>
149
  Send
150
  </Button>
151
  }
web/src/pages/chat/hooks.ts CHANGED
@@ -1,8 +1,8 @@
1
  import showDeleteConfirm from '@/components/deleting-confirm';
2
  import { MessageType } from '@/constants/chat';
3
- import { IDialog } from '@/interfaces/database/chat';
4
  import omit from 'lodash/omit';
5
- import { useCallback, useEffect, useMemo } from 'react';
6
  import { useDispatch, useSearchParams, useSelector } from 'umi';
7
  import { v4 as uuid } from 'uuid';
8
  import { ChatSearchParams, EmptyConversationId } from './constants';
@@ -11,6 +11,8 @@ import {
11
  IMessage,
12
  VariableTableDataType,
13
  } from './interface';
 
 
14
 
15
  export const useFetchDialogList = () => {
16
  const dispatch = useDispatch();
@@ -137,16 +139,46 @@ export const useRemoveDialog = () => {
137
  return { onRemoveDialog };
138
  };
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  export const useClickDialogCard = () => {
141
  const [currentQueryParameters, setSearchParams] = useSearchParams();
142
 
143
  const newQueryParameters: URLSearchParams = useMemo(() => {
144
- return new URLSearchParams(currentQueryParameters.toString());
145
- }, [currentQueryParameters]);
146
 
147
  const handleClickDialog = useCallback(
148
  (dialogId: string) => {
149
  newQueryParameters.set(ChatSearchParams.DialogId, dialogId);
 
 
 
 
150
  setSearchParams(newQueryParameters);
151
  },
152
  [newQueryParameters, setSearchParams],
@@ -155,16 +187,6 @@ export const useClickDialogCard = () => {
155
  return { handleClickDialog };
156
  };
157
 
158
- export const useGetChatSearchParams = () => {
159
- const [currentQueryParameters] = useSearchParams();
160
-
161
- return {
162
- dialogId: currentQueryParameters.get(ChatSearchParams.DialogId) || '',
163
- conversationId:
164
- currentQueryParameters.get(ChatSearchParams.ConversationId) || '',
165
- };
166
- };
167
-
168
  export const useSelectFirstDialogOnMount = () => {
169
  const dialogList = useFetchDialogList();
170
  const { dialogId } = useGetChatSearchParams();
@@ -182,70 +204,42 @@ export const useSelectFirstDialogOnMount = () => {
182
 
183
  //#region conversation
184
 
185
- export const useFetchConversationList = (dialogId?: string) => {
186
- const dispatch = useDispatch();
187
- const conversationList: any[] = useSelector(
188
- (state: any) => state.chatModel.conversationList,
189
- );
190
-
191
- const fetchConversationList = useCallback(() => {
192
- if (dialogId) {
193
- dispatch({
194
- type: 'chatModel/listConversation',
195
- payload: { dialog_id: dialogId },
196
- });
197
- }
198
- }, [dispatch, dialogId]);
199
-
200
- useEffect(() => {
201
- fetchConversationList();
202
- }, [fetchConversationList]);
203
-
204
- return conversationList;
205
- };
206
-
207
- export const useClickConversationCard = () => {
208
- const [currentQueryParameters, setSearchParams] = useSearchParams();
209
- const newQueryParameters: URLSearchParams = new URLSearchParams(
210
- currentQueryParameters.toString(),
211
- );
212
-
213
- const handleClickConversation = (conversationId: string) => {
214
- newQueryParameters.set(ChatSearchParams.ConversationId, conversationId);
215
- setSearchParams(newQueryParameters);
216
- };
217
-
218
- return { handleClickConversation };
219
- };
220
-
221
  export const useCreateTemporaryConversation = () => {
222
  const dispatch = useDispatch();
223
  const { dialogId } = useGetChatSearchParams();
224
  const { handleClickConversation } = useClickConversationCard();
225
  let chatModel = useSelector((state: any) => state.chatModel);
226
- let currentConversation: Pick<
 
227
  IClientConversation,
228
  'id' | 'message' | 'name' | 'dialog_id'
229
  > = chatModel.currentConversation;
230
- let conversationList: IClientConversation[] = chatModel.conversationList;
231
 
232
- const createTemporaryConversation = (message: string) => {
233
- const messages = [...(currentConversation?.message ?? [])];
 
 
 
 
 
 
234
  if (messages.some((x) => x.id === EmptyConversationId)) {
235
  return;
236
  }
237
- messages.unshift({
238
  id: EmptyConversationId,
239
- content: message,
240
  role: MessageType.Assistant,
241
  });
242
 
 
 
243
  // It’s the back-end data.
244
  if ('id' in currentConversation) {
245
- currentConversation = { ...currentConversation, message: messages };
246
  } else {
247
  // client data
248
- currentConversation = {
249
  id: EmptyConversationId,
250
  name: 'New conversation',
251
  dialog_id: dialogId,
@@ -255,23 +249,105 @@ export const useCreateTemporaryConversation = () => {
255
 
256
  const nextConversationList = [...conversationList];
257
 
258
- nextConversationList.push(currentConversation as IClientConversation);
 
 
259
 
260
- dispatch({
261
- type: 'chatModel/setCurrentConversation',
262
- payload: currentConversation,
263
- });
264
 
265
  dispatch({
266
  type: 'chatModel/setConversationList',
267
  payload: nextConversationList,
268
  });
269
  handleClickConversation(EmptyConversationId);
270
- };
 
 
 
 
 
 
 
 
271
 
272
  return { createTemporaryConversation };
273
  };
274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  export const useSetConversation = () => {
276
  const dispatch = useDispatch();
277
  const { dialogId } = useGetChatSearchParams();
@@ -302,17 +378,20 @@ export const useFetchConversation = () => {
302
  const conversation = useSelector(
303
  (state: any) => state.chatModel.currentConversation,
304
  );
 
305
 
306
  const fetchConversation = useCallback(() => {
307
- if (conversationId !== EmptyConversationId && conversationId !== '') {
308
- dispatch({
309
  type: 'chatModel/getConversation',
310
  payload: {
311
  conversation_id: conversationId,
312
  },
313
  });
 
 
314
  }
315
- }, [dispatch, conversationId]);
316
 
317
  useEffect(() => {
318
  fetchConversation();
@@ -347,7 +426,7 @@ export const useSendMessage = () => {
347
  };
348
 
349
  const handleSendMessage = async (message: string) => {
350
- if (conversationId !== EmptyConversationId) {
351
  sendMessage(message);
352
  } else {
353
  const data = await setConversation(message);
 
1
  import showDeleteConfirm from '@/components/deleting-confirm';
2
  import { MessageType } from '@/constants/chat';
3
+ import { IConversation, IDialog } from '@/interfaces/database/chat';
4
  import omit from 'lodash/omit';
5
+ import { useCallback, useEffect, useMemo, useState } from 'react';
6
  import { useDispatch, useSearchParams, useSelector } from 'umi';
7
  import { v4 as uuid } from 'uuid';
8
  import { ChatSearchParams, EmptyConversationId } from './constants';
 
11
  IMessage,
12
  VariableTableDataType,
13
  } from './interface';
14
+ import { ChatModelState } from './model';
15
+ import { isConversationIdNotExist } from './utils';
16
 
17
  export const useFetchDialogList = () => {
18
  const dispatch = useDispatch();
 
139
  return { onRemoveDialog };
140
  };
141
 
142
+ export const useGetChatSearchParams = () => {
143
+ const [currentQueryParameters] = useSearchParams();
144
+
145
+ return {
146
+ dialogId: currentQueryParameters.get(ChatSearchParams.DialogId) || '',
147
+ conversationId:
148
+ currentQueryParameters.get(ChatSearchParams.ConversationId) || '',
149
+ };
150
+ };
151
+
152
+ export const useSetCurrentConversation = () => {
153
+ const dispatch = useDispatch();
154
+
155
+ const setCurrentConversation = useCallback(
156
+ (currentConversation: IClientConversation) => {
157
+ dispatch({
158
+ type: 'chatModel/setCurrentConversation',
159
+ payload: currentConversation,
160
+ });
161
+ },
162
+ [dispatch],
163
+ );
164
+
165
+ return setCurrentConversation;
166
+ };
167
+
168
  export const useClickDialogCard = () => {
169
  const [currentQueryParameters, setSearchParams] = useSearchParams();
170
 
171
  const newQueryParameters: URLSearchParams = useMemo(() => {
172
+ return new URLSearchParams();
173
+ }, []);
174
 
175
  const handleClickDialog = useCallback(
176
  (dialogId: string) => {
177
  newQueryParameters.set(ChatSearchParams.DialogId, dialogId);
178
+ // newQueryParameters.set(
179
+ // ChatSearchParams.ConversationId,
180
+ // EmptyConversationId,
181
+ // );
182
  setSearchParams(newQueryParameters);
183
  },
184
  [newQueryParameters, setSearchParams],
 
187
  return { handleClickDialog };
188
  };
189
 
 
 
 
 
 
 
 
 
 
 
190
  export const useSelectFirstDialogOnMount = () => {
191
  const dialogList = useFetchDialogList();
192
  const { dialogId } = useGetChatSearchParams();
 
204
 
205
  //#region conversation
206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  export const useCreateTemporaryConversation = () => {
208
  const dispatch = useDispatch();
209
  const { dialogId } = useGetChatSearchParams();
210
  const { handleClickConversation } = useClickConversationCard();
211
  let chatModel = useSelector((state: any) => state.chatModel);
212
+
213
+ const currentConversation: Pick<
214
  IClientConversation,
215
  'id' | 'message' | 'name' | 'dialog_id'
216
  > = chatModel.currentConversation;
 
217
 
218
+ const conversationList: IClientConversation[] = chatModel.conversationList;
219
+ const currentDialog: IDialog = chatModel.currentDialog;
220
+
221
+ const setCurrentConversation = useSetCurrentConversation();
222
+
223
+ const createTemporaryConversation = useCallback(() => {
224
+ const firstConversation = conversationList[0];
225
+ const messages = [...(firstConversation?.message ?? [])];
226
  if (messages.some((x) => x.id === EmptyConversationId)) {
227
  return;
228
  }
229
+ messages.push({
230
  id: EmptyConversationId,
231
+ content: currentDialog?.prompt_config?.prologue ?? '',
232
  role: MessageType.Assistant,
233
  });
234
 
235
+ let nextCurrentConversation = currentConversation;
236
+
237
  // It’s the back-end data.
238
  if ('id' in currentConversation) {
239
+ nextCurrentConversation = { ...currentConversation, message: messages };
240
  } else {
241
  // client data
242
+ nextCurrentConversation = {
243
  id: EmptyConversationId,
244
  name: 'New conversation',
245
  dialog_id: dialogId,
 
249
 
250
  const nextConversationList = [...conversationList];
251
 
252
+ nextConversationList.unshift(
253
+ nextCurrentConversation as IClientConversation,
254
+ );
255
 
256
+ setCurrentConversation(nextCurrentConversation as IClientConversation);
 
 
 
257
 
258
  dispatch({
259
  type: 'chatModel/setConversationList',
260
  payload: nextConversationList,
261
  });
262
  handleClickConversation(EmptyConversationId);
263
+ }, [
264
+ dispatch,
265
+ currentConversation,
266
+ dialogId,
267
+ setCurrentConversation,
268
+ handleClickConversation,
269
+ conversationList,
270
+ currentDialog,
271
+ ]);
272
 
273
  return { createTemporaryConversation };
274
  };
275
 
276
+ export const useFetchConversationList = () => {
277
+ const dispatch = useDispatch();
278
+ const conversationList: any[] = useSelector(
279
+ (state: any) => state.chatModel.conversationList,
280
+ );
281
+ const { dialogId } = useGetChatSearchParams();
282
+
283
+ const fetchConversationList = useCallback(async () => {
284
+ if (dialogId) {
285
+ dispatch({
286
+ type: 'chatModel/listConversation',
287
+ payload: { dialog_id: dialogId },
288
+ });
289
+ }
290
+ }, [dispatch, dialogId]);
291
+
292
+ useEffect(() => {
293
+ fetchConversationList();
294
+ }, [fetchConversationList]);
295
+
296
+ return conversationList;
297
+ };
298
+
299
+ export const useSelectConversationList = () => {
300
+ const [list, setList] = useState<Array<IConversation>>([]);
301
+ let chatModel: ChatModelState = useSelector((state: any) => state.chatModel);
302
+ const { conversationList, currentDialog } = chatModel;
303
+ const { dialogId } = useGetChatSearchParams();
304
+ const prologue = currentDialog?.prompt_config?.prologue ?? '';
305
+
306
+ const addTemporaryConversation = useCallback(() => {
307
+ setList(() => {
308
+ const nextList = [
309
+ {
310
+ id: '',
311
+ name: 'New conversation',
312
+ dialog_id: dialogId,
313
+ message: [
314
+ {
315
+ content: prologue,
316
+ role: MessageType.Assistant,
317
+ },
318
+ ],
319
+ } as IConversation,
320
+ ...conversationList,
321
+ ];
322
+ return nextList;
323
+ });
324
+ }, [conversationList, dialogId, prologue]);
325
+
326
+ useEffect(() => {
327
+ addTemporaryConversation();
328
+ }, [addTemporaryConversation]);
329
+
330
+ return { list, addTemporaryConversation };
331
+ };
332
+
333
+ export const useClickConversationCard = () => {
334
+ const [currentQueryParameters, setSearchParams] = useSearchParams();
335
+ const newQueryParameters: URLSearchParams = useMemo(
336
+ () => new URLSearchParams(currentQueryParameters.toString()),
337
+ [currentQueryParameters],
338
+ );
339
+
340
+ const handleClickConversation = useCallback(
341
+ (conversationId: string) => {
342
+ newQueryParameters.set(ChatSearchParams.ConversationId, conversationId);
343
+ setSearchParams(newQueryParameters);
344
+ },
345
+ [newQueryParameters, setSearchParams],
346
+ );
347
+
348
+ return { handleClickConversation };
349
+ };
350
+
351
  export const useSetConversation = () => {
352
  const dispatch = useDispatch();
353
  const { dialogId } = useGetChatSearchParams();
 
378
  const conversation = useSelector(
379
  (state: any) => state.chatModel.currentConversation,
380
  );
381
+ const setCurrentConversation = useSetCurrentConversation();
382
 
383
  const fetchConversation = useCallback(() => {
384
+ if (isConversationIdNotExist(conversationId)) {
385
+ dispatch<any>({
386
  type: 'chatModel/getConversation',
387
  payload: {
388
  conversation_id: conversationId,
389
  },
390
  });
391
+ } else {
392
+ setCurrentConversation({} as IClientConversation);
393
  }
394
+ }, [dispatch, conversationId, setCurrentConversation]);
395
 
396
  useEffect(() => {
397
  fetchConversation();
 
426
  };
427
 
428
  const handleSendMessage = async (message: string) => {
429
+ if (conversationId !== '') {
430
  sendMessage(message);
431
  } else {
432
  const data = await setConversation(message);
web/src/pages/chat/index.tsx CHANGED
@@ -18,11 +18,11 @@ import ChatContainer from './chat-container';
18
  import {
19
  useClickConversationCard,
20
  useClickDialogCard,
21
- useCreateTemporaryConversation,
22
  useFetchConversationList,
23
  useFetchDialog,
24
  useGetChatSearchParams,
25
  useRemoveDialog,
 
26
  useSelectFirstDialogOnMount,
27
  useSetCurrentDialog,
28
  } from './hooks';
@@ -38,12 +38,10 @@ const Chat = () => {
38
  const { handleClickDialog } = useClickDialogCard();
39
  const { handleClickConversation } = useClickConversationCard();
40
  const { dialogId, conversationId } = useGetChatSearchParams();
41
- const list = useFetchConversationList(dialogId);
42
- const { createTemporaryConversation } = useCreateTemporaryConversation();
43
 
44
- const selectedDialog = useFetchDialog(dialogId, true);
45
-
46
- const prologue = selectedDialog?.prompt_config?.prologue || '';
47
 
48
  const handleAppCardEnter = (id: string) => () => {
49
  setActivated(id);
@@ -69,8 +67,8 @@ const Chat = () => {
69
  };
70
 
71
  const handleCreateTemporaryConversation = useCallback(() => {
72
- createTemporaryConversation(prologue);
73
- }, [createTemporaryConversation, prologue]);
74
 
75
  const items: MenuProps['items'] = [
76
  {
@@ -112,6 +110,8 @@ const Chat = () => {
112
  return appItems;
113
  };
114
 
 
 
115
  return (
116
  <Flex className={styles.chatWrapper}>
117
  <Flex className={styles.chatAppWrapper}>
@@ -171,7 +171,7 @@ const Chat = () => {
171
  </Flex>
172
  <Divider></Divider>
173
  <Flex vertical gap={10} className={styles.chatTitleContent}>
174
- {list.map((x) => (
175
  <Card
176
  key={x.id}
177
  hoverable
 
18
  import {
19
  useClickConversationCard,
20
  useClickDialogCard,
 
21
  useFetchConversationList,
22
  useFetchDialog,
23
  useGetChatSearchParams,
24
  useRemoveDialog,
25
+ useSelectConversationList,
26
  useSelectFirstDialogOnMount,
27
  useSetCurrentDialog,
28
  } from './hooks';
 
38
  const { handleClickDialog } = useClickDialogCard();
39
  const { handleClickConversation } = useClickConversationCard();
40
  const { dialogId, conversationId } = useGetChatSearchParams();
41
+ const { list: conversationList, addTemporaryConversation } =
42
+ useSelectConversationList();
43
 
44
+ useFetchDialog(dialogId, true);
 
 
45
 
46
  const handleAppCardEnter = (id: string) => () => {
47
  setActivated(id);
 
67
  };
68
 
69
  const handleCreateTemporaryConversation = useCallback(() => {
70
+ addTemporaryConversation();
71
+ }, [addTemporaryConversation]);
72
 
73
  const items: MenuProps['items'] = [
74
  {
 
110
  return appItems;
111
  };
112
 
113
+ useFetchConversationList();
114
+
115
  return (
116
  <Flex className={styles.chatWrapper}>
117
  <Flex className={styles.chatAppWrapper}>
 
171
  </Flex>
172
  <Divider></Divider>
173
  <Flex vertical gap={10} className={styles.chatTitleContent}>
174
+ {conversationList.map((x) => (
175
  <Card
176
  key={x.id}
177
  hoverable
web/src/pages/chat/model.ts CHANGED
@@ -48,10 +48,11 @@ const model: DvaModel<ChatModelState> = {
48
  };
49
  },
50
  setCurrentConversation(state, { payload }) {
51
- const messageList = payload?.message.map((x: Message | IMessage) => ({
52
- ...x,
53
- id: 'id' in x ? x.id : uuid(),
54
- }));
 
55
  return {
56
  ...state,
57
  currentConversation: { ...payload, message: messageList },
 
48
  };
49
  },
50
  setCurrentConversation(state, { payload }) {
51
+ const messageList =
52
+ payload?.message?.map((x: Message | IMessage) => ({
53
+ ...x,
54
+ id: 'id' in x ? x.id : uuid(),
55
+ })) ?? [];
56
  return {
57
  ...state,
58
  currentConversation: { ...payload, message: messageList },
web/src/pages/chat/utils.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { variableEnabledFieldMap } from './constants';
2
 
3
  export const excludeUnEnabledVariables = (values: any) => {
4
  const unEnabledFields: Array<keyof typeof variableEnabledFieldMap> =
@@ -10,3 +10,7 @@ export const excludeUnEnabledVariables = (values: any) => {
10
  (key) => `llm_setting.${variableEnabledFieldMap[key]}`,
11
  );
12
  };
 
 
 
 
 
1
+ import { EmptyConversationId, variableEnabledFieldMap } from './constants';
2
 
3
  export const excludeUnEnabledVariables = (values: any) => {
4
  const unEnabledFields: Array<keyof typeof variableEnabledFieldMap> =
 
10
  (key) => `llm_setting.${variableEnabledFieldMap[key]}`,
11
  );
12
  };
13
+
14
+ export const isConversationIdNotExist = (conversationId: string) => {
15
+ return conversationId !== EmptyConversationId && conversationId !== '';
16
+ };
web/src/pages/setting/model.ts CHANGED
@@ -1,7 +1,7 @@
1
  import { ITenantInfo } from '@/interfaces/database/knowledge';
2
  import { IThirdOAIModelCollection as IThirdAiModelCollection } from '@/interfaces/database/llm';
 
3
  import userService from '@/services/userService';
4
- import authorizationUtil from '@/utils/authorizationUtil';
5
  import { message } from 'antd';
6
  import { Nullable } from 'typings';
7
  import { DvaModel } from 'umi';
@@ -16,6 +16,7 @@ export interface SettingModelState {
16
  llmInfo: IThirdAiModelCollection;
17
  myLlm: any[];
18
  factoriesList: any[];
 
19
  }
20
 
21
  const model: DvaModel<SettingModelState> = {
@@ -30,6 +31,7 @@ const model: DvaModel<SettingModelState> = {
30
  llmInfo: {},
31
  myLlm: [],
32
  factoriesList: [],
 
33
  },
34
  reducers: {
35
  updateState(state, { payload }) {
@@ -38,10 +40,11 @@ const model: DvaModel<SettingModelState> = {
38
  ...payload,
39
  };
40
  },
41
- },
42
- subscriptions: {
43
- setup({ dispatch, history }) {
44
- history.listen((location) => {});
 
45
  },
46
  },
47
  effects: {
@@ -63,15 +66,17 @@ const model: DvaModel<SettingModelState> = {
63
  }
64
  },
65
  *getUserInfo({ payload = {} }, { call, put }) {
66
- const { data, response } = yield call(userService.user_info, payload);
67
- const { retcode, data: res, retmsg } = data;
68
- const userInfo = {
69
- avatar: res.avatar,
70
- name: res.nickname,
71
- email: res.email,
72
- };
73
- authorizationUtil.setUserInfo(userInfo);
 
74
  if (retcode === 0) {
 
75
  // localStorage.setItem('userInfo',res.)
76
  }
77
  },
 
1
  import { ITenantInfo } from '@/interfaces/database/knowledge';
2
  import { IThirdOAIModelCollection as IThirdAiModelCollection } from '@/interfaces/database/llm';
3
+ import { IUserInfo } from '@/interfaces/database/userSetting';
4
  import userService from '@/services/userService';
 
5
  import { message } from 'antd';
6
  import { Nullable } from 'typings';
7
  import { DvaModel } from 'umi';
 
16
  llmInfo: IThirdAiModelCollection;
17
  myLlm: any[];
18
  factoriesList: any[];
19
+ userInfo: IUserInfo;
20
  }
21
 
22
  const model: DvaModel<SettingModelState> = {
 
31
  llmInfo: {},
32
  myLlm: [],
33
  factoriesList: [],
34
+ userInfo: {} as IUserInfo,
35
  },
36
  reducers: {
37
  updateState(state, { payload }) {
 
40
  ...payload,
41
  };
42
  },
43
+ setUserInfo(state, { payload }) {
44
+ return {
45
+ ...state,
46
+ userInfo: payload,
47
+ };
48
  },
49
  },
50
  effects: {
 
66
  }
67
  },
68
  *getUserInfo({ payload = {} }, { call, put }) {
69
+ const { data } = yield call(userService.user_info, payload);
70
+ const { retcode, data: res } = data;
71
+
72
+ // const userInfo = {
73
+ // avatar: res.avatar,
74
+ // name: res.nickname,
75
+ // email: res.email,
76
+ // };
77
+ // authorizationUtil.setUserInfo(userInfo);
78
  if (retcode === 0) {
79
+ yield put({ type: 'setUserInfo', payload: res });
80
  // localStorage.setItem('userInfo',res.)
81
  }
82
  },