throw Error()

in lib/AssistantStream.ts [703:728]


          throw Error(
            "Received thread message event with no existing snapshot",
          );
        }
    }
    throw Error("Tried to accumulate a non-message event");
  }

  #accumulateContent(
    contentElement: MessageContentDelta,
    currentContent: MessageContent | undefined,
  ): TextContentBlock | ImageFileContentBlock {
    return AssistantStream.accumulateDelta(
      currentContent as unknown as Record<any, any>,
      contentElement,
    ) as
      | TextContentBlock
      | ImageFileContentBlock;
  }

  static accumulateDelta(
    acc: Record<string, any>,
    delta: Record<string, any>,
  ): Record<string, any> {
    for (const [key, deltaValue] of Object.entries(delta)) {
      if (!acc.hasOwnProperty(key)) {