co-mono/packages
Mario Zechner b5648eaabd Fix extension context detection in runtime providers
Replace window.sendRuntimeMessage existence check with URL-based detection.
The sendRuntimeMessage function exists in both extension and non-extension
contexts (e.g., downloaded HTML artifacts), causing incorrect behavior.

Changes:
- Add window.__isExtensionContext() helper to RuntimeMessageBridge that checks:
  - chrome-extension:// URLs (Chrome)
  - moz-extension:// URLs (Firefox)
  - about:srcdoc (sandbox iframes)
- Update all runtime providers to use __isExtensionContext() instead:
  - FileDownloadRuntimeProvider: Correctly falls back to browser download
  - ConsoleRuntimeProvider: Only sends messages in extension context
  - ArtifactsRuntimeProvider: Properly detects offline/read-only mode

This fixes the issue where downloaded HTML artifacts incorrectly try to
communicate with the extension when opened from disk.
2025-10-11 18:39:45 +02:00
..
agent Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
ai Add ToolRenderResult interface for custom tool rendering 2025-10-11 04:40:42 +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 extension context detection in runtime providers 2025-10-11 18:39:45 +02:00