MCPcopy Create free account
hub / github.com/CodeFox-Repo/codefox / getCachedModels

Function getCachedModels

frontend/src/hooks/useModels.ts:32–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 };
31
32 const getCachedModels = (): string[] => {
33 try {
34 const cachedData = sessionStorage.getItem(LocalStore.models);
35 if (!cachedData) return [];
36 const { models } = JSON.parse(cachedData) as ModelsCache;
37 return models;
38 } catch {
39 return [];
40 }
41 };
42
43 const updateCache = (models: string[]) => {
44 const cacheData: ModelsCache = {

Callers 1

useModelsFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected