export const codeTheme = {
  name: 'custom-theme',
  colors: {
    'editor.background': 'var(--background)',
    'editor.foreground': 'var(--foreground)'
  },
  settings: [
    {
      scope: ['comment'],
      settings: {
        foreground: 'var(--color-neutral-400)'
      }
    },
    {
      scope: ['keyword'],
      settings: {
        fontStyle: 'bold'
      }
    },
    {
      scope: ['string'],
      settings: {
        foreground: 'var(--color-orange-800)'
      }
    }
  ]
};

export const originalCode = `import { getSandbox } from "@cloudflare/sandbox";

// Export the Sandbox class in your Worker
export { Sandbox } from "@cloudflare/sandbox";

export default {
  async fetch(request: Request, env: Env) {
    const sandbox = getSandbox(env.Sandbox, "test-env");
    // Clone a repository
    await sandbox.gitCheckout(
      "https://github.com/cloudflare/agents"
    );
    // Run tests
    const testResult = await sandbox.exec("npm test");
    return new Response(
      JSON.stringify({
        tests: testResult.exitCode === 0 
          ? "passed"
          : "failed",
        output: testResult.stdout,
      })
    );
  },
};`;

export const originalNodeCode = `const sandbox = getSandbox(env.Sandbox, "node-app");

// Write a simple Express server
await sandbox.writeFile(
  "/workspace/app.js",
  \`const express = require('express');
  const app = express();

  app.get('/', (req, res) => {
    res.json({ message: 'Hello from Cloudflare!' });
  });
  app.listen(3000);\`
);

// Install dependencies and start the server
await sandbox.exec("npm init -y");
await sandbox.exec("npm install express");
const server = await sandbox.startProcess("node app.js");

// Expose it to the internet
const preview = await sandbox.exposePort(3000);
console.log(\`API available at: \${preview.url}\`);`;

// Generated by shiki - inlining it here so we don't need to load
// shiki at runtime
export const nodeExample = `<pre class="shiki custom-theme max-w-full max-h-full overflow-auto" style="background-color:var(--background);color:var(--foreground)" tabindex="0"><code><span class="line"><span style="color:var(--foreground)">const sandbox </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground)"> getSandbox(env.Sandbox, </span><span style="color:var(--color-orange-800)">"node-app"</span><span style="color:var(--foreground)">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">// Write a simple Express server</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">await</span><span style="color:var(--foreground)"> sandbox.writeFile(</span></span>
<span class="line"><span style="color:var(--color-orange-800)">  "/workspace/app.js"</span><span style="color:var(--foreground)">,</span></span>
<span class="line"><span style="color:var(--color-orange-800)">  \`const express = require('express');</span></span>
<span class="line"><span style="color:var(--color-orange-800)">  const app = express();</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-orange-800)">  app.get('/', (req, res) => {</span></span>
<span class="line"><span style="color:var(--color-orange-800)">    res.json({ message: 'Hello from Cloudflare!' });</span></span>
<span class="line"><span style="color:var(--color-orange-800)">  });</span></span>
<span class="line"><span style="color:var(--color-orange-800)">  app.listen(3000);\`</span></span>
<span class="line"><span style="color:var(--foreground)">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">// Install dependencies and start the server</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">await</span><span style="color:var(--foreground)"> sandbox.exec(</span><span style="color:var(--color-orange-800)">"npm init -y"</span><span style="color:var(--foreground)">);</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">await</span><span style="color:var(--foreground)"> sandbox.exec(</span><span style="color:var(--color-orange-800)">"npm install express"</span><span style="color:var(--foreground)">);</span></span>
<span class="line"><span style="color:var(--foreground)">const server </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground);font-weight:bold"> await</span><span style="color:var(--foreground)"> sandbox.startProcess(</span><span style="color:var(--color-orange-800)">"node app.js"</span><span style="color:var(--foreground)">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">// Expose it to the internet</span></span>
<span class="line"><span style="color:var(--foreground)">const preview </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground);font-weight:bold"> await</span><span style="color:var(--foreground)"> sandbox.exposePort(3000);</span></span>
<span class="line"><span style="color:var(--foreground)">console.log(</span><span style="color:var(--color-orange-800)">\`API available at: \${</span><span style="color:var(--color-orange-800)">preview.url</span><span style="color:var(--color-orange-800)">}\`</span><span style="color:var(--foreground)">);</span></span></code></pre>`;

