feat: i18n refactor and style adjustment

This commit is contained in:
Yidadaa
2023-04-28 00:34:37 +08:00
parent 6c1144f6f4
commit fb32770486
23 changed files with 266 additions and 156 deletions

View File

@@ -319,7 +319,10 @@ export const useChatStore = create<ChatStore>()(
return {
role: "system",
content: Locale.Store.Prompt.History(session.memoryPrompt),
content:
session.memoryPrompt.length > 0
? Locale.Store.Prompt.History(session.memoryPrompt)
: "",
date: "",
} as Message;
},
@@ -481,10 +484,8 @@ export const useChatStore = create<ChatStore>()(
},
clearAllData() {
if (confirm(Locale.Store.ConfirmClearAll)) {
localStorage.clear();
location.reload();
}
localStorage.clear();
location.reload();
},
}),
{

View File

@@ -28,6 +28,8 @@ export const DEFAULT_CONFIG = {
disablePromptHint: false,
dontShowMaskSplashScreen: false, // dont show splash screen when create chat
modelConfig: {
model: "gpt-3.5-turbo" as ModelType,
temperature: 1,
@@ -138,6 +140,7 @@ export const useAppConfig = create<ChatConfigStore>()(
state.modelConfig.sendMemory = true;
state.modelConfig.historyMessageCount = 4;
state.modelConfig.compressMessageLengthThreshold = 1000;
state.dontShowMaskSplashScreen = false;
return state;
},