diff --git a/binary/build.js b/binary/build.js index 366cf391f..58c190b6b 100644 --- a/binary/build.js +++ b/binary/build.js @@ -51,7 +51,7 @@ async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) { console.log(`Copying ${packageName} to ${toCopy}`); // This is a way to install only one package without npm trying to install all the dependencies // Create a temporary directory for installing the package - const adjustedName = toCopy.replace(/^@/, "").replace("/", "-"); + const adjustedName = packageName.replace(/^@/, "").replace("/", "-"); const tempDir = path.join( __dirname, "tmp", @@ -78,7 +78,6 @@ async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) { ); // Without this it seems the file isn't completely written to disk - // Ideally we validate file integrity in the validation at the end await new Promise((resolve) => setTimeout(resolve, 2000)); // Copy the installed package back to the current directory @@ -169,7 +168,7 @@ async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) { entryPoints: ["src/index.ts"], bundle: true, outfile: esbuildOutputFile, - external: ["esbuild", "./xhr-sync-worker.js", "vscode"], + external: ["esbuild", "./xhr-sync-worker.js", "vscode", "./index.node"], format: "cjs", platform: "node", sourcemap: true, diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 0a9c45d17..cd1db4a3f 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -69,7 +69,7 @@ class Ollama extends BaseLLM { } }) .catch((e) => { - console.warn(`Error calling Ollama /api/show endpoint: ${e}`); + // console.warn(`Error calling Ollama /api/show endpoint: ${e}`); }); } diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index bbc2e5aad..8ddac77d2 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -320,7 +320,7 @@ const exe = os === "win32" ? ".exe" : ""; console.log(`Copying ${packageName} to ${toCopy}`); // This is a way to install only one package without npm trying to install all the dependencies // Create a temporary directory for installing the package - const adjustedName = toCopy.replace(/^@/, "").replace("/", "-"); + const adjustedName = packageName.replace(/^@/, "").replace("/", "-"); const tempDir = `/tmp/continue-node_modules-${adjustedName}`; const currentDir = process.cwd(); diff --git a/scripts/util/index.js b/scripts/util/index.js index 7da6ba44b..317735d97 100644 --- a/scripts/util/index.js +++ b/scripts/util/index.js @@ -15,6 +15,7 @@ function validateFilesPresent(pathsToVerify) { // In many cases just taking a sample file from the folder when they are all roughly the same thing let missingFiles = []; + let emptyFiles = []; for (const path of pathsToVerify) { if (!fs.existsSync(path)) { const parentFolder = path.split("/").slice(0, -1).join("/"); @@ -51,11 +52,16 @@ function validateFilesPresent(pathsToVerify) { missingFiles.push(path); } + + if (fs.existsSync(path) && fs.statSync(path).size === 0) { + console.error(`File ${path} is empty`); + emptyFiles.push(path); + } } - if (missingFiles.length > 0) { + if (missingFiles.length > 0 || emptyFiles.length > 0) { throw new Error( - `The following files were missing:\n- ${missingFiles.join("\n- ")}`, + `The following files were missing:\n- ${missingFiles.join("\n- ")}\n\nThe following files were empty:\n- ${emptyFiles.join("\n- ")}`, ); } else { console.log("All paths exist");