@google/gemini-cli 0.55.0-preview.2 → 0.55.1
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/bundle/builtin/antigravity-support/SKILL.md +55 -18
- package/bundle/builtin/skill-creator/SKILL.md +221 -84
- package/bundle/{chunk-2ZWCUTMN.js → chunk-2M2ZIALC.js} +1 -1
- package/bundle/{chunk-A4YWS44A.js → chunk-32XQ54AJ.js} +41 -13
- package/bundle/{chunk-T36P7MFE.js → chunk-3PF5QBBI.js} +7 -7
- package/bundle/{chunk-XWGJPCDB.js → chunk-4PTN4HDB.js} +1 -1
- package/bundle/{chunk-57ZLFNIU.js → chunk-4VCYHMUV.js} +1 -1
- package/bundle/{chunk-KII3XXCP.js → chunk-54ARFWUQ.js} +3 -3
- package/bundle/{chunk-OC55SY62.js → chunk-5LKFYSMV.js} +7 -7
- package/bundle/{chunk-CYJHOZAD.js → chunk-7PUNXJV6.js} +1 -1
- package/bundle/{chunk-2NTEXQZI.js → chunk-AHQT54A5.js} +2 -2
- package/bundle/{chunk-LVOM4PEE.js → chunk-AICCA4O7.js} +2 -2
- package/bundle/{chunk-4SFKECJB.js → chunk-CBP73R2W.js} +1 -1
- package/bundle/{chunk-O5GQF2L7.js → chunk-DPETPWEN.js} +1 -1
- package/bundle/{chunk-3OPKUUXP.js → chunk-F6UH32RP.js} +1 -1
- package/bundle/{chunk-PTZIAOG5.js → chunk-FFNJNOPW.js} +3 -3
- package/bundle/{chunk-QPGTVRXP.js → chunk-IHBI4YWX.js} +7 -7
- package/bundle/{chunk-UXD5COS4.js → chunk-L72KYPGX.js} +7 -7
- package/bundle/{chunk-7IYUUE2H.js → chunk-MMGNXRKB.js} +1 -1
- package/bundle/{chunk-L6Q242KC.js → chunk-MVFWCC7A.js} +1 -1
- package/bundle/{chunk-CBX65YIB.js → chunk-MXXWTJ5T.js} +1 -1
- package/bundle/{chunk-SEHUSFSL.js → chunk-ODKPTNXF.js} +1 -1
- package/bundle/{chunk-J27NXCYL.js → chunk-PG6A7S3N.js} +1 -1
- package/bundle/{chunk-HZZM77SO.js → chunk-QCOIICKD.js} +41 -13
- package/bundle/{chunk-S3XRZJYO.js → chunk-QZIGFB5E.js} +1 -1
- package/bundle/{chunk-DBPSBJMI.js → chunk-RV6ZZ7XX.js} +1 -1
- package/bundle/{chunk-R3S5PP5S.js → chunk-TBDX7VEE.js} +41 -13
- package/bundle/{chunk-DSCF5EA6.js → chunk-TGIIS5S2.js} +3 -3
- package/bundle/{chunk-J6DC57TM.js → chunk-UE3CHSFT.js} +1 -1
- package/bundle/{chunk-DRN2VYCZ.js → chunk-UNIFGKZA.js} +2 -2
- package/bundle/{chunk-4C7ON4TD.js → chunk-WD5EVW3M.js} +1 -1
- package/bundle/{chunk-FH7GCVZY.js → chunk-XCA4ZL2J.js} +2 -2
- package/bundle/{chunk-IHR5TZ6N.js → chunk-YBQ5R3NL.js} +3 -3
- package/bundle/{chunk-MLTI5CK6.js → chunk-ZYL2LM3Y.js} +41 -13
- package/bundle/{cleanup-PYHN72B4.js → cleanup-B3QR2N4G.js} +2 -2
- package/bundle/{cleanup-QOIB4MC5.js → cleanup-H4OEYJO6.js} +2 -2
- package/bundle/{cleanup-X7SPIVY6.js → cleanup-MJ6IH5A4.js} +2 -2
- package/bundle/{cleanup-XHKLOUOX.js → cleanup-ZPX2BSHS.js} +2 -2
- package/bundle/{core-TM4S2KC6.js → core-IV4CNC54.js} +1 -1
- package/bundle/{devtoolsService-QXH36QMO.js → devtoolsService-53U6T2D7.js} +2 -2
- package/bundle/{devtoolsService-XNULR5OM.js → devtoolsService-HB7ZBXSQ.js} +2 -2
- package/bundle/{devtoolsService-XP7RODGG.js → devtoolsService-OPPX3TMY.js} +2 -2
- package/bundle/{devtoolsService-YBK5NQJR.js → devtoolsService-VRMTKDJD.js} +2 -2
- package/bundle/{dist-DUXHKH4A.js → dist-6SH22WAQ.js} +1 -1
- package/bundle/{dist-FCM7NH26.js → dist-DZLHUESI.js} +1 -1
- package/bundle/{dist-LH5DRLX7.js → dist-GGMH7TPR.js} +1 -1
- package/bundle/docs/behavioral-evals.md +185 -0
- package/bundle/docs/changelogs/index.md +18 -0
- package/bundle/docs/changelogs/latest.md +59 -31
- package/bundle/docs/changelogs/preview.md +45 -3
- package/bundle/docs/sidebar.json +4 -0
- package/bundle/{gemini-ZUILAPR6.js → gemini-3KUKFPRO.js} +14 -14
- package/bundle/{gemini-HDAYOIW2.js → gemini-63IMHOLI.js} +14 -14
- package/bundle/{gemini-ORTIIX7J.js → gemini-I57YPWDS.js} +14 -14
- package/bundle/{gemini-A7HOBIKY.js → gemini-LI2WNAGG.js} +14 -14
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-H524RKEH.js → interactiveCli-2Z3Q3FYM.js} +67 -25
- package/bundle/{interactiveCli-KX3U7SFD.js → interactiveCli-4CVVH6KY.js} +67 -25
- package/bundle/{interactiveCli-O4YSZIKG.js → interactiveCli-OLXPGHKG.js} +67 -25
- package/bundle/{interactiveCli-YAAI2B6S.js → interactiveCli-YTTP3IVA.js} +67 -25
- package/bundle/{liteRtServerManager-FTW42YZF.js → liteRtServerManager-3I2T6MGB.js} +4 -4
- package/bundle/{liteRtServerManager-NW33H3DY.js → liteRtServerManager-F6V5YDCO.js} +4 -4
- package/bundle/{liteRtServerManager-PRXJGWUQ.js → liteRtServerManager-H6XTDF3Z.js} +4 -4
- package/bundle/{liteRtServerManager-RP2Z5PSZ.js → liteRtServerManager-I5WRPME4.js} +4 -4
- package/bundle/{oauth2-provider-JZQDXWRM.js → oauth2-provider-D5ATF6IJ.js} +1 -1
- package/bundle/{oauth2-provider-UKW3UFLQ.js → oauth2-provider-EO6C45X7.js} +1 -1
- package/bundle/{oauth2-provider-AXFTVNOH.js → oauth2-provider-QKZF52YW.js} +1 -1
- package/bundle/{oauth2-provider-X4GQTJLG.js → oauth2-provider-RA73ERNX.js} +1 -1
- package/bundle/{start-EIHA5TWI.js → start-A2X2P77M.js} +6 -6
- package/bundle/{start-ODF2OV65.js → start-IH2TDHK5.js} +6 -6
- package/bundle/{start-ONHNJJG7.js → start-J7S6DWJY.js} +6 -6
- package/bundle/{start-TSZCFX4W.js → start-VOAVWNRZ.js} +6 -6
- package/package.json +1 -1
|
@@ -157,10 +157,10 @@ import {
|
|
|
157
157
|
widestLineFromStyledChars,
|
|
158
158
|
wordBreakStyledChars,
|
|
159
159
|
wrapStyledChars
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-5LKFYSMV.js";
|
|
161
161
|
import {
|
|
162
162
|
require_source
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-F6UH32RP.js";
|
|
164
164
|
import {
|
|
165
165
|
appEvents
|
|
166
166
|
} from "./chunk-5PS3AYFU.js";
|
|
@@ -214,24 +214,24 @@ import {
|
|
|
214
214
|
stripAnsi,
|
|
215
215
|
stripUnsafeCharacters,
|
|
216
216
|
toCodePoints
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-ODKPTNXF.js";
|
|
218
218
|
import {
|
|
219
219
|
handleAutoUpdate,
|
|
220
220
|
isDevelopment,
|
|
221
221
|
relaunchApp,
|
|
222
222
|
setUpdateHandler
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-AICCA4O7.js";
|
|
224
224
|
import {
|
|
225
225
|
isTodoList,
|
|
226
226
|
mapCoreStatusToDisplayStatus,
|
|
227
227
|
require_react
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-MVFWCC7A.js";
|
|
229
229
|
import {
|
|
230
230
|
registerCleanup,
|
|
231
231
|
removeCleanup,
|
|
232
232
|
runExitCleanup,
|
|
233
233
|
setupTtyCheck
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-MMGNXRKB.js";
|
|
235
235
|
import {
|
|
236
236
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
237
237
|
AGENT_TOOL_NAME,
|
|
@@ -437,7 +437,7 @@ import {
|
|
|
437
437
|
validatePlanContent,
|
|
438
438
|
validatePlanPath,
|
|
439
439
|
writeToStdout
|
|
440
|
-
} from "./chunk-
|
|
440
|
+
} from "./chunk-32XQ54AJ.js";
|
|
441
441
|
import "./chunk-664ZODQF.js";
|
|
442
442
|
import "./chunk-IUUIT4SU.js";
|
|
443
443
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -15538,6 +15538,7 @@ function ProQuotaDialog({
|
|
|
15538
15538
|
message,
|
|
15539
15539
|
isTerminalQuotaError,
|
|
15540
15540
|
isModelNotFoundError,
|
|
15541
|
+
isCapacityExceeded,
|
|
15541
15542
|
authType,
|
|
15542
15543
|
tierName,
|
|
15543
15544
|
onChoice
|
|
@@ -15556,6 +15557,24 @@ function ProQuotaDialog({
|
|
|
15556
15557
|
key: "retry_later"
|
|
15557
15558
|
}
|
|
15558
15559
|
];
|
|
15560
|
+
} else if (isCapacityExceeded) {
|
|
15561
|
+
items = [
|
|
15562
|
+
{
|
|
15563
|
+
label: "Keep trying",
|
|
15564
|
+
value: "retry_once",
|
|
15565
|
+
key: "retry_once"
|
|
15566
|
+
},
|
|
15567
|
+
{
|
|
15568
|
+
label: `Switch to ${fallbackModel}`,
|
|
15569
|
+
value: "retry_always",
|
|
15570
|
+
key: "retry_always"
|
|
15571
|
+
},
|
|
15572
|
+
{
|
|
15573
|
+
label: "Stop",
|
|
15574
|
+
value: "retry_later",
|
|
15575
|
+
key: "retry_later"
|
|
15576
|
+
}
|
|
15577
|
+
];
|
|
15559
15578
|
} else if (isModelNotFoundError || isTerminalQuotaError) {
|
|
15560
15579
|
const isUltra = isUltraTier(tierName);
|
|
15561
15580
|
items = [
|
|
@@ -17694,6 +17713,7 @@ var DialogManager = ({
|
|
|
17694
17713
|
message: quotaState.proQuotaRequest.message,
|
|
17695
17714
|
isTerminalQuotaError: quotaState.proQuotaRequest.isTerminalQuotaError,
|
|
17696
17715
|
isModelNotFoundError: !!quotaState.proQuotaRequest.isModelNotFoundError,
|
|
17716
|
+
isCapacityExceeded: !!quotaState.proQuotaRequest.isCapacityExceeded,
|
|
17697
17717
|
authType: quotaState.proQuotaRequest.authType,
|
|
17698
17718
|
tierName: config?.getUserTierName(),
|
|
17699
17719
|
onChoice: uiActions.handleProQuotaChoice
|
|
@@ -25417,6 +25437,7 @@ async function openG1Url(path14, campaign) {
|
|
|
25417
25437
|
}
|
|
25418
25438
|
|
|
25419
25439
|
// packages/cli/src/ui/hooks/useQuotaAndFallback.ts
|
|
25440
|
+
var isObject = (val) => typeof val === "object" && val !== null;
|
|
25420
25441
|
function useQuotaAndFallback({
|
|
25421
25442
|
config,
|
|
25422
25443
|
historyManager,
|
|
@@ -25439,6 +25460,16 @@ function useQuotaAndFallback({
|
|
|
25439
25460
|
let message;
|
|
25440
25461
|
let isTerminalQuotaError = false;
|
|
25441
25462
|
let isModelNotFoundError = false;
|
|
25463
|
+
const errorObj = isObject(error) ? error : null;
|
|
25464
|
+
const errorReasonValue = errorObj?.["reason"];
|
|
25465
|
+
const errorReason = typeof errorReasonValue === "string" ? errorReasonValue : void 0;
|
|
25466
|
+
const errorMessageValue = errorObj?.["message"];
|
|
25467
|
+
const errorMessage = typeof errorMessageValue === "string" ? errorMessageValue : void 0;
|
|
25468
|
+
const isCapacityExceeded = errorReason === "MODEL_CAPACITY_EXHAUSTED" || errorReason === "MODEL_CAPACITY_EXCEEDED" || typeof errorMessage === "string" && /exhausted your capacity|capacity exceeded|MODEL_CAPACITY_EXHAUSTED/i.test(
|
|
25469
|
+
errorMessage
|
|
25470
|
+
) || typeof error === "string" && /exhausted your capacity|capacity exceeded|MODEL_CAPACITY_EXHAUSTED/i.test(
|
|
25471
|
+
error
|
|
25472
|
+
);
|
|
25442
25473
|
const usageLimitReachedModel = isProModel(failedModel) ? "all Pro models" : failedModel;
|
|
25443
25474
|
if (error instanceof TerminalQuotaError) {
|
|
25444
25475
|
isTerminalQuotaError = true;
|
|
@@ -25462,14 +25493,24 @@ function useQuotaAndFallback({
|
|
|
25462
25493
|
});
|
|
25463
25494
|
if (creditsResult) return creditsResult;
|
|
25464
25495
|
}
|
|
25465
|
-
|
|
25466
|
-
|
|
25467
|
-
|
|
25468
|
-
|
|
25469
|
-
|
|
25470
|
-
|
|
25471
|
-
|
|
25472
|
-
|
|
25496
|
+
if (isCapacityExceeded) {
|
|
25497
|
+
const messageLines = [
|
|
25498
|
+
`We are currently experiencing high demand for ${usageLimitReachedModel}.`,
|
|
25499
|
+
"We apologize and appreciate your patience.",
|
|
25500
|
+
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25501
|
+
`/model to switch models.`
|
|
25502
|
+
].filter(Boolean);
|
|
25503
|
+
message = messageLines.join("\n");
|
|
25504
|
+
} else {
|
|
25505
|
+
const messageLines = [
|
|
25506
|
+
`Usage limit reached for ${usageLimitReachedModel}.`,
|
|
25507
|
+
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25508
|
+
`/stats model for usage details`,
|
|
25509
|
+
`/model to switch models.`,
|
|
25510
|
+
contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
|
|
25511
|
+
].filter(Boolean);
|
|
25512
|
+
message = messageLines.join("\n");
|
|
25513
|
+
}
|
|
25473
25514
|
} else if (error instanceof ModelNotFoundError) {
|
|
25474
25515
|
isModelNotFoundError = true;
|
|
25475
25516
|
if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
|
|
@@ -25502,7 +25543,7 @@ function useQuotaAndFallback({
|
|
|
25502
25543
|
];
|
|
25503
25544
|
message = messageLines.join("\n");
|
|
25504
25545
|
}
|
|
25505
|
-
if (errorVerbosity === "low" && !isTerminalQuotaError && !isModelNotFoundError) {
|
|
25546
|
+
if (errorVerbosity === "low" && (!isTerminalQuotaError || isCapacityExceeded) && !isModelNotFoundError) {
|
|
25506
25547
|
return "retry_once";
|
|
25507
25548
|
}
|
|
25508
25549
|
setModelSwitchedFromQuotaError(true);
|
|
@@ -25520,6 +25561,7 @@ function useQuotaAndFallback({
|
|
|
25520
25561
|
message,
|
|
25521
25562
|
isTerminalQuotaError,
|
|
25522
25563
|
isModelNotFoundError,
|
|
25564
|
+
isCapacityExceeded,
|
|
25523
25565
|
authType: contentGeneratorConfig?.authType
|
|
25524
25566
|
});
|
|
25525
25567
|
}
|
|
@@ -30675,12 +30717,12 @@ var streamRequest = (request, onUploadProgress, originalBody) => {
|
|
|
30675
30717
|
};
|
|
30676
30718
|
|
|
30677
30719
|
// node_modules/ky/distribution/utils/is.js
|
|
30678
|
-
var
|
|
30720
|
+
var isObject2 = (value) => value !== null && typeof value === "object";
|
|
30679
30721
|
|
|
30680
30722
|
// node_modules/ky/distribution/utils/merge.js
|
|
30681
30723
|
var validateAndMerge = (...sources) => {
|
|
30682
30724
|
for (const source of sources) {
|
|
30683
|
-
if ((!
|
|
30725
|
+
if ((!isObject2(source) || Array.isArray(source)) && source !== void 0) {
|
|
30684
30726
|
throw new TypeError("The `options` argument must be an object");
|
|
30685
30727
|
}
|
|
30686
30728
|
}
|
|
@@ -30725,7 +30767,7 @@ var appendSearchParameters = (target, source) => {
|
|
|
30725
30767
|
}
|
|
30726
30768
|
result.append(String(pair[0]), String(pair[1]));
|
|
30727
30769
|
}
|
|
30728
|
-
} else if (
|
|
30770
|
+
} else if (isObject2(input)) {
|
|
30729
30771
|
for (const [key, value] of Object.entries(input)) {
|
|
30730
30772
|
if (value !== void 0) {
|
|
30731
30773
|
result.append(key, String(value));
|
|
@@ -30752,14 +30794,14 @@ var deepMerge = (...sources) => {
|
|
|
30752
30794
|
returnValue = [];
|
|
30753
30795
|
}
|
|
30754
30796
|
returnValue = [...returnValue, ...source];
|
|
30755
|
-
} else if (
|
|
30797
|
+
} else if (isObject2(source)) {
|
|
30756
30798
|
for (let [key, value] of Object.entries(source)) {
|
|
30757
30799
|
if (key === "signal" && value instanceof globalThis.AbortSignal) {
|
|
30758
30800
|
signals.push(value);
|
|
30759
30801
|
continue;
|
|
30760
30802
|
}
|
|
30761
30803
|
if (key === "context") {
|
|
30762
|
-
if (value !== void 0 && value !== null && (!
|
|
30804
|
+
if (value !== void 0 && value !== null && (!isObject2(value) || Array.isArray(value))) {
|
|
30763
30805
|
throw new TypeError("The `context` option must be an object");
|
|
30764
30806
|
}
|
|
30765
30807
|
returnValue = {
|
|
@@ -30776,16 +30818,16 @@ var deepMerge = (...sources) => {
|
|
|
30776
30818
|
}
|
|
30777
30819
|
continue;
|
|
30778
30820
|
}
|
|
30779
|
-
if (
|
|
30821
|
+
if (isObject2(value) && key in returnValue) {
|
|
30780
30822
|
value = deepMerge(returnValue[key], value);
|
|
30781
30823
|
}
|
|
30782
30824
|
returnValue = { ...returnValue, [key]: value };
|
|
30783
30825
|
}
|
|
30784
|
-
if (
|
|
30826
|
+
if (isObject2(source.hooks)) {
|
|
30785
30827
|
hooks = mergeHooks(hooks, source.hooks);
|
|
30786
30828
|
returnValue.hooks = hooks;
|
|
30787
30829
|
}
|
|
30788
|
-
if (
|
|
30830
|
+
if (isObject2(source.headers)) {
|
|
30789
30831
|
headers = mergeHeaders(headers, source.headers);
|
|
30790
30832
|
returnValue.headers = headers;
|
|
30791
30833
|
}
|
|
@@ -33893,7 +33935,7 @@ ${queuedText}` : queuedText;
|
|
|
33893
33935
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33894
33936
|
if (settings.merged.general.devtools) {
|
|
33895
33937
|
void (async () => {
|
|
33896
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33938
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-53U6T2D7.js");
|
|
33897
33939
|
await toggleDevToolsPanel(
|
|
33898
33940
|
config,
|
|
33899
33941
|
showErrorDetails,
|
|
@@ -157,10 +157,10 @@ import {
|
|
|
157
157
|
widestLineFromStyledChars,
|
|
158
158
|
wordBreakStyledChars,
|
|
159
159
|
wrapStyledChars
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-IHBI4YWX.js";
|
|
161
161
|
import {
|
|
162
162
|
require_source
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-UE3CHSFT.js";
|
|
164
164
|
import {
|
|
165
165
|
appEvents
|
|
166
166
|
} from "./chunk-5PS3AYFU.js";
|
|
@@ -214,24 +214,24 @@ import {
|
|
|
214
214
|
stripAnsi,
|
|
215
215
|
stripUnsafeCharacters,
|
|
216
216
|
toCodePoints
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-DPETPWEN.js";
|
|
218
218
|
import {
|
|
219
219
|
handleAutoUpdate,
|
|
220
220
|
isDevelopment,
|
|
221
221
|
relaunchApp,
|
|
222
222
|
setUpdateHandler
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-UNIFGKZA.js";
|
|
224
224
|
import {
|
|
225
225
|
isTodoList,
|
|
226
226
|
mapCoreStatusToDisplayStatus,
|
|
227
227
|
require_react
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-RV6ZZ7XX.js";
|
|
229
229
|
import {
|
|
230
230
|
registerCleanup,
|
|
231
231
|
removeCleanup,
|
|
232
232
|
runExitCleanup,
|
|
233
233
|
setupTtyCheck
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-MXXWTJ5T.js";
|
|
235
235
|
import {
|
|
236
236
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
237
237
|
AGENT_TOOL_NAME,
|
|
@@ -437,7 +437,7 @@ import {
|
|
|
437
437
|
validatePlanContent,
|
|
438
438
|
validatePlanPath,
|
|
439
439
|
writeToStdout
|
|
440
|
-
} from "./chunk-
|
|
440
|
+
} from "./chunk-ZYL2LM3Y.js";
|
|
441
441
|
import "./chunk-664ZODQF.js";
|
|
442
442
|
import "./chunk-IUUIT4SU.js";
|
|
443
443
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -15538,6 +15538,7 @@ function ProQuotaDialog({
|
|
|
15538
15538
|
message,
|
|
15539
15539
|
isTerminalQuotaError,
|
|
15540
15540
|
isModelNotFoundError,
|
|
15541
|
+
isCapacityExceeded,
|
|
15541
15542
|
authType,
|
|
15542
15543
|
tierName,
|
|
15543
15544
|
onChoice
|
|
@@ -15556,6 +15557,24 @@ function ProQuotaDialog({
|
|
|
15556
15557
|
key: "retry_later"
|
|
15557
15558
|
}
|
|
15558
15559
|
];
|
|
15560
|
+
} else if (isCapacityExceeded) {
|
|
15561
|
+
items = [
|
|
15562
|
+
{
|
|
15563
|
+
label: "Keep trying",
|
|
15564
|
+
value: "retry_once",
|
|
15565
|
+
key: "retry_once"
|
|
15566
|
+
},
|
|
15567
|
+
{
|
|
15568
|
+
label: `Switch to ${fallbackModel}`,
|
|
15569
|
+
value: "retry_always",
|
|
15570
|
+
key: "retry_always"
|
|
15571
|
+
},
|
|
15572
|
+
{
|
|
15573
|
+
label: "Stop",
|
|
15574
|
+
value: "retry_later",
|
|
15575
|
+
key: "retry_later"
|
|
15576
|
+
}
|
|
15577
|
+
];
|
|
15559
15578
|
} else if (isModelNotFoundError || isTerminalQuotaError) {
|
|
15560
15579
|
const isUltra = isUltraTier(tierName);
|
|
15561
15580
|
items = [
|
|
@@ -17694,6 +17713,7 @@ var DialogManager = ({
|
|
|
17694
17713
|
message: quotaState.proQuotaRequest.message,
|
|
17695
17714
|
isTerminalQuotaError: quotaState.proQuotaRequest.isTerminalQuotaError,
|
|
17696
17715
|
isModelNotFoundError: !!quotaState.proQuotaRequest.isModelNotFoundError,
|
|
17716
|
+
isCapacityExceeded: !!quotaState.proQuotaRequest.isCapacityExceeded,
|
|
17697
17717
|
authType: quotaState.proQuotaRequest.authType,
|
|
17698
17718
|
tierName: config?.getUserTierName(),
|
|
17699
17719
|
onChoice: uiActions.handleProQuotaChoice
|
|
@@ -25417,6 +25437,7 @@ async function openG1Url(path14, campaign) {
|
|
|
25417
25437
|
}
|
|
25418
25438
|
|
|
25419
25439
|
// packages/cli/src/ui/hooks/useQuotaAndFallback.ts
|
|
25440
|
+
var isObject = (val) => typeof val === "object" && val !== null;
|
|
25420
25441
|
function useQuotaAndFallback({
|
|
25421
25442
|
config,
|
|
25422
25443
|
historyManager,
|
|
@@ -25439,6 +25460,16 @@ function useQuotaAndFallback({
|
|
|
25439
25460
|
let message;
|
|
25440
25461
|
let isTerminalQuotaError = false;
|
|
25441
25462
|
let isModelNotFoundError = false;
|
|
25463
|
+
const errorObj = isObject(error) ? error : null;
|
|
25464
|
+
const errorReasonValue = errorObj?.["reason"];
|
|
25465
|
+
const errorReason = typeof errorReasonValue === "string" ? errorReasonValue : void 0;
|
|
25466
|
+
const errorMessageValue = errorObj?.["message"];
|
|
25467
|
+
const errorMessage = typeof errorMessageValue === "string" ? errorMessageValue : void 0;
|
|
25468
|
+
const isCapacityExceeded = errorReason === "MODEL_CAPACITY_EXHAUSTED" || errorReason === "MODEL_CAPACITY_EXCEEDED" || typeof errorMessage === "string" && /exhausted your capacity|capacity exceeded|MODEL_CAPACITY_EXHAUSTED/i.test(
|
|
25469
|
+
errorMessage
|
|
25470
|
+
) || typeof error === "string" && /exhausted your capacity|capacity exceeded|MODEL_CAPACITY_EXHAUSTED/i.test(
|
|
25471
|
+
error
|
|
25472
|
+
);
|
|
25442
25473
|
const usageLimitReachedModel = isProModel(failedModel) ? "all Pro models" : failedModel;
|
|
25443
25474
|
if (error instanceof TerminalQuotaError) {
|
|
25444
25475
|
isTerminalQuotaError = true;
|
|
@@ -25462,14 +25493,24 @@ function useQuotaAndFallback({
|
|
|
25462
25493
|
});
|
|
25463
25494
|
if (creditsResult) return creditsResult;
|
|
25464
25495
|
}
|
|
25465
|
-
|
|
25466
|
-
|
|
25467
|
-
|
|
25468
|
-
|
|
25469
|
-
|
|
25470
|
-
|
|
25471
|
-
|
|
25472
|
-
|
|
25496
|
+
if (isCapacityExceeded) {
|
|
25497
|
+
const messageLines = [
|
|
25498
|
+
`We are currently experiencing high demand for ${usageLimitReachedModel}.`,
|
|
25499
|
+
"We apologize and appreciate your patience.",
|
|
25500
|
+
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25501
|
+
`/model to switch models.`
|
|
25502
|
+
].filter(Boolean);
|
|
25503
|
+
message = messageLines.join("\n");
|
|
25504
|
+
} else {
|
|
25505
|
+
const messageLines = [
|
|
25506
|
+
`Usage limit reached for ${usageLimitReachedModel}.`,
|
|
25507
|
+
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25508
|
+
`/stats model for usage details`,
|
|
25509
|
+
`/model to switch models.`,
|
|
25510
|
+
contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
|
|
25511
|
+
].filter(Boolean);
|
|
25512
|
+
message = messageLines.join("\n");
|
|
25513
|
+
}
|
|
25473
25514
|
} else if (error instanceof ModelNotFoundError) {
|
|
25474
25515
|
isModelNotFoundError = true;
|
|
25475
25516
|
if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
|
|
@@ -25502,7 +25543,7 @@ function useQuotaAndFallback({
|
|
|
25502
25543
|
];
|
|
25503
25544
|
message = messageLines.join("\n");
|
|
25504
25545
|
}
|
|
25505
|
-
if (errorVerbosity === "low" && !isTerminalQuotaError && !isModelNotFoundError) {
|
|
25546
|
+
if (errorVerbosity === "low" && (!isTerminalQuotaError || isCapacityExceeded) && !isModelNotFoundError) {
|
|
25506
25547
|
return "retry_once";
|
|
25507
25548
|
}
|
|
25508
25549
|
setModelSwitchedFromQuotaError(true);
|
|
@@ -25520,6 +25561,7 @@ function useQuotaAndFallback({
|
|
|
25520
25561
|
message,
|
|
25521
25562
|
isTerminalQuotaError,
|
|
25522
25563
|
isModelNotFoundError,
|
|
25564
|
+
isCapacityExceeded,
|
|
25523
25565
|
authType: contentGeneratorConfig?.authType
|
|
25524
25566
|
});
|
|
25525
25567
|
}
|
|
@@ -30675,12 +30717,12 @@ var streamRequest = (request, onUploadProgress, originalBody) => {
|
|
|
30675
30717
|
};
|
|
30676
30718
|
|
|
30677
30719
|
// node_modules/ky/distribution/utils/is.js
|
|
30678
|
-
var
|
|
30720
|
+
var isObject2 = (value) => value !== null && typeof value === "object";
|
|
30679
30721
|
|
|
30680
30722
|
// node_modules/ky/distribution/utils/merge.js
|
|
30681
30723
|
var validateAndMerge = (...sources) => {
|
|
30682
30724
|
for (const source of sources) {
|
|
30683
|
-
if ((!
|
|
30725
|
+
if ((!isObject2(source) || Array.isArray(source)) && source !== void 0) {
|
|
30684
30726
|
throw new TypeError("The `options` argument must be an object");
|
|
30685
30727
|
}
|
|
30686
30728
|
}
|
|
@@ -30725,7 +30767,7 @@ var appendSearchParameters = (target, source) => {
|
|
|
30725
30767
|
}
|
|
30726
30768
|
result.append(String(pair[0]), String(pair[1]));
|
|
30727
30769
|
}
|
|
30728
|
-
} else if (
|
|
30770
|
+
} else if (isObject2(input)) {
|
|
30729
30771
|
for (const [key, value] of Object.entries(input)) {
|
|
30730
30772
|
if (value !== void 0) {
|
|
30731
30773
|
result.append(key, String(value));
|
|
@@ -30752,14 +30794,14 @@ var deepMerge = (...sources) => {
|
|
|
30752
30794
|
returnValue = [];
|
|
30753
30795
|
}
|
|
30754
30796
|
returnValue = [...returnValue, ...source];
|
|
30755
|
-
} else if (
|
|
30797
|
+
} else if (isObject2(source)) {
|
|
30756
30798
|
for (let [key, value] of Object.entries(source)) {
|
|
30757
30799
|
if (key === "signal" && value instanceof globalThis.AbortSignal) {
|
|
30758
30800
|
signals.push(value);
|
|
30759
30801
|
continue;
|
|
30760
30802
|
}
|
|
30761
30803
|
if (key === "context") {
|
|
30762
|
-
if (value !== void 0 && value !== null && (!
|
|
30804
|
+
if (value !== void 0 && value !== null && (!isObject2(value) || Array.isArray(value))) {
|
|
30763
30805
|
throw new TypeError("The `context` option must be an object");
|
|
30764
30806
|
}
|
|
30765
30807
|
returnValue = {
|
|
@@ -30776,16 +30818,16 @@ var deepMerge = (...sources) => {
|
|
|
30776
30818
|
}
|
|
30777
30819
|
continue;
|
|
30778
30820
|
}
|
|
30779
|
-
if (
|
|
30821
|
+
if (isObject2(value) && key in returnValue) {
|
|
30780
30822
|
value = deepMerge(returnValue[key], value);
|
|
30781
30823
|
}
|
|
30782
30824
|
returnValue = { ...returnValue, [key]: value };
|
|
30783
30825
|
}
|
|
30784
|
-
if (
|
|
30826
|
+
if (isObject2(source.hooks)) {
|
|
30785
30827
|
hooks = mergeHooks(hooks, source.hooks);
|
|
30786
30828
|
returnValue.hooks = hooks;
|
|
30787
30829
|
}
|
|
30788
|
-
if (
|
|
30830
|
+
if (isObject2(source.headers)) {
|
|
30789
30831
|
headers = mergeHeaders(headers, source.headers);
|
|
30790
30832
|
returnValue.headers = headers;
|
|
30791
30833
|
}
|
|
@@ -33893,7 +33935,7 @@ ${queuedText}` : queuedText;
|
|
|
33893
33935
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33894
33936
|
if (settings.merged.general.devtools) {
|
|
33895
33937
|
void (async () => {
|
|
33896
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33938
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-VRMTKDJD.js");
|
|
33897
33939
|
await toggleDevToolsPanel(
|
|
33898
33940
|
config,
|
|
33899
33941
|
showErrorDetails,
|