mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-17 14:33:41 +08:00
修复模型选择继承的小bug
This commit is contained in:
@@ -224,14 +224,22 @@ export const useChatStore = createPersistStore(
|
||||
});
|
||||
},
|
||||
|
||||
newSession(mask?: Mask, currentModel?: Mask["modelConfig"]["model"]) {
|
||||
newSession(
|
||||
mask?: Mask,
|
||||
currentModel?: Mask["modelConfig"]["model"],
|
||||
currentProviderName?: ServiceProvider,
|
||||
) {
|
||||
const session = createEmptySession();
|
||||
const config = useAppConfig.getState();
|
||||
// console.log("------", session, "2222", config);
|
||||
// 继承当前会话的模型
|
||||
// 继承当前会话的模型,
|
||||
// 新增继承模型提供者
|
||||
if (currentModel) {
|
||||
session.mask.modelConfig.model = currentModel;
|
||||
}
|
||||
if (currentProviderName) {
|
||||
session.mask.modelConfig.providerName = currentProviderName;
|
||||
}
|
||||
if (mask) {
|
||||
const config = useAppConfig.getState();
|
||||
const globalModelConfig = config.modelConfig;
|
||||
|
||||
Reference in New Issue
Block a user