fix(shared): add vision-capable model cache store

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-03-08 02:20:25 +09:00
parent 4eb8a2fa15
commit f80181199b

View File

@@ -0,0 +1,17 @@
import type { VisionCapableModel } from "../plugin-state"
let visionCapableModelsCache = new Map<string, VisionCapableModel>()
export function setVisionCapableModelsCache(
cache: Map<string, VisionCapableModel>,
): void {
visionCapableModelsCache = cache
}
export function readVisionCapableModelsCache(): VisionCapableModel[] {
return Array.from(visionCapableModelsCache.values())
}
export function clearVisionCapableModelsCache(): void {
visionCapableModelsCache = new Map<string, VisionCapableModel>()
}