@google/gemini-cli 0.56.0 → 0.57.0-preview.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 (71) hide show
  1. package/bundle/builtin/antigravity-support/SKILL.md +55 -18
  2. package/bundle/builtin/skill-creator/SKILL.md +221 -84
  3. package/bundle/{chunk-3KYPKZPU.js → chunk-3BVBON3V.js} +1 -1
  4. package/bundle/{chunk-DGFXNTHD.js → chunk-3NPMAHLX.js} +1 -1
  5. package/bundle/{chunk-IG5K7R25.js → chunk-4ALCU2HQ.js} +1 -1
  6. package/bundle/{chunk-ISEPPPFO.js → chunk-4SNEOO5E.js} +2 -2
  7. package/bundle/{chunk-CNSLGANE.js → chunk-65C235NM.js} +10 -9
  8. package/bundle/{chunk-R34LMPUE.js → chunk-AKCYXG7C.js} +10 -9
  9. package/bundle/{chunk-C5FHWCAU.js → chunk-ALVDOQNA.js} +1 -1
  10. package/bundle/{chunk-3YGHKCB7.js → chunk-EAK33LFP.js} +1 -1
  11. package/bundle/{chunk-7IXYIWSX.js → chunk-FHDRG5U4.js} +70 -56
  12. package/bundle/{chunk-LZUWGCRJ.js → chunk-G65GW52B.js} +1708 -1352
  13. package/bundle/{chunk-KUIZDCN6.js → chunk-GK7NUJ35.js} +8 -5
  14. package/bundle/{chunk-VBIDFL63.js → chunk-GMQ6QNZB.js} +1 -1
  15. package/bundle/chunk-LNXGFWGZ.js +17332 -0
  16. package/bundle/{chunk-TV27OEQP.js → chunk-MBWROXYM.js} +2 -2
  17. package/bundle/{chunk-M6D6BI7B.js → chunk-NMMXRZ53.js} +2 -2
  18. package/bundle/{chunk-NUVMJEWM.js → chunk-NPOI4K6X.js} +9291 -15583
  19. package/bundle/{chunk-435NYDJB.js → chunk-NQ4RH42O.js} +9 -8
  20. package/bundle/{chunk-MYCBWRZE.js → chunk-O7SBKM7M.js} +1770 -1378
  21. package/bundle/{chunk-HAZMOWRC.js → chunk-Q73BPF7A.js} +1 -1
  22. package/bundle/{chunk-Y3KSGWY2.js → chunk-QJP6CMLN.js} +3 -3
  23. package/bundle/{chunk-BIPFNROE.js → chunk-RLDNUS35.js} +1 -1
  24. package/bundle/{chunk-ZXYNNAXR.js → chunk-S5UX3QS5.js} +3 -3
  25. package/bundle/{chunk-Y734TK7O.js → chunk-SCBVGZXH.js} +1 -1
  26. package/bundle/chunk-SWQAIZEQ.js +102506 -0
  27. package/bundle/{chunk-MKKOABMJ.js → chunk-UMQE7UC6.js} +3 -3
  28. package/bundle/{chunk-JFVPVDW6.js → chunk-VBK54QCZ.js} +1 -1
  29. package/bundle/chunk-VGGWKRAC.js +154 -0
  30. package/bundle/chunk-W23OOD2C.js +118 -0
  31. package/bundle/chunk-WDFSF5L4.js +397601 -0
  32. package/bundle/chunk-XESAM7IL.js +512 -0
  33. package/bundle/chunk-Y3APL4PE.js +1571 -0
  34. package/bundle/chunk-ZMPGHLGO.js +398 -0
  35. package/bundle/{cleanup-IZHI7N6V.js → cleanup-2W5DPMY3.js} +2 -2
  36. package/bundle/{cleanup-JZLQPF2L.js → cleanup-OTHE7RNU.js} +2 -2
  37. package/bundle/{cleanup-LJAAR5DT.js → cleanup-SM67K64R.js} +2 -2
  38. package/bundle/cleanup-XAUT5CMD.js +32 -0
  39. package/bundle/{core-TJ2XBV6Y.js → core-US34OW5M.js} +9 -1
  40. package/bundle/{devtoolsService-KFURCXJN.js → devtoolsService-5J53UK6Z.js} +2 -2
  41. package/bundle/{devtoolsService-BFW3BN3D.js → devtoolsService-GU2GQSOF.js} +2 -2
  42. package/bundle/{devtoolsService-NWA77XKC.js → devtoolsService-JBFUXTCT.js} +4 -3
  43. package/bundle/devtoolsService-V46GUHRF.js +4359 -0
  44. package/bundle/{dist-7KO3HJ4C.js → dist-5TYMQVIZ.js} +9 -1
  45. package/bundle/{core-BQJQAXVF.js → dist-OWKHVWTR.js} +9 -1
  46. package/bundle/dist-V5VJYW6J.js +2180 -0
  47. package/bundle/docs/changelogs/latest.md +224 -3
  48. package/bundle/docs/get-started/authentication.mdx +1 -1
  49. package/bundle/docs/reference/commands.md +7 -5
  50. package/bundle/{gemini-54R2PJOR.js → gemini-3M22N2C3.js} +19 -16
  51. package/bundle/{gemini-KK7AERSF.js → gemini-LSMTDETS.js} +19 -16
  52. package/bundle/{gemini-2RHAL2LS.js → gemini-OZOYJF22.js} +219 -200
  53. package/bundle/gemini-W2B6CLJC.js +17091 -0
  54. package/bundle/gemini.js +7 -7
  55. package/bundle/{interactiveCli-QBZRIN4M.js → interactiveCli-D6H37PJQ.js} +60 -30
  56. package/bundle/{interactiveCli-BAGEJ4VO.js → interactiveCli-L3ZXOVEV.js} +367 -318
  57. package/bundle/{interactiveCli-F5YXG24U.js → interactiveCli-LQJM6LRE.js} +60 -30
  58. package/bundle/interactiveCli-RGOYDSMH.js +34984 -0
  59. package/bundle/{liteRtServerManager-CYBHL4LH.js → liteRtServerManager-3BY6TBHG.js} +4 -4
  60. package/bundle/{liteRtServerManager-DMTHAOJH.js → liteRtServerManager-C5WZRQUF.js} +4 -4
  61. package/bundle/{liteRtServerManager-7LTDMYKI.js → liteRtServerManager-IGKUGGP4.js} +4 -4
  62. package/bundle/liteRtServerManager-IJ4I2PZA.js +65 -0
  63. package/bundle/{oauth2-provider-NOSS4GIR.js → oauth2-provider-KSRLPOK3.js} +1 -1
  64. package/bundle/{oauth2-provider-S2564L6K.js → oauth2-provider-RWKTMYJF.js} +1 -1
  65. package/bundle/{oauth2-provider-HNMIIJDH.js → oauth2-provider-VHNLCU4Y.js} +38 -72
  66. package/bundle/oauth2-provider-ZT4OFVMK.js +235 -0
  67. package/bundle/{start-L2WLGVI3.js → start-EXAQFM4Y.js} +6 -6
  68. package/bundle/{start-UGLCJG5Y.js → start-IPZF32E3.js} +6 -6
  69. package/bundle/{start-5F3JQ7EX.js → start-SVNTSNHV.js} +6 -6
  70. package/bundle/start-ZXU5BFZY.js +18 -0
  71. package/package.json +1 -1
