Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

383 B
Raw Blame
import type * as Stream from "effect/Stream";

export const getRawStream = (
  stream: Stream.Stream<any, any, any>,
): ReadableStream | undefined =>
  streamHasRaw(stream) ? stream.raw : undefined;

export const streamHasRaw = (
  stream: Stream.Stream<any, any, any>,
): stream is Stream.Stream<any, any, any> & {
  raw: ReadableStream;
} => "raw" in stream && stream.raw != null;