DuoChat: Show Action Buttons in Completed Code Blocks for Canceled Prompts
Problem
The markdown code blocks that are displayed in DuoChat messages do not render the action buttons (insert code snippet and copy code) unless the entire assistant response is done streaming (and the html from the model is sent). This is problematic when a user has already seen enough of a response to answer their question or fill a code gap and they want to stop the response and move on with their workflow.
There is also the issue of not flooding the markdown block with syntax highlighting until the final message from the LLM is received. This might deserve it's own issue, but I assume the changes would take place in a similar area of the project.
Potential Fix
After talking with @jgdoyon1 in this MR, it appears we might be able to change the current process for rendering markdown code blocks in renderMarkdown.
We can leverage the current marked library in the project which support adding extensions to the parsing process to include our own HTML in the code blocks. Then, we can explore including the marked-highlighting library extension to our marked parsing to add syntax highlighting to the output HTML.
Screenshots
| WebIDE DuoChat | JetBrains | VSCode |
|---|---|---|
|
|
Does not have cancel button in latest release |

