mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 01:26:33 +08:00
fix: not auther tool in readonly mode
This commit is contained in:
parent
67b0771081
commit
b6bdcc7052
@ -119,7 +119,7 @@ const AgentTools: FC = () => {
|
|||||||
}
|
}
|
||||||
const getProviderShowName = (item: AgentTool) => {
|
const getProviderShowName = (item: AgentTool) => {
|
||||||
const type = item.provider_type
|
const type = item.provider_type
|
||||||
if(type === CollectionType.builtIn)
|
if (type === CollectionType.builtIn)
|
||||||
return item.provider_name.split('/').pop()
|
return item.provider_name.split('/').pop()
|
||||||
return item.provider_name
|
return item.provider_name
|
||||||
}
|
}
|
||||||
@ -291,10 +291,14 @@ const AgentTools: FC = () => {
|
|||||||
}} />
|
}} />
|
||||||
)}
|
)}
|
||||||
{item.notAuthor && (
|
{item.notAuthor && (
|
||||||
<Button variant='secondary' size='small' onClick={() => {
|
<Button
|
||||||
setCurrentTool(item)
|
variant='secondary'
|
||||||
setIsShowSettingTool(true)
|
disabled={readonly}
|
||||||
}}>
|
size='small' onClick={() => {
|
||||||
|
setCurrentTool(item)
|
||||||
|
setIsShowSettingTool(true)
|
||||||
|
}}
|
||||||
|
>
|
||||||
{t('tools.notAuthorized')}
|
{t('tools.notAuthorized')}
|
||||||
<Indicator className='ml-2' color='orange' />
|
<Indicator className='ml-2' color='orange' />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user