From 0e8352cdae6c410b98b310a64c448792de136258 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 16 Dec 2023 08:35:34 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20correctly=20check=20for=20window?= =?UTF-8?q?=20being=20defined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/llm/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/llm/index.ts b/core/llm/index.ts index f7545ba95..7e336ef07 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -489,6 +489,9 @@ export abstract class BaseLLM implements ILLM { } private _shouldRequestDirectly() { + if (typeof window === "undefined") { + return true; + } return (window as any)?.ide !== "vscode"; }