feat(rate-limits): add optional progress bars for 5h/7d usage#37
Open
marciogranzotto wants to merge 1 commit into
Open
feat(rate-limits): add optional progress bars for 5h/7d usage#37marciogranzotto wants to merge 1 commit into
marciogranzotto wants to merge 1 commit into
Conversation
Adds RATE_SHOW_PROGRESS_BAR (default: false) to render a visual bar between the label and percentage, e.g. "5h:███░░░░░ 45%", matching the context module's bar style. RATE_PROGRESS_BAR_WIDTH overrides the global PROGRESS_BAR_WIDTH for this module only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional visual progress bar to the rate-limits module, matching the style the context module already uses:
New options
RATE_SHOW_PROGRESS_BAR(default:false) — render a bar between the label and the percentage. Off by default, so existing installs see no change.RATE_PROGRESS_BAR_WIDTH(default: empty) — per-module width override; falls back to the globalPROGRESS_BAR_WIDTH.Implementation notes
progress_barhelper fromutils.sh(already covered bytests/test_utils.sh), so the bar respectsPROGRESS_BAR_FILLED/PROGRESS_BAR_EMPTYand theme settings.progress_bar's existingsafe_intclamping, so an untrusted project.barista.confvalue can't break the arithmetic.barista.conf.Testing
bash tests/test_utils.shandbash tests/test_sandbox.shpass (27/27).main.🤖 Generated with Claude Code