This commit is contained in:
archer
2023-07-17 22:05:45 +08:00
parent 509ca92f0a
commit ecce182a20
16 changed files with 1395 additions and 1422 deletions

View File

@@ -260,6 +260,20 @@ const Chat = () => {
});
} catch (error) {}
}}
onUpdateTitle={async (e) => {
try {
await putChatHistory({
historyId: e.historyId,
customTitle: e.title
});
const historyItem = history.find((item) => item._id === e.historyId);
if (!historyItem) return;
updateHistory({
...historyItem,
title: e.title
});
} catch (error) {}
}}
/>
)}
{/* chat container */}