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

推荐订阅源

The GitHub Blog
The GitHub Blog
M
MIT News - Artificial intelligence
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG
博客园 - 叶小钗
Jina AI
Jina AI
Last Week in AI
Last Week in AI
The Cloudflare Blog
博客园 - 【当耐特】
Stack Overflow Blog
Stack Overflow Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学
博客园_首页
I
InfoQ
G
Google Developers Blog
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
H
Help Net Security
U
Unit 42
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
IT之家
IT之家
Microsoft Security Blog
Microsoft Security 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
fix(cli): normalize heic model-run files · openclaw/openc...
steipete · 2026-05-07 · via Recent Commits to openclaw:main

@@ -130,6 +130,7 @@ const mocks = vi.hoisted(() => ({

130130

]),

131131

registerBuiltInMemoryEmbeddingProviders: vi.fn(),

132132

buildMediaUnderstandingRegistry: vi.fn(() => new Map()),

133+

convertHeicToJpeg: vi.fn(async () => Buffer.from("jpeg-normalized")),

133134

isWebSearchProviderConfigured: vi.fn(() => false),

134135

isWebFetchProviderConfigured: vi.fn(() => false),

135136

modelsStatusCommand: vi.fn(

@@ -221,6 +222,15 @@ vi.mock("../media-understanding/provider-registry.js", () => ({

221222

mocks.buildMediaUnderstandingRegistry as typeof import("../media-understanding/provider-registry.js").buildMediaUnderstandingRegistry,

222223

}));

223224225+

vi.mock("../media/image-ops.js", async (importOriginal) => {

226+

const actual = await importOriginal<typeof import("../media/image-ops.js")>();

227+

return {

228+

...actual,

229+

convertHeicToJpeg:

230+

mocks.convertHeicToJpeg as typeof import("../media/image-ops.js").convertHeicToJpeg,

231+

};

232+

});

233+224234

vi.mock("../plugins/memory-embedding-providers.js", () => ({

225235

listMemoryEmbeddingProviders:

226236

mocks.listMemoryEmbeddingProviders as unknown as typeof import("../plugins/memory-embedding-providers.js").listMemoryEmbeddingProviders,

@@ -333,6 +343,7 @@ describe("capability cli", () => {

333343

mocks.setTtsProvider.mockClear();

334344

mocks.resolveExplicitTtsOverrides.mockClear();

335345

mocks.buildMediaUnderstandingRegistry.mockReset().mockReturnValue(new Map());

346+

mocks.convertHeicToJpeg.mockClear();

336347

mocks.createEmbeddingProvider.mockClear();

337348

mocks.registerMemoryEmbeddingProvider.mockClear();

338349

mocks.registerBuiltInMemoryEmbeddingProviders.mockClear();

@@ -561,6 +572,56 @@ describe("capability cli", () => {

561572

);

562573

});

563574575+

it("normalizes HEIC files to JPEG before local model probes", async () => {

576+

const tempInput = path.join(os.tmpdir(), `openclaw-model-run-image-${Date.now()}.heic`);

577+

await fs.writeFile(tempInput, Buffer.from("heic-like"));

578+579+

await runRegisteredCli({

580+

register: registerCapabilityCli as (program: Command) => void,

581+

argv: [

582+

"capability",

583+

"model",

584+

"run",

585+

"--prompt",

586+

"describe this",

587+

"--file",

588+

tempInput,

589+

"--json",

590+

],

591+

});

592+593+

expect(mocks.convertHeicToJpeg).toHaveBeenCalledWith(Buffer.from("heic-like"));

594+

expect(mocks.completeWithPreparedSimpleCompletionModel).toHaveBeenCalledWith(

595+

expect.objectContaining({

596+

context: expect.objectContaining({

597+

messages: [

598+

expect.objectContaining({

599+

role: "user",

600+

content: [

601+

{ type: "text", text: "describe this" },

602+

{

603+

type: "image",

604+

data: Buffer.from("jpeg-normalized").toString("base64"),

605+

mimeType: "image/jpeg",

606+

},

607+

],

608+

}),

609+

],

610+

}),

611+

}),

612+

);

613+

expect(mocks.runtime.writeJson).toHaveBeenCalledWith(

614+

expect.objectContaining({

615+

inputs: [

616+

expect.objectContaining({

617+

path: tempInput,

618+

mimeType: "image/jpeg",

619+

}),

620+

],

621+

}),

622+

);

623+

});

624+564625

it("rejects non-image files for model probes", async () => {

565626

const tempInput = path.join(os.tmpdir(), `openclaw-model-run-audio-${Date.now()}.mp3`);

566627

await fs.writeFile(tempInput, Buffer.from("not really audio"));