(cacheKey: string)
| 166 | } |
| 167 | |
| 168 | async function readModels(cacheKey: string): Promise<ModelRecord | undefined> { |
| 169 | const filename = `${cacheKeyToFilename(cacheKey)}_models.json` |
| 170 | const cacheDir = await getCacheDirectoryPath(ContextProxy.instance.globalStorageUri.fsPath) |
| 171 | const filePath = path.join(cacheDir, filename) |
| 172 | const exists = await fileExistsAtPath(filePath) |
| 173 | return exists ? JSON.parse(await fs.readFile(filePath, "utf8")) : undefined |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * Fetch models from the provider API. |
nothing calls this directly
no test coverage detected