Skip to content

refactor: ♻️ Refactor CodeBaseIndexer out of core #5894

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

Merged

Conversation

chezsmithy
Copy link
Contributor

@chezsmithy chezsmithy commented May 29, 2025

Description

Refector CodeBaseIndexer out of core.ts in a way that it can be independently passed to tools which might need to perform reindexing. Not in #5564 we would now pass core (this.codeBaseIndexer) to the tools implementations rather than the the entire core object.

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

I've manually tested the following in debug:

  1. At startup Indexing starts and suceeds.
  2. Force Reindex works.
  3. Rebuild index works.
  4. Pausing and resuming indexing work.
  5. Files in the test project show up in the index confirmed by using @files to lookup test.js

I've added new tests for CodeBaseIndexer.ts to cover the changes.

@chezsmithy chezsmithy requested a review from a team as a code owner May 29, 2025 05:04
@chezsmithy chezsmithy requested review from sestinj and removed request for a team May 29, 2025 05:04
Copy link

cubic-dev-ai bot commented May 29, 2025

Your cubic subscription is currently inactive. Please reactivate your subscription to receive AI reviews and use cubic.

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label May 29, 2025
Copy link

netlify bot commented May 29, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit 2a719de
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/683f5390fa2e85000813ea88

@chezsmithy
Copy link
Contributor Author

@Patrick-Erichsen related to #5564 I've performed a refactor of CodeBaseIndxer.ts and core.ts to refactor the indexing functions out of core. I'm going to note a few questions in a self review for you.

Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great cleanup, will make the callTools logic we originally discussed less dependent on core and this is just a solid cleanup in general. Nice we we can remove the awkward codebaseIndexerResolve things.

Going to wait to merge until I double check with @sestinj on that one comment but otherwise good to go 🚀

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs May 29, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 29, 2025
@chezsmithy chezsmithy force-pushed the feat-refactor-codebaseIndexer-from-core branch from f5d7f91 to f6d114d Compare May 30, 2025 00:05
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels May 30, 2025
@sestinj
Copy link
Contributor

sestinj commented Jun 1, 2025

All good to go from me except I think we should just completely remove "continue.giveAutocompleteFeedback"

Copy link
Contributor

@sestinj sestinj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all looks great. as we're removing the continueServerClient, let's take out the "continue.giveAutocompleteFeedback" command in VS Code

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. labels Jun 1, 2025
@chezsmithy
Copy link
Contributor Author

Waiting on #5937 to merge to fix CD/CI issues.

@chezsmithy chezsmithy force-pushed the feat-refactor-codebaseIndexer-from-core branch from 905828e to 764d136 Compare June 3, 2025 19:52
@dosubot dosubot bot removed the size:XL This PR changes 500-999 lines, ignoring generated files. label Jun 3, 2025
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 3, 2025
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jun 3, 2025
@chezsmithy
Copy link
Contributor Author

@Patrick-Erichsen and @sestinj looks like we have 🟢 lights. Could you please review at your convienence? 🙇

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 3, 2025
@sestinj sestinj merged commit bfa08bc into continuedev:main Jun 3, 2025
34 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jun 3, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants