fix: clear mcp confirm reset timer (#3497)

* fix: clear mcp confirm reset timer

* fix: avoid mcp settings line-count growth
This commit is contained in:
Neil
2026-05-29 23:34:08 -07:00
committed by GitHub
parent 1209133076
commit 294ca161a4
@@ -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)