🚑 esbuild not found hotfix

This commit is contained in:
Nate Sesti 2023-12-14 15:26:34 -08:00
parent b76bb08e8e
commit c310f5fb35
4 changed files with 14 additions and 11 deletions

View file

@ -164,6 +164,7 @@ declare global {
contextLength?: number;
completionOptions?: CompletionOptions;
requestOptions?: RequestOptions;
template?: TemplateType;
promptTemplates?: Record<string, string>;
templateMessages?: (messages: ChatMessage[]) => string;
writeLog?: (str: string) => Promise<void>;
@ -459,7 +460,6 @@ declare global {
disableIndexing?: boolean;
userToken?: string;
}
}
export {};

1
core/index.d.ts vendored
View file

@ -162,6 +162,7 @@ export interface LLMOptions {
contextLength?: number;
completionOptions?: CompletionOptions;
requestOptions?: RequestOptions;
template?: TemplateType;
promptTemplates?: Record<string, string>;
templateMessages?: (messages: ChatMessage[]) => string;
writeLog?: (str: string) => Promise<void>;

View file

@ -144,6 +144,7 @@ export abstract class BaseLLM implements ILLM {
contextLength: number;
completionOptions: CompletionOptions;
requestOptions?: RequestOptions;
template?: TemplateType;
promptTemplates?: Record<string, string>;
templateMessages?: (messages: ChatMessage[]) => string;
writeLog?: (str: string) => Promise<void>;
@ -165,7 +166,8 @@ export abstract class BaseLLM implements ILLM {
...options,
};
const templateType = autodetectTemplateType(options.model);
const templateType =
options.template || autodetectTemplateType(options.model);
this.title = options.title;
this.uniqueId = options.uniqueId || "None";

View file

@ -12,7 +12,7 @@ import * as vscode from "vscode";
import { ideProtocolClient } from "./activation/activate";
import { IDE, SerializedContinueConfig } from "core";
import esbuild from "esbuild";
// import esbuild from "esbuild";
class VsCodeIde implements IDE {
async getSerializedConfig(): Promise<SerializedContinueConfig> {
@ -61,14 +61,14 @@ class VsCodeIde implements IDE {
}
try {
const result = await esbuild.build({
entryPoints: [getConfigTsPath()],
bundle: true,
platform: "browser",
format: "esm",
outfile: getConfigJsPath(),
external: ["fetch"],
});
// const result = await esbuild.build({
// entryPoints: [getConfigTsPath()],
// bundle: true,
// platform: "browser",
// format: "esm",
// outfile: getConfigJsPath(),
// external: ["fetch"],
// });
} catch (e) {
console.log(e);
vscode.window.showErrorMessage(