mirror of
https://github.com/penpot/penpot.git
synced 2026-10-28 21:40:34 +00:00
* 🐛 Log errors readably in MCP execute_code console output The console captured during execute_code rendered every object argument with JSON.stringify. An Error has no enumerable fields, so logging a caught error printed "{}" and the agent lost the message. A circular object or a BigInt made JSON.stringify throw, so a console.log call aborted the executed code with an unrelated serialization error. Format console arguments in a small pure module: errors by their string form (name and message), other objects as indented JSON, falling back to the string form when JSON cannot serialize the value. AI-assisted-by: claude-opus-5.5 Signed-off-by: breken-ai <312387581+breken-ai@users.noreply.github.com> * ♻️ Keep console formatting within ExecuteCodeTaskConsole --------- Signed-off-by: breken-ai <312387581+breken-ai@users.noreply.github.com> Co-authored-by: breken-ai <312387581+breken-ai@users.noreply.github.com>