MCPcopy Index your code
hub / github.com/Waishnav/devspace / workspaceAppHtml

Function workspaceAppHtml

src/server.ts:401–426  ·  view source on GitHub ↗
(config: ServerConfig)

Source from the content-addressed store, hash-verified

399}
400
401function workspaceAppHtml(config: ServerConfig): string {
402 const baseUrl = assetBaseUrl(config);
403 const entry = getWorkspaceAppManifestEntry();
404 const stylesheets = (entry.css ?? [])
405 .map(
406 (stylesheet) =>
407 ` <link rel="stylesheet" crossorigin href="${assetUrl(baseUrl, stylesheet)}" />`,
408 )
409 .join("\n");
410
411 return `<!doctype html>
412<html lang="en">
413 <head>
414 <meta charset="UTF-8" />
415 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
416 <title>DevSpace Workspace</title>
417 <script type="module" crossorigin src="${assetUrl(baseUrl, entry.file)}"></script>
418${stylesheets}
419 </head>
420 <body>
421 <main id="app" class="shell">
422 <section class="empty">Waiting for a tool result.</section>
423 </main>
424 </body>
425</html>`;
426}
427
428function appCsp(config: ServerConfig): {
429 resourceDomains: string[];

Callers 1

createMcpServerFunction · 0.85

Calls 3

assetBaseUrlFunction · 0.85
assetUrlFunction · 0.85

Tested by

no test coverage detected