feat: add handling for when failed to refresh access token (#168)

Co-authored-by: Charles Packer <packercharles@gmail.com>
This commit is contained in:
Shelley Pham
2025-12-10 14:19:08 -08:00
committed by GitHub
parent ed5c6d71b7
commit 6db2fcfc05
5 changed files with 38 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ import { Box, Text, useInput } from "ink";
import SpinnerLib from "ink-spinner";
import type { ComponentType } from "react";
import { useEffect, useRef, useState } from "react";
import { LETTA_CLOUD_API_URL } from "../../auth/oauth";
import type { PermissionMode } from "../../permissions/mode";
import { permissionMode } from "../../permissions/mode";
import { settingsManager } from "../../settings-manager";
@@ -113,7 +114,7 @@ export function Input({
const serverUrl =
process.env.LETTA_BASE_URL ||
settings.env?.LETTA_BASE_URL ||
"https://api.letta.com";
LETTA_CLOUD_API_URL;
// Handle escape key for interrupt (when streaming) or double-escape-to-clear (when not)
useInput((_input, key) => {