Skip to content

Add colored console output for agent logs #331

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Mar 20, 2025
Merged

Conversation

bhouston
Copy link
Member

Add colored console output for agent logs

Description

This PR adds colored console output for agent logs, making it easier to distinguish between different agents and their tools in the console. Each agent is assigned a unique color, and their tools inherit that color, providing a clearer visual hierarchy.

Changes

  • Added a color property to the Logger class
  • Modified the consoleOutputLogger function to use the agent's color for output
  • Added a function to generate random colors for agents
  • Updated the agentStart tool to assign a random color to each new agent
  • Tools now inherit their parent agent's color

Benefits

  • Improved readability of console output
  • Easier to track the execution flow of multiple agents and their tools
  • Better visual distinction between different agents

Testing

  • All tests are passing
  • Manually verified that agents and their tools use consistent colors
  • Verified that error and warning messages still use red and yellow respectively

Fixes #330

@bhouston bhouston merged commit 7535f0f into main Mar 20, 2025
1 check passed
Copy link

🎉 This PR is included in version mycoder-agent-v1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version mycoder-v1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add colored console output for agent logs
1 participant