MCPcopy Index your code
hub / github.com/codeaashu/claude-code / resolveTwoStageClassifier

Function resolveTwoStageClassifier

src/utils/permissions/yoloClassifier.ts:1353–1369  ·  view source on GitHub ↗

* Resolve the XML classifier setting: ant-only env var takes precedence, * then GrowthBook. Returns undefined when unset (caller decides default).

()

Source from the content-addressed store, hash-verified

1351 * then GrowthBook. Returns undefined when unset (caller decides default).
1352 */
1353function resolveTwoStageClassifier():
1354 | boolean
1355 | 'fast'
1356 | 'thinking'
1357 | undefined {
1358 if (process.env.USER_TYPE === 'ant') {
1359 const env = process.env.CLAUDE_CODE_TWO_STAGE_CLASSIFIER
1360 if (env === 'fast' || env === 'thinking') return env
1361 if (isEnvTruthy(env)) return true
1362 if (isEnvDefinedFalsy(env)) return false
1363 }
1364 const config = getFeatureValue_CACHED_MAY_BE_STALE(
1365 'tengu_auto_mode_config',
1366 {} as AutoModeConfig,
1367 )
1368 return config?.twoStageClassifier
1369}
1370
1371/**
1372 * Check if the XML classifier is enabled (any truthy value including 'fast'/'thinking').

Callers 2

getTwoStageModeFunction · 0.85

Calls 3

isEnvTruthyFunction · 0.85
isEnvDefinedFalsyFunction · 0.85

Tested by

no test coverage detected