Skip to content

refactor: extract color constants into src/colors.js - #56

Open
saumya-30-verma wants to merge 2 commits into
HoussemEddineChaouch:mainfrom
saumya-30-verma:refactor/extract-colors
Open

refactor: extract color constants into src/colors.js#56
saumya-30-verma wants to merge 2 commits into
HoussemEddineChaouch:mainfrom
saumya-30-verma:refactor/extract-colors

Conversation

@saumya-30-verma

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR extracts ANSI colour constants into a dedicated src/colors.js module and updates the existing files to use the shared constants instead of hardcoded ANSI escape sequences.

Type of change

  • Bug fix
  • New feature / tool
  • Documentation update
  • Refactor

How to test it

  1. Run npm install
  2. Run node src/index.js
  3. Verify the CLI starts successfully.
  4. Interact with the CLI and confirm the coloured output (Agent Thinking, Reason, and Choosing tool) is displayed as before.

Related issues

Closes #43

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@saumya-30-verma is attempting to deploy a commit to the houssemeddinechaouch's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

👋 Thanks for opening this PR @saumya-30-verma!

Before we review, please make sure:

  • PR description follows the repo template
  • Your branch is up to date with main
  • You were assigned to the related issue before opening this PR

A maintainer will review it soon. 🙌

@saumya-30-verma

Copy link
Copy Markdown
Contributor Author

Hi @HoussemEddineChaouch,

I've completed the requested refactor. When you have time, I'd really appreciate your feedback.

Thank you!

@HoussemEddineChaouch HoussemEddineChaouch left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @saumya-30-verma, good start, the colors.js
extraction is the right direction 🙌

Two files are missing, help.js and llm.js still have
hardcoded ANSI color codes and weren't updated to
import from colors.js. Please update both to import
from colors.js to keep it consistent across the
whole codebase.

@HoussemEddineChaouch

Copy link
Copy Markdown
Owner

@saumya-30-verma !

@saumya-30-verma

Copy link
Copy Markdown
Contributor Author

Thanks for the review! I've updated help.js and llm.js to use the shared color constants from colors.js and pushed the requested changes. Please let me know if there's anything else to update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: extract color constants into src/colors.js

2 participants