@google/gemini-cli 0.69.0-preview.0 → 0.70.0-preview.0

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 (75) hide show
  1. package/bundle/{chunk-LYKP3S67.js → chunk-65MRMUKB.js} +625 -22
  2. package/bundle/{chunk-CGQSFR2I.js → chunk-6XLLXGZQ.js} +1 -1
  3. package/bundle/{chunk-U5FJ6OGB.js → chunk-AMGYQYS7.js} +35 -29
  4. package/bundle/{chunk-SYOIMUZI.js → chunk-BCL7DJOQ.js} +1165 -21669
  5. package/bundle/{chunk-6KCLIS6W.js → chunk-BOYVA4SV.js} +1 -1
  6. package/bundle/{chunk-YODS6HR2.js → chunk-CJ7YZ55P.js} +3 -3
  7. package/bundle/{chunk-BRHBBQC5.js → chunk-CMUPNBQQ.js} +35 -29
  8. package/bundle/{chunk-V7L3FMBE.js → chunk-ECLDXLDB.js} +3 -3
  9. package/bundle/{chunk-VQTELFV3.js → chunk-F6P6PQSG.js} +1 -1
  10. package/bundle/{chunk-CWHEOJXF.js → chunk-FDIF7V5C.js} +1 -1
  11. package/bundle/{chunk-UW3ZS3BH.js → chunk-FGTABIOQ.js} +1 -1
  12. package/bundle/{chunk-2ONJU4V7.js → chunk-HBTS2REO.js} +1 -1
  13. package/bundle/{chunk-DWMZSQYG.js → chunk-I5QSCSQU.js} +65559 -51236
  14. package/bundle/{chunk-4SOPZCNA.js → chunk-IS5SQ7HP.js} +625 -22
  15. package/bundle/{chunk-RBDD6IBU.js → chunk-L5UVIFFB.js} +1165 -21669
  16. package/bundle/{chunk-IUUIT4SU.js → chunk-N7J54YNL.js} +1 -0
  17. package/bundle/{chunk-PH5XENTH.js → chunk-NFAJ5FW5.js} +1 -1
  18. package/bundle/{chunk-GQ7FZNO2.js → chunk-NFBC76U4.js} +1 -1
  19. package/bundle/{chunk-KUXCUQKX.js → chunk-O2DXIYZO.js} +65411 -51125
  20. package/bundle/{chunk-C5BED6L6.js → chunk-O5EBPO5F.js} +35 -29
  21. package/bundle/{chunk-2KKDGWF2.js → chunk-RTIGPATB.js} +1 -1
  22. package/bundle/{chunk-JJWPYMIO.js → chunk-RVYQZ73V.js} +3 -3
  23. package/bundle/{chunk-MP4TVGOP.js → chunk-SA2VIQNQ.js} +65559 -51236
  24. package/bundle/{chunk-GDCMMKZ2.js → chunk-STY67ND2.js} +1 -1
  25. package/bundle/{chunk-3HEOCQDN.js → chunk-SXOGAWDG.js} +1 -1
  26. package/bundle/{chunk-UAHZWXSG.js → chunk-T7277DWX.js} +1 -1
  27. package/bundle/{chunk-U3FFDEKY.js → chunk-TX3SX2WI.js} +625 -22
  28. package/bundle/{chunk-664ZODQF.js → chunk-W2AJR23G.js} +137 -58
  29. package/bundle/{chunk-YP5TA33N.js → chunk-ZUQTNDGH.js} +1165 -21669
  30. package/bundle/{cleanup-3T2KXSP4.js → cleanup-44LV7E4R.js} +4 -4
  31. package/bundle/{cleanup-NNQCI4KC.js → cleanup-O4QBMRVU.js} +4 -4
  32. package/bundle/{cleanup-TA4VYDXQ.js → cleanup-WMYSWXJR.js} +4 -4
  33. package/bundle/{core-TUJHM7E7.js → core-DJ7VMWCC.js} +13 -3
  34. package/bundle/{core-6XF5EO7Z.js → core-LJXCBOFM.js} +13 -3
  35. package/bundle/{devtools-TYCPOPV3.js → devtools-WUGMIOCT.js} +1 -1
  36. package/bundle/devtoolsService-D4VCGQMJ.js +919 -0
  37. package/bundle/devtoolsService-EBOCEFTO.js +918 -0
  38. package/bundle/devtoolsService-G4CPAW3U.js +918 -0
  39. package/bundle/{dist-OSQFIX7F.js → dist-QSS2VWMY.js} +13 -3
  40. package/bundle/docs/changelogs/index.md +22 -0
  41. package/bundle/docs/changelogs/latest.md +100 -92
  42. package/bundle/docs/changelogs/preview.md +116 -104
  43. package/bundle/docs/cli/enterprise.md +23 -5
  44. package/bundle/docs/ide-integration/ide-companion-spec.md +10 -4
  45. package/bundle/docs/reference/policy-engine.md +45 -6
  46. package/bundle/docs/tools/shell.md +2 -1
  47. package/bundle/{formatError-LJFIC7G3.js → formatError-3QIVJAE5.js} +4 -4
  48. package/bundle/{formatError-MIUNQEYE.js → formatError-I5Q2HGMN.js} +4 -4
  49. package/bundle/{formatError-KEQ3HU3Y.js → formatError-NLKMYJNL.js} +4 -4
  50. package/bundle/{gemini-ZZZEFPSK.js → gemini-4325ARIU.js} +676 -288
  51. package/bundle/{gemini-22ON2CZG.js → gemini-J7ZRUAXR.js} +676 -288
  52. package/bundle/{gemini-HLS52ZNZ.js → gemini-LOYZXP6I.js} +676 -288
  53. package/bundle/gemini.js +35 -17
  54. package/bundle/{getMachineId-bsd-TXG52NKR.js → getMachineId-bsd-3TGNBDZQ.js} +1 -1
  55. package/bundle/{getMachineId-darwin-7OE4DDZ6.js → getMachineId-darwin-2CFT4JKO.js} +1 -1
  56. package/bundle/{getMachineId-linux-SHIFKOOX.js → getMachineId-linux-BXATTKN2.js} +1 -1
  57. package/bundle/{getMachineId-unsupported-5U5DOEYY.js → getMachineId-unsupported-VHPOSMKR.js} +1 -1
  58. package/bundle/{getMachineId-win-6KLLGOI4.js → getMachineId-win-IGXROMTR.js} +1 -1
  59. package/bundle/{interactiveCli-5HMWVTK2.js → interactiveCli-AQ67IY7V.js} +36 -18
  60. package/bundle/{interactiveCli-NKFQZXB5.js → interactiveCli-CEIWZCYF.js} +36 -18
  61. package/bundle/{interactiveCli-HQBE3C3C.js → interactiveCli-O2L63RLG.js} +36 -18
  62. package/bundle/{liteRtServerManager-AG4Y5JMZ.js → liteRtServerManager-EZFHT2B3.js} +6 -6
  63. package/bundle/{liteRtServerManager-OFNVXXQ4.js → liteRtServerManager-HMCB6A65.js} +6 -6
  64. package/bundle/{liteRtServerManager-2IOXWO76.js → liteRtServerManager-MH32CAZ5.js} +6 -6
  65. package/bundle/{oauth2-provider-2DHNJ2S3.js → oauth2-provider-3TFNA7VY.js} +3 -3
  66. package/bundle/{oauth2-provider-YDNSNN32.js → oauth2-provider-NPOZQDQO.js} +3 -3
  67. package/bundle/{oauth2-provider-OEGXLWIL.js → oauth2-provider-UXC7XFV6.js} +3 -3
  68. package/bundle/{src-XZYPU6PJ.js → src-MVBNXN6P.js} +3 -3504
  69. package/bundle/{start-JSVKPUTV.js → start-I2GOKFKQ.js} +8 -8
  70. package/bundle/{start-N33LF5WK.js → start-JIKLB3S3.js} +8 -8
  71. package/bundle/{start-7GJH3MKY.js → start-NSYEL7UE.js} +8 -8
  72. package/package.json +1 -1
  73. package/bundle/devtoolsService-7EMPANTX.js +0 -4421
  74. package/bundle/devtoolsService-I7WFRUEA.js +0 -4422
  75. package/bundle/devtoolsService-RCBUZGYD.js +0 -4421
