fix: patch auth flow (#180)
This commit is contained in:
@@ -54,14 +54,6 @@ export async function getClient() {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Auto-cache: if LETTA_API_KEY is set in env but not in settings, write it to settings
|
||||
// Note: LETTA_BASE_URL is intentionally NOT cached - it should only come from env vars
|
||||
if (process.env.LETTA_API_KEY && !settings.env?.LETTA_API_KEY) {
|
||||
const updatedEnv = { ...settings.env };
|
||||
updatedEnv.LETTA_API_KEY = process.env.LETTA_API_KEY;
|
||||
settingsManager.updateSettings({ env: updatedEnv });
|
||||
}
|
||||
|
||||
return new Letta({
|
||||
apiKey,
|
||||
baseURL,
|
||||
|
||||
Reference in New Issue
Block a user