@google/gemini-cli 0.53.0-preview.0 → 0.53.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.
Files changed (66) hide show
  1. package/bundle/{chunk-5RDOS7UZ.js → chunk-2NH5AG3B.js} +175 -39
  2. package/bundle/{chunk-PVCJCQWY.js → chunk-2W4AGAXV.js} +1 -1
  3. package/bundle/{chunk-HF533LET.js → chunk-3A32ZSG7.js} +7774 -14246
  4. package/bundle/{chunk-BX6DTJOD.js → chunk-3QXIQPRB.js} +1 -1
  5. package/bundle/{chunk-SLQKIE73.js → chunk-4SJPXUBO.js} +1 -1
  6. package/bundle/{chunk-XH7QC2TB.js → chunk-4TO4ZFXG.js} +2 -2
  7. package/bundle/{chunk-PKFZO3SN.js → chunk-5544MKWC.js} +1 -1
  8. package/bundle/{chunk-27C6XFMY.js → chunk-5Y7N3RFB.js} +198 -42
  9. package/bundle/{chunk-4OVORMGE.js → chunk-AGHZJVUR.js} +1 -1
  10. package/bundle/{chunk-UJVAPQ7V.js → chunk-AT7LBPDZ.js} +1 -1
  11. package/bundle/{chunk-7VUO7T2C.js → chunk-EVNGSSTE.js} +3 -3
  12. package/bundle/{chunk-SXKIOLLX.js → chunk-I2LQOUTQ.js} +7 -7
  13. package/bundle/chunk-IU6WDAMY.js +1571 -0
  14. package/bundle/chunk-JEAU27VO.js +154 -0
  15. package/bundle/chunk-JR6IZCRZ.js +397034 -0
  16. package/bundle/{chunk-WVDR5L2V.js → chunk-KELPZKO5.js} +67 -54
  17. package/bundle/{chunk-PLMRBJEA.js → chunk-KNB5JW7H.js} +2 -2
  18. package/bundle/{chunk-IODN6H35.js → chunk-KUOIDGSH.js} +1 -1
  19. package/bundle/{chunk-UEI42N7R.js → chunk-KW3DD4IB.js} +3 -3
  20. package/bundle/{chunk-BDSSP5BZ.js → chunk-LPTVZ4FJ.js} +1 -1
  21. package/bundle/{chunk-BRZT2CQU.js → chunk-N2KH22XD.js} +1 -1
  22. package/bundle/{chunk-LUM47MYE.js → chunk-N4JX5RHY.js} +1 -1
  23. package/bundle/{chunk-6AD4A2WF.js → chunk-OFMYNLJO.js} +8 -5
  24. package/bundle/chunk-QUZIMBPB.js +102505 -0
  25. package/bundle/{chunk-HVYOZEAP.js → chunk-RDVVXMLN.js} +3 -3
  26. package/bundle/chunk-TAOISOL2.js +118 -0
  27. package/bundle/{chunk-CTNBR234.js → chunk-TIUOC6Z4.js} +2 -2
  28. package/bundle/chunk-UQGV7WFA.js +398 -0
  29. package/bundle/{chunk-GHVD6PXK.js → chunk-VQ5JKD47.js} +9 -8
  30. package/bundle/chunk-XV2XVUWW.js +512 -0
  31. package/bundle/{chunk-QSTUV3QH.js → chunk-YF4RJFUM.js} +7 -7
  32. package/bundle/chunk-ZJENN63T.js +17332 -0
  33. package/bundle/{cleanup-4FVUYQ7H.js → cleanup-CLX27ZSM.js} +2 -2
  34. package/bundle/{cleanup-XETKRH7X.js → cleanup-HE6L3KVJ.js} +2 -2
  35. package/bundle/{cleanup-ZR34H2GU.js → cleanup-QTYIWJJQ.js} +2 -2
  36. package/bundle/cleanup-WQLF5LTO.js +32 -0
  37. package/bundle/{core-PVG4D2MR.js → core-FG5GQN5T.js} +15 -1
  38. package/bundle/{devtoolsService-OUX7PWP3.js → devtoolsService-6MCOO7GD.js} +2 -2
  39. package/bundle/{devtoolsService-IVPTF5ZJ.js → devtoolsService-ALVEJOWU.js} +2 -2
  40. package/bundle/{devtoolsService-QYDPHHFN.js → devtoolsService-LWOTA4XY.js} +4 -3
  41. package/bundle/devtoolsService-NLJPFQBD.js +4359 -0
  42. package/bundle/{dist-PRJQFPSQ.js → dist-FACZYJNK.js} +15 -1
  43. package/bundle/{core-I73XKBPY.js → dist-KYMVPMD2.js} +15 -1
  44. package/bundle/dist-YR3L73K3.js +2168 -0
  45. package/bundle/{gemini-LA6TNI44.js → gemini-2TTBMK7L.js} +84 -20
  46. package/bundle/{gemini-QKB55UV6.js → gemini-EEGDTU6Z.js} +282 -202
  47. package/bundle/{gemini-E2E3U6PR.js → gemini-HMY2YBVR.js} +84 -20
  48. package/bundle/gemini-RNN5D7OL.js +16491 -0
  49. package/bundle/gemini.js +7 -7
  50. package/bundle/{interactiveCli-OD2LO24X.js → interactiveCli-47BG5E33.js} +99 -9
  51. package/bundle/{interactiveCli-ADLAWPXN.js → interactiveCli-HJK54NFF.js} +406 -297
  52. package/bundle/{interactiveCli-FS3OVPXQ.js → interactiveCli-PIOEDBQZ.js} +99 -9
  53. package/bundle/interactiveCli-UQQGETBL.js +34906 -0
  54. package/bundle/{liteRtServerManager-O7PFOUFD.js → liteRtServerManager-BZXTWG2T.js} +4 -4
  55. package/bundle/{liteRtServerManager-T2Z3RLS3.js → liteRtServerManager-ULQCSZ6V.js} +4 -4
  56. package/bundle/{liteRtServerManager-3SKK7MNE.js → liteRtServerManager-YXO26SKL.js} +4 -4
  57. package/bundle/liteRtServerManager-ZN3L6BPO.js +65 -0
  58. package/bundle/{oauth2-provider-Q433RA6I.js → oauth2-provider-G4XOGQD7.js} +1 -1
  59. package/bundle/{oauth2-provider-E3S5DGLL.js → oauth2-provider-H33CP2XJ.js} +1 -1
  60. package/bundle/{oauth2-provider-DFVE3NYF.js → oauth2-provider-KEB5OWVK.js} +38 -72
  61. package/bundle/oauth2-provider-MZRAKSIZ.js +235 -0
  62. package/bundle/{start-5G2UDZZ6.js → start-AOVRZOK6.js} +6 -6
  63. package/bundle/{start-XMJ23QZN.js → start-JQESP66T.js} +6 -6
  64. package/bundle/{start-3FPYJBRX.js → start-KJPOXM4W.js} +6 -6
  65. package/bundle/start-UN2U7AFE.js +18 -0
  66. package/package.json +1 -1
