mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 12:03:49 +00:00
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. |
||
|---|---|---|
| .. | ||
| agent | ||
| ai | ||
| pods | ||
| proxy | ||
| tui | ||
| web-ui | ||