From f55c1b984b0e375b575bc57091ac2288a2028e2f Mon Sep 17 00:00:00 2001 From: akinshaywai Date: Fri, 24 Apr 2026 01:49:22 +0100 Subject: [PATCH] chore: remove debug console.log statements from production code Three debug logs left in production paths: - useAgent.ts: logs task string on every agent execution - HeroSection.tsx: logs getPageInstructions url/hint on every page visit - HeroSection.tsx: logs the full execute() result to the console None of these are error-level events and they leak internal details to the browser console in production builds. --- packages/extension/src/agent/useAgent.ts | 1 - packages/website/src/pages/home/HeroSection.tsx | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/extension/src/agent/useAgent.ts b/packages/extension/src/agent/useAgent.ts index c6a31bf..cfc7702 100644 --- a/packages/extension/src/agent/useAgent.ts +++ b/packages/extension/src/agent/useAgent.ts @@ -108,7 +108,6 @@ export function useAgent(): UseAgentResult { const execute = useCallback(async (task: string) => { const agent = agentRef.current - console.log('🚀 [useAgent] start executing task:', task) if (!agent) throw new Error('Agent not initialized') setCurrentTask(task) diff --git a/packages/website/src/pages/home/HeroSection.tsx b/packages/website/src/pages/home/HeroSection.tsx index 0e562e1..7a381d8 100644 --- a/packages/website/src/pages/home/HeroSection.tsx +++ b/packages/website/src/pages/home/HeroSection.tsx @@ -77,9 +77,7 @@ export default function HeroSection() { instructions: { system: 'You are a helpful assistant on PageAgent website.', getPageInstructions: (url: string) => { - const hint = url.includes('page-agent') ? 'This is PageAgent demo page.' : undefined - console.log('[instructions] getPageInstructions:', url, '->', hint) - return hint + return url.includes('page-agent') ? 'This is PageAgent demo page.' : undefined }, }, @@ -98,8 +96,7 @@ export default function HeroSection() { }) } - const result = await win.pageAgent.execute(task) - console.log(result) + await win.pageAgent.execute(task) } return (