+ {/* 图片标签显示在输入框上方 */}
+ {attachments.length > 0 && (
+
+ {attachments.map((att, index) => (
+
+

+
+ {att.name || 'Image'}
+
+
+
+ ))}
- ))}
+ )}
- {/* 文本输入 - 自适应宽度 */}
-
setInput(e.target.value)}
onKeyDown={(e) => {
@@ -926,15 +920,12 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
handleSend();
}
}}
- placeholder={attachments.length > 0 ? "添加描述..." : "请输入你的设计需求"}
- className="flex-1 min-w-[120px] text-sm bg-transparent border-none outline-none placeholder:text-muted-foreground/50"
+ placeholder="请输入你的设计需求,例如:把椅子颜色改成红色"
+ className="min-h-[40px] max-h-[100px] w-full text-sm resize-none bg-transparent border-none focus-visible:ring-0 p-0 placeholder:text-muted-foreground/50"
disabled={isLoading}
/>