mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 22:39:36 +08:00
refactor(AgentToolSettings): wrap Alert component in div for better structure
Improve component structure by wrapping Alert in a div element to maintain consistent layout and styling
This commit is contained in:
parent
164386a337
commit
4ddada4de8
@ -77,10 +77,7 @@ export const AgentToolSettings: FC<AgentToolSettingsProps> = ({ agent, updateAge
|
|||||||
{t('agent.settings.tools.title', 'Pre-approved tools')}
|
{t('agent.settings.tools.title', 'Pre-approved tools')}
|
||||||
<Tooltip
|
<Tooltip
|
||||||
placement="right"
|
placement="right"
|
||||||
content={t(
|
content={t('agent.settings.tools.description', 'Choose which tools can run without manual approval.')}>
|
||||||
'agent.settings.tools.description',
|
|
||||||
'Choose which tools can run without manual approval.'
|
|
||||||
)}>
|
|
||||||
<Info size={16} className="text-foreground-400" />
|
<Info size={16} className="text-foreground-400" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</SettingsTitle>
|
</SettingsTitle>
|
||||||
@ -91,13 +88,15 @@ export const AgentToolSettings: FC<AgentToolSettingsProps> = ({ agent, updateAge
|
|||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Alert
|
<div>
|
||||||
color="warning"
|
<Alert
|
||||||
title={t(
|
color="warning"
|
||||||
'agent.settings.tools.caution',
|
title={t(
|
||||||
'Pre-approved tools bypass human review. Enable only trusted tools.'
|
'agent.settings.tools.caution',
|
||||||
)}
|
'Pre-approved tools bypass human review. Enable only trusted tools.'
|
||||||
/>
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
{availableTools.length > 0 ? (
|
{availableTools.length > 0 ? (
|
||||||
<div className="flex flex-1 flex-col gap-3 overflow-auto pr-1">
|
<div className="flex flex-1 flex-col gap-3 overflow-auto pr-1">
|
||||||
@ -124,10 +123,7 @@ export const AgentToolSettings: FC<AgentToolSettingsProps> = ({ agent, updateAge
|
|||||||
{tool.requirePermissions ? (
|
{tool.requirePermissions ? (
|
||||||
<CardBody className="py-0 pb-3">
|
<CardBody className="py-0 pb-3">
|
||||||
<span className="text-foreground-400 text-xs">
|
<span className="text-foreground-400 text-xs">
|
||||||
{t(
|
{t('agent.settings.tools.requiresPermission', 'Requires permission when not pre-approved.')}
|
||||||
'agent.settings.tools.requiresPermission',
|
|
||||||
'Requires permission when not pre-approved.'
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user