utils/effort/effort_manager library
Classes
- EffortConfig
- Configuration callbacks for effort management.
- EffortLevelValue
- A named effort level value.
- EffortManager
- Manages effort levels, model support, and defaults.
- EffortNumericValue
- A numeric effort value (ant-only feature).
- EffortValue
- Effort value can be either a named level or a numeric value.
- OpusDefaultEffortConfig
- Configuration for Opus default effort display.
- ThinkingAdaptive
- Adaptive thinking -- let the model decide.
- ThinkingConfig
- Thinking/extended thinking configuration for the API.
- ThinkingDisabled
- Thinking explicitly disabled.
- ThinkingEnabled
- Thinking enabled with a specific token budget.
- ThinkingManager
- Thinking support manager. Separate from effort to avoid circular deps.
Enums
- EffortLevel
- Effort levels for the API.
Constants
-
kAdjectives
→ const List<
String> - Adjectives for slug generation -- whimsical and delightful.
-
kEffortLevels
→ const List<
EffortLevel> - All valid effort levels.
-
kNouns
→ const List<
String> - Nouns for slug generation -- whimsical creatures, nature, and fun objects.
-
kRainbowColors
→ const List<
String> - Rainbow theme color keys.
-
kRainbowShimmerColors
→ const List<
String> - Rainbow shimmer color keys.
-
kVerbs
→ const List<
String> - Verbs for the middle word -- whimsical action words.
Functions
-
findTokenBudgetPositions(
String text) → List< ({int end, int start})> - Find all token budget positions in text (for UI highlighting).
-
generateShortWordSlug(
) → String - Generate a shorter random word slug in the format "adjective-noun". Example: "graceful-unicorn", "cosmic-lighthouse"
-
generateWordSlug(
) → String - Generate a random word slug in the format "adjective-verb-noun". Example: "gleaming-brewing-phoenix", "cosmic-pondering-lighthouse"
-
getBudgetContinuationMessage(
int pct, int turnTokens, int budget) → String - Build the continuation message for a token budget.
-
getRainbowColor(
int charIndex, {bool shimmer = false}) → String - Get the rainbow color key for a given character index.
-
parseTokenBudget(
String text) → int? - Parse a token budget from text. Returns null if no budget is found.