Commit 52920726 by archer

fix: default isEdit

parent 02caa573
......@@ -7,7 +7,7 @@ const Avatar = ({ w = '30px', ...props }: ImageProps) => {
<Image
fallbackSrc="/icon/logo.png"
borderRadius={'50%'}
objectFit={'contain'}
objectFit={'cover'}
alt=""
w={w}
h={w}
......
......@@ -58,7 +58,11 @@ export async function saveChat({
obj: item.obj,
value: item.value,
systemPrompt: item.systemPrompt,
quote: item.quote || []
quote:
item.quote?.map((item) => ({
...item,
isEdit: false
})) || []
}));
// 没有 chatId, 创建一个对话
......
......@@ -50,22 +50,10 @@ const ChatSchema = new Schema({
quote: {
type: [
{
id: {
type: String,
required: true
},
q: {
type: String,
default: ''
},
a: {
type: String,
default: ''
},
isEdit: {
type: String,
default: false
}
id: String,
q: String,
a: String,
isEdit: Boolean
}
],
default: []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment