@google/gemini-cli 0.51.0-nightly.20260708.gc988cbb1e → 0.51.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 (66) hide show
  1. package/bundle/{chunk-5ROOHRPU.js → chunk-24NAD7C5.js} +3 -3
  2. package/bundle/{chunk-QJNCOYUJ.js → chunk-5HMMNXTW.js} +2 -2
  3. package/bundle/{chunk-2JDZFYC3.js → chunk-5TLWWJBW.js} +1 -1
  4. package/bundle/{chunk-4KR7HBX4.js → chunk-6Q62LQM2.js} +1 -1
  5. package/bundle/{chunk-7D3ADWYE.js → chunk-AWR3APYV.js} +5 -11
  6. package/bundle/{chunk-YBDM2ODU.js → chunk-CVOBP6E7.js} +1 -1
  7. package/bundle/{chunk-4IU75RRO.js → chunk-DHQ53XVO.js} +5 -11
  8. package/bundle/{chunk-MC7OL7L5.js → chunk-EFAERAGP.js} +1 -1
  9. package/bundle/{chunk-2QHXXANZ.js → chunk-FAVXT6HW.js} +7 -7
  10. package/bundle/{chunk-NFXURVSG.js → chunk-GDYX7GKQ.js} +1 -1
  11. package/bundle/{chunk-FQK7DMV3.js → chunk-HR7S6IG5.js} +1 -1
  12. package/bundle/{chunk-FFNA4K6Q.js → chunk-HSKKDILO.js} +8 -9
  13. package/bundle/{chunk-DP5SFKWT.js → chunk-JDNHY4EW.js} +3 -3
  14. package/bundle/{chunk-TJBXGMNA.js → chunk-JW5YTR32.js} +1 -1
  15. package/bundle/{chunk-RYFK65YQ.js → chunk-NHMFOV3I.js} +2 -2
  16. package/bundle/{chunk-5WUHO5LJ.js → chunk-OW353XI3.js} +14191 -7605
  17. package/bundle/{chunk-FRH7RQYQ.js → chunk-PNLYANQZ.js} +3 -3
  18. package/bundle/{chunk-KTR2AROX.js → chunk-TTSETJW4.js} +54 -67
  19. package/bundle/{chunk-KPOGDQAW.js → chunk-VJX5MJPE.js} +7 -7
  20. package/bundle/{chunk-IXKAG66M.js → chunk-W3GXG3TT.js} +1 -1
  21. package/bundle/{chunk-WRD6EKKS.js → chunk-W4CRBK3Q.js} +2 -2
  22. package/bundle/{chunk-SWXBIZTJ.js → chunk-WWHOEQ32.js} +1 -1
  23. package/bundle/{chunk-QY634ECV.js → chunk-XDAVUESV.js} +5 -8
  24. package/bundle/{chunk-VAD47FH3.js → chunk-ZR3L5V6U.js} +1 -1
  25. package/bundle/{cleanup-F346RWAB.js → cleanup-3Z2HSZDT.js} +2 -2
  26. package/bundle/{cleanup-HK7WSOZ4.js → cleanup-PU5SP3HU.js} +2 -2
  27. package/bundle/{cleanup-QDOGZ6LD.js → cleanup-QMDDK5HT.js} +2 -2
  28. package/bundle/{core-OE2FN6H4.js → core-B3PBPXVS.js} +1 -1
  29. package/bundle/{dist-GOVFKZUP.js → core-E5FGEYHI.js} +1 -1
  30. package/bundle/{devtoolsService-LUX2QI2P.js → devtoolsService-2XF7DDHC.js} +2 -2
  31. package/bundle/{devtoolsService-CUFYN7RR.js → devtoolsService-CRN6YE4U.js} +2 -2
  32. package/bundle/{devtoolsService-OFIHV2E2.js → devtoolsService-P33QSD7O.js} +3 -4
  33. package/bundle/{dist-SYV2MKKT.js → dist-2KYOZ4WS.js} +1 -1
  34. package/bundle/{gemini-OIHKLMRS.js → gemini-EVKJWIDN.js} +14 -14
  35. package/bundle/{gemini-J2WVD3HI.js → gemini-FJJIUT3T.js} +196 -212
  36. package/bundle/{gemini-NMU6HI2V.js → gemini-PPWSIUOX.js} +14 -14
  37. package/bundle/gemini.js +7 -7
  38. package/bundle/{interactiveCli-ZSCRTNFT.js → interactiveCli-IGIRH6LD.js} +8 -8
  39. package/bundle/{interactiveCli-JPNG4XNZ.js → interactiveCli-K46EDB4I.js} +8 -8
  40. package/bundle/{interactiveCli-JXJWMPVK.js → interactiveCli-LIY2TCD4.js} +296 -315
  41. package/bundle/{liteRtServerManager-CGFM7N3B.js → liteRtServerManager-2UVXXAFT.js} +4 -4
  42. package/bundle/{liteRtServerManager-IOUCER7S.js → liteRtServerManager-AQ6QKMM2.js} +4 -4
  43. package/bundle/{liteRtServerManager-JY2MURMO.js → liteRtServerManager-CHKODBL3.js} +4 -4
  44. package/bundle/{oauth2-provider-5EW734HE.js → oauth2-provider-DMK354XO.js} +1 -1
  45. package/bundle/{oauth2-provider-423KYCCV.js → oauth2-provider-EJMQIWQZ.js} +1 -1
  46. package/bundle/{oauth2-provider-D7AYLO4B.js → oauth2-provider-ROQJTVTD.js} +72 -38
  47. package/bundle/{start-HEAF5AYN.js → start-AII542BS.js} +6 -6
  48. package/bundle/{start-LR7NW5AT.js → start-KNGH45SZ.js} +6 -6
  49. package/bundle/{start-WPNOCPM6.js → start-V2SV63TN.js} +6 -6
  50. package/package.json +1 -1
  51. package/bundle/chunk-3RAOFZWC.js +0 -512
  52. package/bundle/chunk-46LUTSJ4.js +0 -17332
  53. package/bundle/chunk-G63UEXXU.js +0 -154
  54. package/bundle/chunk-L7HQQFTI.js +0 -398
  55. package/bundle/chunk-LKCMWW54.js +0 -388057
  56. package/bundle/chunk-SHMPMIKB.js +0 -118
  57. package/bundle/chunk-SUZMHKOU.js +0 -102505
  58. package/bundle/chunk-VJQWDQHT.js +0 -1571
  59. package/bundle/cleanup-XGIZ3M66.js +0 -32
  60. package/bundle/devtoolsService-PZBPSAKB.js +0 -4359
  61. package/bundle/dist-VRX3PYGK.js +0 -2152
  62. package/bundle/gemini-TSF7456F.js +0 -29270
  63. package/bundle/interactiveCli-SFIYURNH.js +0 -34776
  64. package/bundle/liteRtServerManager-ZOUYJ3HK.js +0 -65
  65. package/bundle/oauth2-provider-XSTJLVJW.js +0 -235
  66. package/bundle/start-YQNS7733.js +0 -18
