@cortexkit/opencode-openai-auth 0.6.5 → 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/cli.js +1 -1
- package/dist/core/oauth.d.ts +1 -1
- package/dist/core/reset-credits.d.ts +5 -3
- package/dist/{index-kmy1bsj7.js → index-n2s7s3h6.js} +5 -5
- package/dist/index.js +40 -40
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/tui/command-dialogs.tsx +3 -3
- package/src/tui-compiled/tui/command-dialogs.tsx +3 -3
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PackageVersion = "0.
|
|
1
|
+
export declare const PackageVersion = "0.7.0";
|
package/package.json
CHANGED
|
@@ -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
|
|
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
|
|
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 ${
|
|
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
|
|
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
|
|
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 ${
|
|
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;
|