@cortexkit/opencode-openai-auth 0.6.4 → 0.7.0

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.
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PackageVersion = "0.6.4";
1
+ export declare const PackageVersion = "0.7.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/opencode-openai-auth",
3
- "version": "0.6.4",
3
+ "version": "0.7.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -64,7 +64,7 @@
64
64
  "dependencies": {
65
65
  "@opentui/core": ">=0.5.1",
66
66
  "@opentui/solid": ">=0.5.1",
67
- "ai": "^7.0.48",
67
+ "ai": "^7.0.90",
68
68
  "jsonc-parser": "^3.3.1",
69
69
  "solid-js": "1.9.12"
70
70
  }
@@ -142,7 +142,7 @@ function resetAccountOptions(payload: OpenDialogPayload): ResetDialogOption[] {
142
142
  account.usedPercent === undefined
143
143
  ? 'quota unavailable'
144
144
  : `${account.usedPercent}%`
145
- const counts = `${account.applicableAvailableCount ?? 0}/${account.availableCount ?? 0}`
145
+ const counts = `${account.applicableAvailableCount === undefined ? '?' : account.applicableAvailableCount}/${account.availableCount ?? '?'}`
146
146
  const status = account.eligible
147
147
  ? 'eligible'
148
148
  : (account.reason ?? 'unavailable')
@@ -278,12 +278,12 @@ function openResetDialog(
278
278
  const preview = state.knobs.preview as ResetPreviewKnob | undefined
279
279
  const accountKey = preview?.accountKey
280
280
  const chatgptAccountId = preview?.chatgptAccountId
281
- const applicableCount = preview?.applicableAvailableCount ?? 0
281
+ const availableCount = preview?.availableCount ?? 'unknown'
282
282
  const DialogConfirm = api.ui.DialogConfirm
283
283
  api.ui.dialog.replace(() => (
284
284
  <DialogConfirm
285
285
  title='Reset quota window'
286
- message={`${state.text}\n\nThis SPENDS 1 of ${applicableCount} reset credits — irreversible.\n\nChoose Reset to continue or Cancel to return.\n\nEnter = Cancel (host default). Press Tab then Enter to Reset.`}
286
+ message={`${state.text}\n\nThis SPENDS 1 of ${availableCount} reset credits — irreversible.\n\nChoose Reset to continue or Cancel to return.\n\nEnter = Cancel (host default). Press Tab then Enter to Reset.`}
287
287
  onConfirm={() => {
288
288
  if (!accountKey || !chatgptAccountId) return
289
289
  applyAndRender(
@@ -66,7 +66,7 @@ function resetAccountOptions(payload) {
66
66
  const accounts = Array.isArray(payload.knobs.accounts) ? payload.knobs.accounts : [];
67
67
  return [...accounts.map(account => {
68
68
  const used = account.usedPercent === undefined ? 'quota unavailable' : `${account.usedPercent}%`;
69
- const counts = `${account.applicableAvailableCount ?? 0}/${account.availableCount ?? 0}`;
69
+ const counts = `${account.applicableAvailableCount === undefined ? '?' : account.applicableAvailableCount}/${account.availableCount ?? '?'}`;
70
70
  const status = account.eligible ? 'eligible' : account.reason ?? 'unavailable';
71
71
  const details = `${used} · ${counts}`;
72
72
  const shortDate = account.selectedCreditExpiresAt?.slice(0, 10) ?? 'unknown';
@@ -167,12 +167,12 @@ function openResetDialog(api, payload, apply) {
167
167
  const preview = state.knobs.preview;
168
168
  const accountKey = preview?.accountKey;
169
169
  const chatgptAccountId = preview?.chatgptAccountId;
170
- const applicableCount = preview?.applicableAvailableCount ?? 0;
170
+ const availableCount = preview?.availableCount ?? 'unknown';
171
171
  const DialogConfirm = api.ui.DialogConfirm;
172
172
  api.ui.dialog.replace(() => _$createComponent(DialogConfirm, {
173
173
  title: "Reset quota window",
174
174
  get message() {
175
- return `${state.text}\n\nThis SPENDS 1 of ${applicableCount} reset credits — irreversible.\n\nChoose Reset to continue or Cancel to return.\n\nEnter = Cancel (host default). Press Tab then Enter to Reset.`;
175
+ return `${state.text}\n\nThis SPENDS 1 of ${availableCount} reset credits — irreversible.\n\nChoose Reset to continue or Cancel to return.\n\nEnter = Cancel (host default). Press Tab then Enter to Reset.`;
176
176
  },
177
177
  onConfirm: () => {
178
178
  if (!accountKey || !chatgptAccountId) return;