MCPcopy Index your code
hub / github.com/NsLearning/LangHelper / modelCacheSet

Function modelCacheSet

ChatGPT/src/hooks/useChatModel.ts:39–43  ·  view source on GitHub ↗
(data: Record<string, any>[], newFile = '')

Source from the content-addressed store, hash-verified

37 }, [file]);
38
39 const modelCacheSet = async (data: Record<string, any>[], newFile = '') => {
40 await writeJSON(newFile ? newFile : file, data, { isRoot: true });
41 setModelCacheJson(data);
42 await modelCacheCmd();
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.

Callers 8

SyncRecordFunction · 0.85
handleEnableFunction · 0.85
handleSyncFunction · 0.85
UserCustomFunction · 0.85
handleEnableFunction · 0.85
handleOkFunction · 0.85
SyncPromptsFunction · 0.85
handleEnableFunction · 0.85

Calls 2

writeJSONFunction · 0.90
modelCacheCmdFunction · 0.85

Tested by

no test coverage detected