Update agent/src/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
晨苒
2026-02-24 04:49:01 +08:00
committed by Ran
parent 0c6a905317
commit 8bbdb2b022
+1 -2
View File
@@ -24,9 +24,8 @@ function parseJwtExp(token: string): number | null {
}
}
let refreshPromise: Promise<string> | null = null
export const createAuthFetcher = (auth: AgentAuthContext): AuthFetcher => {
let refreshPromise: Promise<string> | null = null
return async (url: string, options?: RequestInit) => {
if (auth.bearer) {
const exp = parseJwtExp(auth.bearer)