no-color cli output#256
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughIntroduces support for disabling colored CLI output via the Changes
Sequence DiagramsequenceDiagram
actor User
participant CLI as bin/failproofai.mjs
participant Env as process.env
participant Styler as cli-color.ts
participant Prompt as install-prompt.ts
participant Term as Terminal
User->>CLI: --no-color or NO_COLOR=1
CLI->>Env: Set NO_COLOR=1
Prompt->>Styler: createCliStyler(stdout)
Styler->>Env: Check NO_COLOR
Styler-->>Prompt: CliStyler {enabled: false}
alt NO_COLOR enabled
Prompt->>Prompt: Skip interactive selection
Prompt->>Prompt: Use defaults (non-interactive)
else NO_COLOR disabled & TTY
Prompt->>Prompt: Enable interactive selection
end
Prompt->>Term: Render output (with/without ANSI codes)
Prompt->>Styler: createCursorController()
Styler->>Term: Hide cursor on render
Prompt->>Term: Display prompt
Prompt->>Styler: dispose() on cleanup
Styler->>Term: Restore cursor & remove exit listener
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 24 minutes and 35 seconds.Comment |
# Conflicts: # CHANGELOG.md # src/hooks/install-prompt.ts
|
Thanks for the PR @dharmateja03! Curious about the motivation here — are you running failproofai somewhere with NO_COLOR set (CI logs, a piped tool, a non-ANSI terminal), or was this more of a general spec-compliance improvement? Just want to understand the use case so we can make sure the no-color path covers what you actually need. |
Description
Type of Change
Checklist
Summary by CodeRabbit
Release Notes
New Features
NO_COLORenvironment variable and--no-colorcommand-line flag to disable ANSI-colored CLI output for improved compatibility with CI logs and non-ANSI-compatible terminals.Documentation