feat: 对话中消息编辑与重新生成与删除功能
This commit is contained in:
@@ -109,18 +109,22 @@ export const useChatStore = defineStore('chat', () => {
|
||||
|
||||
return {
|
||||
...item,
|
||||
key: item.id,
|
||||
id: item.id, // 保留后端返回的消息ID
|
||||
key: item.id ?? Math.random().toString(36).substring(2, 9),
|
||||
placement: isUser ? 'end' : 'start',
|
||||
// 用户消息:气泡形状;AI消息:无气泡形状,宽度100%
|
||||
isMarkdown: !isUser,
|
||||
avatar: isUser
|
||||
? getUserProfilePicture()
|
||||
: systemProfilePicture,
|
||||
avatarSize: '32px',
|
||||
// 头像不显示(后续可能会显示)
|
||||
// avatar: isUser ? getUserProfilePicture() : systemProfilePicture,
|
||||
// avatarSize: '32px',
|
||||
typing: false,
|
||||
reasoning_content: thinkContent,
|
||||
thinkingStatus: 'end',
|
||||
content: finalContent,
|
||||
thinlCollapse: false,
|
||||
// AI消息使用 noStyle 去除气泡样式
|
||||
noStyle: !isUser,
|
||||
shape: isUser ? 'corner' : undefined,
|
||||
// 保留图片和文件信息(优先使用解析出来的,如果没有则使用原有的)
|
||||
images: images.length > 0 ? images : item.images,
|
||||
files: files.length > 0 ? files : item.files,
|
||||
|
||||
Reference in New Issue
Block a user