Generated pictures are JPEG bytes saved under a .png name
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 75/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Go
- Estrellas
- 115
- Forks
- 14
- Merge medio
- 9 h 35 min
- PR fusionados (30 d)
- 752
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Agent-Field/CodeAF
-
area:chat bug sev:papercut
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Agent-Field/CodeAF#1592 ·
Los mantenedores suelen responder en 1 día
-
area:headless bug sev:critical
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Agent-Field/CodeAF#1566 ·
Los mantenedores suelen responder en 1 día
-
tui3: slash command completion inserts bare command prefix into prompt instead of navigatingAbiertoarea:chat bug sev:critical
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Agent-Field/CodeAF#1548 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:chat feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Agent-Field/CodeAF#1510 ·
Los mantenedores suelen responder en 1 día
-
area:tests bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Agent-Field/CodeAF#1489 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Agent-Field/CodeAF
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
siderolabs/terraform-provider-talos#414 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
JuliaComputing/jh#63 · 1 comentario ·
-
area/proxy kind/bug priority/backlog triage/accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
Los mantenedores suelen responder en 1 día
-
Priority: Normal Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cloudflare/cloudflared#1747 ·