// Generated by shiki - inlining it here so we don't need to load
// shiki at runtime
export const code = `<pre class="shiki custom-theme max-w-full max-h-full overflow-auto" style="background-color:var(--background);color:var(--foreground)" tabindex="0"><code><span class="line"><span style="color:var(--foreground);font-weight:bold">import</span><span style="color:var(--foreground)"> { getSandbox } </span><span style="color:var(--foreground);font-weight:bold">from</span><span style="color:var(--color-orange-800)"> "@cloudflare/sandbox"</span><span style="color:var(--foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">// Export the Sandbox class in your Worker</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">export</span><span style="color:var(--foreground)"> { Sandbox } </span><span style="color:var(--foreground);font-weight:bold">from</span><span style="color:var(--color-orange-800)"> "@cloudflare/sandbox"</span><span style="color:var(--foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">export</span><span style="color:var(--foreground);font-weight:bold"> default</span><span style="color:var(--foreground)"> {</span></span>
<span class="line"><span style="color:var(--foreground)">  async fetch(request</span><span style="color:var(--foreground);font-weight:bold">:</span><span style="color:var(--foreground)"> Request, env</span><span style="color:var(--foreground);font-weight:bold">:</span><span style="color:var(--foreground)"> Env) {</span></span>
<span class="line"><span style="color:var(--foreground)">    const sandbox </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground)"> getSandbox(env.Sandbox, </span><span style="color:var(--color-orange-800)">"test-env"</span><span style="color:var(--foreground)">);</span></span>
<span class="line"><span style="color:var(--color-neutral-400)">    // Clone a repository</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">    await</span><span style="color:var(--foreground)"> sandbox.gitCheckout(</span></span>
<span class="line"><span style="color:var(--color-orange-800)">      "https://github.com/cloudflare/agents"</span></span>
<span class="line"><span style="color:var(--foreground)">    );</span></span>
<span class="line"><span style="color:var(--color-neutral-400)">    // Run tests</span></span>
<span class="line"><span style="color:var(--foreground)">    const testResult </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground);font-weight:bold"> await</span><span style="color:var(--foreground)"> sandbox.exec(</span><span style="color:var(--color-orange-800)">"npm test"</span><span style="color:var(--foreground)">);</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">    return</span><span style="color:var(--foreground);font-weight:bold"> new</span><span style="color:var(--foreground)"> Response(</span></span>
<span class="line"><span style="color:var(--foreground)">      JSON.stringify({</span></span>
<span class="line"><span style="color:var(--foreground)">        tests: testResult.exitCode </span><span style="color:var(--foreground);font-weight:bold">===</span><span style="color:var(--foreground)"> 0 </span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">          ?</span><span style="color:var(--color-orange-800)"> "passed"</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">          :</span><span style="color:var(--color-orange-800)"> "failed"</span><span style="color:var(--foreground)">,</span></span>
<span class="line"><span style="color:var(--foreground)">        output: testResult.stdout,</span></span>
<span class="line"><span style="color:var(--foreground)">      })</span></span>
<span class="line"><span style="color:var(--foreground)">    );</span></span>
<span class="line"><span style="color:var(--foreground)">  },</span></span>
<span class="line"><span style="color:var(--foreground)">};</span></span></code></pre>`;

