diff --git a/src/renderer/src/components/settings/McpConfigSection.tsx b/src/renderer/src/components/settings/McpConfigSection.tsx index d819da4ca..ab0d17adc 100644 --- a/src/renderer/src/components/settings/McpConfigSection.tsx +++ b/src/renderer/src/components/settings/McpConfigSection.tsx @@ -212,10 +212,6 @@ export function McpConfigSection({ repo }: McpConfigSectionProps): React.JSX.Ele } }, [connectionId, isWindows, missingInspections, sshConnectionStatus, targetRootPath]) - useEffect(() => { - void loadConfigs() - }, [loadConfigs]) - const clearCreateConfirmResetTimer = useCallback((): void => { if (createConfirmResetTimerRef.current !== null) { window.clearTimeout(createConfirmResetTimerRef.current) @@ -223,6 +219,11 @@ export function McpConfigSection({ repo }: McpConfigSectionProps): React.JSX.Ele } }, []) + useEffect(() => { + void loadConfigs() + return clearCreateConfirmResetTimer + }, [clearCreateConfirmResetTimer, loadConfigs]) + const handleOpen = (config: LoadedMcpConfigInspection): void => { setActiveWorktree(targetWorktreeId) const targetGroupId = ensureWorktreeRootGroup(targetWorktreeId)