@google/gemini-cli 0.39.0-preview.1 → 0.39.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 (39) hide show
  1. package/bundle/{chunk-7SQF544H.js → chunk-3YUTTNJ7.js} +23 -10
  2. package/bundle/{chunk-EZUZYRLG.js → chunk-5GTZHSZV.js} +4 -4
  3. package/bundle/{chunk-TULI5SFB.js → chunk-6NW5RNNH.js} +60 -72
  4. package/bundle/{chunk-MJR464GS.js → chunk-BL3XXS2L.js} +1 -1
  5. package/bundle/{chunk-D5PDFQWX.js → chunk-LUWQB4AS.js} +1 -1
  6. package/bundle/{chunk-OXN7IRB7.js → chunk-NWD4JYMB.js} +4 -4
  7. package/bundle/{chunk-P2IAFIFP.js → chunk-RTKRL6Y5.js} +11687 -6242
  8. package/bundle/{chunk-IP2YTTJH.js → chunk-UQGLVPZQ.js} +24 -10
  9. package/bundle/{chunk-OS555R2T.js → chunk-YYY7NKKR.js} +2 -2
  10. package/bundle/{cleanup-T6HLM5JP.js → cleanup-3LELZME2.js} +2 -2
  11. package/bundle/{cleanup-C647TEIA.js → cleanup-JJEXOHOA.js} +2 -2
  12. package/bundle/{cleanup-CZSIFJCD.js → cleanup-TTGHQXQN.js} +3 -3
  13. package/bundle/{core-IZKTELTX.js → core-LKKLDF4Z.js} +1 -1
  14. package/bundle/{dist-OST42PZR.js → core-Z2SYVMM5.js} +2 -2
  15. package/bundle/{devtoolsService-OEBSPLJN.js → devtoolsService-H64VB4IA.js} +2 -2
  16. package/bundle/{devtoolsService-GHSBU5R5.js → devtoolsService-L5LFSMIR.js} +2 -2
  17. package/bundle/{devtoolsService-2ROQ6LME.js → devtoolsService-UQCUIXV5.js} +4 -5
  18. package/bundle/{dist-ADH7BOBF.js → dist-FWHS5IHN.js} +1 -1
  19. package/bundle/{gemini-6BFSWN53.js → gemini-BI2PCDUT.js} +8 -8
  20. package/bundle/{gemini-GUA6PG6F.js → gemini-CMXEUOSI.js} +169 -184
  21. package/bundle/{gemini-IENVNLLQ.js → gemini-YNLABPKW.js} +8 -8
  22. package/bundle/gemini.js +3 -3
  23. package/bundle/{interactiveCli-FCDJTVQ3.js → interactiveCli-C46TDPVW.js} +4 -4
  24. package/bundle/{interactiveCli-P3PFIHWL.js → interactiveCli-LXXBYVNU.js} +258 -275
  25. package/bundle/{interactiveCli-FMNSXXHR.js → interactiveCli-P35Q3KZ2.js} +4 -4
  26. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  27. package/bundle/{oauth2-provider-6TB4NGWJ.js → oauth2-provider-7ZDLUOSM.js} +1 -1
  28. package/bundle/{oauth2-provider-AUIG7Q6O.js → oauth2-provider-CRWFOXYR.js} +1 -1
  29. package/bundle/{oauth2-provider-IXDXXQ6U.js → oauth2-provider-FEM5AIRT.js} +73 -39
  30. package/package.json +1 -1
  31. package/bundle/chunk-F2GDXAAF.js +0 -360274
  32. package/bundle/chunk-QHUP5MEL.js +0 -156
  33. package/bundle/chunk-WHPMO3WR.js +0 -101702
  34. package/bundle/cleanup-MYBJ6ZHP.js +0 -33
  35. package/bundle/devtoolsService-CR2UJLLC.js +0 -871
  36. package/bundle/dist-ZMA73RD7.js +0 -2010
  37. package/bundle/gemini-HENMLXDS.js +0 -15321
  38. package/bundle/interactiveCli-SEQ7RLOB.js +0 -34493
  39. package/bundle/oauth2-provider-UF547EKT.js +0 -237
@@ -197,7 +197,7 @@ import {
197
197
  widestLineFromStyledChars,
198
198
  wordBreakStyledChars,
199
199
  wrapStyledChars
200
- } from "./chunk-TULI5SFB.js";
200
+ } from "./chunk-5GTZHSZV.js";
201
201
  import {
202
202
  appEvents
203
203
  } from "./chunk-5PS3AYFU.js";
