MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isJetBrainsPluginInstalledMemoized

Function isJetBrainsPluginInstalledMemoized

src/utils/jetbrains.ts:153–169  ·  view source on GitHub ↗
(
  ideType: IdeType,
  forceRefresh = false,
)

Source from the content-addressed store, hash-verified

151const pluginInstalledPromiseCache = new Map<IdeType, Promise<boolean>>()
152
153async function isJetBrainsPluginInstalledMemoized(
154 ideType: IdeType,
155 forceRefresh = false,
156): Promise<boolean> {
157 if (!forceRefresh) {
158 const existing = pluginInstalledPromiseCache.get(ideType)
159 if (existing) {
160 return existing
161 }
162 }
163 const promise = isJetBrainsPluginInstalled(ideType).then(result => {
164 pluginInstalledCache.set(ideType, result)
165 return result
166 })
167 pluginInstalledPromiseCache.set(ideType, promise)
168 return promise
169}
170
171export async function isJetBrainsPluginInstalledCached(
172 ideType: IdeType,

Callers 1

Calls 3

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected