MCPcopy Create free account
hub / github.com/NsLearning/LangHelper / modelCacheCmd

Function modelCacheCmd

ChatGPT/src/hooks/useChatModel.ts:45–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43 };
44
45 const modelCacheCmd = async () => {
46 // Generate the `chat.model.cmd.json` file and refresh the page for the slash command to take effect.
47 const list = await invoke('cmd_list');
48 await writeJSON(CHAT_MODEL_CMD_JSON, {
49 name: 'ChatGPT CMD',
50 last_updated: Date.now(),
51 data: list,
52 });
53 await invoke('window_reload', { label: 'core' });
54 await invoke('window_reload', { label: 'tray' });
55 };
56
57 return { modelCacheJson, modelCacheSet, modelCacheCmd };
58}

Callers 3

SyncCustomFunction · 0.85
handleSyncFunction · 0.85
modelCacheSetFunction · 0.85

Calls 2

writeJSONFunction · 0.90
invokeFunction · 0.85

Tested by

no test coverage detected