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

推荐订阅源

Vercel News
Vercel News
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
G
Google Developers Blog
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
J
Java Code Geeks
U
Unit 42
云风的 BLOG
云风的 BLOG
阮一峰的网络日志
阮一峰的网络日志
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Docker
V
Visual Studio Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
V
V2EX
T
Tailwind CSS 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
test: dedupe reply media fixtures · openclaw/openclaw@50a...
steipete · 2026-04-24 · via Recent Commits to openclaw:main

@@ -68,6 +68,54 @@ vi.mock("./reply-media-paths.runtime.js", async (importOriginal) => {

68686969

let runReplyAgent: typeof import("./agent-runner.js").runReplyAgent;

707071+

function makeRunReplyAgentParams(

72+

overrides: Partial<Parameters<typeof runReplyAgent>[0]> & {

73+

provider?: string;

74+

prompt?: string;

75+

workspaceDir?: string;

76+

} = {},

77+

): Parameters<typeof runReplyAgent>[0] {

78+

const provider = overrides.provider ?? "whatsapp";

79+

const prompt = overrides.prompt ?? "generate chart";

80+

const workspaceDir = overrides.workspaceDir ?? "/tmp/workspace";

81+82+

return {

83+

commandBody: prompt,

84+

followupRun: createMockFollowupRun({

85+

prompt,

86+

run: {

87+

agentId: "main",

88+

agentDir: "/tmp/agent",

89+

messageProvider: provider,

90+

workspaceDir,

91+

},

92+

}) as unknown as FollowupRun,

93+

queueKey: "main",

94+

resolvedQueue: { mode: "interrupt" } as QueueSettings,

95+

shouldSteer: false,

96+

shouldFollowup: false,

97+

isActive: false,

98+

isStreaming: false,

99+

typing: createMockTypingController(),

100+

sessionCtx: {

101+

Provider: provider,

102+

Surface: provider,

103+

To: "chat-1",

104+

OriginatingTo: "chat-1",

105+

AccountId: "default",

106+

MessageSid: "msg-1",

107+

} as unknown as TemplateContext,

108+

defaultModel: "anthropic/claude",

109+

resolvedVerboseLevel: "off",

110+

isNewSession: false,

111+

blockStreamingEnabled: false,

112+

resolvedBlockStreamingBreak: "message_end",

113+

shouldInjectGroupIntro: false,

114+

typingMode: "instant",

115+

...overrides,

116+

};

117+

}

118+71119

describe("runReplyAgent media path normalization", () => {

72120

beforeEach(async () => {

73121

vi.resetModules();

@@ -126,40 +174,12 @@ describe("runReplyAgent media path normalization", () => {

126174

},

127175

});

128176129-

const result = await runReplyAgent({

130-

commandBody: "generate",

131-

followupRun: createMockFollowupRun({

177+

const result = await runReplyAgent(

178+

makeRunReplyAgentParams({

179+

provider: "telegram",

132180

prompt: "generate",

133-

run: {

134-

agentId: "main",

135-

agentDir: "/tmp/agent",

136-

messageProvider: "telegram",

137-

workspaceDir: "/tmp/workspace",

138-

},

139-

}) as unknown as FollowupRun,

140-

queueKey: "main",

141-

resolvedQueue: { mode: "interrupt" } as QueueSettings,

142-

shouldSteer: false,

143-

shouldFollowup: false,

144-

isActive: false,

145-

isStreaming: false,

146-

typing: createMockTypingController(),

147-

sessionCtx: {

148-

Provider: "telegram",

149-

Surface: "telegram",

150-

To: "chat-1",

151-

OriginatingTo: "chat-1",

152-

AccountId: "default",

153-

MessageSid: "msg-1",

154-

} as unknown as TemplateContext,

155-

defaultModel: "anthropic/claude",

156-

resolvedVerboseLevel: "off",

157-

isNewSession: false,

158-

blockStreamingEnabled: false,

159-

resolvedBlockStreamingBreak: "message_end",

160-

shouldInjectGroupIntro: false,

161-

typingMode: "instant",

162-

});

181+

}),

182+

);

163183164184

expect(result).toMatchObject({

165185

mediaUrl: "/tmp/outbound-media/generated.png",

@@ -205,43 +225,13 @@ describe("runReplyAgent media path normalization", () => {

205225

},

206226

);

207227208-

const result = await runReplyAgent({

209-

commandBody: "generate chart",

210-

followupRun: createMockFollowupRun({

211-

prompt: "generate chart",

212-

run: {

213-

agentId: "main",

214-

agentDir: "/tmp/agent",

215-

messageProvider: "whatsapp",

216-

workspaceDir: "/tmp/workspace",

228+

const result = await runReplyAgent(

229+

makeRunReplyAgentParams({

230+

opts: {

231+

onBlockReply,

217232

},

218-

}) as unknown as FollowupRun,

219-

queueKey: "main",

220-

resolvedQueue: { mode: "interrupt" } as QueueSettings,

221-

shouldSteer: false,

222-

shouldFollowup: false,

223-

isActive: false,

224-

isStreaming: false,

225-

typing: createMockTypingController(),

226-

sessionCtx: {

227-

Provider: "whatsapp",

228-

Surface: "whatsapp",

229-

To: "chat-1",

230-

OriginatingTo: "chat-1",

231-

AccountId: "default",

232-

MessageSid: "msg-1",

233-

} as unknown as TemplateContext,

234-

defaultModel: "anthropic/claude",

235-

resolvedVerboseLevel: "off",

236-

isNewSession: false,

237-

blockStreamingEnabled: false,

238-

resolvedBlockStreamingBreak: "message_end",

239-

shouldInjectGroupIntro: false,

240-

typingMode: "instant",

241-

opts: {

242-

onBlockReply,

243-

},

244-

});

233+

}),

234+

);

245235246236

expect(result).toBeUndefined();

247237

expect(resolveOutboundAttachmentFromUrlMock).toHaveBeenCalledTimes(1);

@@ -276,43 +266,13 @@ describe("runReplyAgent media path normalization", () => {

276266

},

277267

});

278268279-

await runReplyAgent({

280-

commandBody: "generate chart",

281-

followupRun: createMockFollowupRun({

282-

prompt: "generate chart",

283-

run: {

284-

agentId: "main",

285-

agentDir: "/tmp/agent",

286-

messageProvider: "whatsapp",

287-

workspaceDir: "/tmp/workspace",

269+

await runReplyAgent(

270+

makeRunReplyAgentParams({

271+

opts: {

272+

onBlockReply: vi.fn(),

288273

},

289-

}) as unknown as FollowupRun,

290-

queueKey: "main",

291-

resolvedQueue: { mode: "interrupt" } as QueueSettings,

292-

shouldSteer: false,

293-

shouldFollowup: false,

294-

isActive: false,

295-

isStreaming: false,

296-

typing: createMockTypingController(),

297-

sessionCtx: {

298-

Provider: "whatsapp",

299-

Surface: "whatsapp",

300-

To: "chat-1",

301-

OriginatingTo: "chat-1",

302-

AccountId: "default",

303-

MessageSid: "msg-1",

304-

} as unknown as TemplateContext,

305-

defaultModel: "anthropic/claude",

306-

resolvedVerboseLevel: "off",

307-

isNewSession: false,

308-

blockStreamingEnabled: false,

309-

resolvedBlockStreamingBreak: "message_end",

310-

shouldInjectGroupIntro: false,

311-

typingMode: "instant",

312-

opts: {

313-

onBlockReply: vi.fn(),

314-

},

315-

});

274+

}),

275+

);

316276317277

// The .runtime import is only used by agent-runner-execution.ts. After the fix,

318278

// runAgentTurnWithFallback receives the context from the caller and never