mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-17 16:56:37 +08:00
feat: 更新网络配置管理,修复主题切换时的网络状态逻辑
This commit is contained in:
parent
86f2c67784
commit
9cb7275703
@ -512,7 +512,7 @@ export function ChatActions(props: {
|
||||
|
||||
// switch themes
|
||||
const theme = config.theme;
|
||||
const enableNetWork = config.modelConfig.enableNetWork;
|
||||
const enableNetWork = session.mask.modelConfig.enableNetWork || false;
|
||||
|
||||
function nextTheme() {
|
||||
const themes = [Theme.Auto, Theme.Light, Theme.Dark];
|
||||
@ -523,10 +523,10 @@ export function ChatActions(props: {
|
||||
}
|
||||
|
||||
function nextNetWork() {
|
||||
config.update(
|
||||
(config) =>
|
||||
(config.modelConfig.enableNetWork = !config.modelConfig.enableNetWork),
|
||||
);
|
||||
chatStore.updateTargetSession(session, (session) => {
|
||||
session.mask.modelConfig.enableNetWork =
|
||||
!session.mask.modelConfig.enableNetWork;
|
||||
});
|
||||
}
|
||||
|
||||
// stop all responses
|
||||
|
Loading…
Reference in New Issue
Block a user