@google/gemini-cli 0.46.0-preview.3 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/bundle/{chunk-AJKD63PC.js → chunk-46UNR4SE.js} +1 -1
  2. package/bundle/{chunk-5ND76TYS.js → chunk-6ZHP2EJW.js} +4 -4
  3. package/bundle/{chunk-VON23XS2.js → chunk-7EBO46BD.js} +2 -2
  4. package/bundle/{chunk-2XKNPALS.js → chunk-BM5TFZWV.js} +1 -1
  5. package/bundle/{chunk-ZW2TA44S.js → chunk-CSKXYL76.js} +2 -2
  6. package/bundle/{chunk-IPSGP4HZ.js → chunk-EMVR5JTF.js} +8 -9
  7. package/bundle/{chunk-S5GUYIK7.js → chunk-FC67CGD5.js} +1 -1
  8. package/bundle/{chunk-KK5RNP2O.js → chunk-G33JEOEV.js} +14077 -7533
  9. package/bundle/{chunk-TIFKXOWZ.js → chunk-GPDO3T5B.js} +3 -3
  10. package/bundle/{chunk-CIWJFNFL.js → chunk-I4F637TN.js} +1 -1
  11. package/bundle/{chunk-LFPQWI47.js → chunk-IZGZZO6A.js} +1 -1
  12. package/bundle/{chunk-DVLOSJL6.js → chunk-IZZGJPR3.js} +1 -1
  13. package/bundle/{chunk-AYF4WWI6.js → chunk-JOFGDFVN.js} +3 -3
  14. package/bundle/{chunk-FHPHAHTC.js → chunk-MKQJU6N7.js} +1 -1
  15. package/bundle/{chunk-MKTEB4X2.js → chunk-O3ZM34A3.js} +1 -1
  16. package/bundle/{chunk-6WDE67I7.js → chunk-RCJSF5RP.js} +4 -4
  17. package/bundle/{chunk-V5CL3DRL.js → chunk-S5WKKTEF.js} +3 -3
  18. package/bundle/{chunk-PWEKIO66.js → chunk-SCXTH56Q.js} +7 -7
  19. package/bundle/{chunk-PBKO4RQZ.js → chunk-T55FPMGN.js} +54 -67
  20. package/bundle/{chunk-KOY6HFDJ.js → chunk-V2OCZBTI.js} +5 -8
  21. package/bundle/{chunk-W7QA7FT5.js → chunk-VFPQ45DS.js} +2 -2
  22. package/bundle/{chunk-2GESUVEI.js → chunk-XWSJWBAL.js} +7 -7
  23. package/bundle/{chunk-CQ5T2OOT.js → chunk-YIJWUMMP.js} +1 -1
  24. package/bundle/{chunk-7GTQ3TVY.js → chunk-YIKH5LDT.js} +1 -1
  25. package/bundle/{cleanup-3MDHF3OO.js → cleanup-HCSVNXSL.js} +2 -2
  26. package/bundle/{cleanup-ACXEXWY2.js → cleanup-KA5YYXS3.js} +2 -2
  27. package/bundle/{cleanup-EAOW4OCO.js → cleanup-SBGWM3G7.js} +2 -2
  28. package/bundle/{core-HYJM5T45.js → core-K77SYAQL.js} +1 -1
  29. package/bundle/{dist-EMBSC4SS.js → core-LVRAYGT3.js} +1 -1
  30. package/bundle/{devtoolsService-6OVP6DUO.js → devtoolsService-ADGLR4UM.js} +2 -2
  31. package/bundle/{devtoolsService-OVSOSM56.js → devtoolsService-ORERBA72.js} +3 -4
  32. package/bundle/{devtoolsService-5ME5JZIQ.js → devtoolsService-WRHZUKOW.js} +2 -2
  33. package/bundle/{dist-SHJ4FBPT.js → dist-6R4J6OFH.js} +1 -1
  34. package/bundle/{gemini-23GFJRSL.js → gemini-LOO67E54.js} +196 -212
  35. package/bundle/{gemini-XWN3KUEH.js → gemini-STIONCRJ.js} +14 -14
  36. package/bundle/{gemini-4SDDBM2K.js → gemini-YXO2QQ66.js} +14 -14
  37. package/bundle/gemini.js +7 -7
  38. package/bundle/{interactiveCli-P65NECXR.js → interactiveCli-F337IDVS.js} +8 -8
  39. package/bundle/{interactiveCli-R6XRMC4D.js → interactiveCli-NKTBHB7O.js} +8 -8
  40. package/bundle/{interactiveCli-ZHRXRBPP.js → interactiveCli-OYDA765S.js} +295 -314
  41. package/bundle/{liteRtServerManager-6YTWQFQF.js → liteRtServerManager-6CQ3NBHQ.js} +4 -4
  42. package/bundle/{liteRtServerManager-D6LNW6CQ.js → liteRtServerManager-N7CBKKD6.js} +4 -4
  43. package/bundle/{liteRtServerManager-DV2CLRPW.js → liteRtServerManager-YBJANX3B.js} +4 -4
  44. package/bundle/{oauth2-provider-C3WLQHTS.js → oauth2-provider-AAJFAFW6.js} +1 -1
  45. package/bundle/{oauth2-provider-BTNIRWZ2.js → oauth2-provider-CYIU4X4W.js} +1 -1
  46. package/bundle/{oauth2-provider-KWAZCQ6F.js → oauth2-provider-YNWUFCNW.js} +72 -38
  47. package/bundle/{start-2YDK2M2Y.js → start-CNBBYSNI.js} +6 -6
  48. package/bundle/{start-DKFGI2SP.js → start-DEWQ46DT.js} +6 -6
  49. package/bundle/{start-KPTJV4UZ.js → start-H7TCWGQL.js} +6 -6
  50. package/package.json +1 -1
  51. package/bundle/chunk-3PLUHPJV.js +0 -81736
  52. package/bundle/chunk-KBVSP7UV.js +0 -398
  53. package/bundle/chunk-QC2XF7WU.js +0 -154
  54. package/bundle/chunk-SWSOO6PG.js +0 -512
  55. package/bundle/chunk-VFBOEQYZ.js +0 -118
  56. package/bundle/chunk-XB2Y55JE.js +0 -17320
  57. package/bundle/chunk-XMZW4ETE.js +0 -394601
  58. package/bundle/chunk-YQE3FF4G.js +0 -1571
  59. package/bundle/cleanup-YRHQYKEA.js +0 -32
  60. package/bundle/devtoolsService-I4R5WQXY.js +0 -856
  61. package/bundle/dist-XMOYSFBW.js +0 -2142
  62. package/bundle/gemini-VIZXE6FK.js +0 -16409
  63. package/bundle/interactiveCli-ZLTD7RPN.js +0 -34752
  64. package/bundle/liteRtServerManager-HNNHQ2GQ.js +0 -65
  65. package/bundle/oauth2-provider-Y4NUSLR7.js +0 -235
  66. package/bundle/start-W2EDCOPO.js +0 -18
@@ -156,13 +156,13 @@ import {
156
156
  widestLineFromStyledChars,
157
157
  wordBreakStyledChars,
158
158
  wrapStyledChars
159
- } from "./chunk-PBKO4RQZ.js";
159
+ } from "./chunk-T55FPMGN.js";
160
160
  import {
161
161
  appEvents
162
162
  } from "./chunk-5PS3AYFU.js";
