From 4ddada4de81e5ecc7307d8a5365da24ab2b47363 Mon Sep 17 00:00:00 2001 From: icarus Date: Tue, 23 Sep 2025 11:19:00 +0800 Subject: [PATCH] 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 --- .../AgentSettings/AgentToolSettings.tsx | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/renderer/src/pages/settings/AgentSettings/AgentToolSettings.tsx b/src/renderer/src/pages/settings/AgentSettings/AgentToolSettings.tsx index fdd4f0cce0..e3cf948433 100644 --- a/src/renderer/src/pages/settings/AgentSettings/AgentToolSettings.tsx +++ b/src/renderer/src/pages/settings/AgentSettings/AgentToolSettings.tsx @@ -77,10 +77,7 @@ export const AgentToolSettings: FC = ({ agent, updateAge {t('agent.settings.tools.title', 'Pre-approved tools')} + content={t('agent.settings.tools.description', 'Choose which tools can run without manual approval.')}> @@ -91,13 +88,15 @@ export const AgentToolSettings: FC = ({ agent, updateAge ) : null} - +
+ +
{availableTools.length > 0 ? (
@@ -124,10 +123,7 @@ export const AgentToolSettings: FC = ({ agent, updateAge {tool.requirePermissions ? ( - {t( - 'agent.settings.tools.requiresPermission', - 'Requires permission when not pre-approved.' - )} + {t('agent.settings.tools.requiresPermission', 'Requires permission when not pre-approved.')} ) : null}