Spaces:
Sleeping
Sleeping
Update web/src/components/ChatArea.tsx
Browse files
web/src/components/ChatArea.tsx
CHANGED
|
@@ -905,10 +905,26 @@ export function ChatArea({
|
|
| 905 |
<div ref={composerRef} className="flex-shrink-0 bg-background/95 backdrop-blur-sm z-20 border-t border-border">
|
| 906 |
<div className="max-w-4xl mx-auto px-4 py-4">
|
| 907 |
{/* ✅ Uploaded Files Preview (chip UI) */}
|
| 908 |
-
{uploadedFiles.length > 0 && (
|
| 909 |
<div className="mb-2 flex flex-wrap gap-2 max-h-32 overflow-y-auto">
|
| 910 |
-
{
|
| 911 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 912 |
))}
|
| 913 |
</div>
|
| 914 |
)}
|
|
|
|
| 905 |
<div ref={composerRef} className="flex-shrink-0 bg-background/95 backdrop-blur-sm z-20 border-t border-border">
|
| 906 |
<div className="max-w-4xl mx-auto px-4 py-4">
|
| 907 |
{/* ✅ Uploaded Files Preview (chip UI) */}
|
| 908 |
+
{(uploadedFiles.length > 0 || pendingFiles.length > 0) && (
|
| 909 |
<div className="mb-2 flex flex-wrap gap-2 max-h-32 overflow-y-auto">
|
| 910 |
+
{/* uploaded */}
|
| 911 |
+
{uploadedFiles.map((u, idx) => (
|
| 912 |
+
<FileChip
|
| 913 |
+
key={`u-${u.file.name}-${u.file.size}-${u.file.lastModified}`}
|
| 914 |
+
file={u.file}
|
| 915 |
+
index={idx}
|
| 916 |
+
source="uploaded"
|
| 917 |
+
/>
|
| 918 |
+
))}
|
| 919 |
+
|
| 920 |
+
{/* pending (type dialog 之前也能显示的话) */}
|
| 921 |
+
{pendingFiles.map((p, idx) => (
|
| 922 |
+
<FileChip
|
| 923 |
+
key={`p-${p.file.name}-${p.file.size}-${p.file.lastModified}`}
|
| 924 |
+
file={p.file}
|
| 925 |
+
index={idx}
|
| 926 |
+
source="pending"
|
| 927 |
+
/>
|
| 928 |
))}
|
| 929 |
</div>
|
| 930 |
)}
|