Problem Autocorrect

AI Assistant has the ability to autocorrect and explain compilation problems.

In order to trigger problem autocorrection you may:

    • Eclipse: Place the editor cursor on the problem’s line and press Ctrl+1, or right-click and select Source ‣ Quick Fix from the context menu.

    • VS Code: Place the cursor inside the problem highlight range (squiggle underline) and select the Quick Fix… command, click on the light-bulb or trigger the context menu of an entry from the Problems View.

  1. Select the Fix … using DVT AI Assistant proposal from the dropdown list

../../_images/fix-and-explain-with-ai-assistant.png

Note

  • To customize the Problem Autocorrect prompt, run the DVT AI: Create New Problem Autocorrect Blueprint command and modify the generated blueprint. The newly added blueprints will be accesible from within the proposals list alongside the builtin one.

  • To customize the Explain Problem prompt, run the DVT AI: Edit Predefined Blueprint command and select the Explain problem (chat) option.

Note

To generate performant fixes, the LLM requests may include:

  • Contents of the current file

  • Type dependencies from other files

  • Recently opened files