* Resolve the XML classifier setting: ant-only env var takes precedence, * then GrowthBook. Returns undefined when unset (caller decides default).
()
| 1351 | * then GrowthBook. Returns undefined when unset (caller decides default). |
| 1352 | */ |
| 1353 | function 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'). |
no test coverage detected