diff --git a/src/main/engine/mcp-view-builder.ts b/src/main/engine/mcp-view-builder.ts index 5461109..655f52f 100644 --- a/src/main/engine/mcp-view-builder.ts +++ b/src/main/engine/mcp-view-builder.ts @@ -3,14 +3,15 @@ * from shared boilerplate + per-view configuration. * * Each generated page uses the `App` class from - * `@modelcontextprotocol/ext-apps` (loaded via the `app-with-deps` bundle) + * `@modelcontextprotocol/ext-apps` (inlined as a self-contained script) * and is served as a `ui://` resource for MCP hosts. * - * This replaces the previous approach of 4 separate HTML files that - * duplicated ~80% of their content (CSS, JS boilerplate, accept/discard - * handlers, status display, XSS escaping, app connection). + * The bundle is loaded from disk once and cached; it cannot use bare + * specifiers in the sandboxed iframe, so it is inlined directly. */ +import * as fs from 'fs'; + /** Configuration for a single MCP review view. */ export interface McpViewConfig { /** Page