@@ -149,10 +149,10 @@ import {
149
149
  useUIState,
150
150
  useVimMode,
151
151
  validateAuthMethod
152
- } from "./chunk-RBDD6IBU.js";
152
+ } from "./chunk-L5UVIFFB.js";
153
153
  import {
154
154
  require_source
155
- } from "./chunk-6KCLIS6W.js";
155
+ } from "./chunk-BOYVA4SV.js";
156
156
  import {
157
157
  appEvents
158
158
  } from "./chunk-5PS3AYFU.js";
@@ -226,25 +226,25 @@ import {
226
226
  widestLineFromStyledChars,
227
227
  wordBreakStyledChars,
228
228
  wrapStyledChars
229
- } from "./chunk-LYKP3S67.js";
229
+ } from "./chunk-IS5SQ7HP.js";
230
230
  import {
231
231
  handleAutoUpdate,
232
232
  isDevelopment,
233
233
  relaunchApp,
234
234
  require_semver,
235
235
  setUpdateHandler
236
- } from "./chunk-U5FJ6OGB.js";
236
+ } from "./chunk-CMUPNBQQ.js";
237
237
  import {
238
238
  isTodoList,
239
239
  mapCoreStatusToDisplayStatus,
240
240
  require_react
241
- } from "./chunk-GDCMMKZ2.js";
241
+ } from "./chunk-STY67ND2.js";
242
242
  import {
243
243
  registerCleanup,
244
244
  removeCleanup,
245
245
  runExitCleanup,
246
246
  setupTtyCheck
247
- } from "./chunk-CWHEOJXF.js";
247
+ } from "./chunk-6XLLXGZQ.js";
248
248
  import {
249
249
  ACTIVATE_SKILL_TOOL_NAME,
250
250
  AGENT_TOOL_NAME,
@@ -441,9 +441,9 @@ import {
441
441
  validatePlanContent,
442
442
  validatePlanPath,
443
443
  writeToStdout
444
- } from "./chunk-DWMZSQYG.js";
445
- import "./chunk-664ZODQF.js";
446
- import "./chunk-IUUIT4SU.js";
444
+ } from "./chunk-I5QSCSQU.js";
445
+ import "./chunk-W2AJR23G.js";
446
+ import "./chunk-N7J54YNL.js";
447
447
  import "./chunk-L6PII3GR.js";
