DEV Community

Cover image for VS Code Extension that Generates Documentation Using AI

VS Code Extension that Generates Documentation Using AI

Hahnbee Lee on January 23, 2022

There's this fairly new extension on the VS Code marketplace called AI Doc Writer for JavaScript, TypeScript, and Python. Here's what the README sa...
Collapse
 
cloudkungfu profile image
Javel Rowe

Seems to do a pretty good job and it kinda encourages us to give variables/params proper names too 😅

Collapse
 
andrewbaisden profile image
Andrew Baisden

I noticed that too.

Collapse
 
xapuu profile image
Xapuu

What sorcery is this :D , i guess i will be commenting my code from now on :D

/**
 * *When the user clicks on an image, set the focusedImageUrl to the image's url.*
 * @param imgUrl - The URL of the image to be displayed.
 * @returns None
 */
  focusImage(imgUrl) {
    this.focusedImageUrl = imgUrl;
  }
Enter fullscreen mode Exit fullscreen mode
Collapse
 
0wx profile image
Gilang Ramadhan 🈯️

Very nice, the summary is really well done, but the thing I really wish exist in the extension is ability to generate @example, I often use Github Copilot to generate the doc for me and they also gave me nice @example, but it's not the best experience generating doc with copilot, hopefully this extension can keep up the good work!

Collapse
 
pengeszikra profile image
Peter Vivo

Half success, don't recognise the arrow function return value

/**
 * Given two intervals, return the union of the two intervals.
 * @returns None
 */
export const union = ([Vm, VM], [Bm, BM]) => [ Math.max(Vm, Bm), Math.min(VM, BM)];

/**
 * Given a viewport and a bounding box, return the part of the bounding box that is visible in the
 * viewport.
 * @param view - the viewport, a 2-element array of the form [x, y]
 * @param box - the box to clip against
 * @param [] - `view` is the viewport, which is a box with two numbers.
 * @returns None
 */
export const clip = ( view, box, [a, b] = union(view, box)) => b > a ? [a, b] : false;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
mridulnetizen profile image
Euxodous

Really nice extension, gonna definitely use it from now. Only afraid of the functionality that the comments surpasses maximum length of line and I would have to edit it each time :) . Would be even great if it detects some linting feature already enabled in the codebase. Anyways, thanks a lot for bringing this up!!

Collapse
 
dheeraj-lee27 profile image
Dheeraj Malhotra

Actually, VSCode can also be combined with a one-click configuration tool like Servbay to easily install Ollama and CodeGPT in VSCode. I've introduced related content in my main article, and I hope it can be helpful for beginners!

Collapse
 
highcenburg profile image
Vicente G. Reyes

Woah!

Collapse
 
blankscreenexe profile image
Muhammad Hammad Hassan

I neeeeed dis

Collapse
 
skeetmtp profile image
Alban

Now I would love a similar plugin to solve one of the 2 hard things in compute science (martinfowler.com/bliki/TwoHardThin...) : Finding a name !
Select code -> AI suggest a proper name

Collapse
 
snam_jan_b77ca2b6b7b89890 profile image
snam jan

required sign in to use it but sign in also not working.