From 6073febbaf8e7dedf1f194e3c4a76b22b556c3e7 Mon Sep 17 00:00:00 2001 From: Archeb Date: Wed, 26 Jun 2024 02:02:08 +0800 Subject: [PATCH] fs fix --- provider.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provider.mjs b/provider.mjs index 9e60b21..f041360 100644 --- a/provider.mjs +++ b/provider.mjs @@ -162,7 +162,7 @@ class YouProvider { if (!userChatMode) console.log("Failed to create user chat mode, will use default mode instead."); this.config.sessions[session.configIndex].user_chat_mode_id[proxyModel] = userChatMode.chat_mode_id; // 写回config - await fs.writeFile("./config.mjs", "export const config = " + JSON.stringify(this.config, null, 4)); + fs.writeFileSync("./config.mjs", "export const config = " + JSON.stringify(this.config, null, 4)); } userChatModeId = this.config.sessions[session.configIndex].user_chat_mode_id[proxyModel]; } else {