@google/gemini-cli 0.45.0-preview.1 → 0.46.0-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/bundle/{chunk-OWSYSTWM.js → chunk-2GMVQS2Q.js} +1 -1
  2. package/bundle/{chunk-5BX5PJIE.js → chunk-4AGOZ7LL.js} +7 -7
  3. package/bundle/{chunk-6WWGBNKT.js → chunk-4K3E3G6Z.js} +1 -1
  4. package/bundle/{chunk-BLUAEAZN.js → chunk-5LUCCXOB.js} +1 -1
  5. package/bundle/{chunk-BO72FGK2.js → chunk-773AJHDP.js} +7 -7
  6. package/bundle/{chunk-3NDAYKF4.js → chunk-BOJOJVNV.js} +1 -1
  7. package/bundle/{chunk-JXVK53RJ.js → chunk-F2LLVPPS.js} +2 -2
  8. package/bundle/{chunk-5YTIYFJO.js → chunk-FIM2LOYZ.js} +133 -44
  9. package/bundle/{chunk-CJHCK2YW.js → chunk-GTRQQGSJ.js} +1 -1
  10. package/bundle/{chunk-R52453KY.js → chunk-HHFFICNK.js} +154 -44
  11. package/bundle/{chunk-Y6SLZFPD.js → chunk-HMR43ZX2.js} +2 -2
  12. package/bundle/{chunk-4KX3ETW3.js → chunk-HZNEV3DS.js} +1 -1
  13. package/bundle/{chunk-IGJG7DNZ.js → chunk-J444UQD3.js} +1 -1
  14. package/bundle/{chunk-2ZH72RHY.js → chunk-LBE2WKE7.js} +3 -3
  15. package/bundle/{chunk-JWWA32XO.js → chunk-MFYAVF7Y.js} +54 -67
  16. package/bundle/{chunk-S6AQSJNU.js → chunk-QFEJQS5X.js} +1 -1
  17. package/bundle/{chunk-WTRP3GGZ.js → chunk-RXG3JOOZ.js} +1 -1
  18. package/bundle/{chunk-CJTRYZPP.js → chunk-S2ICEQVC.js} +3 -3
  19. package/bundle/{chunk-NB2NOE4L.js → chunk-SHFHGDWR.js} +2 -2
  20. package/bundle/{chunk-E3KBY4EQ.js → chunk-TDYUKPZH.js} +1 -1
  21. package/bundle/{chunk-DDJWQSDN.js → chunk-XRDSBRG4.js} +14166 -7548
  22. package/bundle/{chunk-FEY3T6LA.js → chunk-YMNECODB.js} +8 -9
  23. package/bundle/{chunk-HA5VES5S.js → chunk-ZQGZKIDD.js} +3 -3
  24. package/bundle/{chunk-K43EAKOP.js → chunk-ZXN4VW7M.js} +5 -8
  25. package/bundle/{cleanup-2FHZMQ3Z.js → cleanup-2WXD6UQP.js} +2 -2
  26. package/bundle/{cleanup-F7XRM3DT.js → cleanup-L3CLNVX6.js} +2 -2
  27. package/bundle/{cleanup-OZH3SJVM.js → cleanup-SUDL37MT.js} +2 -2
  28. package/bundle/{core-B47ZXN3Y.js → core-MOYKPEYV.js} +5 -1
  29. package/bundle/{dist-C6L3MGQS.js → core-VVRQ2GQD.js} +5 -1
  30. package/bundle/{devtoolsService-XYSZCMQM.js → devtoolsService-E62WA3CY.js} +2 -2
  31. package/bundle/{devtoolsService-OYQJHPEW.js → devtoolsService-GLW7S6PS.js} +3 -4
  32. package/bundle/{devtoolsService-L7PYKOHR.js → devtoolsService-ZYCBBAV3.js} +2 -2
  33. package/bundle/{dist-MOEHPHUN.js → dist-GPCRVPKS.js} +5 -1
  34. package/bundle/docs/changelogs/index.md +14 -0
  35. package/bundle/docs/changelogs/latest.md +202 -199
  36. package/bundle/docs/changelogs/preview.md +44 -200
  37. package/bundle/docs/issue-and-pr-automation.md +29 -1
  38. package/bundle/docs/reference/configuration.md +69 -0
  39. package/bundle/{gemini-LT5MWLZQ.js → gemini-2JTOIMGM.js} +14 -14
  40. package/bundle/{gemini-2XSNIT2N.js → gemini-KV5CHM4H.js} +14 -14
  41. package/bundle/{gemini-CHS2YNJG.js → gemini-R5NCXCEL.js} +196 -212
  42. package/bundle/gemini.js +7 -7
  43. package/bundle/{interactiveCli-UUI7OUZK.js → interactiveCli-7SIMXKNU.js} +20 -10
  44. package/bundle/{interactiveCli-6EFCVZP7.js → interactiveCli-HVAQTBJK.js} +307 -316
  45. package/bundle/{interactiveCli-2YFAMDR5.js → interactiveCli-RMWTSIEN.js} +20 -10
  46. package/bundle/{liteRtServerManager-2VKZTPMY.js → liteRtServerManager-BP7XKGNU.js} +4 -4
  47. package/bundle/{liteRtServerManager-4PZ3X7SS.js → liteRtServerManager-FY23PYSD.js} +4 -4
  48. package/bundle/{liteRtServerManager-GH6VHWTU.js → liteRtServerManager-LDS45QKP.js} +4 -4
  49. package/bundle/{oauth2-provider-4UIWNIX3.js → oauth2-provider-4SSSEI6P.js} +1 -1
  50. package/bundle/{oauth2-provider-N2ZY2DXQ.js → oauth2-provider-KL44D6HV.js} +72 -38
  51. package/bundle/{oauth2-provider-BDX6V2YX.js → oauth2-provider-VVNBQH45.js} +1 -1
  52. package/bundle/{start-3LEQZELI.js → start-DLEOBFRC.js} +6 -6
  53. package/bundle/{start-FH2E2VQ2.js → start-FRM2XDGC.js} +6 -6
  54. package/bundle/{start-FPEO7KCZ.js → start-OEPJINIW.js} +6 -6
  55. package/package.json +1 -1
  56. package/bundle/chunk-565MWDPP.js +0 -394439
  57. package/bundle/chunk-HVWNKZSB.js +0 -154
  58. package/bundle/chunk-HZCAEM2F.js +0 -398
  59. package/bundle/chunk-NVJOR76X.js +0 -1571
  60. package/bundle/chunk-NYWYNF2Z.js +0 -81685
  61. package/bundle/chunk-OQLEYMM2.js +0 -512
  62. package/bundle/chunk-SKDT4PWC.js +0 -118
  63. package/bundle/chunk-TCAVPMJX.js +0 -17320
  64. package/bundle/cleanup-ZO5CVKGH.js +0 -32
  65. package/bundle/devtoolsService-SGV7MSUA.js +0 -856
  66. package/bundle/dist-WLKMTHZQ.js +0 -2134
  67. package/bundle/gemini-CQDPCFEE.js +0 -16406
  68. package/bundle/interactiveCli-HA3BASZN.js +0 -34726
  69. package/bundle/liteRtServerManager-OMSM6SJU.js +0 -65
  70. package/bundle/oauth2-provider-TRRJCE2P.js +0 -235
  71. package/bundle/start-J7G6YXDJ.js +0 -18
@@ -155,13 +155,13 @@ import {
155
155
  widestLineFromStyledChars,
156
156
  wordBreakStyledChars,
157
157
  wrapStyledChars
158
- } from "./chunk-JWWA32XO.js";
158
+ } from "./chunk-MFYAVF7Y.js";
159
159
  import {
160
160
  appEvents
161
161
  } from "./chunk-5PS3AYFU.js";
