[VS Code] GitLab Duo: Select terminal output and use /explain on error messages
Problem to solve
I'm using the terminal in VS Code to compile code, and run web applications. Sometimes, an error occurs and I am stuck. The following example says that the VueJS component is registered but not used. How could I ensure that it is being used?
There is no context menu with selecting the terminal output, and right click.
Current path: Copy the error message into Duo Chat and ask.
Duo Chat prompt: Please explain the error "The "TanukiHandbook" component has been registered but not used " and how to solve it.
The explanation is super helpful in Duo Chat.
Proposal
It would be great if I could ask GitLab Duo Chat directly, by selecting the error string in the terminal, and then use the /explain
slash command actions through either
- Right-click > Duo Chat > Explain, or
- Chat prompt with
/explain
(or refined scopes)
Workaround: Copy the error string manually into the chat prompt, and ask specifically about the error message. This is documented in https://docs.gitlab.com/ee/user/gitlab_duo_chat.html#ask-about-errors (I added this section earlier because I frequently run into terminal errors).
Further details
The functionality is not exclusive to VS Code, but access to the terminal scope is exclusive and might need more permissions for the extension (and user opt-in). Therefore starting the proposal for the VS Code extension. We can expand this into other supported IDEs later.