Feature/windows screenshot feature improve#11
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the Windows region screenshot feature by moving its implementation out of src/binding_windows.cpp and introducing an automated SVG-to-C header generation script (scripts/gen-icons.js) to compile toolbar icons directly into the binary. It also adds several SVG assets and the nanosvgrast.h third-party library for SVG rasterization. Feedback on the changes points out that the toCLiteral function in scripts/gen-icons.js is defined but never used, suggesting its removal to clean up dead code.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| // C 字符串字面量转义:处理 " \ 和换行 | ||
| function toCLiteral(str) { | ||
| // 把字符串按行拆开,每行用独立字面量拼接,保证可读性且避免超长行 | ||
| return str | ||
| .replace(/\\/g, '\\\\') | ||
| .replace(/"/g, '\\"') | ||
| .split(/\r?\n/) | ||
| .map((line) => ` "${line}"`) | ||
| .join('\n'); | ||
| } |
Windows 平台截图预处理工具栏 — 实现了完整的截图后编辑功能,支持: