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

推荐订阅源

Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
U
Unit 42
WordPress大学
WordPress大学
Y
Y Combinator Blog
罗磊的独立博客
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
博客园 - 叶小钗
Stack Overflow Blog
Stack Overflow Blog
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
V
V2EX
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
SegmentFault 最新的问题
酷 壳 – CoolShell
酷 壳 – CoolShell

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(release): repair beta validation fixtures · openclaw/...
vincentkoc · 2026-06-14 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -340,6 +340,36 @@ export const sendAnimationSpy: AnyAsyncMock = grammySpies.sendAnimationSpy;

340340

export const sendPhotoSpy: AnyAsyncMock = grammySpies.sendPhotoSpy;

341341

export const getFileSpy: AnyAsyncMock = grammySpies.getFileSpy;

342342
343+

type RichMessageParams = {

344+

chat_id?: string | number;

345+

message_id?: number;

346+

rich_message?: {

347+

markdown?: string;

348+

html?: string;

349+

};

350+

[key: string]: unknown;

351+

};

352+
353+

function getRichMessageText(params: RichMessageParams): string {

354+

return params.rich_message?.markdown ?? params.rich_message?.html ?? "";

355+

}

356+
357+

function toLegacyMessageParams(params: RichMessageParams): Record<string, unknown> {

358+

const { chat_id: _chatId, message_id: _messageId, rich_message: _richMessage, ...rest } = params;

359+

const replyParameters = rest.reply_parameters;

360+

if (

361+

replyParameters &&

362+

typeof replyParameters === "object" &&

363+

!("quote" in replyParameters) &&

364+

typeof (replyParameters as { message_id?: unknown }).message_id === "number"

365+

) {

366+

rest.reply_to_message_id = (replyParameters as { message_id: number }).message_id;

367+

rest.allow_sending_without_reply = true;

368+

delete rest.reply_parameters;

369+

}

370+

return rest;

371+

}

372+
343373

const runnerHoisted = vi.hoisted(() => ({

344374

sequentializeMiddleware: vi.fn(async (_ctx: unknown, next?: () => Promise<void>) => {

345375

if (typeof next === "function") {

@@ -369,6 +399,21 @@ export const telegramBotRuntimeForTest: TelegramBotRuntimeForTest = {

369399

sendAnimation: grammySpies.sendAnimationSpy,

370400

sendPhoto: grammySpies.sendPhotoSpy,

371401

getFile: grammySpies.getFileSpy,

402+

raw: {

403+

sendRichMessage: async (params: RichMessageParams) =>

404+

grammySpies.sendMessageSpy(

405+

params.chat_id,

406+

getRichMessageText(params),

407+

toLegacyMessageParams(params),

408+

),

409+

editMessageText: async (params: RichMessageParams) =>

410+

grammySpies.editMessageTextSpy(

411+

params.chat_id,

412+

params.message_id,

413+

getRichMessageText(params),

414+

toLegacyMessageParams(params),

415+

),

416+

},

372417

};

373418

use = grammySpies.middlewareUseSpy;

374419

on = grammySpies.onSpy;

Original file line numberDiff line numberDiff line change

@@ -70,6 +70,7 @@ const {

7070

TelegramSpooledReplayProcessingError,

7171

withTelegramSpooledReplayUpdate,

7272

} = await import("./bot-processing-outcome.js");

73+

const { TELEGRAM_RICH_TEXT_LIMIT } = await import("./rich-message.js");

7374

const { resolveTelegramConversationRoute } = await import("./conversation-route.js");

7475

const { clearAccountThrottlersForTest } = await import("./account-throttler.js");

7576

const {

@@ -4192,7 +4193,7 @@ describe("createTelegramBot", () => {

41924193

}

41934194

});

41944195

it("sends replies without native reply threading", async () => {

4195-

replySpy.mockResolvedValue({ text: "a".repeat(4500) });

4196+

replySpy.mockResolvedValue({ text: "a".repeat(TELEGRAM_RICH_TEXT_LIMIT + 1024) });

41964197
41974198

createTelegramBot({ token: "tok" });

41984199

const handler = getOnHandler("message") as (ctx: Record<string, unknown>) => Promise<void>;

@@ -4284,7 +4285,7 @@ describe("createTelegramBot", () => {

42844285

sendMessageSpy.mockClear();

42854286

replySpy.mockClear();

42864287

replySpy.mockResolvedValue({

4287-

text: "a".repeat(4500),

4288+

text: "a".repeat(TELEGRAM_RICH_TEXT_LIMIT + 1024),

42884289

replyToId: String(messageId),

42894290

});

42904291

loadConfig.mockReturnValue({

Original file line numberDiff line numberDiff line change

@@ -2,12 +2,34 @@

22

import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";

33
44

const { botApi, botCtorSpy } = vi.hoisted(() => ({

5-

botApi: {

6-

config: { use: vi.fn() },

7-

sendMessage: vi.fn(),

8-

setMessageReaction: vi.fn(),

9-

deleteMessage: vi.fn(),

10-

},

5+

botApi: (() => {

6+

const sendMessage = vi.fn();

7+

type RichMessageParams = {

8+

chat_id?: string | number;

9+

rich_message?: {

10+

markdown?: string;

11+

html?: string;

12+

};

13+

[key: string]: unknown;

14+

};

15+

return {

16+

config: { use: vi.fn() },

17+

sendMessage,

18+

setMessageReaction: vi.fn(),

19+

deleteMessage: vi.fn(),

20+

raw: {

21+

sendRichMessage: vi.fn(async (params: RichMessageParams) =>

22+

sendMessage(

23+

params.chat_id,

24+

params.rich_message?.markdown ?? params.rich_message?.html ?? "",

25+

Object.fromEntries(

26+

Object.entries(params).filter(([key]) => key !== "chat_id" && key !== "rich_message"),

27+

),

28+

),

29+

),

30+

},

31+

};

32+

})(),

1133

botCtorSpy: vi.fn(),

1234

}));

1335
Original file line numberDiff line numberDiff line change

@@ -59,10 +59,9 @@ async function writeLiveGatewayConfig(params: {

5959

list: [{ id: "dev", default: true }],

6060

defaults: {

6161

workspace: params.workspace,

62-

agentRuntime: { id: "codex" },

6362

skipBootstrap: true,

6463

model: { primary: params.modelKey },

65-

models: { [params.modelKey]: {} },

64+

models: { [params.modelKey]: { agentRuntime: { id: "codex" } } },

6665

sandbox: { mode: "off" },

6766

},

6867

},