fix(walkthrough): keep unauthenticated models out of the picker
Treat an empty allowedProviderIds list as allow-none, disable Generate when no usable model is selected, and mute the button styling so it reads as unavailable rather than actionable. Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
co-authored by
Serhii Dziupin
parent
35f17e9e96
commit
5c6eee331e
@@ -436,7 +436,10 @@ export const ModelPickerList: React.FC<ModelPickerListProps> = ({
|
||||
);
|
||||
|
||||
const allowedProviderSet = React.useMemo(() => {
|
||||
if (!allowedProviderIds || allowedProviderIds.length === 0) return null;
|
||||
// undefined = no restriction; [] = allow none. Treating empty like
|
||||
// "unrestricted" would resurface providers without a login in pickers that
|
||||
// intentionally pass the authenticated-only list.
|
||||
if (!allowedProviderIds) return null;
|
||||
return new Set(allowedProviderIds);
|
||||
}, [allowedProviderIds]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user