[VSCode] Add `/fix` Quick Fix code action
Problem to solve
As part of the implementation for [VS Code] Add /fix to code actions (gitlab-org/editor-extensions&127 - closed) we need to be able to trigger the new command from the Quick Fix code actions.
These code actions become available when the code has some syntax error or other diagnostic error. This will allow the user to quickly execute the fix command directly from the code that has an error.
Proposed solution
Add a new Action provider class.
Add new Quick Fix code action. Integrate it with the new COMMAND_START_QUICK_CHAT_WITH_CONTEXT command (draft name).
Determine the selection range from the given diagnostics and user selection. Create the largest range that encompasses all diagnostics errors and user selection (if any)
Format a /fix message. Copy the format used by the Jetbrains implementation:
// One error:
"/fix `diagnostic-error-message` on line line_number"
// Multiple errors:
"/fix multiple errors:
`diagnostic-error-message` on line line_number
`diagnostic-error-message` on line line_number
`diagnostic-error-message` on line line_number"