@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
@@ -157,10 +157,10 @@ import {
157
157
  widestLineFromStyledChars,
158
158
  wordBreakStyledChars,
159
159
  wrapStyledChars
160
- } from "./chunk-R34LMPUE.js";
160
+ } from "./chunk-AKCYXG7C.js";
161
161
  import {
162
162
  require_source
163
- } from "./chunk-BIPFNROE.js";
163
+ } from "./chunk-SCBVGZXH.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-C5FHWCAU.js";
217
+ } from "./chunk-ALVDOQNA.js";
218
218
  import {
219
219
  handleAutoUpdate,
220
220
  isDevelopment,
221
221
  relaunchApp,
222
222
  setUpdateHandler
223
- } from "./chunk-TV27OEQP.js";
223
+ } from "./chunk-4SNEOO5E.js";
224
224
  import {
225
225
  isTodoList,
226
226
  mapCoreStatusToDisplayStatus,
227
227
  require_react
228
- } from "./chunk-435NYDJB.js";
228
+ } from "./chunk-VBK54QCZ.js";
229
229
  import {
230
230
  registerCleanup,
231
231
  removeCleanup,
232
232
  runExitCleanup,
233
233
  setupTtyCheck
234
- } from "./chunk-DGFXNTHD.js";
234
+ } from "./chunk-Q73BPF7A.js";
235
235
  import {
236
236
  ACTIVATE_SKILL_TOOL_NAME,
237
237
  AGENT_TOOL_NAME,
@@ -418,7 +418,7 @@ import {
418
418
  validatePlanContent,
419
419
  validatePlanPath,
420
420
  writeToStdout
421
- } from "./chunk-NUVMJEWM.js";
421
+ } from "./chunk-O7SBKM7M.js";
422
422
  import "./chunk-664ZODQF.js";
423
423
  import "./chunk-IUUIT4SU.js";
424
424
  import "./chunk-TUDYL3X4.js";
@@ -15449,8 +15449,16 @@ var CloudFreePrivacyNotice = ({
15449
15449
  ] });
15450
15450
  }
15451
15451
  const items = [
15452
- { label: "Yes", value: true, key: "true" },
15453
- { label: "No", value: false, key: "false" }
15452
+ {
15453
+ label: "Yes, grant permission to use my data for product improvement (Opt-in)",
15454
+ value: true,
15455
+ key: "true"
15456
+ },
15457
+ {
15458
+ label: "No, deny permission to use my data for product improvement (Opt-out)",
15459
+ value: false,
15460
+ key: "false"
15461
+ }
15454
15462
  ];
