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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
J
Java Code Geeks
C
Check Point Blog
Last Week in AI
Last Week in AI
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
L
LangChain Blog
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 司徒正美
IT之家
IT之家
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
U
Unit 42
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ

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(webchat): keep trustedLocalMedia internal to reply pa...
leno23 · 2026-05-17 · via Recent Commits to openclaw:main

File tree

  • extensions/speech-core/src

Original file line numberDiff line numberDiff line change

@@ -210,7 +210,7 @@ async function expectTtsPayloadResult(params: {

210210

expect(result.audioAsVoice).toBe(params.audioAsVoice);

211211

expect(result.mediaUrl).toMatch(new RegExp(`voice-\\d+\\.${params.mediaExtension ?? "ogg"}$`));

212212

expect(result.spokenText).toBe(params.text);

213-

expect(result.trustedLocalMedia).toBe(true);

213+

expect((result as { trustedLocalMedia?: boolean }).trustedLocalMedia).toBe(true);

214214
215215

mediaDir = result.mediaUrl ? path.dirname(result.mediaUrl) : undefined;

216216

} finally {

@@ -453,7 +453,7 @@ describe("speech-core native voice-note routing", () => {

453453

});

454454
455455

expect(synthesizeMock).not.toHaveBeenCalled();

456-

expect(result.trustedLocalMedia).toBeUndefined();

456+

expect((result as { trustedLocalMedia?: boolean }).trustedLocalMedia).toBeUndefined();

457457

expect(result.text).toBe("WebChat block stream chunks defer TTS to the final tail.");

458458

});

459459

@@ -468,7 +468,7 @@ describe("speech-core native voice-note routing", () => {

468468

});

469469
470470

expect(synthesizeMock).not.toHaveBeenCalled();

471-

expect(result.trustedLocalMedia).toBeUndefined();

471+

expect((result as { trustedLocalMedia?: boolean }).trustedLocalMedia).toBeUndefined();

472472

expect(result.text).toBe("Intermediate tool output should not be spoken.");

473473

});

474474
Original file line numberDiff line numberDiff line change

@@ -1850,7 +1850,7 @@ export async function maybeApplyTtsToPayload(params: {

18501850

audioAsVoice: result.audioAsVoice || params.payload.audioAsVoice,

18511851

spokenText: textForAudio,

18521852

trustedLocalMedia: true,

1853-

};

1853+

} as ReplyPayload;

18541854

}

18551855
18561856

lastTtsAttempt = {

Original file line numberDiff line numberDiff line change

@@ -89,16 +89,14 @@ async function main() {

8989

throw new Error("expected final-mode tail TTS to write a local media file");

9090

}

9191
92+

// Same shape as dispatch-from-config accumulated block TTS-only final payload.

9293

const ttsOnlyPayload = {

9394

mediaUrl: tailResult.mediaUrl,

9495

audioAsVoice: tailResult.audioAsVoice,

9596

spokenText: accumulatedBlockText,

96-

trustedLocalMedia: tailResult.trustedLocalMedia,

97+

trustedLocalMedia: true,

9798

};

98-

console.log(

99-

"dispatch ttsOnlyPayload.trustedLocalMedia =",

100-

ttsOnlyPayload.trustedLocalMedia ?? false,

101-

);

99+

console.log("dispatch ttsOnlyPayload.trustedLocalMedia =", ttsOnlyPayload.trustedLocalMedia);

102100
103101

const localRoots = [path.dirname(mediaPath)];

104102

const trustedBlocks = await buildWebchatAudioContentBlocksFromReplyPayloads([ttsOnlyPayload], {

Original file line numberDiff line numberDiff line change

@@ -1700,7 +1700,7 @@ export async function dispatchReplyFromConfig(

17001700

mediaUrl: ttsSyntheticReply.mediaUrl,

17011701

audioAsVoice: ttsSyntheticReply.audioAsVoice,

17021702

spokenText: accumulatedBlockTtsText,

1703-

trustedLocalMedia: ttsSyntheticReply.trustedLocalMedia,

1703+

trustedLocalMedia: true,

17041704

};

17051705

const normalizedTtsOnlyPayload = await normalizeReplyMediaPayload(ttsOnlyPayload);

17061706

const result = await routeReplyToOriginating(normalizedTtsOnlyPayload);

Original file line numberDiff line numberDiff line change

@@ -6,7 +6,7 @@ import { normalizeLowercaseStringOrEmpty, readStringValue } from "../shared/stri

66
77

export type { MediaPayload, MediaPayloadInput } from "../channels/plugins/media-payload.js";

88

export { buildMediaPayload } from "../channels/plugins/media-payload.js";

9-

export type ReplyPayload = InternalReplyPayload;

9+

export type ReplyPayload = Omit<InternalReplyPayload, "trustedLocalMedia">;

1010
1111

export type OutboundReplyPayload = {

1212

text?: string;