export const processingExample = `<pre class="shiki custom-theme max-w-full max-h-full overflow-auto" style="background-color:var(--background);color:var(--foreground)" tabindex="0"><code><span class="line"><span style="color:var(--foreground);font-weight:bold">import</span><span style="color:var(--foreground)"> { getSandbox } </span><span style="color:var(--foreground);font-weight:bold">from</span><span style="color:var(--color-orange-800)"> '@cloudflare/sandbox'</span><span style="color:var(--foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">export</span><span style="color:var(--foreground);font-weight:bold"> default</span><span style="color:var(--foreground)"> {</span></span>
<span class="line"><span style="color:var(--foreground)">  async fetch(request</span><span style="color:var(--foreground);font-weight:bold">:</span><span style="color:var(--foreground)"> Request, env</span><span style="color:var(--foreground);font-weight:bold">:</span><span style="color:var(--foreground)"> Env)</span><span style="color:var(--foreground);font-weight:bold"></span><span style="color:var(--foreground)"> {</span></span>
<span class="line"><span style="color:var(--foreground)">    const sandbox </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground)"> getSandbox(env.Sandbox, </span><span style="color:var(--color-orange-800)">'user-123'</span><span style="color:var(--foreground)">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">    // Create a Python execution context</span></span>
<span class="line"><span style="color:var(--foreground)">    <span style="font-weight: bold">const</span> ctx </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground);font-weight:bold"> await</span><span style="color:var(--foreground)"> sandbox.createCodeContext({</span>
<span class="line"><span style="color:var(--foreground)">      language: </span><span style="color:var(--color-orange-800)">'python'</span></span>
<span class="line"><span style="color:var(--foreground)">    });</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">    // Execute Python code with automatic result capture</span></span>
<span class="line"><span style="color:var(--foreground)">    const result </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground);font-weight:bold"> await</span><span style="color:var(--foreground)"> sandbox.runCode(</span></span>
<span class="line"><span style="color:var(--color-orange-800)">\`import pandas as pd</span></span>
<span class="line"><span style="color:var(--color-orange-800)">data = {'product': ['A', 'B', 'C'], 'sales': [100, 200, 150]}</span></span>
<span class="line"><span style="color:var(--color-orange-800)">df = pd.DataFrame(data)</span></span>
<span class="line"><span style="color:var(--color-orange-800)">df['sales'].sum()  # Last expression is automatically returned</span></span>
<span class="line"><span style="color:var(--color-orange-800)">    \`</span><span style="color:var(--foreground)">, { context: ctx });</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">    return</span><span style="color:var(--foreground)"> Response.json({</span></span>
<span class="line"><span style="color:var(--foreground)">      result: result.results?.[0]?.text,</span></span>
<span class="line"><span style="color:var(--foreground)">      logs: result.logs</span></span>
<span class="line"><span style="color:var(--foreground)">    });</span></span>
<span class="line"><span style="color:var(--foreground)">  }</span></span>
<span class="line"><span style="color:var(--foreground)">};</span></span></code></pre>`;

export const filesExample = `<pre class="shiki custom-theme max-w-full max-h-full overflow-auto" style="background-color:var(--background);color:var(--foreground)" tabindex="0"><code><span class="line"><span style="color:var(--foreground);font-weight:bold">import</span><span style="color:var(--foreground)"> { getSandbox } </span><span style="color:var(--foreground);font-weight:bold">from</span><span style="color:var(--color-orange-800)"> '@cloudflare/sandbox'</span><span style="color:var(--foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">export</span><span style="color:var(--foreground);font-weight:bold"> default</span><span style="color:var(--foreground)"> {</span></span>
<span class="line"><span style="color:var(--foreground)">  async fetch(request</span><span style="color:var(--foreground);font-weight:bold">:</span><span style="color:var(--foreground)"> Request, env</span><span style="color:var(--foreground);font-weight:bold">:</span><span style="color:var(--foreground)"> Env)</span><span style="color:var(--foreground);font-weight:bold"></span><span style="color:var(--foreground)"> {</span></span>
<span class="line"><span style="color:var(--foreground)">    const sandbox </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground)"> getSandbox(env.Sandbox, </span><span style="color:var(--color-orange-800)">'user-123'</span><span style="color:var(--foreground)">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">    // Create a project structure</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">    await</span><span style="color:var(--foreground)"> sandbox.mkdir(<span style="color:var(--color-orange-800)">'/workspace/project/src'</span>, {</span>
<span class="line"><span style="color:var(--foreground)">      recursive: </span><span style="color:var(--foreground);font-weight:bold">true</span></span>
<span class="line"><span style="color:var(--foreground)">    });</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">    // Write files</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">    await</span><span style="color:var(--foreground)"> sandbox.writeFile(</span></span>
<span class="line"><span style="color:var(--color-orange-800)">     '/workspace/project/package.json'</span>,</span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">      JSON</span><span style="color:var(--foreground)">.stringify({ name: <span style="color:var(--color-orange-800)">'my-app'</span>, version: <span style="color:var(--color-orange-800)">'1.0.0'</span>,</span> });</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">    // Read a file back</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">    const </span>content = <span style="color:var(--foreground);font-weight:bold">await</span><span style="color:var(--foreground)"> sandbox.readFile(</span>
<span class="line"><span style="color:var(--foreground)">      <span style="color:var(--color-orange-800)">'/workspace/project/src/package.json'</span></span>
<span class="line"><span style="color:var(--foreground)">    );</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">    return</span><span style="color:var(--foreground)"> Response.json({ content });</span></span>
<span class="line"><span style="color:var(--foreground)">  }</span></span>
<span class="line"><span style="color:var(--foreground)">};</span></span></code></pre>`;

