ai_agent/utils/immediate_command.rs
1//! Immediate command execution utilities
2//!
3//! Whether inference-config commands (/model, /fast, /effort) should execute
4//! immediately (during a running query) rather than waiting for the current
5//! turn to finish.
6
7use crate::constants::env::ai;
8
9/// Whether inference-config commands should execute immediately.
10///
11/// Always enabled for ants; gated by experiment for external users.
12pub fn should_inference_config_command_be_immediate() -> bool {
13 // For SDK, check environment variable
14 if std::env::var(ai::USER_TYPE).unwrap_or_default() == "ant" {
15 return true;
16 }
17
18 // TODO: Implement feature gate check for external users
19 // This would require the growthbook integration
20 false
21}