@google/gemini-cli 0.57.0-preview.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 (66) hide show
  1. package/bundle/{chunk-ACDZS2RE.js → chunk-3BVBON3V.js} +1 -1
  2. package/bundle/{chunk-2UGGPOEV.js → chunk-3NPMAHLX.js} +1 -1
  3. package/bundle/{chunk-QVDXZMEX.js → chunk-4ALCU2HQ.js} +1 -1
  4. package/bundle/{chunk-NXS624CI.js → chunk-4SNEOO5E.js} +2 -2
  5. package/bundle/{chunk-73OHVDUZ.js → chunk-65C235NM.js} +7 -7
  6. package/bundle/{chunk-HKTHSWSS.js → chunk-AKCYXG7C.js} +7 -7
  7. package/bundle/{chunk-IKGOC5B6.js → chunk-ALVDOQNA.js} +1 -1
  8. package/bundle/{chunk-OFFEM74O.js → chunk-EAK33LFP.js} +1 -1
  9. package/bundle/{chunk-3C6JYNPC.js → chunk-FHDRG5U4.js} +67 -54
  10. package/bundle/{chunk-2UICYJMD.js → chunk-G65GW52B.js} +107 -21
  11. package/bundle/{chunk-WH63Z45A.js → chunk-GK7NUJ35.js} +8 -5
  12. package/bundle/{chunk-SHIJDXMN.js → chunk-GMQ6QNZB.js} +1 -1
  13. package/bundle/chunk-LNXGFWGZ.js +17332 -0
  14. package/bundle/{chunk-O3QB4SVS.js → chunk-MBWROXYM.js} +2 -2
  15. package/bundle/{chunk-W4CY7TCG.js → chunk-NMMXRZ53.js} +2 -2
  16. package/bundle/{chunk-R3JDAZVL.js → chunk-NPOI4K6X.js} +7771 -14363
  17. package/bundle/{chunk-QB46S6FV.js → chunk-NQ4RH42O.js} +9 -8
  18. package/bundle/{chunk-FWGOOSQK.js → chunk-O7SBKM7M.js} +112 -20
  19. package/bundle/{chunk-M6E5CLIH.js → chunk-Q73BPF7A.js} +1 -1
  20. package/bundle/{chunk-XDJMDRLM.js → chunk-QJP6CMLN.js} +3 -3
  21. package/bundle/{chunk-EBKNEOAO.js → chunk-RLDNUS35.js} +1 -1
  22. package/bundle/{chunk-H2URGA7U.js → chunk-S5UX3QS5.js} +3 -3
  23. package/bundle/{chunk-XZF4EZOQ.js → chunk-SCBVGZXH.js} +1 -1
  24. package/bundle/chunk-SWQAIZEQ.js +102506 -0
  25. package/bundle/{chunk-6S4UF4JM.js → chunk-UMQE7UC6.js} +3 -3
  26. package/bundle/{chunk-ZY7Z5W6K.js → chunk-VBK54QCZ.js} +1 -1
  27. package/bundle/chunk-VGGWKRAC.js +154 -0
  28. package/bundle/chunk-W23OOD2C.js +118 -0
  29. package/bundle/chunk-WDFSF5L4.js +397601 -0
  30. package/bundle/chunk-XESAM7IL.js +512 -0
  31. package/bundle/chunk-Y3APL4PE.js +1571 -0
  32. package/bundle/chunk-ZMPGHLGO.js +398 -0
  33. package/bundle/{cleanup-JP2FD3CQ.js → cleanup-2W5DPMY3.js} +2 -2
  34. package/bundle/{cleanup-YFIFTNZ6.js → cleanup-OTHE7RNU.js} +2 -2
  35. package/bundle/{cleanup-Z65H2CUW.js → cleanup-SM67K64R.js} +2 -2
  36. package/bundle/cleanup-XAUT5CMD.js +32 -0
  37. package/bundle/{core-UBOS4Q6R.js → core-US34OW5M.js} +7 -1
  38. package/bundle/{devtoolsService-A34WT2MQ.js → devtoolsService-5J53UK6Z.js} +2 -2
  39. package/bundle/{devtoolsService-ACKZ7HRR.js → devtoolsService-GU2GQSOF.js} +2 -2
  40. package/bundle/{devtoolsService-BHG3WQEY.js → devtoolsService-JBFUXTCT.js} +4 -3
  41. package/bundle/devtoolsService-V46GUHRF.js +4359 -0
  42. package/bundle/{dist-B7OLK6PK.js → dist-5TYMQVIZ.js} +7 -1
  43. package/bundle/{core-EKXLT2AG.js → dist-OWKHVWTR.js} +7 -1
  44. package/bundle/dist-V5VJYW6J.js +2180 -0
  45. package/bundle/{gemini-3U3DNSSI.js → gemini-3M22N2C3.js} +13 -13
  46. package/bundle/{gemini-NJXFBFVJ.js → gemini-LSMTDETS.js} +214 -198
  47. package/bundle/gemini-OZOYJF22.js +17091 -0
  48. package/bundle/{gemini-7Z3ODIIX.js → gemini-W2B6CLJC.js} +13 -13
  49. package/bundle/gemini.js +7 -7
  50. package/bundle/{interactiveCli-FIWFPOOG.js → interactiveCli-D6H37PJQ.js} +40 -18
  51. package/bundle/{interactiveCli-DNV4GCM5.js → interactiveCli-L3ZXOVEV.js} +347 -306
  52. package/bundle/{interactiveCli-LMXAWUCU.js → interactiveCli-LQJM6LRE.js} +40 -18
  53. package/bundle/interactiveCli-RGOYDSMH.js +34984 -0
  54. package/bundle/{liteRtServerManager-P62A6ZVG.js → liteRtServerManager-3BY6TBHG.js} +4 -4
  55. package/bundle/{liteRtServerManager-VBKDVKLU.js → liteRtServerManager-C5WZRQUF.js} +4 -4
  56. package/bundle/{liteRtServerManager-LQMOE7JK.js → liteRtServerManager-IGKUGGP4.js} +4 -4
  57. package/bundle/liteRtServerManager-IJ4I2PZA.js +65 -0
  58. package/bundle/{oauth2-provider-FWKP5A4D.js → oauth2-provider-KSRLPOK3.js} +1 -1
  59. package/bundle/{oauth2-provider-BKNKX6FS.js → oauth2-provider-RWKTMYJF.js} +1 -1
  60. package/bundle/{oauth2-provider-UPRM4Y2J.js → oauth2-provider-VHNLCU4Y.js} +38 -72
  61. package/bundle/oauth2-provider-ZT4OFVMK.js +235 -0
  62. package/bundle/{start-DG3DHS3K.js → start-EXAQFM4Y.js} +6 -6
  63. package/bundle/{start-Y2JKSYXK.js → start-IPZF32E3.js} +6 -6
  64. package/bundle/{start-BMBCT2CF.js → start-SVNTSNHV.js} +6 -6
  65. package/bundle/start-ZXU5BFZY.js +18 -0
  66. package/package.json +1 -1
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  startCommand,
4
4
  startServer
