Skip to content

Commit cfd4181

Browse files
committed
style: format telegram draft stream files
1 parent a32accf commit cfd4181

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/telegram/bot-message-dispatch.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ export const dispatchTelegramMessage = async ({
123123
// Some providers briefly emit a shorter prefix snapshot (for example
124124
// "Sure." -> "Sure" -> "Sure."). Keep the longer preview to avoid
125125
// visible punctuation flicker.
126-
if (lastPartialText && lastPartialText.startsWith(text) && text.length < lastPartialText.length) {
126+
if (
127+
lastPartialText &&
128+
lastPartialText.startsWith(text) &&
129+
text.length < lastPartialText.length
130+
) {
127131
return;
128132
}
129133
lastPartialText = text;

src/telegram/draft-stream.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ describe("createTelegramDraftStream", () => {
169169
});
170170

171171
stream.update("Hello");
172-
await vi.waitFor(() =>
173-
expect(api.sendMessage).toHaveBeenCalledWith(123, "Hello", undefined),
174-
);
172+
await vi.waitFor(() => expect(api.sendMessage).toHaveBeenCalledWith(123, "Hello", undefined));
175173
});
176174

177175
it("includes reply_to_message_id even when thread resolves to general topic", async () => {

0 commit comments

Comments
 (0)