162
162
  import {
163
163
  require_source
164
- } from "./chunk-NVJOR76X.js";
164
+ } from "./chunk-HZNEV3DS.js";
165
165
  import {
166
166
  ACTIVE_SHELL_MAX_LINES,
167
167
  COMPACT_TOOL_SUBVIEW_MAX_LINES,
@@ -211,37 +211,33 @@ import {
211
211
  stringWidth,
212
212
  stripUnsafeCharacters,
213
213
  toCodePoints
214
- } from "./chunk-TCAVPMJX.js";
214
+ } from "./chunk-ZXN4VW7M.js";
215
215
  import {
216
216
  handleAutoUpdate,
217
217
  isDevelopment,
218
218
  relaunchApp,
219
219
  setUpdateHandler
220
- } from "./chunk-JXVK53RJ.js";
220
+ } from "./chunk-F2LLVPPS.js";
221
221
  import {
222
222
  isTodoList,
223
223
  mapCoreStatusToDisplayStatus,
224
224
  require_react
225
- } from "./chunk-CJHCK2YW.js";
225
+ } from "./chunk-YMNECODB.js";
226
226
  import {
227
227
  registerCleanup,
228
228
  removeCleanup,
229
229
  runExitCleanup,
230
230
  setupTtyCheck
231
- } from "./chunk-S6AQSJNU.js";
231
+ } from "./chunk-QFEJQS5X.js";
232
232
  import {
233
233
  ACTIVATE_SKILL_TOOL_NAME,
234
234
  AGENT_TOOL_NAME,
235
235
  ApiKeyUpdatedEvent,
236
- ApprovalMode,
237
236
  AsyncFzf,
238
237
  AudioRecorder,
239
238
  AuthType,
240
239
  ChangeAuthRequestedError,
241
- CompressionStatus,
242
240
  ConversationFinishedEvent,
243
- CoreEvent,
244
- CoreToolCallStatus,
245
241
  CreditPurchaseClickEvent,
246
242
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
247
243
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -263,19 +259,12 @@ import {
263
259
  GEMMA_4_31B_IT_MODEL,
264
260
  GLOB_DISPLAY_NAME,
265
261
  GREP_DISPLAY_NAME,
266
- GeminiCliOperation,
267
- GeminiEventType,
268
262
  GitService,
269
263
  IdeClient,
270
- Kind,
271
264
  LS_DISPLAY_NAME,
272
265
  LegacyAgentProtocol,
273
266
  LlmRole,
274
267
  Logger,
275
- MCPDiscoveryState,
276
- MCPServerStatus,
277
- MessageBusType,
278
- MessageSenderType,
279
268
  ModelNotFoundError,
280
269
  ModelSlashCommandEvent,
281
270
  OverageMenuShownEvent,
@@ -287,27 +276,20 @@ import {
287
276
  PREVIEW_GEMINI_MODEL,
288
277
  PolicyIntegrityManager,
289
278
  ProjectIdRequiredError,
290
- QuestionType,
291
279
  READ_FILE_DISPLAY_NAME,
292
280
  READ_MANY_FILES_DISPLAY_NAME,
293
281
  RELEASE_CHANNEL_STABILITY,
294
282
  ROOT_SCHEDULER_ID,
295
283
  SHELL_TOOL_NAME,
296
284
  Scheduler,
297
- SessionEndReason,
298
- SessionStartSource,
299
285
  ShellExecutionService,
300
286
  SlashCommandStatus,
301
287
  Storage,
302
- SubagentState,
303
288
  TOPIC_PARAM_STRATEGIC_INTENT,
304
289
  TOPIC_PARAM_SUMMARY,
305
290
  TOPIC_PARAM_TITLE,
306
291
  TerminalQuotaError,
307
- ToolConfirmationOutcome,
308
- ToolErrorType,
309
292
  TranscriptionFactory,
310
- TrustLevel,
311
293
  UPDATE_TOPIC_DISPLAY_NAME,
312
294
  UPDATE_TOPIC_TOOL_NAME,
313
295
  UnauthorizedError,
@@ -319,7 +301,6 @@ import {
319
301
  WEB_FETCH_DISPLAY_NAME,
320
302
  WEB_SEARCH_DISPLAY_NAME,
321
303
  WRITE_FILE_DISPLAY_NAME,
322
- WarningPriority,
323
304
  WhisperModelManager,
324
305
  addMCPStatusChangeListener,
325
306
  allowEditorTypeInSandbox,
@@ -429,7 +410,7 @@ import {
429
410
  validatePlanContent,
430
411
  validatePlanPath,
431
412
  writeToStdout
432
- } from "./chunk-5YTIYFJO.js";
413
+ } from "./chunk-XRDSBRG4.js";
433
414
  import "./chunk-6HI7VNOG.js";
434
415
  import "./chunk-TUDYL3X4.js";
435
416
  import "./chunk-IUUIT4SU.js";
@@ -5055,7 +5036,7 @@ function calculateShellMaxLines(options) {
5055
5036
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5056
5037
  return maxLinesBasedOnHeight;
5057
5038
  }
5058
- const isExecuting = status === CoreToolCallStatus.Executing;
5039
+ const isExecuting = status === "executing" /* Executing */;
5059
5040
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5060
5041
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5061
5042
  }
@@ -5089,10 +5070,10 @@ function isShellTool(name) {
5089
5070
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
5090
5071
  }
5091
5072
  function isThisShellFocusable(name, status, config) {
5092
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5073
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5093
5074
  }
5094
5075
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5095
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5076
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5096
5077
  }
5097
5078
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5098
5079
  const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
@@ -5252,13 +5233,13 @@ var formatToolArgs = (args) => {
5252
5233
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5253
5234
  let headerText;
5254
5235
  let headerColor = theme.text.secondary;
5255
- if (progress.state === SubagentState.CANCELLED) {
5236
+ if (progress.state === "cancelled" /* CANCELLED */) {
5256
5237
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5257
5238
  headerColor = theme.status.warning;
5258
- } else if (progress.state === SubagentState.ERROR) {
5239
+ } else if (progress.state === "error" /* ERROR */) {
5259
5240
  headerText = `Subagent ${progress.agentName} failed.`;
5260
5241
  headerColor = theme.status.error;
5261
- } else if (progress.state === SubagentState.COMPLETED) {
5242
+ } else if (progress.state === "completed" /* COMPLETED */) {
5262
5243
  headerText = `Subagent ${progress.agentName} completed.`;
5263
5244
  headerColor = theme.status.success;
5264
5245
  } else {
@@ -5278,7 +5259,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5278
5259
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
5279
5260
  ] }, item.id);
5280
5261
  } else if (item.type === "tool_call") {
5281
- 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 });
5262
+ 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 });
5282
5263
  const formattedArgs = item.description || formatToolArgs(item.args);
5283
5264
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5284
5265
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5289,7 +5270,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5289
5270
  {
5290
5271
  bold: true,
5291
5272
  color: theme.text.primary,
5292
- strikethrough: item.status === SubagentState.CANCELLED,
5273
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5293
5274
  children: item.displayName || item.content
5294
5275
  }
5295
5276
  ),
@@ -5298,7 +5279,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5298
5279
  {
5299
5280
  color: theme.text.secondary,
5300
5281
  wrap: "truncate",
5301
- strikethrough: item.status === SubagentState.CANCELLED,
5282
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5302
5283
  children: displayArgs
5303
5284
  }
5304
5285
  ) })
@@ -5318,7 +5299,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5318
5299
  MarkdownDisplay,
5319
5300
  {
5320
5301
  text: safeJsonToMarkdown(progress.result),
5321
- isPending: progress.state !== SubagentState.COMPLETED,
5302
+ isPending: progress.state !== "completed" /* COMPLETED */,
5322
5303
  terminalWidth
5323
5304
  }
5324
5305
  )
@@ -5672,14 +5653,14 @@ var ToolActionsProvider = (props) => {
5672
5653
  }
5673
5654
  const details = tool.confirmationDetails;
5674
5655
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5675
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5656
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5676
5657
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5677
5658
  }
