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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user