()
| 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 | } |
no test coverage detected