- {attachImages.map((image, index) => {
- return (
-
-
-
{
- setAttachImages(
- attachImages.filter((_, i) => i !== index),
- );
- }}
- />
+
+ {attachImages.length != 0 && (
+
+ {attachImages.map((image, index) => {
+ return (
+
+
+ {
+ setAttachImages(
+ attachImages.filter((_, i) => i !== index),
+ );
+ }}
+ />
+
-
- );
- })}
-
- )}
+ );
+ })}
+
+ )}
+ {attachFiles.length != 0 && (
+
+ {attachFiles.map((file, index) => {
+ return (
+
+
+
+ {
+ setAttachFiles(
+ attachFiles.filter((_, i) => i !== index),
+ );
+ }}
+ />
+
+
+ );
+ })}
+
+ )}
+
}
text={Locale.Chat.Send}
diff --git a/app/icons/upload-doc.svg b/app/icons/upload-doc.svg
new file mode 100644
index 000000000..4a58c92b9
--- /dev/null
+++ b/app/icons/upload-doc.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/package.json b/package.json
index 8696f83b5..dba7fdb49 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
"@hello-pangea/dnd": "^16.5.0",
"@next/third-parties": "^14.1.0",
"@svgr/webpack": "^6.5.1",
+ "@types/react-file-icon": "^1.0.4",
"@vercel/analytics": "^0.1.11",
"@vercel/speed-insights": "^1.0.2",
"axios": "^1.7.5",
@@ -31,14 +32,15 @@
"html-to-image": "^1.11.11",
"idb-keyval": "^6.2.1",
"lodash-es": "^4.17.21",
- "mermaid": "^10.6.1",
"markdown-to-txt": "^2.0.1",
+ "mermaid": "^10.6.1",
"nanoid": "^5.0.3",
"next": "^14.1.1",
"node-fetch": "^3.3.1",
"openapi-client-axios": "^7.5.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
+ "react-file-icon": "^1.5.0",
"react-markdown": "^8.0.7",
"react-router-dom": "^6.15.0",
"rehype-highlight": "^6.0.0",
@@ -80,4 +82,4 @@
"lint-staged/yaml": "^2.2.2"
},
"packageManager": "yarn@1.22.19"
-}
\ No newline at end of file
+}
diff --git a/yarn.lock b/yarn.lock
index 7e7dd3484..d9edacf0a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1762,6 +1762,13 @@
dependencies:
"@types/react" "*"
+"@types/react-file-icon@^1.0.4":
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/@types/react-file-icon/-/react-file-icon-1.0.4.tgz#6825b0e6b8ab639f7f25a6cd52499650d3afcd89"
+ integrity sha512-c1mIklUDaxm9odxf8RTiy/EAxsblZliJ86EKIOAyuafP9eK3iudyn4ATv53DX6ZvgGymc7IttVNm97LTGnTiYA==
+ dependencies:
+ "@types/react" "*"
+
"@types/react-katex@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/react-katex/-/react-katex-3.0.0.tgz#119a902bff10eb52f449fac744aaed8c4909391f"
@@ -2416,6 +2423,11 @@ color-name@~1.1.4:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+colord@^2.9.3:
+ version "2.9.3"
+ resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43"
+ integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==
+
colorette@^2.0.19:
version "2.0.19"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798"
@@ -5404,7 +5416,7 @@ prettier@^3.0.2:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.2.tgz#78fcecd6d870551aa5547437cdae39d4701dca5b"
integrity sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==
-prop-types@^15.0.0, prop-types@^15.8.1:
+prop-types@^15.0.0, prop-types@^15.7.2, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
@@ -5453,6 +5465,14 @@ react-dom@^18.2.0:
loose-envify "^1.1.0"
scheduler "^0.23.0"
+react-file-icon@^1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/react-file-icon/-/react-file-icon-1.5.0.tgz#cccc8827d927291b8a52fab41afbe5b3625ddbf4"
+ integrity sha512-6K2/nAI69CS838HOS+4S95MLXwf1neWywek1FgqcTFPTYjnM8XT7aBLz4gkjoqQKY9qPhu3A2tu+lvxhmZYY9w==
+ dependencies:
+ colord "^2.9.3"
+ prop-types "^15.7.2"
+
react-is@^16.13.1, react-is@^16.7.0:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"