package/bundle/gemini.js CHANGED
@@ -4,10 +4,10 @@ import {
4
4
  RELAUNCH_EXIT_CODE,
5
5
  getScriptArgs,
6
6
  getSpawnConfig
7
- } from "./chunk-M6D6BI7B.js";
8
- import "./chunk-VBIDFL63.js";
9
- import "./chunk-HAZMOWRC.js";
10
- import "./chunk-LZUWGCRJ.js";
7
+ } from "./chunk-NMMXRZ53.js";
8
+ import "./chunk-GMQ6QNZB.js";
9
+ import "./chunk-EAK33LFP.js";
10
+ import "./chunk-WDFSF5L4.js";
11
11
  import "./chunk-664ZODQF.js";
12
12
  import "./chunk-IUUIT4SU.js";
13
13
  import "./chunk-TUDYL3X4.js";
@@ -115,9 +115,9 @@ ${error instanceof Error ? error.stack ?? error.message : String(error)}
115
115
  }
116
116
  }
117
117
  } else {
118
- const { main } = await import("./gemini-KK7AERSF.js");
119
- const { FatalError, writeToStderr } = await import("./dist-7KO3HJ4C.js");
120
- const { runExitCleanup } = await import("./cleanup-JZLQPF2L.js");
118
+ const { main } = await import("./gemini-OZOYJF22.js");
119
+ const { FatalError, writeToStderr } = await import("./dist-5TYMQVIZ.js");
120
+ const { runExitCleanup } = await import("./cleanup-XAUT5CMD.js");
121
121
  main().catch(async (error) => {
122
122
  const cleanupTimeout = setTimeout(() => {
123
123
  writeToStderr("Cleanup timed out, forcing exit...\n");
@@ -157,10 +157,10 @@ import {
157
157
  widestLineFromStyledChars,
158
158
  wordBreakStyledChars,
159
159
  wrapStyledChars
160
- } from "./chunk-CNSLGANE.js";
160
+ } from "./chunk-FHDRG5U4.js";
161
161
  import {
162
162
  require_source
163
- } from "./chunk-3KYPKZPU.js";
163
+ } from "./chunk-Y3APL4PE.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-IG5K7R25.js";
217
+ } from "./chunk-GK7NUJ35.js";
218
218
  import {
219
219
  handleAutoUpdate,
220
220
  isDevelopment,
221
221
  relaunchApp,
222
222
  setUpdateHandler
223
- } from "./chunk-M6D6BI7B.js";
223
+ } from "./chunk-MBWROXYM.js";
224
224
  import {
225
225
  isTodoList,
226
226
  mapCoreStatusToDisplayStatus,
227
227
  require_react
228
- } from "./chunk-VBIDFL63.js";
228
+ } from "./chunk-XESAM7IL.js";
229
229
  import {
230
230
  registerCleanup,
231
231
  removeCleanup,
232
232
  runExitCleanup,
233
233
  setupTtyCheck
234
- } from "./chunk-HAZMOWRC.js";
234
+ } from "./chunk-3NPMAHLX.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-LZUWGCRJ.js";
440
+ } from "./chunk-G65GW52B.js";
441
441
  import "./chunk-664ZODQF.js";
