continue
continue copied to clipboard
Improve Submenu Context Item Selection
Validations
- [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that requests the same enhancement
Problem
The getSubmenuContextItems function has some limitations when it comes to searching for relevant files or classes:
- It only considers the top 70 files from the fallback results.
- The
useSubmenuContextProvidersuseEffecthook refreshes every two seconds, which may be inefficient. - If not refreshed, it uses the top 70 results from the context provider's slice, which may not be comprehensive.
Solution
To improve the selection mechanism, we could try one of the following approaches:
- Query a list of files or classes using embeddings to find more relevant items.
- Query the model or reranker to rank the top tags or files for a given query, ensuring better results.
Expected Benefits
- More relevant context items for users
- Faster and more efficient item selection
Next Steps
- Evaluate feasibility of using embeddings or a model for ranking
- Determine impact on performance and response time
- Minimize the number of embedding or chat queries this could take.
Let me know what you think!