-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: run dependent indexer based on context provider #6323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
👷 Deploy request for continuedev pending review.Visit the deploys page to approve it
|
@@ -19,7 +19,7 @@ class FolderContextProvider extends BaseContextProvider { | |||
displayTitle: "Folder", | |||
description: "Type to search", | |||
type: "submenu", | |||
dependsOnIndexing: true, | |||
indexTypes: ["embeddings"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should rely on the same list as @ codebase (embeddings, fullTextSearch, chunk)
core/protocol/webview.ts
Outdated
@@ -24,7 +24,7 @@ export type ToWebviewFromIdeOrCoreProtocol = { | |||
"indexing/statusUpdate": [IndexingStatus, void]; // Docs, etc. | |||
refreshSubmenuItems: [ | |||
{ | |||
providers: "all" | "dependsOnIndexing" | ContextProviderName[]; | |||
providers: "all" | "indexTypes" | ContextProviderName[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we could keep this as "dependsOnIndexing". That seems like a variable name that makes more sense, and I don't think the behavior changed
Description
We do not need to run all the indexes if only a set of selected context providers are enabled in our config. This PR adds the ability to run only dependent indexers determined by
indexTypes
property on the context provider.dependsOnIndexing
key value withindexTypes
Resolves CON-2399
Checklist
Screenshots
[ For visual changes, include screenshots. Screen recordings are particularly helpful, and appreciated! ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Reproduction
I used a debug statement like this
console.log("indexTypesToBuild", [...indexTypesToBuild],"and config",config,);
insideCodebaseIndexer.ts
to check if dependent indexing steps are presentSummary by cubic
Updated context providers to specify which indexers they need, so only the required indexers run based on the config.
dependsOnIndexing
flag with a newindexTypes
property.