-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Open
Copy link
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestWelcoming contributions as a part of Hacktoberfest'25Welcoming contributions as a part of Hacktoberfest'25help wantedExtra attention is neededExtra attention is needed
Description
Description
Currently, the context from reference repositories is used on a one-time basis during project initialization or code refinement.
To dramatically improve the quality and relevance of code suggestions, this feature proposes implementing a persistent, project-aware context management system using a Retrieval-Augmented Generation (RAG) approach.
This system would store embeddings of reference code in a vector database, allowing the extension to retrieve the most relevant snippets before generating suggestions.
The result: highly contextual, architecture-aware, and accurate AI outputs.
Proposed Solution
1. Ingestion & Storage
- When a user adds a reference repository (own or public), the extension will process its files.
- Code will be parsed, chunked into meaningful segments (functions, classes, etc.), and converted into vector embeddings.
- These embeddings will be stored in a local or session-based vector database tied to the current project.
2. Retrieval-Augmented Generation (RAG)
- When a user triggers an action such as
getCodeRefinements
:- The staged code diff is converted into a query embedding.
- A similarity search is run against the stored embeddings to find the most relevant code chunks.
- These retrieved chunks (the augmented context) are prepended to the final prompt sent to the Gemini API.
Expected Outcome
- Code suggestions and refactorings become highly accurate, contextually aware, and aligned with the project’s conventions.
- The extension “learns” from the provided context, evolving into a smarter and more adaptive coding assistant.
- This upgrade transforms GhostDev from a stateless tool into a stateful, project-aware assistant with persistent contextual understanding.
Note: You are free to suggest any other approach to implement this feature.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestWelcoming contributions as a part of Hacktoberfest'25Welcoming contributions as a part of Hacktoberfest'25help wantedExtra attention is neededExtra attention is needed