chore: 移除多处仅内部使用的 export 关键字

下列符号均仅在本文件内被引用,export 关键字冗余;保留符号本体不动:

- internalLogging.ts: getContainerId(line 88 内部调用)
- api/errors.ts: isMediaSizeError(line 151 内部调用)
- api/withRetry.ts: parseMaxTokensContextOverflowError(line 389/724 内部调用)
- statsCache.ts: STATS_CACHE_VERSION(7 处内部使用)
- startupProfiler.ts: logStartupPerf(line 128 内部调用)
- bashCommandHelpers.ts: CommandIdentityCheckers(3 处内部参数类型)

Co-Authored-By: glm-5.2 <zai-org@claude-code-best.win>
This commit is contained in:
claude-code-best
2026-06-20 10:22:06 +08:00
parent 4aa15160e4
commit 03d399cd5f
6 changed files with 6 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ import { createPermissionRequestMessage } from 'src/utils/permissions/permission
import { BashTool } from './BashTool.js'
import { bashCommandIsSafeAsync_DEPRECATED } from './bashSecurity.js'
export type CommandIdentityCheckers = {
type CommandIdentityCheckers = {
isNormalizedCdCommand: (command: string) => boolean
isNormalizedGitCommand: (command: string) => boolean
}

View File

@@ -130,7 +130,7 @@ export function getPromptTooLongTokenGap(
* wording drift causes graceful degradation (errorDetails stays undefined,
* caller short-circuits), not a false negative.
*/
export function isMediaSizeError(raw: string): boolean {
function isMediaSizeError(raw: string): boolean {
return (
(raw.includes('image exceeds') && raw.includes('maximum')) ||
(raw.includes('image dimensions exceed') && raw.includes('many-image')) ||

View File

@@ -544,7 +544,7 @@ export function getRetryDelay(
return baseDelay + jitter
}
export function parseMaxTokensContextOverflowError(error: APIError):
function parseMaxTokensContextOverflowError(error: APIError):
| {
inputTokens: number
maxTokens: number

View File

@@ -32,7 +32,7 @@ const getKubernetesNamespace = memoize(async (): Promise<string | null> => {
/**
* Get the OCI container ID from within a running container
*/
export const getContainerId = memoize(async (): Promise<string | null> => {
const getContainerId = memoize(async (): Promise<string | null> => {
if (process.env.USER_TYPE !== 'ant') {
return null
}

View File

@@ -163,7 +163,7 @@ export function getStartupPerfLogPath(): string {
* Log startup performance phases to Statsig.
* Only logs if this session was sampled at startup.
*/
export function logStartupPerf(): void {
function logStartupPerf(): void {
// Only log if we were sampled (decision made at module load)
if (!STATSIG_LOGGING_SAMPLED) return

View File

@@ -11,7 +11,7 @@ import { logError } from './log.js'
import { jsonParse, jsonStringify } from './slowOperations.js'
import type { DailyActivity, DailyModelTokens, SessionStats } from './stats.js'
export const STATS_CACHE_VERSION = 3
const STATS_CACHE_VERSION = 3
const MIN_MIGRATABLE_VERSION = 1
const STATS_CACHE_FILENAME = 'stats-cache.json'