Skip to content

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Jun 27, 2025

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.

  • replaces dependsOnIndexing key value with indexTypes
  • specifies the dependent indexers in Code, Codebase, and Folder Context providers

Resolves CON-2399

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

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,); inside CodebaseIndexer.ts to check if dependent indexing steps are present


Summary by cubic

Updated context providers to specify which indexers they need, so only the required indexers run based on the config.

  • Refactors
    • Replaced the old dependsOnIndexing flag with a new indexTypes property.
    • Updated Code, Codebase, and Folder context providers to list their needed indexers.
    • Changed indexer logic to build only the index types required by enabled providers.

@uinstinct uinstinct requested a review from a team as a code owner June 27, 2025 12:21
@uinstinct uinstinct requested review from sestinj and removed request for a team June 27, 2025 12:22
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 27, 2025
Copy link

netlify bot commented Jun 27, 2025

👷 Deploy request for continuedev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 2df3f13

@uinstinct uinstinct changed the title run dependent indexer based on context provider feat: run dependent indexer based on context provider Jun 27, 2025
@@ -19,7 +19,7 @@ class FolderContextProvider extends BaseContextProvider {
displayTitle: "Folder",
description: "Type to search",
type: "submenu",
dependsOnIndexing: true,
indexTypes: ["embeddings"],
Copy link
Contributor

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)

@@ -24,7 +24,7 @@ export type ToWebviewFromIdeOrCoreProtocol = {
"indexing/statusUpdate": [IndexingStatus, void]; // Docs, etc.
refreshSubmenuItems: [
{
providers: "all" | "dependsOnIndexing" | ContextProviderName[];
providers: "all" | "indexTypes" | ContextProviderName[];
Copy link
Contributor

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

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants