Commit Graph

2 Commits

Author SHA1 Message Date
Devin AI
a9823a4368 refactor: Implement code review suggestions for emoji disable feature
- Move EMOJI_MAP to module level as DEFAULT_EMOJI_MAP for memory efficiency
- Add _parse_bool_env() helper function for cleaner boolean conversion
- Implement performance optimization with icon caching
- Improve error handling for unknown emojis with better fallback format
- Update tests to work with new module structure
- All functionality preserved and tests passing

Addresses feedback from PR review #3063

Co-Authored-By: João <joao@crewai.com>
2025-06-25 13:02:32 +00:00
Devin AI
4e288e4cf7 feat: Add CREWAI_DISABLE_EMOJIS environment variable to disable emojis in logs
- Add environment variable CREWAI_DISABLE_EMOJIS to control emoji usage
- Create comprehensive emoji-to-text mapping for runtime compatibility
- Implement _get_icon() helper method in ConsoleFormatter
- Replace all hardcoded emojis with dynamic icon selection
- Add comprehensive test suite covering all emoji disable scenarios
- Maintain backward compatibility (emojis enabled by default)
- Fixes issue #3062 for Azure Functions and similar runtime environments

Co-Authored-By: João <joao@crewai.com>
2025-06-25 12:57:26 +00:00