amazonq: Translate a piece of code into another code language
Problem
We have the ability to highlight a piece of code and send it to the prompt, but we don't have any functionality that allow quick translate that piece of code into another language.
For example, I have a selected code in JS and I ask to create the same idea in a PY or Java code. I think this would give users a lot of flexibility and use.
PS: If I ask in the prompt, it already does that, but its verbose, and I think a quick action would make a lot of sense.
Expected behavior
Have a quick action to send selected code into context that user can select which language wants translate to.
Choose Send to prompt, then type translate to python in the prompt and hit enter.
Do you have ideas on how this can be improved?
Choose
Send to prompt, then typetranslate to pythonin the prompt and hit enter.Do you have ideas on how this can be improved?
Maybe we add the selected code in the answer and a dropdown to select which language we want to translate to?
By the way, this would be really useful if Q give me the code answer in a language that I'll not be using or don't have in the project.
Majority of the code here is in js|ts|tsx (just few in py) and the answer its given in py. I would like to be able to quickly transform to JS for example. This requires I alter my original question and ask to translate to another. Sounds OK, but if its an easy win instead of making users ask again would be cool.
@justinmk3
We consider this out of scope. Using chat commands is the recommended way to achieve this.