style: format telegram draft stream files

This commit is contained in:
Ayaan Zaidi
2026-02-16 18:03:37 +05:30
parent a32accf5a3
commit cfd4181a23
2 changed files with 6 additions and 4 deletions

View File

@@ -123,7 +123,11 @@ export const dispatchTelegramMessage = async ({
// Some providers briefly emit a shorter prefix snapshot (for example
// "Sure." -> "Sure" -> "Sure."). Keep the longer preview to avoid
// visible punctuation flicker.
if (lastPartialText && lastPartialText.startsWith(text) && text.length < lastPartialText.length) {
if (
lastPartialText &&
lastPartialText.startsWith(text) &&
text.length < lastPartialText.length
) {
return;
}
lastPartialText = text;

View File

@@ -169,9 +169,7 @@ describe("createTelegramDraftStream", () => {
});
stream.update("Hello");
await vi.waitFor(() =>
expect(api.sendMessage).toHaveBeenCalledWith(123, "Hello", undefined),
);
await vi.waitFor(() => expect(api.sendMessage).toHaveBeenCalledWith(123, "Hello", undefined));
});
it("includes reply_to_message_id even when thread resolves to general topic", async () => {