5
- } from "./chunk-XDJMDRLM.js";
5
+ } from "./chunk-UMQE7UC6.js";
6
6
  import {
7
7
  BuiltinCommandLoader,
8
8
  CommandService,
@@ -45,11 +45,11 @@ import {
45
45
  updateAllUpdatableExtensions,
46
46
  updateExtension,
47
47
  validateAuthMethod
48
- } from "./chunk-73OHVDUZ.js";
48
+ } from "./chunk-SWQAIZEQ.js";
49
49
  import {
50
50
  exitCli,
51
51
  require_source
52
- } from "./chunk-XZF4EZOQ.js";
52
+ } from "./chunk-3BVBON3V.js";
53
53
  import {
54
54
  appEvents
55
55
  } from "./chunk-5PS3AYFU.js";
@@ -87,11 +87,11 @@ import {
87
87
  resolveGemmaConfig,
88
88
  saveModelChange,
89
89
  stripAnsi
90
- } from "./chunk-QVDXZMEX.js";
90
+ } from "./chunk-4ALCU2HQ.js";
91
91
  import {
92
92
  RELAUNCH_EXIT_CODE
93
- } from "./chunk-O3QB4SVS.js";
94
- import "./chunk-SHIJDXMN.js";
93
+ } from "./chunk-ZMPGHLGO.js";
94
+ import "./chunk-NQ4RH42O.js";
95
95
  import {
96
96
  cleanupCheckpoints,
97
97
  registerCleanup,
@@ -100,7 +100,7 @@ import {
100
100
  runExitCleanup,
101
101
  runSyncCleanup,
102
102
  setupSignalHandlers
103
- } from "./chunk-M6E5CLIH.js";
103
+ } from "./chunk-VGGWKRAC.js";
104
104
  import {
105
105
  ASK_USER_TOOL_NAME,
106
106
  ApprovalMode,
@@ -254,7 +254,7 @@ import {
254
254
  updatePolicy,
255
255
  writeToStderr,
256
256
  writeToStdout
257
- } from "./chunk-2UICYJMD.js";
257
+ } from "./chunk-NPOI4K6X.js";
258
258
  import "./chunk-664ZODQF.js";