5678
5659
  if (tool.correlationId) {
5679
5660
  await config.getMessageBus().publish({
5680
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5661
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5681
5662
  correlationId: tool.correlationId,
5682
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5663
+ confirmed: outcome !== "cancel" /* Cancel */,
5683
5664
  requiresUserConfirmation: false,
5684
5665
  outcome,
5685
5666
  payload
@@ -5698,7 +5679,7 @@ var ToolActionsProvider = (props) => {
5698
5679
  );
5699
5680
  const cancel = (0, import_react12.useCallback)(
5700
5681
  async (callId) => {
5701
- await confirm(callId, ToolConfirmationOutcome.Cancel);
5682
+ await confirm(callId, "cancel" /* Cancel */);
5702
5683
  },
5703
5684
  [confirm]
5704
5685
  );
@@ -5817,7 +5798,7 @@ var ToolMessage = ({
5817
5798
  paddingX: 1,
5818
5799
  flexDirection: "column",
5819
5800
  children: [
5820
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5801
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5821
5802
  McpProgressIndicator,
5822
5803
  {
5823
5804
  progress,
@@ -5834,8 +5815,8 @@ var ToolMessage = ({
5834
5815
  terminalWidth,
5835
5816
  renderOutputAsMarkdown,
5836
5817
  hasFocus: isThisShellFocused2,
5837
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5838
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5818
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5819
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5839
5820
  }
5840
5821
  ),
5841
5822
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -6151,7 +6132,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6151
6132
  settings.merged,
6152
6133
  process3.cwd()
6153
6134
  );
6154
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6135
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6155
6136
  return {
6156
6137
  currentTrustLevel: explicitTrustLevel,
6157
6138
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6196,7 +6177,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6196
6177
  process3.cwd(),
6197
6178
  newConfig
6198
6179
  );
6199
- if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6180
+ if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6200
6181
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6201
6182
  if (source === "file") {
6202
6183
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6270,18 +6251,18 @@ function PermissionsModifyTrustDialog({
6270
6251
  const TRUST_LEVEL_ITEMS = [
6271
6252
  {
6272
6253
  label: `Trust this folder (${dirName})`,
6273
- value: TrustLevel.TRUST_FOLDER,
6274
- key: TrustLevel.TRUST_FOLDER
6254
+ value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6255
+ key: "TRUST_FOLDER" /* TRUST_FOLDER */
6275
6256
  },
6276
6257
  {
6277
6258
  label: `Trust parent folder (${parentFolder})`,
6278
- value: TrustLevel.TRUST_PARENT,
6279
- key: TrustLevel.TRUST_PARENT
6259
+ value: "TRUST_PARENT" /* TRUST_PARENT */,
6260
+ key: "TRUST_PARENT" /* TRUST_PARENT */
6280
6261
  },
6281
6262
  {
6282
6263
  label: "Don't trust",
6283
- value: TrustLevel.DO_NOT_TRUST,
6284
- key: TrustLevel.DO_NOT_TRUST
6264
+ value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6265
+ key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6285
6266
  }
6286
6267
  ];
6287
6268
  const {
@@ -6521,7 +6502,7 @@ var ShellToolMessage = ({
6521
6502
  maxLinesLimit: maxLines
6522
6503
  });
6523
6504
  import_react17.default.useEffect(() => {
6524
- const isExecuting = status === CoreToolCallStatus.Executing;
6505
+ const isExecuting = status === "executing" /* Executing */;
6525
6506
  if (isExecuting && ptyId) {
6526
6507
  try {
6527
6508
  const childWidth = terminalWidth - 4;
@@ -6734,13 +6715,13 @@ var SubagentGroupDisplay = ({
6734
6715
  const singleAgent = toolCalls[0].resultDisplay;
6735
6716
  if (isSubagentProgress(singleAgent)) {
6736
6717
  switch (singleAgent.state) {
6737
- case SubagentState.COMPLETED:
6718
+ case "completed" /* COMPLETED */:
6738
6719
  headerText = "Agent Completed";
6739
6720
  break;
6740
- case SubagentState.CANCELLED:
6721
+ case "cancelled" /* CANCELLED */:
6741
6722
  headerText = "Agent Cancelled";
6742
6723
  break;
6743
- case SubagentState.ERROR:
6724
+ case "error" /* ERROR */:
6744
6725
  headerText = "Agent Error";
6745
6726
  break;
6746
6727
  default:
@@ -6756,8 +6737,8 @@ var SubagentGroupDisplay = ({
6756
6737
  for (const tc of toolCalls) {
6757
6738
  const progress = tc.resultDisplay;
6758
6739
  if (isSubagentProgress(progress)) {
6759
- if (progress.state === SubagentState.COMPLETED) completedCount++;
6760
- else if (progress.state === SubagentState.RUNNING) runningCount++;
6740
+ if (progress.state === "completed" /* COMPLETED */) completedCount++;
6741
+ else if (progress.state === "running" /* RUNNING */) runningCount++;
6761
6742
  } else {
6762
6743
  runningCount++;
6763
6744
  }
@@ -6836,7 +6817,7 @@ var SubagentGroupDisplay = ({
6836
6817
  if (!isExpanded) {
6837
6818
  let content = "Starting...";
6838
6819
  let formattedArgs;
6839
- if (progress.state === SubagentState.COMPLETED) {
6820
+ if (progress.state === "completed" /* COMPLETED */) {
6840
6821
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6841
6822
  content = `Finished Early (${progress.terminateReason})`;
6842
6823
  } else {
@@ -6850,17 +6831,17 @@ var SubagentGroupDisplay = ({
6850
6831
  formattedArgs = formatToolArgs(lastActivity.args);
6851
6832
  }
6852
6833
  }
6853
- const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6834
+ const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6854
6835
  const renderStatusIcon = () => {
6855
- const state = progress.state ?? SubagentState.RUNNING;
6836
+ const state = progress.state ?? "running" /* RUNNING */;
6856
6837
  switch (state) {
6857
- case SubagentState.RUNNING:
6838
+ case "running" /* RUNNING */:
6858
6839
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
6859
- case SubagentState.COMPLETED:
6840
+ case "completed" /* COMPLETED */:
6860
6841
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6861
- case SubagentState.CANCELLED:
6842
+ case "cancelled" /* CANCELLED */:
6862
6843
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6863
- case SubagentState.ERROR:
6844
+ case "error" /* ERROR */:
6864
6845
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6865
6846
  default:
6866
6847
  return checkExhaustive(state);
@@ -6913,22 +6894,22 @@ var hasPayload = (res) => {
6913
6894
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6914
6895
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6915
6896
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6916
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6897
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6917
6898
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6918
6899
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6919
6900
  const showDiffStat = !!diff.diffStat;
6920
6901
  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 }) });
6921
6902
  let resultSummary = "";
6922
6903
  let resultColor = theme.text.secondary;
6923
- if (status === CoreToolCallStatus.AwaitingApproval) {
6904
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
6924
6905
  resultSummary = "Confirming";
6925
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6906
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6926
6907
  resultSummary = "Accepted";
6927
6908
  resultColor = theme.text.accent;
6928
- } else if (status === CoreToolCallStatus.Cancelled) {
6909
+ } else if (status === "cancelled" /* Cancelled */) {
6929
6910
  resultSummary = "Rejected";
6930
6911
  resultColor = theme.status.error;
6931
- } else if (status === CoreToolCallStatus.Error) {
6912
+ } else if (status === "error" /* Error */) {
6932
6913
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6933
6914
  resultColor = theme.status.error;
6934
6915
  }
@@ -6959,7 +6940,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6959
6940
  filename: diff.fileName,
6960
6941
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
6961
6942
  availableTerminalHeight,
6962
- disableColor: status === CoreToolCallStatus.Cancelled
6943
+ disableColor: status === "cancelled" /* Cancelled */
6963
6944
  }
6964
6945
  );
6965
6946
  return { description, summary, payload };
@@ -7087,10 +7068,10 @@ var DenseToolMessage = (props) => {
7087
7068
  if (isGrepResult(resultDisplay)) {
7088
7069
  return getGenericSuccessData(resultDisplay, originalDescription);
7089
7070
  }
7090
- if (status === CoreToolCallStatus.Success && resultDisplay) {
7071
+ if (status === "success" /* Success */ && resultDisplay) {
7091
7072
  return getGenericSuccessData(resultDisplay, originalDescription);
7092
7073
  }
7093
- if (status === CoreToolCallStatus.Error) {
7074
+ if (status === "error" /* Error */) {
7094
7075
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7095
7076
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7096
7077
  "\u2192 ",
@@ -7131,7 +7112,7 @@ var DenseToolMessage = (props) => {
7131
7112
  language: fileExtension,
7132
7113
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7133
7114
  settings,
7134
- disableColor: status === CoreToolCallStatus.Cancelled,
7115
+ disableColor: status === "cancelled" /* Cancelled */,
7135
7116
  returnLines: true
7136
7117
  });
7137
7118
  } else {
@@ -7139,7 +7120,7 @@ var DenseToolMessage = (props) => {
7139
7120
  parsedLines,
7140
7121
  filename: diff.fileName,
7141
7122
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7142
- disableColor: status === CoreToolCallStatus.Cancelled
7123
+ disableColor: status === "cancelled" /* Cancelled */
7143
7124
  });
7144
7125
  }
7145
7126
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7269,7 +7250,7 @@ function isToolExecuting(pendingHistoryItems) {
7269
7250
  return pendingHistoryItems.some((item) => {
7270
7251
  if (item && item.type === "tool_group") {
7271
7252
  return item.tools.some(
7272
- (tool) => CoreToolCallStatus.Executing === tool.status
7253
+ (tool) => "executing" /* Executing */ === tool.status
7273
7254
  );
7274
7255
  }
7275
7256
  return false;
@@ -7278,7 +7259,7 @@ function isToolExecuting(pendingHistoryItems) {
7278
7259
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7279
7260
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7280
7261
  (item) => item.tools.some(
7281
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7262
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7282
7263
  )
7283
7264
  );
7284
7265
  }
@@ -7301,14 +7282,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
7301
7282
  if (isTrackedToolCall(t)) {
7302
7283
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
7303
7284
  } else {
7304
- return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7285
+ return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
7305
7286
  }
7306
7287
  });
7307
7288
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
7308
7289
  if (isTrackedToolCall(t)) {
7309
7290
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
7310
7291
  } else {
7311
- return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7292
+ return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7312
7293
  }
7313
7294
  });
7314
7295
  const isShellCommand = toolsToInspect.some((t) => {
@@ -7407,7 +7388,7 @@ var ToolGroupMessage = ({
7407
7388
  const groupedTools = (0, import_react21.useMemo)(() => {
7408
7389
  const groups = [];
7409
7390
  for (const tool of visibleToolCalls) {
7410
- if (tool.kind === Kind.Agent) {
7391
+ if (tool.kind === "agent" /* Agent */) {
7411
7392
  const lastGroup = groups[groups.length - 1];
7412
7393
  if (Array.isArray(lastGroup)) {
7413
7394
  lastGroup.push(tool);
@@ -7462,7 +7443,7 @@ var ToolGroupMessage = ({
7462
7443
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7463
7444
  let countToolCallsWithResults = 0;
7464
7445
  for (const tool of visibleToolCalls) {
7465
- if (tool.kind !== Kind.Agent) {
7446
+ if (tool.kind !== "agent" /* Agent */) {
7466
7447
  if (isCompactTool(tool, isCompactModeEnabled)) {
7467
7448
  if (hasDensePayload(tool)) {
7468
7449
  countToolCallsWithResults++;
@@ -7636,7 +7617,7 @@ var ToolGroupDisplay = ({
7636
7617
  }
7637
7618
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7638
7619
  const visibleTools = tools.filter(
7639
- (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7620
+ (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7640
7621
  );
7641
7622
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7642
7623
  const otherTools = visibleTools.filter(
@@ -7838,18 +7819,18 @@ function CompressionMessage({
7838
7819
  return "Compressing chat history";
7839
7820
  }
7840
7821
  switch (compressionStatus) {
7841
- case CompressionStatus.COMPRESSED:
7822
+ case 1 /* COMPRESSED */:
7842
7823
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7843
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7824
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7844
7825
  if (originalTokens < 5e4) {
7845
7826
  return "Compression was not beneficial for this history size.";
7846
7827
  }
7847
7828
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7848
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7829
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7849
7830
  return "Could not compress chat history due to a token counting error.";
7850
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7831
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7851
7832
  return "Chat history compression failed: the model returned an empty summary.";
7852
- case CompressionStatus.NOOP:
7833
+ case 5 /* NOOP */:
7853
7834
  return "Nothing to compress.";
7854
7835
  default:
7855
7836
  return "";
@@ -8275,8 +8256,8 @@ var ModelUsageTable = ({ models }) => {
8275
8256
  );
8276
8257
  roleEntries.sort(([a], [b]) => {
8277
8258
  if (a === b) return 0;
8278
- if (a === LlmRole.MAIN) return -1;
8279
- if (b === LlmRole.MAIN) return 1;
8259
+ if (a === "main" /* MAIN */) return -1;
8260
+ if (b === "main" /* MAIN */) return 1;
8280
8261
  return a.localeCompare(b);
8281
8262
  });
8282
8263
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8607,8 +8588,8 @@ var ModelStatsDisplay = ({
8607
8588
  return validRoles.includes(role);
8608
8589
  }).sort((a, b) => {
8609
8590
  if (a === b) return 0;
8610
- if (a === LlmRole.MAIN) return -1;
8611
- if (b === LlmRole.MAIN) return 1;
8591
+ if (a === "main" /* MAIN */) return -1;
8592
+ if (b === "main" /* MAIN */) return 1;
8612
8593
  return a.localeCompare(b);
8613
8594
  });
8614
8595
  const createRow = (metric, getValue, options = {}) => {
@@ -9399,7 +9380,7 @@ var McpStatus = ({
9399
9380
  );
9400
9381
  const originalStatus = serverStatus(serverName);
9401
9382
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9402
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9383
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9403
9384
  let statusIndicator = "";
9404
9385
  let statusText = "";
9405
9386
  let statusColor = theme.text.primary;
@@ -9411,17 +9392,17 @@ var McpStatus = ({
9411
9392
  statusColor = theme.text.secondary;
9412
9393
  } else {
9413
9394
  switch (status) {
9414
- case MCPServerStatus.CONNECTED:
9395
+ case "connected" /* CONNECTED */:
9415
9396
  statusIndicator = "\u{1F7E2}";
9416
9397
  statusText = "Ready";
9417
9398
  statusColor = theme.status.success;
9418
9399
  break;
9419
- case MCPServerStatus.CONNECTING:
9400
+ case "connecting" /* CONNECTING */:
9420
9401
  statusIndicator = "\u{1F504}";
9421
9402
  statusText = "Starting... (first startup may take longer)";
9422
9403
  statusColor = theme.status.warning;
9423
9404
  break;
9424
- case MCPServerStatus.DISCONNECTED:
9405
+ case "disconnected" /* DISCONNECTED */:
9425
9406
  default:
9426
9407
  statusIndicator = "\u{1F534}";
9427
9408
  statusText = "Disconnected";
@@ -9469,12 +9450,12 @@ var McpStatus = ({
9469
9450
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9470
9451
  " - ",
9471
9452
  statusText,
9472
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9453
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9473
9454
  ] }),
9474
9455
  authStatusNode
9475
9456
  ] }),
9476
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9477
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9457
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9458
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9478
9459
  " (",
9479
9460
  toolCount,
9480
9461
  " tools cached)"
@@ -10035,7 +10016,7 @@ var Notifications = () => {
10035
10016
  if (dismissed) return [];
10036
10017
  const counts = persistentState.get("startupWarningCounts") || {};
10037
10018
  return startupWarnings.filter((w) => {
10038
- if (w.priority === WarningPriority.Low) {
10019
+ if (w.priority === "low" /* Low */) {
10039
10020
  const count = counts[w.id] || 0;
10040
10021
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10041
10022
  }
@@ -10048,7 +10029,7 @@ var Notifications = () => {
10048
10029
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10049
10030
  let changed = false;
10050
10031
  visibleWarnings.forEach((w) => {
10051
- if (w.priority === WarningPriority.Low) {
10032
+ if (w.priority === "low" /* Low */) {
10052
10033
  counts[w.id] = (counts[w.id] || 0) + 1;
10053
10034
  changed = true;
10054
10035
  }
@@ -10155,7 +10136,7 @@ var UserIdentity = ({ config }) => {
10155
10136
  }
10156
10137
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
10157
10138
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
10158
- /* @__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: [
10139
+ /* @__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: [
10159
10140
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
10160
10141
  "Signed in with Google",
10161
10142
  email ? ":" : ""
@@ -10389,7 +10370,7 @@ var import_react32 = __toESM(require_react(), 1);
10389
10370
  function getConfirmingToolState(pendingHistoryItems) {
10390
10371
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10391
10372
  const confirmingTools = allPendingTools.filter(
10392
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10373
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10393
10374
  );
10394
10375
  if (confirmingTools.length === 0) {
10395
10376
  return null;
@@ -11697,7 +11678,7 @@ var ExitPlanModeDialog = ({
11697
11678
  {
11698
11679
  questions: [
11699
11680
  {
11700
- type: QuestionType.CHOICE,
11681
+ type: "choice" /* CHOICE */,
11701
11682
  header: "Approval",
11702
11683
  question: planContent,
11703
11684
  options: [
@@ -11718,9 +11699,9 @@ var ExitPlanModeDialog = ({
11718
11699
  onSubmit: (answers) => {
11719
11700
  const answer = answers["0"];
11720
11701
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11721
- onApprove(ApprovalMode.AUTO_EDIT);
11702
+ onApprove("autoEdit" /* AUTO_EDIT */);
11722
11703
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11723
- onApprove(ApprovalMode.DEFAULT);
11704
+ onApprove("default" /* DEFAULT */);
11724
11705
  } else if (answer) {
11725
11706
  onFeedback(answer);
11726
11707
  }
@@ -11931,7 +11912,7 @@ ${deceptiveUrlWarnings.map(
11931
11912
  );
11932
11913
  (0, import_react37.useEffect)(() => {
11933
11914
  if (isCancelling) {
11934
- handleConfirm(ToolConfirmationOutcome.Cancel);
11915
+ handleConfirm("cancel" /* Cancel */);
11935
11916
  }
11936
11917
  }, [isCancelling, handleConfirm]);
11937
11918
  const handleSelect = (0, import_react37.useCallback)(
@@ -11944,19 +11925,19 @@ ${deceptiveUrlWarnings.map(
11944
11925
  if (!confirmationDetails.isModifying) {
11945
11926
  options2.push({
11946
11927
  label: "Allow once",
11947
- value: ToolConfirmationOutcome.ProceedOnce,
11928
+ value: "proceed_once" /* ProceedOnce */,
11948
11929
  key: "Allow once"
11949
11930
  });
11950
11931
  if (isTrustedFolder) {
11951
11932
  options2.push({
11952
11933
  label: "Allow for this session",
11953
- value: ToolConfirmationOutcome.ProceedAlways,
11934
+ value: "proceed_always" /* ProceedAlways */,
11954
11935
  key: "Allow for this session"
11955
11936
  });
11956
11937
  if (allowPermanentApproval) {
11957
11938
  options2.push({
11958
11939
  label: "Allow for this file in all future sessions",
11959
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11940
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11960
11941
  key: "Allow for this file in all future sessions"
11961
11942
  });
11962
11943
  }
@@ -11964,119 +11945,119 @@ ${deceptiveUrlWarnings.map(
11964
11945
  if (!config.getIdeMode() || !isDiffingEnabled) {
11965
11946
  options2.push({
11966
11947
  label: "Modify with external editor",
11967
- value: ToolConfirmationOutcome.ModifyWithEditor,
11948
+ value: "modify_with_editor" /* ModifyWithEditor */,
11968
11949
  key: "Modify with external editor"
11969
11950
  });
11970
11951
  }
11971
11952
  options2.push({
11972
11953
  label: "No, suggest changes (esc)",
11973
- value: ToolConfirmationOutcome.Cancel,
11954
+ value: "cancel" /* Cancel */,
11974
11955
  key: "No, suggest changes (esc)"
11975
11956
  });
11976
11957
  }
11977
11958
  } else if (confirmationDetails.type === "sandbox_expansion") {
11978
11959
  options2.push({
11979
11960
  label: "Allow once",
11980
- value: ToolConfirmationOutcome.ProceedOnce,
11961
+ value: "proceed_once" /* ProceedOnce */,
11981
11962
  key: "Allow once"
11982
11963
  });
11983
11964
  if (isTrustedFolder) {
11984
11965
  options2.push({
11985
11966
  label: "Allow for this session",
11986
- value: ToolConfirmationOutcome.ProceedAlways,
11967
+ value: "proceed_always" /* ProceedAlways */,
11987
11968
  key: "Allow for this session"
11988
11969
  });
11989
11970
  if (allowPermanentApproval) {
11990
11971
  options2.push({
11991
11972
  label: "Allow for all future sessions",
11992
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11973
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11993
11974
  key: "Allow for all future sessions"
11994
11975
  });
11995
11976
  }
11996
11977
  }
11997
11978
  options2.push({
11998
11979
  label: "No, suggest changes (esc)",
11999
- value: ToolConfirmationOutcome.Cancel,
11980
+ value: "cancel" /* Cancel */,
12000
11981
  key: "No, suggest changes (esc)"
12001
11982
  });
12002
11983
  } else if (confirmationDetails.type === "exec") {
12003
11984
  options2.push({
12004
11985
  label: "Allow once",
12005
- value: ToolConfirmationOutcome.ProceedOnce,
11986
+ value: "proceed_once" /* ProceedOnce */,
12006
11987
  key: "Allow once"
12007
11988
  });
12008
11989
  if (isTrustedFolder) {
12009
11990
  options2.push({
12010
11991
  label: `Allow for this session`,
12011
- value: ToolConfirmationOutcome.ProceedAlways,
11992
+ value: "proceed_always" /* ProceedAlways */,
12012
11993
  key: `Allow for this session`
12013
11994
  });
12014
11995
  if (allowPermanentApproval) {
12015
11996
  options2.push({
12016
11997
  label: `Allow this command for all future sessions`,
12017
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11998
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12018
11999
  key: `Allow for all future sessions`
12019
12000
  });
12020
12001
  }
12021
12002
  }
12022
12003
  options2.push({
12023
12004
  label: "No, suggest changes (esc)",
12024
- value: ToolConfirmationOutcome.Cancel,
12005
+ value: "cancel" /* Cancel */,
12025
12006
  key: "No, suggest changes (esc)"
12026
12007
  });
12027
12008
  } else if (confirmationDetails.type === "info") {
12028
12009
  options2.push({
12029
12010
  label: "Allow once",
12030
- value: ToolConfirmationOutcome.ProceedOnce,
12011
+ value: "proceed_once" /* ProceedOnce */,
12031
12012
  key: "Allow once"
12032
12013
  });
12033
12014
  if (isTrustedFolder) {
12034
12015
  options2.push({
12035
12016
  label: "Allow for this session",
12036
- value: ToolConfirmationOutcome.ProceedAlways,
12017
+ value: "proceed_always" /* ProceedAlways */,
12037
12018
  key: "Allow for this session"
12038
12019
  });
12039
12020
  if (allowPermanentApproval) {
12040
12021
  options2.push({
12041
12022
  label: "Allow for all future sessions",
12042
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12023
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12043
12024
  key: "Allow for all future sessions"
12044
12025
  });
12045
12026
  }
12046
12027
  }
12047
12028
  options2.push({
12048
12029
  label: "No, suggest changes (esc)",
12049
- value: ToolConfirmationOutcome.Cancel,
12030
+ value: "cancel" /* Cancel */,
12050
12031
  key: "No, suggest changes (esc)"
12051
12032
  });
12052
12033
  } else if (confirmationDetails.type === "mcp") {
12053
12034
  options2.push({
12054
12035
  label: "Allow once",
12055
- value: ToolConfirmationOutcome.ProceedOnce,
12036
+ value: "proceed_once" /* ProceedOnce */,
12056
12037
  key: "Allow once"
12057
12038
  });
12058
12039
  if (isTrustedFolder) {
12059
12040
  options2.push({
12060
12041
  label: "Allow tool for this session",
12061
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
12042
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
12062
12043
  key: "Allow tool for this session"
12063
12044
  });
12064
12045
  options2.push({
12065
12046
  label: "Allow all server tools for this session",
12066
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
12047
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
12067
12048
  key: "Allow all server tools for this session"
12068
12049
  });
12069
12050
  if (allowPermanentApproval) {
12070
12051
  options2.push({
12071
12052
  label: "Allow tool for all future sessions",
12072
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12053
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12073
12054
  key: "Allow tool for all future sessions"
12074
12055
  });
12075
12056
  }
12076
12057
  }
12077
12058
  options2.push({
12078
12059
  label: "No, suggest changes (esc)",
12079
- value: ToolConfirmationOutcome.Cancel,
12060
+ value: "cancel" /* Cancel */,
12080
12061
  key: "No, suggest changes (esc)"
12081
12062
  });
12082
12063
  }
@@ -12115,7 +12096,7 @@ ${deceptiveUrlWarnings.map(
12115
12096
  const containsRedirection = commandsToDisplay.some(
12116
12097
  (cmd) => hasRedirection(cmd)
12117
12098
  );
12118
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12099
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12119
12100
  if (containsRedirection && !isAutoEdit) {
12120
12101
  extraInfoLines = 1;
12121
12102
  }
@@ -12141,7 +12122,7 @@ ${deceptiveUrlWarnings.map(
12141
12122
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12142
12123
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12143
12124
  const alwaysAndSaveIndex = options2.findIndex(
12144
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12125
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12145
12126
  );
12146
12127
  if (alwaysAndSaveIndex !== -1) {
12147
12128
  initialIndex2 = alwaysAndSaveIndex;
@@ -12158,10 +12139,10 @@ ${deceptiveUrlWarnings.map(
12158
12139
  {
12159
12140
  questions: confirmationDetails.questions,
12160
12141
  onSubmit: (answers) => {
12161
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12142
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12162
12143
  },
12163
12144
  onCancel: () => {
12164
- handleConfirm(ToolConfirmationOutcome.Cancel);
12145
+ handleConfirm("cancel" /* Cancel */);
12165
12146
  },
12166
12147
  width: terminalWidth,
12167
12148
  availableHeight: bodyHeight
@@ -12182,19 +12163,19 @@ ${deceptiveUrlWarnings.map(
12182
12163
  planPath: confirmationDetails.planPath,
12183
12164
  getPreferredEditor,
12184
12165
  onApprove: (approvalMode) => {
12185
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12166
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12186
12167
  approved: true,
12187
12168
  approvalMode
12188
12169
  });
12189
12170
  },
12190
12171
  onFeedback: (feedback) => {
12191
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12172
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12192
12173
  approved: false,
12193
12174
  feedback
12194
12175
  });
12195
12176
  },
12196
12177
  onCancel: () => {
12197
- handleConfirm(ToolConfirmationOutcome.Cancel);
12178
+ handleConfirm("cancel" /* Cancel */);
12198
12179
  },
12199
12180
  width: terminalWidth,
12200
12181
  availableHeight: bodyHeight
@@ -12303,7 +12284,7 @@ ${deceptiveUrlWarnings.map(
12303
12284
  const containsRedirection = commandsToDisplay.some(
12304
12285
  (cmd) => hasRedirection(cmd)
12305
12286
  );
12306
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12287
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12307
12288
  let warnings = null;
12308
12289
  if (containsRedirection && !isAutoEdit) {
12309
12290
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12462,7 +12443,7 @@ ${deceptiveUrlWarnings.map(
12462
12443
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12463
12444
  const renderRadioItem = (0, import_react37.useCallback)(
12464
12445
  (item, { titleColor }) => {
12465
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12446
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12466
12447
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12467
12448
  item.label,
12468
12449
  " ",
@@ -14492,7 +14473,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14492
14473
  if (settings.merged.security.auth.useExternal) {
14493
14474
  return null;
14494
14475
  }
14495
- if (authType === AuthType.USE_GEMINI) {
14476
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14496
14477
  return null;
14497
14478
  }
14498
14479
  return validateAuthMethod(authType);
@@ -14544,7 +14525,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14544
14525
  }
14545
14526
  return;
14546
14527
  }
14547
- if (authType === AuthType.USE_GEMINI) {
14528
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14548
14529
  const key = await reloadApiKey();
14549
14530
  if (!key) {
14550
14531
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14622,31 +14603,31 @@ function AuthDialog({
14622
14603
  let items = [
14623
14604
  {
14624
14605
  label: "Sign in with Google",
14625
- value: AuthType.LOGIN_WITH_GOOGLE,
14626
- key: AuthType.LOGIN_WITH_GOOGLE
14606
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14607
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14627
14608
  },
14628
14609
  ...process.env["CLOUD_SHELL"] === "true" ? [
14629
14610
  {
14630
14611
  label: "Use Cloud Shell user credentials",
14631
- value: AuthType.COMPUTE_ADC,
14632
- key: AuthType.COMPUTE_ADC
14612
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14613
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14633
14614
  }
14634
14615
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14635
14616
  {
14636
14617
  label: "Use metadata server application default credentials",
14637
- value: AuthType.COMPUTE_ADC,
14638
- key: AuthType.COMPUTE_ADC
14618
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14619
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14639
14620
  }
14640
14621
  ] : [],
14641
14622
  {
14642
14623
  label: "Use Gemini API Key",
14643
- value: AuthType.USE_GEMINI,
14644
- key: AuthType.USE_GEMINI
14624
+ value: "gemini-api-key" /* USE_GEMINI */,
14625
+ key: "gemini-api-key" /* USE_GEMINI */
14645
14626
  },
14646
14627
  {
14647
14628
  label: "Vertex AI",
14648
- value: AuthType.USE_VERTEX_AI,
14649
- key: AuthType.USE_VERTEX_AI
14629
+ value: "vertex-ai" /* USE_VERTEX_AI */,
14630
+ key: "vertex-ai" /* USE_VERTEX_AI */
14650
14631
  }
14651
14632
  ];
14652
14633
  if (settings.merged.security.auth.enforcedType) {
@@ -14668,9 +14649,9 @@ function AuthDialog({
14668
14649
  return item.value === defaultAuthType;
14669
14650
  }
14670
14651
  if (process.env["GEMINI_API_KEY"]) {
14671
- return item.value === AuthType.USE_GEMINI;
14652
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
14672
14653
  }
14673
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
14654
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14674
14655
  });
14675
14656
  if (settings.merged.security.auth.enforcedType) {
14676
14657
  initialAuthIndex = 0;
@@ -14681,7 +14662,7 @@ function AuthDialog({
14681
14662
  return;
14682
14663
  }
14683
14664
  if (authType) {
14684
- const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14665
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14685
14666
  if (needsRestart) {
14686
14667
  setAuthContext({ requiresRestart: true });
14687
14668
  } else {
@@ -14689,12 +14670,12 @@ function AuthDialog({
14689
14670
  }
14690
14671
  await clearCachedCredentialFile();
14691
14672
  settings.setValue(scope, "security.auth.selectedType", authType);
14692
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14673
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14693
14674
  setExiting(true);
14694
14675
  setTimeout(relaunchApp, 100);
14695
14676
  return;
14696
14677
  }
14697
- if (authType === AuthType.USE_GEMINI) {
14678
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14698
14679
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14699
14680
  return;
14700
14681
  }
@@ -15046,9 +15027,18 @@ function EditorSettingsDialog({
15046
15027
  let editorIndex = currentPreference ? editorItems.findIndex(
15047
15028
  (item) => item.type === currentPreference
15048
15029
  ) : 0;
15049
- if (editorIndex === -1) {
15030
+ const isUnsupportedEditor = editorIndex === -1;
15031
+ if (isUnsupportedEditor) {
15050
15032
  editorIndex = 0;
15051
15033
  }
15034
+ (0, import_react50.useEffect)(() => {
15035
+ if (isUnsupportedEditor && currentPreference) {
15036
+ coreEvents.emitFeedback(
15037
+ "error",
15038
+ `Editor is not supported: ${currentPreference}`
15039
+ );
15040
+ }
15041
+ }, [isUnsupportedEditor, currentPreference]);
15052
15042
  const scopeItems = [
15053
15043
  {
15054
15044
  label: "User Settings",
@@ -15441,11 +15431,11 @@ var PrivacyNoticeText = ({
15441
15431
  }) => {
15442
15432
  const authType = config.getContentGeneratorConfig()?.authType;
15443
15433
  switch (authType) {
15444
- case AuthType.USE_GEMINI:
15434
+ case "gemini-api-key" /* USE_GEMINI */:
15445
15435
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15446
- case AuthType.USE_VERTEX_AI:
15436
+ case "vertex-ai" /* USE_VERTEX_AI */:
15447
15437
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15448
- case AuthType.LOGIN_WITH_GOOGLE:
15438
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15449
15439
  default:
15450
15440
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15451
15441
  }
@@ -15486,7 +15476,7 @@ function ProQuotaDialog({
15486
15476
  value: "retry_always",
15487
15477
  key: "retry_always"
15488
15478
  },
15489
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15479
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15490
15480
  {
15491
15481
  label: "Upgrade for higher limits",
15492
15482
  value: "upgrade",
@@ -16644,7 +16634,7 @@ function ModelDialog({ onClose }) {
16644
16634
  const shouldShowPreviewModels = config?.getHasAccessToPreviewModel() ?? false;
16645
16635
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16646
16636
  const selectedAuthType = settings.merged.security.auth.selectedType;
16647
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16637
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16648
16638
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16649
16639
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16650
16640
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -17962,10 +17952,10 @@ function initializeConsoleStore() {
17962
17952
  globalConsoleMessages = [];
17963
17953
  globalErrorCount = 0;
17964
17954
  notifyListeners();
17965
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
17966
- coreEvents.off(CoreEvent.Output, handleOutput);
17967
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
17968
- coreEvents.on(CoreEvent.Output, handleOutput);
17955
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
17956
+ coreEvents.off("output" /* Output */, handleOutput);
17957
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
17958
+ coreEvents.on("output" /* Output */, handleOutput);
17969
17959
  }
17970
17960
  function notifyListeners() {
17971
17961
  for (const listener of listeners) {
@@ -20102,7 +20092,7 @@ function usePromptCompletion({
20102
20092
  { model: "prompt-completion" },
20103
20093
  contents,
20104
20094
  signal,
20105
- LlmRole.UTILITY_AUTOCOMPLETE
20095
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20106
20096
  );
20107
20097
  if (signal.aborted) {
20108
20098
  return;
@@ -22180,9 +22170,9 @@ var InputPrompt = ({
22180
22170
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22181
22171
  }
22182
22172
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22183
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22184
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22185
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22173
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22174
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22175
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22186
22176
  let statusColor;
22187
22177
  let statusText = "";
22188
22178
  if (shellModeActive) {
@@ -22619,7 +22609,8 @@ var WITTY_LOADING_PHRASES = [
22619
22609
  "Have you tried turning it off and on again? (The loading screen, not me.)",
22620
22610
  "Constructing additional pylons",
22621
22611
  "New line? That\u2019s Ctrl+J.",
22622
- "Releasing the HypnoDrones"
22612
+ "Releasing the HypnoDrones",
22613
+ "Pushing the button, Frank."
22623
22614
  ];
22624
22615
 
22625
22616
  // packages/cli/src/ui/hooks/usePhraseCycler.ts
@@ -23014,22 +23005,22 @@ var ApprovalModeIndicator = ({
23014
23005
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23015
23006
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23016
23007
  switch (approvalMode) {
23017
- case ApprovalMode.AUTO_EDIT:
23008
+ case "autoEdit" /* AUTO_EDIT */:
23018
23009
  textColor = theme.status.warning;
23019
23010
  textContent = "auto-accept edits";
23020
23011
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23021
23012
  break;
23022
- case ApprovalMode.PLAN:
23013
+ case "plan" /* PLAN */:
23023
23014
  textColor = theme.status.success;
23024
23015
  textContent = "plan";
23025
23016
  subText = `${cycleHint} to manual`;
23026
23017
  break;
23027
- case ApprovalMode.YOLO:
23018
+ case "yolo" /* YOLO */:
23028
23019
  textColor = theme.status.error;
23029
23020
  textContent = "YOLO";
23030
23021
  subText = yoloHint;
23031
23022
  break;
23032
- case ApprovalMode.DEFAULT:
23023
+ case "default" /* DEFAULT */:
23033
23024
  default:
23034
23025
  textColor = theme.text.accent;
23035
23026
  textContent = "";
@@ -23077,7 +23068,7 @@ var useComposerStatus = () => {
23077
23068
  (item) => item.type === "tool_group"
23078
23069
  ).some(
23079
23070
  (item) => item.tools.some(
23080
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23071
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23081
23072
  )
23082
23073
  ),
23083
23074
  [uiState.pendingHistoryItems]
@@ -23092,13 +23083,13 @@ var useComposerStatus = () => {
23092
23083
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23093
23084
  if (hideMinimalModeHintWhileBusy) return null;
23094
23085
  switch (showApprovalModeIndicator) {
23095
- case ApprovalMode.YOLO:
23086
+ case "yolo" /* YOLO */:
23096
23087
  return { text: "YOLO", color: theme.status.error };
23097
- case ApprovalMode.PLAN:
23088
+ case "plan" /* PLAN */:
23098
23089
  return { text: "plan", color: theme.status.success };
23099
- case ApprovalMode.AUTO_EDIT:
23090
+ case "autoEdit" /* AUTO_EDIT */:
23100
23091
  return { text: "auto edit", color: theme.status.warning };
23101
- case ApprovalMode.DEFAULT:
23092
+ case "default" /* DEFAULT */:
23102
23093
  default:
23103
23094
  return null;
23104
23095
  }
@@ -23452,7 +23443,7 @@ var ConfigInitDisplay = ({
23452
23443
  let connected = 0;
23453
23444
  const connecting = [];
23454
23445
  for (const [name, client] of clients.entries()) {
23455
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23446
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23456
23447
  connected++;
23457
23448
  } else {
23458
23449
  connecting.push(name);
@@ -23474,9 +23465,9 @@ var ConfigInitDisplay = ({
23474
23465
  );
23475
23466
  }
23476
23467
  };
23477
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23468
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23478
23469
  return () => {
23479
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23470
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23480
23471
  };
23481
23472
  }, [initialMessage]);
23482
23473
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24193,7 +24184,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24193
24184
  callId,
24194
24185
  name: SHELL_COMMAND_NAME,
24195
24186
  description: rawQuery,
24196
- status: CoreToolCallStatus.Executing,
24187
+ status: "executing" /* Executing */,
24197
24188
  isClientInitiated: true,
24198
24189
  resultDisplay: "",
24199
24190
  confirmationDetails: void 0
@@ -24334,7 +24325,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24334
24325
  mainContent = result.output.trim() || "(Command produced no output)";
24335
24326
  }
24336
24327
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24337
- let finalStatus = CoreToolCallStatus.Success;
24328
+ let finalStatus = "success" /* Success */;
24338
24329
  const prependToAnsiOutput = (output, text) => {
24339
24330
  const newLines = text.split("\n").map((line) => [
24340
24331
  {
@@ -24353,20 +24344,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24353
24344
  };
24354
24345
  let prefix = "";
24355
24346
  if (result.error) {
24356
- finalStatus = CoreToolCallStatus.Error;
24347
+ finalStatus = "error" /* Error */;
24357
24348
  prefix = result.error.message;
24358
24349
  } else if (result.aborted) {
24359
- finalStatus = CoreToolCallStatus.Cancelled;
24350
+ finalStatus = "cancelled" /* Cancelled */;
24360
24351
  prefix = "Command was cancelled.";
24361
24352
  } else if (result.backgrounded) {
24362
- finalStatus = CoreToolCallStatus.Success;
24353
+ finalStatus = "success" /* Success */;
24363
24354
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24364
24355
  mainContent = finalOutput;
24365
24356
  } else if (result.signal) {
24366
- finalStatus = CoreToolCallStatus.Error;
24357
+ finalStatus = "error" /* Error */;
24367
24358
  prefix = `Command terminated by signal: ${result.signal}.`;
24368
24359
  } else if (result.exitCode !== 0) {
24369
- finalStatus = CoreToolCallStatus.Error;
24360
+ finalStatus = "error" /* Error */;
24370
24361
  prefix = `Command exited with code ${result.exitCode}.`;
24371
24362
  }
24372
24363
  if (prefix) {
@@ -24392,7 +24383,7 @@ ${mainContent}`;
24392
24383
  status: finalStatus,
24393
24384
  resultDisplay: finalOutput
24394
24385
  };
24395
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24386
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24396
24387
  addItemToHistory(
24397
24388
  {
24398
24389
  type: "tool_group",
@@ -25382,7 +25373,7 @@ function useQuotaAndFallback({
25382
25373
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25383
25374
  `/stats model for usage details`,
25384
25375
  `/model to switch models.`,
25385
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25376
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25386
25377
  ].filter(Boolean);
25387
25378
  message = messageLines.join("\n");
25388
25379
  } else if (error instanceof ModelNotFoundError) {
@@ -25570,7 +25561,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25570
25561
  );
25571
25562
  setEditorError(null);
25572
25563
  setIsEditorDialogOpen(false);
25573
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25564
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25574
25565
  } catch (error) {
25575
25566
  setEditorError(`Failed to set editor preference: ${error}`);
25576
25567
  }
@@ -25579,7 +25570,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25579
25570
  );
25580
25571
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25581
25572
  setIsEditorDialogOpen(false);
25582
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25573
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25583
25574
  }, []);
25584
25575
  return {
25585
25576
  isEditorDialogOpen,
@@ -25956,7 +25947,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25956
25947
  canonicalPath: resolvedCommandPath
25957
25948
  } = parseSlashCommand(trimmed, commands);
25958
25949
  if (!commandToExecute) {
25959
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25950
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25960
25951
  if (isMcpLoading) {
25961
25952
  setIsProcessing(true);
25962
25953
  if (addToHistory) {
@@ -26136,7 +26127,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26136
26127
  onConfirm: async (resolvedOutcome) => {
26137
26128
  resolve3({
26138
26129
  outcome: resolvedOutcome,
26139
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26130
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26140
26131
  });
26141
26132
  }
26142
26133
  };
@@ -26144,7 +26135,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26144
26135
  callId,
26145
26136
  name: "Expansion",
26146
26137
  description: "Command expansion needs shell access",
26147
- status: CoreToolCallStatus.AwaitingApproval,
26138
+ status: "awaiting_approval" /* AwaitingApproval */,
26148
26139
  isClientInitiated: true,
26149
26140
  resultDisplay: void 0,
26150
26141
  confirmationDetails
@@ -26155,7 +26146,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26155
26146
  });
26156
26147
  });
26157
26148
  setPendingItem(null);
26158
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26149
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26159
26150
  addItem(
26160
26151
  {
26161
26152
  type: "info" /* INFO */,
@@ -26165,7 +26156,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26165
26156
  );
26166
26157
  return { type: "handled" };
26167
26158
  }
26168
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26159
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26169
26160
  setSessionShellAllowlist(
26170
26161
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26171
26162
  );
@@ -26641,7 +26632,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26641
26632
  let description;
26642
26633
  let renderOutputAsMarkdown = false;
26643
26634
  const displayName = call.tool?.displayName ?? call.request.name;
26644
- if (call.status === CoreToolCallStatus.Error) {
26635
+ if (call.status === "error" /* Error */) {
26645
26636
  description = JSON.stringify(call.request.args);
26646
26637
  } else {
26647
26638
  description = call.invocation.getDescription();
@@ -26664,27 +26655,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26664
26655
  let progress = void 0;
26665
26656
  let progressTotal = void 0;
26666
26657
  switch (call.status) {
26667
- case CoreToolCallStatus.Success:
26658
+ case "success" /* Success */:
26668
26659
  resultDisplay = call.response.resultDisplay;
26669
26660
  outputFile = call.response.outputFile;
26670
26661
  break;
26671
- case CoreToolCallStatus.Error:
26672
- case CoreToolCallStatus.Cancelled:
26662
+ case "error" /* Error */:
26663
+ case "cancelled" /* Cancelled */:
26673
26664
  resultDisplay = call.response.resultDisplay;
26674
26665
  break;
26675
- case CoreToolCallStatus.AwaitingApproval:
26666
+ case "awaiting_approval" /* AwaitingApproval */:
26676
26667
  correlationId = call.correlationId;
26677
26668
  confirmationDetails = call.confirmationDetails;
26678
26669
  break;
26679
- case CoreToolCallStatus.Executing:
26670
+ case "executing" /* Executing */:
26680
26671
  resultDisplay = call.liveOutput;
26681
26672
  ptyId = call.pid;
26682
26673
  progressMessage = call.progressMessage;
26683
26674
  progress = call.progress;
26684
26675
  progressTotal = call.progressTotal;
26685
26676
  break;
26686
- case CoreToolCallStatus.Scheduled:
26687
- case CoreToolCallStatus.Validating:
26677
+ case "scheduled" /* Scheduled */:
26678
+ case "validating" /* Validating */:
26688
26679
  break;
26689
26680
  default: {
26690
26681
  const exhaustiveCheck = call;
@@ -26755,7 +26746,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26755
26746
  const handler = (event) => {
26756
26747
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26757
26748
  const hasExecuting = event.toolCalls.some(
26758
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26749
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26759
26750
  );
26760
26751
  if (hasExecuting) {
26761
26752
  setLastToolOutputTime(Date.now());
@@ -26764,7 +26755,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26764
26755
  const prevCalls = prev[event.schedulerId] ?? [];
26765
26756
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26766
26757
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26767
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26758
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26768
26759
  );
26769
26760
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26770
26761
  return prev;
@@ -26776,9 +26767,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26776
26767
  };
26777
26768
  });
26778
26769
  };
26779
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26770
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26780
26771
  return () => {
26781
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26772
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26782
26773
  };
26783
26774
  }, [messageBus, internalAdaptToolCalls]);
26784
26775
  (0, import_react98.useEffect)(() => {
@@ -26800,9 +26791,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26800
26791
  };
26801
26792
  });
26802
26793
  };
26803
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26794
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26804
26795
  return () => {
26805
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26796
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26806
26797
  };
26807
26798
  }, [messageBus]);
26808
26799
  const schedule = (0, import_react98.useCallback)(
@@ -26901,8 +26892,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26901
26892
  const prev = prevMap.get(coreCall.request.callId);
26902
26893
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26903
26894
  let status = coreCall.status;
26904
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26905
- status = CoreToolCallStatus.Executing;
26895
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26896
+ status = "executing" /* Executing */;
26906
26897
  }
26907
26898
  return {
26908
26899
  ...coreCall,
@@ -26934,7 +26925,7 @@ function getBackgroundedToolInfo(toolCall) {
26934
26925
  };
26935
26926
  }
26936
26927
  function isBackgroundableExecutingToolCall(toolCall) {
26937
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26928
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26938
26929
  }
26939
26930
  function showCitations(settings) {
26940
26931
  const enabled = settings.merged.ui.showCitations;
@@ -26944,14 +26935,14 @@ function showCitations(settings) {
26944
26935
  return true;
26945
26936
  }
26946
26937
  function calculateStreamingState(isResponding, toolCalls) {
26947
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26938
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26948
26939
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26949
26940
  }
26950
26941
  const isAnyToolActive = toolCalls.some((tc) => {
26951
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26942
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26952
26943
  return true;
26953
26944
  }
26954
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26945
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26955
26946
  return !tc.responseSubmittedToGemini;
26956
26947
  }
26957
26948
  return false;
@@ -26997,9 +26988,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26997
26988
  }
26998
26989
  setRetryStatus(payload);
26999
26990
  };
27000
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
26991
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27001
26992
  return () => {
27002
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
26993
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27003
26994
  };
27004
26995
  }, [isRespondingRef]);
27005
26996
  const [
@@ -27132,12 +27123,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27132
27123
  const tc = toolCalls[i];
27133
27124
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27134
27125
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27135
- const isAgent = tc.tool?.kind === Kind.Agent;
27126
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
27136
27127
  if (isAgent) {
27137
27128
  let contigAgentsComplete = true;
27138
27129
  for (let j = i + 1; j < toolCalls.length; j++) {
27139
27130
  const nextTc = toolCalls[j];
27140
- if (nextTc.tool?.kind === Kind.Agent) {
27131
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
27141
27132
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27142
27133
  contigAgentsComplete = false;
27143
27134
  break;
@@ -27163,7 +27154,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27163
27154
  let currentGroup = [];
27164
27155
  for (const tc of toolsToPush) {
27165
27156
  newPushed.add(tc.request.callId);
27166
- if (tc.tool?.kind === Kind.Agent) {
27157
+ if (tc.tool?.kind === "agent" /* Agent */) {
27167
27158
  currentGroup.push(tc);
27168
27159
  } else {
27169
27160
  if (currentGroup.length > 0) {
@@ -27313,7 +27304,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27313
27304
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27314
27305
  }, [activeShellPtyId, addItem, setIsResponding]);
27315
27306
  (0, import_react99.useEffect)(() => {
27316
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27307
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27317
27308
  const lastUserMessageIndex = history.findLastIndex(
27318
27309
  (item) => item.type === "user" /* USER */
27319
27310
  );
@@ -27381,7 +27372,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27381
27372
  return;
27382
27373
  }
27383
27374
  const hasActiveTools = toolCalls.some(
27384
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27375
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27385
27376
  );
27386
27377
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27387
27378
  if (clearBuffer) {
@@ -27408,7 +27399,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27408
27399
  if (tool.name === SHELL_COMMAND_NAME) {
27409
27400
  return {
27410
27401
  ...tool,
27411
- status: CoreToolCallStatus.Cancelled,
27402
+ status: "cancelled" /* Cancelled */,
27412
27403
  resultDisplay: tool.resultDisplay
27413
27404
  };
27414
27405
  }
@@ -27473,7 +27464,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27473
27464
  let localQueryToSendToGemini = null;
27474
27465
  if (typeof query === "string") {
27475
27466
  const trimmedQuery = query.trim();
27476
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27467
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
27477
27468
  if (!shellModeActive) {
27478
27469
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27479
27470
  if (slashCommandResult) {
@@ -27629,7 +27620,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27629
27620
  if (pendingHistoryItemRef.current) {
27630
27621
  if (pendingHistoryItemRef.current.type === "tool_group") {
27631
27622
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27632
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27623
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27633
27624
  );
27634
27625
  const pendingItem = {
27635
27626
  ...pendingHistoryItemRef.current,
@@ -27875,15 +27866,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27875
27866
  let geminiMessageBuffer = "";
27876
27867
  const toolCallRequests = [];
27877
27868
  for await (const event of stream) {
27878
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27869
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27879
27870
  setThought(null);
27880
27871
  }
27881
27872
  switch (event.type) {
27882
- case GeminiEventType.Thought:
27873
+ case "thought" /* Thought */:
27883
27874
  setLastGeminiActivityTime(Date.now());
27884
27875
  handleThoughtEvent(event.value, userMessageTimestamp);
27885
27876
  break;
27886
- case GeminiEventType.Content:
27877
+ case "content" /* Content */:
27887
27878
  setLastGeminiActivityTime(Date.now());
27888
27879
  geminiMessageBuffer = handleContentEvent(
27889
27880
  event.value,
@@ -27891,16 +27882,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27891
27882
  userMessageTimestamp
27892
27883
  );
27893
27884
  break;
27894
- case GeminiEventType.ToolCallRequest:
27885
+ case "tool_call_request" /* ToolCallRequest */:
27895
27886
  toolCallRequests.push(event.value);
27896
27887
  break;
27897
- case GeminiEventType.UserCancelled:
27888
+ case "user_cancelled" /* UserCancelled */:
27898
27889
  handleUserCancelledEvent(userMessageTimestamp);
27899
27890
  break;
27900
- case GeminiEventType.Error:
27891
+ case "error" /* Error */:
27901
27892
  handleErrorEvent(event.value, userMessageTimestamp);
27902
27893
  break;
27903
- case GeminiEventType.AgentExecutionStopped:
27894
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
27904
27895
  handleAgentExecutionStoppedEvent(
27905
27896
  event.value.reason,
27906
27897
  userMessageTimestamp,
@@ -27908,7 +27899,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27908
27899
  event.value.contextCleared
27909
27900
  );
27910
27901
  break;
27911
- case GeminiEventType.AgentExecutionBlocked:
27902
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
27912
27903
  handleAgentExecutionBlockedEvent(
27913
27904
  event.value.reason,
27914
27905
  userMessageTimestamp,
@@ -27916,35 +27907,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27916
27907
  event.value.contextCleared
27917
27908
  );
27918
27909
  break;
27919
- case GeminiEventType.ChatCompressed:
27910
+ case "chat_compressed" /* ChatCompressed */:
27920
27911
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27921
27912
  break;
27922
- case GeminiEventType.ToolCallConfirmation:
27923
- case GeminiEventType.ToolCallResponse:
27913
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
27914
+ case "tool_call_response" /* ToolCallResponse */:
27924
27915
  break;
27925
- case GeminiEventType.MaxSessionTurns:
27916
+ case "max_session_turns" /* MaxSessionTurns */:
27926
27917
  handleMaxSessionTurnsEvent();
27927
27918
  break;
27928
- case GeminiEventType.ContextWindowWillOverflow:
27919
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27929
27920
  handleContextWindowWillOverflowEvent(
27930
27921
  event.value.estimatedRequestTokenCount,
27931
27922
  event.value.remainingTokenCount
27932
27923
  );
27933
27924
  break;
27934
- case GeminiEventType.Finished:
27925
+ case "finished" /* Finished */:
27935
27926
  handleFinishedEvent(event, userMessageTimestamp);
27936
27927
  break;
27937
- case GeminiEventType.Citation:
27928
+ case "citation" /* Citation */:
27938
27929
  handleCitationEvent(event.value, userMessageTimestamp);
27939
27930
  break;
27940
- case GeminiEventType.ModelInfo:
27931
+ case "model_info" /* ModelInfo */:
27941
27932
  handleChatModelEvent(event.value, userMessageTimestamp);
27942
27933
  break;
27943
- case GeminiEventType.LoopDetected:
27934
+ case "loop_detected" /* LoopDetected */:
27944
27935
  loopDetectedRef.current = true;
27945
27936
  break;
27946
- case GeminiEventType.Retry:
27947
- case GeminiEventType.InvalidStream:
27937
+ case "retry" /* Retry */:
27938
+ case "invalid_stream" /* InvalidStream */:
27948
27939
  break;
27949
27940
  default: {
27950
27941
  const unreachable = event;
@@ -27985,7 +27976,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27985
27976
  const submitQuery = (0, import_react99.useCallback)(
27986
27977
  async (query, options, prompt_id) => runInDevTraceSpan(
27987
27978
  {
27988
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
27979
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
27989
27980
  sessionId: config.getSessionId()
27990
27981
  },
27991
27982
  async ({ metadata: spanMetadata }) => {
@@ -28145,7 +28136,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28145
28136
  );
28146
28137
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28147
28138
  async (newApprovalMode) => {
28148
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28139
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28149
28140
  if (geminiClient) {
28150
28141
  try {
28151
28142
  await geminiClient.addHistory({
@@ -28168,11 +28159,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28168
28159
  }
28169
28160
  }
28170
28161
  previousApprovalModeRef.current = newApprovalMode;
28171
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28162
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28172
28163
  let awaitingApprovalCalls = toolCalls.filter(
28173
28164
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28174
28165
  );
28175
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28166
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28176
28167
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28177
28168
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28178
28169
  return true;
@@ -28188,11 +28179,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28188
28179
  if (call.correlationId) {
28189
28180
  try {
28190
28181
  await config.getMessageBus().publish({
28191
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28182
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28192
28183
  correlationId: call.correlationId,
28193
28184
  confirmed: true,
28194
28185
  requiresUserConfirmation: false,
28195
- outcome: ToolConfirmationOutcome.ProceedOnce
28186
+ outcome: "proceed_once" /* ProceedOnce */
28196
28187
  });
28197
28188
  } catch (error) {
28198
28189
  debugLogger.warn(
@@ -28261,14 +28252,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28261
28252
  );
28262
28253
  if (isLowErrorVerbosity) {
28263
28254
  suppressedToolErrorCountRef.current += geminiTools.filter(
28264
- (tc) => tc.status === CoreToolCallStatus.Error
28255
+ (tc) => tc.status === "error" /* Error */
28265
28256
  ).length;
28266
28257
  }
28267
28258
  if (geminiTools.length === 0) {
28268
28259
  return;
28269
28260
  }
28270
28261
  const stopExecutionTool = geminiTools.find(
28271
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28262
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28272
28263
  );
28273
28264
  if (stopExecutionTool && stopExecutionTool.response.error) {
28274
28265
  maybeAddSuppressedToolErrorNote();
@@ -28288,9 +28279,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28288
28279
  (tc) => !isTopicTool2(tc.request.name)
28289
28280
  );
28290
28281
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28291
- (tc) => tc.status === CoreToolCallStatus.Cancelled
28282
+ (tc) => tc.status === "cancelled" /* Cancelled */
28292
28283
  );
28293
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28284
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28294
28285
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28295
28286
  if (!turnCancelledRef.current) {
28296
28287
  addItem({
@@ -28370,7 +28361,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28370
28361
  return;
28371
28362
  }
28372
28363
  const restorableToolCalls = toolCalls.filter(
28373
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28364
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28374
28365
  );
28375
28366
  if (restorableToolCalls.length > 0) {
28376
28367
  if (!gitService) {
@@ -28593,14 +28584,14 @@ var useAgentStream = ({
28593
28584
  const displayName = legacyState?.displayName ?? event.name;
28594
28585
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28595
28586
  const desc = legacyState?.description ?? "";
28596
- const fallbackKind = Kind.Other;
28587
+ const fallbackKind = "other" /* Other */;
28597
28588
  const newCall = {
28598
28589
  callId: event.requestId,
28599
28590
  name: displayName,
28600
28591
  originalRequestName: event.name,
28601
28592
  description: desc,
28602
28593
  display: event.display,
28603
- status: CoreToolCallStatus.Scheduled,
28594
+ status: "scheduled" /* Scheduled */,
28604
28595
  isClientInitiated: false,
28605
28596
  renderOutputAsMarkdown: isOutputMarkdown,
28606
28597
  kind: legacyState?.kind ?? fallbackKind,
@@ -28618,10 +28609,10 @@ var useAgentStream = ({
28618
28609
  const evtStatus = legacyState?.status;
28619
28610
  let status = tc.status;
28620
28611
  if (evtStatus === "executing")
28621
- status = CoreToolCallStatus.Executing;
28622
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28612
+ status = "executing" /* Executing */;
28613
+ else if (evtStatus === "error") status = "error" /* Error */;
28623
28614
  else if (evtStatus === "success")
28624
- status = CoreToolCallStatus.Success;
28615
+ status = "success" /* Success */;
28625
28616
  const display = event.display?.result;
28626
28617
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28627
28618
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28654,7 +28645,7 @@ var useAgentStream = ({
28654
28645
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28655
28646
  return {
28656
28647
  ...tc,
28657
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28648
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28658
28649
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28659
28650
  resultDisplay,
28660
28651
  outputFile
@@ -28720,7 +28711,7 @@ var useAgentStream = ({
28720
28711
  if (!options?.isContinuation) {
28721
28712
  if (typeof query === "string") {
28722
28713
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28723
- void logger?.logMessage(MessageSenderType.USER, query);
28714
+ void logger?.logMessage("user" /* USER */, query);
28724
28715
  }
28725
28716
  startNewPrompt();
28726
28717
  }
@@ -30247,9 +30238,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30247
30238
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30248
30239
  async (choice) => {
30249
30240
  const trustLevelMap = {
30250
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30251
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30252
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30241
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30242
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30243
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30253
30244
  };
30254
30245
  const trustLevel = trustLevelMap[choice];
30255
30246
  if (!trustLevel) return;
@@ -30268,7 +30259,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30268
30259
  }, 100);
30269
30260
  return;
30270
30261
  }
30271
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30262
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30272
30263
  onTrustChange(currentIsTrusted);
30273
30264
  setIsTrusted(currentIsTrusted);
30274
30265
  const wasTrusted = isTrusted ?? false;
@@ -31276,7 +31267,7 @@ function useMessageQueue({
31276
31267
  var import_react107 = __toESM(require_react(), 1);
31277
31268
  function useMcpStatus(config) {
31278
31269
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31279
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31270
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31280
31271
  );
31281
31272
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31282
31273
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31289,12 +31280,12 @@ function useMcpStatus(config) {
31289
31280
  setMcpServerCount(manager.getMcpServerCount());
31290
31281
  }
31291
31282
  };
31292
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31283
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31293
31284
  return () => {
31294
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31285
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31295
31286
  };
31296
31287
  }, [config]);
31297
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31288
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31298
31289
  return {
31299
31290
  discoveryState,
31300
31291
  mcpServerCount,
@@ -31321,7 +31312,7 @@ function useApprovalModeIndicator({
31321
31312
  (key) => {
31322
31313
  let nextApprovalMode;
31323
31314
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31324
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31315
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31325
31316
  if (addItem) {
31326
31317
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31327
31318
  const adminSettings = config.getRemoteAdminSettings();
@@ -31339,21 +31330,21 @@ function useApprovalModeIndicator({
31339
31330
  }
31340
31331
  return;
31341
31332
  }
31342
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31333
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31343
31334
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31344
31335
  const currentMode = config.getApprovalMode();
31345
31336
  switch (currentMode) {
31346
- case ApprovalMode.DEFAULT:
31347
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31337
+ case "default" /* DEFAULT */:
31338
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31348
31339
  break;
31349
- case ApprovalMode.AUTO_EDIT:
31350
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31340
+ case "autoEdit" /* AUTO_EDIT */:
31341
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31351
31342
  break;
31352
- case ApprovalMode.PLAN:
31353
- nextApprovalMode = ApprovalMode.DEFAULT;
31343
+ case "plan" /* PLAN */:
31344
+ nextApprovalMode = "default" /* DEFAULT */;
31354
31345
  break;
31355
- case ApprovalMode.YOLO:
31356
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31346
+ case "yolo" /* YOLO */:
31347
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31357
31348
  break;
31358
31349
  default:
31359
31350
  }
@@ -31763,11 +31754,11 @@ var useHookDisplayState = () => {
31763
31754
  removeHook();
31764
31755
  }
31765
31756
  };
31766
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
31767
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31757
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31758
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31768
31759
  return () => {
31769
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
31770
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31760
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31761
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31771
31762
  activeTimeouts.forEach(clearTimeout);
31772
31763
  activeTimeouts.clear();
31773
31764
  };
@@ -32606,7 +32597,7 @@ var AppContainer = (props) => {
32606
32597
  setConfigInitialized(true);
32607
32598
  startupProfiler.flush(config);
32608
32599
  startAutoMemoryIfEnabled(config);
32609
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32600
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32610
32601
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32611
32602
  if (result) {
32612
32603
  const additionalContext = result.getAdditionalContext();
@@ -32633,7 +32624,7 @@ var AppContainer = (props) => {
32633
32624
  );
32634
32625
  const ideClient = await IdeClient.getInstance();
32635
32626
  await ideClient.disconnect();
32636
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32627
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32637
32628
  };
32638
32629
  registerCleanup(cleanupFn);
32639
32630
  return () => {
@@ -32658,11 +32649,11 @@ var AppContainer = (props) => {
32658
32649
  resetTime: payload.resetTime
32659
32650
  });
32660
32651
  };
32661
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32662
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32652
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32653
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32663
32654
  return () => {
32664
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32665
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32655
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32656
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32666
32657
  };
32667
32658
  }, [config]);
32668
32659
  (0, import_react121.useEffect)(() => {
@@ -32675,16 +32666,16 @@ var AppContainer = (props) => {
32675
32666
  const handleAgentsDiscovered = (payload) => {
32676
32667
  setNewAgents(payload.agents);
32677
32668
  };
32678
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32679
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32680
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32669
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32670
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32671
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32681
32672
  return () => {
32682
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32673
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32683
32674
  coreEvents.off(
32684
- CoreEvent.AdminSettingsChanged,
32675
+ "admin-settings-changed" /* AdminSettingsChanged */,
32685
32676
  handleAdminSettingsChanged
32686
32677
  );
32687
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32678
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32688
32679
  };
32689
32680
  }, [settings]);
32690
32681
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32749,11 +32740,11 @@ var AppContainer = (props) => {
32749
32740
  exitEditorDialog
32750
32741
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32751
32742
  (0, import_react121.useEffect)(() => {
32752
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32753
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32743
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32744
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32754
32745
  return () => {
32755
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32756
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32746
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32747
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32757
32748
  };
32758
32749
  }, [handleEditorClose, openEditorDialog]);
32759
32750
  (0, import_react121.useEffect)(() => {
@@ -32821,7 +32812,7 @@ var AppContainer = (props) => {
32821
32812
  errorVerbosity: settings.merged.ui.errorVerbosity
32822
32813
  });
32823
32814
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32824
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32815
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32825
32816
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32826
32817
  const { loadHistoryForResume, isResuming } = useSessionResume({
32827
32818
  config,
@@ -32849,7 +32840,7 @@ var AppContainer = (props) => {
32849
32840
  async (authType, scope) => {
32850
32841
  if (authType) {
32851
32842
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32852
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32843
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32853
32844
  setAuthContext({ requiresRestart: true });
32854
32845
  } else {
32855
32846
  setAuthContext({});
@@ -32877,7 +32868,7 @@ var AppContainer = (props) => {
32877
32868
  );
32878
32869
  return;
32879
32870
  }
32880
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32871
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32881
32872
  writeToStdout(`
32882
32873
  ----------------------------------------------------------------
32883
32874
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32900,7 +32891,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32900
32891
  }
32901
32892
  await saveApiKey(apiKey);
32902
32893
  await reloadApiKey();
32903
- await config.refreshAuth(AuthType.USE_GEMINI);
32894
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32904
32895
  setAuthState("authenticated" /* Authenticated */);
32905
32896
  } catch (e) {
32906
32897
  onAuthError(
@@ -32925,7 +32916,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32925
32916
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32926
32917
  );
32927
32918
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32928
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32919
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32929
32920
  return;
32930
32921
  }
32931
32922
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33061,9 +33052,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33061
33052
  }
33062
33053
  });
33063
33054
  };
33064
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33055
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33065
33056
  return () => {
33066
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33057
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33067
33058
  };
33068
33059
  }, []);
33069
33060
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33721,7 +33712,7 @@ ${queuedText}` : queuedText;
33721
33712
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33722
33713
  if (settings.merged.general.devtools) {
33723
33714
  void (async () => {
33724
- const { toggleDevToolsPanel } = await import("./devtoolsService-SGV7MSUA.js");
33715
+ const { toggleDevToolsPanel } = await import("./devtoolsService-GLW7S6PS.js");
33725
33716
  await toggleDevToolsPanel(
33726
33717
  config,
33727
33718
  showErrorDetails,
@@ -33939,17 +33930,17 @@ ${queuedText}` : queuedText;
33939
33930
  Date.now()
33940
33931
  );
33941
33932
  };
33942
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33943
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33933
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33934
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33944
33935
  coreEvents.drainBacklogs();
33945
33936
  return () => {
33946
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33947
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33937
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33938
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33948
33939
  };
33949
33940
  }, [historyManager]);
33950
33941
  const nightly = props.version.includes("nightly");
33951
33942
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
33952
- 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;
33943
+ 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;
33953
33944
  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;
33954
33945
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
33955
33946
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34049,9 +34040,9 @@ ${queuedText}` : queuedText;
34049
34040
  const handleMemoryChanged = (result) => {
34050
34041
  setGeminiMdFileCount(result.fileCount);
34051
34042
  };
34052
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34043
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34053
34044
  return () => {
34054
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34045
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34055
34046
  };
34056
34047
  }, []);
34057
34048
  (0, import_react121.useEffect)(() => {