diff --git a/extensions/telegram/src/bot-message-dispatch-reply.ts b/extensions/telegram/src/bot-message-dispatch-reply.ts index 4acea989651e..abd1b7e231a5 100644 --- a/extensions/telegram/src/bot-message-dispatch-reply.ts +++ b/extensions/telegram/src/bot-message-dispatch-reply.ts @@ -329,6 +329,7 @@ export async function deliverReply( const canRepresentAsTransientProgress = !reply.hasMedia && telegramButtons === undefined && + effectivePayload.channelData?.askUser === undefined && !hasExecApprovalPayload(effectivePayload); const isFastModeProgressPayload = isFastModeAutoProgressPayload(effectivePayload); if (turn.streamMode === "progress") { diff --git a/extensions/telegram/src/bot-message-dispatch.progress-rendering.test.ts b/extensions/telegram/src/bot-message-dispatch.progress-rendering.test.ts index 2b67e1f80c23..0f86c2131dd7 100644 --- a/extensions/telegram/src/bot-message-dispatch.progress-rendering.test.ts +++ b/extensions/telegram/src/bot-message-dispatch.progress-rendering.test.ts @@ -479,6 +479,27 @@ describeTelegramDispatch("dispatchTelegramMessage progress-rendering", () => { expect(finalText.length).toBeLessThanOrEqual(80); }); + it("delivers buttonless ask_user prompts outside transient progress", async () => { + const { answerDraftStream } = setupDraftStreams({ answerMessageId: 2001 }); + dispatchReplyWithBufferedBlockDispatcher.mockImplementation(async ({ dispatcherOptions }) => { + await dispatcherOptions.deliver( + { + text: "Pick one or more", + channelData: { + askUser: { questionId: "ask_0123456789abcdef0123456789abcdef" }, + }, + }, + { kind: "tool" }, + ); + return { queuedFinal: true }; + }); + + await dispatchWithContext({ context: createContext(), streamMode: "progress" }); + + expect(answerDraftStream.update).toHaveBeenCalledWith("Pick one or more"); + expect(registerChannelDelivery).toHaveBeenCalledOnce(); + }); + it("streams interactive buttons into the same message", async () => { const { answerDraftStream } = setupDraftStreams({ answerMessageId: 2001 }); dispatchReplyWithBufferedBlockDispatcher.mockImplementation(async ({ dispatcherOptions }) => {