163
163
  import {
164
164
  require_source
165
- } from "./chunk-MKTEB4X2.js";
165
+ } from "./chunk-I4F637TN.js";
166
166
  import {
167
167
  ACTIVE_SHELL_MAX_LINES,
168
168
  COMPACT_TOOL_SUBVIEW_MAX_LINES,
@@ -212,37 +212,33 @@ import {
212
212
  stringWidth,
213
213
  stripUnsafeCharacters,
214
214
  toCodePoints
215
- } from "./chunk-KOY6HFDJ.js";
215
+ } from "./chunk-MKQJU6N7.js";
216
216
  import {
217
217
  handleAutoUpdate,
218
218
  isDevelopment,
219
219
  relaunchApp,
220
220
  setUpdateHandler
221
- } from "./chunk-ZW2TA44S.js";
221
+ } from "./chunk-VFPQ45DS.js";
222
222
  import {
223
223
  isTodoList,
224
224
  mapCoreStatusToDisplayStatus,
225
225
  require_react
226
- } from "./chunk-CQ5T2OOT.js";
226
+ } from "./chunk-EMVR5JTF.js";
227
227
  import {
228
228
  registerCleanup,
229
229
  removeCleanup,
230
230
  runExitCleanup,
231
231
  setupTtyCheck
232
- } from "./chunk-LFPQWI47.js";
232
+ } from "./chunk-IZGZZO6A.js";
233
233
  import {
234
234
  ACTIVATE_SKILL_TOOL_NAME,
235
235
  AGENT_TOOL_NAME,
236
236
  ApiKeyUpdatedEvent,
237
- ApprovalMode,
238
237
  AsyncFzf,
239
238
  AudioRecorder,
240
239
  AuthType,
241
240
  ChangeAuthRequestedError,
242
- CompressionStatus,
243
241
  ConversationFinishedEvent,
244
- CoreEvent,
245
- CoreToolCallStatus,
246
242
  CreditPurchaseClickEvent,
247
243
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
248
244
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -264,19 +260,12 @@ import {
264
260
  GEMMA_4_31B_IT_MODEL,
265
261
  GLOB_DISPLAY_NAME,
266
262
  GREP_DISPLAY_NAME,
267
- GeminiCliOperation,
268
- GeminiEventType,
269
263
  GitService,
270
264
  IdeClient,
271
- Kind,
272
265
  LS_DISPLAY_NAME,
273
266
  LegacyAgentProtocol,
274
267
  LlmRole,
275
268
  Logger,
276
- MCPDiscoveryState,
277
- MCPServerStatus,
278
- MessageBusType,
279
- MessageSenderType,
280
269
  ModelNotFoundError,
281
270
  ModelSlashCommandEvent,
282
271
  OverageMenuShownEvent,
@@ -288,27 +277,20 @@ import {
288
277
  PREVIEW_GEMINI_MODEL,
289
278
  PolicyIntegrityManager,
290
279
  ProjectIdRequiredError,
291
- QuestionType,
292
280
  READ_FILE_DISPLAY_NAME,
293
281
  READ_MANY_FILES_DISPLAY_NAME,
294
282
  RELEASE_CHANNEL_STABILITY,
295
283
  ROOT_SCHEDULER_ID,
296
284
  SHELL_TOOL_NAME,
297
285
  Scheduler,
298
- SessionEndReason,
299
- SessionStartSource,
300
286
  ShellExecutionService,
301
287
  SlashCommandStatus,
302
288
  Storage,
303
- SubagentState,
304
289
  TOPIC_PARAM_STRATEGIC_INTENT,
305
290
  TOPIC_PARAM_SUMMARY,
306
291
  TOPIC_PARAM_TITLE,
307
292
  TerminalQuotaError,
308
- ToolConfirmationOutcome,
309
- ToolErrorType,
310
293
  TranscriptionFactory,
311
- TrustLevel,
312
294
  UPDATE_TOPIC_DISPLAY_NAME,
313
295
  UPDATE_TOPIC_TOOL_NAME,
314
296
  UnauthorizedError,
@@ -320,7 +302,6 @@ import {
320
302
  WEB_FETCH_DISPLAY_NAME,
321
303
  WEB_SEARCH_DISPLAY_NAME,
322
304
  WRITE_FILE_DISPLAY_NAME,
323
- WarningPriority,
324
305
  WhisperModelManager,
325
306
  addMCPStatusChangeListener,
326
307
  allowEditorTypeInSandbox,
@@ -430,7 +411,7 @@ import {
430
411
  validatePlanContent,
431
412
  validatePlanPath,
432
413
  writeToStdout
433
- } from "./chunk-KK5RNP2O.js";
414
+ } from "./chunk-G33JEOEV.js";
434
415
  import "./chunk-6HI7VNOG.js";
435
416
  import "./chunk-TUDYL3X4.js";
436
417
  import "./chunk-IUUIT4SU.js";
@@ -5056,7 +5037,7 @@ function calculateShellMaxLines(options) {
5056
5037
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5057
5038
  return maxLinesBasedOnHeight;
5058
5039
  }
5059
- const isExecuting = status === CoreToolCallStatus.Executing;
5040
+ const isExecuting = status === "executing" /* Executing */;
5060
5041
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5061
5042
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5062
5043
  }
@@ -5090,10 +5071,10 @@ function isShellTool(name) {
5090
5071
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
5091
5072
  }
5092
5073
  function isThisShellFocusable(name, status, config) {
5093
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5074
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5094
5075
  }
5095
5076
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5096
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5077
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5097
5078
  }
5098
5079
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5099
5080
  const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
@@ -5253,13 +5234,13 @@ var formatToolArgs = (args) => {
5253
5234
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5254
5235
  let headerText;
5255
5236
  let headerColor = theme.text.secondary;
5256
- if (progress.state === SubagentState.CANCELLED) {
5237
+ if (progress.state === "cancelled" /* CANCELLED */) {
5257
5238
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5258
5239
  headerColor = theme.status.warning;
5259
- } else if (progress.state === SubagentState.ERROR) {
5240
+ } else if (progress.state === "error" /* ERROR */) {
5260
5241
  headerText = `Subagent ${progress.agentName} failed.`;
5261
5242
  headerColor = theme.status.error;
5262
- } else if (progress.state === SubagentState.COMPLETED) {
5243
+ } else if (progress.state === "completed" /* COMPLETED */) {
5263
5244
  headerText = `Subagent ${progress.agentName} completed.`;
5264
5245
  headerColor = theme.status.success;
5265
5246
  } else {
@@ -5279,7 +5260,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5279
5260
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
5280
5261
  ] }, item.id);
5281
5262
  } else if (item.type === "tool_call") {
5282
- 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 });
5263
+ 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 });
5283
5264
  const formattedArgs = item.description || formatToolArgs(item.args);
5284
5265
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5285
5266
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5290,7 +5271,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5290
5271
  {
5291
5272
  bold: true,
5292
5273
  color: theme.text.primary,
5293
- strikethrough: item.status === SubagentState.CANCELLED,
5274
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5294
5275
  children: item.displayName || item.content
5295
5276
  }
5296
5277
  ),
@@ -5299,7 +5280,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5299
5280
  {
5300
5281
  color: theme.text.secondary,
5301
5282
  wrap: "truncate",
5302
- strikethrough: item.status === SubagentState.CANCELLED,
5283
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5303
5284
  children: displayArgs
5304
5285
  }
5305
5286
  ) })
@@ -5319,7 +5300,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5319
5300
  MarkdownDisplay,
5320
5301
  {
5321
5302
  text: safeJsonToMarkdown(progress.result),
5322
- isPending: progress.state !== SubagentState.COMPLETED,
5303
+ isPending: progress.state !== "completed" /* COMPLETED */,
5323
5304
  terminalWidth
5324
5305
  }
5325
5306
  )
@@ -5673,14 +5654,14 @@ var ToolActionsProvider = (props) => {
5673
5654
  }
5674
5655
  const details = tool.confirmationDetails;
5675
5656
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5676
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5657
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5677
5658
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5678
5659
  }
5679
5660
  if (tool.correlationId) {
5680
5661
  await config.getMessageBus().publish({
5681
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5662
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5682
5663
  correlationId: tool.correlationId,
5683
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5664
+ confirmed: outcome !== "cancel" /* Cancel */,
5684
5665
  requiresUserConfirmation: false,
5685
5666
  outcome,
5686
5667
  payload
@@ -5699,7 +5680,7 @@ var ToolActionsProvider = (props) => {
5699
5680
  );
5700
5681
  const cancel = (0, import_react12.useCallback)(
5701
5682
  async (callId) => {
5702
- await confirm(callId, ToolConfirmationOutcome.Cancel);
5683
+ await confirm(callId, "cancel" /* Cancel */);
5703
5684
  },
5704
5685
  [confirm]
5705
5686
  );
@@ -5818,7 +5799,7 @@ var ToolMessage = ({
5818
5799
  paddingX: 1,
5819
5800
  flexDirection: "column",
5820
5801
  children: [
5821
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5802
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5822
5803
  McpProgressIndicator,
5823
5804
  {
5824
5805
  progress,
@@ -5835,8 +5816,8 @@ var ToolMessage = ({
5835
5816
  terminalWidth,
5836
5817
  renderOutputAsMarkdown,
5837
5818
  hasFocus: isThisShellFocused2,
5838
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5839
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5819
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5820
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5840
5821
  }
5841
5822
  ),
5842
5823
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -6152,7 +6133,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6152
6133
  settings.merged,
6153
6134
  process3.cwd()
6154
6135
  );
6155
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6136
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6156
6137
  return {
6157
6138
  currentTrustLevel: explicitTrustLevel,
6158
6139
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6197,7 +6178,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6197
6178
  process3.cwd(),
6198
6179
  newConfig
6199
6180
  );
6200
- if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6181
+ if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6201
6182
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6202
6183
  if (source === "file") {
6203
6184
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6271,18 +6252,18 @@ function PermissionsModifyTrustDialog({
6271
6252
  const TRUST_LEVEL_ITEMS = [
6272
6253
  {
6273
6254
  label: `Trust this folder (${dirName})`,
6274
- value: TrustLevel.TRUST_FOLDER,
6275
- key: TrustLevel.TRUST_FOLDER
6255
+ value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6256
+ key: "TRUST_FOLDER" /* TRUST_FOLDER */
6276
6257
  },
6277
6258
  {
6278
6259
  label: `Trust parent folder (${parentFolder})`,
6279
- value: TrustLevel.TRUST_PARENT,
6280
- key: TrustLevel.TRUST_PARENT
6260
+ value: "TRUST_PARENT" /* TRUST_PARENT */,
6261
+ key: "TRUST_PARENT" /* TRUST_PARENT */
6281
6262
  },
6282
6263
  {
6283
6264
  label: "Don't trust",
6284
- value: TrustLevel.DO_NOT_TRUST,
6285
- key: TrustLevel.DO_NOT_TRUST
6265
+ value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6266
+ key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6286
6267
  }
6287
6268
  ];
6288
6269
  const {
@@ -6522,7 +6503,7 @@ var ShellToolMessage = ({
6522
6503
  maxLinesLimit: maxLines
6523
6504
  });
6524
6505
  import_react17.default.useEffect(() => {
6525
- const isExecuting = status === CoreToolCallStatus.Executing;
6506
+ const isExecuting = status === "executing" /* Executing */;
6526
6507
  if (isExecuting && ptyId) {
6527
6508
  try {
6528
6509
  const childWidth = terminalWidth - 4;
@@ -6735,13 +6716,13 @@ var SubagentGroupDisplay = ({
6735
6716
  const singleAgent = toolCalls[0].resultDisplay;
6736
6717
  if (isSubagentProgress(singleAgent)) {
6737
6718
  switch (singleAgent.state) {
6738
- case SubagentState.COMPLETED:
6719
+ case "completed" /* COMPLETED */:
6739
6720
  headerText = "Agent Completed";
6740
6721
  break;
6741
- case SubagentState.CANCELLED:
6722
+ case "cancelled" /* CANCELLED */:
6742
6723
  headerText = "Agent Cancelled";
6743
6724
  break;
6744
- case SubagentState.ERROR:
6725
+ case "error" /* ERROR */:
6745
6726
  headerText = "Agent Error";
6746
6727
  break;
6747
6728
  default:
@@ -6757,8 +6738,8 @@ var SubagentGroupDisplay = ({
6757
6738
  for (const tc of toolCalls) {
6758
6739
  const progress = tc.resultDisplay;
6759
6740
  if (isSubagentProgress(progress)) {
6760
- if (progress.state === SubagentState.COMPLETED) completedCount++;
6761
- else if (progress.state === SubagentState.RUNNING) runningCount++;
6741
+ if (progress.state === "completed" /* COMPLETED */) completedCount++;
6742
+ else if (progress.state === "running" /* RUNNING */) runningCount++;
6762
6743
  } else {
6763
6744
  runningCount++;
6764
6745
  }
@@ -6837,7 +6818,7 @@ var SubagentGroupDisplay = ({
6837
6818
  if (!isExpanded) {
6838
6819
  let content = "Starting...";
6839
6820
  let formattedArgs;
6840
- if (progress.state === SubagentState.COMPLETED) {
6821
+ if (progress.state === "completed" /* COMPLETED */) {
6841
6822
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6842
6823
  content = `Finished Early (${progress.terminateReason})`;
6843
6824
  } else {
@@ -6851,17 +6832,17 @@ var SubagentGroupDisplay = ({
6851
6832
  formattedArgs = formatToolArgs(lastActivity.args);
6852
6833
  }
6853
6834
  }
6854
- const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6835
+ const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6855
6836
  const renderStatusIcon = () => {
6856
- const state = progress.state ?? SubagentState.RUNNING;
6837
+ const state = progress.state ?? "running" /* RUNNING */;
6857
6838
  switch (state) {
6858
- case SubagentState.RUNNING:
6839
+ case "running" /* RUNNING */:
6859
6840
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
6860
- case SubagentState.COMPLETED:
6841
+ case "completed" /* COMPLETED */:
6861
6842
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6862
- case SubagentState.CANCELLED:
6843
+ case "cancelled" /* CANCELLED */:
6863
6844
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6864
- case SubagentState.ERROR:
6845
+ case "error" /* ERROR */:
6865
6846
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6866
6847
  default:
6867
6848
  return checkExhaustive(state);
@@ -6914,22 +6895,22 @@ var hasPayload = (res) => {
6914
6895
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6915
6896
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6916
6897
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6917
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6898
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6918
6899
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6919
6900
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6920
6901
  const showDiffStat = !!diff.diffStat;
6921
6902
  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 }) });
6922
6903
  let resultSummary = "";
6923
6904
  let resultColor = theme.text.secondary;
6924
- if (status === CoreToolCallStatus.AwaitingApproval) {
6905
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
6925
6906
  resultSummary = "Confirming";
6926
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6907
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6927
6908
  resultSummary = "Accepted";
6928
6909
  resultColor = theme.text.accent;
6929
- } else if (status === CoreToolCallStatus.Cancelled) {
6910
+ } else if (status === "cancelled" /* Cancelled */) {
6930
6911
  resultSummary = "Rejected";
6931
6912
  resultColor = theme.status.error;
6932
- } else if (status === CoreToolCallStatus.Error) {
6913
+ } else if (status === "error" /* Error */) {
6933
6914
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6934
6915
  resultColor = theme.status.error;
6935
6916
  }
@@ -6960,7 +6941,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6960
6941
  filename: diff.fileName,
6961
6942
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
6962
6943
  availableTerminalHeight,
6963
- disableColor: status === CoreToolCallStatus.Cancelled
6944
+ disableColor: status === "cancelled" /* Cancelled */
6964
6945
  }
6965
6946
  );
6966
6947
  return { description, summary, payload };
@@ -7088,10 +7069,10 @@ var DenseToolMessage = (props) => {
7088
7069
  if (isGrepResult(resultDisplay)) {
7089
7070
  return getGenericSuccessData(resultDisplay, originalDescription);
7090
7071
  }
7091
- if (status === CoreToolCallStatus.Success && resultDisplay) {
7072
+ if (status === "success" /* Success */ && resultDisplay) {
7092
7073
  return getGenericSuccessData(resultDisplay, originalDescription);
7093
7074
  }
7094
- if (status === CoreToolCallStatus.Error) {
7075
+ if (status === "error" /* Error */) {
7095
7076
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7096
7077
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7097
7078
  "\u2192 ",
@@ -7132,7 +7113,7 @@ var DenseToolMessage = (props) => {
7132
7113
  language: fileExtension,
7133
7114
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7134
7115
  settings,
7135
- disableColor: status === CoreToolCallStatus.Cancelled,
7116
+ disableColor: status === "cancelled" /* Cancelled */,
7136
7117
  returnLines: true
7137
7118
  });
7138
7119
  } else {
@@ -7140,7 +7121,7 @@ var DenseToolMessage = (props) => {
7140
7121
  parsedLines,
7141
7122
  filename: diff.fileName,
7142
7123
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7143
- disableColor: status === CoreToolCallStatus.Cancelled
7124
+ disableColor: status === "cancelled" /* Cancelled */
7144
7125
  });
7145
7126
  }
7146
7127
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7270,7 +7251,7 @@ function isToolExecuting(pendingHistoryItems) {
7270
7251
  return pendingHistoryItems.some((item) => {
7271
7252
  if (item && item.type === "tool_group") {
7272
7253
  return item.tools.some(
7273
- (tool) => CoreToolCallStatus.Executing === tool.status
7254
+ (tool) => "executing" /* Executing */ === tool.status
7274
7255
  );
7275
7256
  }
7276
7257
  return false;
@@ -7279,7 +7260,7 @@ function isToolExecuting(pendingHistoryItems) {
7279
7260
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7280
7261
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7281
7262
  (item) => item.tools.some(
7282
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7263
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7283
7264
  )
7284
7265
  );
7285
7266
  }
@@ -7302,14 +7283,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
7302
7283
  if (isTrackedToolCall(t)) {
7303
7284
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
7304
7285
  } else {
7305
- return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7286
+ return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
7306
7287
  }
7307
7288
  });
7308
7289
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
7309
7290
  if (isTrackedToolCall(t)) {
7310
7291
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
7311
7292
  } else {
7312
- return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7293
+ return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7313
7294
  }
7314
7295
  });
7315
7296
  const isShellCommand = toolsToInspect.some((t) => {
@@ -7408,7 +7389,7 @@ var ToolGroupMessage = ({
7408
7389
  const groupedTools = (0, import_react21.useMemo)(() => {
7409
7390
  const groups = [];
7410
7391
  for (const tool of visibleToolCalls) {
7411
- if (tool.kind === Kind.Agent) {
7392
+ if (tool.kind === "agent" /* Agent */) {
7412
7393
  const lastGroup = groups[groups.length - 1];
7413
7394
  if (Array.isArray(lastGroup)) {
7414
7395
  lastGroup.push(tool);
@@ -7463,7 +7444,7 @@ var ToolGroupMessage = ({
7463
7444
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7464
7445
  let countToolCallsWithResults = 0;
7465
7446
  for (const tool of visibleToolCalls) {
7466
- if (tool.kind !== Kind.Agent) {
7447
+ if (tool.kind !== "agent" /* Agent */) {
7467
7448
  if (isCompactTool(tool, isCompactModeEnabled)) {
7468
7449
  if (hasDensePayload(tool)) {
7469
7450
  countToolCallsWithResults++;
@@ -7637,7 +7618,7 @@ var ToolGroupDisplay = ({
7637
7618
  }
7638
7619
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7639
7620
  const visibleTools = tools.filter(
7640
- (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7621
+ (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7641
7622
  );
7642
7623
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7643
7624
  const otherTools = visibleTools.filter(
@@ -7839,18 +7820,18 @@ function CompressionMessage({
7839
7820
  return "Compressing chat history";
7840
7821
  }
7841
7822
  switch (compressionStatus) {
7842
- case CompressionStatus.COMPRESSED:
7823
+ case 1 /* COMPRESSED */:
7843
7824
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7844
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7825
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7845
7826
  if (originalTokens < 5e4) {
7846
7827
  return "Compression was not beneficial for this history size.";
7847
7828
  }
7848
7829
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7849
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7830
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7850
7831
  return "Could not compress chat history due to a token counting error.";
7851
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7832
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7852
7833
  return "Chat history compression failed: the model returned an empty summary.";
7853
- case CompressionStatus.NOOP:
7834
+ case 5 /* NOOP */:
7854
7835
  return "Nothing to compress.";
7855
7836
  default:
7856
7837
  return "";
@@ -8276,8 +8257,8 @@ var ModelUsageTable = ({ models }) => {
8276
8257
  );
8277
8258
  roleEntries.sort(([a], [b]) => {
8278
8259
  if (a === b) return 0;
8279
- if (a === LlmRole.MAIN) return -1;
8280
- if (b === LlmRole.MAIN) return 1;
8260
+ if (a === "main" /* MAIN */) return -1;
8261
+ if (b === "main" /* MAIN */) return 1;
8281
8262
  return a.localeCompare(b);
8282
8263
  });
8283
8264
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8608,8 +8589,8 @@ var ModelStatsDisplay = ({
8608
8589
  return validRoles.includes(role);
8609
8590
  }).sort((a, b) => {
8610
8591
  if (a === b) return 0;
8611
- if (a === LlmRole.MAIN) return -1;
8612
- if (b === LlmRole.MAIN) return 1;
8592
+ if (a === "main" /* MAIN */) return -1;
8593
+ if (b === "main" /* MAIN */) return 1;
8613
8594
  return a.localeCompare(b);
8614
8595
  });
8615
8596
  const createRow = (metric, getValue, options = {}) => {
@@ -9400,7 +9381,7 @@ var McpStatus = ({
9400
9381
  );
9401
9382
  const originalStatus = serverStatus(serverName);
9402
9383
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9403
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9384
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9404
9385
  let statusIndicator = "";
9405
9386
  let statusText = "";
9406
9387
  let statusColor = theme.text.primary;
@@ -9412,17 +9393,17 @@ var McpStatus = ({
9412
9393
  statusColor = theme.text.secondary;
9413
9394
  } else {
9414
9395
  switch (status) {
9415
- case MCPServerStatus.CONNECTED:
9396
+ case "connected" /* CONNECTED */:
9416
9397
  statusIndicator = "\u{1F7E2}";
9417
9398
  statusText = "Ready";
9418
9399
  statusColor = theme.status.success;
9419
9400
  break;
9420
- case MCPServerStatus.CONNECTING:
9401
+ case "connecting" /* CONNECTING */:
9421
9402
  statusIndicator = "\u{1F504}";
9422
9403
  statusText = "Starting... (first startup may take longer)";
9423
9404
  statusColor = theme.status.warning;
9424
9405
  break;
9425
- case MCPServerStatus.DISCONNECTED:
9406
+ case "disconnected" /* DISCONNECTED */:
9426
9407
  default:
9427
9408
  statusIndicator = "\u{1F534}";
9428
9409
  statusText = "Disconnected";
@@ -9470,12 +9451,12 @@ var McpStatus = ({
9470
9451
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9471
9452
  " - ",
9472
9453
  statusText,
9473
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9454
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9474
9455
  ] }),
9475
9456
  authStatusNode
9476
9457
  ] }),
9477
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9478
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9458
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9459
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9479
9460
  " (",
9480
9461
  toolCount,
9481
9462
  " tools cached)"
@@ -10036,7 +10017,7 @@ var Notifications = () => {
10036
10017
  if (dismissed) return [];
10037
10018
  const counts = persistentState.get("startupWarningCounts") || {};
10038
10019
  return startupWarnings.filter((w) => {
10039
- if (w.priority === WarningPriority.Low) {
10020
+ if (w.priority === "low" /* Low */) {
10040
10021
  const count = counts[w.id] || 0;
10041
10022
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10042
10023
  }
@@ -10049,7 +10030,7 @@ var Notifications = () => {
10049
10030
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10050
10031
  let changed = false;
10051
10032
  visibleWarnings.forEach((w) => {
10052
- if (w.priority === WarningPriority.Low) {
10033
+ if (w.priority === "low" /* Low */) {
10053
10034
  counts[w.id] = (counts[w.id] || 0) + 1;
10054
10035
  changed = true;
10055
10036
  }
@@ -10156,7 +10137,7 @@ var UserIdentity = ({ config }) => {
10156
10137
  }
10157
10138
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
10158
10139
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
10159
- /* @__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: [
10140
+ /* @__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: [
10160
10141
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
10161
10142
  "Signed in with Google",
10162
10143
  email ? ":" : ""
@@ -10399,7 +10380,7 @@ var import_react32 = __toESM(require_react(), 1);
10399
10380
  function getConfirmingToolState(pendingHistoryItems) {
10400
10381
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10401
10382
  const confirmingTools = allPendingTools.filter(
10402
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10383
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10403
10384
  );
10404
10385
  if (confirmingTools.length === 0) {
10405
10386
  return null;
@@ -11707,7 +11688,7 @@ var ExitPlanModeDialog = ({
11707
11688
  {
11708
11689
  questions: [
11709
11690
  {
11710
- type: QuestionType.CHOICE,
11691
+ type: "choice" /* CHOICE */,
11711
11692
  header: "Approval",
11712
11693
  question: planContent,
11713
11694
  options: [
@@ -11728,9 +11709,9 @@ var ExitPlanModeDialog = ({
11728
11709
  onSubmit: (answers) => {
11729
11710
  const answer = answers["0"];
11730
11711
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11731
- onApprove(ApprovalMode.AUTO_EDIT);
11712
+ onApprove("autoEdit" /* AUTO_EDIT */);
11732
11713
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11733
- onApprove(ApprovalMode.DEFAULT);
11714
+ onApprove("default" /* DEFAULT */);
11734
11715
  } else if (answer) {
11735
11716
  onFeedback(answer);
11736
11717
  }
@@ -11941,7 +11922,7 @@ ${deceptiveUrlWarnings.map(
11941
11922
  );
11942
11923
  (0, import_react37.useEffect)(() => {
11943
11924
  if (isCancelling) {
11944
- handleConfirm(ToolConfirmationOutcome.Cancel);
11925
+ handleConfirm("cancel" /* Cancel */);
11945
11926
  }
11946
11927
  }, [isCancelling, handleConfirm]);
11947
11928
  const handleSelect = (0, import_react37.useCallback)(
@@ -11954,19 +11935,19 @@ ${deceptiveUrlWarnings.map(
11954
11935
  if (!confirmationDetails.isModifying) {
11955
11936
  options2.push({
11956
11937
  label: "Allow once",
11957
- value: ToolConfirmationOutcome.ProceedOnce,
11938
+ value: "proceed_once" /* ProceedOnce */,
11958
11939
  key: "Allow once"
11959
11940
  });
11960
11941
  if (isTrustedFolder) {
11961
11942
  options2.push({
11962
11943
  label: "Allow for this session",
11963
- value: ToolConfirmationOutcome.ProceedAlways,
11944
+ value: "proceed_always" /* ProceedAlways */,
11964
11945
  key: "Allow for this session"
11965
11946
  });
11966
11947
  if (allowPermanentApproval) {
11967
11948
  options2.push({
11968
11949
  label: "Allow for this file in all future sessions",
11969
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11950
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11970
11951
  key: "Allow for this file in all future sessions"
11971
11952
  });
11972
11953
  }
@@ -11974,119 +11955,119 @@ ${deceptiveUrlWarnings.map(
11974
11955
  if (!config.getIdeMode() || !isDiffingEnabled) {
11975
11956
  options2.push({
11976
11957
  label: "Modify with external editor",
11977
- value: ToolConfirmationOutcome.ModifyWithEditor,
11958
+ value: "modify_with_editor" /* ModifyWithEditor */,
11978
11959
  key: "Modify with external editor"
11979
11960
  });
11980
11961
  }
11981
11962
  options2.push({
11982
11963
  label: "No, suggest changes (esc)",
11983
- value: ToolConfirmationOutcome.Cancel,
11964
+ value: "cancel" /* Cancel */,
11984
11965
  key: "No, suggest changes (esc)"
11985
11966
  });
11986
11967
  }
11987
11968
  } else if (confirmationDetails.type === "sandbox_expansion") {
11988
11969
  options2.push({
11989
11970
  label: "Allow once",
11990
- value: ToolConfirmationOutcome.ProceedOnce,
11971
+ value: "proceed_once" /* ProceedOnce */,
11991
11972
  key: "Allow once"
11992
11973
  });
11993
11974
  if (isTrustedFolder) {
11994
11975
  options2.push({
11995
11976
  label: "Allow for this session",
11996
- value: ToolConfirmationOutcome.ProceedAlways,
11977
+ value: "proceed_always" /* ProceedAlways */,
11997
11978
  key: "Allow for this session"
11998
11979
  });
11999
11980
  if (allowPermanentApproval) {
12000
11981
  options2.push({
12001
11982
  label: "Allow for all future sessions",
12002
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11983
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12003
11984
  key: "Allow for all future sessions"
12004
11985
  });
12005
11986
  }
12006
11987
  }
12007
11988
  options2.push({
12008
11989
  label: "No, suggest changes (esc)",
12009
- value: ToolConfirmationOutcome.Cancel,
11990
+ value: "cancel" /* Cancel */,
12010
11991
  key: "No, suggest changes (esc)"
12011
11992
  });
12012
11993
  } else if (confirmationDetails.type === "exec") {
12013
11994
  options2.push({
12014
11995
  label: "Allow once",
12015
- value: ToolConfirmationOutcome.ProceedOnce,
11996
+ value: "proceed_once" /* ProceedOnce */,
12016
11997
  key: "Allow once"
12017
11998
  });
12018
11999
  if (isTrustedFolder) {
12019
12000
  options2.push({
12020
12001
  label: `Allow for this session`,
12021
- value: ToolConfirmationOutcome.ProceedAlways,
12002
+ value: "proceed_always" /* ProceedAlways */,
12022
12003
  key: `Allow for this session`
12023
12004
  });
12024
12005
  if (allowPermanentApproval) {
12025
12006
  options2.push({
12026
12007
  label: `Allow this command for all future sessions`,
12027
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12008
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12028
12009
  key: `Allow for all future sessions`
12029
12010
  });
12030
12011
  }
12031
12012
  }
12032
12013
  options2.push({
12033
12014
  label: "No, suggest changes (esc)",
12034
- value: ToolConfirmationOutcome.Cancel,
12015
+ value: "cancel" /* Cancel */,
12035
12016
  key: "No, suggest changes (esc)"
12036
12017
  });
12037
12018
  } else if (confirmationDetails.type === "info") {
12038
12019
  options2.push({
12039
12020
  label: "Allow once",
12040
- value: ToolConfirmationOutcome.ProceedOnce,
12021
+ value: "proceed_once" /* ProceedOnce */,
12041
12022
  key: "Allow once"
12042
12023
  });
12043
12024
  if (isTrustedFolder) {
12044
12025
  options2.push({
12045
12026
  label: "Allow for this session",
12046
- value: ToolConfirmationOutcome.ProceedAlways,
12027
+ value: "proceed_always" /* ProceedAlways */,
12047
12028
  key: "Allow for this session"
12048
12029
  });
12049
12030
  if (allowPermanentApproval) {
12050
12031
  options2.push({
12051
12032
  label: "Allow for all future sessions",
12052
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12033
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12053
12034
  key: "Allow for all future sessions"
12054
12035
  });
12055
12036
  }
12056
12037
  }
12057
12038
  options2.push({
12058
12039
  label: "No, suggest changes (esc)",
12059
- value: ToolConfirmationOutcome.Cancel,
12040
+ value: "cancel" /* Cancel */,
12060
12041
  key: "No, suggest changes (esc)"
12061
12042
  });
12062
12043
  } else if (confirmationDetails.type === "mcp") {
12063
12044
  options2.push({
12064
12045
  label: "Allow once",
12065
- value: ToolConfirmationOutcome.ProceedOnce,
12046
+ value: "proceed_once" /* ProceedOnce */,
12066
12047
  key: "Allow once"
12067
12048
  });
12068
12049
  if (isTrustedFolder) {
12069
12050
  options2.push({
12070
12051
  label: "Allow tool for this session",
12071
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
12052
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
12072
12053
  key: "Allow tool for this session"
12073
12054
  });
12074
12055
  options2.push({
12075
12056
  label: "Allow all server tools for this session",
12076
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
12057
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
12077
12058
  key: "Allow all server tools for this session"
12078
12059
  });
12079
12060
  if (allowPermanentApproval) {
12080
12061
  options2.push({
12081
12062
  label: "Allow tool for all future sessions",
12082
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12063
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12083
12064
  key: "Allow tool for all future sessions"
12084
12065
  });
12085
12066
  }
12086
12067
  }
12087
12068
  options2.push({
12088
12069
  label: "No, suggest changes (esc)",
12089
- value: ToolConfirmationOutcome.Cancel,
12070
+ value: "cancel" /* Cancel */,
12090
12071
  key: "No, suggest changes (esc)"
12091
12072
  });
12092
12073
  }
@@ -12125,7 +12106,7 @@ ${deceptiveUrlWarnings.map(
12125
12106
  const containsRedirection = commandsToDisplay.some(
12126
12107
  (cmd) => hasRedirection(cmd)
12127
12108
  );
12128
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12109
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12129
12110
  if (containsRedirection && !isAutoEdit) {
12130
12111
  extraInfoLines = 1;
12131
12112
  }
@@ -12151,7 +12132,7 @@ ${deceptiveUrlWarnings.map(
12151
12132
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12152
12133
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12153
12134
  const alwaysAndSaveIndex = options2.findIndex(
12154
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12135
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12155
12136
  );
12156
12137
  if (alwaysAndSaveIndex !== -1) {
12157
12138
  initialIndex2 = alwaysAndSaveIndex;
@@ -12168,10 +12149,10 @@ ${deceptiveUrlWarnings.map(
12168
12149
  {
12169
12150
  questions: confirmationDetails.questions,
12170
12151
  onSubmit: (answers) => {
12171
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12152
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12172
12153
  },
12173
12154
  onCancel: () => {
12174
- handleConfirm(ToolConfirmationOutcome.Cancel);
12155
+ handleConfirm("cancel" /* Cancel */);
12175
12156
  },
12176
12157
  width: terminalWidth,
12177
12158
  availableHeight: bodyHeight
@@ -12192,19 +12173,19 @@ ${deceptiveUrlWarnings.map(
12192
12173
  planPath: confirmationDetails.planPath,
12193
12174
  getPreferredEditor,
12194
12175
  onApprove: (approvalMode) => {
12195
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12176
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12196
12177
  approved: true,
12197
12178
  approvalMode
12198
12179
  });
12199
12180
  },
12200
12181
  onFeedback: (feedback) => {
12201
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12182
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12202
12183
  approved: false,
12203
12184
  feedback
12204
12185
  });
12205
12186
  },
12206
12187
  onCancel: () => {
12207
- handleConfirm(ToolConfirmationOutcome.Cancel);
12188
+ handleConfirm("cancel" /* Cancel */);
12208
12189
  },
12209
12190
  width: terminalWidth,
12210
12191
  availableHeight: bodyHeight
@@ -12313,7 +12294,7 @@ ${deceptiveUrlWarnings.map(
12313
12294
  const containsRedirection = commandsToDisplay.some(
12314
12295
  (cmd) => hasRedirection(cmd)
12315
12296
  );
12316
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12297
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12317
12298
  let warnings = null;
12318
12299
  if (containsRedirection && !isAutoEdit) {
12319
12300
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12472,7 +12453,7 @@ ${deceptiveUrlWarnings.map(
12472
12453
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12473
12454
  const renderRadioItem = (0, import_react37.useCallback)(
12474
12455
  (item, { titleColor }) => {
12475
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12456
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12476
12457
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12477
12458
  item.label,
12478
12459
  " ",
@@ -14502,7 +14483,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14502
14483
  if (settings.merged.security.auth.useExternal) {
14503
14484
  return null;
14504
14485
  }
14505
- if (authType === AuthType.USE_GEMINI) {
14486
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14506
14487
  return null;
14507
14488
  }
14508
14489
  return validateAuthMethod(authType);
@@ -14554,7 +14535,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14554
14535
  }
14555
14536
  return;
14556
14537
  }
14557
- if (authType === AuthType.USE_GEMINI) {
14538
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14558
14539
  const key = await reloadApiKey();
14559
14540
  if (!key) {
14560
14541
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14632,31 +14613,31 @@ function AuthDialog({
14632
14613
  let items = [
14633
14614
  {
14634
14615
  label: "Sign in with Google",
14635
- value: AuthType.LOGIN_WITH_GOOGLE,
14636
- key: AuthType.LOGIN_WITH_GOOGLE
14616
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14617
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14637
14618
  },
14638
14619
  ...process.env["CLOUD_SHELL"] === "true" ? [
14639
14620
  {
14640
14621
  label: "Use Cloud Shell user credentials",
14641
- value: AuthType.COMPUTE_ADC,
14642
- key: AuthType.COMPUTE_ADC
14622
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14623
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14643
14624
  }
14644
14625
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14645
14626
  {
14646
14627
  label: "Use metadata server application default credentials",
14647
- value: AuthType.COMPUTE_ADC,
14648
- key: AuthType.COMPUTE_ADC
14628
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14629
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14649
14630
  }
14650
14631
  ] : [],
14651
14632
  {
14652
14633
  label: "Use Gemini API Key",
14653
- value: AuthType.USE_GEMINI,
14654
- key: AuthType.USE_GEMINI
14634
+ value: "gemini-api-key" /* USE_GEMINI */,
14635
+ key: "gemini-api-key" /* USE_GEMINI */
14655
14636
  },
14656
14637
  {
14657
14638
  label: "Vertex AI",
14658
- value: AuthType.USE_VERTEX_AI,
14659
- key: AuthType.USE_VERTEX_AI
14639
+ value: "vertex-ai" /* USE_VERTEX_AI */,
14640
+ key: "vertex-ai" /* USE_VERTEX_AI */
14660
14641
  }
14661
14642
  ];
14662
14643
  if (settings.merged.security.auth.enforcedType) {
@@ -14678,9 +14659,9 @@ function AuthDialog({
14678
14659
  return item.value === defaultAuthType;
14679
14660
  }
14680
14661
  if (process.env["GEMINI_API_KEY"]) {
14681
- return item.value === AuthType.USE_GEMINI;
14662
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
14682
14663
  }
14683
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
14664
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14684
14665
  });
14685
14666
  if (settings.merged.security.auth.enforcedType) {
14686
14667
  initialAuthIndex = 0;
@@ -14691,7 +14672,7 @@ function AuthDialog({
14691
14672
  return;
14692
14673
  }
14693
14674
  if (authType) {
14694
- const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14675
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14695
14676
  if (needsRestart) {
14696
14677
  setAuthContext({ requiresRestart: true });
14697
14678
  } else {
@@ -14699,12 +14680,12 @@ function AuthDialog({
14699
14680
  }
14700
14681
  await clearCachedCredentialFile();
14701
14682
  settings.setValue(scope, "security.auth.selectedType", authType);
14702
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14683
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14703
14684
  setExiting(true);
14704
14685
  setTimeout(relaunchApp, 100);
14705
14686
  return;
14706
14687
  }
14707
- if (authType === AuthType.USE_GEMINI) {
14688
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14708
14689
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14709
14690
  return;
14710
14691
  }
@@ -15460,11 +15441,11 @@ var PrivacyNoticeText = ({
15460
15441
  }) => {
15461
15442
  const authType = config.getContentGeneratorConfig()?.authType;
15462
15443
  switch (authType) {
15463
- case AuthType.USE_GEMINI:
15444
+ case "gemini-api-key" /* USE_GEMINI */:
15464
15445
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15465
- case AuthType.USE_VERTEX_AI:
15446
+ case "vertex-ai" /* USE_VERTEX_AI */:
15466
15447
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15467
- case AuthType.LOGIN_WITH_GOOGLE:
15448
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15468
15449
  default:
15469
15450
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15470
15451
  }
@@ -15505,7 +15486,7 @@ function ProQuotaDialog({
15505
15486
  value: "retry_always",
15506
15487
  key: "retry_always"
15507
15488
  },
15508
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15489
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15509
15490
  {
15510
15491
  label: "Upgrade for higher limits",
15511
15492
  value: "upgrade",
@@ -16664,7 +16645,7 @@ function ModelDialog({ onClose }) {
16664
16645
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16665
16646
  const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
16666
16647
  const selectedAuthType = settings.merged.security.auth.selectedType;
16667
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16648
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16668
16649
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16669
16650
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16670
16651
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -17987,10 +17968,10 @@ function initializeConsoleStore() {
17987
17968
  globalConsoleMessages = [];
17988
17969
  globalErrorCount = 0;
17989
17970
  notifyListeners();
17990
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
17991
- coreEvents.off(CoreEvent.Output, handleOutput);
17992
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
17993
- coreEvents.on(CoreEvent.Output, handleOutput);
17971
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
17972
+ coreEvents.off("output" /* Output */, handleOutput);
17973
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
17974
+ coreEvents.on("output" /* Output */, handleOutput);
17994
17975
  }
17995
17976
  function notifyListeners() {
17996
17977
  for (const listener of listeners) {
@@ -20127,7 +20108,7 @@ function usePromptCompletion({
20127
20108
  { model: "prompt-completion" },
20128
20109
  contents,
20129
20110
  signal,
20130
- LlmRole.UTILITY_AUTOCOMPLETE
20111
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20131
20112
  );
20132
20113
  if (signal.aborted) {
20133
20114
  return;
@@ -22205,9 +22186,9 @@ var InputPrompt = ({
22205
22186
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22206
22187
  }
22207
22188
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22208
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22209
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22210
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22189
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22190
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22191
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22211
22192
  let statusColor;
22212
22193
  let statusText = "";
22213
22194
  if (shellModeActive) {
@@ -23040,22 +23021,22 @@ var ApprovalModeIndicator = ({
23040
23021
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23041
23022
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23042
23023
  switch (approvalMode) {
23043
- case ApprovalMode.AUTO_EDIT:
23024
+ case "autoEdit" /* AUTO_EDIT */:
23044
23025
  textColor = theme.status.warning;
23045
23026
  textContent = "auto-accept edits";
23046
23027
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23047
23028
  break;
23048
- case ApprovalMode.PLAN:
23029
+ case "plan" /* PLAN */:
23049
23030
  textColor = theme.status.success;
23050
23031
  textContent = "plan";
23051
23032
  subText = `${cycleHint} to manual`;
23052
23033
  break;
23053
- case ApprovalMode.YOLO:
23034
+ case "yolo" /* YOLO */:
23054
23035
  textColor = theme.status.error;
23055
23036
  textContent = "YOLO";
23056
23037
  subText = yoloHint;
23057
23038
  break;
23058
- case ApprovalMode.DEFAULT:
23039
+ case "default" /* DEFAULT */:
23059
23040
  default:
23060
23041
  textColor = theme.text.accent;
23061
23042
  textContent = "";
@@ -23103,7 +23084,7 @@ var useComposerStatus = () => {
23103
23084
  (item) => item.type === "tool_group"
23104
23085
  ).some(
23105
23086
  (item) => item.tools.some(
23106
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23087
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23107
23088
  )
23108
23089
  ),
23109
23090
  [uiState.pendingHistoryItems]
@@ -23118,13 +23099,13 @@ var useComposerStatus = () => {
23118
23099
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23119
23100
  if (hideMinimalModeHintWhileBusy) return null;
23120
23101
  switch (showApprovalModeIndicator) {
23121
- case ApprovalMode.YOLO:
23102
+ case "yolo" /* YOLO */:
23122
23103
  return { text: "YOLO", color: theme.status.error };
23123
- case ApprovalMode.PLAN:
23104
+ case "plan" /* PLAN */:
23124
23105
  return { text: "plan", color: theme.status.success };
23125
- case ApprovalMode.AUTO_EDIT:
23106
+ case "autoEdit" /* AUTO_EDIT */:
23126
23107
  return { text: "auto edit", color: theme.status.warning };
23127
- case ApprovalMode.DEFAULT:
23108
+ case "default" /* DEFAULT */:
23128
23109
  default:
23129
23110
  return null;
23130
23111
  }
@@ -23478,7 +23459,7 @@ var ConfigInitDisplay = ({
23478
23459
  let connected = 0;
23479
23460
  const connecting = [];
23480
23461
  for (const [name, client] of clients.entries()) {
23481
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23462
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23482
23463
  connected++;
23483
23464
  } else {
23484
23465
  connecting.push(name);
@@ -23500,9 +23481,9 @@ var ConfigInitDisplay = ({
23500
23481
  );
23501
23482
  }
23502
23483
  };
23503
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23484
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23504
23485
  return () => {
23505
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23486
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23506
23487
  };
23507
23488
  }, [initialMessage]);
23508
23489
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24219,7 +24200,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24219
24200
  callId,
24220
24201
  name: SHELL_COMMAND_NAME,
24221
24202
  description: rawQuery,
24222
- status: CoreToolCallStatus.Executing,
24203
+ status: "executing" /* Executing */,
24223
24204
  isClientInitiated: true,
24224
24205
  resultDisplay: "",
24225
24206
  confirmationDetails: void 0
@@ -24360,7 +24341,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24360
24341
  mainContent = result.output.trim() || "(Command produced no output)";
24361
24342
  }
24362
24343
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24363
- let finalStatus = CoreToolCallStatus.Success;
24344
+ let finalStatus = "success" /* Success */;
24364
24345
  const prependToAnsiOutput = (output, text) => {
24365
24346
  const newLines = text.split("\n").map((line) => [
24366
24347
  {
@@ -24379,20 +24360,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24379
24360
  };
24380
24361
  let prefix = "";
24381
24362
  if (result.error) {
24382
- finalStatus = CoreToolCallStatus.Error;
24363
+ finalStatus = "error" /* Error */;
24383
24364
  prefix = result.error.message;
24384
24365
  } else if (result.aborted) {
24385
- finalStatus = CoreToolCallStatus.Cancelled;
24366
+ finalStatus = "cancelled" /* Cancelled */;
24386
24367
  prefix = "Command was cancelled.";
24387
24368
  } else if (result.backgrounded) {
24388
- finalStatus = CoreToolCallStatus.Success;
24369
+ finalStatus = "success" /* Success */;
24389
24370
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24390
24371
  mainContent = finalOutput;
24391
24372
  } else if (result.signal) {
24392
- finalStatus = CoreToolCallStatus.Error;
24373
+ finalStatus = "error" /* Error */;
24393
24374
  prefix = `Command terminated by signal: ${result.signal}.`;
24394
24375
  } else if (result.exitCode !== 0) {
24395
- finalStatus = CoreToolCallStatus.Error;
24376
+ finalStatus = "error" /* Error */;
24396
24377
  prefix = `Command exited with code ${result.exitCode}.`;
24397
24378
  }
24398
24379
  if (prefix) {
@@ -24418,7 +24399,7 @@ ${mainContent}`;
24418
24399
  status: finalStatus,
24419
24400
  resultDisplay: finalOutput
24420
24401
  };
24421
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24402
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24422
24403
  addItemToHistory(
24423
24404
  {
24424
24405
  type: "tool_group",
@@ -25408,7 +25389,7 @@ function useQuotaAndFallback({
25408
25389
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25409
25390
  `/stats model for usage details`,
25410
25391
  `/model to switch models.`,
25411
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25392
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25412
25393
  ].filter(Boolean);
25413
25394
  message = messageLines.join("\n");
25414
25395
  } else if (error instanceof ModelNotFoundError) {
@@ -25596,7 +25577,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25596
25577
  );
25597
25578
  setEditorError(null);
25598
25579
  setIsEditorDialogOpen(false);
25599
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25580
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25600
25581
  } catch (error) {
25601
25582
  setEditorError(`Failed to set editor preference: ${error}`);
25602
25583
  }
@@ -25605,7 +25586,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25605
25586
  );
25606
25587
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25607
25588
  setIsEditorDialogOpen(false);
25608
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25589
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25609
25590
  }, []);
25610
25591
  return {
25611
25592
  isEditorDialogOpen,
@@ -25982,7 +25963,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25982
25963
  canonicalPath: resolvedCommandPath
25983
25964
  } = parseSlashCommand(trimmed, commands);
25984
25965
  if (!commandToExecute) {
25985
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25966
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25986
25967
  if (isMcpLoading) {
25987
25968
  setIsProcessing(true);
25988
25969
  if (addToHistory) {
@@ -26162,7 +26143,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26162
26143
  onConfirm: async (resolvedOutcome) => {
26163
26144
  resolve3({
26164
26145
  outcome: resolvedOutcome,
26165
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26146
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26166
26147
  });
26167
26148
  }
26168
26149
  };
@@ -26170,7 +26151,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26170
26151
  callId,
26171
26152
  name: "Expansion",
26172
26153
  description: "Command expansion needs shell access",
26173
- status: CoreToolCallStatus.AwaitingApproval,
26154
+ status: "awaiting_approval" /* AwaitingApproval */,
26174
26155
  isClientInitiated: true,
26175
26156
  resultDisplay: void 0,
26176
26157
  confirmationDetails
@@ -26181,7 +26162,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26181
26162
  });
26182
26163
  });
26183
26164
  setPendingItem(null);
26184
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26165
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26185
26166
  addItem(
26186
26167
  {
26187
26168
  type: "info" /* INFO */,
@@ -26191,7 +26172,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26191
26172
  );
26192
26173
  return { type: "handled" };
26193
26174
  }
26194
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26175
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26195
26176
  setSessionShellAllowlist(
26196
26177
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26197
26178
  );
@@ -26667,7 +26648,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26667
26648
  let description;
26668
26649
  let renderOutputAsMarkdown = false;
26669
26650
  const displayName = call.tool?.displayName ?? call.request.name;
26670
- if (call.status === CoreToolCallStatus.Error) {
26651
+ if (call.status === "error" /* Error */) {
26671
26652
  description = JSON.stringify(call.request.args);
26672
26653
  } else {
26673
26654
  description = call.invocation.getDescription();
@@ -26690,27 +26671,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26690
26671
  let progress = void 0;
26691
26672
  let progressTotal = void 0;
26692
26673
  switch (call.status) {
26693
- case CoreToolCallStatus.Success:
26674
+ case "success" /* Success */:
26694
26675
  resultDisplay = call.response.resultDisplay;
26695
26676
  outputFile = call.response.outputFile;
26696
26677
  break;
26697
- case CoreToolCallStatus.Error:
26698
- case CoreToolCallStatus.Cancelled:
26678
+ case "error" /* Error */:
26679
+ case "cancelled" /* Cancelled */:
26699
26680
  resultDisplay = call.response.resultDisplay;
26700
26681
  break;
26701
- case CoreToolCallStatus.AwaitingApproval:
26682
+ case "awaiting_approval" /* AwaitingApproval */:
26702
26683
  correlationId = call.correlationId;
26703
26684
  confirmationDetails = call.confirmationDetails;
26704
26685
  break;
26705
- case CoreToolCallStatus.Executing:
26686
+ case "executing" /* Executing */:
26706
26687
  resultDisplay = call.liveOutput;
26707
26688
  ptyId = call.pid;
26708
26689
  progressMessage = call.progressMessage;
26709
26690
  progress = call.progress;
26710
26691
  progressTotal = call.progressTotal;
26711
26692
  break;
26712
- case CoreToolCallStatus.Scheduled:
26713
- case CoreToolCallStatus.Validating:
26693
+ case "scheduled" /* Scheduled */:
26694
+ case "validating" /* Validating */:
26714
26695
  break;
26715
26696
  default: {
26716
26697
  const exhaustiveCheck = call;
@@ -26781,7 +26762,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26781
26762
  const handler = (event) => {
26782
26763
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26783
26764
  const hasExecuting = event.toolCalls.some(
26784
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26765
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26785
26766
  );
26786
26767
  if (hasExecuting) {
26787
26768
  setLastToolOutputTime(Date.now());
@@ -26790,7 +26771,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26790
26771
  const prevCalls = prev[event.schedulerId] ?? [];
26791
26772
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26792
26773
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26793
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26774
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26794
26775
  );
26795
26776
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26796
26777
  return prev;
@@ -26802,9 +26783,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26802
26783
  };
26803
26784
  });
26804
26785
  };
26805
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26786
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26806
26787
  return () => {
26807
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26788
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26808
26789
  };
26809
26790
  }, [messageBus, internalAdaptToolCalls]);
26810
26791
  (0, import_react98.useEffect)(() => {
@@ -26826,9 +26807,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26826
26807
  };
26827
26808
  });
26828
26809
  };
26829
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26810
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26830
26811
  return () => {
26831
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26812
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26832
26813
  };
26833
26814
  }, [messageBus]);
26834
26815
  const schedule = (0, import_react98.useCallback)(
@@ -26927,8 +26908,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26927
26908
  const prev = prevMap.get(coreCall.request.callId);
26928
26909
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26929
26910
  let status = coreCall.status;
26930
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26931
- status = CoreToolCallStatus.Executing;
26911
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26912
+ status = "executing" /* Executing */;
26932
26913
  }
26933
26914
  return {
26934
26915
  ...coreCall,
@@ -26960,7 +26941,7 @@ function getBackgroundedToolInfo(toolCall) {
26960
26941
  };
26961
26942
  }
26962
26943
  function isBackgroundableExecutingToolCall(toolCall) {
26963
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26944
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26964
26945
  }
26965
26946
  function showCitations(settings) {
26966
26947
  const enabled = settings.merged.ui.showCitations;
@@ -26970,14 +26951,14 @@ function showCitations(settings) {
26970
26951
  return true;
26971
26952
  }
26972
26953
  function calculateStreamingState(isResponding, toolCalls) {
26973
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26954
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26974
26955
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26975
26956
  }
26976
26957
  const isAnyToolActive = toolCalls.some((tc) => {
26977
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26958
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26978
26959
  return true;
26979
26960
  }
26980
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26961
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26981
26962
  return !tc.responseSubmittedToGemini;
26982
26963
  }
26983
26964
  return false;
@@ -27023,9 +27004,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27023
27004
  }
27024
27005
  setRetryStatus(payload);
27025
27006
  };
27026
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
27007
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27027
27008
  return () => {
27028
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
27009
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27029
27010
  };
27030
27011
  }, [isRespondingRef]);
27031
27012
  const [
@@ -27158,12 +27139,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27158
27139
  const tc = toolCalls[i];
27159
27140
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27160
27141
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27161
- const isAgent = tc.tool?.kind === Kind.Agent;
27142
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
27162
27143
  if (isAgent) {
27163
27144
  let contigAgentsComplete = true;
27164
27145
  for (let j = i + 1; j < toolCalls.length; j++) {
27165
27146
  const nextTc = toolCalls[j];
27166
- if (nextTc.tool?.kind === Kind.Agent) {
27147
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
27167
27148
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27168
27149
  contigAgentsComplete = false;
27169
27150
  break;
@@ -27189,7 +27170,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27189
27170
  let currentGroup = [];
27190
27171
  for (const tc of toolsToPush) {
27191
27172
  newPushed.add(tc.request.callId);
27192
- if (tc.tool?.kind === Kind.Agent) {
27173
+ if (tc.tool?.kind === "agent" /* Agent */) {
27193
27174
  currentGroup.push(tc);
27194
27175
  } else {
27195
27176
  if (currentGroup.length > 0) {
@@ -27339,7 +27320,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27339
27320
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27340
27321
  }, [activeShellPtyId, addItem, setIsResponding]);
27341
27322
  (0, import_react99.useEffect)(() => {
27342
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27323
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27343
27324
  const lastUserMessageIndex = history.findLastIndex(
27344
27325
  (item) => item.type === "user" /* USER */
27345
27326
  );
@@ -27407,7 +27388,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27407
27388
  return;
27408
27389
  }
27409
27390
  const hasActiveTools = toolCalls.some(
27410
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27391
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27411
27392
  );
27412
27393
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27413
27394
  if (clearBuffer) {
@@ -27434,7 +27415,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27434
27415
  if (tool.name === SHELL_COMMAND_NAME) {
27435
27416
  return {
27436
27417
  ...tool,
27437
- status: CoreToolCallStatus.Cancelled,
27418
+ status: "cancelled" /* Cancelled */,
27438
27419
  resultDisplay: tool.resultDisplay
27439
27420
  };
27440
27421
  }
@@ -27499,7 +27480,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27499
27480
  let localQueryToSendToGemini = null;
27500
27481
  if (typeof query === "string") {
27501
27482
  const trimmedQuery = query.trim();
27502
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27483
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
27503
27484
  if (!shellModeActive) {
27504
27485
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27505
27486
  if (slashCommandResult) {
@@ -27655,7 +27636,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27655
27636
  if (pendingHistoryItemRef.current) {
27656
27637
  if (pendingHistoryItemRef.current.type === "tool_group") {
27657
27638
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27658
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27639
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27659
27640
  );
27660
27641
  const pendingItem = {
27661
27642
  ...pendingHistoryItemRef.current,
@@ -27901,15 +27882,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27901
27882
  let geminiMessageBuffer = "";
27902
27883
  const toolCallRequests = [];
27903
27884
  for await (const event of stream) {
27904
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27885
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27905
27886
  setThought(null);
27906
27887
  }
27907
27888
  switch (event.type) {
27908
- case GeminiEventType.Thought:
27889
+ case "thought" /* Thought */:
27909
27890
  setLastGeminiActivityTime(Date.now());
27910
27891
  handleThoughtEvent(event.value, userMessageTimestamp);
27911
27892
  break;
27912
- case GeminiEventType.Content:
27893
+ case "content" /* Content */:
27913
27894
  setLastGeminiActivityTime(Date.now());
27914
27895
  geminiMessageBuffer = handleContentEvent(
27915
27896
  event.value,
@@ -27917,16 +27898,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27917
27898
  userMessageTimestamp
27918
27899
  );
27919
27900
  break;
27920
- case GeminiEventType.ToolCallRequest:
27901
+ case "tool_call_request" /* ToolCallRequest */:
27921
27902
  toolCallRequests.push(event.value);
27922
27903
  break;
27923
- case GeminiEventType.UserCancelled:
27904
+ case "user_cancelled" /* UserCancelled */:
27924
27905
  handleUserCancelledEvent(userMessageTimestamp);
27925
27906
  break;
27926
- case GeminiEventType.Error:
27907
+ case "error" /* Error */:
27927
27908
  handleErrorEvent(event.value, userMessageTimestamp);
27928
27909
  break;
27929
- case GeminiEventType.AgentExecutionStopped:
27910
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
27930
27911
  handleAgentExecutionStoppedEvent(
27931
27912
  event.value.reason,
27932
27913
  userMessageTimestamp,
@@ -27934,7 +27915,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27934
27915
  event.value.contextCleared
27935
27916
  );
27936
27917
  break;
27937
- case GeminiEventType.AgentExecutionBlocked:
27918
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
27938
27919
  handleAgentExecutionBlockedEvent(
27939
27920
  event.value.reason,
27940
27921
  userMessageTimestamp,
@@ -27942,35 +27923,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27942
27923
  event.value.contextCleared
27943
27924
  );
27944
27925
  break;
27945
- case GeminiEventType.ChatCompressed:
27926
+ case "chat_compressed" /* ChatCompressed */:
27946
27927
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27947
27928
  break;
27948
- case GeminiEventType.ToolCallConfirmation:
27949
- case GeminiEventType.ToolCallResponse:
27929
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
27930
+ case "tool_call_response" /* ToolCallResponse */:
27950
27931
  break;
27951
- case GeminiEventType.MaxSessionTurns:
27932
+ case "max_session_turns" /* MaxSessionTurns */:
27952
27933
  handleMaxSessionTurnsEvent();
27953
27934
  break;
27954
- case GeminiEventType.ContextWindowWillOverflow:
27935
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27955
27936
  handleContextWindowWillOverflowEvent(
27956
27937
  event.value.estimatedRequestTokenCount,
27957
27938
  event.value.remainingTokenCount
27958
27939
  );
27959
27940
  break;
27960
- case GeminiEventType.Finished:
27941
+ case "finished" /* Finished */:
27961
27942
  handleFinishedEvent(event, userMessageTimestamp);
27962
27943
  break;
27963
- case GeminiEventType.Citation:
27944
+ case "citation" /* Citation */:
27964
27945
  handleCitationEvent(event.value, userMessageTimestamp);
27965
27946
  break;
27966
- case GeminiEventType.ModelInfo:
27947
+ case "model_info" /* ModelInfo */:
27967
27948
  handleChatModelEvent(event.value, userMessageTimestamp);
27968
27949
  break;
27969
- case GeminiEventType.LoopDetected:
27950
+ case "loop_detected" /* LoopDetected */:
27970
27951
  loopDetectedRef.current = true;
27971
27952
  break;
27972
- case GeminiEventType.Retry:
27973
- case GeminiEventType.InvalidStream:
27953
+ case "retry" /* Retry */:
27954
+ case "invalid_stream" /* InvalidStream */:
27974
27955
  break;
27975
27956
  default: {
27976
27957
  const unreachable = event;
@@ -28011,7 +27992,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28011
27992
  const submitQuery = (0, import_react99.useCallback)(
28012
27993
  async (query, options, prompt_id) => runInDevTraceSpan(
28013
27994
  {
28014
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
27995
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
28015
27996
  sessionId: config.getSessionId()
28016
27997
  },
28017
27998
  async ({ metadata: spanMetadata }) => {
@@ -28171,7 +28152,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28171
28152
  );
28172
28153
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28173
28154
  async (newApprovalMode) => {
28174
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28155
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28175
28156
  if (geminiClient) {
28176
28157
  try {
28177
28158
  await geminiClient.addHistory({
@@ -28194,11 +28175,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28194
28175
  }
28195
28176
  }
28196
28177
  previousApprovalModeRef.current = newApprovalMode;
28197
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28178
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28198
28179
  let awaitingApprovalCalls = toolCalls.filter(
28199
28180
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28200
28181
  );
28201
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28182
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28202
28183
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28203
28184
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28204
28185
  return true;
@@ -28214,11 +28195,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28214
28195
  if (call.correlationId) {
28215
28196
  try {
28216
28197
  await config.getMessageBus().publish({
28217
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28198
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28218
28199
  correlationId: call.correlationId,
28219
28200
  confirmed: true,
28220
28201
  requiresUserConfirmation: false,
28221
- outcome: ToolConfirmationOutcome.ProceedOnce
28202
+ outcome: "proceed_once" /* ProceedOnce */
28222
28203
  });
28223
28204
  } catch (error) {
28224
28205
  debugLogger.warn(
@@ -28287,14 +28268,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28287
28268
  );
28288
28269
  if (isLowErrorVerbosity) {
28289
28270
  suppressedToolErrorCountRef.current += geminiTools.filter(
28290
- (tc) => tc.status === CoreToolCallStatus.Error
28271
+ (tc) => tc.status === "error" /* Error */
28291
28272
  ).length;
28292
28273
  }
28293
28274
  if (geminiTools.length === 0) {
28294
28275
  return;
28295
28276
  }
28296
28277
  const stopExecutionTool = geminiTools.find(
28297
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28278
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28298
28279
  );
28299
28280
  if (stopExecutionTool && stopExecutionTool.response.error) {
28300
28281
  maybeAddSuppressedToolErrorNote();
@@ -28314,9 +28295,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28314
28295
  (tc) => !isTopicTool2(tc.request.name)
28315
28296
  );
28316
28297
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28317
- (tc) => tc.status === CoreToolCallStatus.Cancelled
28298
+ (tc) => tc.status === "cancelled" /* Cancelled */
28318
28299
  );
28319
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28300
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28320
28301
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28321
28302
  if (!turnCancelledRef.current) {
28322
28303
  addItem({
@@ -28396,7 +28377,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28396
28377
  return;
28397
28378
  }
28398
28379
  const restorableToolCalls = toolCalls.filter(
28399
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28380
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28400
28381
  );
28401
28382
  if (restorableToolCalls.length > 0) {
28402
28383
  if (!gitService) {
@@ -28619,14 +28600,14 @@ var useAgentStream = ({
28619
28600
  const displayName = legacyState?.displayName ?? event.name;
28620
28601
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28621
28602
  const desc = legacyState?.description ?? "";
28622
- const fallbackKind = Kind.Other;
28603
+ const fallbackKind = "other" /* Other */;
28623
28604
  const newCall = {
28624
28605
  callId: event.requestId,
28625
28606
  name: displayName,
28626
28607
  originalRequestName: event.name,
28627
28608
  description: desc,
28628
28609
  display: event.display,
28629
- status: CoreToolCallStatus.Scheduled,
28610
+ status: "scheduled" /* Scheduled */,
28630
28611
  isClientInitiated: false,
28631
28612
  renderOutputAsMarkdown: isOutputMarkdown,
28632
28613
  kind: legacyState?.kind ?? fallbackKind,
@@ -28644,10 +28625,10 @@ var useAgentStream = ({
28644
28625
  const evtStatus = legacyState?.status;
28645
28626
  let status = tc.status;
28646
28627
  if (evtStatus === "executing")
28647
- status = CoreToolCallStatus.Executing;
28648
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28628
+ status = "executing" /* Executing */;
28629
+ else if (evtStatus === "error") status = "error" /* Error */;
28649
28630
  else if (evtStatus === "success")
28650
- status = CoreToolCallStatus.Success;
28631
+ status = "success" /* Success */;
28651
28632
  const display = event.display?.result;
28652
28633
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28653
28634
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28680,7 +28661,7 @@ var useAgentStream = ({
28680
28661
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28681
28662
  return {
28682
28663
  ...tc,
28683
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28664
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28684
28665
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28685
28666
  resultDisplay,
28686
28667
  outputFile
@@ -28746,7 +28727,7 @@ var useAgentStream = ({
28746
28727
  if (!options?.isContinuation) {
28747
28728
  if (typeof query === "string") {
28748
28729
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28749
- void logger?.logMessage(MessageSenderType.USER, query);
28730
+ void logger?.logMessage("user" /* USER */, query);
28750
28731
  }
28751
28732
  startNewPrompt();
28752
28733
  }
@@ -30273,9 +30254,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30273
30254
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30274
30255
  async (choice) => {
30275
30256
  const trustLevelMap = {
30276
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30277
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30278
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30257
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30258
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30259
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30279
30260
  };
30280
30261
  const trustLevel = trustLevelMap[choice];
30281
30262
  if (!trustLevel) return;
@@ -30294,7 +30275,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30294
30275
  }, 100);
30295
30276
  return;
30296
30277
  }
30297
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30278
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30298
30279
  onTrustChange(currentIsTrusted);
30299
30280
  setIsTrusted(currentIsTrusted);
30300
30281
  const wasTrusted = isTrusted ?? false;
@@ -31302,7 +31283,7 @@ function useMessageQueue({
31302
31283
  var import_react107 = __toESM(require_react(), 1);
31303
31284
  function useMcpStatus(config) {
31304
31285
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31305
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31286
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31306
31287
  );
31307
31288
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31308
31289
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31315,12 +31296,12 @@ function useMcpStatus(config) {
31315
31296
  setMcpServerCount(manager.getMcpServerCount());
31316
31297
  }
31317
31298
  };
31318
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31299
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31319
31300
  return () => {
31320
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31301
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31321
31302
  };
31322
31303
  }, [config]);
31323
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31304
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31324
31305
  return {
31325
31306
  discoveryState,
31326
31307
  mcpServerCount,
@@ -31347,7 +31328,7 @@ function useApprovalModeIndicator({
31347
31328
  (key) => {
31348
31329
  let nextApprovalMode;
31349
31330
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31350
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31331
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31351
31332
  if (addItem) {
31352
31333
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31353
31334
  const adminSettings = config.getRemoteAdminSettings();
@@ -31365,21 +31346,21 @@ function useApprovalModeIndicator({
31365
31346
  }
31366
31347
  return;
31367
31348
  }
31368
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31349
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31369
31350
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31370
31351
  const currentMode = config.getApprovalMode();
31371
31352
  switch (currentMode) {
31372
- case ApprovalMode.DEFAULT:
31373
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31353
+ case "default" /* DEFAULT */:
31354
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31374
31355
  break;
31375
- case ApprovalMode.AUTO_EDIT:
31376
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31356
+ case "autoEdit" /* AUTO_EDIT */:
31357
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31377
31358
  break;
31378
- case ApprovalMode.PLAN:
31379
- nextApprovalMode = ApprovalMode.DEFAULT;
31359
+ case "plan" /* PLAN */:
31360
+ nextApprovalMode = "default" /* DEFAULT */;
31380
31361
  break;
31381
- case ApprovalMode.YOLO:
31382
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31362
+ case "yolo" /* YOLO */:
31363
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31383
31364
  break;
31384
31365
  default:
31385
31366
  }
@@ -31789,11 +31770,11 @@ var useHookDisplayState = () => {
31789
31770
  removeHook();
31790
31771
  }
31791
31772
  };
31792
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
31793
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31773
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31774
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31794
31775
  return () => {
31795
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
31796
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31776
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31777
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31797
31778
  activeTimeouts.forEach(clearTimeout);
31798
31779
  activeTimeouts.clear();
31799
31780
  };
@@ -32632,7 +32613,7 @@ var AppContainer = (props) => {
32632
32613
  setConfigInitialized(true);
32633
32614
  startupProfiler.flush(config);
32634
32615
  startAutoMemoryIfEnabled(config);
32635
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32616
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32636
32617
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32637
32618
  if (result) {
32638
32619
  const additionalContext = result.getAdditionalContext();
@@ -32659,7 +32640,7 @@ var AppContainer = (props) => {
32659
32640
  );
32660
32641
  const ideClient = await IdeClient.getInstance();
32661
32642
  await ideClient.disconnect();
32662
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32643
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32663
32644
  };
32664
32645
  registerCleanup(cleanupFn);
32665
32646
  return () => {
@@ -32684,11 +32665,11 @@ var AppContainer = (props) => {
32684
32665
  resetTime: payload.resetTime
32685
32666
  });
32686
32667
  };
32687
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32688
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32668
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32669
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32689
32670
  return () => {
32690
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32691
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32671
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32672
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32692
32673
  };
32693
32674
  }, [config]);
32694
32675
  (0, import_react121.useEffect)(() => {
@@ -32701,16 +32682,16 @@ var AppContainer = (props) => {
32701
32682
  const handleAgentsDiscovered = (payload) => {
32702
32683
  setNewAgents(payload.agents);
32703
32684
  };
32704
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32705
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32706
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32685
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32686
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32687
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32707
32688
  return () => {
32708
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32689
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32709
32690
  coreEvents.off(
32710
- CoreEvent.AdminSettingsChanged,
32691
+ "admin-settings-changed" /* AdminSettingsChanged */,
32711
32692
  handleAdminSettingsChanged
32712
32693
  );
32713
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32694
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32714
32695
  };
32715
32696
  }, [settings]);
32716
32697
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32775,11 +32756,11 @@ var AppContainer = (props) => {
32775
32756
  exitEditorDialog
32776
32757
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32777
32758
  (0, import_react121.useEffect)(() => {
32778
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32779
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32759
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32760
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32780
32761
  return () => {
32781
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32782
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32762
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32763
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32783
32764
  };
32784
32765
  }, [handleEditorClose, openEditorDialog]);
32785
32766
  (0, import_react121.useEffect)(() => {
@@ -32847,7 +32828,7 @@ var AppContainer = (props) => {
32847
32828
  errorVerbosity: settings.merged.ui.errorVerbosity
32848
32829
  });
32849
32830
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32850
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32831
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32851
32832
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32852
32833
  const { loadHistoryForResume, isResuming } = useSessionResume({
32853
32834
  config,
@@ -32875,7 +32856,7 @@ var AppContainer = (props) => {
32875
32856
  async (authType, scope) => {
32876
32857
  if (authType) {
32877
32858
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32878
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32859
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32879
32860
  setAuthContext({ requiresRestart: true });
32880
32861
  } else {
32881
32862
  setAuthContext({});
@@ -32903,7 +32884,7 @@ var AppContainer = (props) => {
32903
32884
  );
32904
32885
  return;
32905
32886
  }
32906
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32887
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32907
32888
  writeToStdout(`
32908
32889
  ----------------------------------------------------------------
32909
32890
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32926,7 +32907,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32926
32907
  }
32927
32908
  await saveApiKey(apiKey);
32928
32909
  await reloadApiKey();
32929
- await config.refreshAuth(AuthType.USE_GEMINI);
32910
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32930
32911
  setAuthState("authenticated" /* Authenticated */);
32931
32912
  } catch (e) {
32932
32913
  onAuthError(
@@ -32951,7 +32932,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32951
32932
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32952
32933
  );
32953
32934
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32954
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32935
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32955
32936
  return;
32956
32937
  }
32957
32938
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33087,9 +33068,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33087
33068
  }
33088
33069
  });
33089
33070
  };
33090
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33071
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33091
33072
  return () => {
33092
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33073
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33093
33074
  };
33094
33075
  }, []);
33095
33076
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33747,7 +33728,7 @@ ${queuedText}` : queuedText;
33747
33728
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33748
33729
  if (settings.merged.general.devtools) {
33749
33730
  void (async () => {
33750
- const { toggleDevToolsPanel } = await import("./devtoolsService-OVSOSM56.js");
33731
+ const { toggleDevToolsPanel } = await import("./devtoolsService-ORERBA72.js");
33751
33732
  await toggleDevToolsPanel(
33752
33733
  config,
33753
33734
  showErrorDetails,
@@ -33965,17 +33946,17 @@ ${queuedText}` : queuedText;
33965
33946
  Date.now()
33966
33947
  );
33967
33948
  };
33968
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33969
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33949
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33950
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33970
33951
  coreEvents.drainBacklogs();
33971
33952
  return () => {
33972
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33973
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33953
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33954
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33974
33955
  };
33975
33956
  }, [historyManager]);
33976
33957
  const nightly = props.version.includes("nightly");
33977
33958
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
33978
- 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;
33959
+ 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;
33979
33960
  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;
33980
33961
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
33981
33962
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34075,9 +34056,9 @@ ${queuedText}` : queuedText;
34075
34056
  const handleMemoryChanged = (result) => {
34076
34057
  setGeminiMdFileCount(result.fileCount);
34077
34058
  };
34078
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34059
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34079
34060
  return () => {
34080
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34061
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34081
34062
  };
34082
34063
  }, []);
34083
34064
  (0, import_react121.useEffect)(() => {