From b78e8fe2e992830a49c8c2fec61d88f4fbab6aaf Mon Sep 17 00:00:00 2001 From: XiaomaiTX Date: Thu, 18 Jul 2024 20:13:47 +0800 Subject: [PATCH] fix(settings.ts): correct default sender behavior for mobile and PC --- app/src/store/settings.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/store/settings.ts b/app/src/store/settings.ts index 8c01f304..69eae793 100644 --- a/app/src/store/settings.ts +++ b/app/src/store/settings.ts @@ -15,7 +15,7 @@ export const initialSettings = { context: true, align: false, history: 8, - sender: isMobile(), // Defaults to true (Enter) in the case of mobile and false (Ctrl + Enter) on PCs + sender: !isMobile(), // default [mobile: Ctrl + Enter, pc: Enter] max_tokens: 2000, temperature: 0.6, top_p: 1, @@ -32,7 +32,7 @@ export const settingsSlice = createSlice({ context: getBooleanMemory("context", true), // keep context align: getBooleanMemory("align", false), // chat textarea align center history: getNumberMemory("history_context", 8), // max history context length - sender: getBooleanMemory("sender", false), // sender (false: Ctrl + Enter, true: Enter) + sender: getBooleanMemory("sender", !isMobile()), // sender (false: Ctrl + Enter, true: Enter) max_tokens: getNumberMemory("max_tokens", 2000), // max tokens temperature: getNumberMemory("temperature", 0.6), // temperature top_p: getNumberMemory("top_p", 1), // top_p