mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
fix: 修复 main 文件及 "production" 的问题
This commit is contained in:
@@ -68,8 +68,8 @@ export function AutoUpdater({
|
||||
}
|
||||
|
||||
if (
|
||||
"production" === 'test' ||
|
||||
"production" === 'development'
|
||||
process.env.NODE_ENV === 'test' ||
|
||||
process.env.NODE_ENV === 'development'
|
||||
) {
|
||||
logForDebugging(
|
||||
'AutoUpdater: Skipping update check in test/dev environment',
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Text, useInterval } from '../ink.js'
|
||||
// Show DevBar for dev builds or all ants
|
||||
function shouldShowDevBar(): boolean {
|
||||
return (
|
||||
"production" === 'development' || process.env.USER_TYPE === 'ant'
|
||||
process.env.NODE_ENV === 'development' || process.env.USER_TYPE === 'ant'
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -83,8 +83,8 @@ export function NativeAutoUpdater({
|
||||
}
|
||||
|
||||
if (
|
||||
"production" === 'test' ||
|
||||
"production" === 'development'
|
||||
process.env.NODE_ENV === 'test' ||
|
||||
process.env.NODE_ENV === 'development'
|
||||
) {
|
||||
logForDebugging(
|
||||
'NativeAutoUpdater: Skipping update check in test/dev environment',
|
||||
|
||||
@@ -33,8 +33,8 @@ export function PackageManagerAutoUpdater({ verbose }: Props): React.ReactNode {
|
||||
|
||||
const checkForUpdates = React.useCallback(async () => {
|
||||
if (
|
||||
"production" === 'test' ||
|
||||
"production" === 'development'
|
||||
process.env.NODE_ENV === 'test' ||
|
||||
process.env.NODE_ENV === 'development'
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -623,7 +623,7 @@ export function useTypeahead({
|
||||
// subsequent tests in the shard. The subscriber still registers so
|
||||
// fileSuggestions tests that trigger a refresh directly work correctly.
|
||||
useEffect(() => {
|
||||
if ("production" !== 'test') {
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
startBackgroundCacheRefresh()
|
||||
}
|
||||
return onIndexBuildComplete(() => {
|
||||
|
||||
@@ -153,7 +153,7 @@ export async function showSetupScreens(
|
||||
devChannels?: ChannelEntry[],
|
||||
): Promise<boolean> {
|
||||
if (
|
||||
"production" === 'test' ||
|
||||
process.env.NODE_ENV === 'test' ||
|
||||
isEnvTruthy(false) ||
|
||||
process.env.IS_DEMO // Skip onboarding in demo mode
|
||||
) {
|
||||
|
||||
13083
src/main.tsx
13083
src/main.tsx
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,7 @@ export const TestingPermissionTool: Tool<InputSchema, string> = buildTool({
|
||||
return 'TestingPermission'
|
||||
},
|
||||
isEnabled() {
|
||||
return "production" === 'test'
|
||||
return process.env.NODE_ENV === 'test'
|
||||
},
|
||||
isConcurrencySafe() {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user