Skip to content

Commit

Permalink
Merge pull request #3714 from continuedev/pe/disable-lance-db-check
Browse files Browse the repository at this point in the history
fix: disable lancedb cpu check
  • Loading branch information
Patrick-Erichsen authored Jan 14, 2025
2 parents f92e692 + b496777 commit a6641ce
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions binary/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions core/config/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
} from "../commands/index.js";
import { AllRerankers } from "../context/allRerankers";
import { MCPManagerSingleton } from "../context/mcp";
import CodebaseContextProvider from "../context/providers/CodebaseContextProvider";
import ContinueProxyContextProvider from "../context/providers/ContinueProxyContextProvider";
import CustomContextProviderClass from "../context/providers/CustomContextProvider";
import FileContextProvider from "../context/providers/FileContextProvider";
Expand Down Expand Up @@ -70,7 +69,7 @@ import {
defaultSlashCommandsVscode,
} from "./default";
import { getSystemPromptDotFile } from "./getSystemPromptDotFile";
import { isSupportedLanceDbCpuTarget } from "./util";
// import { isSupportedLanceDbCpuTarget } from "./util";
import { ConfigValidationError, validateConfig } from "./validation.js";

export interface ConfigResult<T> {
Expand Down Expand Up @@ -176,9 +175,10 @@ function loadSerializedConfig(
? [...defaultSlashCommandsVscode]
: [...defaultSlashCommandsJetBrains];

if (!isSupportedLanceDbCpuTarget(ide)) {
config.disableIndexing = true;
}
// Temporarily disabling this check until we can verify the commands are accuarate
// if (!isSupportedLanceDbCpuTarget(ide)) {
// config.disableIndexing = true;
// }

return { config, errors, configLoadInterrupted: false };
}
Expand Down Expand Up @@ -235,6 +235,13 @@ function isContextProviderWithParams(
return (contextProvider as ContextProviderWithParams).name !== undefined;
}

const getCodebaseProvider = async (params: any) => {
const { default: CodebaseContextProvider } = await import(
"../context/providers/CodebaseContextProvider"
);
return new CodebaseContextProvider(params);
};

/** Only difference between intermediate and final configs is the `models` array */
async function intermediateToFinalConfig(
config: Config,
Expand Down Expand Up @@ -394,9 +401,14 @@ async function intermediateToFinalConfig(
| ContextProviderWithParams
| undefined
)?.params || {};

const DEFAULT_CONTEXT_PROVIDERS = [
new FileContextProvider({}),
new CodebaseContextProvider(codebaseContextParams),
// Add codebase provider if indexing is enabled
...(!config.disableIndexing
? [await getCodebaseProvider(codebaseContextParams)]
: []),
// Add prompt files provider if enabled
...(loadPromptFiles ? [new PromptFilesContextProvider({})] : []),
];

Expand Down
4 changes: 2 additions & 2 deletions extensions/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a6641ce

Please sign in to comment.