mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
fix: default isEdit
This commit is contained in:
@@ -7,7 +7,7 @@ const Avatar = ({ w = '30px', ...props }: ImageProps) => {
|
|||||||
<Image
|
<Image
|
||||||
fallbackSrc="/icon/logo.png"
|
fallbackSrc="/icon/logo.png"
|
||||||
borderRadius={'50%'}
|
borderRadius={'50%'}
|
||||||
objectFit={'contain'}
|
objectFit={'cover'}
|
||||||
alt=""
|
alt=""
|
||||||
w={w}
|
w={w}
|
||||||
h={w}
|
h={w}
|
||||||
|
@@ -58,7 +58,11 @@ export async function saveChat({
|
|||||||
obj: item.obj,
|
obj: item.obj,
|
||||||
value: item.value,
|
value: item.value,
|
||||||
systemPrompt: item.systemPrompt,
|
systemPrompt: item.systemPrompt,
|
||||||
quote: item.quote || []
|
quote:
|
||||||
|
item.quote?.map((item) => ({
|
||||||
|
...item,
|
||||||
|
isEdit: false
|
||||||
|
})) || []
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// 没有 chatId, 创建一个对话
|
// 没有 chatId, 创建一个对话
|
||||||
|
@@ -50,22 +50,10 @@ const ChatSchema = new Schema({
|
|||||||
quote: {
|
quote: {
|
||||||
type: [
|
type: [
|
||||||
{
|
{
|
||||||
id: {
|
id: String,
|
||||||
type: String,
|
q: String,
|
||||||
required: true
|
a: String,
|
||||||
},
|
isEdit: Boolean
|
||||||
q: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
a: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
isEdit: {
|
|
||||||
type: String,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
default: []
|
default: []
|
||||||
|
Reference in New Issue
Block a user