MCPcopy Create free account
hub / github.com/SKaplanOfficial/Raycast-PromptLab / loadModels

Function loadModels

src/hooks/useModels.ts:12–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 const [error, setError] = useState<string>();
11
12 const loadModels = async () => {
13 // Get the model settings
14 setIsLoading(true);
15 const items = await LocalStorage.allItems();
16 const modelObjs = Object.entries(items)
17 .filter(([key]) => key.startsWith("--model-"))
18 .map(([, value]) => JSON.parse(value));
19 setModels(modelObjs);
20 setIsLoading(false);
21 };
22
23 useEffect(() => {
24 Promise.resolve(installDefaults()).then(() => {

Callers 2

useModelsFunction · 0.85
revalidateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected