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

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
D
DataBreaches.Net
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
人人都是产品经理
人人都是产品经理
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
腾讯CDC
博客园_首页
The Cloudflare Blog
S
SegmentFault 最新的问题
C
Check Point Blog
美团技术团队
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale

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: specify message image parser refs · openclaw/opencl...
shakkernerd · 2026-05-12 · via Recent Commits to openclaw:main

@@ -162,16 +162,24 @@ describe("detectImageReferences", () => {

162162

const ref = expectSingleImageReference(`What does this image show?

163163

[Image: source: /Users/tyleryust/Library/Messages/Attachments/IMG_0043.jpeg]`);

164164165-

expect(ref?.raw).toBe("/Users/tyleryust/Library/Messages/Attachments/IMG_0043.jpeg");

166-

expect(ref?.type).toBe("path");

165+

expect(ref).toStrictEqual({

166+

raw: "/Users/tyleryust/Library/Messages/Attachments/IMG_0043.jpeg",

167+

type: "path",

168+

resolved: "/Users/tyleryust/Library/Messages/Attachments/IMG_0043.jpeg",

169+

});

167170

});

168171169172

it("handles complex message attachment paths", () => {

170173

const ref = expectSingleImageReference(

171174

"[Image: source: /Users/tyleryust/Library/Messages/Attachments/23/03/AA4726EA-DB27-4269-BA56-1436936CC134/5E3E286A-F585-4E5E-9043-5BC2AFAFD81BIMG_0043.jpeg]",

172175

);

173176174-

expect(ref?.resolved).toContain("IMG_0043.jpeg");

177+

expect(ref).toStrictEqual({

178+

raw: "/Users/tyleryust/Library/Messages/Attachments/23/03/AA4726EA-DB27-4269-BA56-1436936CC134/5E3E286A-F585-4E5E-9043-5BC2AFAFD81BIMG_0043.jpeg",

179+

type: "path",

180+

resolved:

181+

"/Users/tyleryust/Library/Messages/Attachments/23/03/AA4726EA-DB27-4269-BA56-1436936CC134/5E3E286A-F585-4E5E-9043-5BC2AFAFD81BIMG_0043.jpeg",

182+

});

175183

});

176184177185

it("detects multiple images in [media attached: ...] format", () => {

@@ -219,15 +227,25 @@ Also https://cdn.mysite.com/img.jpg`,

219227

1,

220228

);

221229222-

expect(refs[0]?.raw).toBe("/path/to/real.png");

230+

expect(refs).toStrictEqual([

231+

{

232+

raw: "/path/to/real.png",

233+

type: "path",

234+

resolved: "/path/to/real.png",

235+

},

236+

]);

223237

});

224238225239

it("handles single file format with URL (no index)", () => {

226240

const ref =

227241

expectSingleImageReference(`[media attached: /cache/photo.jpeg (image/jpeg) | https://example.com/url]

228242

what is this?`);

229243230-

expect(ref?.resolved).toContain("photo.jpeg");

244+

expect(ref).toStrictEqual({

245+

raw: "/cache/photo.jpeg",

246+

type: "path",

247+

resolved: "/cache/photo.jpeg",

248+

});

231249

});

232250233251

it("handles paths with spaces in filename", () => {

@@ -236,8 +254,11 @@ what is this?`);

236254

expectSingleImageReference(`[media attached: /Users/test/.openclaw/media/ChatGPT Image Apr 21, 2025.png (image/png) | https://example.com/same.png]

237255

what is this?`);

238256239-

// Only 1 ref - the local path (example.com URLs are skipped)

240-

expect(ref?.resolved).toContain("ChatGPT Image Apr 21, 2025.png");

257+

expect(ref).toStrictEqual({

258+

raw: "/Users/test/.openclaw/media/ChatGPT Image Apr 21, 2025.png",

259+

type: "path",

260+

resolved: "/Users/test/.openclaw/media/ChatGPT Image Apr 21, 2025.png",

261+

});

241262

});

242263243264

it("ignores remote-host file URLs", () => {