Turn ★ into ⭐ (top-right corner) if you like the project!
Visual Studio extension utilizing OpenAI GPT assistants.
- Open Visual Studio
- Tools->Show VS Assistant
- In VS Assistant, go to
Settingstab. - Set your OpenAI
API key. - Set
Python Dllpath. E.g. C:\Users{username}\miniconda3\python39.dll - Save settings
.
To better understand the project, VS assistant can use project's source files. They need to be uploaded manually.
-
In VS Assistant, go to
Resourcestab. -
Resource view mimics your physical file structure on disk (not in solution).
-
You can sync individual files or entire folders by clicking
sync
button to the right of the item. -
Once synced, file name will appear in greem. Synced files will automatically be updated on the server when changes are made.

-
Synced folders automatically add/remove files to the server.
-
While files are syncing it's not recommended to perform other operations in VSAssistant.
-
You can also search by filename by using the textbox.
You can create as many assistants as you need to acompish different kinds of tasks.
- In VS Assistant, go to
Assistantstab. - Create new assistant by clicking the plus icon
. - Configure assistant as needed. For best results, I recommend
gpt-4omodel. It is more expensive thangpt-3.5-turbo-0125, but produces much better results.gpt-3.5-turbo-0125is also known for struggling withfile_searchtool. - Assign a set of required tools to the assistant. E.g. if it needs to be able to read current text selection, add
GetSelectiontool, or if it needs to create new files, addCreateDocumenttool, etc. - You can see all tool information in here.
- Save assistant
.
Note: Adding more tools will increase assistant's capabilities, but may also confuse it when selecting the right tool for the job. Feel free to experiment.
- In VS Assistant, go to
Chattab. - Select the assistant to interact with.
- Type a prompt and press Enter, or click
Submitbutton
. - To add multiple lines to your message, press Shift+Enter.
- Wait for assistant to finish responding (
thinking...message will disappear). - To start new conversation and erase current one, click on
Refrersh
button.
Note: Prompt engineering is important to achieve better results. You can specify specific tools to call, or give hints as to the direction the assistant should take.
You can bring up a minimal chat window directly from the text editor, instead of using full VS Assistant window.
- Make sure assistant has at least
GetSelectiontool. - Select text in editor.
- Click on robot glyph on the left.

- You can move the window by dragging its title, or close it by clicking outside.
- In VS Assistant, go to
Toolstab. - Create new tool by clicking the plus icon
. - Set tool name.
- Save tool
. - You should see tool automatically open in your text editor with template code.
- Implement the
callfunction, and add requiredarguments(if tool does not require arguments, you can safely delete this field). - Use
ToolsLoggerif you need to debug the code, log is located inC:\Users\{username}\AppData\Local\cpGames\VSA\Logs - Save python file.
- In the
Toolstab, clickRefresh
button to reload the toolset. This reloads all tool modules in case you've made changes to them without requiring to restart Visual Studio.
Note: If you would like to call any of built-in VSIX functions, refer to ToolAPI class, specifically functions of return type and parameters like these public static JObject HasSelection(Dictionary<string, dynamic> arguments) (they are at the bottom of the file). Refer to CreateReadme.py for examples.
All output is printed to Output window (View->Output->AssistantGPT).
Additionally python tools output is logged in C:\Users\{username}\AppData\Local\cpGames\VSA\Logs.


