co-mono/packages
Mario Zechner 949cd4efd8 Fix console.log duplication bug in ConsoleRuntimeProvider
Issue:
Each browser_javascript execution wrapped console methods, but captured
the current (already wrapped) console as "original". This created a chain
of wrappers that accumulated across executions:
- Execution 1: 1x console.log (wrapper1 → real console)
- Execution 2: 2x console.log (wrapper2 → wrapper1 → real console)
- Execution 3: 3x console.log (wrapper3 → wrapper2 → wrapper1 → real console)
- Execution 4: 4x console.log (and so on...)

Fix:
Store the truly original console methods in window.__originalConsole on
first wrap only. All subsequent executions use these stored original methods
instead of capturing the current console. This prevents wrapper accumulation.

Changes:
- Check if window.__originalConsole exists before wrapping
- Store original console methods with .bind() to preserve context
- Always use window.__originalConsole for local logging
- Now each execution logs exactly 1x regardless of execution count
2025-10-13 00:20:23 +02:00
..
agent Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
ai Fix TypeScript errors and export UserMessageWithAttachments 2025-10-12 17:09:14 +02:00
pods Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
proxy Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
tui Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
web-ui Fix console.log duplication bug in ConsoleRuntimeProvider 2025-10-13 00:20:23 +02:00