feat: add config for max-tree-depth (#21291)

This commit is contained in:
Good Wood
2025-06-23 13:55:57 +08:00
committed by GitHub
parent e56d7547f7
commit 43f5b21852
13 changed files with 105 additions and 124 deletions

View File

@@ -1,4 +1,4 @@
import { apiPrefix } from '@/config'
import { API_PREFIX } from '@/config'
import { fetchWithRetry } from '@/utils'
const LOCAL_STORAGE_KEY = 'is_other_tab_refreshing'
@@ -46,7 +46,7 @@ async function getNewAccessToken(timeout: number): Promise<void> {
// it can lead to an infinite loop if the refresh attempt also returns 401.
// To avoid this, handle token refresh separately in a dedicated function
// that does not call baseFetch and uses a single retry mechanism.
const [error, ret] = await fetchWithRetry(globalThis.fetch(`${apiPrefix}/refresh-token`, {
const [error, ret] = await fetchWithRetry(globalThis.fetch(`${API_PREFIX}/refresh-token`, {
method: 'POST',
headers: {
'Content-Type': 'application/json;utf-8',