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

推荐订阅源

MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
U
Unit 42
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
C
Check Point Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
Vercel News
Vercel News
腾讯CDC
GbyAI
GbyAI
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
H
Help Net Security
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security 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
fix(telegram): stabilize reply dispatch runtime · opencla...
BunsDev · 2026-05-04 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -55,6 +55,7 @@ Docs: https://docs.openclaw.ai

5555

### Fixes

5656
5757

- Agents/Pi: suppress persistence for synthetic mid-turn overflow continuation prompts, so transcript-retry recovery does not write the "continue from transcript" prompt as a new user turn. Thanks @vincentkoc.

58+

- Telegram: keep reply-dispatch lazy provider runtime chunks behind stable dist names and delete `/reasoning stream` previews after final delivery so package updates and live reasoning drafts do not leave Telegram turns broken or noisy. Thanks @BunsDev.

5859

- Exec approvals: detect `env -S` split-string command-carrier risks when `-S`/`-s` is combined with other env short options, so approval explanations do not miss split payloads hidden behind `env -iS...`. Thanks @vincentkoc.

5960

- Google Meet: log the concrete agent-mode TTS provider, model, voice, output format, and sample rate after speech synthesis, so Meet logs show which voice backend spoke each reply.

6061

- Voice Call: mark realtime calls completed when the realtime provider closes normally, so Twilio/OpenAI/Google realtime stop events do not leave active call records behind. Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

@@ -318,6 +318,7 @@ curl "https://api.telegram.org/bot<bot_token>/getUpdates"

318318

Telegram-only reasoning stream:

319319
320320

- `/reasoning stream` sends reasoning to the live preview while generating

321+

- the reasoning preview is deleted after final delivery; use `/reasoning on` when reasoning should remain visible

321322

- final answer is sent without reasoning text

322323
323324

</Accordion>

Original file line numberDiff line numberDiff line change

@@ -166,7 +166,7 @@ OpenClaw can expose or hide model reasoning:

166166
167167

- `/reasoning on|off|stream` controls visibility.

168168

- Reasoning content still counts toward token usage when produced by the model.

169-

- Telegram supports reasoning stream into the draft bubble.

169+

- Telegram supports reasoning stream into a transient draft bubble that is deleted after final delivery; use `/reasoning on` for persistent reasoning output.

170170
171171

Details: [Thinking + reasoning directives](/tools/thinking) and [Token use](/reference/token-use).

172172
Original file line numberDiff line numberDiff line change

@@ -162,7 +162,7 @@ Telegram:

162162

- Uses `sendMessage` + `editMessageText` preview updates across DMs and group/topics.

163163

- Sends a fresh final message instead of editing in place when a preview has been visible for about one minute, then cleans up the preview so Telegram's timestamp reflects reply completion.

164164

- Preview streaming is skipped when Telegram block streaming is explicitly enabled (to avoid double-streaming).

165-

- `/reasoning stream` can write reasoning to preview.

165+

- `/reasoning stream` can write reasoning to a transient preview that is deleted after final delivery.

166166
167167

Discord:

168168
Original file line numberDiff line numberDiff line change

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

28622862

);

28632863

});

28642864
2865-

it("keeps reasoning preview message when reasoning is streamed but final is answer-only", async () => {

2865+

it("clears reasoning preview message when reasoning is streamed but final is answer-only", async () => {

28662866

const { reasoningDraftStream } = setupDraftStreams({

28672867

answerMessageId: 999,

28682868

reasoningMessageId: 111,

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

28872887

expect(reasoningDraftStream.update).toHaveBeenCalledWith(

28882888

"Reasoning:\n_Word: strawberry. r appears at 3, 8, 9._",

28892889

);

2890-

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

2890+

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

28912891

expect(editMessageTelegram).toHaveBeenCalledWith(

28922892

123,

28932893

999,

Original file line numberDiff line numberDiff line change

@@ -1025,10 +1025,6 @@ export const dispatchTelegramMessage = async ({

10251025

continue;

10261026

}

10271027

if (info.kind === "final") {

1028-

if (reasoningLane.hasStreamedMessage) {

1029-

activePreviewLifecycleByLane.reasoning = "complete";

1030-

retainPreviewOnCleanupByLane.reasoning = true;

1031-

}

10321028

reasoningStepState.resetForNextStep();

10331029

}

10341030

}

Original file line numberDiff line numberDiff line change

@@ -40,6 +40,10 @@ const LEGACY_ROOT_RUNTIME_COMPAT_ALIASES = [

4040

// gateway may resolve these only after an npm package tree replacement.

4141

["server-close-DsVPJDIx.js", "server-close.runtime.js"],

4242

["server-close-DvAvfgr8.js", "server-close.runtime.js"],

43+

// v2026.5.3 beta reply-dispatch lazy chunks.

44+

["provider-dispatcher-6EQEtc-t.js", "provider-dispatcher.js"],

45+

["provider-dispatcher-BpL2E92x.js", "provider-dispatcher.js"],

46+

["provider-dispatcher-JG96SkLX.js", "provider-dispatcher.js"],

4347

];

4448

const LEGACY_CLI_EXIT_COMPAT_CHUNKS = [

4549

{

Original file line numberDiff line numberDiff line change

@@ -1107,6 +1107,20 @@ describe("message tool reasoning tag sanitization", () => {

11071107

target: "signal:+15551234567",

11081108

channel: "signal",

11091109

},

1110+

{

1111+

field: "message",

1112+

input: "Reasoning:\n_internal plan_\n\nVisible answer",

1113+

expected: "Visible answer",

1114+

target: "telegram:123",

1115+

channel: "telegram",

1116+

},

1117+

{

1118+

field: "message",

1119+

input: "Reasoning:\n_internal plan_\n_more internal notes_",

1120+

expected: "",

1121+

target: "telegram:123",

1122+

channel: "telegram",

1123+

},

11101124

])(

11111125

"sanitizes reasoning tags in $field before sending",

11121126

async ({ channel, target, field, input, expected }) => {

Original file line numberDiff line numberDiff line change

@@ -45,6 +45,26 @@ const EXPLICIT_TARGET_ACTIONS = new Set<ChannelMessageActionName>([

4545

function actionNeedsExplicitTarget(action: ChannelMessageActionName): boolean {

4646

return EXPLICIT_TARGET_ACTIONS.has(action);

4747

}

48+
49+

function stripFormattedReasoningMessage(text: string): string {

50+

const stripped = stripReasoningTagsFromText(text);

51+

const lines = stripped.split(/\r?\n/u);

52+

if (lines[0]?.trim() !== "Reasoning:") {

53+

return stripped;

54+

}

55+
56+

let index = 1;

57+

while (index < lines.length) {

58+

const trimmed = lines[index]?.trim() ?? "";

59+

if (!trimmed || (trimmed.startsWith("_") && trimmed.endsWith("_") && trimmed.length >= 2)) {

60+

index += 1;

61+

continue;

62+

}

63+

break;

64+

}

65+

return lines.slice(index).join("\n").trim();

66+

}

67+
4868

function buildRoutingSchema() {

4969

return {

5070

channel: Type.Optional(Type.String()),

@@ -692,7 +712,7 @@ export function createMessageTool(options?: MessageToolOptions): AnyAgentTool {

692712

// in tool arguments, and the messaging tool send path has no other tag filtering.

693713

for (const field of ["text", "content", "message", "caption"]) {

694714

if (typeof params[field] === "string") {

695-

params[field] = stripReasoningTagsFromText(params[field]);

715+

params[field] = stripFormattedReasoningMessage(params[field]);

696716

}

697717

}

698718
Original file line numberDiff line numberDiff line change

@@ -12,6 +12,7 @@ const tempDirs: string[] = [];

1212

const pluginModuleLoaderJitiFactoryOverrideKey = Symbol.for(

1313

"openclaw.pluginModuleLoaderJitiFactoryOverride",

1414

);

15+

const testRequire = createRequire(import.meta.url);

1516
1617

afterEach(() => {

1718

for (const tempDir of tempDirs.splice(0)) {

@@ -87,6 +88,12 @@ describe("channel plugin module loader helpers", () => {

8788

target,

8889

}));

8990

const createJiti = vi.fn(() => loadWithJiti);

91+

const sourceExtensions = [".ts", ".tsx", ".mts", ".cts"] as const;

92+

const sourceHooks = new Map<string, NodeJS.RequireExtensions[string] | undefined>();

93+

for (const extension of sourceExtensions) {

94+

sourceHooks.set(extension, testRequire.extensions[extension]);

95+

delete testRequire.extensions[extension];

96+

}

9097

vi.resetModules();

9198

stubPluginModuleLoaderJitiFactory(createJiti as unknown as PluginModuleLoaderFactory);

9299

const loaderModule = await importFreshModule<typeof import("./module-loader.js")>(

@@ -98,9 +105,6 @@ describe("channel plugin module loader helpers", () => {

98105

fs.mkdirSync(path.dirname(modulePath), { recursive: true });

99106

fs.writeFileSync(modulePath, "export const ok = true;\n", "utf8");

100107
101-

const testRequire = createRequire(import.meta.url);

102-

const originalTsHook = testRequire.extensions[".ts"];

103-

delete testRequire.extensions[".ts"];

104108

try {

105109

expect(

106110

loaderModule.loadChannelPluginModule({

@@ -111,16 +115,20 @@ describe("channel plugin module loader helpers", () => {

111115

loadedBy: "jiti",

112116

target: fs.realpathSync.native(modulePath),

113117

});

118+

expect(createJiti).toHaveBeenCalledOnce();

119+

expect(createJiti).toHaveBeenCalledWith(

120+

expect.stringContaining("module-loader.ts"),

121+

expect.objectContaining({ tryNative: false }),

122+

);

123+

expect(loadWithJiti).toHaveBeenCalledWith(fs.realpathSync.native(modulePath));

114124

} finally {

115-

if (originalTsHook) {

116-

testRequire.extensions[".ts"] = originalTsHook;

125+

for (const [extension, hook] of sourceHooks) {

126+

if (hook) {

127+

testRequire.extensions[extension] = hook;

128+

} else {

129+

delete testRequire.extensions[extension];

130+

}

117131

}

118132

}

119-

expect(createJiti).toHaveBeenCalledOnce();

120-

expect(createJiti).toHaveBeenCalledWith(

121-

expect.stringContaining("module-loader.ts"),

122-

expect.objectContaining({ tryNative: false }),

123-

);

124-

expect(loadWithJiti).toHaveBeenCalledWith(fs.realpathSync.native(modulePath));

125133

});

126134

});