Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 2.35 KB

File metadata and controls

69 lines (55 loc) · 2.35 KB

GitGang Output Formatting Improvements

Changes Made

1. Intelligent JSON Parsing & Filtering

  • Added JSON stream parser that identifies different message types (thinking, tool_use, assistant, exec, etc.)
  • Filters out verbose metadata and internal system messages
  • Only displays relevant user-facing content

2. Color-Coded Agent Output

  • [GEMINI] - Magenta
  • [CLAUDE] - Yellow
  • [CODEX] - Green

Each agent's output is clearly distinguished with consistent color coding throughout the session.

3. Improved Message Formatting

  • Thinking: 💭 prefix with dimmed text for internal reasoning
  • Tool Use: 🔧 prefix showing tool name and description
  • Commands: $ prefix for shell commands
  • Init: ⚙️ prefix for initialization messages

4. Cleaner Display

Removed verbose JSON output like:

  • {"type":"tool_result", ...} - Now hidden from console (still logged to files)
  • Session IDs, timestamps, and other metadata
  • Duplicate environment variable warnings
  • Unnecessary system initialization details

5. Better Section Headers

  • Clear banner for "🚀 Starting AI Agents"
  • Shows each agent's branch assignment
  • Repository and task information formatted clearly

6. Preserved Log Files

All raw output is still written to .logs/ directories for debugging, but the console only shows clean, formatted, human-readable content.

Before vs After

Before:

[GEMINI] {"type":"init","timestamp":"2025-11-04T01:50:20.710Z","session_id":"91727ea5..."}
[GEMINI] {"type":"message","timestamp":"2025-11-04T01:50:20.711Z","role":"user","content":"You are..."}
[GEMINI] {"type":"tool_use","timestamp":"2025-11-04T01:50:27.511Z","tool_name":"run_shell_command"...}
[GEMINI] {"type":"tool_result","timestamp":"2025-11-04T01:50:28.372Z"...}

After:

[GEMINI] ⚙️  Initialized (gemini-3-pro-preview)
[GEMINI] └─ Task: I need you to get the vitest coverage of this project to be 90% covered...
[GEMINI] 🔧 run_shell_command: Run vitest with coverage reporting
[GEMINI]   Understood. I will increase Vitest coverage to 90%...

Testing

To test the improvements:

cd /path/to/your/repo
gitgang "your task here"

The output will be much cleaner with:

  • Colored agent tags
  • Only meaningful messages
  • Clear tool usage indicators
  • No JSON noise
  • Raw logs still available in .logs/ files