mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-23 14:10:18 +09:00
Update ChatActions to Assert Non-null Provider Name
- Modified the assignment of `providerName` in `ChatActions` to assert non-null, ensuring type safety and preventing potential runtime errors.
This commit is contained in:
parent
a5caf98db0
commit
9a865fd76f
@ -741,7 +741,7 @@ export function ChatActions(props: {
|
||||
// Only update if we found a valid provider
|
||||
chatStore.updateTargetSession(session, (session) => {
|
||||
session.mask.modelConfig.model = model as ModelType;
|
||||
session.mask.modelConfig.providerName = targetProvider; // Use the Enum value
|
||||
session.mask.modelConfig.providerName = targetProvider!; // Use the Enum value (Assert non-null)
|
||||
session.mask.syncGlobalConfig = false;
|
||||
console.log(
|
||||
"[ChatActions] Updated session modelConfig:",
|
||||
|
Loading…
Reference in New Issue
Block a user