Commit 502d8d8c by archer

detail ux

parent 5f5d439f
......@@ -90,7 +90,10 @@ export const streamFetch = ({
responseData
});
}
reject(getErrText(err, '请求异常'));
reject({
responseText,
message: getErrText(err, '请求异常')
});
}
};
read();
......
......@@ -693,7 +693,7 @@ const ChatBox = (
}}
onKeyDown={(e) => {
// 触发快捷发送
if (e.keyCode === 13 && !e.shiftKey) {
if (isPc && e.keyCode === 13 && !e.shiftKey) {
handleSubmit((data) => sendPrompt(data, TextareaDom.current?.value))();
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);
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