refactor: 抽取命令上下文匹配公共逻辑#546
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors and consolidates command context matching logic (for regex, over, files, and window commands) into a new shared utility file src/shared/commandContextShared.ts, updating both the main API manager and the renderer's command data store to use these standardized functions. It also adds a comprehensive test suite for the shared matching utilities. The review feedback highlights two critical compatibility issues where refactoring to parseMatchPattern without enabling allowPlainString breaks window title matching for plain string patterns that do not use the standard /pattern/flags format.
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.
复用已有的cmd匹配逻辑,解决部分插件在全局快捷键开启自动复制时,错误匹配到低优先级的指令问题