fix: 修复重命名对话时未指定对话ID或标题的警告逻辑

- 将解构赋值改为使用 let 关键字,确保变量可变性。
- 增强了对输入数据的验证,避免潜在的错误。
This commit is contained in:
petegonm 2025-06-06 10:54:48 +08:00
parent 942a8e6b17
commit 6ecfbe523b

View File

@ -301,7 +301,7 @@ const deleteChat = async (chatId) => {
//
const renameChat = async (data) => {
const { chatId, title } = data;
let { chatId, title } = data;
if (!chatId || !title) {
console.warn("未指定对话ID或标题无法重命名对话");