// Generated by shiki - inlining it here so we don't need to load
// shiki at runtime
export const exposeExample = `<pre class="shiki custom-theme max-w-full max-h-full overflow-auto" style="background-color:var(--background);color:var(--foreground)" tabindex="0"><code><span class="line"><span style="color:var(--foreground)">const sandbox </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground)"> getSandbox(env.Sandbox, </span><span style="color:var(--color-orange-800)">"preview-app"</span><span style="color:var(--foreground)">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">// Start a Flask web server</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">await</span><span style="color:var(--foreground)"> sandbox.writeFile(</span></span>
<span class="line"><span style="color:var(--color-orange-800)">  "/workspace/server.py"</span><span style="color:var(--foreground)">,</span></span>
<span class="line"><span style="color:var(--color-orange-800)">  \`from flask import Flask</span></span>
<span class="line"><span style="color:var(--color-orange-800)">app = Flask(__name__)</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-orange-800)">@app.route('/')</span></span>
<span class="line"><span style="color:var(--color-orange-800)">def hello():</span></span>
<span class="line"><span style="color:var(--color-orange-800)">    return 'Hello from Cloudflare Sandbox!'</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-orange-800)">app.run(host='0.0.0.0', port=5000)\`</span></span>
<span class="line"><span style="color:var(--foreground)">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">// Install dependencies and start server</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">await</span><span style="color:var(--foreground)"> sandbox.exec(</span><span style="color:var(--color-orange-800)">"pip install flask"</span><span style="color:var(--foreground)">);</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">await</span><span style="color:var(--foreground)"> sandbox.startProcess(</span><span style="color:var(--color-orange-800)">"python server.py"</span><span style="color:var(--foreground)">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">// Expose with public preview URL</span></span>
<span class="line"><span style="color:var(--foreground)">const preview </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground);font-weight:bold"> await</span><span style="color:var(--foreground)"> sandbox.exposePort(5000);</span></span>
<span class="line"><span style="color:var(--foreground)">console.log(</span><span style="color:var(--color-orange-800)">\`Preview URL: \${</span><span style="color:var(--color-orange-800)">preview.url</span><span style="color:var(--color-orange-800)">}\`</span><span style="color:var(--foreground)">);</span></span></code></pre>`;

export const pythonExample = `<pre class="shiki custom-theme" style="background-color:var(--background);color:var(--foreground)" tabindex="0"><code><span class="line"><span style="color:var(--foreground);font-weight:bold">for</span><span style="color:var(--foreground)"> i </span><span style="color:var(--foreground);font-weight:bold">in</span><span style="color:var(--foreground)"> </span><span style="color:var(--foreground);font-weight:bold">range</span><span style="color:var(--foreground)">(5):</span></span>
<span class="line"><span style="color:var(--foreground)">    </span><span style="color:var(--foreground);font-weight:bold">print</span><span style="color:var(--foreground)">(</span><span style="color:var(--color-orange-800)">f"Hello Python! On step {i}"</span><span style="color:var(--foreground)">)</span></span>
<span class="line"><span style="color:var(--foreground)">    </span><span style="color:var(--foreground);font-weight:bold">time</span><span style="color:var(--foreground)">.sleep(1)</span></span></code></pre>`;

