Generated pictures are JPEG bytes saved under a .png name
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
Start with internal/provider/media.go:156-169 and internal/session/tools_media.go to trace how generated bytes are written for both the codeaf image command and generate_image. Reproduce the issue with the supplied isolated-profile command and inspect the output with file. Done when the output is PNG data for a .png path, or is saved as .jpg with that choice reported to the user.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Seen on: dev 837b2b0.
Behaviour
codeaf image … --out media/plane.png and the chat's generate_image with path media/banner.png both wrote JPEG data (file: JPEG image data, 2048x2048 and 2048x1152). The agent noticed and re-encoded on its own. A file should match its extension: convert, or save under .jpg and say so.
Replication
- Build dev 837b2b0 (
git checkout 837b2b0 && make build, binarybin/codeaf), or install the dev build withcurl -fsSL https://agentfield.ai/get/devaf | bash. - Use an isolated profile:
export HOME=$(mktemp -d), exportOPENROUTER_API_KEY, and keep the default model (~deepseek/deepseek-v4-flash-latest, crew on auto). - On a busy machine set
task.max_loadto0(/settings, Tasks) so the busy-machine gate does not hold tasks. cd $(mktemp -d) && mkdir media && codeaf image "a paper plane on a desk" --out media/plane.png.file media/plane.png.
Evidence
file media/plane.png→JPEG image data, … 2048x2048.internal/provider/media.go:156-169andinternal/session/tools_media.go: the returned bytes are written under the requested name without a type check.
Guessed cause
A guess from reading the code, not a confirmed diagnosis. The provider returns JPEG despite the PNG request, and the bytes are saved under the asked name without checking the type.
Acceptance
- e2e: after the command above,
file media/plane.pngreports PNG image data (or the file is saved asplane.jpgand the command says so).
Found while writing the public docs; manual text differences are in #1545.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Go
- Star
- 115
- Fork
- 14
- Merge trung bình
- 9 giờ 35 phút
- Pull request đã merge (30 ngày)
- 752
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Agent-Field/CodeAF
-
area:chat bug sev:papercut
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Agent-Field/CodeAF#1592 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:headless bug sev:critical
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Agent-Field/CodeAF#1566 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tui3: slash command completion inserts bare command prefix into prompt instead of navigatingĐang mởarea:chat bug sev:critical
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Agent-Field/CodeAF#1548 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:chat feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Agent-Field/CodeAF#1510 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:tests bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Agent-Field/CodeAF#1489 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Agent-Field/CodeAF
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
siderolabs/terraform-provider-talos#414 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
JuliaComputing/jh#63 · 1 bình luận ·
-
area/proxy kind/bug priority/backlog triage/accepted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Priority: Normal Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cloudflare/cloudflared#1747 ·