timkmecl / chatgpt-vscode

VSCode extension that allows you to use ChatGPT or GPT4 inside the IDE
331 stars 81 forks source link

Add option to include language id in codeblocks for better context understanding #20

Closed Kir-Antipov closed 1 year ago

Kir-Antipov commented 1 year ago

Description:

This update adds a new configuration option called chatgpt.codeblockWithLanguageId, which, when enabled, includes the language identifier within the codeblock for the selected text, like this:

```javascript
function helloWorld() {
  console.log('Hello world!');
}


By default, this option is set to `true`.

### Reasoning:

Specifying the language identifier within the codeblock can aid ChatGPT in comprehending the context and generating more accurate responses, thereby improving the overall user experience. By providing users with the option to enable or disable this feature, we offer greater flexibility and control over the behavior of the extension.
timkmecl commented 1 year ago

Hi, that's a great idea! Thank you for contributing, the update will be published to the marketplace later today.