Conversation
- Merge branch \'contributions/merge-1776027765274\' - Pull contributions - Add MiniMax provider support
|
Thank you for your contribution! 🎉 🔔 @natsustan @alexibuild @AdrianBonpin you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="ext/agent-usage"
FORK_URL="https://github.com/GarrickZ2/raycast-extensions.git"
EXTENSION_NAME="agent-usage"
REPO_NAME="raycast-extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
Greptile SummaryThis PR adds MiniMax as a new single-account provider, following the established pattern of auth resolution (preferences → OpenCode → shell env), a custom fetcher hook, and a renderer. The implementation is structurally sound but contains one correctness bug in Confidence Score: 4/5Not safe to merge until the inverted percentage calculation in renderer.tsx is fixed. One P1 logic bug causes all MiniMax usage percentages and the pie icon to display the used fraction instead of the remaining fraction, which is the core data shown to users. All other files are structurally correct and follow established patterns. extensions/agent-usage/src/minimax/renderer.tsx — all three exported functions pass usage_count instead of (total - usage_count) to getRemainingPercent. Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/agent-usage/src/minimax/renderer.tsx
Line: 35-38
Comment:
**Usage count passed as remaining count — percentages are inverted**
`current_interval_usage_count` is the number of requests/tokens **already consumed**, but `getRemainingPercent` expects the **remaining** quantity as its first argument. The result is that every percentage displayed says "X% remaining" when it actually shows "X% used" — so a user who has used 80% of their quota sees "80% remaining" instead of "20% remaining". The pie icon in `getMiniMaxAccessory` is correspondingly inverted.
The exact same bug was fixed for z.ai in a previous PR ("Fix z.ai percentage calculation — API's `percentage` field is 'percentage used' not 'percentage remaining'"). The fix should subtract usage from total before passing it in:
```suggestion
const percent = getRemainingPercent(
codingModel.current_interval_total_count - codingModel.current_interval_usage_count,
codingModel.current_interval_total_count,
);
```
This same incorrect pattern also affects the weekly section in `formatMiniMaxUsageText`, and both sections in `renderMiniMaxDetail` and `getMiniMaxAccessory`.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/agent-usage/CHANGELOG.md
Line: 3
Comment:
**Hardcoded date instead of `{PR_MERGE_DATE}` placeholder**
New changelog entries for open PRs must use the `{PR_MERGE_DATE}` template variable so the merge date is filled in automatically at release time.
```suggestion
## [Add MiniMax Provider] - {PR_MERGE_DATE}
```
**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/review/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/agent-usage/src/agent-usage-menubar.tsx
Line: 243
Comment:
**Redundant `minimaxState` in `visibleAgents` deps**
`minimaxState` is already captured inside `singleAgents`, which is itself a dep of this memo. Adding the raw `minimaxState` object here means `visibleAgents` re-runs every time any property of `minimaxState` changes — even changes already handled by `singleAgents` updating. The previous agents (antigravity, zai, etc.) are not listed individually here; `minimaxState` should be removed for consistency and to avoid unnecessary re-renders.
```suggestion
[singleAgents, codexAgents, kimiAgents, syntheticAgents, zaiAgents],
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Add MiniMax provider support" | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
- Replace MiniMax placeholder icon with branded SVG - Pull contributions
Description
Add MiniMax as a new single-account provider for tracking AI coding assistant usage. MiniMax exposes 5h interval and weekly remaining quotas via their /v1/api/openplatform/coding_plan/remains API.
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder