fix: use activeAssistant's id for fetching assistant and model data
This commit is contained in:
parent
31284a6e23
commit
13c73a3de1
@ -13,8 +13,9 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Navigation: FC<Props> = ({ activeAssistant }) => {
|
const Navigation: FC<Props> = ({ activeAssistant }) => {
|
||||||
const { providers } = useProviders()
|
const { assistant } = useAssistant(activeAssistant.id)
|
||||||
const { model, setModel } = useAssistant(activeAssistant.id)
|
const { model, setModel } = useAssistant(activeAssistant.id)
|
||||||
|
const { providers } = useProviders()
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
const items: MenuProps['items'] = providers
|
const items: MenuProps['items'] = providers
|
||||||
@ -33,7 +34,7 @@ const Navigation: FC<Props> = ({ activeAssistant }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<NavbarCenter style={{ border: 'none', padding: '0 15px' }}>
|
<NavbarCenter style={{ border: 'none', padding: '0 15px' }}>
|
||||||
{activeAssistant?.name}
|
{assistant?.name}
|
||||||
<DropdownMenu menu={{ items, style: { maxHeight: '80vh', overflow: 'auto' } }} trigger={['click']}>
|
<DropdownMenu menu={{ items, style: { maxHeight: '80vh', overflow: 'auto' } }} trigger={['click']}>
|
||||||
<Button size="small" type="primary" ghost style={{ fontSize: '11px' }}>
|
<Button size="small" type="primary" ghost style={{ fontSize: '11px' }}>
|
||||||
{model ? model.name : t('button.select_model')}
|
{model ? model.name : t('button.select_model')}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user