Thanks for filing a bug. Please include enough detail to reproduce the issue.
Review CONTRIBUTING.md before submitting.
Pre-flight checks
OpenCode version tested
1.2.24
opencode-quota version tested
3.8.7
Bug summary
The /quota slash command hardcodes % left regardless of the percentDisplayMode config setting. The sidebar and compact status correctly use formatDisplayedPercentLabel() which respects percentDisplayMode, but /quota does not.
Steps to reproduce
- Set
"percentDisplayMode": "used" in opencode.json under experimental.quotaToast
- Run
/quota — shows XX% left
- Observe sidebar shows
XX% used
Expected behavior
/quota should respect percentDisplayMode and show XX% used when configured as such, matching sidebar behavior.
Actual behavior
/quota always shows XX% left ignoring the config.
Relevant logs/output
The root cause is in src/lib/quota-command-format.ts:75:
lines.push(` ${labelCol} ${bar(pct, barWidth)} ${pct}% left${suffix}`);
Should use formatDisplayedPercentLabel(row.percentRemaining, params.percentDisplayMode) instead, and pass percentDisplayMode from runtime.config through handleQuotaSlashCommand.
A PR with the fix is ready: #117
Thanks for filing a bug. Please include enough detail to reproduce the issue.
Review CONTRIBUTING.md before submitting.
Pre-flight checks
OpenCode version tested
1.2.24
opencode-quota version tested
3.8.7
Bug summary
The
/quotaslash command hardcodes% leftregardless of thepercentDisplayModeconfig setting. The sidebar and compact status correctly useformatDisplayedPercentLabel()which respectspercentDisplayMode, but/quotadoes not.Steps to reproduce
"percentDisplayMode": "used"inopencode.jsonunderexperimental.quotaToast/quota— showsXX% leftXX% usedExpected behavior
/quotashould respectpercentDisplayModeand showXX% usedwhen configured as such, matching sidebar behavior.Actual behavior
/quotaalways showsXX% leftignoring the config.Relevant logs/output
The root cause is in
src/lib/quota-command-format.ts:75:Should use
formatDisplayedPercentLabel(row.percentRemaining, params.percentDisplayMode)instead, and passpercentDisplayModefromruntime.configthroughhandleQuotaSlashCommand.A PR with the fix is ready: #117