442
442
  import "./chunk-IUUIT4SU.js";
443
443
  import "./chunk-TUDYL3X4.js";
@@ -15468,8 +15468,16 @@ var CloudFreePrivacyNotice = ({
15468
15468
  ] });
15469
15469
  }
15470
15470
  const items = [
15471
- { label: "Yes", value: true, key: "true" },
15472
- { label: "No", value: false, key: "false" }
15471
+ {
15472
+ label: "Yes, grant permission to use my data for product improvement (Opt-in)",
15473
+ value: true,
15474
+ key: "true"
15475
+ },
15476
+ {
15477
+ label: "No, deny permission to use my data for product improvement (Opt-out)",
15478
+ value: false,
15479
+ key: "false"
15480
+ }
15473
15481
  ];
15474
15482
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Box_default, { flexDirection: "column", marginY: 1, children: [
15475
15483
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Text, { bold: true, color: theme.text.accent, children: "Gemini Code Assist for Individuals Privacy Notice" }),
@@ -15484,12 +15492,15 @@ var CloudFreePrivacyNotice = ({
15484
15492
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Newline, {}),
15485
15493
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Text, { color: theme.text.primary, children: "To help with quality and improve our products (such as generative machine-learning models), human reviewers may read, annotate, and process the data collected above. We take steps to protect your privacy as part of this process. This includes disconnecting the data from your Google Account before reviewers see or annotate it, and storing those disconnected copies for up to 18 months. Please don't submit confidential information or any data you wouldn't want a reviewer to see or Google to use to improve our products, services and machine-learning technologies." }),
15486
15494
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Newline, {}),
15495
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Text, { color: theme.text.primary, children: `If you don't want this data used to improve Google's products and services, you can opt out by selecting "No, deny permission to use my data for product improvement (Opt-out)" below. Otherwise, you can opt in by selecting "Yes, grant permission to use my data for product improvement (Opt-in)".` }),
15496
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Newline, {}),
15487
15497
  /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Box_default, { flexDirection: "column", children: [
15488
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Text, { color: theme.text.primary, children: "Allow Google to use this data to develop and improve our products?" }),
15498
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Text, { color: theme.text.primary, children: "Allow Google to use this data to develop and improve our products and services?" }),
15489
15499
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
15490
15500
  RadioButtonSelect,
