Repository navigation
fix: read local image paths starting with http - #302
Ricardo-M-L wants to merge 1 commit into
Conversation
|
Could a maintainer review this local-image-path fix? A real local PNG under I reran the image command, video command and media utility suites today: all 33 tests pass, including real temporary image files and remote-URL controls. The official Related fixes, grouped here rather than posting more pings:
Both are mergeable and their official |
|
Grouping a single review follow-up for #300 ( I revalidated the unchanged heads today:
Typecheck passes in each tree; lint exits successfully with the same existing Could a maintainer review these focused fixes, or let me know the specific next requirement? AI-assisted validation; this is not a claim of maintainer approval. |
Problem
Image inputs are classified as remote URLs with
startsWith('http')in bothresolveImageInputandimage generate --subject-ref. As a result, ordinary relative paths such ashttp-assets/frame.pngorhttps-images/reference.pngare forwarded as URL strings instead of reading the local file.This affects, for example:
Given an existing PNG at that path, the first command currently emits an
image_urlpointing at a local relative path; the second places that relative path in its first-frame URL. Neither payload contains the image bytes.Changes
http://orhttps://prefix, consistent with the existingtoDataUriand media helpers.http-prefixed inputs use the existing local-file conversion and validation.data:andmm_file://handling inresolveImageInputunchanged.Validation
38aba5f: 3 failed, 25 passed; all three failures are the local-path regressions.bun test test/commands/image/generate.test.ts test/commands/video/generate.test.ts test/utils/media.test.ts: 33 passed.bun run typecheck: passed.bun run build: passed.git diff --check: passed.bun run lint: no errors; one pre-existingno-explicit-anywarning attest/sdk/speech.test.ts:117.bun test: 618 passed, 1 failed. The same failure reproduces in an untouched worktree at38aba5f(613 passed, 1 failed):Zed configuration > writes a fresh config with the selected model and honors XDG_CONFIG_HOMEattest/agent/zed.test.ts:68on macOS. It expects the XDG directory but receives$HOME/.config/zed/settings.json. No Zed code or test is changed here.AI-assisted implementation and tests. Two independent agent reviewers reviewed the complete diff separately, reran the focused tests, and reported no blocking findings, following the repository's blind-review instructions.
Need help on this PR? Tag
@codesmith-botwith what you need.