@google/gemini-cli 0.39.0 → 0.39.1

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 (46) hide show
  1. package/bundle/{chunk-NWD4JYMB.js → chunk-APBWRLCM.js} +1590 -6638
  2. package/bundle/{chunk-5GTZHSZV.js → chunk-BEUOMVKF.js} +1587 -6636
  3. package/bundle/{chunk-67TFD6HC.js → chunk-FNPZLVJU.js} +16 -0
  4. package/bundle/{chunk-UQGLVPZQ.js → chunk-GDRLBWZL.js} +3884 -2279
  5. package/bundle/{chunk-BL3XXS2L.js → chunk-GRNHS2XR.js} +2 -2
  6. package/bundle/{chunk-LUWQB4AS.js → chunk-N6R5LJKJ.js} +2 -2
  7. package/bundle/{chunk-6NW5RNNH.js → chunk-QPDKVNK5.js} +1656 -6692
  8. package/bundle/{chunk-QM5IP3NK.js → chunk-R32ABRMT.js} +16 -0
  9. package/bundle/chunk-RNWNACRD.js +96654 -0
  10. package/bundle/{chunk-YYY7NKKR.js → chunk-RVSGPQMZ.js} +2 -2
  11. package/bundle/{chunk-RTKRL6Y5.js → chunk-UGFPG7AM.js} +10090 -13916
  12. package/bundle/chunk-UIBQS45C.js +361893 -0
  13. package/bundle/{chunk-3YUTTNJ7.js → chunk-WFCK2Z32.js} +3916 -2286
  14. package/bundle/chunk-ZIXTYG56.js +156 -0
  15. package/bundle/{cleanup-3LELZME2.js → cleanup-DORKD3KW.js} +3 -3
  16. package/bundle/{cleanup-JJEXOHOA.js → cleanup-ROCPAQIR.js} +3 -3
  17. package/bundle/{cleanup-TTGHQXQN.js → cleanup-RV4C23S4.js} +3 -3
  18. package/bundle/cleanup-VFR4VRPU.js +33 -0
  19. package/bundle/{core-LKKLDF4Z.js → core-NHADWRAT.js} +28 -2
  20. package/bundle/{devtoolsService-UQCUIXV5.js → devtoolsService-65SKYXJR.js} +3 -3
  21. package/bundle/{devtoolsService-H64VB4IA.js → devtoolsService-6GKOMHGW.js} +3 -3
  22. package/bundle/{devtoolsService-L5LFSMIR.js → devtoolsService-OIMHTGLW.js} +5 -4
  23. package/bundle/devtoolsService-XJQQUBHU.js +871 -0
  24. package/bundle/{core-Z2SYVMM5.js → dist-2DBCGLDI.js} +28 -2
  25. package/bundle/{dist-FWHS5IHN.js → dist-7UL5MZ3N.js} +28 -2
  26. package/bundle/dist-FMEYWTZB.js +2036 -0
  27. package/bundle/docs/cli/cli-reference.md +1 -0
  28. package/bundle/docs/cli/trusted-folders.md +28 -0
  29. package/bundle/docs/reference/configuration.md +14 -0
  30. package/bundle/{gemini-BI2PCDUT.js → gemini-APY42TPN.js} +62 -18
  31. package/bundle/{gemini-CMXEUOSI.js → gemini-ASA6UVNB.js} +60 -17
  32. package/bundle/{gemini-YNLABPKW.js → gemini-JN2NUSDI.js} +238 -179
  33. package/bundle/gemini-ZVQNZBQE.js +15365 -0
  34. package/bundle/gemini.js +3 -3
  35. package/bundle/{interactiveCli-C46TDPVW.js → interactiveCli-7OEI5K4E.js} +15 -165
  36. package/bundle/{interactiveCli-P35Q3KZ2.js → interactiveCli-F6YUYJT5.js} +28 -177
  37. package/bundle/{interactiveCli-LXXBYVNU.js → interactiveCli-MSV2JUI2.js} +298 -430
  38. package/bundle/interactiveCli-WY7NQZAW.js +34344 -0
  39. package/bundle/{memoryDiscovery-U3XUU4QY.js → memoryDiscovery-OGUXPAKW.js} +1 -1
  40. package/bundle/{memoryDiscovery-MYQ3ZWKM.js → memoryDiscovery-OJZ52WPE.js} +1 -1
  41. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  42. package/bundle/{oauth2-provider-7ZDLUOSM.js → oauth2-provider-5GKHTO3W.js} +2 -2
  43. package/bundle/{oauth2-provider-CRWFOXYR.js → oauth2-provider-J42P6NQU.js} +2 -2
  44. package/bundle/{oauth2-provider-FEM5AIRT.js → oauth2-provider-MJYS4GHA.js} +39 -73
  45. package/bundle/oauth2-provider-UI5C6WYR.js +237 -0
  46. package/package.json +1 -1
