mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	dev: use current inject configuration
This commit is contained in:
		@@ -623,9 +623,14 @@ export const useChatStore = create<ChatStore>()(
 | 
				
			|||||||
        if (version < 3.1) {
 | 
					        if (version < 3.1) {
 | 
				
			||||||
          newState.sessions.forEach((s) => {
 | 
					          newState.sessions.forEach((s) => {
 | 
				
			||||||
            if (
 | 
					            if (
 | 
				
			||||||
 | 
					              // Exclude those already set by user
 | 
				
			||||||
              !s.mask.modelConfig.hasOwnProperty("enableInjectSystemPrompts")
 | 
					              !s.mask.modelConfig.hasOwnProperty("enableInjectSystemPrompts")
 | 
				
			||||||
            ) {
 | 
					            ) {
 | 
				
			||||||
              s.mask.modelConfig.enableInjectSystemPrompts = true;
 | 
					              // Because users may have changed this configuration,
 | 
				
			||||||
 | 
					              // the user's current configuration is used instead of the default
 | 
				
			||||||
 | 
					              const config = useAppConfig.getState();
 | 
				
			||||||
 | 
					              s.mask.modelConfig.enableInjectSystemPrompts =
 | 
				
			||||||
 | 
					                config.modelConfig.enableInjectSystemPrompts;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user