For JetBrains IDEs, there are codelenses that can generate docs and tests.
Functionality varies depending on the IDE you are using.
Note
The interface language of the Visual Studio Code plugin depends on the selected IDE language.
Generating tests
Visual Studio Code
JetBrains IDE
In the codelens or lightbulb next to the code section you want to generate tests for, click SourceCraft Code Assistant: Generate Tests.
Alternatively, you can right-click within the code section for which you want to generate tests and select SourceCraft Code Assistant → Generate Tests.
The generated tests will appear in a new chat.
Above the code section you want to generate tests for, click SourceCraft Code Assistant: Generate Tests.
The generated tests will appear in a new chat.
Generating docs
Visual Studio Code
JetBrains IDE
In the codelens or lightbulb next to the code section you want to generate docs for, click SourceCraft Code Assistant: Generate Docs.
Alternatively, you can right-click within the code section for which you want to generate docs and select SourceCraft Code Assistant → Generate Docs.
The docs will be suggested in the form of a code section comment. To accept or reject the comment, click Accept (Ctrl + Y in Windows/Linux or Command + Y in macOS) or Reject (Ctrl + N in Windows/Linux or Command + N in macOS).
Above the code section you want to generate docs for, click SourceCraft Code Assistant: Generate Docs.
The generated docs will appear in a new chat.
Refactoring code
This feature is only available in Visual Studio Code.
Visual Studio Code
Click SourceCraft Code Assistant in the editor’s left panel.
If you have many plugins, the chat button may be hidden in the menu.
Alternatively, use Ctrl + L in Windows/Linux or Command + L in macOS.
In the message input window, click and select Refactor code.
You can also use the editor: right-click to open the context menu and select SourceCraft Code Assistant → Refactor code.
The refactored code and explanations will appear in the chat.
Sending a code section to a chat
This feature is only available in Visual Studio Code.
Visual Studio Code
Select the code section.
Right-click to open the context menu and select SourceCraft Code Assistant → Add Selection to Chat.
Alternatively, you can use Ctrl + I in Windows/Linux or Command + I in macOS.
Generating a commit message
This feature is only available in Visual Studio Code.