@google/gemini-cli 0.45.0 → 0.45.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 (67) hide show
  1. package/bundle/{chunk-2ARYG3KE.js → chunk-3TMWYG7A.js} +1 -1
  2. package/bundle/{chunk-53SRWMUU.js → chunk-4ISYEWVQ.js} +1 -1
  3. package/bundle/{chunk-6T7N6JF2.js → chunk-6HYYI5PZ.js} +155 -49
  4. package/bundle/{chunk-VL3FKVC7.js → chunk-7U7BOSLX.js} +3 -3
  5. package/bundle/{chunk-YI3KORH5.js → chunk-AFS5F2VL.js} +2 -2
  6. package/bundle/{chunk-K6WTIGVC.js → chunk-AJTJWT5R.js} +2 -2
  7. package/bundle/{chunk-EORX7LYI.js → chunk-BMS36MLD.js} +1 -1
  8. package/bundle/{chunk-SG46YSQ3.js → chunk-BRQZ5N67.js} +7 -7
  9. package/bundle/{chunk-3TWZMAJU.js → chunk-CGB6VOFW.js} +3 -3
  10. package/bundle/{chunk-Z5F25543.js → chunk-CXWB6LIZ.js} +1 -1
  11. package/bundle/{chunk-TWSSMLUS.js → chunk-EN62YYKQ.js} +1 -1
  12. package/bundle/{chunk-HFVEWB6N.js → chunk-FAMDZ3OS.js} +1 -1
  13. package/bundle/{chunk-XV2YFH7B.js → chunk-FFUBQCSE.js} +7654 -14056
  14. package/bundle/chunk-GIZG2CGQ.js +394545 -0
  15. package/bundle/{chunk-THZMPVCN.js → chunk-JKX72O3X.js} +1 -1
  16. package/bundle/{chunk-PNU4GACG.js → chunk-JTXGVKX5.js} +2 -2
  17. package/bundle/{chunk-4EBMYFID.js → chunk-NXVUP5BP.js} +67 -54
  18. package/bundle/chunk-OFSAI2ND.js +398 -0
  19. package/bundle/{chunk-EUYIPFPA.js → chunk-OJ7TLNJC.js} +1 -1
  20. package/bundle/{chunk-4KOU3QNT.js → chunk-QCGIKZK5.js} +8 -5
  21. package/bundle/{chunk-PXEK5ENZ.js → chunk-QDW2YJ2D.js} +9 -8
  22. package/bundle/chunk-S3TA2KSA.js +81685 -0
  23. package/bundle/{chunk-IL7J46PP.js → chunk-T3BZEZLU.js} +3 -3
  24. package/bundle/{chunk-KSNTXH4E.js → chunk-THHB2S2R.js} +7 -7
  25. package/bundle/{chunk-GVEZJIV3.js → chunk-TTFMSSFY.js} +1 -1
  26. package/bundle/chunk-VJA5NYRM.js +17320 -0
  27. package/bundle/{chunk-N6QPQL7E.js → chunk-VXAIUB7K.js} +181 -48
  28. package/bundle/chunk-W53HJSSZ.js +154 -0
  29. package/bundle/{chunk-JLFE3KRS.js → chunk-X5XPILBU.js} +1 -1
  30. package/bundle/chunk-XLA3MMYB.js +512 -0
  31. package/bundle/chunk-Y7YEJIFD.js +118 -0
  32. package/bundle/chunk-ZSZHQ7QN.js +1571 -0
  33. package/bundle/{cleanup-3SMSXJJA.js → cleanup-6QT55YQX.js} +2 -2
  34. package/bundle/{cleanup-FNQ3LEWG.js → cleanup-ASNHXVN2.js} +2 -2
  35. package/bundle/{cleanup-I56KHTTC.js → cleanup-SZ4DUWDJ.js} +2 -2
  36. package/bundle/cleanup-UWYNKBAK.js +32 -0
  37. package/bundle/{core-KGXBOJTX.js → core-FN764RWM.js} +7 -1
  38. package/bundle/{devtoolsService-EW3B2Y63.js → devtoolsService-5GK2JZD4.js} +2 -2
  39. package/bundle/{devtoolsService-F7PHNBEQ.js → devtoolsService-AWH6SSZC.js} +4 -3
  40. package/bundle/{devtoolsService-VFEFRDYG.js → devtoolsService-HS6NZVWU.js} +2 -2
  41. package/bundle/devtoolsService-VDTVF5OM.js +856 -0
  42. package/bundle/{dist-2G5KTD32.js → dist-CVH2R6ZI.js} +7 -1
  43. package/bundle/{core-AQUUQTX2.js → dist-LKE6MKVW.js} +7 -1
  44. package/bundle/dist-VK25J7B7.js +2140 -0
  45. package/bundle/docs/reference/configuration.md +71 -0
  46. package/bundle/{gemini-JMMBFICD.js → gemini-2CSQYYM7.js} +17 -14
  47. package/bundle/{gemini-4KS2EZX6.js → gemini-UUAZKUMD.js} +216 -197
  48. package/bundle/{gemini-ORQHD633.js → gemini-UZPU2BDT.js} +17 -14
  49. package/bundle/gemini-V3OTI3NY.js +16409 -0
  50. package/bundle/gemini.js +7 -7
  51. package/bundle/{interactiveCli-XUZZOZXX.js → interactiveCli-3LDUDMZL.js} +17 -11
  52. package/bundle/{interactiveCli-ESB66RW7.js → interactiveCli-JBILZ4Z2.js} +323 -298
  53. package/bundle/interactiveCli-QUFKABYB.js +34732 -0
  54. package/bundle/{interactiveCli-ZJXV4DW7.js → interactiveCli-TRAAWA7S.js} +17 -11
  55. package/bundle/{liteRtServerManager-HELKQKOZ.js → liteRtServerManager-4LZDDC3B.js} +4 -4
  56. package/bundle/{liteRtServerManager-RNNHEQJI.js → liteRtServerManager-BONHUK6G.js} +4 -4
  57. package/bundle/{liteRtServerManager-DORIWEMR.js → liteRtServerManager-GNA7BP24.js} +4 -4
  58. package/bundle/liteRtServerManager-ILOJICS6.js +65 -0
  59. package/bundle/{oauth2-provider-2IJNOFOO.js → oauth2-provider-FBCFQYBU.js} +1 -1
  60. package/bundle/{oauth2-provider-YYLBPESU.js → oauth2-provider-LYKMC2R6.js} +38 -72
  61. package/bundle/{oauth2-provider-7N4OFPTL.js → oauth2-provider-P4WHK2SH.js} +1 -1
  62. package/bundle/oauth2-provider-WLJL6V4W.js +235 -0
  63. package/bundle/{start-IGG6LDST.js → start-45UFBKOY.js} +6 -6
  64. package/bundle/{start-R7DTCFCN.js → start-PCZ7YDTR.js} +6 -6
  65. package/bundle/{start-66KF6MVV.js → start-VVVRWNSH.js} +6 -6
  66. package/bundle/start-XMLICH3K.js +18 -0
  67. package/package.json +1 -1
