diff --git a/frontend/src/pages/WorkspaceSettings/AgentConfig/SQLConnectorSelection/DBConnection.jsx b/frontend/src/pages/WorkspaceSettings/AgentConfig/SQLConnectorSelection/DBConnection.jsx index 7a58da45..b2ff33bf 100644 --- a/frontend/src/pages/WorkspaceSettings/AgentConfig/SQLConnectorSelection/DBConnection.jsx +++ b/frontend/src/pages/WorkspaceSettings/AgentConfig/SQLConnectorSelection/DBConnection.jsx @@ -9,7 +9,7 @@ export const DB_LOGOS = { "sql-server": MSSQLLogo, }; -export default function DBConnection({ connection, onRemove }) { +export default function DBConnection({ connection, onRemove, setHasChanges }) { const { database_id, engine } = connection; function removeConfirmation() { if ( @@ -20,6 +20,7 @@ export default function DBConnection({ connection, onRemove }) { return false; } onRemove(database_id); + setHasChanges(true); } return ( diff --git a/frontend/src/pages/WorkspaceSettings/AgentConfig/SQLConnectorSelection/index.jsx b/frontend/src/pages/WorkspaceSettings/AgentConfig/SQLConnectorSelection/index.jsx index 9feb4b8b..848d44ed 100644 --- a/frontend/src/pages/WorkspaceSettings/AgentConfig/SQLConnectorSelection/index.jsx +++ b/frontend/src/pages/WorkspaceSettings/AgentConfig/SQLConnectorSelection/index.jsx @@ -9,6 +9,7 @@ export default function AgentSQLConnectorSelection({ settings, toggleSkill, enabled = false, + setHasChanges, }) { const { isOpen, openModal, closeModal } = useModal(); const [connections, setConnections] = useState( @@ -72,6 +73,7 @@ export default function AgentSQLConnectorSelection({ }) ); }} + setHasChanges={setHasChanges} /> ))} {hasChanges && ( @@ -211,6 +212,7 @@ function AvailableAgentSkills({ skills, settings, toggleAgentSkill }) { settings={settings} toggleSkill={toggleAgentSkill} enabled={skills.includes("sql-agent")} + setHasChanges={setHasChanges} />