Centralize agent mode colors in constant
I'll help you remove hardcoded colors for agent modes and centralize them. Let me start by exploring the codebase.
Perfect! Now I have all the information about hardcoded colors for agent modes. Let me compile the findings:
Summary
Based on my search, here are the main files containing hardcoded colors for agent modes and mode color definitions:
core/src/inference/agent-modes.ts- The primary file defining mode color specifications:- Exports hardcoded color constants:
DARK_GREEN_COLORandNEON_GREEK_COLOR - Defines
AgentModeSpecinterface withuiHintsproperty containingprimaryColorandsecondaryColor - Contains color definitions for each agent mode:
- SMART: Dark green
{r: 0x00, g: 0x37, b: 0x00}and neon green{r: 0x00, g: 0xff, b: 0x88} - RUSH: Dark orange
{r: 0x80, g: 0x33, b: 0x00}and gold{r: 0xff, g: 0xd7, b: 0x00} - FREE: Dark blue
{r: 0x00, g: 0x1a, b: 0x33}and bright blue{r: 0x00, g: 0xb8, b: 0xff} - PLAN: Royal purple
{r: 0xc0, g: 0x50, b: 0xc0}and royal blue{r: 0x40, g: 0x40, b: 0xff}
- SMART: Dark green
- Exports hardcoded color constants:
cli/src/tui/app.ts- Hardcoded mode colors for CLI display:getAgentModeColor()function (line 3781): Returns RGB colors for mode labels- SMART:
#03C561(green) - RUSH:
#E4B402(yellow/gold) - FREE modes:
#00B8FF(blue)
- SMART:
cli/src/tui/widgets/animated-orb.tsandweb/src/lib/components/animated-orb.svelte- Use the mode specs from agent-modes.ts for animated orb colorscli/src/tui/storybook/laser-sweep-overlay.story.ts- Storybook examples showing the same hardcoded colors
core/src/inference/agent-modes.ts
Now I see the issue clearly. The getAgentModeColor function in cli/src/tui/app.ts has hardcoded colors that don't match the centralized colors in agent-modes.ts. Let me check if there are other places:
Reference Thread
T-aae44811-8790-4ea5-9841-ad85014db950