@magpie-community/opencode-cursor-auth 0.2.11 → 0.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +6 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2349,8 +2349,12 @@ export async function CursorAuthPlugin() {
2349
2349
  return { error: e.message, windows: [], signIn: "kept" }
2350
2350
  }
2351
2351
  const [u, plan, bot] = await Promise.all([usage(tok, Object.keys(provider?.models ?? {})), planOf(tok), botUsage(tok)])
2352
- // Put Bot before Total for magpie's three menu-bar rings.
2353
- const windows = [...u.windows.filter((w) => w.name !== "Total"), ...bot, ...u.windows.filter((w) => w.name === "Total")]
2352
+ // Bot goes among magpie's three menu-bar rings: before Total, and
2353
+ // before an On-demand with no limit, which is only a dollar figure on
2354
+ // a ring that never fills (magpie #2213, Morganwan90). An On-demand
2355
+ // with a limit stays ahead of it: that is what can stop the account.
2356
+ const last = (w) => w.name === "Total" || (w.name === "On-demand" && w.aside)
2357
+ const windows = [...u.windows.filter((w) => !last(w)), ...bot, ...u.windows.filter(last)]
2354
2358
  return { ...u, windows, ...(plan ? { plan } : {}), signIn: "kept" }
2355
2359
  },
2356
2360
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magpie-community/opencode-cursor-auth",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "Cursor subscriptions (Pro, Pro+, Ultra, Teams) in OpenCode and magpie, through the API cursor-agent talks to",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",