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

推荐订阅源

罗磊的独立博客
U
Unit 42
N
Netflix TechBlog - Medium
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
小众软件
小众软件
V
Visual Studio Blog
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
博客园 - 叶小钗
GbyAI
GbyAI
爱范儿
爱范儿
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
D
DataBreaches.Net
博客园_首页
D
Docker
A
About on SuperTechFans
G
Google Developers Blog
I
InfoQ
T
The Blog of Author Tim Ferriss
V
V2EX
博客园 - Franky

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 deduped image refs · openclaw/openclaw@0e41798
shakkernerd · 2026-05-12 · via Recent Commits to openclaw:main

@@ -127,15 +127,41 @@ describe("detectImageReferences", () => {

127127

});

128128129129

it("deduplicates repeated image references", () => {

130-

expectImageReferenceCount("Look at /path/image.png and also /path/image.png again", 1);

130+

expect(

131+

detectImageReferences("Look at /path/image.png and also /path/image.png again"),

132+

).toStrictEqual([

133+

{

134+

raw: "/path/image.png",

135+

type: "path",

136+

resolved: "/path/image.png",

137+

},

138+

]);

131139

});

132140133141

it("dedupe casing follows host filesystem conventions", () => {

142+

const prompt = "Look at /tmp/Image.png and /tmp/image.png";

134143

if (process.platform === "win32") {

135-

expectImageReferenceCount("Look at /tmp/Image.png and /tmp/image.png", 1);

144+

expect(detectImageReferences(prompt)).toStrictEqual([

145+

{

146+

raw: "/tmp/Image.png",

147+

type: "path",

148+

resolved: "/tmp/Image.png",

149+

},

150+

]);

136151

return;

137152

}

138-

expectImageReferenceCount("Look at /tmp/Image.png and /tmp/image.png", 2);

153+

expect(detectImageReferences(prompt)).toStrictEqual([

154+

{

155+

raw: "/tmp/Image.png",

156+

type: "path",

157+

resolved: "/tmp/Image.png",

158+

},

159+

{

160+

raw: "/tmp/image.png",

161+

type: "path",

162+

resolved: "/tmp/image.png",

163+

},

164+

]);

139165

});

140166141167

it("returns empty array when no images found", () => {

@@ -149,13 +175,21 @@ describe("detectImageReferences", () => {

149175

it("handles paths inside quotes (without spaces)", () => {

150176

const ref = expectSingleImageReference('The file is at "/path/to/image.png"');

151177152-

expect(ref?.raw).toBe("/path/to/image.png");

178+

expect(ref).toStrictEqual({

179+

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

180+

type: "path",

181+

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

182+

});

153183

});

154184155185

it("handles paths in parentheses", () => {

156186

const ref = expectSingleImageReference("See the image (./screenshot.png) for details");

157187158-

expect(ref?.raw).toBe("./screenshot.png");

188+

expect(ref).toStrictEqual({

189+

raw: "./screenshot.png",

190+

type: "path",

191+

resolved: "./screenshot.png",

192+

});

159193

});

160194161195

it("detects [Image: source: ...] format from messaging systems", () => {