@@ -5,7 +5,7 @@ import {
5
5
  isTelemetrySdkInitialized,
6
6
  resetBrowserSession,
7
7
  shutdownTelemetry
8
- } from "./chunk-XV2YFH7B.js";
8
+ } from "./chunk-6HYYI5PZ.js";
9
9
 
10
10
  // packages/cli/src/utils/cleanup.ts
11
11
  import { promises as fs } from "node:fs";
@@ -1,13 +1,13 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
2
  import {
3
3
  runExitCleanup
4
- } from "./chunk-THZMPVCN.js";
4
+ } from "./chunk-JKX72O3X.js";
5
5
  import {
6
6
  RELEASE_CHANNEL_STABILITY,
7
7
  debugLogger,
8
8
  getChannelFromVersion,
9
9
  isGitRepository
10
- } from "./chunk-XV2YFH7B.js";
10
+ } from "./chunk-6HYYI5PZ.js";
11
11
 
12
12
  // packages/cli/src/utils/installationInfo.ts
13
13
  import * as fs from "node:fs";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  exitCli,
8
8
  require_source
9
- } from "./chunk-JLFE3KRS.js";
9
+ } from "./chunk-4ISYEWVQ.js";
10
10
  import {
11
11
  DEFAULT_BACKGROUND_OPACITY,
12
12
  DEFAULT_BORDER_OPACITY,
@@ -58,20 +58,22 @@ import {
58
58
  stripUnsafeCharacters,
59
59
  toCodePoints,
60
60
  validateCustomTheme
61
- } from "./chunk-4KOU3QNT.js";
61
+ } from "./chunk-OJ7TLNJC.js";
62
62
  import {
63
63
  isDevelopment
64
- } from "./chunk-PNU4GACG.js";
64
+ } from "./chunk-JTXGVKX5.js";
65
65
  import {
66
66
  emptyIcon,
67
67
  require_react
68
- } from "./chunk-PXEK5ENZ.js";
68
+ } from "./chunk-QDW2YJ2D.js";
69
69
  import {
70
70
  ALL_EDITORS,
71
71
  ApprovalMode,
72
72
  AsyncFzf,
73
+ AuthType,
73
74
  Config,
74
75
  CoreEvent,
76
+ CoreToolCallStatus,
75
77
  DiscoveredMCPTool,
76
78
  ExtensionDisableEvent,
77
79
  ExtensionEnableEvent,
@@ -82,20 +84,31 @@ import {
82
84
  ExtensionUpdateEvent,
83
85
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
84
86
  GEMINI_DIR,
87
+ HookType,
88
+ IDEConnectionStatus,
85
89
  INITIAL_HISTORY_LENGTH,
86
90
  IdeClient,
87
91
  IdeConnectionEvent,
92
+ IdeConnectionType,
93
+ IntegrityDataStatus,
88
94
  KeychainTokenStorage,
95
+ LlmRole,
96
+ MCPDiscoveryState,
89
97
  MCPOAuthTokenStorage,
98
+ MCPServerStatus,
90
99
  ModelSlashCommandEvent,
100
+ PolicyDecision,
91
101
  ProjectIdRequiredError,
92
102
  REFERENCE_CONTENT_END,
93
103
  REFERENCE_CONTENT_START,
94
104
  ReadManyFilesTool,
95
105
  RewindEvent,
106
+ SessionEndReason,
107
+ SessionStartSource,
96
108
  ShellExecutionService,
97
109
  StartSessionEvent,
98
110
  Storage,
111
+ TrustLevel,
99
112
  UPGRADE_URL_PAGE,
100
113
  UserAccountManager,
101
114
  ValidationRequiredError,
@@ -230,7 +243,7 @@ import {
230
243
  tokenLimit,
231
244
  uiTelemetryService,
232
245
  unescapePath
233
- } from "./chunk-XV2YFH7B.js";
246
+ } from "./chunk-6HYYI5PZ.js";
234
247
  import {
235
248
  require_src
236
249
  } from "./chunk-TUDYL3X4.js";
@@ -39447,7 +39460,7 @@ var import_react34 = __toESM(require_react(), 1);
39447
39460
  function useIdeTrustListener() {
39448
39461
  const settings = useSettings();
39449
39462
  const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
39450
- "disconnected" /* Disconnected */
39463
+ IDEConnectionStatus.Disconnected
39451
39464
  );
39452
39465
  const previousTrust = (0, import_react34.useRef)(void 0);
39453
39466
  const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
@@ -39477,7 +39490,7 @@ function useIdeTrustListener() {
39477
39490
  };
39478
39491
  }, []);
39479
39492
  const getSnapshot = () => {
39480
- if (connectionStatus !== "connected" /* Connected */) {
39493
+ if (connectionStatus !== IDEConnectionStatus.Connected) {
39481
39494
  return void 0;
39482
39495
  }
39483
39496
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -40182,7 +40195,7 @@ async function initializeApp(config, settings) {
40182
40195
  await ideClient.connect();
40183
40196
  logIdeConnection(
40184
40197
  config,
40185
- new IdeConnectionEvent("start" /* START */)
40198
+ new IdeConnectionEvent(IdeConnectionType.START)
40186
40199
  );
40187
40200
  }).catch((e) => {
40188
40201
  debugLogger.error("Failed to initialize IDE client:", e);
@@ -40200,17 +40213,17 @@ async function initializeApp(config, settings) {
40200
40213
  // packages/cli/src/config/auth.ts
40201
40214
  async function validateAuthMethod(authMethod) {
40202
40215
  loadEnvironment(loadSettings().merged, process.cwd());
40203
- if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
40216
+ if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
40204
40217
  return null;
40205
40218
  }
40206
- if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
40219
+ if (authMethod === AuthType.USE_GEMINI) {
40207
40220
  const key = process.env["GEMINI_API_KEY"] || await loadApiKey();
40208
40221
  if (!key) {
40209
40222
  return "When using Gemini API, you must specify the GEMINI_API_KEY environment variable.\nUpdate your environment and try again (no reload needed if using .env)!";
40210
40223
  }
40211
40224
  return null;
40212
40225
  }
40213
- if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
40226
+ if (authMethod === AuthType.USE_VERTEX_AI) {
40214
40227
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
40215
40228
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
40216
40229
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -44637,7 +44650,7 @@ var ExtensionManager = class extends ExtensionLoader {
44637
44650
  const trustedFolders = loadTrustedFolders();
44638
44651
  await trustedFolders.setValue(
44639
44652
  this.workspaceDir,
44640
- "TRUST_FOLDER" /* TRUST_FOLDER */
44653
+ TrustLevel.TRUST_FOLDER
44641
44654
  );
44642
44655
  } else {
44643
44656
  throw new Error(
@@ -44823,7 +44836,7 @@ Would you like to attempt to install via "git clone" instead?`
44823
44836
  newExtensionConfig.version,
44824
44837
  previousExtensionConfig.version,
44825
44838
  installMetadata.type,
44826
- "success" /* Success */
44839
+ CoreToolCallStatus.Success
44827
44840
  )
44828
44841
  );
44829
44842
  if (newExtensionName !== previousName) {
@@ -44846,7 +44859,7 @@ Would you like to attempt to install via "git clone" instead?`
44846
44859
  getExtensionId(newExtensionConfig, installMetadata),
44847
44860
  newExtensionConfig.version,
44848
44861
  installMetadata.type,
44849
- "success" /* Success */
44862
+ CoreToolCallStatus.Success
44850
44863
  )
44851
44864
  );
44852
44865
  await this.enableExtension(
@@ -44879,7 +44892,7 @@ Would you like to attempt to install via "git clone" instead?`
44879
44892
  newExtensionConfig?.version ?? "",
44880
44893
  previousExtensionConfig.version,
44881
44894
  installMetadata.type,
44882
- "error" /* Error */
44895
+ CoreToolCallStatus.Error
44883
44896
  )
44884
44897
  );
44885
44898
  } else {
@@ -44891,7 +44904,7 @@ Would you like to attempt to install via "git clone" instead?`
44891
44904
  extensionId ?? "",
44892
44905
  newExtensionConfig?.version ?? "",
44893
44906
  installMetadata.type,
44894
- "error" /* Error */
44907
+ CoreToolCallStatus.Error
44895
44908
  )
44896
44909
  );
44897
44910
  }
@@ -44922,7 +44935,7 @@ Would you like to attempt to install via "git clone" instead?`
44922
44935
  extension.name,
44923
44936
  hashValue(extension.name),
44924
44937
  extension.id,
44925
- "success" /* Success */
44938
+ CoreToolCallStatus.Success
44926
44939
  )
44927
44940
  );
44928
44941
  }
@@ -45192,7 +45205,7 @@ Would you like to attempt to install via "git clone" instead?`
45192
45205
  if (eventHooks) {
45193
45206
  for (const definition of eventHooks) {
45194
45207
  for (const hook of definition.hooks) {
45195
- if (hook.type === "command" /* Command */) {
45208
+ if (hook.type === HookType.Command) {
45196
45209
  hook.env = { ...hook.env, ...hookEnv };
45197
45210
  }
45198
45211
  }
@@ -46223,7 +46236,7 @@ async function readMcpResources(resourceParts, config, signal) {
46223
46236
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
46224
46237
  name: `resources/read (${resource.serverName})`,
46225
46238
  description: resource.uri,
46226
- status: "success" /* Success */,
46239
+ status: CoreToolCallStatus.Success,
46227
46240
  isClientInitiated: true,
46228
46241
  resultDisplay: `Successfully read resource ${resource.uri}`,
46229
46242
  confirmationDetails: void 0
@@ -46238,7 +46251,7 @@ async function readMcpResources(resourceParts, config, signal) {
46238
46251
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
46239
46252
  name: `resources/read (${resource.serverName})`,
46240
46253
  description: resource.uri,
46241
- status: "error" /* Error */,
46254
+ status: CoreToolCallStatus.Error,
46242
46255
  isClientInitiated: true,
46243
46256
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
46244
46257
  confirmationDetails: void 0
@@ -46263,7 +46276,7 @@ Content from @${result.uri}:
46263
46276
  }
46264
46277
  if (hasError) {
46265
46278
  const firstError = displays.find(
46266
- (d) => d.status === "error" /* Error */
46279
+ (d) => d.status === CoreToolCallStatus.Error
46267
46280
  );
46268
46281
  return {
46269
46282
  parts: [],
@@ -46304,7 +46317,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
46304
46317
  callId: `client-read-${userMessageTimestamp}`,
46305
46318
  name: readManyFilesTool.displayName,
46306
46319
  description: invocation.getDescription(),
46307
- status: "success" /* Success */,
46320
+ status: CoreToolCallStatus.Success,
46308
46321
  isClientInitiated: true,
46309
46322
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
46310
46323
  confirmationDetails: void 0
@@ -46351,7 +46364,7 @@ Content from @${displayPath}:
46351
46364
  callId: `client-read-${userMessageTimestamp}`,
46352
46365
  name: readManyFilesTool.displayName,
46353
46366
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
46354
- status: "error" /* Error */,
46367
+ status: CoreToolCallStatus.Error,
46355
46368
  isClientInitiated: true,
46356
46369
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
46357
46370
  confirmationDetails: void 0
@@ -49618,7 +49631,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49618
49631
  if (wasRaw) {
49619
49632
  setRawMode?.(true);
49620
49633
  }
49621
- coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
49634
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
49622
49635
  }
49623
49636
  }
49624
49637
 
@@ -52313,7 +52326,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
52313
52326
  extension.name,
52314
52327
  installMetadata
52315
52328
  );
52316
- if (status === "invalid" /* INVALID */) {
52329
+ if (status === IntegrityDataStatus.INVALID) {
52317
52330
  throw new Error("Extension integrity cannot be verified");
52318
52331
  }
52319
52332
  } catch (e) {
@@ -53731,11 +53744,11 @@ var ShellProcessor = class {
53731
53744
  },
53732
53745
  void 0
53733
53746
  );
53734
- if (decision === "deny" /* DENY */) {
53747
+ if (decision === PolicyDecision.DENY) {
53735
53748
  throw new Error(
53736
53749
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
53737
53750
  );
53738
- } else if (decision === "ask_user" /* ASK_USER */) {
53751
+ } else if (decision === PolicyDecision.ASK_USER) {
53739
53752
  commandsToConfirm.add(command);
53740
53753
  }
53741
53754
  }
@@ -54853,7 +54866,7 @@ var MultiFolderTrustDialog = ({
54853
54866
  if (choice === 1 /* YES_AND_REMEMBER */) {
54854
54867
  await trustedFolders.setValue(
54855
54868
  expandedPath,
54856
- "TRUST_FOLDER" /* TRUST_FOLDER */
54869
+ TrustLevel.TRUST_FOLDER
54857
54870
  );
54858
54871
  }
54859
54872
  workspaceContext.addDirectory(expandedPath);
@@ -56501,7 +56514,7 @@ var authCommand = {
56501
56514
  import process28 from "node:process";
56502
56515
 
56503
56516
  // packages/cli/src/generated/git-commit.ts
56504
- var GIT_COMMIT_INFO = "8acfe0c4a";
56517
+ var GIT_COMMIT_INFO = "57f1c6912";
56505
56518
 
56506
56519
  // packages/cli/src/ui/utils/historyExportUtils.ts
56507
56520
  import * as fsPromises from "node:fs/promises";
@@ -57147,7 +57160,7 @@ var clearCommand = {
57147
57160
  const config = context.services.agentContext?.config;
57148
57161
  const hookSystem = config?.getHookSystem();
57149
57162
  if (hookSystem) {
57150
- await hookSystem.fireSessionEndEvent("clear" /* Clear */);
57163
+ await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
57151
57164
  }
57152
57165
  config?.injectionService.clear();
57153
57166
  let newSessionId;
@@ -57164,7 +57177,7 @@ var clearCommand = {
57164
57177
  }
57165
57178
  let result;
57166
57179
  if (hookSystem) {
57167
- result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
57180
+ result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
57168
57181
  }
57169
57182
  await new Promise((resolve9) => setImmediate(resolve9));
57170
57183
  if (config) {
@@ -60163,7 +60176,7 @@ var Footer = () => {
60163
60176
  case "auth": {
60164
60177
  if (!settings.merged.ui.showUserIdentity) break;
60165
60178
  if (!authType) break;
60166
- const displayStr = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? email ?? "google" : authType;
60179
+ const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
60167
60180
  addCol(
60168
60181
  id,
60169
60182
  header,
@@ -61911,12 +61924,12 @@ import path29 from "node:path";
61911
61924
  function getIdeStatusMessage(ideClient) {
61912
61925
  const connection = ideClient.getConnectionStatus();
61913
61926
  switch (connection.status) {
61914
- case "connected" /* Connected */:
61927
+ case IDEConnectionStatus.Connected:
61915
61928
  return {
61916
61929
  messageType: "info",
61917
61930
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
61918
61931
  };
61919
- case "connecting" /* Connecting */:
61932
+ case IDEConnectionStatus.Connecting:
61920
61933
  return {
61921
61934
  messageType: "info",
61922
61935
  content: `\u{1F7E1} Connecting...`
@@ -61957,7 +61970,7 @@ ${infoMessage}`;
61957
61970
  async function getIdeStatusMessageWithFiles(ideClient) {
61958
61971
  const connection = ideClient.getConnectionStatus();
61959
61972
  switch (connection.status) {
61960
- case "connected" /* Connected */: {
61973
+ case IDEConnectionStatus.Connected: {
61961
61974
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
61962
61975
  const context = ideContextStore.get();
61963
61976
  const openFiles = context?.workspaceState?.openFiles;
@@ -61969,7 +61982,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
61969
61982
  content
61970
61983
  };
61971
61984
  }
61972
- case "connecting" /* Connecting */:
61985
+ case IDEConnectionStatus.Connecting:
61973
61986
  return {
61974
61987
  messageType: "info",
61975
61988
  content: `\u{1F7E1} Connecting...`
@@ -61991,7 +62004,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
61991
62004
  const ideClient = await IdeClient.getInstance();
61992
62005
  if (value) {
61993
62006
  await ideClient.connect(options);
61994
- logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
62007
+ logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
61995
62008
  } else {
61996
62009
  await ideClient.disconnect();
61997
62010
  }
@@ -62079,7 +62092,7 @@ var ideCommand = async () => {
62079
62092
  logToConsole: false
62080
62093
  }
62081
62094
  );
62082
- if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
62095
+ if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
62083
62096
  break;
62084
62097
  }
62085
62098
  await new Promise((resolve9) => setTimeout(resolve9, 500));
@@ -62156,7 +62169,7 @@ var ideCommand = async () => {
62156
62169
  }
62157
62170
  };
62158
62171
  const { status } = ideClient.getConnectionStatus();
62159
- const isConnected = status === "connected" /* Connected */;
62172
+ const isConnected = status === IDEConnectionStatus.Connected;
62160
62173
  if (isConnected) {
62161
62174
  ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
62162
62175
  } else {
@@ -62256,13 +62269,13 @@ Use /mcp auth <server-name> to authenticate.`
62256
62269
  const displayListener = (message) => {
62257
62270
  context.ui.addItem({ type: "info", text: message });
62258
62271
  };
62259
- coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
62272
+ coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
62260
62273
  try {
62261
62274
  context.ui.addItem({
62262
62275
  type: "info",
62263
62276
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
62264
62277
  });
62265
- const { MCPOAuthProvider } = await import("./core-KGXBOJTX.js");
62278
+ const { MCPOAuthProvider } = await import("./dist-LKE6MKVW.js");
62266
62279
  let oauthConfig = server.oauth;
62267
62280
  if (!oauthConfig) {
62268
62281
  oauthConfig = { enabled: false };
@@ -62299,7 +62312,7 @@ Use /mcp auth <server-name> to authenticate.`
62299
62312
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
62300
62313
  };
62301
62314
  } finally {
62302
- coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
62315
+ coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
62303
62316
  }
62304
62317
  },
62305
62318
  completion: async (context, partialArg) => {
@@ -62345,10 +62358,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
62345
62358
  }
62346
62359
  const serverNames = Object.keys(mcpServers);
62347
62360
  const connectingServers = serverNames.filter(
62348
- (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
62361
+ (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
62349
62362
  );
62350
62363
  const discoveryState = getMCPDiscoveryState();
62351
- const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
62364
+ const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
62352
62365
  const allTools = toolRegistry.getAllTools();
62353
62366
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
62354
62367
  const promptRegistry = config.getPromptRegistry();
@@ -78106,7 +78119,7 @@ Return a JSON object with:
78106
78119
  },
78107
78120
  abortSignal: new AbortController().signal,
78108
78121
  promptId: "triage-duplicates",
78109
- role: "utility_tool" /* UTILITY_TOOL */
78122
+ role: LlmRole.UTILITY_TOOL
78110
78123
  });
78111
78124
  const rec = response;
78112
78125
  let canonical;
@@ -78940,7 +78953,7 @@ Return a JSON object with:
78940
78953
  },
78941
78954
  abortSignal: abortControllerRef.current.signal,
78942
78955
  promptId: "triage-issues",
78943
- role: "utility_tool" /* UTILITY_TOOL */
78956
+ role: LlmRole.UTILITY_TOOL
78944
78957
  });
78945
78958
  return response;
78946
78959
  },
@@ -79514,8 +79527,8 @@ var planCommand = {
79514
79527
  return;
79515
79528
  }
79516
79529
  const previousApprovalMode = config.getApprovalMode();
79517
- config.setApprovalMode("plan" /* PLAN */);
79518
- if (previousApprovalMode !== "plan" /* PLAN */) {
79530
+ config.setApprovalMode(ApprovalMode.PLAN);
79531
+ if (previousApprovalMode !== ApprovalMode.PLAN) {
79519
79532
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
79520
79533
  }
79521
79534
  if (context.invocation?.args) {
@@ -79574,10 +79587,10 @@ var categorizeRulesByMode = (rules) => {
79574
79587
  rules.forEach((rule) => {
79575
79588
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
79576
79589
  const modeSet = new Set(modes);
79577
- if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
79578
- if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
79579
- if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
79580
- if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
79590
+ if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
79591
+ if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
79592
+ if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
79593
+ if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
79581
79594
  });
79582
79595
  return result;
79583
79596
  };
@@ -80929,7 +80942,7 @@ var upgradeCommand = {
80929
80942
  action: async (context) => {
80930
80943
  const config = context.services.agentContext?.config;
80931
80944
  const authType = config?.getContentGeneratorConfig()?.authType;
80932
- if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
80945
+ if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
80933
80946
  return {
80934
80947
  type: "message",
80935
80948
  messageType: "error",
@@ -81158,7 +81171,7 @@ var BuiltinCommandLoader = class {
81158
81171
  setupGithubCommand,
81159
81172
  terminalSetupCommand,
81160
81173
  ...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
81161
- ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
81174
+ ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
81162
81175
  ];
81163
81176
  handle?.end();
81164
81177
  return allDefinitions.filter((cmd) => cmd !== null);