fix: disable remote model when user did not setup apiKey, and change cursor when disabled (#3415)
This commit is contained in:
parent
c4419632d6
commit
d88c096c54
@ -580,10 +580,15 @@ const ModelDropdown = ({
|
||||
className={twMerge(
|
||||
'cursor-pointer px-3 py-2 hover:bg-[hsla(var(--dropdown-menu-hover-bg))]',
|
||||
!apiKey
|
||||
? 'cursor-disabled text-[hsla(var(--text-tertiary))]'
|
||||
? 'cursor-not-allowed text-[hsla(var(--text-tertiary))]'
|
||||
: 'text-[hsla(var(--text-secondary))]'
|
||||
)}
|
||||
onClick={() => {
|
||||
if (
|
||||
!apiKey &&
|
||||
!localEngines.includes(model.engine)
|
||||
)
|
||||
return null
|
||||
onClickModelItem(model.id)
|
||||
}}
|
||||
>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user