Skip to content

Commit

Permalink
[front] - fix: ensure null safety in model provider configuration and…
Browse files Browse the repository at this point in the history
… disable dropdown (#8461)

- Add a null check to the model provider configuration to prevent accessing properties on null
 - Disable the provider dropdown trigger to prevent users from changing the embedding provider without contact
 - Make the 'Change' button disabled to match the dropdown trigger's new disabled state
  • Loading branch information
JulesBelveze authored Nov 6, 2024
1 parent a5cdf3d commit cf63e56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion front/components/workspace/ProviderManagementModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export function ProviderManagementModal({
<div className="flex flex-row items-center gap-4 px-4 pt-4">
<div className="text-sm font-semibold">Embedding Provider:</div>
<NewDropdownMenu>
<NewDropdownMenuTrigger>
<NewDropdownMenuTrigger disabled>
<Tooltip
label="Please contact us if you are willing to change this setting."
trigger={
Expand All @@ -208,6 +208,7 @@ export function ProviderManagementModal({
}
variant="outline"
size="sm"
disabled
/>
}
/>
Expand Down

0 comments on commit cf63e56

Please sign in to comment.