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

Method invalidateCommandsCache

src/main/api/renderer/commands.ts:71–79  ·  view source on GitHub ↗
(notifyRenderer = false)

Source from the content-addressed store, hash-verified

69 }
70
71 public invalidateCommandsCache(notifyRenderer = false): void {
72 this.cachedCommandsResult = null
73 console.log('[Commands] 指令缓存已清空:', { notifyRenderer })
74
75 if (notifyRenderer) {
76 console.log('[Commands] 发送 apps-changed 通知,触发主窗口重载指令与 alias 搜索索引')
77 this.notifyRenderer('apps-changed')
78 }
79 }
80
81 /**
82 * 根据名称查找直接启动指令(系统应用、系统设置等)

Callers 2

setLocalAppSearchMethod · 0.95
refreshAppsCacheMethod · 0.95

Calls 1

notifyRendererMethod · 0.95

Tested by

no test coverage detected