rubberduck-ai / rubberduck-vscode

Use AI-powered code edits, explanations, code generation, error diagnosis, and chat in Visual Studio Code with the official OpenAI API.
https://marketplace.visualstudio.com/items?itemName=Rubberduck.rubberduck-vscode
MIT License
583 stars 72 forks source link

Allow for workspace-specific prompt customisation #10

Closed DucoG closed 1 year ago

DucoG commented 1 year ago

Is this request related to a problem? Please describe.

Rubberduck is unable to provide quality answers to high-level coding questions and sometimes provides irrelevant answers. This happens as not a lot of project information, such as used frameworks and goals of the project, is known to the AI.

Describe the solution you'd like

Allow for workspace-specific prompt customisation. Allow users to define a variable in their workspace which points to a (text)file. Rubberduck then allows you to customize your prompt with the content of this file as a variable.

Additional context

A simple use-case would be to just use this as a simple README for the AI such as: The goal of this project is to XYZ. The project uses frameworks ABC. You could also use it to provide a directory-tree overview or a very short (GPT3 generated) summary for the important files in the workspace.

lgrammel commented 1 year ago

As a first step, I've created an indexer: https://github.com/rubberduck-ai/repository-index

lgrammel commented 1 year ago

There is now an experimental workspace index command that creates an index file. It can be used in custom templates using the retrieval augmentation feature.

lgrammel commented 1 year ago

@all-contributors add @DucoG for ideas

allcontributors[bot] commented 1 year ago

@lgrammel

I've put up a pull request to add @DucoG! :tada: