Collapse blockquote and strip <think> blocks from AI responses
- blockquote expandable: replies are collapsed by default in Telegram - strip <think>...</think> sections (chain-of-thought from reasoning models like DeepSeek R1 / QwQ) before sending the response Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,7 @@ async def _reply_long(ctx: "CommandContext", text: str) -> None:
|
||||
if not chunks:
|
||||
await ctx.reply("")
|
||||
return
|
||||
html_chunks = [f"<blockquote>{_md_to_tg(c)}</blockquote>" for c in chunks]
|
||||
html_chunks = [f"<blockquote expandable>{_md_to_tg(c)}</blockquote>" for c in chunks]
|
||||
first = await ctx.reply(html_chunks[0], parse_mode=enums.ParseMode.HTML)
|
||||
for chunk in html_chunks[1:]:
|
||||
await ctx.client.send_message(
|
||||
|
||||
Reference in New Issue
Block a user