[VS Code] Spike: Implement command/tool for explaining terminal output
Problem to Solve
Currently, Duo Chat is not available to users in the terminal. We want to pave a path forward for the user to select output in the terminal and ask chat to explain what the output is.
- Here is the explain_code executor.rb
- In gitlab-vscode-extension#1423 (closed) we will need a way for Duo Chat to request explanation of terminal output.
Spike Outcomes
- Identify whether it's feasible to re-use the current
/explain
command in the terminal - Do we need to create a new tool in rails to support the variation?
- Does this work need to start within groupeditor extensions or should it start within another group?
Context
See this thread for some initial analysis by Angelo.
I suggest syncing with some Duo Chat folks about their thoughts on creating a new chat tool. It was relatively simple to add, but there may be gotchas I am missing.
Adding a slash command on the UI is relatively easy, you just add the command here.
If UX/Product doesn't wish to add a new slash command, you may be able to extend the GQL Api so that it takes a new param
terminalOutput
, and updates the main/explain
prompt by adding in that terminal context. I advise against this, though, because making prompts larger with various instructions might not lead to optimal results.