diff --git a/src/lib/promptToEdit.tsx b/src/lib/promptToEdit.tsx index 428bd5162..a2c314853 100644 --- a/src/lib/promptToEdit.tsx +++ b/src/lib/promptToEdit.tsx @@ -336,14 +336,6 @@ export async function doPromptEdit({ const toastId = toast.loading('Submitting to Text-to-CAD API...') let submitResult - - // work around for @kittycad/lib not really being built for the browser - ;(window as any).process = { - env: { - ZOO_API_TOKEN: token, - ZOO_HOST: withAPIBaseURL(''), - }, - } try { submitResult = await submitPromptToEditToQueue({ prompt, diff --git a/src/machines/authMachine.ts b/src/machines/authMachine.ts index 881e19565..f81042c5c 100644 --- a/src/machines/authMachine.ts +++ b/src/machines/authMachine.ts @@ -216,9 +216,9 @@ async function getAndSyncStoredToken(input: { ['api token', !!VITE_KITTYCAD_API_TOKEN], ]) if (token) { - // has just logged in, update storage - localStorage.setItem(TOKEN_PERSIST_KEY, token) if (isDesktop()) { + // has just logged in, update storage + localStorage.setItem(TOKEN_PERSIST_KEY, token) await writeTokenFile(token) } return token