@@ -157,13 +157,13 @@ import {
157
157
  widestLineFromStyledChars,
158
158
  wordBreakStyledChars,
159
159
  wrapStyledChars
160
- } from "./chunk-SUZMHKOU.js";
160
+ } from "./chunk-FAVXT6HW.js";
161
161
  import {
162
162
  appEvents
163
163
  } from "./chunk-5PS3AYFU.js";
164
164
  import {
165
165
  require_source
166
- } from "./chunk-VJQWDQHT.js";
166
+ } from "./chunk-WWHOEQ32.js";
167
167
  import {
168
168
  ACTIVE_SHELL_MAX_LINES,
169
169
  COMPACT_TOOL_SUBVIEW_MAX_LINES,
@@ -214,37 +214,33 @@ import {
214
214
  stripAnsi,
215
215
  stripUnsafeCharacters,
216
216
  toCodePoints
217
- } from "./chunk-QY634ECV.js";
217
+ } from "./chunk-W3GXG3TT.js";
218
218
  import {
219
219
  handleAutoUpdate,
220
220
  isDevelopment,
221
221
  relaunchApp,
222
222
  setUpdateHandler
223
- } from "./chunk-WRD6EKKS.js";
223
+ } from "./chunk-5HMMNXTW.js";
224
224
  import {
225
225
  isTodoList,
226
226
  mapCoreStatusToDisplayStatus,
227
227
  require_react
228
- } from "./chunk-3RAOFZWC.js";
228
+ } from "./chunk-CVOBP6E7.js";
229
229
  import {
230
230
  registerCleanup,
231
231
  removeCleanup,
232
232
  runExitCleanup,
233
233
  setupTtyCheck
234
- } from "./chunk-MC7OL7L5.js";
234
+ } from "./chunk-JW5YTR32.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-LKCMWW54.js";
415
+ } from "./chunk-OW353XI3.js";
435
416
  import "./chunk-664ZODQF.js";
436
417
  import "./chunk-TUDYL3X4.js";
437
418
  import "./chunk-IUUIT4SU.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
  }
