INNER CODE UNIT · TypeScript
ComputerInteractionStreamerFacade
e2b-dev/surf · lib/streaming/index.ts:13
export abstract class ComputerInteractionStreamerFacade {
abstract instructions: string;
abstract desktop: Sandbox;
abstract resolution: [number, number];
abstract stream(
props: ComputerInteractionStreamerFacadeStreamProps
): AsyncGenerator<SSEEvent>;
// action type is specific to the streamer implementation
abstract executeAction(action: unknown): Promise<ActionResponse | void>;
}
export function createStreamingResponse(
generator: AsyncGenerator<SSEEvent>
): Response {
const stream = new ReadableStream({
async start(controller) {