From 8eaffcd6047590d1250c5a52f6f5f20b3025cd06 Mon Sep 17 00:00:00 2001 From: EthanHealy01 Date: Wed, 30 Jul 2025 14:20:36 +0100 Subject: [PATCH] remove logs --- frontend/src/hooks/useToolManagement.tsx | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/frontend/src/hooks/useToolManagement.tsx b/frontend/src/hooks/useToolManagement.tsx index b1f0c687f..80cbd57f4 100644 --- a/frontend/src/hooks/useToolManagement.tsx +++ b/frontend/src/hooks/useToolManagement.tsx @@ -71,30 +71,12 @@ export const useToolManagement = (): ToolManagementResult => { Object.values(toolDefinitions).flatMap(tool => tool.endpoints || []) )); const { endpointStatus, loading: endpointsLoading } = useMultipleEndpointsEnabled(allEndpoints); - console.log("[Tool Management] Endpoint validation results:", { - totalEndpoints: allEndpoints.length, - endpoints: allEndpoints, - status: endpointStatus, - loading: endpointsLoading - }); const isToolAvailable = useCallback((toolKey: string): boolean => { - if (endpointsLoading) { - console.log(`[Tool Management] Tool ${toolKey} availability check - endpoints still loading`); - return true; - } + if (endpointsLoading) return true; const tool = toolDefinitions[toolKey]; - if (!tool?.endpoints) { - console.log(`[Tool Management] Tool ${toolKey} has no endpoints defined, assuming available`); - return true; - } - const isAvailable = tool.endpoints.some(endpoint => endpointStatus[endpoint] === true); - console.log(`[Tool Management] Tool ${toolKey} availability:`, { - toolEndpoints: tool.endpoints, - endpointStatuses: tool.endpoints.map(ep => ({ endpoint: ep, enabled: endpointStatus[ep] })), - isAvailable - }); - return isAvailable; + if (!tool?.endpoints) return true; + return tool.endpoints.some(endpoint => endpointStatus[endpoint] === true); }, [endpointsLoading, endpointStatus]); const toolRegistry: ToolRegistry = useMemo(() => {