render-html.py and generate.py print emoji. With stdout or stderr on a cp1252 pipe or file (Windows without PYTHONUTF8) they raise UnicodeEncodeError. Reconfigure both streams to UTF-8, mirror the change into cli/assets via sync-assets, and add a regression test.
The logo and CIP scripts wrote whatever image Gemini returned under a
.png name. Nano Banana Pro returns JPEG, so --pro produced JPEG files
named .png. Both now take the extension from inline_data.mime_type, and
logo prints the path it actually wrote. Nothing is re-encoded.
The logo, CIP and icon scripts printed an error and exited 0 when a
request failed. They now exit 1 when nothing was generated: a failed
single request, or a batch, set or size set where every item failed. A
partial batch exits 0, since its summary already reports n/m.
--pro used gemini-3-pro-image-preview, which is past its listed
shutdown date. It now uses gemini-3-pro-image, and the model ids can be
overridden with GEMINI_FLASH_IMAGE_MODEL and GEMINI_PRO_IMAGE_MODEL.
Fixes#529
Co-authored-by: Jul11us <233702296+Jul11us@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(design): keep icon generator from corrupting SVGs or truncating output
apply_viewbox_size rewrote every width/height attribute in the document,
including stroke-width and child elements, and only handled double quotes.
Restrict it to the root <svg> tag and set width and height independently.
generate_icon capped output at 4096 tokens, which truncates detailed icons.
Raise it to 16384 and report finish_reason MAX_TOKENS separately from
empty or malformed output.
Fixes#525
* fix(design): apply the response guard and MAX_TOKENS diagnosis to icon batch
generate_batch still indexed candidates[0].content.parts unguarded and
printed a bare "No valid SVGs generated." Share the response-text
extraction and the no-SVG diagnosis with generate_icon, treat text=None
as an empty response, and warn when a batch is cut off at MAX_TOKENS
after returning fewer icons than requested.
Refs #525
* fix(design): match only real root attributes when sizing icon SVGs
_set_root_attr searched the root tag with a regex, so width= or height=
text inside another quoted attribute value (aria-label="height='2'") was
rewritten and the output stopped being valid XML. Walk the tag's
attributes instead, consuming each quoted value whole, and only replace
an attribute whose name is exactly width or height.
Refs #525