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 52d4aee104
commit 4d1ca633ba
+1 -2
View File
@@ -27,9 +27,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)