co-mono/packages/ai/src
Mario Zechner 26b774bb04 Add standalone mode for HTML artifact downloads
When downloading HTML artifacts, the generated HTML now works standalone
without requiring the extension runtime.

Changes:
- Add PrepareHtmlOptions config object to SandboxedIframe.prepareHtmlDocument()
- Add isStandalone flag to skip runtime bridge and navigation interceptor
- When isStandalone=true:
  - window.sendRuntimeMessage is NOT defined
  - Navigation interceptor is NOT injected
  - Artifact runtime providers fall back to embedded data
- HtmlArtifact download button now uses isStandalone: true

This fixes the issue where downloaded HTML artifacts would:
- Try to call window.sendRuntimeMessage (which would fail silently)
- Try to postMessage to non-existent parent window
- Not work when opened via file:// protocol

Now downloaded artifacts work completely standalone with embedded data.
2025-10-12 00:39:26 +02:00
..
agent Add standalone mode for HTML artifact downloads 2025-10-12 00:39:26 +02:00
providers Add Anthropic prompt caching, pluggable storage, and CORS proxy support 2025-10-05 23:00:36 +02:00
utils More browser extension work, disable ajv validation in browser extensions, it uses eval/new Function, which is not allowed in manifest v3 extensions 2025-10-01 20:30:49 +02:00
index.ts refactor(ai): improve error handling and stop reason types 2025-09-18 19:57:13 +02:00
models.generated.ts Revert: Fix extension context detection - original logic was correct 2025-10-11 19:32:33 +02:00
models.ts refactor(ai): Simplify API with new streaming interface and model management 2025-09-03 01:25:19 +02:00
stream.ts feat(ai): Implement Zod-based tool validation and improve Agent API 2025-09-09 14:58:54 +02:00
types.ts refactor(ai): improve error handling and stop reason types 2025-09-18 19:57:13 +02:00