259
259
  import "./chunk-IUUIT4SU.js";
260
260
  import "./chunk-TUDYL3X4.js";
@@ -10855,7 +10855,7 @@ async function runNonInteractive({
10855
10855
  }
10856
10856
  });
10857
10857
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
10858
- const { setupInitialActivityLogger } = await import("./devtoolsService-ACKZ7HRR.js");
10858
+ const { setupInitialActivityLogger } = await import("./devtoolsService-V46GUHRF.js");
10859
10859
  setupInitialActivityLogger(config);
10860
10860
  }
10861
10861
  const { stdout: workingStdout } = createWorkingStdio();
@@ -11365,7 +11365,7 @@ async function runNonInteractive2(params) {
11365
11365
  }
11366
11366
  });
11367
11367
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
11368
- const { setupInitialActivityLogger } = await import("./devtoolsService-ACKZ7HRR.js");
11368
+ const { setupInitialActivityLogger } = await import("./devtoolsService-V46GUHRF.js");
11369
11369
  setupInitialActivityLogger(config);
11370
11370
  }
11371
11371
  const { stdout: workingStdout } = createWorkingStdio();
@@ -16575,7 +16575,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
16575
16575
  }
16576
16576
  }
16577
16577
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
16578
- const { startInteractiveUI: doStartUI } = await import("./interactiveCli-FIWFPOOG.js");
16578
+ const { startInteractiveUI: doStartUI } = await import("./interactiveCli-RGOYDSMH.js");
16579
16579
  await doStartUI(
16580
16580
  config,
16581
16581
  settings,
@@ -16784,7 +16784,7 @@ ${finalArgs[promptIndex + 1]}`;
16784
16784
  await config.storage.initialize();
16785
16785
  adminControlsListner.setConfig(config);
16786
16786
  if (config.isInteractive() && settings.merged.general.devtools) {
16787
- const { setupInitialActivityLogger } = await import("./devtoolsService-ACKZ7HRR.js");
16787
+ const { setupInitialActivityLogger } = await import("./devtoolsService-V46GUHRF.js");
16788
16788
  setupInitialActivityLogger(config);
16789
16789
  }
16790
16790
  registerTelemetryConfig(config);
@@ -16843,7 +16843,7 @@ ${finalArgs[promptIndex + 1]}`;
16843
16843
  const initAppHandle = startupProfiler.start("initialize_app");
16844
16844
  const initializationResult = await initializeApp(config, settings);
16845
16845
  initAppHandle?.end();
16846
- import("./liteRtServerManager-P62A6ZVG.js").then(({ LiteRtServerManager }) => {
16846
+ import("./liteRtServerManager-IJ4I2PZA.js").then(({ LiteRtServerManager }) => {
16847
16847
  const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
16848
16848
  if (!mergedGemma) return;
16849
16849
  const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;
package/bundle/gemini.js CHANGED
@@ -4,10 +4,10 @@ import {
4
4
  RELAUNCH_EXIT_CODE,
5
5
  getScriptArgs,
6
6
  getSpawnConfig
7
- } from "./chunk-O3QB4SVS.js";
8
- import "./chunk-SHIJDXMN.js";
9
- import "./chunk-M6E5CLIH.js";
10
- import "./chunk-2UICYJMD.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-7Z3ODIIX.js");
119
- const { FatalError, writeToStderr } = await import("./dist-B7OLK6PK.js");
120
- const { runExitCleanup } = await import("./cleanup-YFIFTNZ6.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-73OHVDUZ.js";
160
+ } from "./chunk-FHDRG5U4.js";
161
161
  import {
162
162
  require_source
163
- } from "./chunk-XZF4EZOQ.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-QVDXZMEX.js";
217
+ } from "./chunk-GK7NUJ35.js";
218
218
  import {
219
219
  handleAutoUpdate,
220
220
  isDevelopment,
221
221
  relaunchApp,
222
222
  setUpdateHandler
223
- } from "./chunk-O3QB4SVS.js";
223
+ } from "./chunk-MBWROXYM.js";
224
224
  import {
225
225
  isTodoList,
226
226
  mapCoreStatusToDisplayStatus,
227
227
  require_react
228
- } from "./chunk-SHIJDXMN.js";
228
+ } from "./chunk-XESAM7IL.js";
229
229
  import {
230
230
  registerCleanup,
231
231
  removeCleanup,
232
232
  runExitCleanup,
233
233
  setupTtyCheck
234
- } from "./chunk-M6E5CLIH.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-2UICYJMD.js";
440
+ } from "./chunk-G65GW52B.js";
441
441
  import "./chunk-664ZODQF.js";
