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

推荐订阅源

腾讯CDC
The Cloudflare Blog
IT之家
IT之家
V
V2EX
雷峰网
雷峰网
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
Stack Overflow Blog
Stack Overflow Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
S
SegmentFault 最新的问题
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
小众软件
小众软件
博客园 - 叶小钗
Blog — PlanetScale
Blog — PlanetScale
C
Check Point Blog
A
About on SuperTechFans
B
Blog
月光博客
月光博客
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in 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(agents): preserve bare Telegram reply context (#83953...
joshavant · 2026-05-19 · via Recent Commits to openclaw:main

@@ -1531,6 +1531,58 @@ describe("runPreparedReply media-only handling", () => {

15311531

);

15321532

});

153315331534+

it("runs bare mention replies when the reply target is the current-turn context", async () => {

1535+

vi.mocked(buildInboundUserContextPrefix).mockReturnValueOnce(

1536+

[

1537+

"Reply target of current user message (untrusted, for context):",

1538+

"```json",

1539+

JSON.stringify({ sender_label: "Bot", body: "quoted status body" }, null, 2),

1540+

"```",

1541+

].join("\n"),

1542+

);

1543+1544+

const result = await runPreparedReply(

1545+

baseParams({

1546+

ctx: {

1547+

Body: "",

1548+

RawBody: "@bot",

1549+

CommandBody: "@bot",

1550+

Provider: "telegram",

1551+

Surface: "telegram",

1552+

ChatType: "group",

1553+

ReplyToBody: "quoted status body",

1554+

ReplyToSender: "Bot",

1555+

},

1556+

sessionCtx: {

1557+

Body: "",

1558+

BodyStripped: "",

1559+

RawBody: "@bot",

1560+

CommandBody: "@bot",

1561+

Provider: "telegram",

1562+

Surface: "telegram",

1563+

ChatType: "group",

1564+

ReplyToBody: "quoted status body",

1565+

ReplyToSender: "Bot",

1566+

},

1567+

command: {

1568+

...baseParams().command,

1569+

rawBodyNormalized: "@bot",

1570+

commandBodyNormalized: "",

1571+

} as never,

1572+

}),

1573+

);

1574+1575+

expect(result).toEqual({ text: "ok" });

1576+

const call = requireLastRunReplyAgentCall();

1577+

expect(call?.transcriptCommandBody).toBe("");

1578+

expect(call?.followupRun.prompt).toBe("");

1579+

expect(call?.followupRun.transcriptPrompt).toBe("");

1580+

expect(call?.followupRun.currentInboundContext?.text).toContain(

1581+

"Reply target of current user message",

1582+

);

1583+

expect(call?.followupRun.currentInboundContext?.text).toContain("quoted status body");

1584+

});

1585+15341586

it("runs room events as contextual events instead of direct user prompts", async () => {

15351587

vi.mocked(buildInboundUserContextPrefix).mockReturnValueOnce(

15361588

[

@@ -1871,7 +1923,7 @@ describe("runPreparedReply media-only handling", () => {

18711923

["/new", "new"],

18721924

["/reset", "reset"],

18731925

] as const)(

1874-

"keeps inbound sender context in the bare %s model prompt while hiding startup instructions from transcript prompt",

1926+

"keeps inbound sender context in reply-targeted bare %s model prompt while hiding startup instructions from transcript prompt",

18751927

async (commandText, startupAction) => {

18761928

vi.mocked(buildInboundUserContextPrefix).mockReturnValueOnce(

18771929

[

@@ -1891,6 +1943,8 @@ describe("runPreparedReply media-only handling", () => {

18911943

Provider: "webchat",

18921944

Surface: "webchat",

18931945

ChatType: "direct",

1946+

ReplyToBody: "quoted reset target",

1947+

ReplyToSender: "Ada Lovelace",

18941948

},

18951949

sessionCtx: {

18961950

Body: "",

@@ -1900,6 +1954,8 @@ describe("runPreparedReply media-only handling", () => {

19001954

ChatType: "direct",

19011955

SenderId: "telegram-user-1",

19021956

SenderName: "Ada Lovelace",

1957+

ReplyToBody: "quoted reset target",

1958+

ReplyToSender: "Ada Lovelace",

19031959

},

19041960

command: {

19051961

surface: "webchat",