(response: ListCursorModelsResponse)
| 227 | } |
| 228 | |
| 229 | async function applyInMemoryCache(response: ListCursorModelsResponse): Promise<ListCursorModelsResponse> { |
| 230 | const enriched = await enrichCursorModelsWithCliSkus(response); |
| 231 | if ((enriched.availableModels?.length ?? 0) > 0) { |
| 232 | cache.expiresAt = Date.now() + CACHE_TTL_MS; |
| 233 | cache.response = enriched; |
| 234 | writeSharedCursorModelsCache(enriched); |
| 235 | } |
| 236 | return enriched; |
| 237 | } |
| 238 | |
| 239 | /** ACP session snapshot (Zed-style); falls back to seeded / on-disk cache from the last live session. */ |
| 240 | async function listCursorModelsWhileAcpActive(): Promise<ListCursorModelsResponse> { |
no test coverage detected