@@ -157,10 +157,10 @@ import {
157
157
  widestLineFromStyledChars,
158
158
  wordBreakStyledChars,
159
159
  wrapStyledChars
160
- } from "./chunk-QSTUV3QH.js";
160
+ } from "./chunk-YF4RJFUM.js";
161
161
  import {
162
162
  require_source
163
- } from "./chunk-4OVORMGE.js";
163
+ } from "./chunk-4SJPXUBO.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-IODN6H35.js";
217
+ } from "./chunk-KUOIDGSH.js";
218
218
  import {
219
219
  handleAutoUpdate,
220
220
  isDevelopment,
221
221
  relaunchApp,
222
222
  setUpdateHandler
223
- } from "./chunk-XH7QC2TB.js";
223
+ } from "./chunk-TIUOC6Z4.js";
224
224
  import {
225
225
  isTodoList,
226
226
  mapCoreStatusToDisplayStatus,
227
227
  require_react
228
- } from "./chunk-BDSSP5BZ.js";
228
+ } from "./chunk-LPTVZ4FJ.js";
229
229
  import {
230
230
  registerCleanup,
231
231
  removeCleanup,
232
232
  runExitCleanup,
233
233
  setupTtyCheck
234
- } from "./chunk-PKFZO3SN.js";
234
+ } from "./chunk-3QXIQPRB.js";
235
235
  import {
236
236
  ACTIVATE_SKILL_TOOL_NAME,
237
237
  AGENT_TOOL_NAME,
@@ -268,8 +268,10 @@ import {
268
268
  LegacyAgentProtocol,
269
269
  LlmRole,
270
270
  Logger,
271
+ MAX_TOKENS_EXCEEDED_SUGGESTION,
271
272
  ModelNotFoundError,
272
273
  ModelSlashCommandEvent,
274
+ OTHER_BLOCKED_MESSAGE,
273
275
  OverageMenuShownEvent,
274
276
  OverageOptionSelectedEvent,
275
277
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
@@ -281,16 +283,20 @@ import {
281
283
  ProjectIdRequiredError,
282
284
  READ_FILE_DISPLAY_NAME,
283
285
  READ_MANY_FILES_DISPLAY_NAME,
286
+ RECITATION_BLOCKED_MESSAGE,
284
287
  RELEASE_CHANNEL_STABILITY,
285
288
  ROOT_SCHEDULER_ID,
289
+ SAFETY_BLOCKED_MESSAGE,
286
290
  SHELL_TOOL_NAME,
287
291
  Scheduler,
288
292
  ShellExecutionService,
289
293
  SlashCommandStatus,
290
294
  Storage,
295
+ THINKING_ONLY_COMPRESS_SUGGESTION,
291
296
  TOPIC_PARAM_STRATEGIC_INTENT,
292
297
  TOPIC_PARAM_SUMMARY,
293
298
  TOPIC_PARAM_TITLE,
299
+ TRUE_EMPTY_RESPONSE_MESSAGE,
294
300
  TerminalQuotaError,
295
301
  TranscriptionFactory,
296
302
  UPDATE_TOPIC_DISPLAY_NAME,
@@ -412,7 +418,7 @@ import {
412
418
  validatePlanContent,
413
419
  validatePlanPath,
414
420
  writeToStdout
415
- } from "./chunk-27C6XFMY.js";
421
+ } from "./chunk-5Y7N3RFB.js";
416
422
  import "./chunk-664ZODQF.js";
417
423
  import "./chunk-IUUIT4SU.js";
418
424
  import "./chunk-TUDYL3X4.js";
@@ -8031,6 +8037,18 @@ function areModelMetricsEqual(a, b) {
8031
8037
  if (a.api.totalRequests !== b.api.totalRequests || a.api.totalErrors !== b.api.totalErrors || a.api.totalLatencyMs !== b.api.totalLatencyMs) {
8032
8038
  return false;
8033
8039
  }
8040
+ const errorsA = a.api.errorsByType || {};
8041
+ const errorsB = b.api.errorsByType || {};
8042
+ const keysA = Object.keys(errorsA);
8043
+ const keysB = Object.keys(errorsB);
8044
+ if (keysA.length !== keysB.length) {
8045
+ return false;
8046
+ }
8047
+ for (const key of keysA) {
8048
+ if (errorsA[key] !== errorsB[key]) {
8049
+ return false;
8050
+ }
8051
+ }
8034
8052
  if (a.tokens.input !== b.tokens.input || a.tokens.prompt !== b.tokens.prompt || a.tokens.candidates !== b.tokens.candidates || a.tokens.total !== b.tokens.total || a.tokens.cached !== b.tokens.cached || a.tokens.thoughts !== b.tokens.thoughts || a.tokens.tool !== b.tokens.tool) {
8035
8053
  return false;
8036
8054
  }
@@ -27746,6 +27764,52 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27746
27764
  maybeAddLowVerbosityFailureNote
27747
27765
  ]
27748
27766
  );
27767
+ const handleInvalidStreamEvent = (0, import_react99.useCallback)(
27768
+ (eventValue, userMessageTimestamp) => {
27769
+ if (pendingHistoryItemRef.current) {
27770
+ addItem(pendingHistoryItemRef.current, userMessageTimestamp);
27771
+ setPendingHistoryItem(null);
27772
+ }
27773
+ maybeAddSuppressedToolErrorNote(userMessageTimestamp);
27774
+ let text = eventValue?.message?.trim() || "Invalid stream received from model";
27775
+ if (eventValue?.type === "NO_RESPONSE_TEXT") {
27776
+ text = TRUE_EMPTY_RESPONSE_MESSAGE;
27777
+ } else if (eventValue?.type === "THINKING_ONLY_RESPONSE") {
27778
+ text = THINKING_ONLY_COMPRESS_SUGGESTION;
27779
+ } else if (eventValue?.type === "MAX_TOKENS_EXCEEDED") {
27780
+ text = MAX_TOKENS_EXCEEDED_SUGGESTION;
27781
+ } else if (eventValue?.type === "SAFETY_BLOCKED") {
27782
+ text = SAFETY_BLOCKED_MESSAGE;
27783
+ } else if (eventValue?.type === "RECITATION_BLOCKED") {
27784
+ text = RECITATION_BLOCKED_MESSAGE;
27785
+ } else if (eventValue?.type === "OTHER_BLOCKED") {
27786
+ text = OTHER_BLOCKED_MESSAGE;
27787
+ }
27788
+ uiTelemetryService.recordSemanticValidationError(
27789
+ geminiClient.getCurrentSequenceModel() ?? config.getModel(),
27790
+ eventValue?.type || "INVALID_STREAM"
27791
+ );
27792
+ addItem(
27793
+ {
27794
+ type: "error" /* ERROR */,
27795
+ text
27796
+ },
27797
+ userMessageTimestamp
27798
+ );
27799
+ maybeAddLowVerbosityFailureNote(userMessageTimestamp);
27800
+ setThought(null);
27801
+ },
27802
+ [
27803
+ addItem,
27804
+ pendingHistoryItemRef,
27805
+ setPendingHistoryItem,
27806
+ setThought,
27807
+ maybeAddSuppressedToolErrorNote,
27808
+ maybeAddLowVerbosityFailureNote,
27809
+ config,
27810
+ geminiClient
27811
+ ]
27812
+ );
27749
27813
  const handleCitationEvent = (0, import_react99.useCallback)(
27750
27814
  (text, userMessageTimestamp) => {
27751
27815
  if (!showCitations(settings)) {
@@ -28001,7 +28065,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28001
28065
  loopDetectedRef.current = true;
28002
28066
  break;
28003
28067
  case "retry" /* Retry */:
28068
+ break;
28004
28069
  case "invalid_stream" /* InvalidStream */:
28070
+ handleInvalidStreamEvent(event.value, userMessageTimestamp);
28005
28071
  break;
28006
28072
  default: {
28007
28073
  const unreachable = event;
@@ -28033,6 +28099,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28033
28099
  handleChatModelEvent,
28034
28100
  handleAgentExecutionStoppedEvent,
28035
28101
  handleAgentExecutionBlockedEvent,
28102
+ handleInvalidStreamEvent,
28036
28103
  addItem,
28037
28104
  pendingHistoryItemRef,
28038
28105
  setPendingHistoryItem,
@@ -28275,6 +28342,28 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28275
28342
  return false;
28276
28343
  }
28277
28344
  );
28345
+ if (turnCancelledRef.current) {
28346
+ setIsResponding(false);
28347
+ const geminiTools2 = completedAndReadyToSubmitTools.filter(
28348
+ (t) => !t.request.isClientInitiated
28349
+ );
28350
+ if (geminiClient && geminiTools2.length > 0) {
28351
+ const combinedParts = geminiTools2.flatMap(
28352
+ (toolCall) => toolCall.response.responseParts
28353
+ );
28354
+ if (combinedParts.length > 0) {
28355
+ geminiClient.addHistory({
28356
+ role: "user",
28357
+ parts: combinedParts
28358
+ });
28359
+ }
28360
+ }
28361
+ const callIdsToMarkAsSubmitted2 = toolCalls.map(
28362
+ (toolCall) => toolCall.request.callId
28363
+ );
28364
+ markToolsAsSubmitted(callIdsToMarkAsSubmitted2);
28365
+ return;
28366
+ }
28278
28367
  const clientTools = completedAndReadyToSubmitTools.filter(
28279
28368
  (t) => t.request.isClientInitiated
28280
28369
  );
@@ -28412,7 +28501,8 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28412
28501
  isLowErrorVerbosity,
28413
28502
  maybeAddSuppressedToolErrorNote,
28414
28503
  maybeAddLowVerbosityFailureNote,
28415
- setIsResponding
28504
+ setIsResponding,
28505
+ toolCalls
28416
28506
  ]
28417
28507
  );
28418
28508
  const pendingHistoryItems = (0, import_react99.useMemo)(
@@ -33778,7 +33868,7 @@ ${queuedText}` : queuedText;
33778
33868
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33779
33869
  if (settings.merged.general.devtools) {
33780
33870
  void (async () => {
33781
- const { toggleDevToolsPanel } = await import("./devtoolsService-QYDPHHFN.js");
33871
+ const { toggleDevToolsPanel } = await import("./devtoolsService-ALVEJOWU.js");
33782
33872
  await toggleDevToolsPanel(
33783
33873
  config,
33784
33874
  showErrorDetails,