Skip to content
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

VSCode: Make embeddings errors visible, resume indexing on restart #2265

Merged
merged 11 commits into from
Dec 13, 2023

Conversation

dominiccooney
Copy link
Contributor

@dominiccooney dominiccooney commented Dec 11, 2023

  • If an incomplete index is loaded, explain the situation in the status bar.
  • User can resume an incomplete index.
  • Displays error messages from local embeddings in the UI.
  • Updates the local embeddings protocol to 0.1.2. The client now learns the "names" (identifying keys) of repositories it is loading and indexing, so events can be related to the repositories they belong to. New methods to query the status of indexes and resume indexing.

https://www.loom.com/share/242be2c7abcd49d19e1709e0529651b1
UX refresh: https://www.loom.com/share/2654feb99c9f4985add94470a362bec7

Test plan

Manual test:

  1. Open a repository which doesn't have any embeddings.
  2. Start generating local embeddings.
  3. In Activity Monitor, kill the cody-engine process, leaving a partial index. Note, there's no handling process death, so the indexing process will appear to simply halt.
  4. Reload the VScode window to work around the dead process.
  5. Confirm there's a status bar entry indicating the index is incomplete.
  6. Start a chat. Queries should use the incomplete index.
  7. Interact with the status bar to resume indexing.
  8. When indexing is done, queries should use the completed index.

To generate an unusual failure mode, edit another git repo's remote to match the partial index and open that folder. Then resume indexing. This should display an error message about the repo not having the specific commit the index was created at. (This resumes an incomplete index, it does not update an index to a new commit.)

Automated test:

pnpm test:e2e -- local-embeddings.test.ts

@dominiccooney dominiccooney force-pushed the dpc/local-embeddings-protocol-updates branch from 13b264b to 2183ccd Compare December 12, 2023 14:15
@dominiccooney dominiccooney changed the title Local embeddings protocol updates VSCode: Make embeddings errors visible, resume indexing on restart Dec 12, 2023
@dominiccooney dominiccooney force-pushed the dpc/local-embeddings-protocol-updates branch from 5ab1159 to d1c2de4 Compare December 13, 2023 00:38
Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

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

Code seems legit & doesn't break setting up new embeddings. I did not manually test the incomplete embeddings scenario.

vscode/package.json Show resolved Hide resolved
@dominiccooney dominiccooney merged commit f7cb9e5 into main Dec 13, 2023
15 checks passed
@dominiccooney dominiccooney deleted the dpc/local-embeddings-protocol-updates branch December 13, 2023 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants