Initially, this PR started by allowing content_type on <shiny-user-chat> to customize the content type of the user message (previously hard-coded to `"semi-markdown").
I still think that's a reasonable thing to do, but I think we could simplify and have a single "markdown" mode. That said, I've kept markdown and semi-markdown for now, but I've refactored them a bit. semi-markdown now lets more HTML through while escaping any unknown tags to retain them in the markup.
We can consolidate into markdown, html and text message modes by reverting b90c2114de2d15ce6922030317d93e2b40663d04.
Note that if we made markdown and semi-markdown the same thing, the echoed output from this assistant would match the user message presentation.
You’re a financial analyst at **AcmeCorp**. Generate a Q2 financial report for our investors.
This is an 'unusual' character: "&".
Use this data for your report:<data>{{SPREADSHEET_DATA}}</data>
<instructions>
1. Include sections: Revenue Growth, Profit Margins, Cash Flow.
2. Highlight strengths and areas for improvement.
</instructions>
Make your tone concise and professional. Follow this structure:
<formatting_example>{{Q1_REPORT}}</formatting_example>
Initially, this PR started by allowing
content_type
on<shiny-user-chat>
to customize the content type of the user message (previously hard-coded to `"semi-markdown").I still think that's a reasonable thing to do, but I think we could simplify and have a single "markdown" mode. That said, I've kept
markdown
andsemi-markdown
for now, but I've refactored them a bit.semi-markdown
now lets more HTML through while escaping any unknown tags to retain them in the markup.We can consolidate into
markdown
,html
andtext
message modes by reverting b90c2114de2d15ce6922030317d93e2b40663d04.Example prompts
Note that if we made
markdown
andsemi-markdown
the same thing, the echoed output from this assistant would match the user message presentation.