MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / getCacheDirectoryPathSync

Function getCacheDirectoryPathSync

src/api/providers/fetchers/modelCache.ts:494–506  ·  view source on GitHub ↗

* Synchronous version of getCacheDirectoryPath for use in getModelsFromCache. * Returns the cache directory path without async operations.

()

Source from the content-addressed store, hash-verified

492 * Returns the cache directory path without async operations.
493 */
494function getCacheDirectoryPathSync(): string | undefined {
495 try {
496 const globalStoragePath = ContextProxy.instance?.globalStorageUri?.fsPath
497 if (!globalStoragePath) {
498 return undefined
499 }
500 const cachePath = path.join(globalStoragePath, "cache")
501 return cachePath
502 } catch (error) {
503 console.error(`[MODEL_CACHE] Error getting cache directory path:`, error)
504 return undefined
505 }
506}

Callers 1

getModelsFromCacheFunction · 0.85

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected