(data: Record<string, any>[], newFile = '')
| 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. |
no test coverage detected