mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 14:25:51 +00:00
feat: 开放 auto mode 和 bypass mode 给所有用户
通过 Shift+Tab 统一循环:default → acceptEdits → plan → auto → bypassPermissions → default - 移除 USER_TYPE 分支判断,所有用户使用同一循环路径 - isBypassPermissionsModeAvailable 始终为 true - isAutoModeAvailable 初始化直接为 true - 移除 AutoModeOptInDialog 确认流程 - 简化 isAutoModeGateEnabled 仅保留快模式熔断器 - 简化 verifyAutoModeGateAccess 仅检查快模式 - 移除 GrowthBook/Statsig 远程门控 - bypass permissions killswitch 改为 no-op - 新增 24 个测试覆盖循环逻辑和门控不变量 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,6 @@ import type { PermissionMode } from './utils/permissions/PermissionMode.js'
|
||||
import { getBaseRenderOptions } from './utils/renderOptions.js'
|
||||
import { getSettingsWithAllErrors } from './utils/settings/allErrors.js'
|
||||
import {
|
||||
hasAutoModeOptIn,
|
||||
hasSkipDangerousModePermissionPrompt,
|
||||
} from './utils/settings/settings.js'
|
||||
|
||||
@@ -309,25 +308,6 @@ export async function showSetupScreens(
|
||||
))
|
||||
}
|
||||
|
||||
if (feature('TRANSCRIPT_CLASSIFIER')) {
|
||||
// Only show the opt-in dialog if auto mode actually resolved — if the
|
||||
// gate denied it (org not allowlisted, settings disabled), showing
|
||||
// consent for an unavailable feature is pointless. The
|
||||
// verifyAutoModeGateAccess notification will explain why instead.
|
||||
if (permissionMode === 'auto' && !hasAutoModeOptIn()) {
|
||||
const { AutoModeOptInDialog } = await import(
|
||||
'./components/AutoModeOptInDialog.js'
|
||||
)
|
||||
await showSetupDialog(root, done => (
|
||||
<AutoModeOptInDialog
|
||||
onAccept={done}
|
||||
onDecline={() => gracefulShutdownSync(1)}
|
||||
declineExits
|
||||
/>
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
// --dangerously-load-development-channels confirmation. On accept, append
|
||||
// dev channels to any --channels list already set in main.tsx. Org policy
|
||||
// is NOT bypassed — gateChannelServer() still runs; this flag only exists
|
||||
|
||||
Reference in New Issue
Block a user