mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 16:25:51 +00:00
fix: 修复 main 文件及 "production" 的问题
This commit is contained in:
@@ -68,8 +68,8 @@ export function AutoUpdater({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
"production" === 'test' ||
|
process.env.NODE_ENV === 'test' ||
|
||||||
"production" === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
) {
|
) {
|
||||||
logForDebugging(
|
logForDebugging(
|
||||||
'AutoUpdater: Skipping update check in test/dev environment',
|
'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
|
// Show DevBar for dev builds or all ants
|
||||||
function shouldShowDevBar(): boolean {
|
function shouldShowDevBar(): boolean {
|
||||||
return (
|
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 (
|
if (
|
||||||
"production" === 'test' ||
|
process.env.NODE_ENV === 'test' ||
|
||||||
"production" === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
) {
|
) {
|
||||||
logForDebugging(
|
logForDebugging(
|
||||||
'NativeAutoUpdater: Skipping update check in test/dev environment',
|
'NativeAutoUpdater: Skipping update check in test/dev environment',
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ export function PackageManagerAutoUpdater({ verbose }: Props): React.ReactNode {
|
|||||||
|
|
||||||
const checkForUpdates = React.useCallback(async () => {
|
const checkForUpdates = React.useCallback(async () => {
|
||||||
if (
|
if (
|
||||||
"production" === 'test' ||
|
process.env.NODE_ENV === 'test' ||
|
||||||
"production" === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
) {
|
) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -623,7 +623,7 @@ export function useTypeahead({
|
|||||||
// subsequent tests in the shard. The subscriber still registers so
|
// subsequent tests in the shard. The subscriber still registers so
|
||||||
// fileSuggestions tests that trigger a refresh directly work correctly.
|
// fileSuggestions tests that trigger a refresh directly work correctly.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if ("production" !== 'test') {
|
if (process.env.NODE_ENV !== 'test') {
|
||||||
startBackgroundCacheRefresh()
|
startBackgroundCacheRefresh()
|
||||||
}
|
}
|
||||||
return onIndexBuildComplete(() => {
|
return onIndexBuildComplete(() => {
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export async function showSetupScreens(
|
|||||||
devChannels?: ChannelEntry[],
|
devChannels?: ChannelEntry[],
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
if (
|
if (
|
||||||
"production" === 'test' ||
|
process.env.NODE_ENV === 'test' ||
|
||||||
isEnvTruthy(false) ||
|
isEnvTruthy(false) ||
|
||||||
process.env.IS_DEMO // Skip onboarding in demo mode
|
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'
|
return 'TestingPermission'
|
||||||
},
|
},
|
||||||
isEnabled() {
|
isEnabled() {
|
||||||
return "production" === 'test'
|
return process.env.NODE_ENV === 'test'
|
||||||
},
|
},
|
||||||
isConcurrencySafe() {
|
isConcurrencySafe() {
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user