@@ -104,12 +104,18 @@ import {
104
104
  getAsciiArtWidth,
105
105
  getBoundingBox,
106
106
  getCachedStringWidth,
107
+ getDialogRestartRequiredSettings,
108
+ getDialogSettingKeys,
109
+ getDisplayValue,
110
+ getEditValue,
111
+ getEffectiveValue,
107
112
  getFileExtension,
108
113
  getFormattedSettingValue,
109
114
  getLuminance,
115
+ getNestedValue,
110
116
  getSafeLowColorBackground,
111
117
  getSessionFiles,
112
- getSettingsSchema,
118
+ getSettingDefinition,
113
119
  getStatusColor,
114
120
  getTransformUnderCursor,
115
121
  getUsedStatusColor,
@@ -122,9 +128,11 @@ import {
122
128
  isBrowser,
123
129
  isContextUsageHigh,
124
130
  isDevelopment,
131
+ isInSettingsScope,
125
132
  isLoadableSettingScope,
126
133
  isNarrowWidth,
127
134
  isNewFile,
135
+ isRecord,
128
136
  isSlashCommand,
129
137
  isTodoList,
130
138
  isUltraTier,
@@ -138,6 +146,7 @@ import {
138
146
  openFileInEditor,
139
147
  parseColor,
140
148
  parseDiffWithLineNumbers,
149
+ parseEditedValue,
141
150
  parseSlashCommand,
142
151
  persistentState,
143
152
  pickDefaultThemeName,
@@ -197,7 +206,7 @@ import {
197
206
  widestLineFromStyledChars,
198
207
  wordBreakStyledChars,
199
208
  wrapStyledChars
200
- } from "./chunk-5GTZHSZV.js";
209
+ } from "./chunk-QPDKVNK5.js";
201
210
  import {
202
211
  appEvents
203
212
  } from "./chunk-5PS3AYFU.js";
@@ -206,12 +215,14 @@ import {
206
215
  removeCleanup,
207
216
  runExitCleanup,
208
217
  setupTtyCheck
209
- } from "./chunk-YYY7NKKR.js";
218
+ } from "./chunk-RVSGPQMZ.js";
210
219
  import {
211
220
  ApiKeyUpdatedEvent,
212
221
  AsyncFzf,
213
222
  AuthType,
223
+ CompressionStatus,
214
224
  ConversationFinishedEvent,
225
+ CoreToolCallStatus,
215
226
  CreditPurchaseClickEvent,
216
227
  EDITOR_DISPLAY_NAMES,
217
228
  EmptyWalletMenuShownEvent,
@@ -221,11 +232,16 @@ import {
221
232
  FileSearchFactory,
222
233
  FolderTrustDiscoveryService,
223
234
  G1_UTM_CAMPAIGNS,
235
+ GeminiCliOperation,
236
+ GeminiEventType,
224
237
  GitService,
225
238
  IdeClient,
226
239
  LegacyAgentProtocol,
227
240
  LlmRole,
228
241
  Logger,
242
+ MCPDiscoveryState,
243
+ MCPServerStatus,
244
+ MessageSenderType,
229
245
  ModelNotFoundError,
230
246
  ModelSlashCommandEvent,
231
247
  OverageMenuShownEvent,
@@ -234,13 +250,17 @@ import {
234
250
  ProjectIdRequiredError,
235
251
  ROOT_SCHEDULER_ID,
236
252
  Scheduler,
253
+ SessionEndReason,
254
+ SessionStartSource,
237
255
  ShellExecutionService,
238
256
  SlashCommandStatus,
239
257
  TerminalQuotaError,
258
+ TrustLevel,
240
259
  UserAccountManager,
241
260
  UserPromptEvent,
242
261
  UserTierId,
243
262
  ValidationRequiredError,
263
+ WarningPriority,
244
264
  addMCPStatusChangeListener,
245
265
  allowEditorTypeInSandbox,
246
266
  belongsInConfirmationQueue,
@@ -323,11 +343,13 @@ import {
323
343
  validatePlanContent,
324
344
  validatePlanPath,
325
345
  writeToStdout
326
- } from "./chunk-3YUTTNJ7.js";
346
+ } from "./chunk-UGFPG7AM.js";
327
347
  import {
328
348
  ACTIVATE_SKILL_TOOL_NAME,
329
349
  AGENT_TOOL_NAME,
350
+ ApprovalMode,
330
351
  ChangeAuthRequestedError,
352
+ CoreEvent,
331
353
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
332
354
  DEFAULT_GEMINI_FLASH_MODEL,
333
355
  DEFAULT_GEMINI_MODEL,
@@ -338,13 +360,16 @@ import {
338
360
  GEMINI_DIR,
339
361
  GLOB_DISPLAY_NAME,
340
362
  GREP_DISPLAY_NAME,
363
+ Kind,
341
364
  LS_DISPLAY_NAME,
365
+ MessageBusType,
342
366
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
343
367
  PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
344
368
  PREVIEW_GEMINI_3_1_MODEL,
345
369
  PREVIEW_GEMINI_FLASH_MODEL,
346
370
  PREVIEW_GEMINI_MODEL,
347
371
  PREVIEW_GEMINI_MODEL_AUTO,
372
+ QuestionType,
348
373
  READ_FILE_DISPLAY_NAME,
349
374
  READ_MANY_FILES_DISPLAY_NAME,
350
375
  SHELL_TOOL_NAME,
@@ -352,6 +377,8 @@ import {
352
377
  TOPIC_PARAM_STRATEGIC_INTENT,
353
378
  TOPIC_PARAM_SUMMARY,
354
379
  TOPIC_PARAM_TITLE,
380
+ ToolConfirmationOutcome,
381
+ ToolErrorType,
355
382
  UPDATE_TOPIC_DISPLAY_NAME,
356
383
  UPDATE_TOPIC_TOOL_NAME,
357
384
  UnauthorizedError,
@@ -381,7 +408,7 @@ import {
381
408
  safeJsonToMarkdown,
382
409
  shortenPath,
383
410
  tildeifyPath
384
- } from "./chunk-QM5IP3NK.js";
411
+ } from "./chunk-FNPZLVJU.js";
385
412
  import "./chunk-664ZODQF.js";
386
413
  import "./chunk-RJTRUG2J.js";
387
414
  import "./chunk-IUUIT4SU.js";
@@ -5749,7 +5776,7 @@ function calculateShellMaxLines(options) {
5749
5776
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5750
5777
  return maxLinesBasedOnHeight;
5751
5778
  }
5752
- const isExecuting = status === "executing" /* Executing */;
5779
+ const isExecuting = status === CoreToolCallStatus.Executing;
5753
5780
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5754
5781
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5755
5782
  }
@@ -5782,10 +5809,10 @@ function isShellTool(name) {
5782
5809
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
5783
5810
  }
5784
5811
  function isThisShellFocusable(name, status, config) {
5785
- return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5812
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5786
5813
  }
5787
5814
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5788
- return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5815
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5789
5816
  }
5790
5817
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5791
5818
  const [userHasFocused, setUserHasFocused] = (0, import_react16.useState)(false);
@@ -6383,7 +6410,7 @@ var ToolMessage = ({
6383
6410
  paddingX: 1,
6384
6411
  flexDirection: "column",
6385
6412
  children: [
6386
- status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6413
+ status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6387
6414
  McpProgressIndicator,
6388
6415
  {
6389
6416
  progress,
@@ -6400,8 +6427,8 @@ var ToolMessage = ({
6400
6427
  terminalWidth,
6401
6428
  renderOutputAsMarkdown,
6402
6429
  hasFocus: isThisShellFocused2,
6403
- maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
6404
- overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
6430
+ maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
6431
+ overflowDirection: kind === Kind.Agent ? "bottom" : "top"
6405
6432
  }
6406
6433
  ),
6407
6434
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
@@ -6734,7 +6761,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6734
6761
  settings.merged,
6735
6762
  process4.cwd()
6736
6763
  );
6737
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6764
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6738
6765
  return {
6739
6766
  currentTrustLevel: explicitTrustLevel,
6740
6767
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6779,7 +6806,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6779
6806
  process4.cwd(),
6780
6807
  newConfig
6781
6808
  );
6782
- if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6809
+ if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6783
6810
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6784
6811
  if (source === "file") {
6785
6812
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6853,18 +6880,18 @@ function PermissionsModifyTrustDialog({
6853
6880
  const TRUST_LEVEL_ITEMS = [
6854
6881
  {
6855
6882
  label: `Trust this folder (${dirName})`,
6856
- value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6857
- key: "TRUST_FOLDER" /* TRUST_FOLDER */
6883
+ value: TrustLevel.TRUST_FOLDER,
6884
+ key: TrustLevel.TRUST_FOLDER
6858
6885
  },
6859
6886
  {
6860
6887
  label: `Trust parent folder (${parentFolder})`,
6861
- value: "TRUST_PARENT" /* TRUST_PARENT */,
6862
- key: "TRUST_PARENT" /* TRUST_PARENT */
6888
+ value: TrustLevel.TRUST_PARENT,
6889
+ key: TrustLevel.TRUST_PARENT
6863
6890
  },
6864
6891
  {
6865
6892
  label: "Don't trust",
6866
- value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6867
- key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6893
+ value: TrustLevel.DO_NOT_TRUST,
6894
+ key: TrustLevel.DO_NOT_TRUST
6868
6895
  }
6869
6896
  ];
6870
6897
  const {
@@ -7101,7 +7128,7 @@ var ShellToolMessage = ({
7101
7128
  maxLinesLimit: maxLines
7102
7129
  });
7103
7130
  import_react23.default.useEffect(() => {
7104
- const isExecuting = status === "executing" /* Executing */;
7131
+ const isExecuting = status === CoreToolCallStatus.Executing;
7105
7132
  if (isExecuting && ptyId) {
7106
7133
  try {
7107
7134
  const childWidth = terminalWidth - 4;
@@ -7287,14 +7314,14 @@ var ToolActionsProvider = (props) => {
7287
7314
  }
7288
7315
  const details = tool.confirmationDetails;
7289
7316
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
7290
- const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
7317
+ const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
7291
7318
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
7292
7319
  }
7293
7320
  if (tool.correlationId) {
7294
7321
  await config.getMessageBus().publish({
7295
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
7322
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
7296
7323
  correlationId: tool.correlationId,
7297
- confirmed: outcome !== "cancel" /* Cancel */,
7324
+ confirmed: outcome !== ToolConfirmationOutcome.Cancel,
7298
7325
  requiresUserConfirmation: false,
7299
7326
  outcome,
7300
7327
  payload
@@ -7313,7 +7340,7 @@ var ToolActionsProvider = (props) => {
7313
7340
  );
7314
7341
  const cancel = (0, import_react24.useCallback)(
7315
7342
  async (callId) => {
7316
- await confirm(callId, "cancel" /* Cancel */);
7343
+ await confirm(callId, ToolConfirmationOutcome.Cancel);
7317
7344
  },
7318
7345
  [confirm]
7319
7346
  );
@@ -7600,22 +7627,22 @@ var hasPayload = (res) => {
7600
7627
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
7601
7628
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
7602
7629
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
7603
- const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
7630
+ const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
7604
7631
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
7605
7632
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
7606
7633
  const showDiffStat = !!diff.diffStat;
7607
7634
  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 }) });
7608
7635
  let resultSummary = "";
7609
7636
  let resultColor = theme.text.secondary;
7610
- if (status === "awaiting_approval" /* AwaitingApproval */) {
7637
+ if (status === CoreToolCallStatus.AwaitingApproval) {
7611
7638
  resultSummary = "Confirming";
7612
- } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
7639
+ } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
7613
7640
  resultSummary = "Accepted";
7614
7641
  resultColor = theme.text.accent;
7615
- } else if (status === "cancelled" /* Cancelled */) {
7642
+ } else if (status === CoreToolCallStatus.Cancelled) {
7616
7643
  resultSummary = "Rejected";
7617
7644
  resultColor = theme.status.error;
7618
- } else if (status === "error" /* Error */) {
7645
+ } else if (status === CoreToolCallStatus.Error) {
7619
7646
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
7620
7647
  resultColor = theme.status.error;
7621
7648
  }
@@ -7646,7 +7673,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
7646
7673
  filename: diff.fileName,
7647
7674
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7648
7675
  availableTerminalHeight,
7649
- disableColor: status === "cancelled" /* Cancelled */
7676
+ disableColor: status === CoreToolCallStatus.Cancelled
7650
7677
  }
7651
7678
  );
7652
7679
  return { description, summary, payload };
@@ -7774,10 +7801,10 @@ var DenseToolMessage = (props) => {
7774
7801
  if (isGrepResult(resultDisplay)) {
7775
7802
  return getGenericSuccessData(resultDisplay, originalDescription);
7776
7803
  }
7777
- if (status === "success" /* Success */ && resultDisplay) {
7804
+ if (status === CoreToolCallStatus.Success && resultDisplay) {
7778
7805
  return getGenericSuccessData(resultDisplay, originalDescription);
7779
7806
  }
7780
- if (status === "error" /* Error */) {
7807
+ if (status === CoreToolCallStatus.Error) {
7781
7808
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7782
7809
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7783
7810
  "\u2192 ",
@@ -7818,7 +7845,7 @@ var DenseToolMessage = (props) => {
7818
7845
  language: fileExtension,
7819
7846
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7820
7847
  settings,
7821
- disableColor: status === "cancelled" /* Cancelled */,
7848
+ disableColor: status === CoreToolCallStatus.Cancelled,
7822
7849
  returnLines: true
7823
7850
  });
7824
7851
  } else {
@@ -7826,7 +7853,7 @@ var DenseToolMessage = (props) => {
7826
7853
  parsedLines,
7827
7854
  filename: diff.fileName,
7828
7855
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7829
- disableColor: status === "cancelled" /* Cancelled */
7856
+ disableColor: status === CoreToolCallStatus.Cancelled
7830
7857
  });
7831
7858
  }
7832
7859
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7956,7 +7983,7 @@ function isToolExecuting(pendingHistoryItems) {
7956
7983
  return pendingHistoryItems.some((item) => {
7957
7984
  if (item && item.type === "tool_group") {
7958
7985
  return item.tools.some(
7959
- (tool) => "executing" /* Executing */ === tool.status
7986
+ (tool) => CoreToolCallStatus.Executing === tool.status
7960
7987
  );
7961
7988
  }
7962
7989
  return false;
@@ -7965,7 +7992,7 @@ function isToolExecuting(pendingHistoryItems) {
7965
7992
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7966
7993
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7967
7994
  (item) => item.tools.some(
7968
- (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7995
+ (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7969
7996
  )
7970
7997
  );
7971
7998
  }
@@ -7988,14 +8015,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
7988
8015
  if (isTrackedToolCall(t)) {
7989
8016
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
7990
8017
  } else {
7991
- return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
8018
+ return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7992
8019
  }
7993
8020
  });
7994
8021
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
7995
8022
  if (isTrackedToolCall(t)) {
7996
8023
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
7997
8024
  } else {
7998
- return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
8025
+ return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7999
8026
  }
8000
8027
  });
8001
8028
  const isShellCommand = toolsToInspect.some((t) => {
@@ -8094,7 +8121,7 @@ var ToolGroupMessage = ({
8094
8121
  const groupedTools = (0, import_react28.useMemo)(() => {
8095
8122
  const groups = [];
8096
8123
  for (const tool of visibleToolCalls) {
8097
- if (tool.kind === "agent" /* Agent */) {
8124
+ if (tool.kind === Kind.Agent) {
8098
8125
  const lastGroup = groups[groups.length - 1];
8099
8126
  if (Array.isArray(lastGroup)) {
8100
8127
  lastGroup.push(tool);
@@ -8148,7 +8175,7 @@ var ToolGroupMessage = ({
8148
8175
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
8149
8176
  let countToolCallsWithResults = 0;
8150
8177
  for (const tool of visibleToolCalls) {
8151
- if (tool.kind !== "agent" /* Agent */) {
8178
+ if (tool.kind !== Kind.Agent) {
8152
8179
  if (isCompactTool(tool, isCompactModeEnabled)) {
8153
8180
  if (hasDensePayload(tool)) {
8154
8181
  countToolCallsWithResults++;
@@ -8344,18 +8371,18 @@ function CompressionMessage({
8344
8371
  return "Compressing chat history";
8345
8372
  }
8346
8373
  switch (compressionStatus) {
8347
- case 1 /* COMPRESSED */:
8374
+ case CompressionStatus.COMPRESSED:
8348
8375
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
8349
- case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
8376
+ case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
8350
8377
  if (originalTokens < 5e4) {
8351
8378
  return "Compression was not beneficial for this history size.";
8352
8379
  }
8353
8380
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
8354
- case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
8381
+ case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
8355
8382
  return "Could not compress chat history due to a token counting error.";
8356
- case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
8383
+ case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
8357
8384
  return "Chat history compression failed: the model returned an empty summary.";
8358
- case 5 /* NOOP */:
8385
+ case CompressionStatus.NOOP:
8359
8386
  return "Nothing to compress.";
8360
8387
  default:
8361
8388
  return "";
@@ -8769,8 +8796,8 @@ var ModelUsageTable = ({ models }) => {
8769
8796
  );
8770
8797
  roleEntries.sort(([a], [b]) => {
8771
8798
  if (a === b) return 0;
8772
- if (a === "main" /* MAIN */) return -1;
8773
- if (b === "main" /* MAIN */) return 1;
8799
+ if (a === LlmRole.MAIN) return -1;
8800
+ if (b === LlmRole.MAIN) return 1;
8774
8801
  return a.localeCompare(b);
8775
8802
  });
8776
8803
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -9101,8 +9128,8 @@ var ModelStatsDisplay = ({
9101
9128
  return validRoles.includes(role);
9102
9129
  }).sort((a, b) => {
9103
9130
  if (a === b) return 0;
9104
- if (a === "main" /* MAIN */) return -1;
9105
- if (b === "main" /* MAIN */) return 1;
9131
+ if (a === LlmRole.MAIN) return -1;
9132
+ if (b === LlmRole.MAIN) return 1;
9106
9133
  return a.localeCompare(b);
9107
9134
  });
9108
9135
  const createRow = (metric, getValue, options = {}) => {
@@ -9892,7 +9919,7 @@ var McpStatus = ({
9892
9919
  );
9893
9920
  const originalStatus = serverStatus(serverName);
9894
9921
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9895
- const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9922
+ const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9896
9923
  let statusIndicator = "";
9897
9924
  let statusText = "";
9898
9925
  let statusColor = theme.text.primary;
@@ -9904,17 +9931,17 @@ var McpStatus = ({
9904
9931
  statusColor = theme.text.secondary;
9905
9932
  } else {
9906
9933
  switch (status) {
9907
- case "connected" /* CONNECTED */:
9934
+ case MCPServerStatus.CONNECTED:
9908
9935
  statusIndicator = "\u{1F7E2}";
9909
9936
  statusText = "Ready";
9910
9937
  statusColor = theme.status.success;
9911
9938
  break;
9912
- case "connecting" /* CONNECTING */:
9939
+ case MCPServerStatus.CONNECTING:
9913
9940
  statusIndicator = "\u{1F504}";
9914
9941
  statusText = "Starting... (first startup may take longer)";
9915
9942
  statusColor = theme.status.warning;
9916
9943
  break;
9917
- case "disconnected" /* DISCONNECTED */:
9944
+ case MCPServerStatus.DISCONNECTED:
9918
9945
  default:
9919
9946
  statusIndicator = "\u{1F534}";
9920
9947
  statusText = "Disconnected";
@@ -9962,12 +9989,12 @@ var McpStatus = ({
9962
9989
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
9963
9990
  " - ",
9964
9991
  statusText,
9965
- status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9992
+ status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9966
9993
  ] }),
9967
9994
  authStatusNode
9968
9995
  ] }),
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: [
9996
+ status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9997
+ status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
9971
9998
  " (",
9972
9999
  toolCount,
9973
10000
  " tools cached)"
@@ -10446,7 +10473,7 @@ var Notifications = () => {
10446
10473
  if (dismissed) return [];
10447
10474
  const counts = persistentState.get("startupWarningCounts") || {};
10448
10475
  return startupWarnings.filter((w) => {
10449
- if (w.priority === "low" /* Low */) {
10476
+ if (w.priority === WarningPriority.Low) {
10450
10477
  const count = counts[w.id] || 0;
10451
10478
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10452
10479
  }
@@ -10459,7 +10486,7 @@ var Notifications = () => {
10459
10486
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10460
10487
  let changed = false;
10461
10488
  visibleWarnings.forEach((w) => {
10462
- if (w.priority === "low" /* Low */) {
10489
+ if (w.priority === WarningPriority.Low) {
10463
10490
  counts[w.id] = (counts[w.id] || 0) + 1;
10464
10491
  changed = true;
10465
10492
  }
@@ -10566,7 +10593,7 @@ var UserIdentity = ({ config }) => {
10566
10593
  }
10567
10594
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Box_default, { flexDirection: "column", children: [
10568
10595
  /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Box_default, { 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: [
10596
+ /* @__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: [
10570
10597
  /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Text, { bold: true, children: [
10571
10598
  "Signed in with Google",
10572
10599
  email ? ":" : ""
@@ -10800,7 +10827,7 @@ var import_react39 = __toESM(require_react(), 1);
10800
10827
  function getConfirmingToolState(pendingHistoryItems) {
10801
10828
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10802
10829
  const confirmingTools = allPendingTools.filter(
10803
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10830
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10804
10831
  );
10805
10832
  if (confirmingTools.length === 0) {
10806
10833
  return null;
@@ -12110,7 +12137,7 @@ var ExitPlanModeDialog = ({
12110
12137
  {
12111
12138
  questions: [
12112
12139
  {
12113
- type: "choice" /* CHOICE */,
12140
+ type: QuestionType.CHOICE,
12114
12141
  header: "Approval",
12115
12142
  question: planContent,
12116
12143
  options: [
@@ -12131,9 +12158,9 @@ var ExitPlanModeDialog = ({
12131
12158
  onSubmit: (answers) => {
12132
12159
  const answer = answers["0"];
12133
12160
  if (answer === "Yes, automatically accept edits" /* Auto */) {
12134
- onApprove("autoEdit" /* AUTO_EDIT */);
12161
+ onApprove(ApprovalMode.AUTO_EDIT);
12135
12162
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
12136
- onApprove("default" /* DEFAULT */);
12163
+ onApprove(ApprovalMode.DEFAULT);
12137
12164
  } else if (answer) {
12138
12165
  onFeedback(answer);
12139
12166
  }
@@ -12344,7 +12371,7 @@ ${deceptiveUrlWarnings.map(
12344
12371
  );
12345
12372
  (0, import_react44.useEffect)(() => {
12346
12373
  if (isCancelling) {
12347
- handleConfirm("cancel" /* Cancel */);
12374
+ handleConfirm(ToolConfirmationOutcome.Cancel);
12348
12375
  }
12349
12376
  }, [isCancelling, handleConfirm]);
12350
12377
  const handleSelect = (0, import_react44.useCallback)(
@@ -12357,19 +12384,19 @@ ${deceptiveUrlWarnings.map(
12357
12384
  if (!confirmationDetails.isModifying) {
12358
12385
  options2.push({
12359
12386
  label: "Allow once",
12360
- value: "proceed_once" /* ProceedOnce */,
12387
+ value: ToolConfirmationOutcome.ProceedOnce,
12361
12388
  key: "Allow once"
12362
12389
  });
12363
12390
  if (isTrustedFolder) {
12364
12391
  options2.push({
12365
12392
  label: "Allow for this session",
12366
- value: "proceed_always" /* ProceedAlways */,
12393
+ value: ToolConfirmationOutcome.ProceedAlways,
12367
12394
  key: "Allow for this session"
12368
12395
  });
12369
12396
  if (allowPermanentApproval) {
12370
12397
  options2.push({
12371
12398
  label: "Allow for this file in all future sessions",
12372
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12399
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12373
12400
  key: "Allow for this file in all future sessions"
12374
12401
  });
12375
12402
  }
@@ -12377,119 +12404,119 @@ ${deceptiveUrlWarnings.map(
12377
12404
  if (!config.getIdeMode() || !isDiffingEnabled) {
12378
12405
  options2.push({
12379
12406
  label: "Modify with external editor",
12380
- value: "modify_with_editor" /* ModifyWithEditor */,
12407
+ value: ToolConfirmationOutcome.ModifyWithEditor,
12381
12408
  key: "Modify with external editor"
12382
12409
  });
12383
12410
  }
12384
12411
  options2.push({
12385
12412
  label: "No, suggest changes (esc)",
12386
- value: "cancel" /* Cancel */,
12413
+ value: ToolConfirmationOutcome.Cancel,
12387
12414
  key: "No, suggest changes (esc)"
12388
12415
  });
12389
12416
  }
12390
12417
  } else if (confirmationDetails.type === "sandbox_expansion") {
12391
12418
  options2.push({
12392
12419
  label: "Allow once",
12393
- value: "proceed_once" /* ProceedOnce */,
12420
+ value: ToolConfirmationOutcome.ProceedOnce,
12394
12421
  key: "Allow once"
12395
12422
  });
12396
12423
  if (isTrustedFolder) {
12397
12424
  options2.push({
12398
12425
  label: "Allow for this session",
12399
- value: "proceed_always" /* ProceedAlways */,
12426
+ value: ToolConfirmationOutcome.ProceedAlways,
12400
12427
  key: "Allow for this session"
12401
12428
  });
12402
12429
  if (allowPermanentApproval) {
12403
12430
  options2.push({
12404
12431
  label: "Allow for all future sessions",
12405
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12432
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12406
12433
  key: "Allow for all future sessions"
12407
12434
  });
12408
12435
  }
12409
12436
  }
12410
12437
  options2.push({
12411
12438
  label: "No, suggest changes (esc)",
12412
- value: "cancel" /* Cancel */,
12439
+ value: ToolConfirmationOutcome.Cancel,
12413
12440
  key: "No, suggest changes (esc)"
12414
12441
  });
12415
12442
  } else if (confirmationDetails.type === "exec") {
12416
12443
  options2.push({
12417
12444
  label: "Allow once",
12418
- value: "proceed_once" /* ProceedOnce */,
12445
+ value: ToolConfirmationOutcome.ProceedOnce,
12419
12446
  key: "Allow once"
12420
12447
  });
12421
12448
  if (isTrustedFolder) {
12422
12449
  options2.push({
12423
12450
  label: `Allow for this session`,
12424
- value: "proceed_always" /* ProceedAlways */,
12451
+ value: ToolConfirmationOutcome.ProceedAlways,
12425
12452
  key: `Allow for this session`
12426
12453
  });
12427
12454
  if (allowPermanentApproval) {
12428
12455
  options2.push({
12429
12456
  label: `Allow this command for all future sessions`,
12430
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12457
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12431
12458
  key: `Allow for all future sessions`
12432
12459
  });
12433
12460
  }
12434
12461
  }
12435
12462
  options2.push({
12436
12463
  label: "No, suggest changes (esc)",
12437
- value: "cancel" /* Cancel */,
12464
+ value: ToolConfirmationOutcome.Cancel,
12438
12465
  key: "No, suggest changes (esc)"
12439
12466
  });
12440
12467
  } else if (confirmationDetails.type === "info") {
12441
12468
  options2.push({
12442
12469
  label: "Allow once",
12443
- value: "proceed_once" /* ProceedOnce */,
12470
+ value: ToolConfirmationOutcome.ProceedOnce,
12444
12471
  key: "Allow once"
12445
12472
  });
12446
12473
  if (isTrustedFolder) {
12447
12474
  options2.push({
12448
12475
  label: "Allow for this session",
12449
- value: "proceed_always" /* ProceedAlways */,
12476
+ value: ToolConfirmationOutcome.ProceedAlways,
12450
12477
  key: "Allow for this session"
12451
12478
  });
12452
12479
  if (allowPermanentApproval) {
12453
12480
  options2.push({
12454
12481
  label: "Allow for all future sessions",
12455
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12482
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12456
12483
  key: "Allow for all future sessions"
12457
12484
  });
12458
12485
  }
12459
12486
  }
12460
12487
  options2.push({
12461
12488
  label: "No, suggest changes (esc)",
12462
- value: "cancel" /* Cancel */,
12489
+ value: ToolConfirmationOutcome.Cancel,
12463
12490
  key: "No, suggest changes (esc)"
12464
12491
  });
12465
12492
  } else if (confirmationDetails.type === "mcp") {
12466
12493
  options2.push({
12467
12494
  label: "Allow once",
12468
- value: "proceed_once" /* ProceedOnce */,
12495
+ value: ToolConfirmationOutcome.ProceedOnce,
12469
12496
  key: "Allow once"
12470
12497
  });
12471
12498
  if (isTrustedFolder) {
12472
12499
  options2.push({
12473
12500
  label: "Allow tool for this session",
12474
- value: "proceed_always_tool" /* ProceedAlwaysTool */,
12501
+ value: ToolConfirmationOutcome.ProceedAlwaysTool,
12475
12502
  key: "Allow tool for this session"
12476
12503
  });
12477
12504
  options2.push({
12478
12505
  label: "Allow all server tools for this session",
12479
- value: "proceed_always_server" /* ProceedAlwaysServer */,
12506
+ value: ToolConfirmationOutcome.ProceedAlwaysServer,
12480
12507
  key: "Allow all server tools for this session"
12481
12508
  });
12482
12509
  if (allowPermanentApproval) {
12483
12510
  options2.push({
12484
12511
  label: "Allow tool for all future sessions",
12485
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12512
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12486
12513
  key: "Allow tool for all future sessions"
12487
12514
  });
12488
12515
  }
12489
12516
  }
12490
12517
  options2.push({
12491
12518
  label: "No, suggest changes (esc)",
12492
- value: "cancel" /* Cancel */,
12519
+ value: ToolConfirmationOutcome.Cancel,
12493
12520
  key: "No, suggest changes (esc)"
12494
12521
  });
12495
12522
  }
@@ -12528,7 +12555,7 @@ ${deceptiveUrlWarnings.map(
12528
12555
  const containsRedirection = commandsToDisplay.some(
12529
12556
  (cmd) => hasRedirection(cmd)
12530
12557
  );
12531
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12558
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12532
12559
  if (containsRedirection && !isAutoEdit) {
12533
12560
  extraInfoLines = 1;
12534
12561
  }
@@ -12554,7 +12581,7 @@ ${deceptiveUrlWarnings.map(
12554
12581
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12555
12582
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12556
12583
  const alwaysAndSaveIndex = options2.findIndex(
12557
- (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12584
+ (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12558
12585
  );
12559
12586
  if (alwaysAndSaveIndex !== -1) {
12560
12587
  initialIndex2 = alwaysAndSaveIndex;
@@ -12571,10 +12598,10 @@ ${deceptiveUrlWarnings.map(
12571
12598
  {
12572
12599
  questions: confirmationDetails.questions,
12573
12600
  onSubmit: (answers) => {
12574
- handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12601
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12575
12602
  },
12576
12603
  onCancel: () => {
12577
- handleConfirm("cancel" /* Cancel */);
12604
+ handleConfirm(ToolConfirmationOutcome.Cancel);
12578
12605
  },
12579
12606
  width: terminalWidth,
12580
12607
  availableHeight: bodyHeight
@@ -12595,19 +12622,19 @@ ${deceptiveUrlWarnings.map(
12595
12622
  planPath: confirmationDetails.planPath,
12596
12623
  getPreferredEditor,
12597
12624
  onApprove: (approvalMode) => {
12598
- handleConfirm("proceed_once" /* ProceedOnce */, {
12625
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12599
12626
  approved: true,
12600
12627
  approvalMode
12601
12628
  });
12602
12629
  },
12603
12630
  onFeedback: (feedback) => {
12604
- handleConfirm("proceed_once" /* ProceedOnce */, {
12631
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12605
12632
  approved: false,
12606
12633
  feedback
12607
12634
  });
12608
12635
  },
12609
12636
  onCancel: () => {
12610
- handleConfirm("cancel" /* Cancel */);
12637
+ handleConfirm(ToolConfirmationOutcome.Cancel);
12611
12638
  },
12612
12639
  width: terminalWidth,
12613
12640
  availableHeight: bodyHeight
@@ -12717,7 +12744,7 @@ ${deceptiveUrlWarnings.map(
12717
12744
  const containsRedirection = commandsToDisplay.some(
12718
12745
  (cmd) => hasRedirection(cmd)
12719
12746
  );
12720
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12747
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12721
12748
  let warnings = null;
12722
12749
  if (containsRedirection && !isAutoEdit) {
12723
12750
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12880,7 +12907,7 @@ ${deceptiveUrlWarnings.map(
12880
12907
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12881
12908
  const renderRadioItem = (0, import_react44.useCallback)(
12882
12909
  (item, { titleColor }) => {
12883
- if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12910
+ if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12884
12911
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12885
12912
  item.label,
12886
12913
  " ",
@@ -13475,165 +13502,6 @@ var ConsentPrompt = (props) => {
13475
13502
  // packages/cli/src/ui/components/ThemeDialog.tsx
13476
13503
  var import_react47 = __toESM(require_react(), 1);
13477
13504
 
13478
- // packages/cli/src/utils/settingsUtils.ts
13479
- function flattenSchema(schema, prefix = "") {
13480
- let result = {};
13481
- for (const key in schema) {
13482
- const newKey = prefix ? `${prefix}.${key}` : key;
13483
- const definition = schema[key];
13484
- result[newKey] = { ...definition, key: newKey };
13485
- if (definition.properties) {
13486
- result = { ...result, ...flattenSchema(definition.properties, newKey) };
13487
- }
13488
- }
13489
- return result;
13490
- }
13491
- var _FLATTENED_SCHEMA;
13492
- function getFlattenedSchema() {
13493
- return _FLATTENED_SCHEMA ?? (_FLATTENED_SCHEMA = flattenSchema(getSettingsSchema()));
13494
- }
13495
- function getSettingDefinition(key) {
13496
- return getFlattenedSchema()[key];
13497
- }
13498
- function getDefaultValue(key) {
13499
- return getFlattenedSchema()[key]?.default;
13500
- }
13501
- function getDialogRestartRequiredSettings() {
13502
- return Object.values(getFlattenedSchema()).filter(
13503
- (definition) => definition.requiresRestart && definition.showInDialog !== false
13504
- ).map((definition) => definition.key);
13505
- }
13506
- function isRecord(value) {
13507
- return typeof value === "object" && value !== null;
13508
- }
13509
- function isSettingsValue(value) {
13510
- if (value === void 0) return true;
13511
- if (value === null) return false;
13512
- const type = typeof value;
13513
- return type === "string" || type === "number" || type === "boolean" || type === "object";
13514
- }
13515
- function getNestedValue(obj, path15) {
13516
- let current = obj;
13517
- for (const key of path15) {
13518
- if (!isRecord(current) || !(key in current)) {
13519
- return void 0;
13520
- }
13521
- current = current[key];
13522
- }
13523
- return current;
13524
- }
13525
- function getEffectiveValue(key, settings) {
13526
- const definition = getSettingDefinition(key);
13527
- if (!definition) {
13528
- return void 0;
13529
- }
13530
- const path15 = key.split(".");
13531
- const value = getNestedValue(settings, path15);
13532
- if (value !== void 0 && isSettingsValue(value)) {
13533
- return value;
13534
- }
13535
- return definition.default;
13536
- }
13537
- function getDialogSettingKeys() {
13538
- return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
13539
- }
13540
- function isInSettingsScope(key, scopeSettings) {
13541
- const path15 = key.split(".");
13542
- const value = getNestedValue(scopeSettings, path15);
13543
- return value !== void 0;
13544
- }
13545
- function getDisplayValue(key, scopeSettings, _mergedSettings) {
13546
- const definition = getSettingDefinition(key);
13547
- const existsInScope = isInSettingsScope(key, scopeSettings);
13548
- let value;
13549
- if (existsInScope) {
13550
- value = getEffectiveValue(key, scopeSettings);
13551
- } else {
13552
- value = getDefaultValue(key);
13553
- }
13554
- let valueString = String(value);
13555
- if (definition?.type === "object" && value !== null && typeof value === "object") {
13556
- valueString = JSON.stringify(value);
13557
- } else if (definition?.type === "enum" && definition.options) {
13558
- const option = definition.options?.find((option2) => option2.value === value);
13559
- valueString = option?.label ?? `${value}`;
13560
- }
13561
- if (definition?.unit === "%" && typeof value === "number") {
13562
- valueString = `${value} (${Math.round(value * 100)}%)`;
13563
- } else if (definition?.unit) {
13564
- valueString = `${valueString}${definition.unit}`;
13565
- }
13566
- if (existsInScope) {
13567
- return `${valueString}*`;
13568
- }
13569
- return valueString;
13570
- }
13571
- function tryParseJsonStringArray(input) {
13572
- try {
13573
- const parsed = JSON.parse(input);
13574
- if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
13575
- return parsed;
13576
- }
13577
- return null;
13578
- } catch {
13579
- return null;
13580
- }
13581
- }
13582
- function tryParseJsonObject(input) {
13583
- try {
13584
- const parsed = JSON.parse(input);
13585
- if (isRecord(parsed) && !Array.isArray(parsed)) {
13586
- return parsed;
13587
- }
13588
- return null;
13589
- } catch {
13590
- return null;
13591
- }
13592
- }
13593
- function parseStringArrayValue(input) {
13594
- const trimmed = input.trim();
13595
- if (trimmed === "") return [];
13596
- return tryParseJsonStringArray(trimmed) ?? input.split(",").map((p) => p.trim()).filter((p) => p.length > 0);
13597
- }
13598
- function parseObjectValue(input) {
13599
- const trimmed = input.trim();
13600
- if (trimmed === "") {
13601
- return null;
13602
- }
13603
- return tryParseJsonObject(trimmed);
13604
- }
13605
- function parseEditedValue(type, newValue) {
13606
- if (type === "number") {
13607
- if (newValue.trim() === "") {
13608
- return null;
13609
- }
13610
- const numParsed = Number(newValue.trim());
13611
- if (Number.isNaN(numParsed)) {
13612
- return null;
13613
- }
13614
- return numParsed;
13615
- }
13616
- if (type === "array") {
13617
- return parseStringArrayValue(newValue);
13618
- }
13619
- if (type === "object") {
13620
- return parseObjectValue(newValue);
13621
- }
13622
- return newValue;
13623
- }
13624
- function getEditValue(type, rawValue) {
13625
- if (rawValue === void 0) {
13626
- return void 0;
13627
- }
13628
- if (type === "array" && Array.isArray(rawValue)) {
13629
- return rawValue.join(", ");
13630
- }
13631
- if (type === "object" && rawValue !== null && typeof rawValue === "object") {
13632
- return JSON.stringify(rawValue);
13633
- }
13634
- return void 0;
13635
- }
13636
-
13637
13505
  // packages/cli/src/utils/dialogScopeUtils.ts
13638
13506
  var SCOPE_LABELS = {
13639
13507
  ["User" /* User */]: "User Settings",
@@ -15036,7 +14904,7 @@ function validateAuthMethodWithSettings(authType, settings) {
15036
14904
  if (settings.merged.security.auth.useExternal) {
15037
14905
  return null;
15038
14906
  }
15039
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14907
+ if (authType === AuthType.USE_GEMINI) {
15040
14908
  return null;
15041
14909
  }
15042
14910
  return validateAuthMethod(authType);
@@ -15088,7 +14956,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
15088
14956
  }
15089
14957
  return;
15090
14958
  }
15091
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14959
+ if (authType === AuthType.USE_GEMINI) {
15092
14960
  const key = await reloadApiKey();
15093
14961
  if (!key) {
15094
14962
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -15163,31 +15031,31 @@ function AuthDialog({
15163
15031
  let items = [
15164
15032
  {
15165
15033
  label: "Sign in with Google",
15166
- value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
15167
- key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
15034
+ value: AuthType.LOGIN_WITH_GOOGLE,
15035
+ key: AuthType.LOGIN_WITH_GOOGLE
15168
15036
  },
15169
15037
  ...process.env["CLOUD_SHELL"] === "true" ? [
15170
15038
  {
15171
15039
  label: "Use Cloud Shell user credentials",
15172
- value: "compute-default-credentials" /* COMPUTE_ADC */,
15173
- key: "compute-default-credentials" /* COMPUTE_ADC */
15040
+ value: AuthType.COMPUTE_ADC,
15041
+ key: AuthType.COMPUTE_ADC
15174
15042
  }
15175
15043
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
15176
15044
  {
15177
15045
  label: "Use metadata server application default credentials",
15178
- value: "compute-default-credentials" /* COMPUTE_ADC */,
15179
- key: "compute-default-credentials" /* COMPUTE_ADC */
15046
+ value: AuthType.COMPUTE_ADC,
15047
+ key: AuthType.COMPUTE_ADC
15180
15048
  }
15181
15049
  ] : [],
15182
15050
  {
15183
15051
  label: "Use Gemini API Key",
15184
- value: "gemini-api-key" /* USE_GEMINI */,
15185
- key: "gemini-api-key" /* USE_GEMINI */
15052
+ value: AuthType.USE_GEMINI,
15053
+ key: AuthType.USE_GEMINI
15186
15054
  },
15187
15055
  {
15188
15056
  label: "Vertex AI",
15189
- value: "vertex-ai" /* USE_VERTEX_AI */,
15190
- key: "vertex-ai" /* USE_VERTEX_AI */
15057
+ value: AuthType.USE_VERTEX_AI,
15058
+ key: AuthType.USE_VERTEX_AI
15191
15059
  }
15192
15060
  ];
15193
15061
  if (settings.merged.security.auth.enforcedType) {
@@ -15209,9 +15077,9 @@ function AuthDialog({
15209
15077
  return item.value === defaultAuthType;
15210
15078
  }
15211
15079
  if (process.env["GEMINI_API_KEY"]) {
15212
- return item.value === "gemini-api-key" /* USE_GEMINI */;
15080
+ return item.value === AuthType.USE_GEMINI;
15213
15081
  }
15214
- return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
15082
+ return item.value === AuthType.LOGIN_WITH_GOOGLE;
15215
15083
  });
15216
15084
  if (settings.merged.security.auth.enforcedType) {
15217
15085
  initialAuthIndex = 0;
@@ -15222,19 +15090,19 @@ function AuthDialog({
15222
15090
  return;
15223
15091
  }
15224
15092
  if (authType) {
15225
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
15093
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
15226
15094
  setAuthContext({ requiresRestart: true });
15227
15095
  } else {
15228
15096
  setAuthContext({});
15229
15097
  }
15230
15098
  await clearCachedCredentialFile();
15231
15099
  settings.setValue(scope, "security.auth.selectedType", authType);
15232
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
15100
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
15233
15101
  setExiting(true);
15234
15102
  setTimeout(relaunchApp, 100);
15235
15103
  return;
15236
15104
  }
15237
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
15105
+ if (authType === AuthType.USE_GEMINI) {
15238
15106
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
15239
15107
  return;
15240
15108
  }
@@ -15984,11 +15852,11 @@ var PrivacyNoticeText = ({
15984
15852
  }) => {
15985
15853
  const authType = config.getContentGeneratorConfig()?.authType;
15986
15854
  switch (authType) {
15987
- case "gemini-api-key" /* USE_GEMINI */:
15855
+ case AuthType.USE_GEMINI:
15988
15856
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GeminiPrivacyNotice, { onExit });
15989
- case "vertex-ai" /* USE_VERTEX_AI */:
15857
+ case AuthType.USE_VERTEX_AI:
15990
15858
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CloudPaidPrivacyNotice, { onExit });
15991
- case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15859
+ case AuthType.LOGIN_WITH_GOOGLE:
15992
15860
  default:
15993
15861
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CloudFreePrivacyNotice, { config, onExit });
15994
15862
  }
@@ -16029,7 +15897,7 @@ function ProQuotaDialog({
16029
15897
  value: "retry_always",
16030
15898
  key: "retry_always"
16031
15899
  },
16032
- ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15900
+ ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
16033
15901
  {
16034
15902
  label: "Upgrade for higher limits",
16035
15903
  value: "upgrade",
@@ -17182,7 +17050,7 @@ function ModelDialog({ onClose }) {
17182
17050
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
17183
17051
  const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
17184
17052
  const selectedAuthType = settings.merged.security.auth.selectedType;
17185
- const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
17053
+ const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
17186
17054
  const manualModelSelected = (0, import_react62.useMemo)(() => {
17187
17055
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
17188
17056
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -18234,10 +18102,10 @@ function initializeConsoleStore() {
18234
18102
  globalConsoleMessages = [];
18235
18103
  globalErrorCount = 0;
18236
18104
  notifyListeners();
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);
18105
+ coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
18106
+ coreEvents.off(CoreEvent.Output, handleOutput);
18107
+ coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
18108
+ coreEvents.on(CoreEvent.Output, handleOutput);
18241
18109
  }
18242
18110
  function notifyListeners() {
18243
18111
  for (const listener of listeners) {
@@ -20313,7 +20181,7 @@ function usePromptCompletion({
20313
20181
  { model: "prompt-completion" },
20314
20182
  contents,
20315
20183
  signal,
20316
- "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20184
+ LlmRole.UTILITY_AUTOCOMPLETE
20317
20185
  );
20318
20186
  if (signal.aborted) {
20319
20187
  return;
@@ -22050,9 +21918,9 @@ var InputPrompt = ({
22050
21918
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22051
21919
  }
22052
21920
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22053
- const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22054
- const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22055
- const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
21921
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
21922
+ const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
21923
+ const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22056
21924
  let statusColor;
22057
21925
  let statusText = "";
22058
21926
  if (shellModeActive) {
@@ -22898,22 +22766,22 @@ var ApprovalModeIndicator = ({
22898
22766
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
22899
22767
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
22900
22768
  switch (approvalMode) {
22901
- case "autoEdit" /* AUTO_EDIT */:
22769
+ case ApprovalMode.AUTO_EDIT:
22902
22770
  textColor = theme.status.warning;
22903
22771
  textContent = "auto-accept edits";
22904
22772
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
22905
22773
  break;
22906
- case "plan" /* PLAN */:
22774
+ case ApprovalMode.PLAN:
22907
22775
  textColor = theme.status.success;
22908
22776
  textContent = "plan";
22909
22777
  subText = `${cycleHint} to manual`;
22910
22778
  break;
22911
- case "yolo" /* YOLO */:
22779
+ case ApprovalMode.YOLO:
22912
22780
  textColor = theme.status.error;
22913
22781
  textContent = "YOLO";
22914
22782
  subText = yoloHint;
22915
22783
  break;
22916
- case "default" /* DEFAULT */:
22784
+ case ApprovalMode.DEFAULT:
22917
22785
  default:
22918
22786
  textColor = theme.text.accent;
22919
22787
  textContent = "";
@@ -22961,7 +22829,7 @@ var useComposerStatus = () => {
22961
22829
  (item) => item.type === "tool_group"
22962
22830
  ).some(
22963
22831
  (item) => item.tools.some(
22964
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
22832
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
22965
22833
  )
22966
22834
  ),
22967
22835
  [uiState.pendingHistoryItems]
@@ -22976,13 +22844,13 @@ var useComposerStatus = () => {
22976
22844
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
22977
22845
  if (hideMinimalModeHintWhileBusy) return null;
22978
22846
  switch (showApprovalModeIndicator) {
22979
- case "yolo" /* YOLO */:
22847
+ case ApprovalMode.YOLO:
22980
22848
  return { text: "YOLO", color: theme.status.error };
22981
- case "plan" /* PLAN */:
22849
+ case ApprovalMode.PLAN:
22982
22850
  return { text: "plan", color: theme.status.success };
22983
- case "autoEdit" /* AUTO_EDIT */:
22851
+ case ApprovalMode.AUTO_EDIT:
22984
22852
  return { text: "auto edit", color: theme.status.warning };
22985
- case "default" /* DEFAULT */:
22853
+ case ApprovalMode.DEFAULT:
22986
22854
  default:
22987
22855
  return null;
22988
22856
  }
@@ -23336,7 +23204,7 @@ var ConfigInitDisplay = ({
23336
23204
  let connected = 0;
23337
23205
  const connecting = [];
23338
23206
  for (const [name, client] of clients.entries()) {
23339
- if (client.getStatus() === "connected" /* CONNECTED */) {
23207
+ if (client.getStatus() === MCPServerStatus.CONNECTED) {
23340
23208
  connected++;
23341
23209
  } else {
23342
23210
  connecting.push(name);
@@ -23358,9 +23226,9 @@ var ConfigInitDisplay = ({
23358
23226
  );
23359
23227
  }
23360
23228
  };
23361
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23229
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23362
23230
  return () => {
23363
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23231
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23364
23232
  };
23365
23233
  }, [initialMessage]);
23366
23234
  return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Text, { children: [
@@ -24085,7 +23953,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24085
23953
  callId,
24086
23954
  name: SHELL_COMMAND_NAME,
24087
23955
  description: rawQuery,
24088
- status: "executing" /* Executing */,
23956
+ status: CoreToolCallStatus.Executing,
24089
23957
  isClientInitiated: true,
24090
23958
  resultDisplay: "",
24091
23959
  confirmationDetails: void 0
@@ -24211,7 +24079,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24211
24079
  mainContent = result.output.trim() || "(Command produced no output)";
24212
24080
  }
24213
24081
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24214
- let finalStatus = "success" /* Success */;
24082
+ let finalStatus = CoreToolCallStatus.Success;
24215
24083
  const prependToAnsiOutput = (output, text) => {
24216
24084
  const newLines = text.split("\n").map((line) => [
24217
24085
  {
@@ -24230,20 +24098,20 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24230
24098
  };
24231
24099
  let prefix = "";
24232
24100
  if (result.error) {
24233
- finalStatus = "error" /* Error */;
24101
+ finalStatus = CoreToolCallStatus.Error;
24234
24102
  prefix = result.error.message;
24235
24103
  } else if (result.aborted) {
24236
- finalStatus = "cancelled" /* Cancelled */;
24104
+ finalStatus = CoreToolCallStatus.Cancelled;
24237
24105
  prefix = "Command was cancelled.";
24238
24106
  } else if (result.backgrounded) {
24239
- finalStatus = "success" /* Success */;
24107
+ finalStatus = CoreToolCallStatus.Success;
24240
24108
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24241
24109
  mainContent = finalOutput;
24242
24110
  } else if (result.signal) {
24243
- finalStatus = "error" /* Error */;
24111
+ finalStatus = CoreToolCallStatus.Error;
24244
24112
  prefix = `Command terminated by signal: ${result.signal}.`;
24245
24113
  } else if (result.exitCode !== 0) {
24246
- finalStatus = "error" /* Error */;
24114
+ finalStatus = CoreToolCallStatus.Error;
24247
24115
  prefix = `Command exited with code ${result.exitCode}.`;
24248
24116
  }
24249
24117
  if (prefix) {
@@ -24269,7 +24137,7 @@ ${mainContent}`;
24269
24137
  status: finalStatus,
24270
24138
  resultDisplay: finalOutput
24271
24139
  };
24272
- if (finalStatus !== "cancelled" /* Cancelled */) {
24140
+ if (finalStatus !== CoreToolCallStatus.Cancelled) {
24273
24141
  addItemToHistory(
24274
24142
  {
24275
24143
  type: "tool_group",
@@ -25250,7 +25118,7 @@ function useQuotaAndFallback({
25250
25118
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25251
25119
  `/stats model for usage details`,
25252
25120
  `/model to switch models.`,
25253
- contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25121
+ contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25254
25122
  ].filter(Boolean);
25255
25123
  message = messageLines.join("\n");
25256
25124
  } else if (error instanceof ModelNotFoundError) {
@@ -25438,7 +25306,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25438
25306
  );
25439
25307
  setEditorError(null);
25440
25308
  setIsEditorDialogOpen(false);
25441
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25309
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25442
25310
  } catch (error) {
25443
25311
  setEditorError(`Failed to set editor preference: ${error}`);
25444
25312
  }
@@ -25447,7 +25315,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25447
25315
  );
25448
25316
  const exitEditorDialog = (0, import_react95.useCallback)(() => {
25449
25317
  setIsEditorDialogOpen(false);
25450
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25318
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25451
25319
  }, []);
25452
25320
  return {
25453
25321
  isEditorDialogOpen,
@@ -25802,7 +25670,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25802
25670
  canonicalPath: resolvedCommandPath
25803
25671
  } = parseSlashCommand(trimmed, commands);
25804
25672
  if (!commandToExecute) {
25805
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25673
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25806
25674
  if (isMcpLoading) {
25807
25675
  setIsProcessing(true);
25808
25676
  if (addToHistory) {
@@ -25970,7 +25838,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25970
25838
  onConfirm: async (resolvedOutcome) => {
25971
25839
  resolve3({
25972
25840
  outcome: resolvedOutcome,
25973
- approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
25841
+ approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
25974
25842
  });
25975
25843
  }
25976
25844
  };
@@ -25978,7 +25846,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25978
25846
  callId,
25979
25847
  name: "Expansion",
25980
25848
  description: "Command expansion needs shell access",
25981
- status: "awaiting_approval" /* AwaitingApproval */,
25849
+ status: CoreToolCallStatus.AwaitingApproval,
25982
25850
  isClientInitiated: true,
25983
25851
  resultDisplay: void 0,
25984
25852
  confirmationDetails
@@ -25989,7 +25857,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25989
25857
  });
25990
25858
  });
25991
25859
  setPendingItem(null);
25992
- if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
25860
+ if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
25993
25861
  addItem(
25994
25862
  {
25995
25863
  type: "info" /* INFO */,
@@ -25999,7 +25867,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25999
25867
  );
26000
25868
  return { type: "handled" };
26001
25869
  }
26002
- if (outcome === "proceed_always" /* ProceedAlways */) {
25870
+ if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26003
25871
  setSessionShellAllowlist(
26004
25872
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26005
25873
  );
@@ -26475,7 +26343,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26475
26343
  let description;
26476
26344
  let renderOutputAsMarkdown = false;
26477
26345
  const displayName = call.tool?.displayName ?? call.request.name;
26478
- if (call.status === "error" /* Error */) {
26346
+ if (call.status === CoreToolCallStatus.Error) {
26479
26347
  description = JSON.stringify(call.request.args);
26480
26348
  } else {
26481
26349
  description = call.invocation.getDescription();
@@ -26498,27 +26366,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26498
26366
  let progress = void 0;
26499
26367
  let progressTotal = void 0;
26500
26368
  switch (call.status) {
26501
- case "success" /* Success */:
26369
+ case CoreToolCallStatus.Success:
26502
26370
  resultDisplay = call.response.resultDisplay;
26503
26371
  outputFile = call.response.outputFile;
26504
26372
  break;
26505
- case "error" /* Error */:
26506
- case "cancelled" /* Cancelled */:
26373
+ case CoreToolCallStatus.Error:
26374
+ case CoreToolCallStatus.Cancelled:
26507
26375
  resultDisplay = call.response.resultDisplay;
26508
26376
  break;
26509
- case "awaiting_approval" /* AwaitingApproval */:
26377
+ case CoreToolCallStatus.AwaitingApproval:
26510
26378
  correlationId = call.correlationId;
26511
26379
  confirmationDetails = call.confirmationDetails;
26512
26380
  break;
26513
- case "executing" /* Executing */:
26381
+ case CoreToolCallStatus.Executing:
26514
26382
  resultDisplay = call.liveOutput;
26515
26383
  ptyId = call.pid;
26516
26384
  progressMessage = call.progressMessage;
26517
26385
  progress = call.progress;
26518
26386
  progressTotal = call.progressTotal;
26519
26387
  break;
26520
- case "scheduled" /* Scheduled */:
26521
- case "validating" /* Validating */:
26388
+ case CoreToolCallStatus.Scheduled:
26389
+ case CoreToolCallStatus.Validating:
26522
26390
  break;
26523
26391
  default: {
26524
26392
  const exhaustiveCheck = call;
@@ -26589,7 +26457,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26589
26457
  const handler = (event) => {
26590
26458
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26591
26459
  const hasExecuting = event.toolCalls.some(
26592
- (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26460
+ (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26593
26461
  );
26594
26462
  if (hasExecuting) {
26595
26463
  setLastToolOutputTime(Date.now());
@@ -26598,7 +26466,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26598
26466
  const prevCalls = prev[event.schedulerId] ?? [];
26599
26467
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26600
26468
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26601
- (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26469
+ (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26602
26470
  );
26603
26471
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26604
26472
  return prev;
@@ -26610,9 +26478,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26610
26478
  };
26611
26479
  });
26612
26480
  };
26613
- messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26481
+ messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26614
26482
  return () => {
26615
- messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26483
+ messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26616
26484
  };
26617
26485
  }, [messageBus, internalAdaptToolCalls]);
26618
26486
  (0, import_react101.useEffect)(() => {
@@ -26634,9 +26502,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26634
26502
  };
26635
26503
  });
26636
26504
  };
26637
- messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26505
+ messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26638
26506
  return () => {
26639
- messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26507
+ messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26640
26508
  };
26641
26509
  }, [messageBus]);
26642
26510
  const schedule = (0, import_react101.useCallback)(
@@ -26735,8 +26603,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26735
26603
  const prev = prevMap.get(coreCall.request.callId);
26736
26604
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26737
26605
  let status = coreCall.status;
26738
- if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26739
- status = "executing" /* Executing */;
26606
+ if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26607
+ status = CoreToolCallStatus.Executing;
26740
26608
  }
26741
26609
  return {
26742
26610
  ...coreCall,
@@ -26768,7 +26636,7 @@ function getBackgroundedToolInfo(toolCall) {
26768
26636
  };
26769
26637
  }
26770
26638
  function isBackgroundableExecutingToolCall(toolCall) {
26771
- return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26639
+ return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26772
26640
  }
26773
26641
  function showCitations(settings) {
26774
26642
  const enabled = settings.merged.ui.showCitations;
@@ -26778,14 +26646,14 @@ function showCitations(settings) {
26778
26646
  return true;
26779
26647
  }
26780
26648
  function calculateStreamingState(isResponding, toolCalls) {
26781
- if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26649
+ if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26782
26650
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26783
26651
  }
26784
26652
  const isAnyToolActive = toolCalls.some((tc) => {
26785
- if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26653
+ if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26786
26654
  return true;
26787
26655
  }
26788
- if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26656
+ if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26789
26657
  return !tc.responseSubmittedToGemini;
26790
26658
  }
26791
26659
  return false;
@@ -26832,9 +26700,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26832
26700
  }
26833
26701
  setRetryStatus(payload);
26834
26702
  };
26835
- coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
26703
+ coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
26836
26704
  return () => {
26837
- coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
26705
+ coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
26838
26706
  };
26839
26707
  }, [isRespondingRef]);
26840
26708
  const [
@@ -26967,12 +26835,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26967
26835
  const tc = toolCalls[i];
26968
26836
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
26969
26837
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
26970
- const isAgent = tc.tool?.kind === "agent" /* Agent */;
26838
+ const isAgent = tc.tool?.kind === Kind.Agent;
26971
26839
  if (isAgent) {
26972
26840
  let contigAgentsComplete = true;
26973
26841
  for (let j = i + 1; j < toolCalls.length; j++) {
26974
26842
  const nextTc = toolCalls[j];
26975
- if (nextTc.tool?.kind === "agent" /* Agent */) {
26843
+ if (nextTc.tool?.kind === Kind.Agent) {
26976
26844
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
26977
26845
  contigAgentsComplete = false;
26978
26846
  break;
@@ -26998,7 +26866,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26998
26866
  let currentGroup = [];
26999
26867
  for (const tc of toolsToPush) {
27000
26868
  newPushed.add(tc.request.callId);
27001
- if (tc.tool?.kind === "agent" /* Agent */) {
26869
+ if (tc.tool?.kind === Kind.Agent) {
27002
26870
  currentGroup.push(tc);
27003
26871
  } else {
27004
26872
  if (currentGroup.length > 0) {
@@ -27148,7 +27016,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27148
27016
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27149
27017
  }, [activeShellPtyId, addItem, setIsResponding]);
27150
27018
  (0, import_react102.useEffect)(() => {
27151
- if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27019
+ if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27152
27020
  const lastUserMessageIndex = history.findLastIndex(
27153
27021
  (item) => item.type === "user" /* USER */
27154
27022
  );
@@ -27234,7 +27102,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27234
27102
  if (tool.name === SHELL_COMMAND_NAME) {
27235
27103
  return {
27236
27104
  ...tool,
27237
- status: "cancelled" /* Cancelled */,
27105
+ status: CoreToolCallStatus.Cancelled,
27238
27106
  resultDisplay: tool.resultDisplay
27239
27107
  };
27240
27108
  }
@@ -27290,7 +27158,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27290
27158
  let localQueryToSendToGemini = null;
27291
27159
  if (typeof query === "string") {
27292
27160
  const trimmedQuery = query.trim();
27293
- await logger?.logMessage("user" /* USER */, trimmedQuery);
27161
+ await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27294
27162
  if (!shellModeActive) {
27295
27163
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27296
27164
  if (slashCommandResult) {
@@ -27446,7 +27314,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27446
27314
  if (pendingHistoryItemRef.current) {
27447
27315
  if (pendingHistoryItemRef.current.type === "tool_group") {
27448
27316
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27449
- (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27317
+ (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27450
27318
  );
27451
27319
  const pendingItem = {
27452
27320
  ...pendingHistoryItemRef.current,
@@ -27692,15 +27560,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27692
27560
  let geminiMessageBuffer = "";
27693
27561
  const toolCallRequests = [];
27694
27562
  for await (const event of stream) {
27695
- if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27563
+ if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27696
27564
  setThought(null);
27697
27565
  }
27698
27566
  switch (event.type) {
27699
- case "thought" /* Thought */:
27567
+ case GeminiEventType.Thought:
27700
27568
  setLastGeminiActivityTime(Date.now());
27701
27569
  handleThoughtEvent(event.value, userMessageTimestamp);
27702
27570
  break;
27703
- case "content" /* Content */:
27571
+ case GeminiEventType.Content:
27704
27572
  setLastGeminiActivityTime(Date.now());
27705
27573
  geminiMessageBuffer = handleContentEvent(
27706
27574
  event.value,
@@ -27708,16 +27576,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27708
27576
  userMessageTimestamp
27709
27577
  );
27710
27578
  break;
27711
- case "tool_call_request" /* ToolCallRequest */:
27579
+ case GeminiEventType.ToolCallRequest:
27712
27580
  toolCallRequests.push(event.value);
27713
27581
  break;
27714
- case "user_cancelled" /* UserCancelled */:
27582
+ case GeminiEventType.UserCancelled:
27715
27583
  handleUserCancelledEvent(userMessageTimestamp);
27716
27584
  break;
27717
- case "error" /* Error */:
27585
+ case GeminiEventType.Error:
27718
27586
  handleErrorEvent(event.value, userMessageTimestamp);
27719
27587
  break;
27720
- case "agent_execution_stopped" /* AgentExecutionStopped */:
27588
+ case GeminiEventType.AgentExecutionStopped:
27721
27589
  handleAgentExecutionStoppedEvent(
27722
27590
  event.value.reason,
27723
27591
  userMessageTimestamp,
@@ -27725,7 +27593,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27725
27593
  event.value.contextCleared
27726
27594
  );
27727
27595
  break;
27728
- case "agent_execution_blocked" /* AgentExecutionBlocked */:
27596
+ case GeminiEventType.AgentExecutionBlocked:
27729
27597
  handleAgentExecutionBlockedEvent(
27730
27598
  event.value.reason,
27731
27599
  userMessageTimestamp,
@@ -27733,35 +27601,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27733
27601
  event.value.contextCleared
27734
27602
  );
27735
27603
  break;
27736
- case "chat_compressed" /* ChatCompressed */:
27604
+ case GeminiEventType.ChatCompressed:
27737
27605
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27738
27606
  break;
27739
- case "tool_call_confirmation" /* ToolCallConfirmation */:
27740
- case "tool_call_response" /* ToolCallResponse */:
27607
+ case GeminiEventType.ToolCallConfirmation:
27608
+ case GeminiEventType.ToolCallResponse:
27741
27609
  break;
27742
- case "max_session_turns" /* MaxSessionTurns */:
27610
+ case GeminiEventType.MaxSessionTurns:
27743
27611
  handleMaxSessionTurnsEvent();
27744
27612
  break;
27745
- case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27613
+ case GeminiEventType.ContextWindowWillOverflow:
27746
27614
  handleContextWindowWillOverflowEvent(
27747
27615
  event.value.estimatedRequestTokenCount,
27748
27616
  event.value.remainingTokenCount
27749
27617
  );
27750
27618
  break;
27751
- case "finished" /* Finished */:
27619
+ case GeminiEventType.Finished:
27752
27620
  handleFinishedEvent(event, userMessageTimestamp);
27753
27621
  break;
27754
- case "citation" /* Citation */:
27622
+ case GeminiEventType.Citation:
27755
27623
  handleCitationEvent(event.value, userMessageTimestamp);
27756
27624
  break;
27757
- case "model_info" /* ModelInfo */:
27625
+ case GeminiEventType.ModelInfo:
27758
27626
  handleChatModelEvent(event.value, userMessageTimestamp);
27759
27627
  break;
27760
- case "loop_detected" /* LoopDetected */:
27628
+ case GeminiEventType.LoopDetected:
27761
27629
  loopDetectedRef.current = true;
27762
27630
  break;
27763
- case "retry" /* Retry */:
27764
- case "invalid_stream" /* InvalidStream */:
27631
+ case GeminiEventType.Retry:
27632
+ case GeminiEventType.InvalidStream:
27765
27633
  break;
27766
27634
  default: {
27767
27635
  const unreachable = event;
@@ -27802,7 +27670,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27802
27670
  const submitQuery = (0, import_react102.useCallback)(
27803
27671
  async (query, options, prompt_id) => runInDevTraceSpan(
27804
27672
  {
27805
- operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
27673
+ operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
27806
27674
  sessionId: config.getSessionId()
27807
27675
  },
27808
27676
  async ({ metadata: spanMetadata }) => {
@@ -27963,7 +27831,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27963
27831
  );
27964
27832
  const handleApprovalModeChange = (0, import_react102.useCallback)(
27965
27833
  async (newApprovalMode) => {
27966
- if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
27834
+ if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
27967
27835
  if (geminiClient) {
27968
27836
  try {
27969
27837
  await geminiClient.addHistory({
@@ -27986,11 +27854,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27986
27854
  }
27987
27855
  }
27988
27856
  previousApprovalModeRef.current = newApprovalMode;
27989
- if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
27857
+ if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
27990
27858
  let awaitingApprovalCalls = toolCalls.filter(
27991
27859
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
27992
27860
  );
27993
- if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
27861
+ if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
27994
27862
  awaitingApprovalCalls = awaitingApprovalCalls.filter(
27995
27863
  (call) => EDIT_TOOL_NAMES.has(call.request.name)
27996
27864
  );
@@ -27999,11 +27867,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27999
27867
  if (call.correlationId) {
28000
27868
  try {
28001
27869
  await config.getMessageBus().publish({
28002
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
27870
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28003
27871
  correlationId: call.correlationId,
28004
27872
  confirmed: true,
28005
27873
  requiresUserConfirmation: false,
28006
- outcome: "proceed_once" /* ProceedOnce */
27874
+ outcome: ToolConfirmationOutcome.ProceedOnce
28007
27875
  });
28008
27876
  } catch (error) {
28009
27877
  debugLogger.warn(
@@ -28081,14 +27949,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28081
27949
  );
28082
27950
  if (isLowErrorVerbosity) {
28083
27951
  suppressedToolErrorCountRef.current += geminiTools.filter(
28084
- (tc) => tc.status === "error" /* Error */
27952
+ (tc) => tc.status === CoreToolCallStatus.Error
28085
27953
  ).length;
28086
27954
  }
28087
27955
  if (geminiTools.length === 0) {
28088
27956
  return;
28089
27957
  }
28090
27958
  const stopExecutionTool = geminiTools.find(
28091
- (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
27959
+ (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28092
27960
  );
28093
27961
  if (stopExecutionTool && stopExecutionTool.response.error) {
28094
27962
  maybeAddSuppressedToolErrorNote();
@@ -28108,9 +27976,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28108
27976
  (tc) => !isTopicTool2(tc.request.name)
28109
27977
  );
28110
27978
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28111
- (tc) => tc.status === "cancelled" /* Cancelled */
27979
+ (tc) => tc.status === CoreToolCallStatus.Cancelled
28112
27980
  );
28113
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
27981
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28114
27982
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28115
27983
  if (!turnCancelledRef.current) {
28116
27984
  addItem({
@@ -28191,7 +28059,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28191
28059
  return;
28192
28060
  }
28193
28061
  const restorableToolCalls = toolCalls.filter(
28194
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28062
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28195
28063
  );
28196
28064
  if (restorableToolCalls.length > 0) {
28197
28065
  if (!gitService) {
@@ -28410,14 +28278,14 @@ var useAgentStream = ({
28410
28278
  const displayName = legacyState?.displayName ?? event.name;
28411
28279
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28412
28280
  const desc = legacyState?.description ?? "";
28413
- const fallbackKind = "other" /* Other */;
28281
+ const fallbackKind = Kind.Other;
28414
28282
  const newCall = {
28415
28283
  callId: event.requestId,
28416
28284
  name: displayName,
28417
28285
  originalRequestName: event.name,
28418
28286
  description: desc,
28419
28287
  display: event.display,
28420
- status: "scheduled" /* Scheduled */,
28288
+ status: CoreToolCallStatus.Scheduled,
28421
28289
  isClientInitiated: false,
28422
28290
  renderOutputAsMarkdown: isOutputMarkdown,
28423
28291
  kind: legacyState?.kind ?? fallbackKind,
@@ -28435,10 +28303,10 @@ var useAgentStream = ({
28435
28303
  const evtStatus = legacyState?.status;
28436
28304
  let status = tc.status;
28437
28305
  if (evtStatus === "executing")
28438
- status = "executing" /* Executing */;
28439
- else if (evtStatus === "error") status = "error" /* Error */;
28306
+ status = CoreToolCallStatus.Executing;
28307
+ else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28440
28308
  else if (evtStatus === "success")
28441
- status = "success" /* Success */;
28309
+ status = CoreToolCallStatus.Success;
28442
28310
  const display = event.display?.result;
28443
28311
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28444
28312
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28471,7 +28339,7 @@ var useAgentStream = ({
28471
28339
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28472
28340
  return {
28473
28341
  ...tc,
28474
- status: event.isError ? "error" /* Error */ : "success" /* Success */,
28342
+ status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28475
28343
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28476
28344
  resultDisplay,
28477
28345
  outputFile
@@ -28523,7 +28391,7 @@ var useAgentStream = ({
28523
28391
  if (!options?.isContinuation) {
28524
28392
  if (typeof query === "string") {
28525
28393
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28526
- void logger?.logMessage("user" /* USER */, query);
28394
+ void logger?.logMessage(MessageSenderType.USER, query);
28527
28395
  }
28528
28396
  startNewPrompt();
28529
28397
  }
@@ -30024,9 +29892,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30024
29892
  const handleFolderTrustSelect = (0, import_react108.useCallback)(
30025
29893
  async (choice) => {
30026
29894
  const trustLevelMap = {
30027
- ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30028
- ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30029
- ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
29895
+ ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
29896
+ ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
29897
+ ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30030
29898
  };
30031
29899
  const trustLevel = trustLevelMap[choice];
30032
29900
  if (!trustLevel) return;
@@ -30045,7 +29913,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30045
29913
  }, 100);
30046
29914
  return;
30047
29915
  }
30048
- const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
29916
+ const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30049
29917
  onTrustChange(currentIsTrusted);
30050
29918
  setIsTrusted(currentIsTrusted);
30051
29919
  const wasTrusted = isTrusted ?? false;
@@ -31043,7 +30911,7 @@ function useMessageQueue({
31043
30911
  var import_react110 = __toESM(require_react(), 1);
31044
30912
  function useMcpStatus(config) {
31045
30913
  const [discoveryState, setDiscoveryState] = (0, import_react110.useState)(
31046
- () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
30914
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31047
30915
  );
31048
30916
  const [mcpServerCount, setMcpServerCount] = (0, import_react110.useState)(
31049
30917
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31056,12 +30924,12 @@ function useMcpStatus(config) {
31056
30924
  setMcpServerCount(manager.getMcpServerCount());
31057
30925
  }
31058
30926
  };
31059
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
30927
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31060
30928
  return () => {
31061
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
30929
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31062
30930
  };
31063
30931
  }, [config]);
31064
- const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
30932
+ const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31065
30933
  return {
31066
30934
  discoveryState,
31067
30935
  mcpServerCount,
@@ -31088,7 +30956,7 @@ function useApprovalModeIndicator({
31088
30956
  (key) => {
31089
30957
  let nextApprovalMode;
31090
30958
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31091
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
30959
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31092
30960
  if (addItem) {
31093
30961
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31094
30962
  const adminSettings = config.getRemoteAdminSettings();
@@ -31106,21 +30974,21 @@ function useApprovalModeIndicator({
31106
30974
  }
31107
30975
  return;
31108
30976
  }
31109
- nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
30977
+ nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31110
30978
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31111
30979
  const currentMode = config.getApprovalMode();
31112
30980
  switch (currentMode) {
31113
- case "default" /* DEFAULT */:
31114
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
30981
+ case ApprovalMode.DEFAULT:
30982
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31115
30983
  break;
31116
- case "autoEdit" /* AUTO_EDIT */:
31117
- nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
30984
+ case ApprovalMode.AUTO_EDIT:
30985
+ nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31118
30986
  break;
31119
- case "plan" /* PLAN */:
31120
- nextApprovalMode = "default" /* DEFAULT */;
30987
+ case ApprovalMode.PLAN:
30988
+ nextApprovalMode = ApprovalMode.DEFAULT;
31121
30989
  break;
31122
- case "yolo" /* YOLO */:
31123
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
30990
+ case ApprovalMode.YOLO:
30991
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31124
30992
  break;
31125
30993
  default:
31126
30994
  }
@@ -31513,11 +31381,11 @@ var useHookDisplayState = () => {
31513
31381
  removeHook();
31514
31382
  }
31515
31383
  };
31516
- coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31517
- coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31384
+ coreEvents.on(CoreEvent.HookStart, handleHookStart);
31385
+ coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31518
31386
  return () => {
31519
- coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31520
- coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31387
+ coreEvents.off(CoreEvent.HookStart, handleHookStart);
31388
+ coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31521
31389
  activeTimeouts.forEach(clearTimeout);
31522
31390
  activeTimeouts.clear();
31523
31391
  };
@@ -32362,7 +32230,7 @@ var AppContainer = (props) => {
32362
32230
  debugLogger.error("Failed to start memory service:", e);
32363
32231
  });
32364
32232
  }
32365
- const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32233
+ const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32366
32234
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32367
32235
  if (result) {
32368
32236
  if (result.systemMessage) {
@@ -32398,7 +32266,7 @@ var AppContainer = (props) => {
32398
32266
  );
32399
32267
  const ideClient = await IdeClient.getInstance();
32400
32268
  await ideClient.disconnect();
32401
- await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32269
+ await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32402
32270
  };
32403
32271
  registerCleanup(cleanupFn);
32404
32272
  return () => {
@@ -32423,11 +32291,11 @@ var AppContainer = (props) => {
32423
32291
  resetTime: payload.resetTime
32424
32292
  });
32425
32293
  };
32426
- coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32427
- coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32294
+ coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32295
+ coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32428
32296
  return () => {
32429
- coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32430
- coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32297
+ coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32298
+ coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32431
32299
  };
32432
32300
  }, [config]);
32433
32301
  (0, import_react124.useEffect)(() => {
@@ -32440,16 +32308,16 @@ var AppContainer = (props) => {
32440
32308
  const handleAgentsDiscovered = (payload) => {
32441
32309
  setNewAgents(payload.agents);
32442
32310
  };
32443
- coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32444
- coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32445
- coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32311
+ coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32312
+ coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32313
+ coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32446
32314
  return () => {
32447
- coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32315
+ coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32448
32316
  coreEvents.off(
32449
- "admin-settings-changed" /* AdminSettingsChanged */,
32317
+ CoreEvent.AdminSettingsChanged,
32450
32318
  handleAdminSettingsChanged
32451
32319
  );
32452
- coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32320
+ coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32453
32321
  };
32454
32322
  }, [settings]);
32455
32323
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32515,11 +32383,11 @@ var AppContainer = (props) => {
32515
32383
  exitEditorDialog
32516
32384
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32517
32385
  (0, import_react124.useEffect)(() => {
32518
- coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32519
- coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32386
+ coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32387
+ coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32520
32388
  return () => {
32521
- coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32522
- coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32389
+ coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32390
+ coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32523
32391
  };
32524
32392
  }, [handleEditorClose, openEditorDialog]);
32525
32393
  (0, import_react124.useEffect)(() => {
@@ -32587,7 +32455,7 @@ var AppContainer = (props) => {
32587
32455
  errorVerbosity: settings.merged.ui.errorVerbosity
32588
32456
  });
32589
32457
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32590
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32458
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32591
32459
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32592
32460
  const { loadHistoryForResume, isResuming } = useSessionResume({
32593
32461
  config,
@@ -32615,7 +32483,7 @@ var AppContainer = (props) => {
32615
32483
  async (authType, scope) => {
32616
32484
  if (authType) {
32617
32485
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32618
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32486
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32619
32487
  setAuthContext({ requiresRestart: true });
32620
32488
  } else {
32621
32489
  setAuthContext({});
@@ -32643,7 +32511,7 @@ var AppContainer = (props) => {
32643
32511
  );
32644
32512
  return;
32645
32513
  }
32646
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32514
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32647
32515
  writeToStdout(`
32648
32516
  ----------------------------------------------------------------
32649
32517
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32668,7 +32536,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32668
32536
  }
32669
32537
  await saveApiKey(apiKey);
32670
32538
  await reloadApiKey();
32671
- await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32539
+ await config.refreshAuth(AuthType.USE_GEMINI);
32672
32540
  setAuthState("authenticated" /* Authenticated */);
32673
32541
  } catch (e) {
32674
32542
  onAuthError(
@@ -32693,7 +32561,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32693
32561
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32694
32562
  );
32695
32563
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32696
- if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32564
+ if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32697
32565
  return;
32698
32566
  }
32699
32567
  const error = validateAuthMethod(
@@ -32812,9 +32680,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
32812
32680
  }
32813
32681
  });
32814
32682
  };
32815
- coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
32683
+ coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
32816
32684
  return () => {
32817
- coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
32685
+ coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
32818
32686
  };
32819
32687
  }, []);
32820
32688
  const performMemoryRefresh = (0, import_react124.useCallback)(async () => {
@@ -33487,7 +33355,7 @@ ${queuedText}` : queuedText;
33487
33355
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33488
33356
  if (settings.merged.general.devtools) {
33489
33357
  void (async () => {
33490
- const { toggleDevToolsPanel } = await import("./devtoolsService-UQCUIXV5.js");
33358
+ const { toggleDevToolsPanel } = await import("./devtoolsService-OIMHTGLW.js");
33491
33359
  await toggleDevToolsPanel(
33492
33360
  config,
33493
33361
  showErrorDetails,
@@ -33705,12 +33573,12 @@ ${queuedText}` : queuedText;
33705
33573
  Date.now()
33706
33574
  );
33707
33575
  };
33708
- coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33709
- coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33576
+ coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33577
+ coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33710
33578
  coreEvents.drainBacklogs();
33711
33579
  return () => {
33712
- coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33713
- coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33580
+ coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33581
+ coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33714
33582
  };
33715
33583
  }, [historyManager]);
33716
33584
  const nightly = props.version.includes("nightly");
@@ -33812,9 +33680,9 @@ ${queuedText}` : queuedText;
33812
33680
  const handleMemoryChanged = (result) => {
33813
33681
  setGeminiMdFileCount(result.fileCount);
33814
33682
  };
33815
- coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
33683
+ coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
33816
33684
  return () => {
33817
- coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
33685
+ coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
33818
33686
  };
33819
33687
  }, []);
33820
33688
  (0, import_react124.useEffect)(() => {