Skip to content

Commit bad8749

Browse files
committed
fix(gateway/telegram): suppress streaming placeholder, use thinking draft instead
1 parent ce134f5 commit bad8749

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

gateway/src/adapters/telegram.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,16 @@ pub async fn handle_reply(
474474
}
475475

476476
// Normal send_message
477+
// Suppress streaming placeholder "…" — the thinking draft handles this
478+
if rich_messages && (reply.content.text.trim() == "…" || reply.content.text.trim() == "...") {
479+
let draft_id: i64 = reply.channel.id.parse::<i64>().unwrap_or(1).abs() % 1_000_000 + 1;
480+
let _ = send_rich_message_draft(
481+
client, bot_token, &reply.channel.id, &reply.channel.thread_id, draft_id,
482+
"<tg-thinking>Thinking...</tg-thinking>",
483+
).await;
484+
return;
485+
}
486+
477487
info!(
478488
chat_id = %reply.channel.id,
479489
thread_id = ?reply.channel.thread_id,

0 commit comments

Comments
 (0)