mirror of
https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git
synced 2026-11-19 09:00:32 +00:00
* 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