mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 04:34:31 +08:00
fixup
This commit is contained in:
@@ -5,7 +5,7 @@ import { trimTopic } from "../utils";
|
||||
|
||||
import Locale, { getLang } from "../locales";
|
||||
import { showToast } from "../components/ui-lib";
|
||||
import { ModelConfig, ModelType } from "./config";
|
||||
import { ModelConfig, ModelType, useAppConfig } from "./config";
|
||||
import { createEmptyMask, Mask } from "./mask";
|
||||
import { DEFAULT_INPUT_TEMPLATE, StoreKey } from "../constant";
|
||||
import { api, RequestMessage } from "../client/api";
|
||||
@@ -181,7 +181,16 @@ export const useChatStore = create<ChatStore>()(
|
||||
session.id = get().globalId;
|
||||
|
||||
if (mask) {
|
||||
session.mask = { ...mask };
|
||||
const config = useAppConfig.getState();
|
||||
const globalModelConfig = config.modelConfig;
|
||||
|
||||
session.mask = {
|
||||
...mask,
|
||||
modelConfig: {
|
||||
...globalModelConfig,
|
||||
...mask.modelConfig,
|
||||
},
|
||||
};
|
||||
session.topic = mask.name;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user