fix(coding-agent): enforce safe auto-resized image limits closes #2055

This commit is contained in:
Mario Zechner
2026-03-22 21:48:34 +01:00
parent f1fe49a641
commit a78882d8b8
6 changed files with 161 additions and 139 deletions

View File

@@ -57,6 +57,10 @@ export async function processFileArguments(fileArgs: string[], options?: Process
if (autoResizeImages) {
const resized = await resizeImage({ type: "image", data: base64Content, mimeType });
if (!resized) {
text += `<file name="${absolutePath}">[Image omitted: could not be resized below the inline image size limit.]</file>\n`;
continue;
}
dimensionNote = formatDimensionNote(resized);
attachment = {
type: "image",