export const websocketExample = `<pre class="shiki custom-theme max-w-full overflow-auto" style="background-color:var(--background);color:var(--foreground)" tabindex="0"><code><span class="line"><span style="color:var(--foreground);font-weight:bold">import</span><span style="color:var(--foreground)"> { getSandbox } </span><span style="color:var(--foreground);font-weight:bold">from</span><span style="color:var(--color-orange-800)"> '@cloudflare/sandbox'</span><span style="color:var(--foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--foreground)">let initialized = false;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">export</span><span style="color:var(--foreground);font-weight:bold"> default</span><span style="color:var(--foreground)"> {</span></span>
<span class="line"><span style="color:var(--foreground)">  async fetch(request</span><span style="color:var(--foreground);font-weight:bold">:</span><span style="color:var(--foreground)"> Request, env</span><span style="color:var(--foreground);font-weight:bold">:</span><span style="color:var(--foreground)"> Env)</span><span style="color:var(--foreground);font-weight:bold"></span><span style="color:var(--foreground)"> {</span></span>
<span class="line"><span style="color:var(--foreground)">    const sandbox </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground)"> getSandbox(</span></span>
<span class="line"><span style="color:var(--foreground)">      env.Sandbox, </span><span style="color:var(--color-orange-800)">'websocket-app'</span></span>
<span class="line"><span style="color:var(--foreground)">    );</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--color-neutral-400)">    // Check for WebSocket upgrade</span></span>
<span class="line"><span style="color:var(--foreground)">    const upgrade </span><span style="color:var(--foreground);font-weight:bold">=</span><span style="color:var(--foreground)"> request.headers</span></span>
<span class="line"><span style="color:var(--foreground)">      .get(</span><span style="color:var(--color-orange-800)">'Upgrade'</span><span style="color:var(--foreground)">)?.toLowerCase();</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">    if</span><span style="color:var(--foreground)"> (upgrade </span><span style="color:var(--foreground);font-weight:bold">===</span><span style="color:var(--color-orange-800)"> 'websocket'</span><span style="color:var(--foreground)">) {</span></span>
<span class="line"><span style="color:var(--color-neutral-400)">      // Initialize server on first connection</span></span>
<span class="line"><span style="color:var(--foreground)">      </span><span style="color:var(--foreground);font-weight:bold">if</span><span style="color:var(--foreground)"> (!initialized) {</span></span>
<span class="line"><span style="color:var(--foreground)">        </span><span style="color:var(--foreground);font-weight:bold">await</span><span style="color:var(--foreground)"> sandbox.writeFile(</span></span>
<span class="line"><span style="color:var(--color-orange-800)">          '/workspace/server.js'</span><span style="color:var(--foreground)">,</span></span>
<span class="line"><span style="color:var(--color-orange-800)">          \`Bun.serve({</span></span>
<span class="line"><span style="color:var(--color-orange-800)">            port: 8080,</span></span>
<span class="line"><span style="color:var(--color-orange-800)">            fetch(req, server) {</span></span>
<span class="line"><span style="color:var(--color-orange-800)">              server.upgrade(req);</span></span>
<span class="line"><span style="color:var(--color-orange-800)">            },</span></span>
<span class="line"><span style="color:var(--color-orange-800)">            websocket: {</span></span>
<span class="line"><span style="color:var(--color-orange-800)">              message(ws, msg) {</span></span>
<span class="line"><span style="color:var(--color-orange-800)">                ws.send(\\\`Echo: \\\${msg}\\\`);</span></span>
<span class="line"><span style="color:var(--color-orange-800)">              }</span></span>
<span class="line"><span style="color:var(--color-orange-800)">            }</span></span>
<span class="line"><span style="color:var(--color-orange-800)">          });\`</span></span>
<span class="line"><span style="color:var(--foreground)">        );</span></span>
<span class="line"><span style="color:var(--foreground)">        </span><span style="color:var(--foreground);font-weight:bold">await</span><span style="color:var(--foreground)"> sandbox.startProcess(</span></span>
<span class="line"><span style="color:var(--color-orange-800)">          'bun /workspace/server.js'</span></span>
<span class="line"><span style="color:var(--foreground)">        );</span></span>
<span class="line"><span style="color:var(--foreground)">        initialized = true;</span></span>
<span class="line"><span style="color:var(--foreground)">      }</span></span>
<span class="line"><span style="color:var(--color-neutral-400)">      // Connect to WebSocket server</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">      return</span><span style="color:var(--foreground);font-weight:bold"> await</span><span style="color:var(--foreground)"> sandbox.wsConnect(request, 8080);</span></span>
<span class="line"><span style="color:var(--foreground)">    }</span></span>
<span class="line"><span style="color:var(--foreground);font-weight:bold">    return</span><span style="color:var(--foreground);font-weight:bold"> new</span><span style="color:var(--foreground)"> Response(</span></span>
<span class="line"><span style="color:var(--color-orange-800)">      'Not a WebSocket request'</span></span>
<span class="line"><span style="color:var(--foreground)">    );</span></span>
<span class="line"><span style="color:var(--foreground)">  }</span></span>
<span class="line"><span style="color:var(--foreground)">};</span></span></code></pre>`;
