store model and use to calculate completion costs

This commit is contained in:
Kyle Corbitt
2023-07-14 11:06:07 -07:00
parent 0371dacfca
commit a5378b106b
14 changed files with 67 additions and 73 deletions

View File

@@ -14,6 +14,9 @@ export type SharedVariantEditorSlice = {
export const createVariantEditorSlice: SliceCreator<SharedVariantEditorSlice> = (set, get) => ({
monaco: loader.__getMonacoInstance(),
loadMonaco: async () => {
// We only want to run this client-side
if (typeof window === "undefined") return;
const monaco = await loader.init();
monaco.editor.defineTheme("customTheme", {