mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
style: format telegram draft stream files
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user