A fake AI chat for your Quarto presentations
Hi, I’m CodeBot. I can help you write code.
I have a novel in novel.txt. I’d like to know which words come up most often.
Good idea! Split the text into words, then count them.
Can you show me?
In your Quarto project, run:
This adds the extension to _extensions/slides-chat/. Commit that folder along with your project.
Then turn the plugin on in the presentation’s YAML header:
Set them deck-wide under slides-chat: in the YAML header, or on a single chat as attributes: :::: {.slides-chat assistant="Bot" color="#9ece6a"}
| Option | Default | Effect |
|---|---|---|
user |
(none) | Name shown above the person’s messages |
assistant |
Assistant |
Name of the AI |
logo |
orange asterisk | Blinking avatar of the AI (path or URL) |
color |
#d97757 |
AI colour: name, banner, typing dots |
welcome |
✱ <assistant> |
Welcome banner text, false to hide it |
background |
#1a1b26 |
Background of slides holding a chat, false to keep the theme’s |
A single message can also take its own name: ::: {.user name="Alice"}.
Can you change your look?
Sure. On this chat I use two attributes:
logo="assets/robot.svg" for my avatar;color="#9ece6a" for my name, the banner and the typing dots.My avatar blinks while I think and while I type.
welcome="..."
A custom banner text.
welcome="false"
No banner at all.
Why is this slide purple?
The slide sets its own background-color="#2b1d3a". The extension only adds a dark background when the slide has none.
To change the default for every chat slide, set background: in the YAML header.
And here?
With background="false", the slide keeps the theme’s background. The chat stays a dark card on the page.
No .fragment: I’m visible right away.
.fragment alone: I appear in one piece.
.fragment .typing on a person: dots, then the whole text.
.fragment alone on the AI: I appear in one piece too.
.fragment .typing on the AI: dots, then my answer streams in word by word. Step back and it rewinds.
What can go inside a message?
Any Markdown:
inline code and links;| Language | Typed | First release |
|---|---|---|
| Python | no | 1991 |
| R | no | 1993 |
| Rust | yes | 2015 |
Code blocks and tables fade in whole, while the prose streams in.
The initial inspiration for slides-chat is chat-bubbles by Emil Hvitfeldt, which fakes iMessage, Slack, Discord and Teams conversations in revealjs slides.
slides-chat builds on its foundations (message layout, typing dots, auto-scroll) and specialises them for conversations with an AI.
Warning
This example slidedeck and extension have mostly been AI generated