f80181199b
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
18 lines
518 B
TypeScript
18 lines
518 B
TypeScript
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>()
|
|
}
|