MCPcopy Index your code
hub / github.com/ZToolsCenter/ZTools / refreshAppsCache

Method refreshAppsCache

src/main/api/renderer/commands.ts:270–284  ·  view source on GitHub ↗

* 刷新应用缓存(当检测到应用文件夹变化时调用)

()

Source from the content-addressed store, hash-verified

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 * 纯启动编排:负责管理插件载入前的主窗口占位、自动分离、复用已分离窗口等逻辑

Callers 2

setupIPCMethod · 0.95
notifyChangeMethod · 0.80

Calls 2

scanAndCacheAppsMethod · 0.95

Tested by

no test coverage detected