mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 09:24:03 +00:00
detail ux
This commit is contained in:
@@ -90,7 +90,10 @@ export const streamFetch = ({
|
|||||||
responseData
|
responseData
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
reject(getErrText(err, '请求异常'));
|
reject({
|
||||||
|
responseText,
|
||||||
|
message: getErrText(err, '请求异常')
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
read();
|
read();
|
||||||
|
@@ -693,7 +693,7 @@ const ChatBox = (
|
|||||||
}}
|
}}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
// 触发快捷发送
|
// 触发快捷发送
|
||||||
if (e.keyCode === 13 && !e.shiftKey) {
|
if (isPc && e.keyCode === 13 && !e.shiftKey) {
|
||||||
handleSubmit((data) => sendPrompt(data, TextareaDom.current?.value))();
|
handleSubmit((data) => sendPrompt(data, TextareaDom.current?.value))();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
@@ -84,4 +84,12 @@ const ChatSchema = new Schema({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
ChatSchema.index({ userId: 1 });
|
||||||
|
ChatSchema.index({ updateTime: -1 });
|
||||||
|
ChatSchema.index({ appId: 1 });
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
|
||||||
export const Chat: Model<ChatType> = models['chat'] || model('chat', ChatSchema);
|
export const Chat: Model<ChatType> = models['chat'] || model('chat', ChatSchema);
|
||||||
|
Reference in New Issue
Block a user