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

推荐订阅源

爱范儿
爱范儿
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
博客园_首页
博客园 - 【当耐特】
量子位
S
SegmentFault 最新的问题
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Visual Studio Blog
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
Y
Y Combinator Blog
博客园 - 聂微东
The Cloudflare Blog
小众软件
小众软件
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
H
Help Net Security
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
宝玉的分享
宝玉的分享

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
fix(telegram): gate native tool progress drafts · opencla...
2026-05-19 · via Recent Commits to openclaw:main

@@ -1250,7 +1250,12 @@ describe("dispatchTelegramMessage draft streaming", () => {

12501250

await dispatchWithContext({

12511251

context: createContext(),

12521252

streamMode: "partial",

1253-

telegramCfg: { streaming: { mode: "partial" } },

1253+

telegramCfg: {

1254+

streaming: {

1255+

mode: "partial",

1256+

preview: { nativeToolProgress: true, nativeToolProgressAllowFrom: ["123"] },

1257+

},

1258+

},

12541259

});

1255126012561261

expect(createNativeTelegramToolProgressDraft).toHaveBeenCalledWith(

@@ -1267,6 +1272,62 @@ describe("dispatchTelegramMessage draft streaming", () => {

12671272

expect(nativeDraft.stop).toHaveBeenCalled();

12681273

});

126912741275+

it("keeps native DM drafts off by default", async () => {

1276+

const nativeDraft = createNativeToolProgressDraft();

1277+

createNativeTelegramToolProgressDraft.mockReturnValue(nativeDraft);

1278+

const { answerDraftStream } = setupDraftStreams({ answerMessageId: 2001 });

1279+

dispatchReplyWithBufferedBlockDispatcher.mockImplementation(

1280+

async ({ dispatcherOptions, replyOptions }) => {

1281+

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

1282+

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

1283+

return { queuedFinal: true };

1284+

},

1285+

);

1286+1287+

await dispatchWithContext({

1288+

context: createContext(),

1289+

streamMode: "partial",

1290+

telegramCfg: { streaming: { mode: "partial" } },

1291+

});

1292+1293+

expect(createNativeTelegramToolProgressDraft).not.toHaveBeenCalled();

1294+

expect(nativeDraft.update).not.toHaveBeenCalled();

1295+

expect(answerDraftStream.update).toHaveBeenNthCalledWith(1, expect.stringContaining("Exec"));

1296+

expect(answerDraftStream.update).toHaveBeenLastCalledWith("Done answer.");

1297+

});

1298+1299+

it("honors the native DM draft allowlist", async () => {

1300+

const nativeDraft = createNativeToolProgressDraft();

1301+

createNativeTelegramToolProgressDraft.mockReturnValue(nativeDraft);

1302+

const { answerDraftStream } = setupDraftStreams({ answerMessageId: 2001 });

1303+

dispatchReplyWithBufferedBlockDispatcher.mockImplementation(

1304+

async ({ dispatcherOptions, replyOptions }) => {

1305+

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

1306+

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

1307+

return { queuedFinal: true };

1308+

},

1309+

);

1310+1311+

await dispatchWithContext({

1312+

context: createContext(),

1313+

streamMode: "partial",

1314+

telegramCfg: {

1315+

streaming: {

1316+

mode: "partial",

1317+

preview: {

1318+

nativeToolProgress: true,

1319+

nativeToolProgressAllowFrom: ["999"],

1320+

},

1321+

},

1322+

},

1323+

});

1324+1325+

expect(createNativeTelegramToolProgressDraft).not.toHaveBeenCalled();

1326+

expect(nativeDraft.update).not.toHaveBeenCalled();

1327+

expect(answerDraftStream.update).toHaveBeenNthCalledWith(1, expect.stringContaining("Exec"));

1328+

expect(answerDraftStream.update).toHaveBeenLastCalledWith("Done answer.");

1329+

});

1330+12701331

it("falls back to edited preview tool progress when native DM draft update fails", async () => {

12711332

const nativeDraft = createNativeToolProgressDraft(false);

12721333

createNativeTelegramToolProgressDraft.mockReturnValue(nativeDraft);

@@ -1282,7 +1343,9 @@ describe("dispatchTelegramMessage draft streaming", () => {

12821343

await dispatchWithContext({

12831344

context: createContext(),

12841345

streamMode: "partial",

1285-

telegramCfg: { streaming: { mode: "partial" } },

1346+

telegramCfg: {

1347+

streaming: { mode: "partial", preview: { nativeToolProgress: true } },

1348+

},

12861349

});

1287135012881351

expect(nativeDraft.update).toHaveBeenCalledWith(expect.stringContaining("Exec"));

@@ -1305,7 +1368,9 @@ describe("dispatchTelegramMessage draft streaming", () => {

13051368

await dispatchWithContext({

13061369

context: createContext(),

13071370

streamMode: "partial",

1308-

telegramCfg: { streaming: { mode: "partial" } },

1371+

telegramCfg: {

1372+

streaming: { mode: "partial", preview: { nativeToolProgress: true } },

1373+

},

13091374

});

1310137513111376

expect(nativeDraft.update).not.toHaveBeenCalled();

@@ -1324,7 +1389,9 @@ describe("dispatchTelegramMessage draft streaming", () => {

13241389

await dispatchWithContext({

13251390

context: createContext(),

13261391

streamMode: "partial",

1327-

telegramCfg: { streaming: { mode: "partial" } },

1392+

telegramCfg: {

1393+

streaming: { mode: "partial", preview: { nativeToolProgress: true } },

1394+

},

13281395

});

1329139613301397

expect(nativeDraft.update).not.toHaveBeenCalled();

@@ -1350,7 +1417,9 @@ describe("dispatchTelegramMessage draft streaming", () => {

13501417

await dispatchWithContext({

13511418

context: createContext(),

13521419

streamMode: "partial",

1353-

telegramCfg: { streaming: { mode: "partial" } },

1420+

telegramCfg: {

1421+

streaming: { mode: "partial", preview: { nativeToolProgress: true } },

1422+

},

13541423

});

1355142413561425

expect(nativeDraft.update).not.toHaveBeenCalled();

@@ -1382,7 +1451,9 @@ describe("dispatchTelegramMessage draft streaming", () => {

13821451

threadSpec: { id: undefined, scope: "none" },

13831452

}),

13841453

streamMode: "partial",

1385-

telegramCfg: { streaming: { mode: "partial" } },

1454+

telegramCfg: {

1455+

streaming: { mode: "partial", preview: { nativeToolProgress: true } },

1456+

},

13861457

});

1387145813881459

expect(createNativeTelegramToolProgressDraft).not.toHaveBeenCalled();

@@ -1403,7 +1474,9 @@ describe("dispatchTelegramMessage draft streaming", () => {

14031474

await dispatchWithContext({

14041475

context: createContext(),

14051476

streamMode: "partial",

1406-

telegramCfg: { streaming: { mode: "partial" } },

1477+

telegramCfg: {

1478+

streaming: { mode: "partial", preview: { nativeToolProgress: true } },

1479+

},

14071480

});

1408148114091482

expect(nativeDraft.update).not.toHaveBeenCalledWith(