Prevent infinite loops in model selection logic by configuring an initial model state

This commit is contained in:
sabaimran
2025-02-03 18:11:01 -08:00
parent 489fa71143
commit 51874c25d5
2 changed files with 15 additions and 7 deletions

View File

@@ -266,6 +266,7 @@ function ChatSidebarInternal({ ...props }: ChatSideBarProps) {
<ModelSelector
disabled={!isEditable || !authenticatedData?.is_active}
onSelect={(model, userModification) => handleModelSelect(model.name, userModification)}
initialModel={agentData?.chat_model}
selectedModel={selectedModel}
/>
</SidebarMenuItem>