Merge branch 'preview' of https://github.com/continuedev/continue into preview

This commit is contained in:
Nate Sesti 2024-04-15 20:20:10 -07:00
commit ee51cd7e60
3 changed files with 27 additions and 20 deletions

View file

@ -66,24 +66,26 @@ export async function retrieveContextItemsFromEmbeddings(
// Source: expansion with code graph
// consider doing this after reranking? Or just having a lower reranking threshold
// This is VS Code only until we use PSI for JetBrains or build our own general solution
if ((await extras.ide.getIdeInfo()).ideType === "vscode") {
const { expandSnippet } = await import(
"../../../extensions/vscode/src/util/expandSnippet"
);
let expansionResults = (
await Promise.all(
extras.selectedCode.map(async (rif) => {
return expandSnippet(
rif.filepath,
rif.range.start.line,
rif.range.end.line,
extras.ide,
);
}),
)
).flat() as Chunk[];
retrievalResults.push(...expansionResults);
}
// TODO: Need to pass in the expandSnippet function as a function argument
// because this import causes `tsc` to fail
// if ((await extras.ide.getIdeInfo()).ideType === "vscode") {
// const { expandSnippet } = await import(
// "../../../extensions/vscode/src/util/expandSnippet"
// );
// let expansionResults = (
// await Promise.all(
// extras.selectedCode.map(async (rif) => {
// return expandSnippet(
// rif.filepath,
// rif.range.start.line,
// rif.range.end.line,
// extras.ide,
// );
// }),
// )
// ).flat() as Chunk[];
// retrievalResults.push(...expansionResults);
// }
// Source: Open file exact match
// Source: Class/function name exact match

View file

@ -25,6 +25,7 @@ const DEFAULT_IGNORE_FILETYPES = [
"*.dll",
"*.obj",
"*.o",
"*.o.d",
"*.a",
"*.lib",
"*.so",
@ -54,6 +55,9 @@ const DEFAULT_IGNORE_FILETYPES = [
"*.sqlite",
"*.wasm",
"*.plist",
"*.profraw",
"*.gcda",
"*.gcno",
];
export const defaultIgnoreFile = ignore().add(DEFAULT_IGNORE_FILETYPES);
export const DEFAULT_IGNORE_DIRS = [
@ -76,5 +80,6 @@ export const DEFAULT_IGNORE_DIRS = [
".continue",
"__pycache__",
"site-packages",
".cache",
];
export const defaultIgnoreDir = ignore().add(DEFAULT_IGNORE_DIRS);

View file

@ -9,8 +9,8 @@ if (!fs.existsSync("build")) {
}
const command = isPreRelease
? "vsce package --out ./build patch --pre-release" // --yarn"
: "vsce package --out ./build patch"; // --yarn";
? "npx vsce package --out ./build patch --pre-release" // --yarn"
: "npx vsce package --out ./build patch"; // --yarn";
exec(command, (error) => {
if (error) throw error;