feat: print nothing found when no search result.

fix: handle 404 of conversation fetch failed
This commit is contained in:
Wentao Lyu 2023-03-29 00:18:27 +08:00
parent 370dc2dd8a
commit d0d0a3d23e
3 changed files with 11 additions and 14 deletions

View file

@ -101,23 +101,10 @@ export default function Message({
const clickSearchResult = async () => {
if (!searchResult) return;
// dispatch(setMessages([]));
const convoResponse = await fetchById('convos', message.conversationId);
const convo = convoResponse.data;
// if (convo?.chatGptLabel) {
// // dispatch(setModel('chatgptCustom'));
// // dispatch(setCustomModel(convo.chatGptLabel.toLowerCase()));
// } else {
// // dispatch(setModel(convo.model));
// // dispatch(setCustomModel(null));
// }
// dispatch(setCustomGpt(convo));
switchToConversation(convo);
// dispatch(setConversation(convo));
// const { data } = await fetchById('messages', message.conversationId);
// dispatch(setMessages(data));
// dispatch(setDisabled(false));
};
return (