Repository navigation
fix: read local image paths starting with http - #302
Open
Ricardo-M-L wants to merge 1 commit into
Open
Ricardo-M-L wants to merge 1 commit into
Ricardo-M-L wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.