Comment

Comment by auggierose

I had an interesting ChatGPT experience yesterday where I asked it

> How can I increase the version of a TextDocument in VSCode from an extension?

and got a perfectly plausible answer, very eloquently explaining the following code

    // Get the TextDocument object
    const document = vscode.window.activeTextEditor.document;

    // Update the TextDocument version
    document.update([], {incrementVersion: true});
The problem is, there is no document.update method... But the really amazing thing is that when I told ChatGPT about the nonexistence of the update method, it apologised, and then gave me a more involved, but correct answer.
parent auggierose 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton