Skip to content

This will be a visual studio code extention that allows you to comment your code thanks to the OpenAI GPT-3.

Notifications You must be signed in to change notification settings

LinusSharp/CommentGenius

Repository files navigation

CommentGenius

This will be a visual studio code extension that allows you to comment your code thanks to the OpenAI GPT-3.

How do i go about doing a project like this?

To create a piece of software that generates comments for code I will be using and integrating the GPT model's API along with the Visual Studio Code's Extension API. I will be using JavaScript for the Code Extension API. Once I have connected the two API's, I will need to provide the GPT-3 API with the code as input, and the model will generate a relevant comment for the code.

The Plan

  1. Decide on the programming language I will use for your extension.

  2. Set up my development environment. Install any libraries or packages necessary for making API calls to ChatGPT, such as the OpenAI API client library.

  3. Understand the Extension API, how to read, write, give error messages, define a keybinding for the commands, etc, ...

  4. Define a command that will call the ChatGPT API to generate comments for code. Create a function that takes the user's code as input, makes a call to the ChatGPT API, and returns the generated comment. Use the OpenAI API client library.

  5. Test the extension.

  6. Publish the extension.

VS Code extension ReadMe

This is the README for your extension "commentgenius". After writing up a brief description, we recommend including the following sections.

Features

Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.

For example if there is an image subfolder under your extension project workspace:

![feature X](images/feature-x.png)

Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.

Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

Extension Settings

Include if your extension adds any VS Code settings through the contributes.configuration extension point.

For example:

This extension contributes the following settings:

  • myExtension.enable: Enable/disable this extension.
  • myExtension.thing: Set to blah to do something.

Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

Release Notes

Users appreciate release notes as you update your extension.

1.0.0

Initial release of ...

1.0.1

Fixed issue #.

1.1.0

Added features X, Y, and Z.


Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux)
  • Toggle preview (Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux)
  • Press Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets

For more information

Enjoy!

About

This will be a visual studio code extention that allows you to comment your code thanks to the OpenAI GPT-3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published