@@ -15461,11 +15442,11 @@ var PrivacyNoticeText = ({
15461
15442
  }) => {
15462
15443
  const authType = config.getContentGeneratorConfig()?.authType;
15463
15444
  switch (authType) {
15464
- case AuthType.USE_GEMINI:
15445
+ case "gemini-api-key" /* USE_GEMINI */:
15465
15446
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15466
- case AuthType.USE_VERTEX_AI:
15447
+ case "vertex-ai" /* USE_VERTEX_AI */:
15467
15448
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15468
- case AuthType.LOGIN_WITH_GOOGLE:
15449
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15469
15450
  default:
15470
15451
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15471
15452
  }
@@ -15506,7 +15487,7 @@ function ProQuotaDialog({
15506
15487
  value: "retry_always",
15507
15488
  key: "retry_always"
15508
15489
  },
15509
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15490
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15510
15491
  {
15511
15492
  label: "Upgrade for higher limits",
15512
15493
  value: "upgrade",
@@ -16665,7 +16646,7 @@ function ModelDialog({ onClose }) {
16665
16646
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16666
16647
  const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
16667
16648
  const selectedAuthType = settings.merged.security.auth.selectedType;
16668
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16649
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16669
16650
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16670
16651
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16671
16652
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -17988,10 +17969,10 @@ function initializeConsoleStore() {
17988
17969
  globalConsoleMessages = [];
17989
17970
  globalErrorCount = 0;
17990
17971
  notifyListeners();
17991
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
17992
- coreEvents.off(CoreEvent.Output, handleOutput);
17993
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
17994
- coreEvents.on(CoreEvent.Output, handleOutput);
17972
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
17973
+ coreEvents.off("output" /* Output */, handleOutput);
17974
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
17975
+ coreEvents.on("output" /* Output */, handleOutput);
17995
17976
  }
17996
17977
  function notifyListeners() {
17997
17978
  for (const listener of listeners) {
@@ -20128,7 +20109,7 @@ function usePromptCompletion({
20128
20109
  { model: "prompt-completion" },
20129
20110
  contents,
20130
20111
  signal,
20131
- LlmRole.UTILITY_AUTOCOMPLETE
20112
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20132
20113
  );
20133
20114
  if (signal.aborted) {
20134
20115
  return;
@@ -22206,9 +22187,9 @@ var InputPrompt = ({
22206
22187
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22207
22188
  }
22208
22189
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22209
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22210
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22211
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22190
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22191
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22192
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22212
22193
  let statusColor;
22213
22194
  let statusText = "";
22214
22195
  if (shellModeActive) {
@@ -23041,22 +23022,22 @@ var ApprovalModeIndicator = ({
23041
23022
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23042
23023
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23043
23024
  switch (approvalMode) {
23044
- case ApprovalMode.AUTO_EDIT:
23025
+ case "autoEdit" /* AUTO_EDIT */:
23045
23026
  textColor = theme.status.warning;
23046
23027
  textContent = "auto-accept edits";
23047
23028
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23048
23029
  break;
23049
- case ApprovalMode.PLAN:
23030
+ case "plan" /* PLAN */:
23050
23031
  textColor = theme.status.success;
23051
23032
  textContent = "plan";
23052
23033
  subText = `${cycleHint} to manual`;
23053
23034
  break;
23054
- case ApprovalMode.YOLO:
23035
+ case "yolo" /* YOLO */:
23055
23036
  textColor = theme.status.error;
23056
23037
  textContent = "YOLO";
23057
23038
  subText = yoloHint;
23058
23039
  break;
23059
- case ApprovalMode.DEFAULT:
23040
+ case "default" /* DEFAULT */:
23060
23041
  default:
23061
23042
  textColor = theme.text.accent;
23062
23043
  textContent = "";
@@ -23104,7 +23085,7 @@ var useComposerStatus = () => {
23104
23085
  (item) => item.type === "tool_group"
23105
23086
  ).some(
23106
23087
  (item) => item.tools.some(
23107
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23088
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23108
23089
  )
23109
23090
  ),
23110
23091
  [uiState.pendingHistoryItems]
@@ -23119,13 +23100,13 @@ var useComposerStatus = () => {
23119
23100
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23120
23101
  if (hideMinimalModeHintWhileBusy) return null;
23121
23102
  switch (showApprovalModeIndicator) {
23122
- case ApprovalMode.YOLO:
23103
+ case "yolo" /* YOLO */:
23123
23104
  return { text: "YOLO", color: theme.status.error };
23124
- case ApprovalMode.PLAN:
23105
+ case "plan" /* PLAN */:
23125
23106
  return { text: "plan", color: theme.status.success };
23126
- case ApprovalMode.AUTO_EDIT:
23107
+ case "autoEdit" /* AUTO_EDIT */:
23127
23108
  return { text: "auto edit", color: theme.status.warning };
23128
- case ApprovalMode.DEFAULT:
23109
+ case "default" /* DEFAULT */:
23129
23110
  default:
23130
23111
  return null;
23131
23112
  }
@@ -23479,7 +23460,7 @@ var ConfigInitDisplay = ({
23479
23460
  let connected = 0;
23480
23461
  const connecting = [];
23481
23462
  for (const [name, client] of clients.entries()) {
23482
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23463
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23483
23464
  connected++;
23484
23465
  } else {
23485
23466
  connecting.push(name);
@@ -23501,9 +23482,9 @@ var ConfigInitDisplay = ({
23501
23482
  );
23502
23483
  }
23503
23484
  };
23504
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23485
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23505
23486
  return () => {
23506
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23487
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23507
23488
  };
23508
23489
  }, [initialMessage]);
23509
23490
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24220,7 +24201,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24220
24201
  callId,
24221
24202
  name: SHELL_COMMAND_NAME,
24222
24203
  description: rawQuery,
24223
- status: CoreToolCallStatus.Executing,
24204
+ status: "executing" /* Executing */,
24224
24205
  isClientInitiated: true,
24225
24206
  resultDisplay: "",
24226
24207
  confirmationDetails: void 0
@@ -24361,7 +24342,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24361
24342
  mainContent = result.output.trim() || "(Command produced no output)";
24362
24343
  }
24363
24344
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24364
- let finalStatus = CoreToolCallStatus.Success;
24345
+ let finalStatus = "success" /* Success */;
24365
24346
  const prependToAnsiOutput = (output, text) => {
24366
24347
  const newLines = text.split("\n").map((line) => [
24367
24348
  {
@@ -24380,20 +24361,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24380
24361
  };
24381
24362
  let prefix = "";
24382
24363
  if (result.error) {
24383
- finalStatus = CoreToolCallStatus.Error;
24364
+ finalStatus = "error" /* Error */;
24384
24365
  prefix = result.error.message;
24385
24366
  } else if (result.aborted) {
24386
- finalStatus = CoreToolCallStatus.Cancelled;
24367
+ finalStatus = "cancelled" /* Cancelled */;
24387
24368
  prefix = "Command was cancelled.";
24388
24369
  } else if (result.backgrounded) {
24389
- finalStatus = CoreToolCallStatus.Success;
24370
+ finalStatus = "success" /* Success */;
24390
24371
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24391
24372
  mainContent = finalOutput;
24392
24373
  } else if (result.signal) {
24393
- finalStatus = CoreToolCallStatus.Error;
24374
+ finalStatus = "error" /* Error */;
24394
24375
  prefix = `Command terminated by signal: ${result.signal}.`;
24395
24376
  } else if (result.exitCode !== 0) {
24396
- finalStatus = CoreToolCallStatus.Error;
24377
+ finalStatus = "error" /* Error */;
24397
24378
  prefix = `Command exited with code ${result.exitCode}.`;
24398
24379
  }
24399
24380
  if (prefix) {
@@ -24419,7 +24400,7 @@ ${mainContent}`;
24419
24400
  status: finalStatus,
24420
24401
  resultDisplay: finalOutput
24421
24402
  };
24422
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24403
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24423
24404
  addItemToHistory(
24424
24405
  {
24425
24406
  type: "tool_group",
@@ -25409,12 +25390,12 @@ function useQuotaAndFallback({
25409
25390
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25410
25391
  `/stats model for usage details`,
25411
25392
  `/model to switch models.`,
25412
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25393
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25413
25394
  ].filter(Boolean);
25414
25395
  message = messageLines.join("\n");
25415
25396
  } else if (error instanceof ModelNotFoundError) {
25416
25397
  isModelNotFoundError = true;
25417
- if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
25398
+ if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
25418
25399
  const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
25419
25400
  const messageLines = [
25420
25401
  `Model "${failedModel}" is not available in region "${location}".`,
@@ -25606,7 +25587,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25606
25587
  );
25607
25588
  setEditorError(null);
25608
25589
  setIsEditorDialogOpen(false);
25609
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25590
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25610
25591
  } catch (error) {
25611
25592
  setEditorError(`Failed to set editor preference: ${error}`);
25612
25593
  }
@@ -25615,7 +25596,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25615
25596
  );
25616
25597
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25617
25598
  setIsEditorDialogOpen(false);
25618
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25599
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25619
25600
  }, []);
25620
25601
  return {
25621
25602
  isEditorDialogOpen,
@@ -25992,7 +25973,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25992
25973
  canonicalPath: resolvedCommandPath
25993
25974
  } = parseSlashCommand(trimmed, commands);
25994
25975
  if (!commandToExecute) {
25995
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25976
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25996
25977
  if (isMcpLoading) {
25997
25978
  setIsProcessing(true);
25998
25979
  if (addToHistory) {
@@ -26172,7 +26153,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26172
26153
  onConfirm: async (resolvedOutcome) => {
26173
26154
  resolve3({
26174
26155
  outcome: resolvedOutcome,
26175
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26156
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26176
26157
  });
26177
26158
  }
26178
26159
  };
@@ -26180,7 +26161,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26180
26161
  callId,
26181
26162
  name: "Expansion",
26182
26163
  description: "Command expansion needs shell access",
26183
- status: CoreToolCallStatus.AwaitingApproval,
26164
+ status: "awaiting_approval" /* AwaitingApproval */,
26184
26165
  isClientInitiated: true,
26185
26166
  resultDisplay: void 0,
26186
26167
  confirmationDetails
@@ -26191,7 +26172,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26191
26172
  });
26192
26173
  });
26193
26174
  setPendingItem(null);
26194
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26175
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26195
26176
  addItem(
26196
26177
  {
26197
26178
  type: "info" /* INFO */,
@@ -26201,7 +26182,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26201
26182
  );
26202
26183
  return { type: "handled" };
26203
26184
  }
26204
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26185
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26205
26186
  setSessionShellAllowlist(
26206
26187
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26207
26188
  );
@@ -26677,7 +26658,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26677
26658
  let description;
26678
26659
  let renderOutputAsMarkdown = false;
26679
26660
  const displayName = call.tool?.displayName ?? call.request.name;
26680
- if (call.status === CoreToolCallStatus.Error) {
26661
+ if (call.status === "error" /* Error */) {
26681
26662
  description = JSON.stringify(call.request.args);
26682
26663
  } else {
26683
26664
  description = call.invocation.getDescription();
@@ -26700,27 +26681,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26700
26681
  let progress = void 0;
26701
26682
  let progressTotal = void 0;
26702
26683
  switch (call.status) {
26703
- case CoreToolCallStatus.Success:
26684
+ case "success" /* Success */:
26704
26685
  resultDisplay = call.response.resultDisplay;
26705
26686
  outputFile = call.response.outputFile;
26706
26687
  break;
26707
- case CoreToolCallStatus.Error:
26708
- case CoreToolCallStatus.Cancelled:
26688
+ case "error" /* Error */:
26689
+ case "cancelled" /* Cancelled */:
26709
26690
  resultDisplay = call.response.resultDisplay;
26710
26691
  break;
26711
- case CoreToolCallStatus.AwaitingApproval:
26692
+ case "awaiting_approval" /* AwaitingApproval */:
26712
26693
  correlationId = call.correlationId;
26713
26694
  confirmationDetails = call.confirmationDetails;
26714
26695
  break;
26715
- case CoreToolCallStatus.Executing:
26696
+ case "executing" /* Executing */:
26716
26697
  resultDisplay = call.liveOutput;
26717
26698
  ptyId = call.pid;
26718
26699
  progressMessage = call.progressMessage;
26719
26700
  progress = call.progress;
26720
26701
  progressTotal = call.progressTotal;
26721
26702
  break;
26722
- case CoreToolCallStatus.Scheduled:
26723
- case CoreToolCallStatus.Validating:
26703
+ case "scheduled" /* Scheduled */:
26704
+ case "validating" /* Validating */:
26724
26705
  break;
26725
26706
  default: {
26726
26707
  const exhaustiveCheck = call;
@@ -26791,7 +26772,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26791
26772
  const handler = (event) => {
26792
26773
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26793
26774
  const hasExecuting = event.toolCalls.some(
26794
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26775
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26795
26776
  );
26796
26777
  if (hasExecuting) {
26797
26778
  setLastToolOutputTime(Date.now());
@@ -26800,7 +26781,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26800
26781
  const prevCalls = prev[event.schedulerId] ?? [];
26801
26782
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26802
26783
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26803
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26784
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26804
26785
  );
26805
26786
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26806
26787
  return prev;
@@ -26812,9 +26793,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26812
26793
  };
26813
26794
  });
26814
26795
  };
26815
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26796
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26816
26797
  return () => {
26817
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26798
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26818
26799
  };
26819
26800
  }, [messageBus, internalAdaptToolCalls]);
26820
26801
  (0, import_react98.useEffect)(() => {
@@ -26836,9 +26817,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26836
26817
  };
26837
26818
  });
26838
26819
  };
26839
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26820
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26840
26821
  return () => {
26841
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26822
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26842
26823
  };
26843
26824
  }, [messageBus]);
26844
26825
  const schedule = (0, import_react98.useCallback)(
@@ -26937,8 +26918,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26937
26918
  const prev = prevMap.get(coreCall.request.callId);
26938
26919
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26939
26920
  let status = coreCall.status;
26940
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26941
- status = CoreToolCallStatus.Executing;
26921
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26922
+ status = "executing" /* Executing */;
26942
26923
  }
26943
26924
  return {
26944
26925
  ...coreCall,
@@ -26970,7 +26951,7 @@ function getBackgroundedToolInfo(toolCall) {
26970
26951
  };
26971
26952
  }
26972
26953
  function isBackgroundableExecutingToolCall(toolCall) {
26973
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26954
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26974
26955
  }
26975
26956
  function showCitations(settings) {
26976
26957
  const enabled = settings.merged.ui.showCitations;
@@ -26980,14 +26961,14 @@ function showCitations(settings) {
26980
26961
  return true;
26981
26962
  }
26982
26963
  function calculateStreamingState(isResponding, toolCalls) {
26983
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26964
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26984
26965
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26985
26966
  }
26986
26967
  const isAnyToolActive = toolCalls.some((tc) => {
26987
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26968
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26988
26969
  return true;
26989
26970
  }
26990
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26971
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26991
26972
  return !tc.responseSubmittedToGemini;
26992
26973
  }
26993
26974
  return false;
@@ -27033,9 +27014,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27033
27014
  }
27034
27015
  setRetryStatus(payload);
27035
27016
  };
27036
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
27017
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27037
27018
  return () => {
27038
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
27019
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27039
27020
  };
27040
27021
  }, [isRespondingRef]);
27041
27022
  const [
@@ -27168,12 +27149,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27168
27149
  const tc = toolCalls[i];
27169
27150
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27170
27151
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27171
- const isAgent = tc.tool?.kind === Kind.Agent;
27152
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
27172
27153
  if (isAgent) {
27173
27154
  let contigAgentsComplete = true;
27174
27155
  for (let j = i + 1; j < toolCalls.length; j++) {
27175
27156
  const nextTc = toolCalls[j];
27176
- if (nextTc.tool?.kind === Kind.Agent) {
27157
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
27177
27158
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27178
27159
  contigAgentsComplete = false;
27179
27160
  break;
@@ -27199,7 +27180,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27199
27180
  let currentGroup = [];
27200
27181
  for (const tc of toolsToPush) {
27201
27182
  newPushed.add(tc.request.callId);
27202
- if (tc.tool?.kind === Kind.Agent) {
27183
+ if (tc.tool?.kind === "agent" /* Agent */) {
27203
27184
  currentGroup.push(tc);
27204
27185
  } else {
27205
27186
  if (currentGroup.length > 0) {
@@ -27349,7 +27330,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27349
27330
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27350
27331
  }, [activeShellPtyId, addItem, setIsResponding]);
27351
27332
  (0, import_react99.useEffect)(() => {
27352
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27333
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27353
27334
  const lastUserMessageIndex = history.findLastIndex(
27354
27335
  (item) => item.type === "user" /* USER */
27355
27336
  );
@@ -27417,7 +27398,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27417
27398
  return;
27418
27399
  }
27419
27400
  const hasActiveTools = toolCalls.some(
27420
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27401
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27421
27402
  );
27422
27403
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27423
27404
  if (clearBuffer) {
@@ -27444,7 +27425,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27444
27425
  if (tool.name === SHELL_COMMAND_NAME) {
27445
27426
  return {
27446
27427
  ...tool,
27447
- status: CoreToolCallStatus.Cancelled,
27428
+ status: "cancelled" /* Cancelled */,
27448
27429
  resultDisplay: tool.resultDisplay
27449
27430
  };
27450
27431
  }
@@ -27509,7 +27490,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27509
27490
  let localQueryToSendToGemini = null;
27510
27491
  if (typeof query === "string") {
27511
27492
  const trimmedQuery = query.trim();
27512
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27493
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
27513
27494
  if (!shellModeActive) {
27514
27495
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27515
27496
  if (slashCommandResult) {
@@ -27665,7 +27646,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27665
27646
  if (pendingHistoryItemRef.current) {
27666
27647
  if (pendingHistoryItemRef.current.type === "tool_group") {
27667
27648
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27668
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27649
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27669
27650
  );
27670
27651
  const pendingItem = {
27671
27652
  ...pendingHistoryItemRef.current,
@@ -27911,15 +27892,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27911
27892
  let geminiMessageBuffer = "";
27912
27893
  const toolCallRequests = [];
27913
27894
  for await (const event of stream) {
27914
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27895
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27915
27896
  setThought(null);
27916
27897
  }
27917
27898
  switch (event.type) {
27918
- case GeminiEventType.Thought:
27899
+ case "thought" /* Thought */:
27919
27900
  setLastGeminiActivityTime(Date.now());
27920
27901
  handleThoughtEvent(event.value, userMessageTimestamp);
27921
27902
  break;
27922
- case GeminiEventType.Content:
27903
+ case "content" /* Content */:
27923
27904
  setLastGeminiActivityTime(Date.now());
27924
27905
  geminiMessageBuffer = handleContentEvent(
27925
27906
  event.value,
@@ -27927,16 +27908,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27927
27908
  userMessageTimestamp
27928
27909
  );
27929
27910
  break;
27930
- case GeminiEventType.ToolCallRequest:
27911
+ case "tool_call_request" /* ToolCallRequest */:
27931
27912
  toolCallRequests.push(event.value);
27932
27913
  break;
27933
- case GeminiEventType.UserCancelled:
27914
+ case "user_cancelled" /* UserCancelled */:
27934
27915
  handleUserCancelledEvent(userMessageTimestamp);
27935
27916
  break;
27936
- case GeminiEventType.Error:
27917
+ case "error" /* Error */:
27937
27918
  handleErrorEvent(event.value, userMessageTimestamp);
27938
27919
  break;
27939
- case GeminiEventType.AgentExecutionStopped:
27920
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
27940
27921
  handleAgentExecutionStoppedEvent(
27941
27922
  event.value.reason,
27942
27923
  userMessageTimestamp,
@@ -27944,7 +27925,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27944
27925
  event.value.contextCleared
27945
27926
  );
27946
27927
  break;
27947
- case GeminiEventType.AgentExecutionBlocked:
27928
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
27948
27929
  handleAgentExecutionBlockedEvent(
27949
27930
  event.value.reason,
27950
27931
  userMessageTimestamp,
@@ -27952,35 +27933,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27952
27933
  event.value.contextCleared
27953
27934
  );
27954
27935
  break;
27955
- case GeminiEventType.ChatCompressed:
27936
+ case "chat_compressed" /* ChatCompressed */:
27956
27937
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27957
27938
  break;
27958
- case GeminiEventType.ToolCallConfirmation:
27959
- case GeminiEventType.ToolCallResponse:
27939
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
27940
+ case "tool_call_response" /* ToolCallResponse */:
27960
27941
  break;
27961
- case GeminiEventType.MaxSessionTurns:
27942
+ case "max_session_turns" /* MaxSessionTurns */:
27962
27943
  handleMaxSessionTurnsEvent();
27963
27944
  break;
27964
- case GeminiEventType.ContextWindowWillOverflow:
27945
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27965
27946
  handleContextWindowWillOverflowEvent(
27966
27947
  event.value.estimatedRequestTokenCount,
27967
27948
  event.value.remainingTokenCount
27968
27949
  );
27969
27950
  break;
27970
- case GeminiEventType.Finished:
27951
+ case "finished" /* Finished */:
27971
27952
  handleFinishedEvent(event, userMessageTimestamp);
27972
27953
  break;
27973
- case GeminiEventType.Citation:
27954
+ case "citation" /* Citation */:
27974
27955
  handleCitationEvent(event.value, userMessageTimestamp);
27975
27956
  break;
27976
- case GeminiEventType.ModelInfo:
27957
+ case "model_info" /* ModelInfo */:
27977
27958
  handleChatModelEvent(event.value, userMessageTimestamp);
27978
27959
  break;
27979
- case GeminiEventType.LoopDetected:
27960
+ case "loop_detected" /* LoopDetected */:
27980
27961
  loopDetectedRef.current = true;
27981
27962
  break;
27982
- case GeminiEventType.Retry:
27983
- case GeminiEventType.InvalidStream:
27963
+ case "retry" /* Retry */:
27964
+ case "invalid_stream" /* InvalidStream */:
27984
27965
  break;
27985
27966
  default: {
27986
27967
  const unreachable = event;
@@ -28021,7 +28002,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28021
28002
  const submitQuery = (0, import_react99.useCallback)(
28022
28003
  async (query, options, prompt_id) => runInDevTraceSpan(
28023
28004
  {
28024
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
28005
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
28025
28006
  sessionId: config.getSessionId()
28026
28007
  },
28027
28008
  async ({ metadata: spanMetadata }) => {
@@ -28181,7 +28162,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28181
28162
  );
28182
28163
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28183
28164
  async (newApprovalMode) => {
28184
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28165
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28185
28166
  if (geminiClient) {
28186
28167
  try {
28187
28168
  await geminiClient.addHistory({
@@ -28204,11 +28185,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28204
28185
  }
28205
28186
  }
28206
28187
  previousApprovalModeRef.current = newApprovalMode;
28207
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28188
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28208
28189
  let awaitingApprovalCalls = toolCalls.filter(
28209
28190
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28210
28191
  );
28211
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28192
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28212
28193
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28213
28194
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28214
28195
  return true;
@@ -28224,11 +28205,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28224
28205
  if (call.correlationId) {
28225
28206
  try {
28226
28207
  await config.getMessageBus().publish({
28227
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28208
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28228
28209
  correlationId: call.correlationId,
28229
28210
  confirmed: true,
28230
28211
  requiresUserConfirmation: false,
28231
- outcome: ToolConfirmationOutcome.ProceedOnce
28212
+ outcome: "proceed_once" /* ProceedOnce */
28232
28213
  });
28233
28214
  } catch (error) {
28234
28215
  debugLogger.warn(
@@ -28297,14 +28278,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28297
28278
  );
28298
28279
  if (isLowErrorVerbosity) {
28299
28280
  suppressedToolErrorCountRef.current += geminiTools.filter(
28300
- (tc) => tc.status === CoreToolCallStatus.Error
28281
+ (tc) => tc.status === "error" /* Error */
28301
28282
  ).length;
28302
28283
  }
28303
28284
  if (geminiTools.length === 0) {
28304
28285
  return;
28305
28286
  }
28306
28287
  const stopExecutionTool = geminiTools.find(
28307
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28288
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28308
28289
  );
28309
28290
  if (stopExecutionTool && stopExecutionTool.response.error) {
28310
28291
  maybeAddSuppressedToolErrorNote();
@@ -28324,9 +28305,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28324
28305
  (tc) => !isTopicTool2(tc.request.name)
28325
28306
  );
28326
28307
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28327
- (tc) => tc.status === CoreToolCallStatus.Cancelled
28308
+ (tc) => tc.status === "cancelled" /* Cancelled */
28328
28309
  );
28329
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28310
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28330
28311
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28331
28312
  if (!turnCancelledRef.current) {
28332
28313
  addItem({
@@ -28406,7 +28387,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28406
28387
  return;
28407
28388
  }
28408
28389
  const restorableToolCalls = toolCalls.filter(
28409
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28390
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28410
28391
  );
28411
28392
  if (restorableToolCalls.length > 0) {
28412
28393
  if (!gitService) {
@@ -28629,14 +28610,14 @@ var useAgentStream = ({
28629
28610
  const displayName = legacyState?.displayName ?? event.name;
28630
28611
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28631
28612
  const desc = legacyState?.description ?? "";
28632
- const fallbackKind = Kind.Other;
28613
+ const fallbackKind = "other" /* Other */;
28633
28614
  const newCall = {
28634
28615
  callId: event.requestId,
28635
28616
  name: displayName,
28636
28617
  originalRequestName: event.name,
28637
28618
  description: desc,
28638
28619
  display: event.display,
28639
- status: CoreToolCallStatus.Scheduled,
28620
+ status: "scheduled" /* Scheduled */,
28640
28621
  isClientInitiated: false,
28641
28622
  renderOutputAsMarkdown: isOutputMarkdown,
28642
28623
  kind: legacyState?.kind ?? fallbackKind,
@@ -28654,10 +28635,10 @@ var useAgentStream = ({
28654
28635
  const evtStatus = legacyState?.status;
28655
28636
  let status = tc.status;
28656
28637
  if (evtStatus === "executing")
28657
- status = CoreToolCallStatus.Executing;
28658
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28638
+ status = "executing" /* Executing */;
28639
+ else if (evtStatus === "error") status = "error" /* Error */;
28659
28640
  else if (evtStatus === "success")
28660
- status = CoreToolCallStatus.Success;
28641
+ status = "success" /* Success */;
28661
28642
  const display = event.display?.result;
28662
28643
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28663
28644
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28690,7 +28671,7 @@ var useAgentStream = ({
28690
28671
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28691
28672
  return {
28692
28673
  ...tc,
28693
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28674
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28694
28675
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28695
28676
  resultDisplay,
28696
28677
  outputFile
@@ -28756,7 +28737,7 @@ var useAgentStream = ({
28756
28737
  if (!options?.isContinuation) {
28757
28738
  if (typeof query === "string") {
28758
28739
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28759
- void logger?.logMessage(MessageSenderType.USER, query);
28740
+ void logger?.logMessage("user" /* USER */, query);
28760
28741
  }
28761
28742
  startNewPrompt();
28762
28743
  }
@@ -30283,9 +30264,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30283
30264
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30284
30265
  async (choice) => {
30285
30266
  const trustLevelMap = {
30286
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30287
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30288
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30267
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30268
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30269
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30289
30270
  };
30290
30271
  const trustLevel = trustLevelMap[choice];
30291
30272
  if (!trustLevel) return;
@@ -30304,7 +30285,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30304
30285
  }, 100);
30305
30286
  return;
30306
30287
  }
30307
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30288
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30308
30289
  onTrustChange(currentIsTrusted);
30309
30290
  setIsTrusted(currentIsTrusted);
30310
30291
  const wasTrusted = isTrusted ?? false;
@@ -31312,7 +31293,7 @@ function useMessageQueue({
31312
31293
  var import_react107 = __toESM(require_react(), 1);
31313
31294
  function useMcpStatus(config) {
31314
31295
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31315
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31296
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31316
31297
  );
31317
31298
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31318
31299
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31325,12 +31306,12 @@ function useMcpStatus(config) {
31325
31306
  setMcpServerCount(manager.getMcpServerCount());
31326
31307
  }
31327
31308
  };
31328
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31309
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31329
31310
  return () => {
31330
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31311
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31331
31312
  };
31332
31313
  }, [config]);
31333
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31314
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31334
31315
  return {
31335
31316
  discoveryState,
31336
31317
  mcpServerCount,
@@ -31357,7 +31338,7 @@ function useApprovalModeIndicator({
31357
31338
  (key) => {
31358
31339
  let nextApprovalMode;
31359
31340
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31360
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31341
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31361
31342
  if (addItem) {
31362
31343
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31363
31344
  const adminSettings = config.getRemoteAdminSettings();
@@ -31375,21 +31356,21 @@ function useApprovalModeIndicator({
31375
31356
  }
31376
31357
  return;
31377
31358
  }
31378
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31359
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31379
31360
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31380
31361
  const currentMode = config.getApprovalMode();
31381
31362
  switch (currentMode) {
31382
- case ApprovalMode.DEFAULT:
31383
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31363
+ case "default" /* DEFAULT */:
31364
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31384
31365
  break;
31385
- case ApprovalMode.AUTO_EDIT:
31386
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31366
+ case "autoEdit" /* AUTO_EDIT */:
31367
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31387
31368
  break;
31388
- case ApprovalMode.PLAN:
31389
- nextApprovalMode = ApprovalMode.DEFAULT;
31369
+ case "plan" /* PLAN */:
31370
+ nextApprovalMode = "default" /* DEFAULT */;
31390
31371
  break;
31391
- case ApprovalMode.YOLO:
31392
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31372
+ case "yolo" /* YOLO */:
31373
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31393
31374
  break;
31394
31375
  default:
31395
31376
  }
@@ -31799,11 +31780,11 @@ var useHookDisplayState = () => {
31799
31780
  removeHook();
31800
31781
  }
31801
31782
  };
31802
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
31803
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31783
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31784
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31804
31785
  return () => {
31805
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
31806
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31786
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31787
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31807
31788
  activeTimeouts.forEach(clearTimeout);
31808
31789
  activeTimeouts.clear();
31809
31790
  };
@@ -32642,7 +32623,7 @@ var AppContainer = (props) => {
32642
32623
  setConfigInitialized(true);
32643
32624
  startupProfiler.flush(config);
32644
32625
  startAutoMemoryIfEnabled(config);
32645
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32626
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32646
32627
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32647
32628
  if (result) {
32648
32629
  const additionalContext = result.getAdditionalContext();
@@ -32669,7 +32650,7 @@ var AppContainer = (props) => {
32669
32650
  );
32670
32651
  const ideClient = await IdeClient.getInstance();
32671
32652
  await ideClient.disconnect();
32672
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32653
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32673
32654
  };
32674
32655
  registerCleanup(cleanupFn);
32675
32656
  return () => {
@@ -32694,11 +32675,11 @@ var AppContainer = (props) => {
32694
32675
  resetTime: payload.resetTime
32695
32676
  });
32696
32677
  };
32697
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32698
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32678
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32679
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32699
32680
  return () => {
32700
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32701
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32681
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32682
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32702
32683
  };
32703
32684
  }, [config]);
32704
32685
  (0, import_react121.useEffect)(() => {
@@ -32711,16 +32692,16 @@ var AppContainer = (props) => {
32711
32692
  const handleAgentsDiscovered = (payload) => {
32712
32693
  setNewAgents(payload.agents);
32713
32694
  };
32714
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32715
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32716
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32695
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32696
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32697
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32717
32698
  return () => {
32718
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32699
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32719
32700
  coreEvents.off(
32720
- CoreEvent.AdminSettingsChanged,
32701
+ "admin-settings-changed" /* AdminSettingsChanged */,
32721
32702
  handleAdminSettingsChanged
32722
32703
  );
32723
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32704
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32724
32705
  };
32725
32706
  }, [settings]);
32726
32707
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32785,11 +32766,11 @@ var AppContainer = (props) => {
32785
32766
  exitEditorDialog
32786
32767
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32787
32768
  (0, import_react121.useEffect)(() => {
32788
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32789
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32769
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32770
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32790
32771
  return () => {
32791
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32792
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32772
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32773
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32793
32774
  };
32794
32775
  }, [handleEditorClose, openEditorDialog]);
32795
32776
  (0, import_react121.useEffect)(() => {
@@ -32857,7 +32838,7 @@ var AppContainer = (props) => {
32857
32838
  errorVerbosity: settings.merged.ui.errorVerbosity
32858
32839
  });
32859
32840
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32860
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32841
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32861
32842
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32862
32843
  const { loadHistoryForResume, isResuming } = useSessionResume({
32863
32844
  config,
@@ -32885,7 +32866,7 @@ var AppContainer = (props) => {
32885
32866
  async (authType, scope) => {
32886
32867
  if (authType) {
32887
32868
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32888
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32869
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32889
32870
  setAuthContext({ requiresRestart: true });
32890
32871
  } else {
32891
32872
  setAuthContext({});
@@ -32913,7 +32894,7 @@ var AppContainer = (props) => {
32913
32894
  );
32914
32895
  return;
32915
32896
  }
32916
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32897
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32917
32898
  writeToStdout(`
32918
32899
  ----------------------------------------------------------------
32919
32900
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32936,7 +32917,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32936
32917
  }
32937
32918
  await saveApiKey(apiKey);
32938
32919
  await reloadApiKey();
32939
- await config.refreshAuth(AuthType.USE_GEMINI);
32920
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32940
32921
  setAuthState("authenticated" /* Authenticated */);
32941
32922
  } catch (e) {
32942
32923
  onAuthError(
@@ -32961,7 +32942,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32961
32942
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32962
32943
  );
32963
32944
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32964
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32945
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32965
32946
  return;
32966
32947
  }
32967
32948
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33097,9 +33078,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33097
33078
  }
33098
33079
  });
33099
33080
  };
33100
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33081
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33101
33082
  return () => {
33102
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33083
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33103
33084
  };
33104
33085
  }, []);
33105
33086
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33757,7 +33738,7 @@ ${queuedText}` : queuedText;
33757
33738
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33758
33739
  if (settings.merged.general.devtools) {
33759
33740
  void (async () => {
33760
- const { toggleDevToolsPanel } = await import("./devtoolsService-LUX2QI2P.js");
33741
+ const { toggleDevToolsPanel } = await import("./devtoolsService-P33QSD7O.js");
33761
33742
  await toggleDevToolsPanel(
33762
33743
  config,
33763
33744
  showErrorDetails,
@@ -33975,17 +33956,17 @@ ${queuedText}` : queuedText;
33975
33956
  Date.now()
33976
33957
  );
33977
33958
  };
33978
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33979
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33959
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33960
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33980
33961
  coreEvents.drainBacklogs();
33981
33962
  return () => {
33982
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33983
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33963
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33964
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33984
33965
  };
33985
33966
  }, [historyManager]);
33986
33967
  const nightly = props.version.includes("nightly");
33987
33968
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
33988
- 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;
33969
+ 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;
33989
33970
  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;
33990
33971
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
33991
33972
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34085,9 +34066,9 @@ ${queuedText}` : queuedText;
34085
34066
  const handleMemoryChanged = (result) => {
34086
34067
  setGeminiMdFileCount(result.fileCount);
34087
34068
  };
34088
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34069
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34089
34070
  return () => {
34090
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34071
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34091
34072
  };
34092
34073
  }, []);
34093
34074
  (0, import_react121.useEffect)(() => {