Show a Character's Inner Thoughts in AI Chats
Add a collapsible 'inner thoughts' panel to character replies with an HTML details block on HTML-capable chat platforms, or with spoiler text in a Telegram bot.
Verification
- Test environment
- Unknown
- Tested on
- Unknown
- Last updated
- 2026-11-22
A character card can ask the model to write the character's inner thoughts next to the dialogue, hidden until the reader taps to reveal them. It makes roleplay more fun. Keep in mind that this is storytelling: it is not the model's private reasoning, and it doesn't mean the character has real feelings.
Below are two versions: one for chat platforms that render HTML, and one for Telegram bots (AstrBot or similar).
HTML version: a collapsible panel
On platforms that render HTML in replies, the standard details element gives you a panel that opens on click. Add this template to your system prompt or character card:
<details style="background-color: #fff0f5; border: 2px dashed #ffb6c1; border-radius: 10px; padding: 12px 15px; margin-top: 20px; box-shadow: 0 2px 8px rgba(255, 182, 193, 0.2);">
<summary style="cursor: pointer; font-weight: bold; color: #db7093; outline: none; user-select: none; font-size: 15px;">A glimpse of her thoughts…</summary>
<p style="margin-top: 12px; margin-bottom: 0; font-size: 13px; line-height: 1.6; color: #8a6b76; border-top: 1px solid #ffd1dc; padding-top: 10px;">
(Write the character's thoughts here: comfort, fear, gratitude, numbness or despair.)
</p>
</details>
Change the px sizes and color values to restyle the panel and its text.
If you're not sure how to phrase the instruction, here is an example of a dialogue rule:
(Your character's identity and background...)
Dialogue rules:
Describe the scene as well as the spoken lines. Unless the user says otherwise, write at least 500 words per reply.
Line 1: current story route
Line 2: the message
At the bottom of every reply, fill in this panel with the character's thoughts, consistent with the current route:
<details style="background-color: #fff0f5; border: 2px dashed #ffb6c1; border-radius: 10px; padding: 12px 15px; margin-top: 20px; box-shadow: 0 2px 8px rgba(255, 182, 193, 0.2);">
<summary style="cursor: pointer; font-weight: bold; color: #db7093; outline: none; user-select: none; font-size: 15px;">A glimpse of her thoughts…</summary>
<p style="margin-top: 12px; margin-bottom: 0; font-size: 13px; line-height: 1.6; color: #8a6b76; border-top: 1px solid #ffd1dc; padding-top: 10px;">
(Write the character's thoughts here: comfort, fear, gratitude, numbness or despair.)
</p>
</details>
Some platforms strip HTML or inline styles; preview a reply before sharing the card.
Telegram version: spoiler text
Telegram messages don't render HTML panels, but they do support spoiler text that stays hidden until tapped, which works well for inner thoughts. It is also shorter than HTML, so it costs fewer tokens. Add this to the character prompt:
*A glimpse of her thoughts…*
||(Write the character's thoughts here: love, fear, gratitude, numbness or despair.)||
In Telegram's MarkdownV2, ||text|| is a spoiler and *text* is bold. The original post used **bold**, which only works if your bot converts standard Markdown before sending. In every case, the bot must send the message with a parse mode that supports spoilers (or the equivalent HTML tg-spoiler tag); vertical bars in plain text won't hide anything. See Telegram's formatting options.
Finally, tell the model whether the thoughts go before or after the dialogue so it doesn't have to guess. For writing the rest of the card, see How to write AI character cards.
Adapted from the XMLans blog: AI Character Cards: Display Fictional Inner Thoughts (Chinese original: AI写卡指南:让AI有心理活动).
Sources
- AI写卡指南:让AI有心理活动(星梦博客)www
.xmlans .com (opens in a new tab) · checked 2026-11-22 - AI Character Cards: Display Fictional Inner Thoughts (XMLans blog)en
.xmlans .com (opens in a new tab) · checked 2026-11-22 - Telegram Bot API: formatting optionscore
.telegram .org (opens in a new tab) · checked 2026-11-22 - MDN: the details elementdeveloper
.mozilla .org (opens in a new tab) · checked 2026-11-22