diff --git a/frontend-web/package-lock.json b/frontend-web/package-lock.json index 1296d82f..2edad9b5 100644 --- a/frontend-web/package-lock.json +++ b/frontend-web/package-lock.json @@ -61,8 +61,10 @@ "ogl": "^1.0.11", "react": "^19.0.0", "react-dom": "^19.0.0", + "react-markdown": "^10.1.0", "react-resizable-panels": "^4.4.1", "react-router-dom": "^7.9.4", + "react-syntax-highlighter": "^16.1.1", "rehype-katex": "^7.0.1", "rehype-raw": "^7.0.0", "remark-gfm": "^4.0.1", @@ -71,6 +73,7 @@ "sonner": "^2.0.7", "streamdown": "1.4.0", "tailwind-merge": "^3.4.0", + "tdesign-react": "^1.12.3", "tokenlens": "^1.3.1", "unist-util-visit": "^5.0.0", "use-stick-to-bottom": "^1.1.1", @@ -1665,6 +1668,15 @@ "node": ">=8.0.0" } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@radix-ui/number": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz", @@ -4615,6 +4627,11 @@ "undici-types": "~6.21.0" } }, + "node_modules/@types/prismjs": { + "version": "1.26.6", + "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.6.tgz", + "integrity": "sha512-vqlvI7qlMvcCBbVe0AKAb4f97//Hy0EBTaiW8AalRnG/xAN5zOiWWyrNqNXeq8+KAuvRewjCVY1+IPxk4RdNYw==" + }, "node_modules/@types/react": { "version": "19.2.13", "license": "MIT", @@ -4630,6 +4647,16 @@ "@types/react": "^19.2.0" } }, + "node_modules/@types/sortablejs": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/@types/sortablejs/-/sortablejs-1.15.9.tgz", + "integrity": "sha512-7HP+rZGE2p886PKV9c9OJzLBI6BBJu1O7lJGYnPyG3fS4/duUCcngkNCjsLwIMV+WMqANe3tt4irrXHSIe68OQ==" + }, + "node_modules/@types/tinycolor2": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.6.tgz", + "integrity": "sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==" + }, "node_modules/@types/trusted-types": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", @@ -4641,6 +4668,11 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==" }, + "node_modules/@types/validator": { + "version": "13.15.10", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.15.10.tgz", + "integrity": "sha512-T8L6i7wCuyoK8A/ZeLYt1+q0ty3Zb9+qbSSvrIVitzT3YjZqkTZ40IbRsPanlB4h1QB3JVL1SYCdR6ngtFYcuA==" + }, "node_modules/@uiw/codemirror-extensions-basic-setup": { "version": "4.25.4", "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.25.4.tgz", @@ -5091,6 +5123,11 @@ "resolved": "https://registry.npmjs.org/classcat/-/classcat-5.0.5.tgz", "integrity": "sha512-JhZUT7JFcQy/EzW605k/ktHtncoo9vnyW/2GspNYwFlN1C/WmjuV/xtS04e9SOkL2sTdw0VAZ2UGCcQ9lR6p6w==" }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" + }, "node_modules/clsx": { "version": "2.1.1", "license": "MIT", @@ -5773,6 +5810,15 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.21.0.tgz", "integrity": "sha512-w9IMgQrz4O0YN1LtB7K5P63vhlIOvC7opSmouCJ+ZywlPAlO9gIkJ+otk6LvGpAs2wg4econaCz3TvQ9xPoyuQ==" }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/dompurify": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.2.tgz", @@ -5940,6 +5986,18 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, + "node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -5957,6 +6015,14 @@ } } }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/framer-motion": { "version": "12.38.0", "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.38.0.tgz", @@ -6264,6 +6330,32 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "engines": { + "node": "*" + } + }, + "node_modules/highlightjs-vue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/highlightjs-vue/-/highlightjs-vue-1.0.0.tgz", + "integrity": "sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA==" + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/html-url-attributes": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz", @@ -6403,8 +6495,7 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/jsesc": { "version": "3.1.0", @@ -6790,6 +6881,30 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lowlight": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", + "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", + "dependencies": { + "fault": "^1.0.0", + "highlight.js": "~10.7.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -6801,7 +6916,8 @@ }, "node_modules/lucide-react": { "version": "0.562.0", - "license": "ISC", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.562.0.tgz", + "integrity": "sha512-82hOAu7y0dbVuFfmO4bYF1XEwYk/mEbM5E+b1jgci/udUBEE/R7LF5Ip0CCEmXe8AybRM8L+04eP+LGZeDvkiw==", "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } @@ -7706,6 +7822,11 @@ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" + }, "node_modules/mlly": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz", @@ -7797,6 +7918,14 @@ "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==", "dev": true }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ogl": { "version": "1.0.11", "license": "Unlicense" @@ -7918,6 +8047,11 @@ "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==" }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -8005,11 +8139,34 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/prismjs": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", + "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", + "engines": { + "node": ">=6" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/property-information": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", @@ -8019,6 +8176,14 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "dependencies": { + "performance-now": "^2.1.0" + } + }, "node_modules/react": { "version": "19.2.4", "license": "MIT", @@ -8036,6 +8201,16 @@ "react": "^19.2.4" } }, + "node_modules/react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, "node_modules/react-markdown": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz", @@ -8180,6 +8355,40 @@ } } }, + "node_modules/react-syntax-highlighter": { + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-16.1.1.tgz", + "integrity": "sha512-PjVawBGy80C6YbC5DDZJeUjBmC7skaoEUdvfFQediQHgCL7aKyVHe57SaJGfQsloGDac+gCpTfRdtxzWWKmCXA==", + "dependencies": { + "@babel/runtime": "^7.28.4", + "highlight.js": "^10.4.1", + "highlightjs-vue": "^1.0.0", + "lowlight": "^1.17.0", + "prismjs": "^1.30.0", + "refractor": "^5.0.0" + }, + "engines": { + "node": ">= 16.20.2" + }, + "peerDependencies": { + "react": ">= 0.14.0" + } + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -8194,6 +8403,26 @@ "util-deprecate": "~1.0.1" } }, + "node_modules/refractor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/refractor/-/refractor-5.0.0.tgz", + "integrity": "sha512-QXOrHQF5jOpjjLfiNk5GFnWhRXvxjUVnlFxkeDmewR5sXkr3iM46Zo+CnRR8B+MDVqkULW4EcLVcRBNOPXHosw==", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/prismjs": "^1.0.0", + "hastscript": "^9.0.0", + "parse-entities": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/regex": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/regex/-/regex-6.1.0.tgz", @@ -8242,7 +8471,8 @@ }, "node_modules/rehype-raw": { "version": "7.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-7.0.0.tgz", + "integrity": "sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==", "dependencies": { "@types/hast": "^3.0.0", "hast-util-raw": "^9.0.0", @@ -8255,7 +8485,8 @@ }, "node_modules/remark-gfm": { "version": "4.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz", + "integrity": "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==", "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-gfm": "^3.0.0", @@ -8457,6 +8688,11 @@ "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, + "node_modules/sortablejs": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.7.tgz", + "integrity": "sha512-Kk8wLQPlS+yi1ZEf48a4+fzHa4yxjC30M/Sr2AnQu+f/MPwvvX9XjZ6OWejiz8crBsLwSq8GHqaxaET7u6ux0A==" + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -8578,6 +8814,75 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/tdesign-icons-react": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/tdesign-icons-react/-/tdesign-icons-react-0.5.0.tgz", + "integrity": "sha512-Gpl1Kxkb8+YXYjMsSW5W3kWy/drVB/huFLIHWhmJdUnEwUAW0Il+nDyb/BsRi51jLnalBwjYbOELEggH2qp6FQ==", + "dependencies": { + "@babel/runtime": "^7.16.5", + "classnames": "^2.2.6" + }, + "peerDependencies": { + "react": ">=16.13.1", + "react-dom": ">=16.13.1" + } + }, + "node_modules/tdesign-react": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/tdesign-react/-/tdesign-react-1.12.3.tgz", + "integrity": "sha512-zpGPUrxoGvK3ZMFIAM1GmFI2LEYzPfQSALK0egR/RSGuVaQmNSqgonGATz0N1/quAqlZjdRqVH5w6IOJ5ruyKA==", + "dependencies": { + "@babel/runtime": "~7.26.7", + "@popperjs/core": "~2.11.2", + "@types/sortablejs": "^1.10.7", + "@types/tinycolor2": "^1.4.3", + "@types/validator": "^13.1.3", + "classnames": "~2.5.1", + "dayjs": "1.11.10", + "hoist-non-react-statics": "~3.3.2", + "lodash-es": "^4.17.21", + "mitt": "^3.0.0", + "raf": "~3.4.1", + "react-fast-compare": "^3.2.2", + "react-is": "^18.2.0", + "react-transition-group": "~4.4.1", + "sortablejs": "^1.15.0", + "tdesign-icons-react": "0.5.0", + "tinycolor2": "^1.4.2", + "tslib": "~2.3.1", + "validator": "~13.15.0" + }, + "peerDependencies": { + "react": ">=16.13.1", + "react-dom": ">=16.13.1" + } + }, + "node_modules/tdesign-react/node_modules/@babel/runtime": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz", + "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tdesign-react/node_modules/dayjs": { + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" + }, + "node_modules/tdesign-react/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/tinycolor2": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", + "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==" + }, "node_modules/tinyexec": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.1.2.tgz", @@ -8882,6 +9187,14 @@ "uuid": "dist-node/bin/uuid" } }, + "node_modules/validator": { + "version": "13.15.35", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.35.tgz", + "integrity": "sha512-TQ5pAGhd5whStmqWvYF4OjQROlmv9SMFVt37qoCBdqRffuuklWYQlCNnEs2ZaIBD1kZRNnikiZOS1eqgkar0iw==", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/vfile": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", diff --git a/frontend-web/package.json b/frontend-web/package.json index 368ae519..a9319e1d 100644 --- a/frontend-web/package.json +++ b/frontend-web/package.json @@ -63,8 +63,10 @@ "ogl": "^1.0.11", "react": "^19.0.0", "react-dom": "^19.0.0", + "react-markdown": "^10.1.0", "react-resizable-panels": "^4.4.1", "react-router-dom": "^7.9.4", + "react-syntax-highlighter": "^16.1.1", "rehype-katex": "^7.0.1", "rehype-raw": "^7.0.0", "remark-gfm": "^4.0.1", @@ -73,6 +75,7 @@ "sonner": "^2.0.7", "streamdown": "1.4.0", "tailwind-merge": "^3.4.0", + "tdesign-react": "^1.12.3", "tokenlens": "^1.3.1", "unist-util-visit": "^5.0.0", "use-stick-to-bottom": "^1.1.1", diff --git a/frontend-web/src/components/page-sidebar.tsx b/frontend-web/src/components/page-sidebar.tsx index b5d48c71..3c39dc32 100644 --- a/frontend-web/src/components/page-sidebar.tsx +++ b/frontend-web/src/components/page-sidebar.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; import type { ElementType } from "react"; +import { useNavigate, useLocation } from "react-router-dom"; import { BarChart3, Bot, @@ -38,6 +39,7 @@ type MenuItem = { id: string; label: string; icon: ElementType; + path?: string; children?: MenuItem[]; }; @@ -49,173 +51,173 @@ type PageSidebarProps = { const menuItems: MenuItem[] = [ { id: "qa-center", - label: "QA Center", + label: "问答中心", icon: HelpCircle, children: [ - { id: "new-qa", label: "New QA", icon: Plus }, - { id: "general-qa", label: "General QA", icon: CircleHelp }, - { id: "agent-qa", label: "Agent QA", icon: Bot }, - { id: "multi-agent-qa", label: "Multi Agent", icon: Layers }, - { id: "sixstep-chat", label: "Six Step Chat", icon: Workflow }, - { id: "qa-records", label: "QA Records", icon: History }, - { id: "template-editor", label: "Template Config", icon: Settings }, + { id: "new-qa", label: "新建问答", icon: Plus }, + { id: "general-qa", label: "通用问答", icon: CircleHelp, path: "/page/strategy/qa/general" }, + { id: "agent-qa", label: "智能体问答", icon: Bot }, + { id: "multi-agent-qa", label: "多智能体", icon: Layers }, + { id: "sixstep-chat", label: "六步对话", icon: Workflow }, + { id: "qa-records", label: "问答记录", icon: History }, + { id: "template-editor", label: "模板配置", icon: Settings }, ], }, { id: "light-app-center", - label: "Light Apps", + label: "轻应用", icon: Grid3X3, children: [ - { id: "light-app-square", label: "App Square", icon: Layout }, - { id: "light-app-records", label: "Run Records", icon: History }, + { id: "light-app-square", label: "应用广场", icon: Layout }, + { id: "light-app-records", label: "运行记录", icon: History }, ], }, { id: "task-management", - label: "Task Management", + label: "任务管理", icon: Target, children: [ - { id: "dashboard", label: "Dashboard", icon: BarChart3 }, + { id: "dashboard", label: "数据看板", icon: BarChart3 }, { id: "xk-task", - label: "XK Tasks", + label: "XK任务", icon: Folder, children: [ - { id: "xk-task-jc", label: "Task JC", icon: ListTodo }, - { id: "xk-task-dispatch", label: "Task Dispatch", icon: ListTodo }, + { id: "xk-task-jc", label: "任务JC", icon: ListTodo }, + { id: "xk-task-dispatch", label: "任务调度", icon: ListTodo }, ], }, { id: "plan-task", - label: "Planning Tasks", + label: "规划任务", icon: Folder, children: [ - { id: "plan-task-fx", label: "Task Analysis", icon: ListTodo }, - { id: "plan-task-action", label: "Action Strategy", icon: ListTodo }, + { id: "plan-task-fx", label: "任务分析", icon: ListTodo }, + { id: "plan-task-action", label: "行动策略", icon: ListTodo }, ], }, { id: "mnty-task", - label: "MNTY Tasks", + label: "MNTY任务", icon: Folder, children: [ - { id: "mnty-task-mechanism", label: "Mechanism Study", icon: ListTodo }, - { id: "mnty-task-plan", label: "Plan Task", icon: ListTodo }, - { id: "mnty-task-zsty", label: "ZSTY Task", icon: ListTodo }, + { id: "mnty-task-mechanism", label: "机制研究", icon: ListTodo }, + { id: "mnty-task-plan", label: "规划任务", icon: ListTodo }, + { id: "mnty-task-zsty", label: "ZSTY任务", icon: ListTodo }, ], }, { id: "effect-task", - label: "Effect PG Tasks", + label: "效果PG任务", icon: Folder, children: [ - { id: "effect-task-pg", label: "Task PG", icon: ListTodo }, - { id: "effect-action-pg", label: "Action PG", icon: ListTodo }, - { id: "effect-info-pg", label: "Info PG", icon: ListTodo }, - { id: "effect-account-pg", label: "Account PG", icon: ListTodo }, + { id: "effect-task-pg", label: "任务PG", icon: ListTodo }, + { id: "effect-action-pg", label: "行动PG", icon: ListTodo }, + { id: "effect-info-pg", label: "信息PG", icon: ListTodo }, + { id: "effect-account-pg", label: "账号PG", icon: ListTodo }, ], }, - { id: "task-create", label: "Create Task", icon: Plus }, - { id: "task-single", label: "Single Agent Task", icon: Bot }, - { id: "task-scene", label: "Scene Task", icon: Workflow }, - { id: "task-consult-create", label: "Multi Agent Consult", icon: MessageSquare }, - { id: "final-plan", label: "Final Output", icon: FileOutput }, + { id: "task-create", label: "创建任务", icon: Plus }, + { id: "task-single", label: "单智能体任务", icon: Bot }, + { id: "task-scene", label: "场景任务", icon: Workflow }, + { id: "task-consult-create", label: "多智能体协商", icon: MessageSquare }, + { id: "final-plan", label: "最终输出", icon: FileOutput }, ], }, - { id: "scene-list", label: "Scene Management", icon: Layers }, + { id: "scene-list", label: "场景管理", icon: Layers }, { id: "agent-list", - label: "Agent Management", + label: "智能体管理", icon: Bot, children: [ - { id: "agent-overview", label: "Agent List", icon: Users }, - { id: "agent-trial", label: "Single Agent Trial", icon: PlayCircle }, + { id: "agent-overview", label: "智能体列表", icon: Users, path: "/page/strategy/agents" }, + { id: "agent-trial", label: "单智能体试用", icon: PlayCircle }, ], }, { id: "result-management", - label: "Result Management", + label: "结果管理", icon: BarChart3, children: [ { id: "result-planning", - label: "Planning Results", + label: "规划结果", icon: Target, children: [ - { id: "result-planning-all", label: "All", icon: BarChart3 }, - { id: "result-planning-goal", label: "Goal Analysis", icon: Target }, - { id: "result-planning-brand", label: "Brand Strategy", icon: Target }, - { id: "result-planning-content", label: "Content Planning", icon: Target }, - { id: "result-planning-channel", label: "Channel Planning", icon: Target }, - { id: "result-planning-narrative", label: "Narrative Strategy", icon: Target }, + { id: "result-planning-all", label: "全部", icon: BarChart3 }, + { id: "result-planning-goal", label: "目标分析", icon: Target }, + { id: "result-planning-brand", label: "品牌策略", icon: Target }, + { id: "result-planning-content", label: "内容规划", icon: Target }, + { id: "result-planning-channel", label: "渠道规划", icon: Target }, + { id: "result-planning-narrative", label: "叙事策略", icon: Target }, ], }, { id: "result-mnty", - label: "MNTY Results", + label: "MNTY结果", icon: Brain, children: [ - { id: "result-mnty-all", label: "All", icon: BarChart3 }, - { id: "result-mnty-mechanism", label: "Mechanism Research", icon: Brain }, - { id: "result-mnty-plan", label: "Plan Design", icon: Brain }, - { id: "result-mnty-zsty", label: "ZSTY Analysis", icon: Brain }, + { id: "result-mnty-all", label: "全部", icon: BarChart3 }, + { id: "result-mnty-mechanism", label: "机制研究", icon: Brain }, + { id: "result-mnty-plan", label: "规划设计", icon: Brain }, + { id: "result-mnty-zsty", label: "ZSTY分析", icon: Brain }, ], }, { id: "result-effect-pg", - label: "Effect PG Results", + label: "效果PG结果", icon: TrendingUp, children: [ - { id: "result-effect-pg-all", label: "All", icon: BarChart3 }, - { id: "result-effect-pg-behavior", label: "Behavior PG", icon: TrendingUp }, - { id: "result-effect-pg-evaluation", label: "Effect Review", icon: TrendingUp }, - { id: "result-effect-pg-info", label: "Info PG", icon: TrendingUp }, - { id: "result-effect-pg-account", label: "Account PG", icon: TrendingUp }, + { id: "result-effect-pg-all", label: "全部", icon: BarChart3 }, + { id: "result-effect-pg-behavior", label: "行为PG", icon: TrendingUp }, + { id: "result-effect-pg-evaluation", label: "效果复盘", icon: TrendingUp }, + { id: "result-effect-pg-info", label: "信息PG", icon: TrendingUp }, + { id: "result-effect-pg-account", label: "账号PG", icon: TrendingUp }, ], }, { id: "result-xk", - label: "XK Results", + label: "XK结果", icon: Compass, children: [ - { id: "result-xk-all", label: "All", icon: BarChart3 }, - { id: "result-xk-jc", label: "Task JC", icon: Compass }, - { id: "result-xk-dispatch", label: "Task Dispatch", icon: Compass }, + { id: "result-xk-all", label: "全部", icon: BarChart3 }, + { id: "result-xk-jc", label: "任务JC", icon: Compass }, + { id: "result-xk-dispatch", label: "任务调度", icon: Compass }, ], }, { id: "result-dq", - label: "DQ Results", + label: "DQ结果", icon: Database, children: [ - { id: "result-dq-all", label: "All", icon: BarChart3 }, - { id: "result-dq-audience", label: "Audience Analysis", icon: Database }, - { id: "result-dq-kb", label: "Knowledge Research", icon: Database }, - { id: "result-dq-trend", label: "Trend Research", icon: Database }, + { id: "result-dq-all", label: "全部", icon: BarChart3 }, + { id: "result-dq-audience", label: "受众分析", icon: Database }, + { id: "result-dq-kb", label: "知识研究", icon: Database }, + { id: "result-dq-trend", label: "趋势研究", icon: Database }, ], }, { id: "result-other", - label: "Other Results", + label: "其他结果", icon: MoreHorizontal, children: [ - { id: "result-other-all", label: "All", icon: BarChart3 }, - { id: "result-other-general", label: "General Analysis", icon: MoreHorizontal }, - { id: "result-other-temp", label: "Temp Tasks", icon: MoreHorizontal }, - { id: "result-other-other", label: "Other", icon: MoreHorizontal }, + { id: "result-other-all", label: "全部", icon: BarChart3 }, + { id: "result-other-general", label: "通用分析", icon: MoreHorizontal }, + { id: "result-other-temp", label: "临时任务", icon: MoreHorizontal }, + { id: "result-other-other", label: "其他", icon: MoreHorizontal }, ], }, ], }, { id: "resource-management", - label: "Resource Management", + label: "资源管理", icon: Database, children: [ - { id: "resource-zz", label: "ZZ Resources", icon: FileBox }, - { id: "resource-network-actor", label: "Network Actor", icon: Network }, - { id: "resource-knowledge-base", label: "Knowledge Base", icon: Library }, - { id: "resource-evaluation-index", label: "Evaluation Index", icon: Scale }, + { id: "resource-zz", label: "ZZ资源", icon: FileBox }, + { id: "resource-network-actor", label: "网络达人", icon: Network }, + { id: "resource-knowledge-base", label: "知识库", icon: Library }, + { id: "resource-evaluation-index", label: "评估指标", icon: Scale }, ], }, ]; @@ -233,6 +235,8 @@ export function PageSidebar({ onToggleCollapsed, }: PageSidebarProps) { const [expandedIds, setExpandedIds] = useState>(defaultExpandedIds); + const navigate = useNavigate(); + const { pathname } = useLocation(); const iconButtonClass = "rounded-lg p-2 text-gray-500 transition-all duration-300 ease-out hover:scale-105 hover:bg-red-50 hover:text-red-600"; @@ -256,14 +260,20 @@ export function PageSidebar({ const renderLeaf = (item: MenuItem, depth = 0) => { const Icon = item.icon; + const isActive = !!item.path && pathname === item.path; return (