fix: prevent revert when deleting all script in script editor.#563
fix: prevent revert when deleting all script in script editor.#563MakinoharaShoko merged 1 commit intoOpenWebGAL:devfrom
Conversation
persist empty content to prevent revert when deleting all script.
Summary of ChangesHello @fltLi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在解决脚本编辑器中一个关键的可用性问题。在之前的实现中,当用户清空脚本编辑器中的所有内容时,系统会错误地将空字符串判断为无效输入,从而导致编辑器的内容被意外地回滚到之前的状态。本次更改通过引入对空字符串的明确处理,确保了用户能够成功保存一个空的脚本文件,从而提升了编辑器的稳定性和用户体验。 Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request addresses a bug where deleting all script content in the editor was not recognized as a valid change, leading to unintended reverts. The fix correctly handles empty string values, ensuring that such changes are persisted. The change is minimal and directly targets the reported issue, improving the editor's robustness.
fix: #562
原来的代码把空字符串误判为无效更改, 此处增加对空字符串的特判, 使其生效.