* 刷新应用缓存(当检测到应用文件夹变化时调用)
()
| 268 | * 刷新应用缓存(当检测到应用文件夹变化时调用) |
| 269 | */ |
| 270 | public async refreshAppsCache(): Promise<void> { |
| 271 | if (!this.isLocalAppSearchEnabled) { |
| 272 | console.log('[Commands] 本地应用搜索已关闭,跳过刷新缓存') |
| 273 | return |
| 274 | } |
| 275 | |
| 276 | console.log('[Commands] 开始刷新应用缓存...') |
| 277 | try { |
| 278 | await this.scanAndCacheApps() |
| 279 | this.invalidateCommandsCache(true) |
| 280 | console.log('[Commands] 应用缓存刷新成功') |
| 281 | } catch (error) { |
| 282 | console.error('[Commands] 刷新应用缓存失败:', error) |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | /** |
| 287 | * 纯启动编排:负责管理插件载入前的主窗口占位、自动分离、复用已分离窗口等逻辑 |
no test coverage detected