Skip to content

Improve emoji detection in update_progress_log function #120

@coderabbitai

Description

@coderabbitai

Problem

The emoji detection logic in update_progress_log function (file: connector_builder_agents/src/tools.py) uses a narrow Unicode range check that doesn't cover most emojis actually used in the codebase.

Current behavior:
The range check 0x1F600-0x1F64F only covers the "Emoticons" block (😀-😏), but the codebase uses emojis from other ranges:

  • 📍 (U+1F4CD) - Miscellaneous Symbols and Pictographs
  • ✅ (U+2705), ❌ (U+274C) - Dingbats
  • 🤝 (U+1F91D) - Supplemental Symbols and Pictographs
  • ⚠️ (U+26A0) - Miscellaneous Symbols
  • 🛠️ (U+1F6E0) - Transport and Map Symbols
  • ⏳ (U+23F3) - Miscellaneous Technical

Proposed Solution

Add the emoji library as a dependency and use emoji.is_emoji() for more reliable detection:

import emoji

# In update_progress_log:
if message and emoji.is_emoji(message[0]):
    emoji_char, message = message[0], message[1:].lstrip()
    emoji = emoji_char

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions