It seems that the agent chat is in markdown, but when you insert/replace, you lose some formatting. If possible, to give user the option to copy the content, and put it on the user's own markdown processor (vscode for e.g.).