@@ -206,14 +206,12 @@ import {
206
206
  removeCleanup,
207
207
  runExitCleanup,
208
208
  setupTtyCheck
209
- } from "./chunk-QHUP5MEL.js";
209
+ } from "./chunk-YYY7NKKR.js";
210
210
  import {
211
211
  ApiKeyUpdatedEvent,
212
212
  AsyncFzf,
213
213
  AuthType,
214
- CompressionStatus,
215
214
  ConversationFinishedEvent,
216
- CoreToolCallStatus,
217
215
  CreditPurchaseClickEvent,
218
216
  EDITOR_DISPLAY_NAMES,
219
217
  EmptyWalletMenuShownEvent,
@@ -223,16 +221,11 @@ import {
223
221
  FileSearchFactory,
224
222
  FolderTrustDiscoveryService,
225
223
  G1_UTM_CAMPAIGNS,
226
- GeminiCliOperation,
227
- GeminiEventType,
228
224
  GitService,
229
225
  IdeClient,
230
226
  LegacyAgentProtocol,
231
227
  LlmRole,
232
228
  Logger,
233
- MCPDiscoveryState,
234
- MCPServerStatus,
235
- MessageSenderType,
236
229
  ModelNotFoundError,
237
230
  ModelSlashCommandEvent,
238
231
  OverageMenuShownEvent,
@@ -241,8 +234,6 @@ import {
241
234
  ProjectIdRequiredError,
242
235
  ROOT_SCHEDULER_ID,
243
236
  Scheduler,
244
- SessionEndReason,
245
- SessionStartSource,
246
237
  ShellExecutionService,
247
238
  SlashCommandStatus,
248
239
  TerminalQuotaError,
@@ -250,7 +241,6 @@ import {
250
241
  UserPromptEvent,
251
242
  UserTierId,
252
243
  ValidationRequiredError,
253
- WarningPriority,
254
244
  addMCPStatusChangeListener,
255
245
  allowEditorTypeInSandbox,
256
246
  belongsInConfirmationQueue,
@@ -333,13 +323,11 @@ import {
333
323
  validatePlanContent,
334
324
  validatePlanPath,
335
325
  writeToStdout
336
- } from "./chunk-F2GDXAAF.js";
326
+ } from "./chunk-3YUTTNJ7.js";
337
327
  import {
338
328
  ACTIVATE_SKILL_TOOL_NAME,
339
329
  AGENT_TOOL_NAME,
340
- ApprovalMode,
341
330
  ChangeAuthRequestedError,
342
- CoreEvent,
343
331
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
344
332
  DEFAULT_GEMINI_FLASH_MODEL,
345
333
  DEFAULT_GEMINI_MODEL,
@@ -350,16 +338,13 @@ import {
350
338
  GEMINI_DIR,
351
339
  GLOB_DISPLAY_NAME,
352
340
  GREP_DISPLAY_NAME,
353
- Kind,
354
341
  LS_DISPLAY_NAME,
355
- MessageBusType,
356
342
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
357
343
  PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
358
344
  PREVIEW_GEMINI_3_1_MODEL,
359
345
  PREVIEW_GEMINI_FLASH_MODEL,
360
346
  PREVIEW_GEMINI_MODEL,
361
347
  PREVIEW_GEMINI_MODEL_AUTO,
362
- QuestionType,
363
348
  READ_FILE_DISPLAY_NAME,
364
349
  READ_MANY_FILES_DISPLAY_NAME,
365
350
  SHELL_TOOL_NAME,
@@ -367,8 +352,6 @@ import {
367
352
  TOPIC_PARAM_STRATEGIC_INTENT,
368
353
  TOPIC_PARAM_SUMMARY,
369
354
  TOPIC_PARAM_TITLE,
370
- ToolConfirmationOutcome,
371
- ToolErrorType,
372
355
  UPDATE_TOPIC_DISPLAY_NAME,
373
356
  UPDATE_TOPIC_TOOL_NAME,
374
357
  UnauthorizedError,
@@ -398,7 +381,7 @@ import {
398
381
  safeJsonToMarkdown,
399
382
  shortenPath,
400
383
  tildeifyPath
401
- } from "./chunk-67TFD6HC.js";
384
+ } from "./chunk-QM5IP3NK.js";
402
385
  import "./chunk-664ZODQF.js";
403
386
  import "./chunk-RJTRUG2J.js";
404
387
  import "./chunk-IUUIT4SU.js";
@@ -5766,7 +5749,7 @@ function calculateShellMaxLines(options) {
5766
5749
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5767
5750
  return maxLinesBasedOnHeight;
5768
5751
  }
5769
- const isExecuting = status === CoreToolCallStatus.Executing;
5752
+ const isExecuting = status === "executing" /* Executing */;
5770
5753
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5771
5754
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5772
5755
  }
@@ -5799,10 +5782,10 @@ function isShellTool(name) {
5799
5782
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
5800
5783
  }
5801
5784
  function isThisShellFocusable(name, status, config) {
5802
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5785
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5803
5786
  }
5804
5787
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5805
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5788
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5806
5789
  }
5807
5790
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5808
5791
  const [userHasFocused, setUserHasFocused] = (0, import_react16.useState)(false);
@@ -6400,7 +6383,7 @@ var ToolMessage = ({
6400
6383
  paddingX: 1,
6401
6384
  flexDirection: "column",
6402
6385
  children: [
6403
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6386
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6404
6387
  McpProgressIndicator,
6405
6388
  {
6406
6389
  progress,
@@ -6417,8 +6400,8 @@ var ToolMessage = ({
6417
6400
  terminalWidth,
6418
6401
  renderOutputAsMarkdown,
6419
6402
  hasFocus: isThisShellFocused2,
6420
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
6421
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
6403
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
6404
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
6422
6405
  }
6423
6406
  ),
6424
6407
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
@@ -7118,7 +7101,7 @@ var ShellToolMessage = ({
7118
7101
  maxLinesLimit: maxLines
7119
7102
  });
7120
7103
  import_react23.default.useEffect(() => {
7121
- const isExecuting = status === CoreToolCallStatus.Executing;
7104
+ const isExecuting = status === "executing" /* Executing */;
7122
7105
  if (isExecuting && ptyId) {
7123
7106
  try {
7124
7107
  const childWidth = terminalWidth - 4;
@@ -7304,14 +7287,14 @@ var ToolActionsProvider = (props) => {
7304
7287
  }
7305
7288
  const details = tool.confirmationDetails;
7306
7289
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
7307
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
7290
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
7308
7291
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
7309
7292
  }
7310
7293
  if (tool.correlationId) {
7311
7294
  await config.getMessageBus().publish({
7312
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
7295
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
7313
7296
  correlationId: tool.correlationId,
7314
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
7297
+ confirmed: outcome !== "cancel" /* Cancel */,
7315
7298
  requiresUserConfirmation: false,
7316
7299
  outcome,
7317
7300
  payload
@@ -7330,7 +7313,7 @@ var ToolActionsProvider = (props) => {
7330
7313
  );
7331
7314
  const cancel = (0, import_react24.useCallback)(
7332
7315
  async (callId) => {
7333
- await confirm(callId, ToolConfirmationOutcome.Cancel);
7316
+ await confirm(callId, "cancel" /* Cancel */);
7334
7317
  },
7335
7318
  [confirm]
7336
7319
  );
@@ -7617,22 +7600,22 @@ var hasPayload = (res) => {
7617
7600
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
7618
7601
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
7619
7602
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
7620
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
7603
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
7621
7604
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
7622
7605
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
7623
7606
  const showDiffStat = !!diff.diffStat;
7624
7607
  const description = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
7625
7608
  let resultSummary = "";
7626
7609
  let resultColor = theme.text.secondary;
7627
- if (status === CoreToolCallStatus.AwaitingApproval) {
7610
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
7628
7611
  resultSummary = "Confirming";
7629
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
7612
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
7630
7613
  resultSummary = "Accepted";
7631
7614
  resultColor = theme.text.accent;
7632
- } else if (status === CoreToolCallStatus.Cancelled) {
7615
+ } else if (status === "cancelled" /* Cancelled */) {
7633
7616
  resultSummary = "Rejected";
7634
7617
  resultColor = theme.status.error;
7635
- } else if (status === CoreToolCallStatus.Error) {
7618
+ } else if (status === "error" /* Error */) {
7636
7619
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
7637
7620
  resultColor = theme.status.error;
7638
7621
  }
@@ -7663,7 +7646,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
7663
7646
  filename: diff.fileName,
7664
7647
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7665
7648
  availableTerminalHeight,
7666
- disableColor: status === CoreToolCallStatus.Cancelled
7649
+ disableColor: status === "cancelled" /* Cancelled */
7667
7650
  }
7668
7651
  );
7669
7652
  return { description, summary, payload };
@@ -7791,10 +7774,10 @@ var DenseToolMessage = (props) => {
7791
7774
  if (isGrepResult(resultDisplay)) {
7792
7775
  return getGenericSuccessData(resultDisplay, originalDescription);
7793
7776
  }
7794
- if (status === CoreToolCallStatus.Success && resultDisplay) {
7777
+ if (status === "success" /* Success */ && resultDisplay) {
7795
7778
  return getGenericSuccessData(resultDisplay, originalDescription);
7796
7779
  }
7797
- if (status === CoreToolCallStatus.Error) {
7780
+ if (status === "error" /* Error */) {
7798
7781
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7799
7782
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7800
7783
  "\u2192 ",
@@ -7835,7 +7818,7 @@ var DenseToolMessage = (props) => {
7835
7818
  language: fileExtension,
7836
7819
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7837
7820
  settings,
7838
- disableColor: status === CoreToolCallStatus.Cancelled,
7821
+ disableColor: status === "cancelled" /* Cancelled */,
7839
7822
  returnLines: true
7840
7823
  });
7841
7824
  } else {
@@ -7843,7 +7826,7 @@ var DenseToolMessage = (props) => {
7843
7826
  parsedLines,
7844
7827
  filename: diff.fileName,
7845
7828
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7846
- disableColor: status === CoreToolCallStatus.Cancelled
7829
+ disableColor: status === "cancelled" /* Cancelled */
7847
7830
  });
7848
7831
  }
7849
7832
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7973,7 +7956,7 @@ function isToolExecuting(pendingHistoryItems) {
7973
7956
  return pendingHistoryItems.some((item) => {
7974
7957
  if (item && item.type === "tool_group") {
7975
7958
  return item.tools.some(
7976
- (tool) => CoreToolCallStatus.Executing === tool.status
7959
+ (tool) => "executing" /* Executing */ === tool.status
7977
7960
  );
7978
7961
  }
7979
7962
  return false;
@@ -7982,7 +7965,7 @@ function isToolExecuting(pendingHistoryItems) {
7982
7965
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7983
7966
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7984
7967
  (item) => item.tools.some(
7985
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7968
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7986
7969
  )
7987
7970
  );
7988
7971
  }
@@ -8005,14 +7988,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
8005
7988
  if (isTrackedToolCall(t)) {
8006
7989
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
8007
7990
  } else {
8008
- return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7991
+ return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
8009
7992
  }
8010
7993
  });
8011
7994
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
8012
7995
  if (isTrackedToolCall(t)) {
8013
7996
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
8014
7997
  } else {
8015
- return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7998
+ return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
8016
7999
  }
8017
8000
  });
8018
8001
  const isShellCommand = toolsToInspect.some((t) => {
@@ -8111,7 +8094,7 @@ var ToolGroupMessage = ({
8111
8094
  const groupedTools = (0, import_react28.useMemo)(() => {
8112
8095
  const groups = [];
8113
8096
  for (const tool of visibleToolCalls) {
8114
- if (tool.kind === Kind.Agent) {
8097
+ if (tool.kind === "agent" /* Agent */) {
8115
8098
  const lastGroup = groups[groups.length - 1];
8116
8099
  if (Array.isArray(lastGroup)) {
8117
8100
  lastGroup.push(tool);
@@ -8165,7 +8148,7 @@ var ToolGroupMessage = ({
8165
8148
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
8166
8149
  let countToolCallsWithResults = 0;
8167
8150
  for (const tool of visibleToolCalls) {
8168
- if (tool.kind !== Kind.Agent) {
8151
+ if (tool.kind !== "agent" /* Agent */) {
8169
8152
  if (isCompactTool(tool, isCompactModeEnabled)) {
8170
8153
  if (hasDensePayload(tool)) {
8171
8154
  countToolCallsWithResults++;
@@ -8361,18 +8344,18 @@ function CompressionMessage({
8361
8344
  return "Compressing chat history";
8362
8345
  }
8363
8346
  switch (compressionStatus) {
8364
- case CompressionStatus.COMPRESSED:
8347
+ case 1 /* COMPRESSED */:
8365
8348
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
8366
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
8349
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
8367
8350
  if (originalTokens < 5e4) {
8368
8351
  return "Compression was not beneficial for this history size.";
8369
8352
  }
8370
8353
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
8371
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
8354
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
8372
8355
  return "Could not compress chat history due to a token counting error.";
8373
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
8356
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
8374
8357
  return "Chat history compression failed: the model returned an empty summary.";
8375
- case CompressionStatus.NOOP:
8358
+ case 5 /* NOOP */:
8376
8359
  return "Nothing to compress.";
8377
8360
  default:
8378
8361
  return "";
@@ -8786,8 +8769,8 @@ var ModelUsageTable = ({ models }) => {
8786
8769
  );
8787
8770
  roleEntries.sort(([a], [b]) => {
8788
8771
  if (a === b) return 0;
8789
- if (a === LlmRole.MAIN) return -1;
8790
- if (b === LlmRole.MAIN) return 1;
8772
+ if (a === "main" /* MAIN */) return -1;
8773
+ if (b === "main" /* MAIN */) return 1;
8791
8774
  return a.localeCompare(b);
8792
8775
  });
8793
8776
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -9118,8 +9101,8 @@ var ModelStatsDisplay = ({
9118
9101
  return validRoles.includes(role);
9119
9102
  }).sort((a, b) => {
9120
9103
  if (a === b) return 0;
9121
- if (a === LlmRole.MAIN) return -1;
9122
- if (b === LlmRole.MAIN) return 1;
9104
+ if (a === "main" /* MAIN */) return -1;
9105
+ if (b === "main" /* MAIN */) return 1;
9123
9106
  return a.localeCompare(b);
9124
9107
  });
9125
9108
  const createRow = (metric, getValue, options = {}) => {
@@ -9909,7 +9892,7 @@ var McpStatus = ({
9909
9892
  );
9910
9893
  const originalStatus = serverStatus(serverName);
9911
9894
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9912
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9895
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9913
9896
  let statusIndicator = "";
9914
9897
  let statusText = "";
9915
9898
  let statusColor = theme.text.primary;
@@ -9921,17 +9904,17 @@ var McpStatus = ({
9921
9904
  statusColor = theme.text.secondary;
9922
9905
  } else {
9923
9906
  switch (status) {
9924
- case MCPServerStatus.CONNECTED:
9907
+ case "connected" /* CONNECTED */:
9925
9908
  statusIndicator = "\u{1F7E2}";
9926
9909
  statusText = "Ready";
9927
9910
  statusColor = theme.status.success;
9928
9911
  break;
9929
- case MCPServerStatus.CONNECTING:
9912
+ case "connecting" /* CONNECTING */:
9930
9913
  statusIndicator = "\u{1F504}";
9931
9914
  statusText = "Starting... (first startup may take longer)";
9932
9915
  statusColor = theme.status.warning;
9933
9916
  break;
9934
- case MCPServerStatus.DISCONNECTED:
9917
+ case "disconnected" /* DISCONNECTED */:
9935
9918
  default:
9936
9919
  statusIndicator = "\u{1F534}";
9937
9920
  statusText = "Disconnected";
@@ -9979,12 +9962,12 @@ var McpStatus = ({
9979
9962
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
9980
9963
  " - ",
9981
9964
  statusText,
9982
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9965
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9983
9966
  ] }),
9984
9967
  authStatusNode
9985
9968
  ] }),
9986
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9987
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
9969
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9970
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
9988
9971
  " (",
9989
9972
  toolCount,
9990
9973
  " tools cached)"
@@ -10463,7 +10446,7 @@ var Notifications = () => {
10463
10446
  if (dismissed) return [];
10464
10447
  const counts = persistentState.get("startupWarningCounts") || {};
10465
10448
  return startupWarnings.filter((w) => {
10466
- if (w.priority === WarningPriority.Low) {
10449
+ if (w.priority === "low" /* Low */) {
10467
10450
  const count = counts[w.id] || 0;
10468
10451
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10469
10452
  }
@@ -10476,7 +10459,7 @@ var Notifications = () => {
10476
10459
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10477
10460
  let changed = false;
10478
10461
  visibleWarnings.forEach((w) => {
10479
- if (w.priority === WarningPriority.Low) {
10462
+ if (w.priority === "low" /* Low */) {
10480
10463
  counts[w.id] = (counts[w.id] || 0) + 1;
10481
10464
  changed = true;
10482
10465
  }
@@ -10583,7 +10566,7 @@ var UserIdentity = ({ config }) => {
10583
10566
  }
10584
10567
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Box_default, { flexDirection: "column", children: [
10585
10568
  /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Box_default, { children: [
10586
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Text, { children: [
10569
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Text, { children: [
10587
10570
  /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Text, { bold: true, children: [
10588
10571
  "Signed in with Google",
10589
10572
  email ? ":" : ""
@@ -10817,7 +10800,7 @@ var import_react39 = __toESM(require_react(), 1);
10817
10800
  function getConfirmingToolState(pendingHistoryItems) {
10818
10801
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10819
10802
  const confirmingTools = allPendingTools.filter(
10820
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10803
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10821
10804
  );
10822
10805
  if (confirmingTools.length === 0) {
10823
10806
  return null;
@@ -12127,7 +12110,7 @@ var ExitPlanModeDialog = ({
12127
12110
  {
12128
12111
  questions: [
12129
12112
  {
12130
- type: QuestionType.CHOICE,
12113
+ type: "choice" /* CHOICE */,
12131
12114
  header: "Approval",
12132
12115
  question: planContent,
12133
12116
  options: [
@@ -12148,9 +12131,9 @@ var ExitPlanModeDialog = ({
12148
12131
  onSubmit: (answers) => {
12149
12132
  const answer = answers["0"];
12150
12133
  if (answer === "Yes, automatically accept edits" /* Auto */) {
12151
- onApprove(ApprovalMode.AUTO_EDIT);
12134
+ onApprove("autoEdit" /* AUTO_EDIT */);
12152
12135
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
12153
- onApprove(ApprovalMode.DEFAULT);
12136
+ onApprove("default" /* DEFAULT */);
12154
12137
  } else if (answer) {
12155
12138
  onFeedback(answer);
12156
12139
  }
@@ -12361,7 +12344,7 @@ ${deceptiveUrlWarnings.map(
12361
12344
  );
12362
12345
  (0, import_react44.useEffect)(() => {
12363
12346
  if (isCancelling) {
12364
- handleConfirm(ToolConfirmationOutcome.Cancel);
12347
+ handleConfirm("cancel" /* Cancel */);
12365
12348
  }
12366
12349
  }, [isCancelling, handleConfirm]);
12367
12350
  const handleSelect = (0, import_react44.useCallback)(
@@ -12374,19 +12357,19 @@ ${deceptiveUrlWarnings.map(
12374
12357
  if (!confirmationDetails.isModifying) {
12375
12358
  options2.push({
12376
12359
  label: "Allow once",
12377
- value: ToolConfirmationOutcome.ProceedOnce,
12360
+ value: "proceed_once" /* ProceedOnce */,
12378
12361
  key: "Allow once"
12379
12362
  });
12380
12363
  if (isTrustedFolder) {
12381
12364
  options2.push({
12382
12365
  label: "Allow for this session",
12383
- value: ToolConfirmationOutcome.ProceedAlways,
12366
+ value: "proceed_always" /* ProceedAlways */,
12384
12367
  key: "Allow for this session"
12385
12368
  });
12386
12369
  if (allowPermanentApproval) {
12387
12370
  options2.push({
12388
12371
  label: "Allow for this file in all future sessions",
12389
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12372
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12390
12373
  key: "Allow for this file in all future sessions"
12391
12374
  });
12392
12375
  }
@@ -12394,119 +12377,119 @@ ${deceptiveUrlWarnings.map(
12394
12377
  if (!config.getIdeMode() || !isDiffingEnabled) {
12395
12378
  options2.push({
12396
12379
  label: "Modify with external editor",
12397
- value: ToolConfirmationOutcome.ModifyWithEditor,
12380
+ value: "modify_with_editor" /* ModifyWithEditor */,
12398
12381
  key: "Modify with external editor"
12399
12382
  });
12400
12383
  }
12401
12384
  options2.push({
12402
12385
  label: "No, suggest changes (esc)",
12403
- value: ToolConfirmationOutcome.Cancel,
12386
+ value: "cancel" /* Cancel */,
12404
12387
  key: "No, suggest changes (esc)"
12405
12388
  });
12406
12389
  }
12407
12390
  } else if (confirmationDetails.type === "sandbox_expansion") {
12408
12391
  options2.push({
12409
12392
  label: "Allow once",
12410
- value: ToolConfirmationOutcome.ProceedOnce,
12393
+ value: "proceed_once" /* ProceedOnce */,
12411
12394
  key: "Allow once"
12412
12395
  });
12413
12396
  if (isTrustedFolder) {
12414
12397
  options2.push({
12415
12398
  label: "Allow for this session",
12416
- value: ToolConfirmationOutcome.ProceedAlways,
12399
+ value: "proceed_always" /* ProceedAlways */,
12417
12400
  key: "Allow for this session"
12418
12401
  });
12419
12402
  if (allowPermanentApproval) {
12420
12403
  options2.push({
12421
12404
  label: "Allow for all future sessions",
12422
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12405
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12423
12406
  key: "Allow for all future sessions"
12424
12407
  });
12425
12408
  }
12426
12409
  }
12427
12410
  options2.push({
12428
12411
  label: "No, suggest changes (esc)",
12429
- value: ToolConfirmationOutcome.Cancel,
12412
+ value: "cancel" /* Cancel */,
12430
12413
  key: "No, suggest changes (esc)"
12431
12414
  });
12432
12415
  } else if (confirmationDetails.type === "exec") {
12433
12416
  options2.push({
12434
12417
  label: "Allow once",
12435
- value: ToolConfirmationOutcome.ProceedOnce,
12418
+ value: "proceed_once" /* ProceedOnce */,
12436
12419
  key: "Allow once"
12437
12420
  });
12438
12421
  if (isTrustedFolder) {
12439
12422
  options2.push({
12440
12423
  label: `Allow for this session`,
12441
- value: ToolConfirmationOutcome.ProceedAlways,
12424
+ value: "proceed_always" /* ProceedAlways */,
12442
12425
  key: `Allow for this session`
12443
12426
  });
12444
12427
  if (allowPermanentApproval) {
12445
12428
  options2.push({
12446
12429
  label: `Allow this command for all future sessions`,
12447
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12430
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12448
12431
  key: `Allow for all future sessions`
12449
12432
  });
12450
12433
  }
12451
12434
  }
12452
12435
  options2.push({
12453
12436
  label: "No, suggest changes (esc)",
12454
- value: ToolConfirmationOutcome.Cancel,
12437
+ value: "cancel" /* Cancel */,
12455
12438
  key: "No, suggest changes (esc)"
12456
12439
  });
12457
12440
  } else if (confirmationDetails.type === "info") {
12458
12441
  options2.push({
12459
12442
  label: "Allow once",
12460
- value: ToolConfirmationOutcome.ProceedOnce,
12443
+ value: "proceed_once" /* ProceedOnce */,
12461
12444
  key: "Allow once"
12462
12445
  });
12463
12446
  if (isTrustedFolder) {
12464
12447
  options2.push({
12465
12448
  label: "Allow for this session",
12466
- value: ToolConfirmationOutcome.ProceedAlways,
12449
+ value: "proceed_always" /* ProceedAlways */,
12467
12450
  key: "Allow for this session"
12468
12451
  });
12469
12452
  if (allowPermanentApproval) {
12470
12453
  options2.push({
12471
12454
  label: "Allow for all future sessions",
12472
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12455
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12473
12456
  key: "Allow for all future sessions"
12474
12457
  });
12475
12458
  }
12476
12459
  }
12477
12460
  options2.push({
12478
12461
  label: "No, suggest changes (esc)",
12479
- value: ToolConfirmationOutcome.Cancel,
12462
+ value: "cancel" /* Cancel */,
12480
12463
  key: "No, suggest changes (esc)"
12481
12464
  });
12482
12465
  } else if (confirmationDetails.type === "mcp") {
12483
12466
  options2.push({
12484
12467
  label: "Allow once",
12485
- value: ToolConfirmationOutcome.ProceedOnce,
12468
+ value: "proceed_once" /* ProceedOnce */,
12486
12469
  key: "Allow once"
12487
12470
  });
12488
12471
  if (isTrustedFolder) {
12489
12472
  options2.push({
12490
12473
  label: "Allow tool for this session",
12491
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
12474
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
12492
12475
  key: "Allow tool for this session"
12493
12476
  });
12494
12477
  options2.push({
12495
12478
  label: "Allow all server tools for this session",
12496
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
12479
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
12497
12480
  key: "Allow all server tools for this session"
12498
12481
  });
12499
12482
  if (allowPermanentApproval) {
12500
12483
  options2.push({
12501
12484
  label: "Allow tool for all future sessions",
12502
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12485
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12503
12486
  key: "Allow tool for all future sessions"
12504
12487
  });
12505
12488
  }
12506
12489
  }
12507
12490
  options2.push({
12508
12491
  label: "No, suggest changes (esc)",
12509
- value: ToolConfirmationOutcome.Cancel,
12492
+ value: "cancel" /* Cancel */,
12510
12493
  key: "No, suggest changes (esc)"
12511
12494
  });
12512
12495
  }
@@ -12545,7 +12528,7 @@ ${deceptiveUrlWarnings.map(
12545
12528
  const containsRedirection = commandsToDisplay.some(
12546
12529
  (cmd) => hasRedirection(cmd)
12547
12530
  );
12548
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12531
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12549
12532
  if (containsRedirection && !isAutoEdit) {
12550
12533
  extraInfoLines = 1;
12551
12534
  }
@@ -12571,7 +12554,7 @@ ${deceptiveUrlWarnings.map(
12571
12554
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12572
12555
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12573
12556
  const alwaysAndSaveIndex = options2.findIndex(
12574
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12557
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12575
12558
  );
12576
12559
  if (alwaysAndSaveIndex !== -1) {
12577
12560
  initialIndex2 = alwaysAndSaveIndex;
@@ -12588,10 +12571,10 @@ ${deceptiveUrlWarnings.map(
12588
12571
  {
12589
12572
  questions: confirmationDetails.questions,
12590
12573
  onSubmit: (answers) => {
12591
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12574
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12592
12575
  },
12593
12576
  onCancel: () => {
12594
- handleConfirm(ToolConfirmationOutcome.Cancel);
12577
+ handleConfirm("cancel" /* Cancel */);
12595
12578
  },
12596
12579
  width: terminalWidth,
12597
12580
  availableHeight: bodyHeight
@@ -12612,19 +12595,19 @@ ${deceptiveUrlWarnings.map(
12612
12595
  planPath: confirmationDetails.planPath,
12613
12596
  getPreferredEditor,
12614
12597
  onApprove: (approvalMode) => {
12615
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12598
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12616
12599
  approved: true,
12617
12600
  approvalMode
12618
12601
  });
12619
12602
  },
12620
12603
  onFeedback: (feedback) => {
12621
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12604
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12622
12605
  approved: false,
12623
12606
  feedback
12624
12607
  });
12625
12608
  },
12626
12609
  onCancel: () => {
12627
- handleConfirm(ToolConfirmationOutcome.Cancel);
12610
+ handleConfirm("cancel" /* Cancel */);
12628
12611
  },
12629
12612
  width: terminalWidth,
12630
12613
  availableHeight: bodyHeight
@@ -12734,7 +12717,7 @@ ${deceptiveUrlWarnings.map(
12734
12717
  const containsRedirection = commandsToDisplay.some(
12735
12718
  (cmd) => hasRedirection(cmd)
12736
12719
  );
12737
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12720
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12738
12721
  let warnings = null;
12739
12722
  if (containsRedirection && !isAutoEdit) {
12740
12723
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12897,7 +12880,7 @@ ${deceptiveUrlWarnings.map(
12897
12880
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12898
12881
  const renderRadioItem = (0, import_react44.useCallback)(
12899
12882
  (item, { titleColor }) => {
12900
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12883
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12901
12884
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12902
12885
  item.label,
12903
12886
  " ",
@@ -15053,7 +15036,7 @@ function validateAuthMethodWithSettings(authType, settings) {
15053
15036
  if (settings.merged.security.auth.useExternal) {
15054
15037
  return null;
15055
15038
  }
15056
- if (authType === AuthType.USE_GEMINI) {
15039
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
15057
15040
  return null;
15058
15041
  }
15059
15042
  return validateAuthMethod(authType);
@@ -15105,7 +15088,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
15105
15088
  }
15106
15089
  return;
15107
15090
  }
15108
- if (authType === AuthType.USE_GEMINI) {
15091
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
15109
15092
  const key = await reloadApiKey();
15110
15093
  if (!key) {
15111
15094
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -15180,31 +15163,31 @@ function AuthDialog({
15180
15163
  let items = [
15181
15164
  {
15182
15165
  label: "Sign in with Google",
15183
- value: AuthType.LOGIN_WITH_GOOGLE,
15184
- key: AuthType.LOGIN_WITH_GOOGLE
15166
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
15167
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
15185
15168
  },
15186
15169
  ...process.env["CLOUD_SHELL"] === "true" ? [
15187
15170
  {
15188
15171
  label: "Use Cloud Shell user credentials",
15189
- value: AuthType.COMPUTE_ADC,
15190
- key: AuthType.COMPUTE_ADC
15172
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
15173
+ key: "compute-default-credentials" /* COMPUTE_ADC */
15191
15174
  }
15192
15175
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
15193
15176
  {
15194
15177
  label: "Use metadata server application default credentials",
15195
- value: AuthType.COMPUTE_ADC,
15196
- key: AuthType.COMPUTE_ADC
15178
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
15179
+ key: "compute-default-credentials" /* COMPUTE_ADC */
15197
15180
  }
15198
15181
  ] : [],
15199
15182
  {
15200
15183
  label: "Use Gemini API Key",
15201
- value: AuthType.USE_GEMINI,
15202
- key: AuthType.USE_GEMINI
15184
+ value: "gemini-api-key" /* USE_GEMINI */,
15185
+ key: "gemini-api-key" /* USE_GEMINI */
15203
15186
  },
15204
15187
  {
15205
15188
  label: "Vertex AI",
15206
- value: AuthType.USE_VERTEX_AI,
15207
- key: AuthType.USE_VERTEX_AI
15189
+ value: "vertex-ai" /* USE_VERTEX_AI */,
15190
+ key: "vertex-ai" /* USE_VERTEX_AI */
15208
15191
  }
15209
15192
  ];
15210
15193
  if (settings.merged.security.auth.enforcedType) {
@@ -15226,9 +15209,9 @@ function AuthDialog({
15226
15209
  return item.value === defaultAuthType;
15227
15210
  }
15228
15211
  if (process.env["GEMINI_API_KEY"]) {
15229
- return item.value === AuthType.USE_GEMINI;
15212
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
15230
15213
  }
15231
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
15214
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
15232
15215
  });
15233
15216
  if (settings.merged.security.auth.enforcedType) {
15234
15217
  initialAuthIndex = 0;
@@ -15239,19 +15222,19 @@ function AuthDialog({
15239
15222
  return;
15240
15223
  }
15241
15224
  if (authType) {
15242
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
15225
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
15243
15226
  setAuthContext({ requiresRestart: true });
15244
15227
  } else {
15245
15228
  setAuthContext({});
15246
15229
  }
15247
15230
  await clearCachedCredentialFile();
15248
15231
  settings.setValue(scope, "security.auth.selectedType", authType);
15249
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
15232
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
15250
15233
  setExiting(true);
15251
15234
  setTimeout(relaunchApp, 100);
15252
15235
  return;
15253
15236
  }
15254
- if (authType === AuthType.USE_GEMINI) {
15237
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
15255
15238
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
15256
15239
  return;
15257
15240
  }
@@ -16001,11 +15984,11 @@ var PrivacyNoticeText = ({
16001
15984
  }) => {
16002
15985
  const authType = config.getContentGeneratorConfig()?.authType;
16003
15986
  switch (authType) {
16004
- case AuthType.USE_GEMINI:
15987
+ case "gemini-api-key" /* USE_GEMINI */:
16005
15988
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GeminiPrivacyNotice, { onExit });
16006
- case AuthType.USE_VERTEX_AI:
15989
+ case "vertex-ai" /* USE_VERTEX_AI */:
16007
15990
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CloudPaidPrivacyNotice, { onExit });
16008
- case AuthType.LOGIN_WITH_GOOGLE:
15991
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
16009
15992
  default:
16010
15993
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CloudFreePrivacyNotice, { config, onExit });
16011
15994
  }
@@ -16046,7 +16029,7 @@ function ProQuotaDialog({
16046
16029
  value: "retry_always",
16047
16030
  key: "retry_always"
16048
16031
  },
16049
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
16032
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
16050
16033
  {
16051
16034
  label: "Upgrade for higher limits",
16052
16035
  value: "upgrade",
@@ -17199,7 +17182,7 @@ function ModelDialog({ onClose }) {
17199
17182
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
17200
17183
  const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
17201
17184
  const selectedAuthType = settings.merged.security.auth.selectedType;
17202
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
17185
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
17203
17186
  const manualModelSelected = (0, import_react62.useMemo)(() => {
17204
17187
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
17205
17188
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -18251,10 +18234,10 @@ function initializeConsoleStore() {
18251
18234
  globalConsoleMessages = [];
18252
18235
  globalErrorCount = 0;
18253
18236
  notifyListeners();
18254
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
18255
- coreEvents.off(CoreEvent.Output, handleOutput);
18256
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
18257
- coreEvents.on(CoreEvent.Output, handleOutput);
18237
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
18238
+ coreEvents.off("output" /* Output */, handleOutput);
18239
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
18240
+ coreEvents.on("output" /* Output */, handleOutput);
18258
18241
  }
18259
18242
  function notifyListeners() {
18260
18243
  for (const listener of listeners) {
@@ -20330,7 +20313,7 @@ function usePromptCompletion({
20330
20313
  { model: "prompt-completion" },
20331
20314
  contents,
20332
20315
  signal,
20333
- LlmRole.UTILITY_AUTOCOMPLETE
20316
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20334
20317
  );
20335
20318
  if (signal.aborted) {
20336
20319
  return;
@@ -22067,9 +22050,9 @@ var InputPrompt = ({
22067
22050
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22068
22051
  }
22069
22052
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22070
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22071
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22072
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22053
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22054
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22055
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22073
22056
  let statusColor;
22074
22057
  let statusText = "";
22075
22058
  if (shellModeActive) {
@@ -22915,22 +22898,22 @@ var ApprovalModeIndicator = ({
22915
22898
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
22916
22899
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
22917
22900
  switch (approvalMode) {
22918
- case ApprovalMode.AUTO_EDIT:
22901
+ case "autoEdit" /* AUTO_EDIT */:
22919
22902
  textColor = theme.status.warning;
22920
22903
  textContent = "auto-accept edits";
22921
22904
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
22922
22905
  break;
22923
- case ApprovalMode.PLAN:
22906
+ case "plan" /* PLAN */:
22924
22907
  textColor = theme.status.success;
22925
22908
  textContent = "plan";
22926
22909
  subText = `${cycleHint} to manual`;
22927
22910
  break;
22928
- case ApprovalMode.YOLO:
22911
+ case "yolo" /* YOLO */:
22929
22912
  textColor = theme.status.error;
22930
22913
  textContent = "YOLO";
22931
22914
  subText = yoloHint;
22932
22915
  break;
22933
- case ApprovalMode.DEFAULT:
22916
+ case "default" /* DEFAULT */:
22934
22917
  default:
22935
22918
  textColor = theme.text.accent;
22936
22919
  textContent = "";
@@ -22978,7 +22961,7 @@ var useComposerStatus = () => {
22978
22961
  (item) => item.type === "tool_group"
22979
22962
  ).some(
22980
22963
  (item) => item.tools.some(
22981
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
22964
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
22982
22965
  )
22983
22966
  ),
22984
22967
  [uiState.pendingHistoryItems]
@@ -22993,13 +22976,13 @@ var useComposerStatus = () => {
22993
22976
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
22994
22977
  if (hideMinimalModeHintWhileBusy) return null;
22995
22978
  switch (showApprovalModeIndicator) {
22996
- case ApprovalMode.YOLO:
22979
+ case "yolo" /* YOLO */:
22997
22980
  return { text: "YOLO", color: theme.status.error };
22998
- case ApprovalMode.PLAN:
22981
+ case "plan" /* PLAN */:
22999
22982
  return { text: "plan", color: theme.status.success };
23000
- case ApprovalMode.AUTO_EDIT:
22983
+ case "autoEdit" /* AUTO_EDIT */:
23001
22984
  return { text: "auto edit", color: theme.status.warning };
23002
- case ApprovalMode.DEFAULT:
22985
+ case "default" /* DEFAULT */:
23003
22986
  default:
23004
22987
  return null;
23005
22988
  }
@@ -23353,7 +23336,7 @@ var ConfigInitDisplay = ({
23353
23336
  let connected = 0;
23354
23337
  const connecting = [];
23355
23338
  for (const [name, client] of clients.entries()) {
23356
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23339
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23357
23340
  connected++;
23358
23341
  } else {
23359
23342
  connecting.push(name);
@@ -23375,9 +23358,9 @@ var ConfigInitDisplay = ({
23375
23358
  );
23376
23359
  }
23377
23360
  };
23378
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23361
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23379
23362
  return () => {
23380
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23363
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23381
23364
  };
23382
23365
  }, [initialMessage]);
23383
23366
  return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Text, { children: [
@@ -24102,7 +24085,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24102
24085
  callId,
24103
24086
  name: SHELL_COMMAND_NAME,
24104
24087
  description: rawQuery,
24105
- status: CoreToolCallStatus.Executing,
24088
+ status: "executing" /* Executing */,
24106
24089
  isClientInitiated: true,
24107
24090
  resultDisplay: "",
24108
24091
  confirmationDetails: void 0
@@ -24228,7 +24211,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24228
24211
  mainContent = result.output.trim() || "(Command produced no output)";
24229
24212
  }
24230
24213
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24231
- let finalStatus = CoreToolCallStatus.Success;
24214
+ let finalStatus = "success" /* Success */;
24232
24215
  const prependToAnsiOutput = (output, text) => {
24233
24216
  const newLines = text.split("\n").map((line) => [
24234
24217
  {
@@ -24247,20 +24230,20 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24247
24230
  };
24248
24231
  let prefix = "";
24249
24232
  if (result.error) {
24250
- finalStatus = CoreToolCallStatus.Error;
24233
+ finalStatus = "error" /* Error */;
24251
24234
  prefix = result.error.message;
24252
24235
  } else if (result.aborted) {
24253
- finalStatus = CoreToolCallStatus.Cancelled;
24236
+ finalStatus = "cancelled" /* Cancelled */;
24254
24237
  prefix = "Command was cancelled.";
24255
24238
  } else if (result.backgrounded) {
24256
- finalStatus = CoreToolCallStatus.Success;
24239
+ finalStatus = "success" /* Success */;
24257
24240
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24258
24241
  mainContent = finalOutput;
24259
24242
  } else if (result.signal) {
24260
- finalStatus = CoreToolCallStatus.Error;
24243
+ finalStatus = "error" /* Error */;
24261
24244
  prefix = `Command terminated by signal: ${result.signal}.`;
24262
24245
  } else if (result.exitCode !== 0) {
24263
- finalStatus = CoreToolCallStatus.Error;
24246
+ finalStatus = "error" /* Error */;
24264
24247
  prefix = `Command exited with code ${result.exitCode}.`;
24265
24248
  }
24266
24249
  if (prefix) {
@@ -24286,7 +24269,7 @@ ${mainContent}`;
24286
24269
  status: finalStatus,
24287
24270
  resultDisplay: finalOutput
24288
24271
  };
24289
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24272
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24290
24273
  addItemToHistory(
24291
24274
  {
24292
24275
  type: "tool_group",
@@ -25267,7 +25250,7 @@ function useQuotaAndFallback({
25267
25250
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25268
25251
  `/stats model for usage details`,
25269
25252
  `/model to switch models.`,
25270
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25253
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25271
25254
  ].filter(Boolean);
25272
25255
  message = messageLines.join("\n");
25273
25256
  } else if (error instanceof ModelNotFoundError) {
@@ -25455,7 +25438,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25455
25438
  );
25456
25439
  setEditorError(null);
25457
25440
  setIsEditorDialogOpen(false);
25458
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25441
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25459
25442
  } catch (error) {
25460
25443
  setEditorError(`Failed to set editor preference: ${error}`);
25461
25444
  }
@@ -25464,7 +25447,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25464
25447
  );
25465
25448
  const exitEditorDialog = (0, import_react95.useCallback)(() => {
25466
25449
  setIsEditorDialogOpen(false);
25467
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25450
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25468
25451
  }, []);
25469
25452
  return {
25470
25453
  isEditorDialogOpen,
@@ -25819,7 +25802,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25819
25802
  canonicalPath: resolvedCommandPath
25820
25803
  } = parseSlashCommand(trimmed, commands);
25821
25804
  if (!commandToExecute) {
25822
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25805
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25823
25806
  if (isMcpLoading) {
25824
25807
  setIsProcessing(true);
25825
25808
  if (addToHistory) {
@@ -25987,7 +25970,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25987
25970
  onConfirm: async (resolvedOutcome) => {
25988
25971
  resolve3({
25989
25972
  outcome: resolvedOutcome,
25990
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
25973
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
25991
25974
  });
25992
25975
  }
25993
25976
  };
@@ -25995,7 +25978,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25995
25978
  callId,
25996
25979
  name: "Expansion",
25997
25980
  description: "Command expansion needs shell access",
25998
- status: CoreToolCallStatus.AwaitingApproval,
25981
+ status: "awaiting_approval" /* AwaitingApproval */,
25999
25982
  isClientInitiated: true,
26000
25983
  resultDisplay: void 0,
26001
25984
  confirmationDetails
@@ -26006,7 +25989,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26006
25989
  });
26007
25990
  });
26008
25991
  setPendingItem(null);
26009
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
25992
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26010
25993
  addItem(
26011
25994
  {
26012
25995
  type: "info" /* INFO */,
@@ -26016,7 +25999,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26016
25999
  );
26017
26000
  return { type: "handled" };
26018
26001
  }
26019
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26002
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26020
26003
  setSessionShellAllowlist(
26021
26004
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26022
26005
  );
@@ -26492,7 +26475,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26492
26475
  let description;
26493
26476
  let renderOutputAsMarkdown = false;
26494
26477
  const displayName = call.tool?.displayName ?? call.request.name;
26495
- if (call.status === CoreToolCallStatus.Error) {
26478
+ if (call.status === "error" /* Error */) {
26496
26479
  description = JSON.stringify(call.request.args);
26497
26480
  } else {
26498
26481
  description = call.invocation.getDescription();
@@ -26515,27 +26498,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26515
26498
  let progress = void 0;
26516
26499
  let progressTotal = void 0;
26517
26500
  switch (call.status) {
26518
- case CoreToolCallStatus.Success:
26501
+ case "success" /* Success */:
26519
26502
  resultDisplay = call.response.resultDisplay;
26520
26503
  outputFile = call.response.outputFile;
26521
26504
  break;
26522
- case CoreToolCallStatus.Error:
26523
- case CoreToolCallStatus.Cancelled:
26505
+ case "error" /* Error */:
26506
+ case "cancelled" /* Cancelled */:
26524
26507
  resultDisplay = call.response.resultDisplay;
26525
26508
  break;
26526
- case CoreToolCallStatus.AwaitingApproval:
26509
+ case "awaiting_approval" /* AwaitingApproval */:
26527
26510
  correlationId = call.correlationId;
26528
26511
  confirmationDetails = call.confirmationDetails;
26529
26512
  break;
26530
- case CoreToolCallStatus.Executing:
26513
+ case "executing" /* Executing */:
26531
26514
  resultDisplay = call.liveOutput;
26532
26515
  ptyId = call.pid;
26533
26516
  progressMessage = call.progressMessage;
26534
26517
  progress = call.progress;
26535
26518
  progressTotal = call.progressTotal;
26536
26519
  break;
26537
- case CoreToolCallStatus.Scheduled:
26538
- case CoreToolCallStatus.Validating:
26520
+ case "scheduled" /* Scheduled */:
26521
+ case "validating" /* Validating */:
26539
26522
  break;
26540
26523
  default: {
26541
26524
  const exhaustiveCheck = call;
@@ -26606,7 +26589,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26606
26589
  const handler = (event) => {
26607
26590
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26608
26591
  const hasExecuting = event.toolCalls.some(
26609
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26592
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26610
26593
  );
26611
26594
  if (hasExecuting) {
26612
26595
  setLastToolOutputTime(Date.now());
@@ -26615,7 +26598,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26615
26598
  const prevCalls = prev[event.schedulerId] ?? [];
26616
26599
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26617
26600
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26618
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26601
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26619
26602
  );
26620
26603
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26621
26604
  return prev;
@@ -26627,9 +26610,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26627
26610
  };
26628
26611
  });
26629
26612
  };
26630
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26613
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26631
26614
  return () => {
26632
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26615
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26633
26616
  };
26634
26617
  }, [messageBus, internalAdaptToolCalls]);
26635
26618
  (0, import_react101.useEffect)(() => {
@@ -26651,9 +26634,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26651
26634
  };
26652
26635
  });
26653
26636
  };
26654
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26637
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26655
26638
  return () => {
26656
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26639
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26657
26640
  };
26658
26641
  }, [messageBus]);
26659
26642
  const schedule = (0, import_react101.useCallback)(
@@ -26752,8 +26735,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26752
26735
  const prev = prevMap.get(coreCall.request.callId);
26753
26736
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26754
26737
  let status = coreCall.status;
26755
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26756
- status = CoreToolCallStatus.Executing;
26738
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26739
+ status = "executing" /* Executing */;
26757
26740
  }
26758
26741
  return {
26759
26742
  ...coreCall,
@@ -26785,7 +26768,7 @@ function getBackgroundedToolInfo(toolCall) {
26785
26768
  };
26786
26769
  }
26787
26770
  function isBackgroundableExecutingToolCall(toolCall) {
26788
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26771
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26789
26772
  }
26790
26773
  function showCitations(settings) {
26791
26774
  const enabled = settings.merged.ui.showCitations;
@@ -26795,14 +26778,14 @@ function showCitations(settings) {
26795
26778
  return true;
26796
26779
  }
26797
26780
  function calculateStreamingState(isResponding, toolCalls) {
26798
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26781
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26799
26782
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26800
26783
  }
26801
26784
  const isAnyToolActive = toolCalls.some((tc) => {
26802
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26785
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26803
26786
  return true;
26804
26787
  }
26805
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26788
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26806
26789
  return !tc.responseSubmittedToGemini;
26807
26790
  }
26808
26791
  return false;
@@ -26849,9 +26832,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26849
26832
  }
26850
26833
  setRetryStatus(payload);
26851
26834
  };
26852
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
26835
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
26853
26836
  return () => {
26854
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
26837
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
26855
26838
  };
26856
26839
  }, [isRespondingRef]);
26857
26840
  const [
@@ -26984,12 +26967,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26984
26967
  const tc = toolCalls[i];
26985
26968
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
26986
26969
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
26987
- const isAgent = tc.tool?.kind === Kind.Agent;
26970
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
26988
26971
  if (isAgent) {
26989
26972
  let contigAgentsComplete = true;
26990
26973
  for (let j = i + 1; j < toolCalls.length; j++) {
26991
26974
  const nextTc = toolCalls[j];
26992
- if (nextTc.tool?.kind === Kind.Agent) {
26975
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
26993
26976
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
26994
26977
  contigAgentsComplete = false;
26995
26978
  break;
@@ -27015,7 +26998,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27015
26998
  let currentGroup = [];
27016
26999
  for (const tc of toolsToPush) {
27017
27000
  newPushed.add(tc.request.callId);
27018
- if (tc.tool?.kind === Kind.Agent) {
27001
+ if (tc.tool?.kind === "agent" /* Agent */) {
27019
27002
  currentGroup.push(tc);
27020
27003
  } else {
27021
27004
  if (currentGroup.length > 0) {
@@ -27165,7 +27148,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27165
27148
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27166
27149
  }, [activeShellPtyId, addItem, setIsResponding]);
27167
27150
  (0, import_react102.useEffect)(() => {
27168
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27151
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27169
27152
  const lastUserMessageIndex = history.findLastIndex(
27170
27153
  (item) => item.type === "user" /* USER */
27171
27154
  );
@@ -27251,7 +27234,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27251
27234
  if (tool.name === SHELL_COMMAND_NAME) {
27252
27235
  return {
27253
27236
  ...tool,
27254
- status: CoreToolCallStatus.Cancelled,
27237
+ status: "cancelled" /* Cancelled */,
27255
27238
  resultDisplay: tool.resultDisplay
27256
27239
  };
27257
27240
  }
@@ -27307,7 +27290,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27307
27290
  let localQueryToSendToGemini = null;
27308
27291
  if (typeof query === "string") {
27309
27292
  const trimmedQuery = query.trim();
27310
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27293
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
27311
27294
  if (!shellModeActive) {
27312
27295
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27313
27296
  if (slashCommandResult) {
@@ -27463,7 +27446,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27463
27446
  if (pendingHistoryItemRef.current) {
27464
27447
  if (pendingHistoryItemRef.current.type === "tool_group") {
27465
27448
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27466
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27449
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27467
27450
  );
27468
27451
  const pendingItem = {
27469
27452
  ...pendingHistoryItemRef.current,
@@ -27709,15 +27692,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27709
27692
  let geminiMessageBuffer = "";
27710
27693
  const toolCallRequests = [];
27711
27694
  for await (const event of stream) {
27712
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27695
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27713
27696
  setThought(null);
27714
27697
  }
27715
27698
  switch (event.type) {
27716
- case GeminiEventType.Thought:
27699
+ case "thought" /* Thought */:
27717
27700
  setLastGeminiActivityTime(Date.now());
27718
27701
  handleThoughtEvent(event.value, userMessageTimestamp);
27719
27702
  break;
27720
- case GeminiEventType.Content:
27703
+ case "content" /* Content */:
27721
27704
  setLastGeminiActivityTime(Date.now());
27722
27705
  geminiMessageBuffer = handleContentEvent(
27723
27706
  event.value,
@@ -27725,16 +27708,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27725
27708
  userMessageTimestamp
27726
27709
  );
27727
27710
  break;
27728
- case GeminiEventType.ToolCallRequest:
27711
+ case "tool_call_request" /* ToolCallRequest */:
27729
27712
  toolCallRequests.push(event.value);
27730
27713
  break;
27731
- case GeminiEventType.UserCancelled:
27714
+ case "user_cancelled" /* UserCancelled */:
27732
27715
  handleUserCancelledEvent(userMessageTimestamp);
27733
27716
  break;
27734
- case GeminiEventType.Error:
27717
+ case "error" /* Error */:
27735
27718
  handleErrorEvent(event.value, userMessageTimestamp);
27736
27719
  break;
27737
- case GeminiEventType.AgentExecutionStopped:
27720
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
27738
27721
  handleAgentExecutionStoppedEvent(
27739
27722
  event.value.reason,
27740
27723
  userMessageTimestamp,
@@ -27742,7 +27725,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27742
27725
  event.value.contextCleared
27743
27726
  );
27744
27727
  break;
27745
- case GeminiEventType.AgentExecutionBlocked:
27728
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
27746
27729
  handleAgentExecutionBlockedEvent(
27747
27730
  event.value.reason,
27748
27731
  userMessageTimestamp,
@@ -27750,35 +27733,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27750
27733
  event.value.contextCleared
27751
27734
  );
27752
27735
  break;
27753
- case GeminiEventType.ChatCompressed:
27736
+ case "chat_compressed" /* ChatCompressed */:
27754
27737
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27755
27738
  break;
27756
- case GeminiEventType.ToolCallConfirmation:
27757
- case GeminiEventType.ToolCallResponse:
27739
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
27740
+ case "tool_call_response" /* ToolCallResponse */:
27758
27741
  break;
27759
- case GeminiEventType.MaxSessionTurns:
27742
+ case "max_session_turns" /* MaxSessionTurns */:
27760
27743
  handleMaxSessionTurnsEvent();
27761
27744
  break;
27762
- case GeminiEventType.ContextWindowWillOverflow:
27745
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27763
27746
  handleContextWindowWillOverflowEvent(
27764
27747
  event.value.estimatedRequestTokenCount,
27765
27748
  event.value.remainingTokenCount
27766
27749
  );
27767
27750
  break;
27768
- case GeminiEventType.Finished:
27751
+ case "finished" /* Finished */:
27769
27752
  handleFinishedEvent(event, userMessageTimestamp);
27770
27753
  break;
27771
- case GeminiEventType.Citation:
27754
+ case "citation" /* Citation */:
27772
27755
  handleCitationEvent(event.value, userMessageTimestamp);
27773
27756
  break;
27774
- case GeminiEventType.ModelInfo:
27757
+ case "model_info" /* ModelInfo */:
27775
27758
  handleChatModelEvent(event.value, userMessageTimestamp);
27776
27759
  break;
27777
- case GeminiEventType.LoopDetected:
27760
+ case "loop_detected" /* LoopDetected */:
27778
27761
  loopDetectedRef.current = true;
27779
27762
  break;
27780
- case GeminiEventType.Retry:
27781
- case GeminiEventType.InvalidStream:
27763
+ case "retry" /* Retry */:
27764
+ case "invalid_stream" /* InvalidStream */:
27782
27765
  break;
27783
27766
  default: {
27784
27767
  const unreachable = event;
@@ -27819,7 +27802,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27819
27802
  const submitQuery = (0, import_react102.useCallback)(
27820
27803
  async (query, options, prompt_id) => runInDevTraceSpan(
27821
27804
  {
27822
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
27805
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
27823
27806
  sessionId: config.getSessionId()
27824
27807
  },
27825
27808
  async ({ metadata: spanMetadata }) => {
@@ -27980,7 +27963,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27980
27963
  );
27981
27964
  const handleApprovalModeChange = (0, import_react102.useCallback)(
27982
27965
  async (newApprovalMode) => {
27983
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
27966
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
27984
27967
  if (geminiClient) {
27985
27968
  try {
27986
27969
  await geminiClient.addHistory({
@@ -28003,11 +27986,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28003
27986
  }
28004
27987
  }
28005
27988
  previousApprovalModeRef.current = newApprovalMode;
28006
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
27989
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28007
27990
  let awaitingApprovalCalls = toolCalls.filter(
28008
27991
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28009
27992
  );
28010
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
27993
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28011
27994
  awaitingApprovalCalls = awaitingApprovalCalls.filter(
28012
27995
  (call) => EDIT_TOOL_NAMES.has(call.request.name)
28013
27996
  );
@@ -28016,11 +27999,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28016
27999
  if (call.correlationId) {
28017
28000
  try {
28018
28001
  await config.getMessageBus().publish({
28019
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28002
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28020
28003
  correlationId: call.correlationId,
28021
28004
  confirmed: true,
28022
28005
  requiresUserConfirmation: false,
28023
- outcome: ToolConfirmationOutcome.ProceedOnce
28006
+ outcome: "proceed_once" /* ProceedOnce */
28024
28007
  });
28025
28008
  } catch (error) {
28026
28009
  debugLogger.warn(
@@ -28098,14 +28081,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28098
28081
  );
28099
28082
  if (isLowErrorVerbosity) {
28100
28083
  suppressedToolErrorCountRef.current += geminiTools.filter(
28101
- (tc) => tc.status === CoreToolCallStatus.Error
28084
+ (tc) => tc.status === "error" /* Error */
28102
28085
  ).length;
28103
28086
  }
28104
28087
  if (geminiTools.length === 0) {
28105
28088
  return;
28106
28089
  }
28107
28090
  const stopExecutionTool = geminiTools.find(
28108
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28091
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28109
28092
  );
28110
28093
  if (stopExecutionTool && stopExecutionTool.response.error) {
28111
28094
  maybeAddSuppressedToolErrorNote();
@@ -28125,9 +28108,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28125
28108
  (tc) => !isTopicTool2(tc.request.name)
28126
28109
  );
28127
28110
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28128
- (tc) => tc.status === CoreToolCallStatus.Cancelled
28111
+ (tc) => tc.status === "cancelled" /* Cancelled */
28129
28112
  );
28130
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28113
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28131
28114
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28132
28115
  if (!turnCancelledRef.current) {
28133
28116
  addItem({
@@ -28208,7 +28191,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28208
28191
  return;
28209
28192
  }
28210
28193
  const restorableToolCalls = toolCalls.filter(
28211
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28194
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28212
28195
  );
28213
28196
  if (restorableToolCalls.length > 0) {
28214
28197
  if (!gitService) {
@@ -28427,14 +28410,14 @@ var useAgentStream = ({
28427
28410
  const displayName = legacyState?.displayName ?? event.name;
28428
28411
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28429
28412
  const desc = legacyState?.description ?? "";
28430
- const fallbackKind = Kind.Other;
28413
+ const fallbackKind = "other" /* Other */;
28431
28414
  const newCall = {
28432
28415
  callId: event.requestId,
28433
28416
  name: displayName,
28434
28417
  originalRequestName: event.name,
28435
28418
  description: desc,
28436
28419
  display: event.display,
28437
- status: CoreToolCallStatus.Scheduled,
28420
+ status: "scheduled" /* Scheduled */,
28438
28421
  isClientInitiated: false,
28439
28422
  renderOutputAsMarkdown: isOutputMarkdown,
28440
28423
  kind: legacyState?.kind ?? fallbackKind,
@@ -28452,10 +28435,10 @@ var useAgentStream = ({
28452
28435
  const evtStatus = legacyState?.status;
28453
28436
  let status = tc.status;
28454
28437
  if (evtStatus === "executing")
28455
- status = CoreToolCallStatus.Executing;
28456
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28438
+ status = "executing" /* Executing */;
28439
+ else if (evtStatus === "error") status = "error" /* Error */;
28457
28440
  else if (evtStatus === "success")
28458
- status = CoreToolCallStatus.Success;
28441
+ status = "success" /* Success */;
28459
28442
  const display = event.display?.result;
28460
28443
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28461
28444
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28488,7 +28471,7 @@ var useAgentStream = ({
28488
28471
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28489
28472
  return {
28490
28473
  ...tc,
28491
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28474
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28492
28475
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28493
28476
  resultDisplay,
28494
28477
  outputFile
@@ -28540,7 +28523,7 @@ var useAgentStream = ({
28540
28523
  if (!options?.isContinuation) {
28541
28524
  if (typeof query === "string") {
28542
28525
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28543
- void logger?.logMessage(MessageSenderType.USER, query);
28526
+ void logger?.logMessage("user" /* USER */, query);
28544
28527
  }
28545
28528
  startNewPrompt();
28546
28529
  }
@@ -31060,7 +31043,7 @@ function useMessageQueue({
31060
31043
  var import_react110 = __toESM(require_react(), 1);
31061
31044
  function useMcpStatus(config) {
31062
31045
  const [discoveryState, setDiscoveryState] = (0, import_react110.useState)(
31063
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31046
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31064
31047
  );
31065
31048
  const [mcpServerCount, setMcpServerCount] = (0, import_react110.useState)(
31066
31049
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31073,12 +31056,12 @@ function useMcpStatus(config) {
31073
31056
  setMcpServerCount(manager.getMcpServerCount());
31074
31057
  }
31075
31058
  };
31076
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31059
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31077
31060
  return () => {
31078
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31061
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31079
31062
  };
31080
31063
  }, [config]);
31081
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31064
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31082
31065
  return {
31083
31066
  discoveryState,
31084
31067
  mcpServerCount,
@@ -31105,7 +31088,7 @@ function useApprovalModeIndicator({
31105
31088
  (key) => {
31106
31089
  let nextApprovalMode;
31107
31090
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31108
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31091
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31109
31092
  if (addItem) {
31110
31093
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31111
31094
  const adminSettings = config.getRemoteAdminSettings();
@@ -31123,21 +31106,21 @@ function useApprovalModeIndicator({
31123
31106
  }
31124
31107
  return;
31125
31108
  }
31126
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31109
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31127
31110
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31128
31111
  const currentMode = config.getApprovalMode();
31129
31112
  switch (currentMode) {
31130
- case ApprovalMode.DEFAULT:
31131
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31113
+ case "default" /* DEFAULT */:
31114
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31132
31115
  break;
31133
- case ApprovalMode.AUTO_EDIT:
31134
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31116
+ case "autoEdit" /* AUTO_EDIT */:
31117
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31135
31118
  break;
31136
- case ApprovalMode.PLAN:
31137
- nextApprovalMode = ApprovalMode.DEFAULT;
31119
+ case "plan" /* PLAN */:
31120
+ nextApprovalMode = "default" /* DEFAULT */;
31138
31121
  break;
31139
- case ApprovalMode.YOLO:
31140
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31122
+ case "yolo" /* YOLO */:
31123
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31141
31124
  break;
31142
31125
  default:
31143
31126
  }
@@ -31530,11 +31513,11 @@ var useHookDisplayState = () => {
31530
31513
  removeHook();
31531
31514
  }
31532
31515
  };
31533
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
31534
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31516
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31517
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31535
31518
  return () => {
31536
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
31537
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31519
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31520
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31538
31521
  activeTimeouts.forEach(clearTimeout);
31539
31522
  activeTimeouts.clear();
31540
31523
  };
@@ -32379,7 +32362,7 @@ var AppContainer = (props) => {
32379
32362
  debugLogger.error("Failed to start memory service:", e);
32380
32363
  });
32381
32364
  }
32382
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32365
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32383
32366
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32384
32367
  if (result) {
32385
32368
  if (result.systemMessage) {
@@ -32415,7 +32398,7 @@ var AppContainer = (props) => {
32415
32398
  );
32416
32399
  const ideClient = await IdeClient.getInstance();
32417
32400
  await ideClient.disconnect();
32418
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32401
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32419
32402
  };
32420
32403
  registerCleanup(cleanupFn);
32421
32404
  return () => {
@@ -32440,11 +32423,11 @@ var AppContainer = (props) => {
32440
32423
  resetTime: payload.resetTime
32441
32424
  });
32442
32425
  };
32443
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32444
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32426
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32427
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32445
32428
  return () => {
32446
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32447
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32429
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32430
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32448
32431
  };
32449
32432
  }, [config]);
32450
32433
  (0, import_react124.useEffect)(() => {
@@ -32457,16 +32440,16 @@ var AppContainer = (props) => {
32457
32440
  const handleAgentsDiscovered = (payload) => {
32458
32441
  setNewAgents(payload.agents);
32459
32442
  };
32460
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32461
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32462
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32443
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32444
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32445
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32463
32446
  return () => {
32464
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32447
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32465
32448
  coreEvents.off(
32466
- CoreEvent.AdminSettingsChanged,
32449
+ "admin-settings-changed" /* AdminSettingsChanged */,
32467
32450
  handleAdminSettingsChanged
32468
32451
  );
32469
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32452
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32470
32453
  };
32471
32454
  }, [settings]);
32472
32455
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32532,11 +32515,11 @@ var AppContainer = (props) => {
32532
32515
  exitEditorDialog
32533
32516
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32534
32517
  (0, import_react124.useEffect)(() => {
32535
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32536
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32518
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32519
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32537
32520
  return () => {
32538
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32539
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32521
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32522
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32540
32523
  };
32541
32524
  }, [handleEditorClose, openEditorDialog]);
32542
32525
  (0, import_react124.useEffect)(() => {
@@ -32604,7 +32587,7 @@ var AppContainer = (props) => {
32604
32587
  errorVerbosity: settings.merged.ui.errorVerbosity
32605
32588
  });
32606
32589
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32607
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32590
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32608
32591
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32609
32592
  const { loadHistoryForResume, isResuming } = useSessionResume({
32610
32593
  config,
@@ -32632,7 +32615,7 @@ var AppContainer = (props) => {
32632
32615
  async (authType, scope) => {
32633
32616
  if (authType) {
32634
32617
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32635
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32618
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32636
32619
  setAuthContext({ requiresRestart: true });
32637
32620
  } else {
32638
32621
  setAuthContext({});
@@ -32660,7 +32643,7 @@ var AppContainer = (props) => {
32660
32643
  );
32661
32644
  return;
32662
32645
  }
32663
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32646
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32664
32647
  writeToStdout(`
32665
32648
  ----------------------------------------------------------------
32666
32649
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32685,7 +32668,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32685
32668
  }
32686
32669
  await saveApiKey(apiKey);
32687
32670
  await reloadApiKey();
32688
- await config.refreshAuth(AuthType.USE_GEMINI);
32671
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32689
32672
  setAuthState("authenticated" /* Authenticated */);
32690
32673
  } catch (e) {
32691
32674
  onAuthError(
@@ -32710,7 +32693,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32710
32693
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32711
32694
  );
32712
32695
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32713
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32696
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32714
32697
  return;
32715
32698
  }
32716
32699
  const error = validateAuthMethod(
@@ -32829,9 +32812,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
32829
32812
  }
32830
32813
  });
32831
32814
  };
32832
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
32815
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
32833
32816
  return () => {
32834
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
32817
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
32835
32818
  };
32836
32819
  }, []);
32837
32820
  const performMemoryRefresh = (0, import_react124.useCallback)(async () => {
@@ -33504,7 +33487,7 @@ ${queuedText}` : queuedText;
33504
33487
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33505
33488
  if (settings.merged.general.devtools) {
33506
33489
  void (async () => {
33507
- const { toggleDevToolsPanel } = await import("./devtoolsService-OEBSPLJN.js");
33490
+ const { toggleDevToolsPanel } = await import("./devtoolsService-UQCUIXV5.js");
33508
33491
  await toggleDevToolsPanel(
33509
33492
  config,
33510
33493
  showErrorDetails,
@@ -33722,12 +33705,12 @@ ${queuedText}` : queuedText;
33722
33705
  Date.now()
33723
33706
  );
33724
33707
  };
33725
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33726
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33708
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33709
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33727
33710
  coreEvents.drainBacklogs();
33728
33711
  return () => {
33729
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33730
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33712
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33713
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33731
33714
  };
33732
33715
  }, [historyManager]);
33733
33716
  const nightly = props.version.includes("nightly");
@@ -33829,9 +33812,9 @@ ${queuedText}` : queuedText;
33829
33812
  const handleMemoryChanged = (result) => {
33830
33813
  setGeminiMdFileCount(result.fileCount);
33831
33814
  };
33832
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
33815
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
33833
33816
  return () => {
33834
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
33817
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
33835
33818
  };
33836
33819
  }, []);
33837
33820
  (0, import_react124.useEffect)(() => {