fix: keep telegram tool progress without preview (#71825) (thanks @VACInc)

* fix(telegram): keep default tool progress without preview

* fix: keep telegram tool progress without preview (#71825) (thanks @VACInc)

---------

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
This commit is contained in:
VACInc
2026-04-26 01:41:18 -04:00
committed by GitHub
parent c5c40b22af
commit 78c7292c95
3 changed files with 21 additions and 1 deletions

View File

@@ -765,6 +765,25 @@ describe("dispatchTelegramMessage draft streaming", () => {
);
});
it("keeps default tool progress messages when answer preview streaming is off", async () => {
dispatchReplyWithBufferedBlockDispatcher.mockImplementation(async ({ replyOptions }) => {
await replyOptions?.onToolStart?.({ name: "exec", phase: "start" });
await replyOptions?.onItemEvent?.({ progressText: "exec ls ~/Desktop" });
return { queuedFinal: false };
});
await dispatchWithContext({ context: createContext(), streamMode: "off" });
expect(createTelegramDraftStream).not.toHaveBeenCalled();
expect(dispatchReplyWithBufferedBlockDispatcher).toHaveBeenCalledWith(
expect.objectContaining({
replyOptions: expect.objectContaining({
suppressDefaultToolProgressMessages: false,
}),
}),
);
});
it("keeps Telegram tool progress links inside code formatting", async () => {
const draftStream = createDraftStream();
createTelegramDraftStream.mockReturnValue(draftStream);