15455
15463
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Box_default, { flexDirection: "column", marginY: 1, children: [
15456
15464
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Text, { bold: true, color: theme.text.accent, children: "Gemini Code Assist for Individuals Privacy Notice" }),
@@ -15465,12 +15473,15 @@ var CloudFreePrivacyNotice = ({
15465
15473
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Newline, {}),
15466
15474
  /* @__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." }),
15467
15475
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Newline, {}),
15476
+ /* @__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)".` }),
15477
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Newline, {}),
15468
15478
  /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Box_default, { flexDirection: "column", children: [
15469
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Text, { color: theme.text.primary, children: "Allow Google to use this data to develop and improve our products?" }),
15479
+ /* @__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?" }),
15470
15480
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
15471
15481
  RadioButtonSelect,
15472
15482
  {
15473
15483
  items,
15484
+ 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 }) }),
15474
15485
  initialIndex: privacyState.dataCollectionOptIn ? 0 : 1,
15475
15486
  onSelect: (value) => {
15476
15487
  updateDataCollectionOptIn(value);
@@ -20545,13 +20556,7 @@ function useCommandCompletion({
20545
20556
  }
20546
20557
  const lineCodePoints = toCodePoints(buffer.lines[cursorRow] || "");
20547
20558
  const charAfterCompletion = lineCodePoints[end];
20548
- let shouldAddSpace = true;
20549
- if (completionMode === "SLASH" /* SLASH */) {
20550
- const command = slashCompletionRange.getCommandFromSuggestion(suggestion);
20551
- const isExecutableCommand = !!(command && command.action);
20552
- const requiresArguments = !!(command && command.completion);
20553
- shouldAddSpace = !isExecutableCommand || requiresArguments;
20554
- }
20559
+ const shouldAddSpace = true;
20555
20560
  if (charAfterCompletion !== " " && !suggestionText.endsWith("/") && !suggestionText.endsWith("\\") && shouldAddSpace) {
20556
20561
  suggestionText += " ";
20557
20562
  }
@@ -25504,9 +25509,10 @@ function useQuotaAndFallback({
25504
25509
  ];
25505
25510
  message = messageLines.join("\n");
25506
25511
  } else if (VALID_GEMINI_MODELS.has(failedModel)) {
25512
+ 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.";
25507
25513
  const messageLines = [
25508
25514
  `It seems like you don't have access to ${getDisplayString(failedModel)}.`,
25509
- `Your admin might have disabled the access. Contact them to enable the Preview Release Channel.`
25515
+ detailMessage
25510
25516
  ];
25511
25517
  message = messageLines.join("\n");
25512
25518
  } else {
@@ -27090,6 +27096,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27090
27096
  const abortControllerRef = (0, import_react99.useRef)(null);
27091
27097
  const turnCancelledRef = (0, import_react99.useRef)(false);
27092
27098
  const activeQueryIdRef = (0, import_react99.useRef)(null);
27099
+ const historyLengthAfterUserPromptRef = (0, import_react99.useRef)(void 0);
27093
27100
  const previousApprovalModeRef = (0, import_react99.useRef)(
27094
27101
  config.getApprovalMode()
27095
27102
  );
@@ -27416,6 +27423,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27416
27423
  const lastQueryRef = (0, import_react99.useRef)(null);
27417
27424
  const lastPromptIdRef = (0, import_react99.useRef)(null);
27418
27425
  const loopDetectedRef = (0, import_react99.useRef)(false);
27426
+ const autoNudgeAttemptCountRef = (0, import_react99.useRef)(0);
27427
+ const MAX_AUTO_NUDGE_ATTEMPTS = 2;
27428
+ const submitQueryRef = (0, import_react99.useRef)(null);
27419
27429
  const [
27420
27430
  loopDetectionConfirmationRequest,
27421
27431
  setLoopDetectionConfirmationRequest
@@ -28034,7 +28044,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28034
28044
  ]
28035
28045
  );
28036
28046
  const processGeminiStreamEvents = (0, import_react99.useCallback)(
28037
- async (stream, userMessageTimestamp, signal) => {
28047
+ async (stream, userMessageTimestamp, signal, isContinuation, prompt_id) => {
28038
28048
  let geminiMessageBuffer = "";
28039
28049
  const toolCallRequests = [];
28040
28050
  for await (const event of stream) {
@@ -28123,6 +28133,17 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28123
28133
  setPendingHistoryItem(null);
28124
28134
  }
28125
28135
  await scheduleToolCalls(toolCallRequests, signal);
28136
+ } else {
28137
+ const hasVisibleText = geminiMessageBuffer.trim().length > 0;
28138
+ if (isContinuation && !hasVisibleText && autoNudgeAttemptCountRef.current < MAX_AUTO_NUDGE_ATTEMPTS) {
28139
+ autoNudgeAttemptCountRef.current += 1;
28140
+ 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.]";
28141
+ submitQueryRef.current?.(
28142
+ [{ text: nudgeMessage }],
28143
+ { isContinuation: true },
28144
+ prompt_id
28145
+ );
28146
+ }
28126
28147
  }
28127
28148
  return 0 /* Completed */;
28128
28149
  },
@@ -28162,6 +28183,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28162
28183
  activeQueryIdRef.current = queryId;
28163
28184
  const userMessageTimestamp = Date.now();
28164
28185
  if (!options?.isContinuation) {
28186
+ autoNudgeAttemptCountRef.current = 0;
28165
28187
  setModelSwitchedFromQuotaError(false);
28166
28188
  config.setQuotaErrorOccurred(false);
28167
28189
  config.resetBillingTurnState(
@@ -28187,6 +28209,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28187
28209
  if (!shouldProceed || queryToSend === null) {
28188
28210
  return;
28189
28211
  }
28212
+ if (geminiClient) {
28213
+ historyLengthAfterUserPromptRef.current = geminiClient.getHistory().length;
28214
+ }
28190
28215
  if (!options?.isContinuation) {
28191
28216
  if (typeof queryToSend === "string") {
28192
28217
  const promptText = queryToSend;
@@ -28218,7 +28243,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28218
28243
  const processingStatus = await processGeminiStreamEvents(
28219
28244
  stream,
28220
28245
  userMessageTimestamp,
28221
- abortSignal
28246
+ abortSignal,
28247
+ options?.isContinuation,
28248
+ prompt_id
28222
28249
  );
28223
28250
  if (processingStatus === 1 /* UserCancelled */) {
28224
28251
  return;
@@ -28309,6 +28336,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28309
28336
  setIsResponding
28310
28337
  ]
28311
28338
  );
28339
+ submitQueryRef.current = submitQuery;
28312
28340
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28313
28341
  async (newApprovalMode) => {
28314
28342
  if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
@@ -28487,14 +28515,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28487
28515
  });
28488
28516
  }
28489
28517
  setIsResponding(false);
28490
- if (geminiClient) {
28491
- const combinedParts = geminiTools.flatMap(
28492
- (toolCall) => toolCall.response.responseParts
28493
- );
28494
- geminiClient.addHistory({
28495
- role: "user",
28496
- parts: combinedParts
28497
- });
28518
+ if (geminiClient && historyLengthAfterUserPromptRef.current !== void 0) {
28519
+ const targetLength = historyLengthAfterUserPromptRef.current;
28520
+ if (geminiClient.getHistory().length > targetLength) {
28521
+ geminiClient.setHistory(
28522
+ geminiClient.getHistory().slice(0, targetLength)
28523
+ );
28524
+ }
28525
+ historyLengthAfterUserPromptRef.current = void 0;
28498
28526
  }
28499
28527
  const callIdsToMarkAsSubmitted2 = geminiTools.map(
28500
28528
  (toolCall) => toolCall.request.callId
@@ -32932,10 +32960,12 @@ var AppContainer = (props) => {
32932
32960
  enableMouseEvents();
32933
32961
  disableLineWrapping();
32934
32962
  app.rerender();
32963
+ } else if (config.getUseTerminalBuffer()) {
32964
+ app.rerender();
32935
32965
  }
32936
32966
  terminalCapabilityManager.enableSupportedModes();
32937
32967
  refreshStatic();
32938
- }, [refreshStatic, shouldUseAlternateScreen, app]);
32968
+ }, [refreshStatic, shouldUseAlternateScreen, app, config]);
32939
32969
  const [editorError, setEditorError] = (0, import_react121.useState)(null);
32940
32970
  const {
32941
32971
  isEditorDialogOpen,
@@ -33916,7 +33946,7 @@ ${queuedText}` : queuedText;
33916
33946
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33917
33947
  if (settings.merged.general.devtools) {
33918
33948
  void (async () => {
33919
- const { toggleDevToolsPanel } = await import("./devtoolsService-KFURCXJN.js");
33949
+ const { toggleDevToolsPanel } = await import("./devtoolsService-5J53UK6Z.js");
33920
33950
  await toggleDevToolsPanel(
33921
33951
  config,
33922
33952
  showErrorDetails,