15491
15501
  {
15492
15502
  items,
15503
+ renderItem: (item, { titleColor }) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Text, { color: titleColor, wrap: "wrap", children: item.label }) }),
15493
15504
  initialIndex: privacyState.dataCollectionOptIn ? 0 : 1,
15494
15505
  onSelect: (value) => {
15495
15506
  updateDataCollectionOptIn(value);
@@ -20564,13 +20575,7 @@ function useCommandCompletion({
20564
20575
  }
20565
20576
  const lineCodePoints = toCodePoints(buffer.lines[cursorRow] || "");
20566
20577
  const charAfterCompletion = lineCodePoints[end];
20567
- let shouldAddSpace = true;
20568
- if (completionMode === "SLASH" /* SLASH */) {
20569
- const command = slashCompletionRange.getCommandFromSuggestion(suggestion);
20570
- const isExecutableCommand = !!(command && command.action);
20571
- const requiresArguments = !!(command && command.completion);
20572
- shouldAddSpace = !isExecutableCommand || requiresArguments;
20573
- }
20578
+ const shouldAddSpace = true;
20574
20579
  if (charAfterCompletion !== " " && !suggestionText.endsWith("/") && !suggestionText.endsWith("\\") && shouldAddSpace) {
20575
20580
  suggestionText += " ";
20576
20581
  }
@@ -25523,9 +25528,10 @@ function useQuotaAndFallback({
25523
25528
  ];
25524
25529
  message = messageLines.join("\n");
25525
25530
  } else if (VALID_GEMINI_MODELS.has(failedModel)) {
25531
+ const detailMessage = userTier === UserTierId.FREE ? "This model is not available for personal accounts." : "Your admin might have disabled the access. Contact them to enable the Preview Release Channel.";
25526
25532
  const messageLines = [
25527
25533
  `It seems like you don't have access to ${getDisplayString(failedModel)}.`,
25528
- `Your admin might have disabled the access. Contact them to enable the Preview Release Channel.`
25534
+ detailMessage
25529
25535
  ];
25530
25536
  message = messageLines.join("\n");
25531
25537
  } else {
@@ -27109,6 +27115,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27109
27115
  const abortControllerRef = (0, import_react99.useRef)(null);
27110
27116
  const turnCancelledRef = (0, import_react99.useRef)(false);
27111
27117
  const activeQueryIdRef = (0, import_react99.useRef)(null);
27118
+ const historyLengthAfterUserPromptRef = (0, import_react99.useRef)(void 0);
27112
27119
  const previousApprovalModeRef = (0, import_react99.useRef)(
27113
27120
  config.getApprovalMode()
27114
27121
  );
@@ -27435,6 +27442,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27435
27442
  const lastQueryRef = (0, import_react99.useRef)(null);
27436
27443
  const lastPromptIdRef = (0, import_react99.useRef)(null);
27437
27444
  const loopDetectedRef = (0, import_react99.useRef)(false);
27445
+ const autoNudgeAttemptCountRef = (0, import_react99.useRef)(0);
27446
+ const MAX_AUTO_NUDGE_ATTEMPTS = 2;
27447
+ const submitQueryRef = (0, import_react99.useRef)(null);
27438
27448
  const [
27439
27449
  loopDetectionConfirmationRequest,
27440
27450
  setLoopDetectionConfirmationRequest
@@ -28053,7 +28063,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28053
28063
  ]
28054
28064
  );
28055
28065
  const processGeminiStreamEvents = (0, import_react99.useCallback)(
28056
- async (stream, userMessageTimestamp, signal) => {
28066
+ async (stream, userMessageTimestamp, signal, isContinuation, prompt_id) => {
28057
28067
  let geminiMessageBuffer = "";
28058
28068
  const toolCallRequests = [];
28059
28069
  for await (const event of stream) {
@@ -28142,6 +28152,17 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28142
28152
  setPendingHistoryItem(null);
28143
28153
  }
28144
28154
  await scheduleToolCalls(toolCallRequests, signal);
28155
+ } else {
28156
+ const hasVisibleText = geminiMessageBuffer.trim().length > 0;
28157
+ if (isContinuation && !hasVisibleText && autoNudgeAttemptCountRef.current < MAX_AUTO_NUDGE_ATTEMPTS) {
28158
+ autoNudgeAttemptCountRef.current += 1;
28159
+ const nudgeMessage = "[System: You successfully executed a tool but returned an empty response. Please analyze the tool output and explain your progress or final answer.]";
28160
+ submitQueryRef.current?.(
28161
+ [{ text: nudgeMessage }],
28162
+ { isContinuation: true },
28163
+ prompt_id
28164
+ );
28165
+ }
28145
28166
  }
28146
28167
  return 0 /* Completed */;
28147
28168
  },
@@ -28181,6 +28202,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28181
28202
  activeQueryIdRef.current = queryId;
28182
28203
  const userMessageTimestamp = Date.now();
28183
28204
  if (!options?.isContinuation) {
28205
+ autoNudgeAttemptCountRef.current = 0;
28184
28206
  setModelSwitchedFromQuotaError(false);
28185
28207
  config.setQuotaErrorOccurred(false);
28186
28208
  config.resetBillingTurnState(
@@ -28206,6 +28228,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28206
28228
  if (!shouldProceed || queryToSend === null) {
28207
28229
  return;
28208
28230
  }
28231
+ if (geminiClient) {
28232
+ historyLengthAfterUserPromptRef.current = geminiClient.getHistory().length;
28233
+ }
28209
28234
  if (!options?.isContinuation) {
28210
28235
  if (typeof queryToSend === "string") {
28211
28236
  const promptText = queryToSend;
@@ -28237,7 +28262,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28237
28262
  const processingStatus = await processGeminiStreamEvents(
28238
28263
  stream,
28239
28264
  userMessageTimestamp,
28240
- abortSignal
28265
+ abortSignal,
28266
+ options?.isContinuation,
28267
+ prompt_id
28241
28268
  );
28242
28269
  if (processingStatus === 1 /* UserCancelled */) {
28243
28270
  return;
@@ -28328,6 +28355,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28328
28355
  setIsResponding
28329
28356
  ]
28330
28357
  );
28358
+ submitQueryRef.current = submitQuery;
28331
28359
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28332
28360
  async (newApprovalMode) => {
28333
28361
  if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
@@ -28506,14 +28534,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28506
28534
  });
28507
28535
  }
28508
28536
  setIsResponding(false);
28509
- if (geminiClient) {
28510
- const combinedParts = geminiTools.flatMap(
28511
- (toolCall) => toolCall.response.responseParts
28512
- );
28513
- geminiClient.addHistory({
28514
- role: "user",
28515
- parts: combinedParts
28516
- });
28537
+ if (geminiClient && historyLengthAfterUserPromptRef.current !== void 0) {
28538
+ const targetLength = historyLengthAfterUserPromptRef.current;
28539
+ if (geminiClient.getHistory().length > targetLength) {
28540
+ geminiClient.setHistory(
28541
+ geminiClient.getHistory().slice(0, targetLength)
28542
+ );
28543
+ }
28544
+ historyLengthAfterUserPromptRef.current = void 0;
28517
28545
  }
28518
28546
  const callIdsToMarkAsSubmitted2 = geminiTools.map(
28519
28547
  (toolCall) => toolCall.request.callId
@@ -32951,10 +32979,12 @@ var AppContainer = (props) => {
32951
32979
  enableMouseEvents();
32952
32980
  disableLineWrapping();
32953
32981
  app.rerender();
32982
+ } else if (config.getUseTerminalBuffer()) {
32983
+ app.rerender();
32954
32984
  }
32955
32985
  terminalCapabilityManager.enableSupportedModes();
32956
32986
  refreshStatic();
32957
- }, [refreshStatic, shouldUseAlternateScreen, app]);
32987
+ }, [refreshStatic, shouldUseAlternateScreen, app, config]);
32958
32988
  const [editorError, setEditorError] = (0, import_react121.useState)(null);
32959
32989
  const {
32960
32990
  isEditorDialogOpen,
@@ -33935,7 +33965,7 @@ ${queuedText}` : queuedText;
33935
33965
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33936
33966
  if (settings.merged.general.devtools) {
33937
33967
  void (async () => {
33938
- const { toggleDevToolsPanel } = await import("./devtoolsService-BFW3BN3D.js");
33968
+ const { toggleDevToolsPanel } = await import("./devtoolsService-JBFUXTCT.js");
33939
33969
  await toggleDevToolsPanel(
33940
33970
  config,
33941
33971
  showErrorDetails,