feat: modelfiles migration support

This commit is contained in:
Timothy J. Baek
2023-12-26 23:58:40 -08:00
parent fbb64406d8
commit 21c7f50790
5 changed files with 124 additions and 21 deletions
@@ -95,12 +95,6 @@ SYSTEM """${system}"""`.replace(/^\s*\n/gm, '');
};
const saveModelfile = async (modelfile) => {
// await modelfiles.set([
// ...$modelfiles.filter((m) => m.tagName !== modelfile.tagName),
// modelfile
// ]);
// localStorage.setItem('modelfiles', JSON.stringify($modelfiles));
await createNewModelfile(localStorage.token, modelfile);
await modelfiles.set(await getModelfiles(localStorage.token));
};