442
442
  import "./chunk-IUUIT4SU.js";
443
443
  import "./chunk-TUDYL3X4.js";
@@ -27115,6 +27115,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27115
27115
  const abortControllerRef = (0, import_react99.useRef)(null);
27116
27116
  const turnCancelledRef = (0, import_react99.useRef)(false);
27117
27117
  const activeQueryIdRef = (0, import_react99.useRef)(null);
27118
+ const historyLengthAfterUserPromptRef = (0, import_react99.useRef)(void 0);
27118
27119
  const previousApprovalModeRef = (0, import_react99.useRef)(
27119
27120
  config.getApprovalMode()
27120
27121
  );
@@ -27441,6 +27442,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27441
27442
  const lastQueryRef = (0, import_react99.useRef)(null);
27442
27443
  const lastPromptIdRef = (0, import_react99.useRef)(null);
27443
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);
27444
27448
  const [
27445
27449
  loopDetectionConfirmationRequest,
27446
27450
  setLoopDetectionConfirmationRequest
@@ -28059,7 +28063,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28059
28063
  ]
28060
28064
  );
28061
28065
  const processGeminiStreamEvents = (0, import_react99.useCallback)(
28062
- async (stream, userMessageTimestamp, signal) => {
28066
+ async (stream, userMessageTimestamp, signal, isContinuation, prompt_id) => {
28063
28067
  let geminiMessageBuffer = "";
28064
28068
  const toolCallRequests = [];
28065
28069
  for await (const event of stream) {
@@ -28148,6 +28152,17 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28148
28152
  setPendingHistoryItem(null);
28149
28153
  }
28150
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
+ }
28151
28166
  }
28152
28167
  return 0 /* Completed */;
28153
28168
  },
@@ -28187,6 +28202,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28187
28202
  activeQueryIdRef.current = queryId;
28188
28203
  const userMessageTimestamp = Date.now();
28189
28204
  if (!options?.isContinuation) {
28205
+ autoNudgeAttemptCountRef.current = 0;
28190
28206
  setModelSwitchedFromQuotaError(false);
28191
28207
  config.setQuotaErrorOccurred(false);
28192
28208
  config.resetBillingTurnState(
@@ -28212,6 +28228,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28212
28228
  if (!shouldProceed || queryToSend === null) {
28213
28229
  return;
28214
28230
  }
28231
+ if (geminiClient) {
28232
+ historyLengthAfterUserPromptRef.current = geminiClient.getHistory().length;
28233
+ }
28215
28234
  if (!options?.isContinuation) {
28216
28235
  if (typeof queryToSend === "string") {
28217
28236
  const promptText = queryToSend;
@@ -28243,7 +28262,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28243
28262
  const processingStatus = await processGeminiStreamEvents(
28244
28263
  stream,
28245
28264
  userMessageTimestamp,
28246
- abortSignal
28265
+ abortSignal,
28266
+ options?.isContinuation,
28267
+ prompt_id
28247
28268
  );
28248
28269
  if (processingStatus === 1 /* UserCancelled */) {
28249
28270
  return;
@@ -28334,6 +28355,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28334
28355
  setIsResponding
28335
28356
  ]
28336
28357
  );
28358
+ submitQueryRef.current = submitQuery;
28337
28359
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28338
28360
  async (newApprovalMode) => {
28339
28361
  if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
@@ -28512,14 +28534,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28512
28534
  });
28513
28535
  }
28514
28536
  setIsResponding(false);
28515
- if (geminiClient) {
28516
- const combinedParts = geminiTools.flatMap(
28517
- (toolCall) => toolCall.response.responseParts
28518
- );
28519
- geminiClient.addHistory({
28520
- role: "user",
28521
- parts: combinedParts
28522
- });
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;
28523
28545
  }
28524
28546
  const callIdsToMarkAsSubmitted2 = geminiTools.map(
28525
28547
  (toolCall) => toolCall.request.callId
@@ -33943,7 +33965,7 @@ ${queuedText}` : queuedText;
33943
33965
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33944
33966
  if (settings.merged.general.devtools) {
33945
33967
  void (async () => {
33946
- const { toggleDevToolsPanel } = await import("./devtoolsService-ACKZ7HRR.js");
33968
+ const { toggleDevToolsPanel } = await import("./devtoolsService-JBFUXTCT.js");
33947
33969
  await toggleDevToolsPanel(
33948
33970
  config,
33949
33971
  showErrorDetails,