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

推荐订阅源

The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
月光博客
月光博客
博客园 - Franky
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
有赞技术团队
有赞技术团队
V
V2EX
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
腾讯CDC
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
Martin Fowler
Martin Fowler
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
C
Check Point Blog
Microsoft Azure Blog
Microsoft Azure Blog
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): warn on selected quote tool progress · ope...
steipete · 2026-05-03 · via Recent Commits to openclaw:main

@@ -2,12 +2,17 @@ import {

22

type ChannelDoctorAdapter,

33

type ChannelDoctorEmptyAllowlistAccountContext,

44

} from "openclaw/plugin-sdk/channel-contract";

5+

import {

6+

resolveChannelStreamingBlockEnabled,

7+

resolveChannelStreamingPreviewToolProgress,

8+

} from "openclaw/plugin-sdk/channel-streaming";

59

import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";

610

import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";

711

import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";

812

import { inspectTelegramAccount } from "./account-inspect.js";

913

import {

1014

listTelegramAccountIds,

15+

mergeTelegramAccountConfig,

1116

resolveDefaultTelegramAccountId,

1217

resolveTelegramAccount,

1318

} from "./accounts.js";

@@ -18,8 +23,10 @@ import {

1823

legacyConfigRules as TELEGRAM_LEGACY_CONFIG_RULES,

1924

normalizeCompatibilityConfig as normalizeTelegramCompatibilityConfig,

2025

} from "./doctor-contract.js";

26+

import { resolveTelegramPreviewStreamMode } from "./preview-streaming.js";

21272228

type TelegramAllowFromInvalidHit = { path: string; entry: string };

29+

type TelegramSelectedQuoteToolProgressHit = { path: string; replyToMode: string };

2330

type TelegramApiRootBotEndpointHit = {

2431

path: string;

2532

pathSegments: string[];

@@ -196,6 +203,58 @@ export function collectTelegramApiRootWarnings(params: {

196203

];

197204

}

198205206+

function formatTelegramAccountConfigPath(cfg: OpenClawConfig, accountId: string): string {

207+

const telegram = asObjectRecord((cfg.channels as Record<string, unknown> | undefined)?.telegram);

208+

const accounts = asObjectRecord(telegram?.accounts);

209+

if (!accounts || Object.keys(accounts).length === 0) {

210+

return "channels.telegram";

211+

}

212+

return accountId === "default" ? "channels.telegram" : `channels.telegram.accounts.${accountId}`;

213+

}

214+215+

export function scanTelegramSelectedQuoteToolProgressWarnings(

216+

cfg: OpenClawConfig,

217+

): TelegramSelectedQuoteToolProgressHit[] {

218+

if (!asObjectRecord((cfg.channels as Record<string, unknown> | undefined)?.telegram)) {

219+

return [];

220+

}

221+

return listTelegramAccountIds(cfg).flatMap((accountId) => {

222+

const account = mergeTelegramAccountConfig(cfg, accountId);

223+

const replyToMode = account.replyToMode ?? "off";

224+

if (replyToMode === "off") {

225+

return [];

226+

}

227+

if (resolveTelegramPreviewStreamMode(account) === "off") {

228+

return [];

229+

}

230+

const blockStreamingEnabled =

231+

resolveChannelStreamingBlockEnabled(account) ??

232+

cfg.agents?.defaults?.blockStreamingDefault === "on";

233+

if (blockStreamingEnabled || !resolveChannelStreamingPreviewToolProgress(account)) {

234+

return [];

235+

}

236+

return [

237+

{

238+

path: formatTelegramAccountConfigPath(cfg, accountId),

239+

replyToMode,

240+

},

241+

];

242+

});

243+

}

244+245+

export function collectTelegramSelectedQuoteToolProgressWarnings(params: {

246+

hits: TelegramSelectedQuoteToolProgressHit[];

247+

}): string[] {

248+

if (params.hits.length === 0) {

249+

return [];

250+

}

251+

const sample = params.hits[0] ?? { path: "channels.telegram", replyToMode: "first" };

252+

return [

253+

`- ${sanitizeForLog(sample.path)} has replyToMode: "${sanitizeForLog(sample.replyToMode)}" while Telegram preview tool-progress is enabled. Telegram selected quote replies must send the final answer through the native quote-reply path, so those turns skip the short "Working..." tool-progress preview. Current-message replies without selected quote text still keep preview streaming.`,

254+

'- Set replyToMode: "off" when tool-progress preview matters more than native quote replies, or set streaming.preview.toolProgress: false to keep quote replies and silence this warning.',

255+

];

256+

}

257+199258

export function maybeRepairTelegramApiRoots(cfg: OpenClawConfig): {

200259

config: OpenClawConfig;

201260

changes: string[];

@@ -506,6 +565,9 @@ export const telegramDoctor: ChannelDoctorAdapter = {

506565

hits: scanTelegramBotEndpointApiRoots(cfg),

507566

doctorFixCommand,

508567

}),

568+

...collectTelegramSelectedQuoteToolProgressWarnings({

569+

hits: scanTelegramSelectedQuoteToolProgressWarnings(cfg),

570+

}),

509571

],

510572

repairConfig: async ({ cfg }) => await repairTelegramConfig({ cfg }),

511573

collectEmptyAllowlistExtraWarnings: collectTelegramEmptyAllowlistExtraWarnings,