448
448
  import {
449
449
  __commonJS,
@@ -28432,6 +28432,8 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28432
28432
  );
28433
28433
  const cancelPromiseRef = (0, import_react102.useRef)(Promise.resolve());
28434
28434
  const activeQueryIdRef = (0, import_react102.useRef)(null);
28435
+ const lastQueryRef = (0, import_react102.useRef)(null);
28436
+ const lastPromptIdRef = (0, import_react102.useRef)(null);
28435
28437
  const previousApprovalModeRef = (0, import_react102.useRef)(
28436
28438
  config.getApprovalMode()
28437
28439
  );
@@ -28451,7 +28453,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28451
28453
  }, [config]);
28452
28454
  (0, import_react102.useEffect)(() => {
28453
28455
  const handleRetryAttempt = (payload) => {
28454
- if (turnCancelledRef.current || !isRespondingRef.current) {
28456
+ if (turnCancelledRef.current || !isRespondingRef.current || payload.role !== "main" /* MAIN */ || !lastPromptIdRef.current || payload.promptId !== lastPromptIdRef.current) {
28455
28457
  return;
28456
28458
  }
28457
28459
  setRetryStatus(payload);
@@ -28749,8 +28751,6 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28749
28751
  backgroundTasks,
28750
28752
  settings.merged.ui?.compactToolOutput
28751
28753
  ]);
28752
- const lastQueryRef = (0, import_react102.useRef)(null);
28753
- const lastPromptIdRef = (0, import_react102.useRef)(null);
28754
28754
  const loopDetectedRef = (0, import_react102.useRef)(false);
28755
28755
  const autoNudgeAttemptCountRef = (0, import_react102.useRef)(0);
28756
28756
  const MAX_AUTO_NUDGE_ATTEMPTS = 2;
@@ -29177,6 +29177,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29177
29177
  );
29178
29178
  const handleThoughtEvent = (0, import_react102.useCallback)(
29179
29179
  (eventValue, _userMessageTimestamp) => {
29180
+ setRetryStatus(null);
29180
29181
  setThought(eventValue);
29181
29182
  if (getInlineThinkingMode(settings) === "full") {
29182
29183
  addItem({
@@ -29505,6 +29506,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29505
29506
  );
29506
29507
  break;
29507
29508
  case "tool_call_request" /* ToolCallRequest */:
29509
+ setRetryStatus(null);
29508
29510
  toolCallRequests.push(event.value);
29509
29511
  pendingToolCallRequestsRef.current.push(event.value);
29510
29512
  break;
@@ -29692,10 +29694,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29692
29694
  startNewPrompt();
29693
29695
  setThought(null);
29694
29696
  }
29695
- setIsResponding(true);
29696
- setInitError(null);
29697
29697
  lastQueryRef.current = queryToSend;
29698
29698
  lastPromptIdRef.current = prompt_id;
29699
+ setRetryStatus(null);
29700
+ setIsResponding(true);
29701
+ setInitError(null);
29699
29702
  try {
29700
29703
  const stream = geminiClient.sendMessageStream(
29701
29704
  queryToSend,
@@ -31370,7 +31373,7 @@ var useLoadingIndicator = ({
31370
31373
  const prevStreamingStateRef = (0, import_react105.useRef)(null);
31371
31374
  const [prevRetryStatus, setPrevRetryStatus] = (0, import_react105.useState)(null);
31372
31375
  const [countdownSeconds, setCountdownSeconds] = (0, import_react105.useState)(null);
31373
- const isSameRetry = retryStatus === prevRetryStatus || retryStatus !== null && prevRetryStatus !== null && retryStatus.attempt === prevRetryStatus.attempt && retryStatus.delayMs === prevRetryStatus.delayMs && retryStatus.model === prevRetryStatus.model && retryStatus.status === prevRetryStatus.status && retryStatus.error === prevRetryStatus.error;
31376
+ const isSameRetry = retryStatus === prevRetryStatus || retryStatus !== null && prevRetryStatus !== null && retryStatus.attempt === prevRetryStatus.attempt && retryStatus.maxAttempts === prevRetryStatus.maxAttempts && retryStatus.delayMs === prevRetryStatus.delayMs && retryStatus.model === prevRetryStatus.model && retryStatus.status === prevRetryStatus.status && retryStatus.error === prevRetryStatus.error && retryStatus.role === prevRetryStatus.role && retryStatus.promptId === prevRetryStatus.promptId;
31374
31377
  if (!isSameRetry) {
31375
31378
  setPrevRetryStatus(retryStatus);
31376
31379
  setCountdownSeconds(
@@ -31382,6 +31385,8 @@ var useLoadingIndicator = ({
31382
31385
  const attempt = retryStatus?.attempt ?? 0;
31383
31386
  const delayMs = retryStatus?.delayMs ?? 0;
31384
31387
  const model = retryStatus?.model ?? "";
31388
+ const role = retryStatus?.role;
31389
+ const promptId = retryStatus?.promptId;
31385
31390
  (0, import_react105.useEffect)(() => {
31386
31391
  if (!isTimerActive || !isRateLimit || countdownSeconds === null || countdownSeconds <= 1) {
31387
31392
  return;
@@ -31397,7 +31402,16 @@ var useLoadingIndicator = ({
31397
31402
  return () => {
31398
31403
  clearInterval(intervalId);
31399
31404
  };
31400
- }, [attempt, delayMs, model, isTimerActive, isRateLimit, countdownSeconds]);
31405
+ }, [
31406
+ attempt,
31407
+ delayMs,
31408
+ model,
31409
+ role,
31410
+ promptId,
31411
+ isTimerActive,
31412
+ isRateLimit,
31413
+ countdownSeconds
31414
+ ]);
31401
31415
  (0, import_react105.useEffect)(() => {
31402
31416
  if (prevStreamingStateRef.current === "waiting_for_confirmation" /* WaitingForConfirmation */ && streamingState === "responding" /* Responding */) {
31403
31417
  setTimerResetKey((prevKey) => prevKey + 1);
@@ -32764,6 +32778,11 @@ function useSessionResume({
32764
32778
  }
32765
32779
  setIsResuming(true);
32766
32780
  try {
32781
+ const client = config.getGeminiClient();
32782
+ if (!client) {
32783
+ throw new Error("Gemini client is not initialized");
32784
+ }
32785
+ await client.resumeChat(clientHistory, resumedData);
32767
32786
  setQuittingMessages(null);
32768
32787
  historyManagerRef.current.clearItems();
32769
32788
  uiHistory.forEach((item, index) => {
@@ -32774,7 +32793,6 @@ function useSessionResume({
32774
32793
  const workspaceContext = config.getWorkspaceContext();
32775
32794
  workspaceContext.addDirectories(resumedData.conversation.directories);
32776
32795
  }
32777
- await config.getGeminiClient()?.resumeChat(clientHistory, resumedData);
32778
32796
  } catch (error) {
32779
32797
  coreEvents.emitFeedback(
32780
32798
  "error",
@@ -35248,7 +35266,7 @@ ${queuedText}` : queuedText;
35248
35266
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
35249
35267
  if (settings.merged.general.devtools) {
35250
35268
  void (async () => {
35251
- const { toggleDevToolsPanel } = await import("./devtoolsService-7EMPANTX.js");
35269
+ const { toggleDevToolsPanel } = await import("./devtoolsService-EBOCEFTO.js");
35252
35270
  await toggleDevToolsPanel(
35253
35271
  config,
35254
35272
  showErrorDetails,
@@ -3,13 +3,13 @@ import {
3
3
  DEFAULT_PORT,
4
4
  getBinaryPath,
5
5
  isServerRunning
6
- } from "./chunk-LYKP3S67.js";
7
- import "./chunk-GDCMMKZ2.js";
6
+ } from "./chunk-TX3SX2WI.js";
7
+ import "./chunk-NFBC76U4.js";
8
8
  import {
9
9
  debugLogger
10
- } from "./chunk-DWMZSQYG.js";
11
- import "./chunk-664ZODQF.js";
12
- import "./chunk-IUUIT4SU.js";
10
+ } from "./chunk-O2DXIYZO.js";
11
+ import "./chunk-W2AJR23G.js";
12
+ import "./chunk-N7J54YNL.js";
13
13
  import "./chunk-L6PII3GR.js";
14
14
  import "./chunk-34MYV7JD.js";
15
15
 
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
41
41
  `[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
42
42
  );
43
43
  try {
44
- const { startServer } = await import("./start-7GJH3MKY.js");
44
+ const { startServer } = await import("./start-NSYEL7UE.js");
45
45
  const started = await startServer(binaryPath, port);
46
46
  if (started) {
47
47
  debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
@@ -3,13 +3,13 @@ import {
3
3
  DEFAULT_PORT,
4
4
  getBinaryPath,
5
5
  isServerRunning
6
- } from "./chunk-U3FFDEKY.js";
7
- import "./chunk-GQ7FZNO2.js";
6
+ } from "./chunk-65MRMUKB.js";
7
+ import "./chunk-RTIGPATB.js";
8
8
  import {
9
9
  debugLogger
10
- } from "./chunk-KUXCUQKX.js";
11
- import "./chunk-664ZODQF.js";
12
- import "./chunk-IUUIT4SU.js";
10
+ } from "./chunk-SA2VIQNQ.js";
11
+ import "./chunk-W2AJR23G.js";
12
+ import "./chunk-N7J54YNL.js";
13
13
  import "./chunk-L6PII3GR.js";
14
14
  import "./chunk-34MYV7JD.js";
15
15
 
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
41
41
  `[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
42
42
  );
43
43
  try {
44
- const { startServer } = await import("./start-JSVKPUTV.js");
44
+ const { startServer } = await import("./start-JIKLB3S3.js");
45
45
  const started = await startServer(binaryPath, port);
46
46
  if (started) {
47
47
  debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
@@ -3,13 +3,13 @@ import {
3
3
  DEFAULT_PORT,
4
4
  getBinaryPath,
5
5
  isServerRunning
6
- } from "./chunk-4SOPZCNA.js";
7
- import "./chunk-2KKDGWF2.js";
6
+ } from "./chunk-IS5SQ7HP.js";
7
+ import "./chunk-STY67ND2.js";
8
8
  import {
9
9
  debugLogger
10
- } from "./chunk-MP4TVGOP.js";
11
- import "./chunk-664ZODQF.js";
12
- import "./chunk-IUUIT4SU.js";
10
+ } from "./chunk-I5QSCSQU.js";
11
+ import "./chunk-W2AJR23G.js";
12
+ import "./chunk-N7J54YNL.js";
13
13
  import "./chunk-L6PII3GR.js";
14
14
  import "./chunk-34MYV7JD.js";
15
15
 
@@ -41,7 +41,7 @@ var LiteRtServerManager = class {
41
41
  `[LiteRtServerManager] Auto-starting LiteRT server on port ${port}...`
42
42
  );
43
43
  try {
44
- const { startServer } = await import("./start-N33LF5WK.js");
44
+ const { startServer } = await import("./start-I2GOKFKQ.js");
45
45
  const started = await startServer(binaryPath, port);
46
46
  if (started) {
47
47
  debugLogger.log(`[LiteRtServerManager] Server started on port ${port}`);
@@ -16,9 +16,9 @@ import {
16
16
  openBrowserSecurely,
17
17
  refreshAccessToken,
18
18
  startCallbackServer
19
- } from "./chunk-KUXCUQKX.js";
20
- import "./chunk-664ZODQF.js";
21
- import "./chunk-IUUIT4SU.js";
19
+ } from "./chunk-O2DXIYZO.js";
20
+ import "./chunk-W2AJR23G.js";
21
+ import "./chunk-N7J54YNL.js";
22
22
  import "./chunk-L6PII3GR.js";
23
23
  import "./chunk-34MYV7JD.js";
24
24
 
@@ -16,9 +16,9 @@ import {
16
16
  openBrowserSecurely,
17
17
  refreshAccessToken,
18
18
  startCallbackServer
19
- } from "./chunk-MP4TVGOP.js";
20
- import "./chunk-664ZODQF.js";
21
- import "./chunk-IUUIT4SU.js";
19
+ } from "./chunk-SA2VIQNQ.js";
20
+ import "./chunk-W2AJR23G.js";
21
+ import "./chunk-N7J54YNL.js";
22
22
  import "./chunk-L6PII3GR.js";
23
23
  import "./chunk-34MYV7JD.js";
24
24
 
@@ -16,9 +16,9 @@ import {
16
16
  openBrowserSecurely,
17
17
  refreshAccessToken,
18
18
  startCallbackServer
19
- } from "./chunk-DWMZSQYG.js";
20
- import "./chunk-664ZODQF.js";
21
- import "./chunk-IUUIT4SU.js";
19
+ } from "./chunk-I5QSCSQU.js";
20
+ import "./chunk-W2AJR23G.js";
21
+ import "./chunk-N7J54YNL.js";
22
22
  import "./chunk-L6PII3GR.js";
23
23
  import "./chunk-34MYV7JD.js";
24
24