feat: chat presets (experimental)

This commit is contained in:
josc146
2023-06-25 00:07:14 +08:00
parent 08cf09416a
commit db67f30082
15 changed files with 987 additions and 212 deletions

View File

@@ -206,6 +206,10 @@ export const saveCache = async () => {
return SaveJson('cache.json', data);
};
export const savePresets = async () => {
return SaveJson('presets.json', commonStore.presets);
};
export function getUserLanguage(): Language {
// const l = navigator.language.toLowerCase();
// if (['zh-hk', 'zh-mo', 'zh-tw', 'zh-cht', 'zh-hant'].includes(l)) return 'zhHant'