co-mono/packages/web-ui/src/components
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
..
sandbox Fix console.log duplication bug in ConsoleRuntimeProvider 2025-10-13 00:20:23 +02:00
AgentInterface.ts Add ToolRenderResult interface for custom tool rendering 2025-10-11 04:40:42 +02:00
AttachmentTile.ts web-ui package 2025-10-05 13:30:08 +02:00
ConsoleBlock.ts Refactor artifacts renderer and add Console component 2025-10-08 01:54:50 +02:00
ExpandableSection.ts Refactor artifacts renderer and add Console component 2025-10-08 01:54:50 +02:00
Input.ts web-ui package 2025-10-05 13:30:08 +02:00
message-renderer-registry.ts Add custom message extension system with typed renderers and message transformer 2025-10-06 13:45:08 +02:00
MessageEditor.ts Add paste image support to MessageEditor 2025-10-12 19:47:38 +02:00
MessageList.ts Add artifact message persistence for session reconstruction 2025-10-09 04:07:59 +02:00
Messages.ts Add ToolRenderResult interface for custom tool rendering 2025-10-11 04:40:42 +02:00
ProviderKeyInput.ts Fix abort detection to use message stopReason instead of global isStreaming 2025-10-10 01:40:59 +02:00
SandboxedIframe.ts Add standalone mode for HTML artifact downloads 2025-10-12 00:39:26 +02:00
StreamingMessageContainer.ts web-ui package 2025-10-05 13:30:08 +02:00