continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
19.25k stars 1.66k forks source link

Refresh Index for Files #2946

Closed RomneyDa closed 1 day ago

RomneyDa commented 2 days ago

Description

Fixes problem that files aren't currently being reindexed on save/delete, just throwing an error, and there wasn't an efficient way to reindex them

I did a PR https://github.com/continuedev/continue/pull/2717 a couple weeks back to handle file saves and deletions Apparently I didn't test it well enough because it keeps throwing errors that it's trying to index a directory

This maxes sense, because the current index/forceReIndex only supports directories

The problem with passing directories (e.g. get directory from file name) is that for a specific file you must pass the directory containing that file, which means the entire directory is walked. E.g. reindexing a file at the root would cause the entire codebase to reindex

Thus, a new index/forceReIndexFiles message and indexing function were created

Functionality can be seen here https://www.loom.com/share/38876683023346239ed3d633857f3ebb

netlify[bot] commented 2 days ago

Deploy Preview for continuedev failed. Why did it fail? →

Name Link
Latest commit 6e5301657a7cdcfce7239f491a0ea9a0fc053ab0
Latest deploy log https://app.netlify.com/sites/continuedev/deploys/6736c33b2decf20008c286d4