MCPcopy Create free account
hub / github.com/agent-tower/core / writeUpgradeError

Function writeUpgradeError

packages/server/src/routes/previews.ts:411–414  ·  view source on GitHub ↗
(socket: Duplex, statusCode: number, message: string)

Source from the content-addressed store, hash-verified

409 Object.setPrototypeOf(PreviewEventSource, NativeEventSource);
410 window.EventSource = PreviewEventSource;
411 }
412})();</script>`;
413
414 const head = /<head(?:\s[^>]*)?>/i;
415 if (head.test(body)) return body.replace(head, (match) => `${match}${script}`);
416 return `${script}${body}`;
417}

Callers 2

proxyWebSocketRequestFunction · 0.85

Calls 2

writeMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected