惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
A
About on SuperTechFans
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
D
DataBreaches.Net
B
Blog
博客园 - 【当耐特】
爱范儿
爱范儿
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
WordPress大学
WordPress大学
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
Microsoft Azure Blog
Microsoft Azure Blog
雷峰网
雷峰网
量子位
G
Google Developers Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test(telegram): cover message-only previews · openclaw/op...
obviyus · 2026-04-30 · via Recent Commits to openclaw:main

@@ -747,31 +747,6 @@ describe("dispatchTelegramMessage draft streaming", () => {

747747

);

748748

});

749749750-

it("does not materialize native draft tool progress before final-only text", async () => {

751-

const draftStream = createTestDraftStream({ previewMode: "draft" });

752-

draftStream.materialize.mockResolvedValue(321);

753-

createTelegramDraftStream.mockReturnValue(draftStream);

754-

dispatchReplyWithBufferedBlockDispatcher.mockImplementation(

755-

async ({ dispatcherOptions, replyOptions }) => {

756-

await replyOptions?.onToolStart?.({ name: "exec", phase: "start" });

757-

await dispatcherOptions.deliver({ text: "Done" }, { kind: "final" });

758-

return { queuedFinal: true };

759-

},

760-

);

761-762-

await dispatchWithContext({ context: createContext(), streamMode: "partial" });

763-764-

expect(draftStream.update).toHaveBeenCalledWith("Working…\n• `tool: exec`");

765-

expect(draftStream.update).not.toHaveBeenCalledWith("Done");

766-

expect(draftStream.materialize).not.toHaveBeenCalled();

767-

expect(deliverReplies).toHaveBeenCalledWith(

768-

expect.objectContaining({

769-

replies: [expect.objectContaining({ text: "Done" })],

770-

}),

771-

);

772-

expect(draftStream.clear).toHaveBeenCalledTimes(1);

773-

});

774-775750

it("suppresses Telegram tool progress when explicitly disabled", async () => {

776751

const draftStream = createDraftStream();

777752

createTelegramDraftStream.mockReturnValue(draftStream);

@@ -2463,13 +2438,11 @@ describe("dispatchTelegramMessage draft streaming", () => {

24632438

expect(createTelegramDraftStream.mock.calls[0]?.[0]).toEqual(

24642439

expect.objectContaining({

24652440

thread: { id: 777, scope: "dm" },

2466-

previewTransport: "message",

24672441

}),

24682442

);

24692443

expect(createTelegramDraftStream.mock.calls[1]?.[0]).toEqual(

24702444

expect.objectContaining({

24712445

thread: { id: 777, scope: "dm" },

2472-

previewTransport: "message",

24732446

}),

24742447

);

24752448

});

@@ -2494,7 +2467,6 @@ describe("dispatchTelegramMessage draft streaming", () => {

24942467

expect(createTelegramDraftStream.mock.calls[0]?.[0]).toEqual(

24952468

expect.objectContaining({

24962469

thread: { id: 777, scope: "dm" },

2497-

previewTransport: "message",

24982470

}),

24992471

);

25002472

expect(answerDraftStream.materialize).not.toHaveBeenCalled();

@@ -2638,14 +2610,13 @@ describe("dispatchTelegramMessage draft streaming", () => {

26382610

);

26392611

});

264026122641-

it("keeps DM draft reasoning block updates in preview flow without sending duplicates", async () => {

2613+

it("keeps DM reasoning block updates in preview flow without sending duplicates", async () => {

26422614

const answerDraftStream = createDraftStream(999);

26432615

let previewRevision = 0;

26442616

const reasoningDraftStream = {

26452617

update: vi.fn(),

26462618

flush: vi.fn().mockResolvedValue(true),

2647-

messageId: vi.fn().mockReturnValue(undefined),

2648-

previewMode: vi.fn().mockReturnValue("draft"),

2619+

messageId: vi.fn().mockReturnValue(111),

26492620

previewRevision: vi.fn().mockImplementation(() => previewRevision),

26502621

clear: vi.fn().mockResolvedValue(undefined),

26512622

stop: vi.fn().mockResolvedValue(undefined),

@@ -2680,25 +2651,30 @@ describe("dispatchTelegramMessage draft streaming", () => {

26802651

await dispatchWithContext({ context: createReasoningStreamContext(), streamMode: "partial" });

2681265226822653

expect(editMessageTelegram).toHaveBeenCalledWith(123, 999, "3", expect.any(Object));

2683-

expect(reasoningDraftStream.update).toHaveBeenCalledWith(

2654+

expect(editMessageTelegram).toHaveBeenCalledWith(

2655+

123,

2656+

111,

26842657

"Reasoning:\nI am counting letters. The total is 3.",

2658+

expect.any(Object),

2659+

);

2660+

expect(reasoningDraftStream.update).toHaveBeenCalledWith(

2661+

"Reasoning:\nI am counting letters...",

26852662

);

2686-

expect(reasoningDraftStream.flush).toHaveBeenCalled();

2663+

expect(reasoningDraftStream.flush).not.toHaveBeenCalled();

26872664

expect(deliverReplies).not.toHaveBeenCalledWith(

26882665

expect.objectContaining({

26892666

replies: [expect.objectContaining({ text: expect.stringContaining("Reasoning:\nI am") })],

26902667

}),

26912668

);

26922669

});

269326702694-

it("falls back to normal send when DM draft reasoning flush emits no preview update", async () => {

2671+

it("falls back to normal send when DM reasoning preview has no message id", async () => {

26952672

const answerDraftStream = createDraftStream(999);

26962673

const previewRevision = 0;

26972674

const reasoningDraftStream = {

26982675

update: vi.fn(),

26992676

flush: vi.fn().mockResolvedValue(false),

27002677

messageId: vi.fn().mockReturnValue(undefined),

2701-

previewMode: vi.fn().mockReturnValue("draft"),

27022678

previewRevision: vi.fn().mockReturnValue(previewRevision),

27032679

clear: vi.fn().mockResolvedValue(undefined),

27042680

stop: vi.fn().mockResolvedValue(undefined),

@@ -2722,7 +2698,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

2722269827232699

await dispatchWithContext({ context: createReasoningStreamContext(), streamMode: "partial" });

272427002725-

expect(reasoningDraftStream.flush).toHaveBeenCalled();

2701+

expect(reasoningDraftStream.flush).not.toHaveBeenCalled();

27262702

expect(deliverReplies).toHaveBeenCalledWith(

27272703

expect.objectContaining({

27282704

replies: [expect.objectContaining({ text: "Reasoning:\n_step one expanded_" })],