refactor: 文件上传展示与发送逻辑分离
- 消息对象新增 files 元数据数组(name/language/size)和 _fileContents 内容数组 - content 字段仅保留用户输入的纯文本 - 新增 buildApiMessages() 构建 API 消息时动态拼接文件内容 - chat-area 渲染时从 msg.files 取文件名+图标展示 chip,不暴露文件内容 - 用户消息气泡内文件 chip 用紫色主题区分于输入区的青色 chip - 导出功能(MD/HTML/TXT)同步适配
This commit is contained in:
@@ -739,6 +739,24 @@ body::before {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
/* 消息内的文件 chip 展示 */
|
||||
.msg-files {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.msg-files .file-chip {
|
||||
background: rgba(123, 47, 247, 0.08);
|
||||
border-color: rgba(123, 47, 247, 0.2);
|
||||
}
|
||||
|
||||
.msg-files .file-chip:hover {
|
||||
border-color: rgba(123, 47, 247, 0.35);
|
||||
background: rgba(123, 47, 247, 0.12);
|
||||
}
|
||||
|
||||
.msg-img {
|
||||
max-width: 200px;
|
||||
max-height: 200px;
|
||||
|
||||
Reference in New Issue
Block a user