FastModeConfig class

Configuration for the fast mode manager. Provides hooks to external systems (auth, settings, config) without hard dependencies.

Constructors

FastModeConfig({required String getApiProvider(), required bool isEnvTruthy(String name), required bool isInBundledMode(), required bool isNonInteractiveSession(), required bool isKairosActive(), required bool preferThirdPartyAuth(), required T getFeatureValue<T>(String key, T defaultValue), required bool? getFlagFastMode(), required String getDefaultMainLoopModel(), required String parseUserSpecifiedModel(String model), required Map<String, dynamic> getInitialSettings(), required Map<String, dynamic>? getSettingsForSource(String source), required void updateSettingsForSource(String source, Map<String, dynamic> updates), required Map<String, dynamic> getGlobalConfig(), required void saveGlobalConfig(Map<String, dynamic> (Map<String, dynamic> current)), required Map<String, String>? getOAuthTokens(), required String? getApiKey(), required bool hasProfileScope(), required Future<void> handleOAuth401Error(String accessToken), required String getBaseApiUrl(), required String getOAuthBetaHeader(), required bool isEssentialTrafficOnly(), required String? getUserType(), required bool isOpus1mMergeEnabled()})
const

Properties

getApiKey String? Function()
Get the Anthropic API key.
final
getApiProvider String Function()
Get the current API provider name.
final
getBaseApiUrl String Function()
Get the OAuth base API URL.
final
getDefaultMainLoopModel String Function()
Get the default main loop model setting.
final
getFeatureValue → T Function<T>(String key, T defaultValue)
Get a cached feature value from remote config.
final
getFlagFastMode bool? Function()
Get the fast mode setting from flag settings.
final
getGlobalConfig Map<String, dynamic> Function()
Get global config value.
final
getInitialSettings Map<String, dynamic> Function()
Get initial settings.
final
getOAuthBetaHeader String Function()
Get the OAuth beta header.
final
getOAuthTokens Map<String, String>? Function()
Get OAuth tokens.
final
getSettingsForSource Map<String, dynamic>? Function(String source)
Get settings for a specific source.
final
getUserType String? Function()
Get the user type from environment.
final
handleOAuth401Error Future<void> Function(String accessToken)
Handle OAuth 401 error.
final
hashCode int
The hash code for this object.
no setterinherited
hasProfileScope bool Function()
Check if the user has profile scope.
final
isEnvTruthy bool Function(String name)
Check if the environment variable is truthy.
final
isEssentialTrafficOnly bool Function()
Check if essential traffic only mode is active.
final
isInBundledMode bool Function()
Check if running in bundled/native mode.
final
isKairosActive bool Function()
Check if Kairos is active.
final
isNonInteractiveSession bool Function()
Check if this is a non-interactive session.
final
isOpus1mMergeEnabled bool Function()
Check if Opus 1M merge is enabled.
final
parseUserSpecifiedModel String Function(String model)
Parse a user-specified model string.
final
preferThirdPartyAuth bool Function()
Check if the user prefers third-party authentication.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saveGlobalConfig → void Function(Map<String, dynamic> (Map<String, dynamic> current))
Save global config.
final
updateSettingsForSource → void Function(String source, Map<String, dynamic> updates)
Update settings for a specific source.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited