MCPcopy Create free account
hub / github.com/CopilotKit/OpenGenerativeUI / assembleDocument

Function assembleDocument

apps/mcp/src/renderer.ts:32–65  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

30`;
31
32export function assembleDocument(html: string): string {
33 return `<!DOCTYPE html>
34<html>
35<head>
36 <meta charset="utf-8">
37 <meta name="viewport" content="width=device-width, initial-scale=1">
38 <meta http-equiv="Content-Security-Policy" content="
39 default-src 'self';
40 script-src 'unsafe-inline' 'unsafe-eval'
41 https://cdnjs.cloudflare.com
42 https://esm.sh
43 https://cdn.jsdelivr.net
44 https://unpkg.com;
45 style-src 'unsafe-inline';
46 img-src 'self' data: blob:;
47 font-src 'self' data:;
48 connect-src 'self';
49 ">
50 <style>
51 ${THEME_CSS}
52 ${SVG_CLASSES_CSS}
53 ${FORM_STYLES_CSS}
54 </style>
55</head>
56<body>
57 <div id="content">
58 ${html}
59 </div>
60 <script>
61 ${BRIDGE_JS}
62 </script>
63</body>
64</html>`;
65}

Callers 2

renderer.test.tsFile · 0.90
createMcpServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected