@google/gemini-cli 0.52.0-nightly.20260723.g9681621c6 → 0.52.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 (71) hide show
  1. package/bundle/{chunk-3XOIA5WR.js → chunk-24R3JJRB.js} +1 -1
  2. package/bundle/{chunk-UEI42N7R.js → chunk-6Z2GQGII.js} +3 -3
  3. package/bundle/{chunk-GJXPH6YT.js → chunk-7LQRUKPT.js} +81 -168
  4. package/bundle/{chunk-XH7QC2TB.js → chunk-ALVMXQYL.js} +2 -2
  5. package/bundle/{chunk-CPNBBB75.js → chunk-B54TROKV.js} +2 -2
  6. package/bundle/{chunk-27C6XFMY.js → chunk-BG2B4WV5.js} +87 -184
  7. package/bundle/{chunk-BDSSP5BZ.js → chunk-F7WLNK6O.js} +1 -1
  8. package/bundle/{chunk-MGWKBHYO.js → chunk-FBGJOW3X.js} +2 -2
  9. package/bundle/{chunk-IKE3IJFJ.js → chunk-ILANJJAD.js} +3 -3
  10. package/bundle/{chunk-NGVS6ZAJ.js → chunk-IQDAUFS5.js} +14275 -7764
  11. package/bundle/{chunk-GNNMAEXD.js → chunk-JB342GRK.js} +1 -1
  12. package/bundle/{chunk-PKFZO3SN.js → chunk-OFOMMM4A.js} +1 -1
  13. package/bundle/{chunk-IODN6H35.js → chunk-P4IYYRKC.js} +1 -1
  14. package/bundle/{chunk-ZEZVEPHU.js → chunk-PTIIH33O.js} +3 -3
  15. package/bundle/{chunk-4OVORMGE.js → chunk-RHQ5RWRW.js} +1 -1
  16. package/bundle/{chunk-H4LWAALI.js → chunk-SDT3SMSX.js} +7 -7
  17. package/bundle/{chunk-QSTUV3QH.js → chunk-SNUSRD5O.js} +7 -7
  18. package/bundle/{chunk-APLH5ANQ.js → chunk-SZMWXEEI.js} +5 -8
  19. package/bundle/{chunk-2EQTAQD4.js → chunk-THWSXFSH.js} +1 -1
  20. package/bundle/{chunk-DBBRJYJF.js → chunk-UB6EWNWI.js} +8 -9
  21. package/bundle/{chunk-KDCDG5VZ.js → chunk-Y5NBDPUP.js} +1 -1
  22. package/bundle/{chunk-2277V7JH.js → chunk-ZINRZXUN.js} +1 -1
  23. package/bundle/{chunk-IOKXRXYH.js → chunk-ZLL3UXFN.js} +1 -1
  24. package/bundle/{chunk-QWQ2TM4M.js → chunk-ZNHHIFQN.js} +54 -67
  25. package/bundle/{cleanup-FXLZG47P.js → cleanup-2EKCP4Q4.js} +2 -2
  26. package/bundle/{cleanup-HUYNLL74.js → cleanup-G4HKUFT2.js} +2 -2
  27. package/bundle/{cleanup-SZCNPC5U.js → cleanup-X3KOZTUK.js} +2 -2
  28. package/bundle/{core-PVG4D2MR.js → core-JDFTBJXX.js} +1 -3
  29. package/bundle/{dist-4MRXBLX6.js → core-ZIYDWN4V.js} +1 -3
  30. package/bundle/{devtoolsService-QYDPHHFN.js → devtoolsService-KJJEIBQ2.js} +2 -2
  31. package/bundle/{devtoolsService-UWV2FJ5W.js → devtoolsService-NFNYJGMS.js} +3 -4
  32. package/bundle/{devtoolsService-BLOOTSX5.js → devtoolsService-UB2E5377.js} +2 -2
  33. package/bundle/{dist-JKGOFUTJ.js → dist-WD2ZO2DC.js} +1 -3
  34. package/bundle/docs/CONTRIBUTING.md +3 -3
  35. package/bundle/docs/cli/sandbox.md +2 -3
  36. package/bundle/docs/reference/configuration.md +4 -4
  37. package/bundle/{gemini-RB4VRLKB.js → gemini-6K6USV55.js} +14 -14
  38. package/bundle/{gemini-E2E3U6PR.js → gemini-NJ7GQJ2G.js} +14 -14
  39. package/bundle/{gemini-6757TORA.js → gemini-Y4OW3GPV.js} +196 -212
  40. package/bundle/gemini.js +7 -7
  41. package/bundle/{interactiveCli-FS3OVPXQ.js → interactiveCli-3B23G3WW.js} +8 -8
  42. package/bundle/{interactiveCli-YTSJUZI4.js → interactiveCli-3XBP73G4.js} +8 -8
  43. package/bundle/{interactiveCli-GSB4RL5O.js → interactiveCli-NNJDT7RS.js} +296 -315
  44. package/bundle/{liteRtServerManager-LW25SW2L.js → liteRtServerManager-A77B57ZY.js} +4 -4
  45. package/bundle/{liteRtServerManager-QQQFW2CP.js → liteRtServerManager-MQS4LI5P.js} +4 -4
  46. package/bundle/{liteRtServerManager-T2Z3RLS3.js → liteRtServerManager-PYCXZRAL.js} +4 -4
  47. package/bundle/{oauth2-provider-EAM256AQ.js → oauth2-provider-5JL2PKRR.js} +1 -1
  48. package/bundle/{oauth2-provider-DFVE3NYF.js → oauth2-provider-6EE3JV6M.js} +1 -1
  49. package/bundle/{oauth2-provider-LIH733TF.js → oauth2-provider-THDZ27ZX.js} +72 -38
  50. package/bundle/sandbox-macos-permissive-open.sb +4 -113
  51. package/bundle/sandbox-macos-permissive-proxied.sb +9 -111
  52. package/bundle/{start-5G2UDZZ6.js → start-K5QQG7K4.js} +6 -6
  53. package/bundle/{start-5PGXX77Z.js → start-SV5TPWOH.js} +6 -6
  54. package/bundle/{start-JRR6N5UF.js → start-YON746V5.js} +6 -6
  55. package/package.json +1 -1
  56. package/bundle/chunk-2PPBVVNC.js +0 -1571
  57. package/bundle/chunk-H56TFQ33.js +0 -398
  58. package/bundle/chunk-LFBOFVXO.js +0 -118
  59. package/bundle/chunk-TWHN6YWJ.js +0 -17332
  60. package/bundle/chunk-V37HWFI3.js +0 -154
  61. package/bundle/chunk-VDXWWVGC.js +0 -396898
  62. package/bundle/chunk-YNU3KMOW.js +0 -512
  63. package/bundle/chunk-ZEJHAENL.js +0 -102505
  64. package/bundle/cleanup-XETKRH7X.js +0 -32
  65. package/bundle/devtoolsService-YCULQ2T3.js +0 -4359
  66. package/bundle/dist-U3H5J2OD.js +0 -2154
  67. package/bundle/gemini-F4UJ3SXK.js +0 -16427
  68. package/bundle/interactiveCli-QWKN4PM7.js +0 -34816
  69. package/bundle/liteRtServerManager-VLV27PAS.js +0 -65
  70. package/bundle/oauth2-provider-WWQFEGLU.js +0 -235
  71. package/bundle/start-JVS5QRER.js +0 -18
@@ -157,10 +157,10 @@ import {
157
157
  widestLineFromStyledChars,
158
158
  wordBreakStyledChars,
159
159
  wrapStyledChars
160
- } from "./chunk-QWQ2TM4M.js";
160
+ } from "./chunk-SNUSRD5O.js";
161
161
  import {
162
162
  require_source
163
- } from "./chunk-2EQTAQD4.js";
163
+ } from "./chunk-THWSXFSH.js";
164
164
  import {
165
165
  appEvents
166
166
  } from "./chunk-5PS3AYFU.js";
@@ -214,37 +214,33 @@ import {
214
214
  stripAnsi,
215
215
  stripUnsafeCharacters,
216
216
  toCodePoints
217
- } from "./chunk-APLH5ANQ.js";
217
+ } from "./chunk-P4IYYRKC.js";
218
218
  import {
219
219
  handleAutoUpdate,
220
220
  isDevelopment,
221
221
  relaunchApp,
222
222
  setUpdateHandler
223
- } from "./chunk-H56TFQ33.js";
223
+ } from "./chunk-B54TROKV.js";
224
224
  import {
225
225
  isTodoList,
226
226
  mapCoreStatusToDisplayStatus,
227
227
  require_react
228
- } from "./chunk-DBBRJYJF.js";
228
+ } from "./chunk-UB6EWNWI.js";
229
229
  import {
230
230
  registerCleanup,
231
231
  removeCleanup,
232
232
  runExitCleanup,
233
233
  setupTtyCheck
234
- } from "./chunk-V37HWFI3.js";
234
+ } from "./chunk-OFOMMM4A.js";
235
235
  import {
236
236
  ACTIVATE_SKILL_TOOL_NAME,
237
237
  AGENT_TOOL_NAME,
238
238
  ApiKeyUpdatedEvent,
239
- ApprovalMode,
240
239
  AsyncFzf,
241
240
  AudioRecorder,
242
241
  AuthType,
243
242
  ChangeAuthRequestedError,
244
- CompressionStatus,
245
243
  ConversationFinishedEvent,
246
- CoreEvent,
247
- CoreToolCallStatus,
248
244
  CreditPurchaseClickEvent,
249
245
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
250
246
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -266,19 +262,12 @@ import {
266
262
  GEMMA_4_31B_IT_MODEL,
267
263
  GLOB_DISPLAY_NAME,
268
264
  GREP_DISPLAY_NAME,
269
- GeminiCliOperation,
270
- GeminiEventType,
271
265
  GitService,
272
266
  IdeClient,
273
- Kind,
274
267
  LS_DISPLAY_NAME,
275
268
  LegacyAgentProtocol,
276
269
  LlmRole,
277
270
  Logger,
278
- MCPDiscoveryState,
279
- MCPServerStatus,
280
- MessageBusType,
281
- MessageSenderType,
282
271
  ModelNotFoundError,
283
272
  ModelSlashCommandEvent,
284
273
  OverageMenuShownEvent,
@@ -290,27 +279,20 @@ import {
290
279
  PREVIEW_GEMINI_MODEL,
291
280
  PolicyIntegrityManager,
292
281
  ProjectIdRequiredError,
293
- QuestionType,
294
282
  READ_FILE_DISPLAY_NAME,
295
283
  READ_MANY_FILES_DISPLAY_NAME,
296
284
  RELEASE_CHANNEL_STABILITY,
297
285
  ROOT_SCHEDULER_ID,
298
286
  SHELL_TOOL_NAME,
299
287
  Scheduler,
300
- SessionEndReason,
301
- SessionStartSource,
302
288
  ShellExecutionService,
303
289
  SlashCommandStatus,
304
290
  Storage,
305
- SubagentState,
306
291
  TOPIC_PARAM_STRATEGIC_INTENT,
307
292
  TOPIC_PARAM_SUMMARY,
308
293
  TOPIC_PARAM_TITLE,
309
294
  TerminalQuotaError,
310
- ToolConfirmationOutcome,
311
- ToolErrorType,
312
295
  TranscriptionFactory,
313
- TrustLevel,
314
296
  UPDATE_TOPIC_DISPLAY_NAME,
315
297
  UPDATE_TOPIC_TOOL_NAME,
316
298
  UnauthorizedError,
@@ -322,7 +304,6 @@ import {
322
304
  WEB_FETCH_DISPLAY_NAME,
323
305
  WEB_SEARCH_DISPLAY_NAME,
324
306
  WRITE_FILE_DISPLAY_NAME,
325
- WarningPriority,
326
307
  WhisperModelManager,
327
308
  addMCPStatusChangeListener,
328
309
  allowEditorTypeInSandbox,
@@ -431,7 +412,7 @@ import {
431
412
  validatePlanContent,
432
413
  validatePlanPath,
433
414
  writeToStdout
434
- } from "./chunk-VDXWWVGC.js";
415
+ } from "./chunk-BG2B4WV5.js";
435
416
  import "./chunk-664ZODQF.js";
436
417
  import "./chunk-IUUIT4SU.js";
437
418
  import "./chunk-TUDYL3X4.js";
@@ -5057,7 +5038,7 @@ function calculateShellMaxLines(options) {
5057
5038
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5058
5039
  return maxLinesBasedOnHeight;
5059
5040
  }
5060
- const isExecuting = status === CoreToolCallStatus.Executing;
5041
+ const isExecuting = status === "executing" /* Executing */;
5061
5042
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5062
5043
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5063
5044
  }
@@ -5091,10 +5072,10 @@ function isShellTool(name) {
5091
5072
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
5092
5073
  }
5093
5074
  function isThisShellFocusable(name, status, config) {
5094
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5075
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5095
5076
  }
5096
5077
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5097
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5078
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5098
5079
  }
5099
5080
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5100
5081
  const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
@@ -5254,13 +5235,13 @@ var formatToolArgs = (args) => {
5254
5235
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5255
5236
  let headerText;
5256
5237
  let headerColor = theme.text.secondary;
5257
- if (progress.state === SubagentState.CANCELLED) {
5238
+ if (progress.state === "cancelled" /* CANCELLED */) {
5258
5239
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5259
5240
  headerColor = theme.status.warning;
5260
- } else if (progress.state === SubagentState.ERROR) {
5241
+ } else if (progress.state === "error" /* ERROR */) {
5261
5242
  headerText = `Subagent ${progress.agentName} failed.`;
5262
5243
  headerColor = theme.status.error;
5263
- } else if (progress.state === SubagentState.COMPLETED) {
5244
+ } else if (progress.state === "completed" /* COMPLETED */) {
5264
5245
  headerText = `Subagent ${progress.agentName} completed.`;
5265
5246
  headerColor = theme.status.success;
5266
5247
  } else {
@@ -5280,7 +5261,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5280
5261
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
5281
5262
  ] }, item.id);
5282
5263
  } else if (item.type === "tool_call") {
5283
- const statusSymbol = item.status === SubagentState.RUNNING ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === SubagentState.COMPLETED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === SubagentState.CANCELLED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5264
+ const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5284
5265
  const formattedArgs = item.description || formatToolArgs(item.args);
5285
5266
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5286
5267
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5291,7 +5272,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5291
5272
  {
5292
5273
  bold: true,
5293
5274
  color: theme.text.primary,
5294
- strikethrough: item.status === SubagentState.CANCELLED,
5275
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5295
5276
  children: item.displayName || item.content
5296
5277
  }
5297
5278
  ),
@@ -5300,7 +5281,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5300
5281
  {
5301
5282
  color: theme.text.secondary,
5302
5283
  wrap: "truncate",
5303
- strikethrough: item.status === SubagentState.CANCELLED,
5284
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5304
5285
  children: displayArgs
5305
5286
  }
5306
5287
  ) })
@@ -5320,7 +5301,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5320
5301
  MarkdownDisplay,
5321
5302
  {
5322
5303
  text: safeJsonToMarkdown(progress.result),
5323
- isPending: progress.state !== SubagentState.COMPLETED,
5304
+ isPending: progress.state !== "completed" /* COMPLETED */,
5324
5305
  terminalWidth
5325
5306
  }
5326
5307
  )
@@ -5674,14 +5655,14 @@ var ToolActionsProvider = (props) => {
5674
5655
  }
5675
5656
  const details = tool.confirmationDetails;
5676
5657
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5677
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5658
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5678
5659
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5679
5660
  }
5680
5661
  if (tool.correlationId) {
5681
5662
  await config.getMessageBus().publish({
5682
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5663
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5683
5664
  correlationId: tool.correlationId,
5684
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5665
+ confirmed: outcome !== "cancel" /* Cancel */,
5685
5666
  requiresUserConfirmation: false,
5686
5667
  outcome,
5687
5668
  payload
@@ -5700,7 +5681,7 @@ var ToolActionsProvider = (props) => {
5700
5681
  );
5701
5682
  const cancel = (0, import_react12.useCallback)(
5702
5683
  async (callId) => {
5703
- await confirm(callId, ToolConfirmationOutcome.Cancel);
5684
+ await confirm(callId, "cancel" /* Cancel */);
5704
5685
  },
5705
5686
  [confirm]
5706
5687
  );
@@ -5819,7 +5800,7 @@ var ToolMessage = ({
5819
5800
  paddingX: 1,
5820
5801
  flexDirection: "column",
5821
5802
  children: [
5822
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5803
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5823
5804
  McpProgressIndicator,
5824
5805
  {
5825
5806
  progress,
@@ -5836,8 +5817,8 @@ var ToolMessage = ({
5836
5817
  terminalWidth,
5837
5818
  renderOutputAsMarkdown,
5838
5819
  hasFocus: isThisShellFocused2,
5839
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5840
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5820
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5821
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5841
5822
  }
5842
5823
  ),
5843
5824
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -6153,7 +6134,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6153
6134
  settings.merged,
6154
6135
  process3.cwd()
6155
6136
  );
6156
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6137
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6157
6138
  return {
6158
6139
  currentTrustLevel: explicitTrustLevel,
6159
6140
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6198,7 +6179,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6198
6179
  process3.cwd(),
6199
6180
  newConfig
6200
6181
  );
6201
- if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6182
+ if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6202
6183
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6203
6184
  if (source === "file") {
6204
6185
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6272,18 +6253,18 @@ function PermissionsModifyTrustDialog({
6272
6253
  const TRUST_LEVEL_ITEMS = [
6273
6254
  {
6274
6255
  label: `Trust this folder (${dirName})`,
6275
- value: TrustLevel.TRUST_FOLDER,
6276
- key: TrustLevel.TRUST_FOLDER
6256
+ value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6257
+ key: "TRUST_FOLDER" /* TRUST_FOLDER */
6277
6258
  },
6278
6259
  {
6279
6260
  label: `Trust parent folder (${parentFolder})`,
6280
- value: TrustLevel.TRUST_PARENT,
6281
- key: TrustLevel.TRUST_PARENT
6261
+ value: "TRUST_PARENT" /* TRUST_PARENT */,
6262
+ key: "TRUST_PARENT" /* TRUST_PARENT */
6282
6263
  },
6283
6264
  {
6284
6265
  label: "Don't trust",
6285
- value: TrustLevel.DO_NOT_TRUST,
6286
- key: TrustLevel.DO_NOT_TRUST
6266
+ value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6267
+ key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6287
6268
  }
6288
6269
  ];
6289
6270
  const {
@@ -6523,7 +6504,7 @@ var ShellToolMessage = ({
6523
6504
  maxLinesLimit: maxLines
6524
6505
  });
6525
6506
  import_react17.default.useEffect(() => {
6526
- const isExecuting = status === CoreToolCallStatus.Executing;
6507
+ const isExecuting = status === "executing" /* Executing */;
6527
6508
  if (isExecuting && ptyId) {
6528
6509
  try {
6529
6510
  const childWidth = terminalWidth - 4;
@@ -6736,13 +6717,13 @@ var SubagentGroupDisplay = ({
6736
6717
  const singleAgent = toolCalls[0].resultDisplay;
6737
6718
  if (isSubagentProgress(singleAgent)) {
6738
6719
  switch (singleAgent.state) {
6739
- case SubagentState.COMPLETED:
6720
+ case "completed" /* COMPLETED */:
6740
6721
  headerText = "Agent Completed";
6741
6722
  break;
6742
- case SubagentState.CANCELLED:
6723
+ case "cancelled" /* CANCELLED */:
6743
6724
  headerText = "Agent Cancelled";
6744
6725
  break;
6745
- case SubagentState.ERROR:
6726
+ case "error" /* ERROR */:
6746
6727
  headerText = "Agent Error";
6747
6728
  break;
6748
6729
  default:
@@ -6758,8 +6739,8 @@ var SubagentGroupDisplay = ({
6758
6739
  for (const tc of toolCalls) {
6759
6740
  const progress = tc.resultDisplay;
6760
6741
  if (isSubagentProgress(progress)) {
6761
- if (progress.state === SubagentState.COMPLETED) completedCount++;
6762
- else if (progress.state === SubagentState.RUNNING) runningCount++;
6742
+ if (progress.state === "completed" /* COMPLETED */) completedCount++;
6743
+ else if (progress.state === "running" /* RUNNING */) runningCount++;
6763
6744
  } else {
6764
6745
  runningCount++;
6765
6746
  }
@@ -6838,7 +6819,7 @@ var SubagentGroupDisplay = ({
6838
6819
  if (!isExpanded) {
6839
6820
  let content = "Starting...";
6840
6821
  let formattedArgs;
6841
- if (progress.state === SubagentState.COMPLETED) {
6822
+ if (progress.state === "completed" /* COMPLETED */) {
6842
6823
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6843
6824
  content = `Finished Early (${progress.terminateReason})`;
6844
6825
  } else {
@@ -6852,17 +6833,17 @@ var SubagentGroupDisplay = ({
6852
6833
  formattedArgs = formatToolArgs(lastActivity.args);
6853
6834
  }
6854
6835
  }
6855
- const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6836
+ const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6856
6837
  const renderStatusIcon = () => {
6857
- const state = progress.state ?? SubagentState.RUNNING;
6838
+ const state = progress.state ?? "running" /* RUNNING */;
6858
6839
  switch (state) {
6859
- case SubagentState.RUNNING:
6840
+ case "running" /* RUNNING */:
6860
6841
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
6861
- case SubagentState.COMPLETED:
6842
+ case "completed" /* COMPLETED */:
6862
6843
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6863
- case SubagentState.CANCELLED:
6844
+ case "cancelled" /* CANCELLED */:
6864
6845
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6865
- case SubagentState.ERROR:
6846
+ case "error" /* ERROR */:
6866
6847
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6867
6848
  default:
6868
6849
  return checkExhaustive(state);
@@ -6915,22 +6896,22 @@ var hasPayload = (res) => {
6915
6896
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6916
6897
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6917
6898
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6918
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6899
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6919
6900
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6920
6901
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6921
6902
  const showDiffStat = !!diff.diffStat;
6922
6903
  const description = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
6923
6904
  let resultSummary = "";
6924
6905
  let resultColor = theme.text.secondary;
6925
- if (status === CoreToolCallStatus.AwaitingApproval) {
6906
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
6926
6907
  resultSummary = "Confirming";
6927
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6908
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6928
6909
  resultSummary = "Accepted";
6929
6910
  resultColor = theme.text.accent;
6930
- } else if (status === CoreToolCallStatus.Cancelled) {
6911
+ } else if (status === "cancelled" /* Cancelled */) {
6931
6912
  resultSummary = "Rejected";
6932
6913
  resultColor = theme.status.error;
6933
- } else if (status === CoreToolCallStatus.Error) {
6914
+ } else if (status === "error" /* Error */) {
6934
6915
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6935
6916
  resultColor = theme.status.error;
6936
6917
  }
@@ -6961,7 +6942,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6961
6942
  filename: diff.fileName,
6962
6943
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
6963
6944
  availableTerminalHeight,
6964
- disableColor: status === CoreToolCallStatus.Cancelled
6945
+ disableColor: status === "cancelled" /* Cancelled */
6965
6946
  }
6966
6947
  );
6967
6948
  return { description, summary, payload };
@@ -7089,10 +7070,10 @@ var DenseToolMessage = (props) => {
7089
7070
  if (isGrepResult(resultDisplay)) {
7090
7071
  return getGenericSuccessData(resultDisplay, originalDescription);
7091
7072
  }
7092
- if (status === CoreToolCallStatus.Success && resultDisplay) {
7073
+ if (status === "success" /* Success */ && resultDisplay) {
7093
7074
  return getGenericSuccessData(resultDisplay, originalDescription);
7094
7075
  }
7095
- if (status === CoreToolCallStatus.Error) {
7076
+ if (status === "error" /* Error */) {
7096
7077
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7097
7078
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7098
7079
  "\u2192 ",
@@ -7133,7 +7114,7 @@ var DenseToolMessage = (props) => {
7133
7114
  language: fileExtension,
7134
7115
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7135
7116
  settings,
7136
- disableColor: status === CoreToolCallStatus.Cancelled,
7117
+ disableColor: status === "cancelled" /* Cancelled */,
7137
7118
  returnLines: true
7138
7119
  });
7139
7120
  } else {
@@ -7141,7 +7122,7 @@ var DenseToolMessage = (props) => {
7141
7122
  parsedLines,
7142
7123
  filename: diff.fileName,
7143
7124
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7144
- disableColor: status === CoreToolCallStatus.Cancelled
7125
+ disableColor: status === "cancelled" /* Cancelled */
7145
7126
  });
7146
7127
  }
7147
7128
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7271,7 +7252,7 @@ function isToolExecuting(pendingHistoryItems) {
7271
7252
  return pendingHistoryItems.some((item) => {
7272
7253
  if (item && item.type === "tool_group") {
7273
7254
  return item.tools.some(
7274
- (tool) => CoreToolCallStatus.Executing === tool.status
7255
+ (tool) => "executing" /* Executing */ === tool.status
7275
7256
  );
7276
7257
  }
7277
7258
  return false;
@@ -7280,7 +7261,7 @@ function isToolExecuting(pendingHistoryItems) {
7280
7261
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7281
7262
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7282
7263
  (item) => item.tools.some(
7283
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7264
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7284
7265
  )
7285
7266
  );
7286
7267
  }
@@ -7303,14 +7284,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
7303
7284
  if (isTrackedToolCall(t)) {
7304
7285
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
7305
7286
  } else {
7306
- return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7287
+ return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
7307
7288
  }
7308
7289
  });
7309
7290
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
7310
7291
  if (isTrackedToolCall(t)) {
7311
7292
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
7312
7293
  } else {
7313
- return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7294
+ return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7314
7295
  }
7315
7296
  });
7316
7297
  const isShellCommand = toolsToInspect.some((t) => {
@@ -7409,7 +7390,7 @@ var ToolGroupMessage = ({
7409
7390
  const groupedTools = (0, import_react21.useMemo)(() => {
7410
7391
  const groups = [];
7411
7392
  for (const tool of visibleToolCalls) {
7412
- if (tool.kind === Kind.Agent) {
7393
+ if (tool.kind === "agent" /* Agent */) {
7413
7394
  const lastGroup = groups[groups.length - 1];
7414
7395
  if (Array.isArray(lastGroup)) {
7415
7396
  lastGroup.push(tool);
@@ -7464,7 +7445,7 @@ var ToolGroupMessage = ({
7464
7445
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7465
7446
  let countToolCallsWithResults = 0;
7466
7447
  for (const tool of visibleToolCalls) {
7467
- if (tool.kind !== Kind.Agent) {
7448
+ if (tool.kind !== "agent" /* Agent */) {
7468
7449
  if (isCompactTool(tool, isCompactModeEnabled)) {
7469
7450
  if (hasDensePayload(tool)) {
7470
7451
  countToolCallsWithResults++;
@@ -7638,7 +7619,7 @@ var ToolGroupDisplay = ({
7638
7619
  }
7639
7620
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7640
7621
  const visibleTools = tools.filter(
7641
- (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7622
+ (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7642
7623
  );
7643
7624
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7644
7625
  const otherTools = visibleTools.filter(
@@ -7840,18 +7821,18 @@ function CompressionMessage({
7840
7821
  return "Compressing chat history";
7841
7822
  }
7842
7823
  switch (compressionStatus) {
7843
- case CompressionStatus.COMPRESSED:
7824
+ case 1 /* COMPRESSED */:
7844
7825
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7845
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7826
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7846
7827
  if (originalTokens < 5e4) {
7847
7828
  return "Compression was not beneficial for this history size.";
7848
7829
  }
7849
7830
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7850
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7831
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7851
7832
  return "Could not compress chat history due to a token counting error.";
7852
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7833
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7853
7834
  return "Chat history compression failed: the model returned an empty summary.";
7854
- case CompressionStatus.NOOP:
7835
+ case 5 /* NOOP */:
7855
7836
  return "Nothing to compress.";
7856
7837
  default:
7857
7838
  return "";
@@ -8277,8 +8258,8 @@ var ModelUsageTable = ({ models }) => {
8277
8258
  );
8278
8259
  roleEntries.sort(([a], [b]) => {
8279
8260
  if (a === b) return 0;
8280
- if (a === LlmRole.MAIN) return -1;
8281
- if (b === LlmRole.MAIN) return 1;
8261
+ if (a === "main" /* MAIN */) return -1;
8262
+ if (b === "main" /* MAIN */) return 1;
8282
8263
  return a.localeCompare(b);
8283
8264
  });
8284
8265
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8609,8 +8590,8 @@ var ModelStatsDisplay = ({
8609
8590
  return validRoles.includes(role);
8610
8591
  }).sort((a, b) => {
8611
8592
  if (a === b) return 0;
8612
- if (a === LlmRole.MAIN) return -1;
8613
- if (b === LlmRole.MAIN) return 1;
8593
+ if (a === "main" /* MAIN */) return -1;
8594
+ if (b === "main" /* MAIN */) return 1;
8614
8595
  return a.localeCompare(b);
8615
8596
  });
8616
8597
  const createRow = (metric, getValue, options = {}) => {
@@ -9401,7 +9382,7 @@ var McpStatus = ({
9401
9382
  );
9402
9383
  const originalStatus = serverStatus(serverName);
9403
9384
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9404
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9385
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9405
9386
  let statusIndicator = "";
9406
9387
  let statusText = "";
9407
9388
  let statusColor = theme.text.primary;
@@ -9413,17 +9394,17 @@ var McpStatus = ({
9413
9394
  statusColor = theme.text.secondary;
9414
9395
  } else {
9415
9396
  switch (status) {
9416
- case MCPServerStatus.CONNECTED:
9397
+ case "connected" /* CONNECTED */:
9417
9398
  statusIndicator = "\u{1F7E2}";
9418
9399
  statusText = "Ready";
9419
9400
  statusColor = theme.status.success;
9420
9401
  break;
9421
- case MCPServerStatus.CONNECTING:
9402
+ case "connecting" /* CONNECTING */:
9422
9403
  statusIndicator = "\u{1F504}";
9423
9404
  statusText = "Starting... (first startup may take longer)";
9424
9405
  statusColor = theme.status.warning;
9425
9406
  break;
9426
- case MCPServerStatus.DISCONNECTED:
9407
+ case "disconnected" /* DISCONNECTED */:
9427
9408
  default:
9428
9409
  statusIndicator = "\u{1F534}";
9429
9410
  statusText = "Disconnected";
@@ -9471,12 +9452,12 @@ var McpStatus = ({
9471
9452
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9472
9453
  " - ",
9473
9454
  statusText,
9474
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9455
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9475
9456
  ] }),
9476
9457
  authStatusNode
9477
9458
  ] }),
9478
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9479
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9459
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9460
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9480
9461
  " (",
9481
9462
  toolCount,
9482
9463
  " tools cached)"
@@ -10037,7 +10018,7 @@ var Notifications = () => {
10037
10018
  if (dismissed) return [];
10038
10019
  const counts = persistentState.get("startupWarningCounts") || {};
10039
10020
  return startupWarnings.filter((w) => {
10040
- if (w.priority === WarningPriority.Low) {
10021
+ if (w.priority === "low" /* Low */) {
10041
10022
  const count = counts[w.id] || 0;
10042
10023
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10043
10024
  }
@@ -10050,7 +10031,7 @@ var Notifications = () => {
10050
10031
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10051
10032
  let changed = false;
10052
10033
  visibleWarnings.forEach((w) => {
10053
- if (w.priority === WarningPriority.Low) {
10034
+ if (w.priority === "low" /* Low */) {
10054
10035
  counts[w.id] = (counts[w.id] || 0) + 1;
10055
10036
  changed = true;
10056
10037
  }
@@ -10157,7 +10138,7 @@ var UserIdentity = ({ config }) => {
10157
10138
  }
10158
10139
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
10159
10140
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
10160
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
10141
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
10161
10142
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
10162
10143
  "Signed in with Google",
10163
10144
  email ? ":" : ""
@@ -10400,7 +10381,7 @@ var import_react32 = __toESM(require_react(), 1);
10400
10381
  function getConfirmingToolState(pendingHistoryItems) {
10401
10382
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10402
10383
  const confirmingTools = allPendingTools.filter(
10403
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10384
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10404
10385
  );
10405
10386
  if (confirmingTools.length === 0) {
10406
10387
  return null;
@@ -11708,7 +11689,7 @@ var ExitPlanModeDialog = ({
11708
11689
  {
11709
11690
  questions: [
11710
11691
  {
11711
- type: QuestionType.CHOICE,
11692
+ type: "choice" /* CHOICE */,
11712
11693
  header: "Approval",
11713
11694
  question: planContent,
11714
11695
  options: [
@@ -11729,9 +11710,9 @@ var ExitPlanModeDialog = ({
11729
11710
  onSubmit: (answers) => {
11730
11711
  const answer = answers["0"];
11731
11712
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11732
- onApprove(ApprovalMode.AUTO_EDIT);
11713
+ onApprove("autoEdit" /* AUTO_EDIT */);
11733
11714
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11734
- onApprove(ApprovalMode.DEFAULT);
11715
+ onApprove("default" /* DEFAULT */);
11735
11716
  } else if (answer) {
11736
11717
  onFeedback(answer);
11737
11718
  }
@@ -11942,7 +11923,7 @@ ${deceptiveUrlWarnings.map(
11942
11923
  );
11943
11924
  (0, import_react37.useEffect)(() => {
11944
11925
  if (isCancelling) {
11945
- handleConfirm(ToolConfirmationOutcome.Cancel);
11926
+ handleConfirm("cancel" /* Cancel */);
11946
11927
  }
11947
11928
  }, [isCancelling, handleConfirm]);
11948
11929
  const handleSelect = (0, import_react37.useCallback)(
@@ -11955,19 +11936,19 @@ ${deceptiveUrlWarnings.map(
11955
11936
  if (!confirmationDetails.isModifying) {
11956
11937
  options2.push({
11957
11938
  label: "Allow once",
11958
- value: ToolConfirmationOutcome.ProceedOnce,
11939
+ value: "proceed_once" /* ProceedOnce */,
11959
11940
  key: "Allow once"
11960
11941
  });
11961
11942
  if (isTrustedFolder) {
11962
11943
  options2.push({
11963
11944
  label: "Allow for this session",
11964
- value: ToolConfirmationOutcome.ProceedAlways,
11945
+ value: "proceed_always" /* ProceedAlways */,
11965
11946
  key: "Allow for this session"
11966
11947
  });
11967
11948
  if (allowPermanentApproval) {
11968
11949
  options2.push({
11969
11950
  label: "Allow for this file in all future sessions",
11970
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11951
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11971
11952
  key: "Allow for this file in all future sessions"
11972
11953
  });
11973
11954
  }
@@ -11975,119 +11956,119 @@ ${deceptiveUrlWarnings.map(
11975
11956
  if (!config.getIdeMode() || !isDiffingEnabled) {
11976
11957
  options2.push({
11977
11958
  label: "Modify with external editor",
11978
- value: ToolConfirmationOutcome.ModifyWithEditor,
11959
+ value: "modify_with_editor" /* ModifyWithEditor */,
11979
11960
  key: "Modify with external editor"
11980
11961
  });
11981
11962
  }
11982
11963
  options2.push({
11983
11964
  label: "No, suggest changes (esc)",
11984
- value: ToolConfirmationOutcome.Cancel,
11965
+ value: "cancel" /* Cancel */,
11985
11966
  key: "No, suggest changes (esc)"
11986
11967
  });
11987
11968
  }
11988
11969
  } else if (confirmationDetails.type === "sandbox_expansion") {
11989
11970
  options2.push({
11990
11971
  label: "Allow once",
11991
- value: ToolConfirmationOutcome.ProceedOnce,
11972
+ value: "proceed_once" /* ProceedOnce */,
11992
11973
  key: "Allow once"
11993
11974
  });
11994
11975
  if (isTrustedFolder) {
11995
11976
  options2.push({
11996
11977
  label: "Allow for this session",
11997
- value: ToolConfirmationOutcome.ProceedAlways,
11978
+ value: "proceed_always" /* ProceedAlways */,
11998
11979
  key: "Allow for this session"
11999
11980
  });
12000
11981
  if (allowPermanentApproval) {
12001
11982
  options2.push({
12002
11983
  label: "Allow for all future sessions",
12003
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11984
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12004
11985
  key: "Allow for all future sessions"
12005
11986
  });
12006
11987
  }
12007
11988
  }
12008
11989
  options2.push({
12009
11990
  label: "No, suggest changes (esc)",
12010
- value: ToolConfirmationOutcome.Cancel,
11991
+ value: "cancel" /* Cancel */,
12011
11992
  key: "No, suggest changes (esc)"
12012
11993
  });
12013
11994
  } else if (confirmationDetails.type === "exec") {
12014
11995
  options2.push({
12015
11996
  label: "Allow once",
12016
- value: ToolConfirmationOutcome.ProceedOnce,
11997
+ value: "proceed_once" /* ProceedOnce */,
12017
11998
  key: "Allow once"
12018
11999
  });
12019
12000
  if (isTrustedFolder) {
12020
12001
  options2.push({
12021
12002
  label: `Allow for this session`,
12022
- value: ToolConfirmationOutcome.ProceedAlways,
12003
+ value: "proceed_always" /* ProceedAlways */,
12023
12004
  key: `Allow for this session`
12024
12005
  });
12025
12006
  if (allowPermanentApproval) {
12026
12007
  options2.push({
12027
12008
  label: `Allow this command for all future sessions`,
12028
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12009
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12029
12010
  key: `Allow for all future sessions`
12030
12011
  });
12031
12012
  }
12032
12013
  }
12033
12014
  options2.push({
12034
12015
  label: "No, suggest changes (esc)",
12035
- value: ToolConfirmationOutcome.Cancel,
12016
+ value: "cancel" /* Cancel */,
12036
12017
  key: "No, suggest changes (esc)"
12037
12018
  });
12038
12019
  } else if (confirmationDetails.type === "info") {
12039
12020
  options2.push({
12040
12021
  label: "Allow once",
12041
- value: ToolConfirmationOutcome.ProceedOnce,
12022
+ value: "proceed_once" /* ProceedOnce */,
12042
12023
  key: "Allow once"
12043
12024
  });
12044
12025
  if (isTrustedFolder) {
12045
12026
  options2.push({
12046
12027
  label: "Allow for this session",
12047
- value: ToolConfirmationOutcome.ProceedAlways,
12028
+ value: "proceed_always" /* ProceedAlways */,
12048
12029
  key: "Allow for this session"
12049
12030
  });
12050
12031
  if (allowPermanentApproval) {
12051
12032
  options2.push({
12052
12033
  label: "Allow for all future sessions",
12053
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12034
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12054
12035
  key: "Allow for all future sessions"
12055
12036
  });
12056
12037
  }
12057
12038
  }
12058
12039
  options2.push({
12059
12040
  label: "No, suggest changes (esc)",
12060
- value: ToolConfirmationOutcome.Cancel,
12041
+ value: "cancel" /* Cancel */,
12061
12042
  key: "No, suggest changes (esc)"
12062
12043
  });
12063
12044
  } else if (confirmationDetails.type === "mcp") {
12064
12045
  options2.push({
12065
12046
  label: "Allow once",
12066
- value: ToolConfirmationOutcome.ProceedOnce,
12047
+ value: "proceed_once" /* ProceedOnce */,
12067
12048
  key: "Allow once"
12068
12049
  });
12069
12050
  if (isTrustedFolder) {
12070
12051
  options2.push({
12071
12052
  label: "Allow tool for this session",
12072
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
12053
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
12073
12054
  key: "Allow tool for this session"
12074
12055
  });
12075
12056
  options2.push({
12076
12057
  label: "Allow all server tools for this session",
12077
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
12058
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
12078
12059
  key: "Allow all server tools for this session"
12079
12060
  });
12080
12061
  if (allowPermanentApproval) {
12081
12062
  options2.push({
12082
12063
  label: "Allow tool for all future sessions",
12083
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12064
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12084
12065
  key: "Allow tool for all future sessions"
12085
12066
  });
12086
12067
  }
12087
12068
  }
12088
12069
  options2.push({
12089
12070
  label: "No, suggest changes (esc)",
12090
- value: ToolConfirmationOutcome.Cancel,
12071
+ value: "cancel" /* Cancel */,
12091
12072
  key: "No, suggest changes (esc)"
12092
12073
  });
12093
12074
  }
@@ -12126,7 +12107,7 @@ ${deceptiveUrlWarnings.map(
12126
12107
  const containsRedirection = commandsToDisplay.some(
12127
12108
  (cmd) => hasRedirection(cmd)
12128
12109
  );
12129
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12110
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12130
12111
  if (containsRedirection && !isAutoEdit) {
12131
12112
  extraInfoLines = 1;
12132
12113
  }
@@ -12152,7 +12133,7 @@ ${deceptiveUrlWarnings.map(
12152
12133
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12153
12134
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12154
12135
  const alwaysAndSaveIndex = options2.findIndex(
12155
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12136
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12156
12137
  );
12157
12138
  if (alwaysAndSaveIndex !== -1) {
12158
12139
  initialIndex2 = alwaysAndSaveIndex;
@@ -12169,10 +12150,10 @@ ${deceptiveUrlWarnings.map(
12169
12150
  {
12170
12151
  questions: confirmationDetails.questions,
12171
12152
  onSubmit: (answers) => {
12172
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12153
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12173
12154
  },
12174
12155
  onCancel: () => {
12175
- handleConfirm(ToolConfirmationOutcome.Cancel);
12156
+ handleConfirm("cancel" /* Cancel */);
12176
12157
  },
12177
12158
  width: terminalWidth,
12178
12159
  availableHeight: bodyHeight
@@ -12193,19 +12174,19 @@ ${deceptiveUrlWarnings.map(
12193
12174
  planPath: confirmationDetails.planPath,
12194
12175
  getPreferredEditor,
12195
12176
  onApprove: (approvalMode) => {
12196
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12177
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12197
12178
  approved: true,
12198
12179
  approvalMode
12199
12180
  });
12200
12181
  },
12201
12182
  onFeedback: (feedback) => {
12202
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12183
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12203
12184
  approved: false,
12204
12185
  feedback
12205
12186
  });
12206
12187
  },
12207
12188
  onCancel: () => {
12208
- handleConfirm(ToolConfirmationOutcome.Cancel);
12189
+ handleConfirm("cancel" /* Cancel */);
12209
12190
  },
12210
12191
  width: terminalWidth,
12211
12192
  availableHeight: bodyHeight
@@ -12314,7 +12295,7 @@ ${deceptiveUrlWarnings.map(
12314
12295
  const containsRedirection = commandsToDisplay.some(
12315
12296
  (cmd) => hasRedirection(cmd)
12316
12297
  );
12317
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12298
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12318
12299
  let warnings = null;
12319
12300
  if (containsRedirection && !isAutoEdit) {
12320
12301
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12473,7 +12454,7 @@ ${deceptiveUrlWarnings.map(
12473
12454
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12474
12455
  const renderRadioItem = (0, import_react37.useCallback)(
12475
12456
  (item, { titleColor }) => {
12476
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12457
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12477
12458
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12478
12459
  item.label,
12479
12460
  " ",
@@ -14503,7 +14484,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14503
14484
  if (settings.merged.security.auth.useExternal) {
14504
14485
  return null;
14505
14486
  }
14506
- if (authType === AuthType.USE_GEMINI) {
14487
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14507
14488
  return null;
14508
14489
  }
14509
14490
  return validateAuthMethod(authType);
@@ -14555,7 +14536,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14555
14536
  }
14556
14537
  return;
14557
14538
  }
14558
- if (authType === AuthType.USE_GEMINI) {
14539
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14559
14540
  const key = await reloadApiKey();
14560
14541
  if (!key) {
14561
14542
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14633,31 +14614,31 @@ function AuthDialog({
14633
14614
  let items = [
14634
14615
  {
14635
14616
  label: "Sign in with Google",
14636
- value: AuthType.LOGIN_WITH_GOOGLE,
14637
- key: AuthType.LOGIN_WITH_GOOGLE
14617
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14618
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14638
14619
  },
14639
14620
  ...process.env["CLOUD_SHELL"] === "true" ? [
14640
14621
  {
14641
14622
  label: "Use Cloud Shell user credentials",
14642
- value: AuthType.COMPUTE_ADC,
14643
- key: AuthType.COMPUTE_ADC
14623
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14624
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14644
14625
  }
14645
14626
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14646
14627
  {
14647
14628
  label: "Use metadata server application default credentials",
14648
- value: AuthType.COMPUTE_ADC,
14649
- key: AuthType.COMPUTE_ADC
14629
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14630
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14650
14631
  }
14651
14632
  ] : [],
14652
14633
  {
14653
14634
  label: "Use Gemini API Key",
14654
- value: AuthType.USE_GEMINI,
14655
- key: AuthType.USE_GEMINI
14635
+ value: "gemini-api-key" /* USE_GEMINI */,
14636
+ key: "gemini-api-key" /* USE_GEMINI */
14656
14637
  },
14657
14638
  {
14658
14639
  label: "Vertex AI",
14659
- value: AuthType.USE_VERTEX_AI,
14660
- key: AuthType.USE_VERTEX_AI
14640
+ value: "vertex-ai" /* USE_VERTEX_AI */,
14641
+ key: "vertex-ai" /* USE_VERTEX_AI */
14661
14642
  }
14662
14643
  ];
14663
14644
  if (settings.merged.security.auth.enforcedType) {
@@ -14679,9 +14660,9 @@ function AuthDialog({
14679
14660
  return item.value === defaultAuthType;
14680
14661
  }
14681
14662
  if (process.env["GEMINI_API_KEY"]) {
14682
- return item.value === AuthType.USE_GEMINI;
14663
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
14683
14664
  }
14684
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
14665
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14685
14666
  });
14686
14667
  if (settings.merged.security.auth.enforcedType) {
14687
14668
  initialAuthIndex = 0;
@@ -14692,7 +14673,7 @@ function AuthDialog({
14692
14673
  return;
14693
14674
  }
14694
14675
  if (authType) {
14695
- const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14676
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14696
14677
  if (needsRestart) {
14697
14678
  setAuthContext({ requiresRestart: true });
14698
14679
  } else {
@@ -14700,12 +14681,12 @@ function AuthDialog({
14700
14681
  }
14701
14682
  await clearCachedCredentialFile();
14702
14683
  settings.setValue(scope, "security.auth.selectedType", authType);
14703
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14684
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14704
14685
  setExiting(true);
14705
14686
  setTimeout(relaunchApp, 100);
14706
14687
  return;
14707
14688
  }
14708
- if (authType === AuthType.USE_GEMINI) {
14689
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14709
14690
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14710
14691
  return;
14711
14692
  }
@@ -15501,11 +15482,11 @@ var PrivacyNoticeText = ({
15501
15482
  }) => {
15502
15483
  const authType = config.getContentGeneratorConfig()?.authType;
15503
15484
  switch (authType) {
15504
- case AuthType.USE_GEMINI:
15485
+ case "gemini-api-key" /* USE_GEMINI */:
15505
15486
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15506
- case AuthType.USE_VERTEX_AI:
15487
+ case "vertex-ai" /* USE_VERTEX_AI */:
15507
15488
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15508
- case AuthType.LOGIN_WITH_GOOGLE:
15489
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15509
15490
  default:
15510
15491
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15511
15492
  }
@@ -15546,7 +15527,7 @@ function ProQuotaDialog({
15546
15527
  value: "retry_always",
15547
15528
  key: "retry_always"
15548
15529
  },
15549
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15530
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15550
15531
  {
15551
15532
  label: "Upgrade for higher limits",
15552
15533
  value: "upgrade",
@@ -16705,7 +16686,7 @@ function ModelDialog({ onClose }) {
16705
16686
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16706
16687
  const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
16707
16688
  const selectedAuthType = settings.merged.security.auth.selectedType;
16708
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16689
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16709
16690
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16710
16691
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16711
16692
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -18028,10 +18009,10 @@ function initializeConsoleStore() {
18028
18009
  globalConsoleMessages = [];
18029
18010
  globalErrorCount = 0;
18030
18011
  notifyListeners();
18031
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
18032
- coreEvents.off(CoreEvent.Output, handleOutput);
18033
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
18034
- coreEvents.on(CoreEvent.Output, handleOutput);
18012
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
18013
+ coreEvents.off("output" /* Output */, handleOutput);
18014
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
18015
+ coreEvents.on("output" /* Output */, handleOutput);
18035
18016
  }
18036
18017
  function notifyListeners() {
18037
18018
  for (const listener of listeners) {
@@ -20168,7 +20149,7 @@ function usePromptCompletion({
20168
20149
  { model: "prompt-completion" },
20169
20150
  contents,
20170
20151
  signal,
20171
- LlmRole.UTILITY_AUTOCOMPLETE
20152
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20172
20153
  );
20173
20154
  if (signal.aborted) {
20174
20155
  return;
@@ -22246,9 +22227,9 @@ var InputPrompt = ({
22246
22227
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22247
22228
  }
22248
22229
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22249
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22250
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22251
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22230
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22231
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22232
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22252
22233
  let statusColor;
22253
22234
  let statusText = "";
22254
22235
  if (shellModeActive) {
@@ -23081,22 +23062,22 @@ var ApprovalModeIndicator = ({
23081
23062
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23082
23063
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23083
23064
  switch (approvalMode) {
23084
- case ApprovalMode.AUTO_EDIT:
23065
+ case "autoEdit" /* AUTO_EDIT */:
23085
23066
  textColor = theme.status.warning;
23086
23067
  textContent = "auto-accept edits";
23087
23068
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23088
23069
  break;
23089
- case ApprovalMode.PLAN:
23070
+ case "plan" /* PLAN */:
23090
23071
  textColor = theme.status.success;
23091
23072
  textContent = "plan";
23092
23073
  subText = `${cycleHint} to manual`;
23093
23074
  break;
23094
- case ApprovalMode.YOLO:
23075
+ case "yolo" /* YOLO */:
23095
23076
  textColor = theme.status.error;
23096
23077
  textContent = "YOLO";
23097
23078
  subText = yoloHint;
23098
23079
  break;
23099
- case ApprovalMode.DEFAULT:
23080
+ case "default" /* DEFAULT */:
23100
23081
  default:
23101
23082
  textColor = theme.text.accent;
23102
23083
  textContent = "";
@@ -23144,7 +23125,7 @@ var useComposerStatus = () => {
23144
23125
  (item) => item.type === "tool_group"
23145
23126
  ).some(
23146
23127
  (item) => item.tools.some(
23147
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23128
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23148
23129
  )
23149
23130
  ),
23150
23131
  [uiState.pendingHistoryItems]
@@ -23159,13 +23140,13 @@ var useComposerStatus = () => {
23159
23140
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23160
23141
  if (hideMinimalModeHintWhileBusy) return null;
23161
23142
  switch (showApprovalModeIndicator) {
23162
- case ApprovalMode.YOLO:
23143
+ case "yolo" /* YOLO */:
23163
23144
  return { text: "YOLO", color: theme.status.error };
23164
- case ApprovalMode.PLAN:
23145
+ case "plan" /* PLAN */:
23165
23146
  return { text: "plan", color: theme.status.success };
23166
- case ApprovalMode.AUTO_EDIT:
23147
+ case "autoEdit" /* AUTO_EDIT */:
23167
23148
  return { text: "auto edit", color: theme.status.warning };
23168
- case ApprovalMode.DEFAULT:
23149
+ case "default" /* DEFAULT */:
23169
23150
  default:
23170
23151
  return null;
23171
23152
  }
@@ -23519,7 +23500,7 @@ var ConfigInitDisplay = ({
23519
23500
  let connected = 0;
23520
23501
  const connecting = [];
23521
23502
  for (const [name, client] of clients.entries()) {
23522
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23503
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23523
23504
  connected++;
23524
23505
  } else {
23525
23506
  connecting.push(name);
@@ -23541,9 +23522,9 @@ var ConfigInitDisplay = ({
23541
23522
  );
23542
23523
  }
23543
23524
  };
23544
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23525
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23545
23526
  return () => {
23546
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23527
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23547
23528
  };
23548
23529
  }, [initialMessage]);
23549
23530
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24260,7 +24241,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24260
24241
  callId,
24261
24242
  name: SHELL_COMMAND_NAME,
24262
24243
  description: rawQuery,
24263
- status: CoreToolCallStatus.Executing,
24244
+ status: "executing" /* Executing */,
24264
24245
  isClientInitiated: true,
24265
24246
  resultDisplay: "",
24266
24247
  confirmationDetails: void 0
@@ -24401,7 +24382,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24401
24382
  mainContent = result.output.trim() || "(Command produced no output)";
24402
24383
  }
24403
24384
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24404
- let finalStatus = CoreToolCallStatus.Success;
24385
+ let finalStatus = "success" /* Success */;
24405
24386
  const prependToAnsiOutput = (output, text) => {
24406
24387
  const newLines = text.split("\n").map((line) => [
24407
24388
  {
@@ -24420,20 +24401,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24420
24401
  };
24421
24402
  let prefix = "";
24422
24403
  if (result.error) {
24423
- finalStatus = CoreToolCallStatus.Error;
24404
+ finalStatus = "error" /* Error */;
24424
24405
  prefix = result.error.message;
24425
24406
  } else if (result.aborted) {
24426
- finalStatus = CoreToolCallStatus.Cancelled;
24407
+ finalStatus = "cancelled" /* Cancelled */;
24427
24408
  prefix = "Command was cancelled.";
24428
24409
  } else if (result.backgrounded) {
24429
- finalStatus = CoreToolCallStatus.Success;
24410
+ finalStatus = "success" /* Success */;
24430
24411
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24431
24412
  mainContent = finalOutput;
24432
24413
  } else if (result.signal) {
24433
- finalStatus = CoreToolCallStatus.Error;
24414
+ finalStatus = "error" /* Error */;
24434
24415
  prefix = `Command terminated by signal: ${result.signal}.`;
24435
24416
  } else if (result.exitCode !== 0) {
24436
- finalStatus = CoreToolCallStatus.Error;
24417
+ finalStatus = "error" /* Error */;
24437
24418
  prefix = `Command exited with code ${result.exitCode}.`;
24438
24419
  }
24439
24420
  if (prefix) {
@@ -24459,7 +24440,7 @@ ${mainContent}`;
24459
24440
  status: finalStatus,
24460
24441
  resultDisplay: finalOutput
24461
24442
  };
24462
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24443
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24463
24444
  addItemToHistory(
24464
24445
  {
24465
24446
  type: "tool_group",
@@ -25449,12 +25430,12 @@ function useQuotaAndFallback({
25449
25430
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25450
25431
  `/stats model for usage details`,
25451
25432
  `/model to switch models.`,
25452
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25433
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25453
25434
  ].filter(Boolean);
25454
25435
  message = messageLines.join("\n");
25455
25436
  } else if (error instanceof ModelNotFoundError) {
25456
25437
  isModelNotFoundError = true;
25457
- if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
25438
+ if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
25458
25439
  const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
25459
25440
  const messageLines = [
25460
25441
  `Model "${failedModel}" is not available in region "${location}".`,
@@ -25646,7 +25627,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25646
25627
  );
25647
25628
  setEditorError(null);
25648
25629
  setIsEditorDialogOpen(false);
25649
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25630
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25650
25631
  } catch (error) {
25651
25632
  setEditorError(`Failed to set editor preference: ${error}`);
25652
25633
  }
@@ -25655,7 +25636,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25655
25636
  );
25656
25637
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25657
25638
  setIsEditorDialogOpen(false);
25658
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25639
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25659
25640
  }, []);
25660
25641
  return {
25661
25642
  isEditorDialogOpen,
@@ -26032,7 +26013,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26032
26013
  canonicalPath: resolvedCommandPath
26033
26014
  } = parseSlashCommand(trimmed, commands);
26034
26015
  if (!commandToExecute) {
26035
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
26016
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
26036
26017
  if (isMcpLoading) {
26037
26018
  setIsProcessing(true);
26038
26019
  if (addToHistory) {
@@ -26212,7 +26193,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26212
26193
  onConfirm: async (resolvedOutcome) => {
26213
26194
  resolve3({
26214
26195
  outcome: resolvedOutcome,
26215
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26196
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26216
26197
  });
26217
26198
  }
26218
26199
  };
@@ -26220,7 +26201,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26220
26201
  callId,
26221
26202
  name: "Expansion",
26222
26203
  description: "Command expansion needs shell access",
26223
- status: CoreToolCallStatus.AwaitingApproval,
26204
+ status: "awaiting_approval" /* AwaitingApproval */,
26224
26205
  isClientInitiated: true,
26225
26206
  resultDisplay: void 0,
26226
26207
  confirmationDetails
@@ -26231,7 +26212,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26231
26212
  });
26232
26213
  });
26233
26214
  setPendingItem(null);
26234
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26215
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26235
26216
  addItem(
26236
26217
  {
26237
26218
  type: "info" /* INFO */,
@@ -26241,7 +26222,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26241
26222
  );
26242
26223
  return { type: "handled" };
26243
26224
  }
26244
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26225
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26245
26226
  setSessionShellAllowlist(
26246
26227
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26247
26228
  );
@@ -26717,7 +26698,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26717
26698
  let description;
26718
26699
  let renderOutputAsMarkdown = false;
26719
26700
  const displayName = call.tool?.displayName ?? call.request.name;
26720
- if (call.status === CoreToolCallStatus.Error) {
26701
+ if (call.status === "error" /* Error */) {
26721
26702
  description = JSON.stringify(call.request.args);
26722
26703
  } else {
26723
26704
  description = call.invocation.getDescription();
@@ -26740,27 +26721,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26740
26721
  let progress = void 0;
26741
26722
  let progressTotal = void 0;
26742
26723
  switch (call.status) {
26743
- case CoreToolCallStatus.Success:
26724
+ case "success" /* Success */:
26744
26725
  resultDisplay = call.response.resultDisplay;
26745
26726
  outputFile = call.response.outputFile;
26746
26727
  break;
26747
- case CoreToolCallStatus.Error:
26748
- case CoreToolCallStatus.Cancelled:
26728
+ case "error" /* Error */:
26729
+ case "cancelled" /* Cancelled */:
26749
26730
  resultDisplay = call.response.resultDisplay;
26750
26731
  break;
26751
- case CoreToolCallStatus.AwaitingApproval:
26732
+ case "awaiting_approval" /* AwaitingApproval */:
26752
26733
  correlationId = call.correlationId;
26753
26734
  confirmationDetails = call.confirmationDetails;
26754
26735
  break;
26755
- case CoreToolCallStatus.Executing:
26736
+ case "executing" /* Executing */:
26756
26737
  resultDisplay = call.liveOutput;
26757
26738
  ptyId = call.pid;
26758
26739
  progressMessage = call.progressMessage;
26759
26740
  progress = call.progress;
26760
26741
  progressTotal = call.progressTotal;
26761
26742
  break;
26762
- case CoreToolCallStatus.Scheduled:
26763
- case CoreToolCallStatus.Validating:
26743
+ case "scheduled" /* Scheduled */:
26744
+ case "validating" /* Validating */:
26764
26745
  break;
26765
26746
  default: {
26766
26747
  const exhaustiveCheck = call;
@@ -26831,7 +26812,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26831
26812
  const handler = (event) => {
26832
26813
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26833
26814
  const hasExecuting = event.toolCalls.some(
26834
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26815
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26835
26816
  );
26836
26817
  if (hasExecuting) {
26837
26818
  setLastToolOutputTime(Date.now());
@@ -26840,7 +26821,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26840
26821
  const prevCalls = prev[event.schedulerId] ?? [];
26841
26822
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26842
26823
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26843
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26824
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26844
26825
  );
26845
26826
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26846
26827
  return prev;
@@ -26852,9 +26833,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26852
26833
  };
26853
26834
  });
26854
26835
  };
26855
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26836
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26856
26837
  return () => {
26857
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26838
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26858
26839
  };
26859
26840
  }, [messageBus, internalAdaptToolCalls]);
26860
26841
  (0, import_react98.useEffect)(() => {
@@ -26876,9 +26857,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26876
26857
  };
26877
26858
  });
26878
26859
  };
26879
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26860
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26880
26861
  return () => {
26881
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26862
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26882
26863
  };
26883
26864
  }, [messageBus]);
26884
26865
  const schedule = (0, import_react98.useCallback)(
@@ -26977,8 +26958,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26977
26958
  const prev = prevMap.get(coreCall.request.callId);
26978
26959
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26979
26960
  let status = coreCall.status;
26980
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26981
- status = CoreToolCallStatus.Executing;
26961
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26962
+ status = "executing" /* Executing */;
26982
26963
  }
26983
26964
  return {
26984
26965
  ...coreCall,
@@ -27010,7 +26991,7 @@ function getBackgroundedToolInfo(toolCall) {
27010
26991
  };
27011
26992
  }
27012
26993
  function isBackgroundableExecutingToolCall(toolCall) {
27013
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26994
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
27014
26995
  }
27015
26996
  function showCitations(settings) {
27016
26997
  const enabled = settings.merged.ui.showCitations;
@@ -27020,14 +27001,14 @@ function showCitations(settings) {
27020
27001
  return true;
27021
27002
  }
27022
27003
  function calculateStreamingState(isResponding, toolCalls) {
27023
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
27004
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
27024
27005
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
27025
27006
  }
27026
27007
  const isAnyToolActive = toolCalls.some((tc) => {
27027
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
27008
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
27028
27009
  return true;
27029
27010
  }
27030
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
27011
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
27031
27012
  return !tc.responseSubmittedToGemini;
27032
27013
  }
27033
27014
  return false;
@@ -27073,9 +27054,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27073
27054
  }
27074
27055
  setRetryStatus(payload);
27075
27056
  };
27076
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
27057
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27077
27058
  return () => {
27078
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
27059
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27079
27060
  };
27080
27061
  }, [isRespondingRef]);
27081
27062
  const [
@@ -27208,12 +27189,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27208
27189
  const tc = toolCalls[i];
27209
27190
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27210
27191
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27211
- const isAgent = tc.tool?.kind === Kind.Agent;
27192
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
27212
27193
  if (isAgent) {
27213
27194
  let contigAgentsComplete = true;
27214
27195
  for (let j = i + 1; j < toolCalls.length; j++) {
27215
27196
  const nextTc = toolCalls[j];
27216
- if (nextTc.tool?.kind === Kind.Agent) {
27197
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
27217
27198
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27218
27199
  contigAgentsComplete = false;
27219
27200
  break;
@@ -27239,7 +27220,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27239
27220
  let currentGroup = [];
27240
27221
  for (const tc of toolsToPush) {
27241
27222
  newPushed.add(tc.request.callId);
27242
- if (tc.tool?.kind === Kind.Agent) {
27223
+ if (tc.tool?.kind === "agent" /* Agent */) {
27243
27224
  currentGroup.push(tc);
27244
27225
  } else {
27245
27226
  if (currentGroup.length > 0) {
@@ -27389,7 +27370,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27389
27370
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27390
27371
  }, [activeShellPtyId, addItem, setIsResponding]);
27391
27372
  (0, import_react99.useEffect)(() => {
27392
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27373
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27393
27374
  const lastUserMessageIndex = history.findLastIndex(
27394
27375
  (item) => item.type === "user" /* USER */
27395
27376
  );
@@ -27457,7 +27438,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27457
27438
  return;
27458
27439
  }
27459
27440
  const hasActiveTools = toolCalls.some(
27460
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27441
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27461
27442
  );
27462
27443
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27463
27444
  if (clearBuffer) {
@@ -27484,7 +27465,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27484
27465
  if (tool.name === SHELL_COMMAND_NAME) {
27485
27466
  return {
27486
27467
  ...tool,
27487
- status: CoreToolCallStatus.Cancelled,
27468
+ status: "cancelled" /* Cancelled */,
27488
27469
  resultDisplay: tool.resultDisplay
27489
27470
  };
27490
27471
  }
@@ -27549,7 +27530,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27549
27530
  let localQueryToSendToGemini = null;
27550
27531
  if (typeof query === "string") {
27551
27532
  const trimmedQuery = query.trim();
27552
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27533
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
27553
27534
  if (!shellModeActive) {
27554
27535
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27555
27536
  if (slashCommandResult) {
@@ -27705,7 +27686,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27705
27686
  if (pendingHistoryItemRef.current) {
27706
27687
  if (pendingHistoryItemRef.current.type === "tool_group") {
27707
27688
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27708
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27689
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27709
27690
  );
27710
27691
  const pendingItem = {
27711
27692
  ...pendingHistoryItemRef.current,
@@ -27951,15 +27932,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27951
27932
  let geminiMessageBuffer = "";
27952
27933
  const toolCallRequests = [];
27953
27934
  for await (const event of stream) {
27954
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27935
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27955
27936
  setThought(null);
27956
27937
  }
27957
27938
  switch (event.type) {
27958
- case GeminiEventType.Thought:
27939
+ case "thought" /* Thought */:
27959
27940
  setLastGeminiActivityTime(Date.now());
27960
27941
  handleThoughtEvent(event.value, userMessageTimestamp);
27961
27942
  break;
27962
- case GeminiEventType.Content:
27943
+ case "content" /* Content */:
27963
27944
  setLastGeminiActivityTime(Date.now());
27964
27945
  geminiMessageBuffer = handleContentEvent(
27965
27946
  event.value,
@@ -27967,16 +27948,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27967
27948
  userMessageTimestamp
27968
27949
  );
27969
27950
  break;
27970
- case GeminiEventType.ToolCallRequest:
27951
+ case "tool_call_request" /* ToolCallRequest */:
27971
27952
  toolCallRequests.push(event.value);
27972
27953
  break;
27973
- case GeminiEventType.UserCancelled:
27954
+ case "user_cancelled" /* UserCancelled */:
27974
27955
  handleUserCancelledEvent(userMessageTimestamp);
27975
27956
  break;
27976
- case GeminiEventType.Error:
27957
+ case "error" /* Error */:
27977
27958
  handleErrorEvent(event.value, userMessageTimestamp);
27978
27959
  break;
27979
- case GeminiEventType.AgentExecutionStopped:
27960
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
27980
27961
  handleAgentExecutionStoppedEvent(
27981
27962
  event.value.reason,
27982
27963
  userMessageTimestamp,
@@ -27984,7 +27965,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27984
27965
  event.value.contextCleared
27985
27966
  );
27986
27967
  break;
27987
- case GeminiEventType.AgentExecutionBlocked:
27968
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
27988
27969
  handleAgentExecutionBlockedEvent(
27989
27970
  event.value.reason,
27990
27971
  userMessageTimestamp,
@@ -27992,35 +27973,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27992
27973
  event.value.contextCleared
27993
27974
  );
27994
27975
  break;
27995
- case GeminiEventType.ChatCompressed:
27976
+ case "chat_compressed" /* ChatCompressed */:
27996
27977
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27997
27978
  break;
27998
- case GeminiEventType.ToolCallConfirmation:
27999
- case GeminiEventType.ToolCallResponse:
27979
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
27980
+ case "tool_call_response" /* ToolCallResponse */:
28000
27981
  break;
28001
- case GeminiEventType.MaxSessionTurns:
27982
+ case "max_session_turns" /* MaxSessionTurns */:
28002
27983
  handleMaxSessionTurnsEvent();
28003
27984
  break;
28004
- case GeminiEventType.ContextWindowWillOverflow:
27985
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
28005
27986
  handleContextWindowWillOverflowEvent(
28006
27987
  event.value.estimatedRequestTokenCount,
28007
27988
  event.value.remainingTokenCount
28008
27989
  );
28009
27990
  break;
28010
- case GeminiEventType.Finished:
27991
+ case "finished" /* Finished */:
28011
27992
  handleFinishedEvent(event, userMessageTimestamp);
28012
27993
  break;
28013
- case GeminiEventType.Citation:
27994
+ case "citation" /* Citation */:
28014
27995
  handleCitationEvent(event.value, userMessageTimestamp);
28015
27996
  break;
28016
- case GeminiEventType.ModelInfo:
27997
+ case "model_info" /* ModelInfo */:
28017
27998
  handleChatModelEvent(event.value, userMessageTimestamp);
28018
27999
  break;
28019
- case GeminiEventType.LoopDetected:
28000
+ case "loop_detected" /* LoopDetected */:
28020
28001
  loopDetectedRef.current = true;
28021
28002
  break;
28022
- case GeminiEventType.Retry:
28023
- case GeminiEventType.InvalidStream:
28003
+ case "retry" /* Retry */:
28004
+ case "invalid_stream" /* InvalidStream */:
28024
28005
  break;
28025
28006
  default: {
28026
28007
  const unreachable = event;
@@ -28061,7 +28042,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28061
28042
  const submitQuery = (0, import_react99.useCallback)(
28062
28043
  async (query, options, prompt_id) => runInDevTraceSpan(
28063
28044
  {
28064
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
28045
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
28065
28046
  sessionId: config.getSessionId()
28066
28047
  },
28067
28048
  async ({ metadata: spanMetadata }) => {
@@ -28221,7 +28202,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28221
28202
  );
28222
28203
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28223
28204
  async (newApprovalMode) => {
28224
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28205
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28225
28206
  if (geminiClient) {
28226
28207
  try {
28227
28208
  await geminiClient.addHistory({
@@ -28244,11 +28225,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28244
28225
  }
28245
28226
  }
28246
28227
  previousApprovalModeRef.current = newApprovalMode;
28247
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28228
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28248
28229
  let awaitingApprovalCalls = toolCalls.filter(
28249
28230
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28250
28231
  );
28251
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28232
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28252
28233
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28253
28234
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28254
28235
  return true;
@@ -28264,11 +28245,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28264
28245
  if (call.correlationId) {
28265
28246
  try {
28266
28247
  await config.getMessageBus().publish({
28267
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28248
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28268
28249
  correlationId: call.correlationId,
28269
28250
  confirmed: true,
28270
28251
  requiresUserConfirmation: false,
28271
- outcome: ToolConfirmationOutcome.ProceedOnce
28252
+ outcome: "proceed_once" /* ProceedOnce */
28272
28253
  });
28273
28254
  } catch (error) {
28274
28255
  debugLogger.warn(
@@ -28337,14 +28318,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28337
28318
  );
28338
28319
  if (isLowErrorVerbosity) {
28339
28320
  suppressedToolErrorCountRef.current += geminiTools.filter(
28340
- (tc) => tc.status === CoreToolCallStatus.Error
28321
+ (tc) => tc.status === "error" /* Error */
28341
28322
  ).length;
28342
28323
  }
28343
28324
  if (geminiTools.length === 0) {
28344
28325
  return;
28345
28326
  }
28346
28327
  const stopExecutionTool = geminiTools.find(
28347
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28328
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28348
28329
  );
28349
28330
  if (stopExecutionTool && stopExecutionTool.response.error) {
28350
28331
  maybeAddSuppressedToolErrorNote();
@@ -28364,9 +28345,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28364
28345
  (tc) => !isTopicTool2(tc.request.name)
28365
28346
  );
28366
28347
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28367
- (tc) => tc.status === CoreToolCallStatus.Cancelled
28348
+ (tc) => tc.status === "cancelled" /* Cancelled */
28368
28349
  );
28369
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28350
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28370
28351
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28371
28352
  if (!turnCancelledRef.current) {
28372
28353
  addItem({
@@ -28446,7 +28427,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28446
28427
  return;
28447
28428
  }
28448
28429
  const restorableToolCalls = toolCalls.filter(
28449
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28430
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28450
28431
  );
28451
28432
  if (restorableToolCalls.length > 0) {
28452
28433
  if (!gitService) {
@@ -28669,14 +28650,14 @@ var useAgentStream = ({
28669
28650
  const displayName = legacyState?.displayName ?? event.name;
28670
28651
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28671
28652
  const desc = legacyState?.description ?? "";
28672
- const fallbackKind = Kind.Other;
28653
+ const fallbackKind = "other" /* Other */;
28673
28654
  const newCall = {
28674
28655
  callId: event.requestId,
28675
28656
  name: displayName,
28676
28657
  originalRequestName: event.name,
28677
28658
  description: desc,
28678
28659
  display: event.display,
28679
- status: CoreToolCallStatus.Scheduled,
28660
+ status: "scheduled" /* Scheduled */,
28680
28661
  isClientInitiated: false,
28681
28662
  renderOutputAsMarkdown: isOutputMarkdown,
28682
28663
  kind: legacyState?.kind ?? fallbackKind,
@@ -28694,10 +28675,10 @@ var useAgentStream = ({
28694
28675
  const evtStatus = legacyState?.status;
28695
28676
  let status = tc.status;
28696
28677
  if (evtStatus === "executing")
28697
- status = CoreToolCallStatus.Executing;
28698
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28678
+ status = "executing" /* Executing */;
28679
+ else if (evtStatus === "error") status = "error" /* Error */;
28699
28680
  else if (evtStatus === "success")
28700
- status = CoreToolCallStatus.Success;
28681
+ status = "success" /* Success */;
28701
28682
  const display = event.display?.result;
28702
28683
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28703
28684
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28730,7 +28711,7 @@ var useAgentStream = ({
28730
28711
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28731
28712
  return {
28732
28713
  ...tc,
28733
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28714
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28734
28715
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28735
28716
  resultDisplay,
28736
28717
  outputFile
@@ -28796,7 +28777,7 @@ var useAgentStream = ({
28796
28777
  if (!options?.isContinuation) {
28797
28778
  if (typeof query === "string") {
28798
28779
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28799
- void logger?.logMessage(MessageSenderType.USER, query);
28780
+ void logger?.logMessage("user" /* USER */, query);
28800
28781
  }
28801
28782
  startNewPrompt();
28802
28783
  }
@@ -30323,9 +30304,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30323
30304
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30324
30305
  async (choice) => {
30325
30306
  const trustLevelMap = {
30326
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30327
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30328
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30307
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30308
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30309
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30329
30310
  };
30330
30311
  const trustLevel = trustLevelMap[choice];
30331
30312
  if (!trustLevel) return;
@@ -30344,7 +30325,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30344
30325
  }, 100);
30345
30326
  return;
30346
30327
  }
30347
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30328
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30348
30329
  onTrustChange(currentIsTrusted);
30349
30330
  setIsTrusted(currentIsTrusted);
30350
30331
  const wasTrusted = isTrusted ?? false;
@@ -31352,7 +31333,7 @@ function useMessageQueue({
31352
31333
  var import_react107 = __toESM(require_react(), 1);
31353
31334
  function useMcpStatus(config) {
31354
31335
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31355
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31336
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31356
31337
  );
31357
31338
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31358
31339
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31365,12 +31346,12 @@ function useMcpStatus(config) {
31365
31346
  setMcpServerCount(manager.getMcpServerCount());
31366
31347
  }
31367
31348
  };
31368
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31349
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31369
31350
  return () => {
31370
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31351
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31371
31352
  };
31372
31353
  }, [config]);
31373
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31354
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31374
31355
  return {
31375
31356
  discoveryState,
31376
31357
  mcpServerCount,
@@ -31397,7 +31378,7 @@ function useApprovalModeIndicator({
31397
31378
  (key) => {
31398
31379
  let nextApprovalMode;
31399
31380
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31400
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31381
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31401
31382
  if (addItem) {
31402
31383
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31403
31384
  const adminSettings = config.getRemoteAdminSettings();
@@ -31415,21 +31396,21 @@ function useApprovalModeIndicator({
31415
31396
  }
31416
31397
  return;
31417
31398
  }
31418
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31399
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31419
31400
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31420
31401
  const currentMode = config.getApprovalMode();
31421
31402
  switch (currentMode) {
31422
- case ApprovalMode.DEFAULT:
31423
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31403
+ case "default" /* DEFAULT */:
31404
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31424
31405
  break;
31425
- case ApprovalMode.AUTO_EDIT:
31426
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31406
+ case "autoEdit" /* AUTO_EDIT */:
31407
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31427
31408
  break;
31428
- case ApprovalMode.PLAN:
31429
- nextApprovalMode = ApprovalMode.DEFAULT;
31409
+ case "plan" /* PLAN */:
31410
+ nextApprovalMode = "default" /* DEFAULT */;
31430
31411
  break;
31431
- case ApprovalMode.YOLO:
31432
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31412
+ case "yolo" /* YOLO */:
31413
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31433
31414
  break;
31434
31415
  default:
31435
31416
  }
@@ -31839,11 +31820,11 @@ var useHookDisplayState = () => {
31839
31820
  removeHook();
31840
31821
  }
31841
31822
  };
31842
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
31843
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31823
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31824
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31844
31825
  return () => {
31845
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
31846
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31826
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31827
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31847
31828
  activeTimeouts.forEach(clearTimeout);
31848
31829
  activeTimeouts.clear();
31849
31830
  };
@@ -32682,7 +32663,7 @@ var AppContainer = (props) => {
32682
32663
  setConfigInitialized(true);
32683
32664
  startupProfiler.flush(config);
32684
32665
  startAutoMemoryIfEnabled(config);
32685
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32666
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32686
32667
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32687
32668
  if (result) {
32688
32669
  const additionalContext = result.getAdditionalContext();
@@ -32709,7 +32690,7 @@ var AppContainer = (props) => {
32709
32690
  );
32710
32691
  const ideClient = await IdeClient.getInstance();
32711
32692
  await ideClient.disconnect();
32712
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32693
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32713
32694
  };
32714
32695
  registerCleanup(cleanupFn);
32715
32696
  return () => {
@@ -32734,11 +32715,11 @@ var AppContainer = (props) => {
32734
32715
  resetTime: payload.resetTime
32735
32716
  });
32736
32717
  };
32737
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32738
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32718
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32719
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32739
32720
  return () => {
32740
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32741
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32721
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32722
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32742
32723
  };
32743
32724
  }, [config]);
32744
32725
  (0, import_react121.useEffect)(() => {
@@ -32751,16 +32732,16 @@ var AppContainer = (props) => {
32751
32732
  const handleAgentsDiscovered = (payload) => {
32752
32733
  setNewAgents(payload.agents);
32753
32734
  };
32754
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32755
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32756
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32735
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32736
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32737
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32757
32738
  return () => {
32758
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32739
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32759
32740
  coreEvents.off(
32760
- CoreEvent.AdminSettingsChanged,
32741
+ "admin-settings-changed" /* AdminSettingsChanged */,
32761
32742
  handleAdminSettingsChanged
32762
32743
  );
32763
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32744
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32764
32745
  };
32765
32746
  }, [settings]);
32766
32747
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32825,11 +32806,11 @@ var AppContainer = (props) => {
32825
32806
  exitEditorDialog
32826
32807
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32827
32808
  (0, import_react121.useEffect)(() => {
32828
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32829
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32809
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32810
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32830
32811
  return () => {
32831
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32832
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32812
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32813
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32833
32814
  };
32834
32815
  }, [handleEditorClose, openEditorDialog]);
32835
32816
  (0, import_react121.useEffect)(() => {
@@ -32897,7 +32878,7 @@ var AppContainer = (props) => {
32897
32878
  errorVerbosity: settings.merged.ui.errorVerbosity
32898
32879
  });
32899
32880
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32900
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32881
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32901
32882
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32902
32883
  const { loadHistoryForResume, isResuming } = useSessionResume({
32903
32884
  config,
@@ -32925,7 +32906,7 @@ var AppContainer = (props) => {
32925
32906
  async (authType, scope) => {
32926
32907
  if (authType) {
32927
32908
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32928
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32909
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32929
32910
  setAuthContext({ requiresRestart: true });
32930
32911
  } else {
32931
32912
  setAuthContext({});
@@ -32953,7 +32934,7 @@ var AppContainer = (props) => {
32953
32934
  );
32954
32935
  return;
32955
32936
  }
32956
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32937
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32957
32938
  writeToStdout(`
32958
32939
  ----------------------------------------------------------------
32959
32940
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32976,7 +32957,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32976
32957
  }
32977
32958
  await saveApiKey(apiKey);
32978
32959
  await reloadApiKey();
32979
- await config.refreshAuth(AuthType.USE_GEMINI);
32960
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32980
32961
  setAuthState("authenticated" /* Authenticated */);
32981
32962
  } catch (e) {
32982
32963
  onAuthError(
@@ -33001,7 +32982,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
33001
32982
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
33002
32983
  );
33003
32984
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
33004
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32985
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
33005
32986
  return;
33006
32987
  }
33007
32988
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33137,9 +33118,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33137
33118
  }
33138
33119
  });
33139
33120
  };
33140
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33121
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33141
33122
  return () => {
33142
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33123
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33143
33124
  };
33144
33125
  }, []);
33145
33126
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33797,7 +33778,7 @@ ${queuedText}` : queuedText;
33797
33778
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33798
33779
  if (settings.merged.general.devtools) {
33799
33780
  void (async () => {
33800
- const { toggleDevToolsPanel } = await import("./devtoolsService-BLOOTSX5.js");
33781
+ const { toggleDevToolsPanel } = await import("./devtoolsService-NFNYJGMS.js");
33801
33782
  await toggleDevToolsPanel(
33802
33783
  config,
33803
33784
  showErrorDetails,
@@ -34015,17 +33996,17 @@ ${queuedText}` : queuedText;
34015
33996
  Date.now()
34016
33997
  );
34017
33998
  };
34018
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
34019
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33999
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
34000
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34020
34001
  coreEvents.drainBacklogs();
34021
34002
  return () => {
34022
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
34023
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
34003
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
34004
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34024
34005
  };
34025
34006
  }, [historyManager]);
34026
34007
  const nightly = props.version.includes("nightly");
34027
34008
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
34028
- const loginRestartMessage = settings.merged.security.auth.selectedType === AuthType.USE_VERTEX_AI ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
34009
+ const loginRestartMessage = settings.merged.security.auth.selectedType === "vertex-ai" /* USE_VERTEX_AI */ ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
34029
34010
  const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
34030
34011
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
34031
34012
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34125,9 +34106,9 @@ ${queuedText}` : queuedText;
34125
34106
  const handleMemoryChanged = (result) => {
34126
34107
  setGeminiMdFileCount(result.fileCount);
34127
34108
  };
34128
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34109
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34129
34110
  return () => {
34130
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34111
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34131
34112
  };
34132
34113
  }, []);
34133
34114
  (0, import_react121.useEffect)(() => {