iframe-based deferred rendering with tokenized isolation layer

This commit is contained in:
laura 2025-11-08 18:34:17 -03:00
parent 1c361de610
commit 3ec65b9a0f
Signed by: w
GPG key ID: BCD2117C99E69817
8 changed files with 308 additions and 90 deletions

View file

@ -12,7 +12,6 @@ export interface StreamOptions {
export function chunked() {
const chunks = new ChunkedStream<string>();
const encoder = new TextEncoder();
return {
chunks,
stream: new ReadableStream<Uint8Array>({
@ -53,8 +52,8 @@ export async function createDataStream(
return {
blob: stream,
chunks,
close: chunks.close,
error: chunks.error,
close: () => chunks.close(),
error: (e) => chunks.error(e),
response: new Response(stream, {
headers: {
"Content-Type": options.contentType,