实现windows下任务栏插件分离窗口独立图标#437
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for independent window icons and unique AppUserModelIDs for detached windows on Windows, which prevents taskbar window merging. The review feedback recommends using the standard fileURLToPath utility for more robust file path conversion and suggests sanitizing the plugin name used in the appId to ensure compatibility with Windows taskbar requirements.
| win.setAppDetails({ | ||
| appId: 'ZTools.' + pluginName | ||
| }) |
There was a problem hiding this comment.
The appId (AppUserModelID) on Windows is used for taskbar grouping and should ideally follow a specific format (e.g., CompanyName.ProductName). It should not contain spaces or special characters other than dots and hyphens. If pluginName contains spaces, it might lead to inconsistent behavior in the Windows taskbar. Sanitizing the string ensures robustness.
| win.setAppDetails({ | |
| appId: 'ZTools.' + pluginName | |
| }) | |
| win.setAppDetails({ | |
| appId: 'ZTools.' + pluginName.replace(/[^a-zA-Z0-9.-]/g, '') | |
| }) |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
实现了【feature #371 任务栏插件分离窗口独立图标】的windows部分
