@google/gemini-cli 0.45.0-preview.0 → 0.45.0-preview.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 (66) hide show
  1. package/bundle/{chunk-I7UI7NB6.js → chunk-2ZH72RHY.js} +3 -3
  2. package/bundle/{chunk-EZCW6IDX.js → chunk-3NDAYKF4.js} +1 -1
  3. package/bundle/{chunk-IPQLMJS5.js → chunk-4KX3ETW3.js} +1 -1
  4. package/bundle/{chunk-4FNXKOEB.js → chunk-565MWDPP.js} +23 -13
  5. package/bundle/{chunk-J4QUIOHJ.js → chunk-5BX5PJIE.js} +7 -7
  6. package/bundle/{chunk-J7SEBVDD.js → chunk-5YTIYFJO.js} +7544 -14042
  7. package/bundle/{chunk-GIXFMPPJ.js → chunk-6WWGBNKT.js} +1 -1
  8. package/bundle/{chunk-4M3TG6ZU.js → chunk-BLUAEAZN.js} +1 -1
  9. package/bundle/{chunk-2RRZM3IR.js → chunk-BO72FGK2.js} +7 -7
  10. package/bundle/{chunk-NOJPXYUJ.js → chunk-CJHCK2YW.js} +1 -1
  11. package/bundle/{chunk-S4CJ6KAO.js → chunk-CJTRYZPP.js} +3 -3
  12. package/bundle/chunk-DDJWQSDN.js +394439 -0
  13. package/bundle/{chunk-APSDEHHA.js → chunk-E3KBY4EQ.js} +1 -1
  14. package/bundle/{chunk-WPCNMQ6J.js → chunk-FEY3T6LA.js} +9 -8
  15. package/bundle/{chunk-Q3UZDZZV.js → chunk-HA5VES5S.js} +3 -3
  16. package/bundle/{chunk-Y5REX36P.js → chunk-HVWNKZSB.js} +1 -1
  17. package/bundle/{chunk-2O7YSVPU.js → chunk-HZCAEM2F.js} +2 -2
  18. package/bundle/{chunk-DMCSPKNM.js → chunk-IGJG7DNZ.js} +1 -1
  19. package/bundle/{chunk-TH3OOWK4.js → chunk-JWWA32XO.js} +67 -54
  20. package/bundle/{chunk-LUQGJPIY.js → chunk-JXVK53RJ.js} +2 -2
  21. package/bundle/{chunk-VS2OY6HJ.js → chunk-K43EAKOP.js} +8 -5
  22. package/bundle/{chunk-N4X4WHSW.js → chunk-NB2NOE4L.js} +2 -2
  23. package/bundle/chunk-NVJOR76X.js +1571 -0
  24. package/bundle/chunk-NYWYNF2Z.js +81685 -0
  25. package/bundle/chunk-OQLEYMM2.js +512 -0
  26. package/bundle/{chunk-OY6QYVTR.js → chunk-OWSYSTWM.js} +1 -1
  27. package/bundle/{chunk-CWAXEILN.js → chunk-R52453KY.js} +26 -16
  28. package/bundle/{chunk-R5OZKB4U.js → chunk-S6AQSJNU.js} +1 -1
  29. package/bundle/chunk-SKDT4PWC.js +118 -0
  30. package/bundle/chunk-TCAVPMJX.js +17320 -0
  31. package/bundle/chunk-WTRP3GGZ.js +154 -0
  32. package/bundle/chunk-Y6SLZFPD.js +398 -0
  33. package/bundle/{cleanup-2WCUS5XU.js → cleanup-2FHZMQ3Z.js} +2 -2
  34. package/bundle/{cleanup-7FHLTEXT.js → cleanup-F7XRM3DT.js} +2 -2
  35. package/bundle/{cleanup-WGOZFAQJ.js → cleanup-OZH3SJVM.js} +2 -2
  36. package/bundle/cleanup-ZO5CVKGH.js +32 -0
  37. package/bundle/{core-SIRU2VWJ.js → core-B47ZXN3Y.js} +1 -1
  38. package/bundle/{devtoolsService-IANYOK3R.js → devtoolsService-L7PYKOHR.js} +2 -2
  39. package/bundle/{devtoolsService-4Y2RGEUE.js → devtoolsService-OYQJHPEW.js} +4 -3
  40. package/bundle/devtoolsService-SGV7MSUA.js +856 -0
  41. package/bundle/{devtoolsService-F5XFL4BF.js → devtoolsService-XYSZCMQM.js} +2 -2
  42. package/bundle/{dist-67ZORME5.js → dist-C6L3MGQS.js} +1 -1
  43. package/bundle/{core-LD6MHGD6.js → dist-MOEHPHUN.js} +1 -1
  44. package/bundle/dist-WLKMTHZQ.js +2134 -0
  45. package/bundle/{gemini-5ZI322FJ.js → gemini-2XSNIT2N.js} +212 -196
  46. package/bundle/{gemini-24ENZ343.js → gemini-CHS2YNJG.js} +13 -13
  47. package/bundle/gemini-CQDPCFEE.js +16406 -0
  48. package/bundle/{gemini-74UML3PJ.js → gemini-LT5MWLZQ.js} +13 -13
  49. package/bundle/gemini.js +10 -9
  50. package/bundle/{interactiveCli-7GM3U7SA.js → interactiveCli-2YFAMDR5.js} +8 -8
  51. package/bundle/{interactiveCli-XM5HDVD7.js → interactiveCli-6EFCVZP7.js} +314 -295
  52. package/bundle/interactiveCli-HA3BASZN.js +34726 -0
  53. package/bundle/{interactiveCli-BVZLMTVC.js → interactiveCli-UUI7OUZK.js} +8 -8
  54. package/bundle/{liteRtServerManager-6N5DYDEQ.js → liteRtServerManager-2VKZTPMY.js} +4 -4
  55. package/bundle/{liteRtServerManager-JVMDH3TN.js → liteRtServerManager-4PZ3X7SS.js} +4 -4
  56. package/bundle/{liteRtServerManager-3HS3VUPU.js → liteRtServerManager-GH6VHWTU.js} +4 -4
  57. package/bundle/liteRtServerManager-OMSM6SJU.js +65 -0
  58. package/bundle/{oauth2-provider-U72EWZHQ.js → oauth2-provider-4UIWNIX3.js} +1 -1
  59. package/bundle/{oauth2-provider-RUFABDNL.js → oauth2-provider-BDX6V2YX.js} +1 -1
  60. package/bundle/{oauth2-provider-WS7LUQ5V.js → oauth2-provider-N2ZY2DXQ.js} +38 -72
  61. package/bundle/oauth2-provider-TRRJCE2P.js +235 -0
  62. package/bundle/{start-KOAGXRA2.js → start-3LEQZELI.js} +6 -6
  63. package/bundle/{start-XLIGOOW3.js → start-FH2E2VQ2.js} +6 -6
  64. package/bundle/{start-DJ6EBFEA.js → start-FPEO7KCZ.js} +6 -6
  65. package/bundle/start-J7G6YXDJ.js +18 -0
  66. package/package.json +1 -1
@@ -155,13 +155,13 @@ import {
155
155
  widestLineFromStyledChars,
156
156
  wordBreakStyledChars,
157
157
  wrapStyledChars
158
- } from "./chunk-2RRZM3IR.js";
158
+ } from "./chunk-JWWA32XO.js";
159
159
  import {
160
160
  appEvents
161
161
  } from "./chunk-5PS3AYFU.js";
162
162
  import {
163
163
  require_source
164
- } from "./chunk-4M3TG6ZU.js";
164
+ } from "./chunk-NVJOR76X.js";
165
165
  import {
166
166
  ACTIVE_SHELL_MAX_LINES,
167
167
  COMPACT_TOOL_SUBVIEW_MAX_LINES,
@@ -211,33 +211,37 @@ import {
211
211
  stringWidth,
212
212
  stripUnsafeCharacters,
213
213
  toCodePoints
214
- } from "./chunk-GIXFMPPJ.js";
214
+ } from "./chunk-TCAVPMJX.js";
215
215
  import {
216
216
  handleAutoUpdate,
217
217
  isDevelopment,
218
218
  relaunchApp,
219
219
  setUpdateHandler
220
- } from "./chunk-LUQGJPIY.js";
220
+ } from "./chunk-JXVK53RJ.js";
221
221
  import {
222
222
  isTodoList,
223
223
  mapCoreStatusToDisplayStatus,
224
224
  require_react
225
- } from "./chunk-WPCNMQ6J.js";
225
+ } from "./chunk-CJHCK2YW.js";
226
226
  import {
227
227
  registerCleanup,
228
228
  removeCleanup,
229
229
  runExitCleanup,
230
230
  setupTtyCheck
231
- } from "./chunk-OY6QYVTR.js";
231
+ } from "./chunk-S6AQSJNU.js";
232
232
  import {
233
233
  ACTIVATE_SKILL_TOOL_NAME,
234
234
  AGENT_TOOL_NAME,
235
235
  ApiKeyUpdatedEvent,
236
+ ApprovalMode,
236
237
  AsyncFzf,
237
238
  AudioRecorder,
238
239
  AuthType,
239
240
  ChangeAuthRequestedError,
241
+ CompressionStatus,
240
242
  ConversationFinishedEvent,
243
+ CoreEvent,
244
+ CoreToolCallStatus,
241
245
  CreditPurchaseClickEvent,
242
246
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
243
247
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -259,12 +263,19 @@ import {
259
263
  GEMMA_4_31B_IT_MODEL,
260
264
  GLOB_DISPLAY_NAME,
261
265
  GREP_DISPLAY_NAME,
266
+ GeminiCliOperation,
267
+ GeminiEventType,
262
268
  GitService,
263
269
  IdeClient,
270
+ Kind,
264
271
  LS_DISPLAY_NAME,
265
272
  LegacyAgentProtocol,
266
273
  LlmRole,
267
274
  Logger,
275
+ MCPDiscoveryState,
276
+ MCPServerStatus,
277
+ MessageBusType,
278
+ MessageSenderType,
268
279
  ModelNotFoundError,
269
280
  ModelSlashCommandEvent,
270
281
  OverageMenuShownEvent,
@@ -276,20 +287,27 @@ import {
276
287
  PREVIEW_GEMINI_MODEL,
277
288
  PolicyIntegrityManager,
278
289
  ProjectIdRequiredError,
290
+ QuestionType,
279
291
  READ_FILE_DISPLAY_NAME,
280
292
  READ_MANY_FILES_DISPLAY_NAME,
281
293
  RELEASE_CHANNEL_STABILITY,
282
294
  ROOT_SCHEDULER_ID,
283
295
  SHELL_TOOL_NAME,
284
296
  Scheduler,
297
+ SessionEndReason,
298
+ SessionStartSource,
285
299
  ShellExecutionService,
286
300
  SlashCommandStatus,
287
301
  Storage,
302
+ SubagentState,
288
303
  TOPIC_PARAM_STRATEGIC_INTENT,
289
304
  TOPIC_PARAM_SUMMARY,
290
305
  TOPIC_PARAM_TITLE,
291
306
  TerminalQuotaError,
307
+ ToolConfirmationOutcome,
308
+ ToolErrorType,
292
309
  TranscriptionFactory,
310
+ TrustLevel,
293
311
  UPDATE_TOPIC_DISPLAY_NAME,
294
312
  UPDATE_TOPIC_TOOL_NAME,
295
313
  UnauthorizedError,
@@ -301,6 +319,7 @@ import {
301
319
  WEB_FETCH_DISPLAY_NAME,
302
320
  WEB_SEARCH_DISPLAY_NAME,
303
321
  WRITE_FILE_DISPLAY_NAME,
322
+ WarningPriority,
304
323
  WhisperModelManager,
305
324
  addMCPStatusChangeListener,
306
325
  allowEditorTypeInSandbox,
@@ -410,7 +429,7 @@ import {
410
429
  validatePlanContent,
411
430
  validatePlanPath,
412
431
  writeToStdout
413
- } from "./chunk-CWAXEILN.js";
432
+ } from "./chunk-5YTIYFJO.js";
414
433
  import "./chunk-6HI7VNOG.js";
415
434
  import "./chunk-TUDYL3X4.js";
416
435
  import "./chunk-IUUIT4SU.js";
@@ -5036,7 +5055,7 @@ function calculateShellMaxLines(options) {
5036
5055
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5037
5056
  return maxLinesBasedOnHeight;
5038
5057
  }
5039
- const isExecuting = status === "executing" /* Executing */;
5058
+ const isExecuting = status === CoreToolCallStatus.Executing;
5040
5059
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5041
5060
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5042
5061
  }
@@ -5070,10 +5089,10 @@ function isShellTool(name) {
5070
5089
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
5071
5090
  }
5072
5091
  function isThisShellFocusable(name, status, config) {
5073
- return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5092
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5074
5093
  }
5075
5094
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5076
- return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5095
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5077
5096
  }
5078
5097
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5079
5098
  const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
@@ -5233,13 +5252,13 @@ var formatToolArgs = (args) => {
5233
5252
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5234
5253
  let headerText;
5235
5254
  let headerColor = theme.text.secondary;
5236
- if (progress.state === "cancelled" /* CANCELLED */) {
5255
+ if (progress.state === SubagentState.CANCELLED) {
5237
5256
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5238
5257
  headerColor = theme.status.warning;
5239
- } else if (progress.state === "error" /* ERROR */) {
5258
+ } else if (progress.state === SubagentState.ERROR) {
5240
5259
  headerText = `Subagent ${progress.agentName} failed.`;
5241
5260
  headerColor = theme.status.error;
5242
- } else if (progress.state === "completed" /* COMPLETED */) {
5261
+ } else if (progress.state === SubagentState.COMPLETED) {
5243
5262
  headerText = `Subagent ${progress.agentName} completed.`;
5244
5263
  headerColor = theme.status.success;
5245
5264
  } else {
@@ -5259,7 +5278,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5259
5278
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
5260
5279
  ] }, item.id);
5261
5280
  } else if (item.type === "tool_call") {
5262
- const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5281
+ const statusSymbol = item.status === SubagentState.RUNNING ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === SubagentState.COMPLETED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === SubagentState.CANCELLED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5263
5282
  const formattedArgs = item.description || formatToolArgs(item.args);
5264
5283
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5265
5284
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5270,7 +5289,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5270
5289
  {
5271
5290
  bold: true,
5272
5291
  color: theme.text.primary,
5273
- strikethrough: item.status === "cancelled" /* CANCELLED */,
5292
+ strikethrough: item.status === SubagentState.CANCELLED,
5274
5293
  children: item.displayName || item.content
5275
5294
  }
5276
5295
  ),
@@ -5279,7 +5298,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5279
5298
  {
5280
5299
  color: theme.text.secondary,
5281
5300
  wrap: "truncate",
5282
- strikethrough: item.status === "cancelled" /* CANCELLED */,
5301
+ strikethrough: item.status === SubagentState.CANCELLED,
5283
5302
  children: displayArgs
5284
5303
  }
5285
5304
  ) })
@@ -5299,7 +5318,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5299
5318
  MarkdownDisplay,
5300
5319
  {
5301
5320
  text: safeJsonToMarkdown(progress.result),
5302
- isPending: progress.state !== "completed" /* COMPLETED */,
5321
+ isPending: progress.state !== SubagentState.COMPLETED,
5303
5322
  terminalWidth
5304
5323
  }
5305
5324
  )
@@ -5653,14 +5672,14 @@ var ToolActionsProvider = (props) => {
5653
5672
  }
5654
5673
  const details = tool.confirmationDetails;
5655
5674
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5656
- const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5675
+ const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5657
5676
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5658
5677
  }
5659
5678
  if (tool.correlationId) {
5660
5679
  await config.getMessageBus().publish({
5661
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5680
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5662
5681
  correlationId: tool.correlationId,
5663
- confirmed: outcome !== "cancel" /* Cancel */,
5682
+ confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5664
5683
  requiresUserConfirmation: false,
5665
5684
  outcome,
5666
5685
  payload
@@ -5679,7 +5698,7 @@ var ToolActionsProvider = (props) => {
5679
5698
  );
5680
5699
  const cancel = (0, import_react12.useCallback)(
5681
5700
  async (callId) => {
5682
- await confirm(callId, "cancel" /* Cancel */);
5701
+ await confirm(callId, ToolConfirmationOutcome.Cancel);
5683
5702
  },
5684
5703
  [confirm]
5685
5704
  );
@@ -5798,7 +5817,7 @@ var ToolMessage = ({
5798
5817
  paddingX: 1,
5799
5818
  flexDirection: "column",
5800
5819
  children: [
5801
- status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5820
+ status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5802
5821
  McpProgressIndicator,
5803
5822
  {
5804
5823
  progress,
@@ -5815,8 +5834,8 @@ var ToolMessage = ({
5815
5834
  terminalWidth,
5816
5835
  renderOutputAsMarkdown,
5817
5836
  hasFocus: isThisShellFocused2,
5818
- maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5819
- overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5837
+ maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5838
+ overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5820
5839
  }
5821
5840
  ),
5822
5841
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -6132,7 +6151,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6132
6151
  settings.merged,
6133
6152
  process3.cwd()
6134
6153
  );
6135
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6154
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6136
6155
  return {
6137
6156
  currentTrustLevel: explicitTrustLevel,
6138
6157
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6177,7 +6196,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6177
6196
  process3.cwd(),
6178
6197
  newConfig
6179
6198
  );
6180
- if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6199
+ if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6181
6200
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6182
6201
  if (source === "file") {
6183
6202
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6251,18 +6270,18 @@ function PermissionsModifyTrustDialog({
6251
6270
  const TRUST_LEVEL_ITEMS = [
6252
6271
  {
6253
6272
  label: `Trust this folder (${dirName})`,
6254
- value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6255
- key: "TRUST_FOLDER" /* TRUST_FOLDER */
6273
+ value: TrustLevel.TRUST_FOLDER,
6274
+ key: TrustLevel.TRUST_FOLDER
6256
6275
  },
6257
6276
  {
6258
6277
  label: `Trust parent folder (${parentFolder})`,
6259
- value: "TRUST_PARENT" /* TRUST_PARENT */,
6260
- key: "TRUST_PARENT" /* TRUST_PARENT */
6278
+ value: TrustLevel.TRUST_PARENT,
6279
+ key: TrustLevel.TRUST_PARENT
6261
6280
  },
6262
6281
  {
6263
6282
  label: "Don't trust",
6264
- value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6265
- key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6283
+ value: TrustLevel.DO_NOT_TRUST,
6284
+ key: TrustLevel.DO_NOT_TRUST
6266
6285
  }
6267
6286
  ];
6268
6287
  const {
@@ -6502,7 +6521,7 @@ var ShellToolMessage = ({
6502
6521
  maxLinesLimit: maxLines
6503
6522
  });
6504
6523
  import_react17.default.useEffect(() => {
6505
- const isExecuting = status === "executing" /* Executing */;
6524
+ const isExecuting = status === CoreToolCallStatus.Executing;
6506
6525
  if (isExecuting && ptyId) {
6507
6526
  try {
6508
6527
  const childWidth = terminalWidth - 4;
@@ -6715,13 +6734,13 @@ var SubagentGroupDisplay = ({
6715
6734
  const singleAgent = toolCalls[0].resultDisplay;
6716
6735
  if (isSubagentProgress(singleAgent)) {
6717
6736
  switch (singleAgent.state) {
6718
- case "completed" /* COMPLETED */:
6737
+ case SubagentState.COMPLETED:
6719
6738
  headerText = "Agent Completed";
6720
6739
  break;
6721
- case "cancelled" /* CANCELLED */:
6740
+ case SubagentState.CANCELLED:
6722
6741
  headerText = "Agent Cancelled";
6723
6742
  break;
6724
- case "error" /* ERROR */:
6743
+ case SubagentState.ERROR:
6725
6744
  headerText = "Agent Error";
6726
6745
  break;
6727
6746
  default:
@@ -6737,8 +6756,8 @@ var SubagentGroupDisplay = ({
6737
6756
  for (const tc of toolCalls) {
6738
6757
  const progress = tc.resultDisplay;
6739
6758
  if (isSubagentProgress(progress)) {
6740
- if (progress.state === "completed" /* COMPLETED */) completedCount++;
6741
- else if (progress.state === "running" /* RUNNING */) runningCount++;
6759
+ if (progress.state === SubagentState.COMPLETED) completedCount++;
6760
+ else if (progress.state === SubagentState.RUNNING) runningCount++;
6742
6761
  } else {
6743
6762
  runningCount++;
6744
6763
  }
@@ -6817,7 +6836,7 @@ var SubagentGroupDisplay = ({
6817
6836
  if (!isExpanded) {
6818
6837
  let content = "Starting...";
6819
6838
  let formattedArgs;
6820
- if (progress.state === "completed" /* COMPLETED */) {
6839
+ if (progress.state === SubagentState.COMPLETED) {
6821
6840
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6822
6841
  content = `Finished Early (${progress.terminateReason})`;
6823
6842
  } else {
@@ -6831,17 +6850,17 @@ var SubagentGroupDisplay = ({
6831
6850
  formattedArgs = formatToolArgs(lastActivity.args);
6832
6851
  }
6833
6852
  }
6834
- const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6853
+ const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6835
6854
  const renderStatusIcon = () => {
6836
- const state = progress.state ?? "running" /* RUNNING */;
6855
+ const state = progress.state ?? SubagentState.RUNNING;
6837
6856
  switch (state) {
6838
- case "running" /* RUNNING */:
6857
+ case SubagentState.RUNNING:
6839
6858
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
6840
- case "completed" /* COMPLETED */:
6859
+ case SubagentState.COMPLETED:
6841
6860
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6842
- case "cancelled" /* CANCELLED */:
6861
+ case SubagentState.CANCELLED:
6843
6862
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6844
- case "error" /* ERROR */:
6863
+ case SubagentState.ERROR:
6845
6864
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6846
6865
  default:
6847
6866
  return checkExhaustive(state);
@@ -6894,22 +6913,22 @@ var hasPayload = (res) => {
6894
6913
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6895
6914
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6896
6915
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6897
- const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6916
+ const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6898
6917
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6899
6918
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6900
6919
  const showDiffStat = !!diff.diffStat;
6901
6920
  const description = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
6902
6921
  let resultSummary = "";
6903
6922
  let resultColor = theme.text.secondary;
6904
- if (status === "awaiting_approval" /* AwaitingApproval */) {
6923
+ if (status === CoreToolCallStatus.AwaitingApproval) {
6905
6924
  resultSummary = "Confirming";
6906
- } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6925
+ } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6907
6926
  resultSummary = "Accepted";
6908
6927
  resultColor = theme.text.accent;
6909
- } else if (status === "cancelled" /* Cancelled */) {
6928
+ } else if (status === CoreToolCallStatus.Cancelled) {
6910
6929
  resultSummary = "Rejected";
6911
6930
  resultColor = theme.status.error;
6912
- } else if (status === "error" /* Error */) {
6931
+ } else if (status === CoreToolCallStatus.Error) {
6913
6932
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6914
6933
  resultColor = theme.status.error;
6915
6934
  }
@@ -6940,7 +6959,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6940
6959
  filename: diff.fileName,
6941
6960
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
6942
6961
  availableTerminalHeight,
6943
- disableColor: status === "cancelled" /* Cancelled */
6962
+ disableColor: status === CoreToolCallStatus.Cancelled
6944
6963
  }
6945
6964
  );
6946
6965
  return { description, summary, payload };
@@ -7068,10 +7087,10 @@ var DenseToolMessage = (props) => {
7068
7087
  if (isGrepResult(resultDisplay)) {
7069
7088
  return getGenericSuccessData(resultDisplay, originalDescription);
7070
7089
  }
7071
- if (status === "success" /* Success */ && resultDisplay) {
7090
+ if (status === CoreToolCallStatus.Success && resultDisplay) {
7072
7091
  return getGenericSuccessData(resultDisplay, originalDescription);
7073
7092
  }
7074
- if (status === "error" /* Error */) {
7093
+ if (status === CoreToolCallStatus.Error) {
7075
7094
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7076
7095
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7077
7096
  "\u2192 ",
@@ -7112,7 +7131,7 @@ var DenseToolMessage = (props) => {
7112
7131
  language: fileExtension,
7113
7132
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7114
7133
  settings,
7115
- disableColor: status === "cancelled" /* Cancelled */,
7134
+ disableColor: status === CoreToolCallStatus.Cancelled,
7116
7135
  returnLines: true
7117
7136
  });
7118
7137
  } else {
@@ -7120,7 +7139,7 @@ var DenseToolMessage = (props) => {
7120
7139
  parsedLines,
7121
7140
  filename: diff.fileName,
7122
7141
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7123
- disableColor: status === "cancelled" /* Cancelled */
7142
+ disableColor: status === CoreToolCallStatus.Cancelled
7124
7143
  });
7125
7144
  }
7126
7145
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7250,7 +7269,7 @@ function isToolExecuting(pendingHistoryItems) {
7250
7269
  return pendingHistoryItems.some((item) => {
7251
7270
  if (item && item.type === "tool_group") {
7252
7271
  return item.tools.some(
7253
- (tool) => "executing" /* Executing */ === tool.status
7272
+ (tool) => CoreToolCallStatus.Executing === tool.status
7254
7273
  );
7255
7274
  }
7256
7275
  return false;
@@ -7259,7 +7278,7 @@ function isToolExecuting(pendingHistoryItems) {
7259
7278
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7260
7279
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7261
7280
  (item) => item.tools.some(
7262
- (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7281
+ (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7263
7282
  )
7264
7283
  );
7265
7284
  }
@@ -7282,14 +7301,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
7282
7301
  if (isTrackedToolCall(t)) {
7283
7302
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
7284
7303
  } else {
7285
- return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
7304
+ return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7286
7305
  }
7287
7306
  });
7288
7307
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
7289
7308
  if (isTrackedToolCall(t)) {
7290
7309
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
7291
7310
  } else {
7292
- return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7311
+ return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7293
7312
  }
7294
7313
  });
7295
7314
  const isShellCommand = toolsToInspect.some((t) => {
@@ -7388,7 +7407,7 @@ var ToolGroupMessage = ({
7388
7407
  const groupedTools = (0, import_react21.useMemo)(() => {
7389
7408
  const groups = [];
7390
7409
  for (const tool of visibleToolCalls) {
7391
- if (tool.kind === "agent" /* Agent */) {
7410
+ if (tool.kind === Kind.Agent) {
7392
7411
  const lastGroup = groups[groups.length - 1];
7393
7412
  if (Array.isArray(lastGroup)) {
7394
7413
  lastGroup.push(tool);
@@ -7443,7 +7462,7 @@ var ToolGroupMessage = ({
7443
7462
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7444
7463
  let countToolCallsWithResults = 0;
7445
7464
  for (const tool of visibleToolCalls) {
7446
- if (tool.kind !== "agent" /* Agent */) {
7465
+ if (tool.kind !== Kind.Agent) {
7447
7466
  if (isCompactTool(tool, isCompactModeEnabled)) {
7448
7467
  if (hasDensePayload(tool)) {
7449
7468
  countToolCallsWithResults++;
@@ -7617,7 +7636,7 @@ var ToolGroupDisplay = ({
7617
7636
  }
7618
7637
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7619
7638
  const visibleTools = tools.filter(
7620
- (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7639
+ (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7621
7640
  );
7622
7641
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7623
7642
  const otherTools = visibleTools.filter(
@@ -7819,18 +7838,18 @@ function CompressionMessage({
7819
7838
  return "Compressing chat history";
7820
7839
  }
7821
7840
  switch (compressionStatus) {
7822
- case 1 /* COMPRESSED */:
7841
+ case CompressionStatus.COMPRESSED:
7823
7842
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7824
- case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7843
+ case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7825
7844
  if (originalTokens < 5e4) {
7826
7845
  return "Compression was not beneficial for this history size.";
7827
7846
  }
7828
7847
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7829
- case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7848
+ case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7830
7849
  return "Could not compress chat history due to a token counting error.";
7831
- case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7850
+ case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7832
7851
  return "Chat history compression failed: the model returned an empty summary.";
7833
- case 5 /* NOOP */:
7852
+ case CompressionStatus.NOOP:
7834
7853
  return "Nothing to compress.";
7835
7854
  default:
7836
7855
  return "";
@@ -8256,8 +8275,8 @@ var ModelUsageTable = ({ models }) => {
8256
8275
  );
8257
8276
  roleEntries.sort(([a], [b]) => {
8258
8277
  if (a === b) return 0;
8259
- if (a === "main" /* MAIN */) return -1;
8260
- if (b === "main" /* MAIN */) return 1;
8278
+ if (a === LlmRole.MAIN) return -1;
8279
+ if (b === LlmRole.MAIN) return 1;
8261
8280
  return a.localeCompare(b);
8262
8281
  });
8263
8282
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8588,8 +8607,8 @@ var ModelStatsDisplay = ({
8588
8607
  return validRoles.includes(role);
8589
8608
  }).sort((a, b) => {
8590
8609
  if (a === b) return 0;
8591
- if (a === "main" /* MAIN */) return -1;
8592
- if (b === "main" /* MAIN */) return 1;
8610
+ if (a === LlmRole.MAIN) return -1;
8611
+ if (b === LlmRole.MAIN) return 1;
8593
8612
  return a.localeCompare(b);
8594
8613
  });
8595
8614
  const createRow = (metric, getValue, options = {}) => {
@@ -9380,7 +9399,7 @@ var McpStatus = ({
9380
9399
  );
9381
9400
  const originalStatus = serverStatus(serverName);
9382
9401
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9383
- const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9402
+ const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9384
9403
  let statusIndicator = "";
9385
9404
  let statusText = "";
9386
9405
  let statusColor = theme.text.primary;
@@ -9392,17 +9411,17 @@ var McpStatus = ({
9392
9411
  statusColor = theme.text.secondary;
9393
9412
  } else {
9394
9413
  switch (status) {
9395
- case "connected" /* CONNECTED */:
9414
+ case MCPServerStatus.CONNECTED:
9396
9415
  statusIndicator = "\u{1F7E2}";
9397
9416
  statusText = "Ready";
9398
9417
  statusColor = theme.status.success;
9399
9418
  break;
9400
- case "connecting" /* CONNECTING */:
9419
+ case MCPServerStatus.CONNECTING:
9401
9420
  statusIndicator = "\u{1F504}";
9402
9421
  statusText = "Starting... (first startup may take longer)";
9403
9422
  statusColor = theme.status.warning;
9404
9423
  break;
9405
- case "disconnected" /* DISCONNECTED */:
9424
+ case MCPServerStatus.DISCONNECTED:
9406
9425
  default:
9407
9426
  statusIndicator = "\u{1F534}";
9408
9427
  statusText = "Disconnected";
@@ -9450,12 +9469,12 @@ var McpStatus = ({
9450
9469
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9451
9470
  " - ",
9452
9471
  statusText,
9453
- status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9472
+ status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9454
9473
  ] }),
9455
9474
  authStatusNode
9456
9475
  ] }),
9457
- status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9458
- status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9476
+ status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9477
+ status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9459
9478
  " (",
9460
9479
  toolCount,
9461
9480
  " tools cached)"
@@ -10016,7 +10035,7 @@ var Notifications = () => {
10016
10035
  if (dismissed) return [];
10017
10036
  const counts = persistentState.get("startupWarningCounts") || {};
10018
10037
  return startupWarnings.filter((w) => {
10019
- if (w.priority === "low" /* Low */) {
10038
+ if (w.priority === WarningPriority.Low) {
10020
10039
  const count = counts[w.id] || 0;
10021
10040
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10022
10041
  }
@@ -10029,7 +10048,7 @@ var Notifications = () => {
10029
10048
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10030
10049
  let changed = false;
10031
10050
  visibleWarnings.forEach((w) => {
10032
- if (w.priority === "low" /* Low */) {
10051
+ if (w.priority === WarningPriority.Low) {
10033
10052
  counts[w.id] = (counts[w.id] || 0) + 1;
10034
10053
  changed = true;
10035
10054
  }
@@ -10136,7 +10155,7 @@ var UserIdentity = ({ config }) => {
10136
10155
  }
10137
10156
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
10138
10157
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
10139
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
10158
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
10140
10159
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
10141
10160
  "Signed in with Google",
10142
10161
  email ? ":" : ""
@@ -10370,7 +10389,7 @@ var import_react32 = __toESM(require_react(), 1);
10370
10389
  function getConfirmingToolState(pendingHistoryItems) {
10371
10390
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10372
10391
  const confirmingTools = allPendingTools.filter(
10373
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10392
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10374
10393
  );
10375
10394
  if (confirmingTools.length === 0) {
10376
10395
  return null;
@@ -11678,7 +11697,7 @@ var ExitPlanModeDialog = ({
11678
11697
  {
11679
11698
  questions: [
11680
11699
  {
11681
- type: "choice" /* CHOICE */,
11700
+ type: QuestionType.CHOICE,
11682
11701
  header: "Approval",
11683
11702
  question: planContent,
11684
11703
  options: [
@@ -11699,9 +11718,9 @@ var ExitPlanModeDialog = ({
11699
11718
  onSubmit: (answers) => {
11700
11719
  const answer = answers["0"];
11701
11720
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11702
- onApprove("autoEdit" /* AUTO_EDIT */);
11721
+ onApprove(ApprovalMode.AUTO_EDIT);
11703
11722
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11704
- onApprove("default" /* DEFAULT */);
11723
+ onApprove(ApprovalMode.DEFAULT);
11705
11724
  } else if (answer) {
11706
11725
  onFeedback(answer);
11707
11726
  }
@@ -11912,7 +11931,7 @@ ${deceptiveUrlWarnings.map(
11912
11931
  );
11913
11932
  (0, import_react37.useEffect)(() => {
11914
11933
  if (isCancelling) {
11915
- handleConfirm("cancel" /* Cancel */);
11934
+ handleConfirm(ToolConfirmationOutcome.Cancel);
11916
11935
  }
11917
11936
  }, [isCancelling, handleConfirm]);
11918
11937
  const handleSelect = (0, import_react37.useCallback)(
@@ -11925,19 +11944,19 @@ ${deceptiveUrlWarnings.map(
11925
11944
  if (!confirmationDetails.isModifying) {
11926
11945
  options2.push({
11927
11946
  label: "Allow once",
11928
- value: "proceed_once" /* ProceedOnce */,
11947
+ value: ToolConfirmationOutcome.ProceedOnce,
11929
11948
  key: "Allow once"
11930
11949
  });
11931
11950
  if (isTrustedFolder) {
11932
11951
  options2.push({
11933
11952
  label: "Allow for this session",
11934
- value: "proceed_always" /* ProceedAlways */,
11953
+ value: ToolConfirmationOutcome.ProceedAlways,
11935
11954
  key: "Allow for this session"
11936
11955
  });
11937
11956
  if (allowPermanentApproval) {
11938
11957
  options2.push({
11939
11958
  label: "Allow for this file in all future sessions",
11940
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11959
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11941
11960
  key: "Allow for this file in all future sessions"
11942
11961
  });
11943
11962
  }
@@ -11945,119 +11964,119 @@ ${deceptiveUrlWarnings.map(
11945
11964
  if (!config.getIdeMode() || !isDiffingEnabled) {
11946
11965
  options2.push({
11947
11966
  label: "Modify with external editor",
11948
- value: "modify_with_editor" /* ModifyWithEditor */,
11967
+ value: ToolConfirmationOutcome.ModifyWithEditor,
11949
11968
  key: "Modify with external editor"
11950
11969
  });
11951
11970
  }
11952
11971
  options2.push({
11953
11972
  label: "No, suggest changes (esc)",
11954
- value: "cancel" /* Cancel */,
11973
+ value: ToolConfirmationOutcome.Cancel,
11955
11974
  key: "No, suggest changes (esc)"
11956
11975
  });
11957
11976
  }
11958
11977
  } else if (confirmationDetails.type === "sandbox_expansion") {
11959
11978
  options2.push({
11960
11979
  label: "Allow once",
11961
- value: "proceed_once" /* ProceedOnce */,
11980
+ value: ToolConfirmationOutcome.ProceedOnce,
11962
11981
  key: "Allow once"
11963
11982
  });
11964
11983
  if (isTrustedFolder) {
11965
11984
  options2.push({
11966
11985
  label: "Allow for this session",
11967
- value: "proceed_always" /* ProceedAlways */,
11986
+ value: ToolConfirmationOutcome.ProceedAlways,
11968
11987
  key: "Allow for this session"
11969
11988
  });
11970
11989
  if (allowPermanentApproval) {
11971
11990
  options2.push({
11972
11991
  label: "Allow for all future sessions",
11973
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11992
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11974
11993
  key: "Allow for all future sessions"
11975
11994
  });
11976
11995
  }
11977
11996
  }
11978
11997
  options2.push({
11979
11998
  label: "No, suggest changes (esc)",
11980
- value: "cancel" /* Cancel */,
11999
+ value: ToolConfirmationOutcome.Cancel,
11981
12000
  key: "No, suggest changes (esc)"
11982
12001
  });
11983
12002
  } else if (confirmationDetails.type === "exec") {
11984
12003
  options2.push({
11985
12004
  label: "Allow once",
11986
- value: "proceed_once" /* ProceedOnce */,
12005
+ value: ToolConfirmationOutcome.ProceedOnce,
11987
12006
  key: "Allow once"
11988
12007
  });
11989
12008
  if (isTrustedFolder) {
11990
12009
  options2.push({
11991
12010
  label: `Allow for this session`,
11992
- value: "proceed_always" /* ProceedAlways */,
12011
+ value: ToolConfirmationOutcome.ProceedAlways,
11993
12012
  key: `Allow for this session`
11994
12013
  });
11995
12014
  if (allowPermanentApproval) {
11996
12015
  options2.push({
11997
12016
  label: `Allow this command for all future sessions`,
11998
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12017
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11999
12018
  key: `Allow for all future sessions`
12000
12019
  });
12001
12020
  }
12002
12021
  }
12003
12022
  options2.push({
12004
12023
  label: "No, suggest changes (esc)",
12005
- value: "cancel" /* Cancel */,
12024
+ value: ToolConfirmationOutcome.Cancel,
12006
12025
  key: "No, suggest changes (esc)"
12007
12026
  });
12008
12027
  } else if (confirmationDetails.type === "info") {
12009
12028
  options2.push({
12010
12029
  label: "Allow once",
12011
- value: "proceed_once" /* ProceedOnce */,
12030
+ value: ToolConfirmationOutcome.ProceedOnce,
12012
12031
  key: "Allow once"
12013
12032
  });
12014
12033
  if (isTrustedFolder) {
12015
12034
  options2.push({
12016
12035
  label: "Allow for this session",
12017
- value: "proceed_always" /* ProceedAlways */,
12036
+ value: ToolConfirmationOutcome.ProceedAlways,
12018
12037
  key: "Allow for this session"
12019
12038
  });
12020
12039
  if (allowPermanentApproval) {
12021
12040
  options2.push({
12022
12041
  label: "Allow for all future sessions",
12023
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12042
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12024
12043
  key: "Allow for all future sessions"
12025
12044
  });
12026
12045
  }
12027
12046
  }
12028
12047
  options2.push({
12029
12048
  label: "No, suggest changes (esc)",
12030
- value: "cancel" /* Cancel */,
12049
+ value: ToolConfirmationOutcome.Cancel,
12031
12050
  key: "No, suggest changes (esc)"
12032
12051
  });
12033
12052
  } else if (confirmationDetails.type === "mcp") {
12034
12053
  options2.push({
12035
12054
  label: "Allow once",
12036
- value: "proceed_once" /* ProceedOnce */,
12055
+ value: ToolConfirmationOutcome.ProceedOnce,
12037
12056
  key: "Allow once"
12038
12057
  });
12039
12058
  if (isTrustedFolder) {
12040
12059
  options2.push({
12041
12060
  label: "Allow tool for this session",
12042
- value: "proceed_always_tool" /* ProceedAlwaysTool */,
12061
+ value: ToolConfirmationOutcome.ProceedAlwaysTool,
12043
12062
  key: "Allow tool for this session"
12044
12063
  });
12045
12064
  options2.push({
12046
12065
  label: "Allow all server tools for this session",
12047
- value: "proceed_always_server" /* ProceedAlwaysServer */,
12066
+ value: ToolConfirmationOutcome.ProceedAlwaysServer,
12048
12067
  key: "Allow all server tools for this session"
12049
12068
  });
12050
12069
  if (allowPermanentApproval) {
12051
12070
  options2.push({
12052
12071
  label: "Allow tool for all future sessions",
12053
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12072
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12054
12073
  key: "Allow tool for all future sessions"
12055
12074
  });
12056
12075
  }
12057
12076
  }
12058
12077
  options2.push({
12059
12078
  label: "No, suggest changes (esc)",
12060
- value: "cancel" /* Cancel */,
12079
+ value: ToolConfirmationOutcome.Cancel,
12061
12080
  key: "No, suggest changes (esc)"
12062
12081
  });
12063
12082
  }
@@ -12096,7 +12115,7 @@ ${deceptiveUrlWarnings.map(
12096
12115
  const containsRedirection = commandsToDisplay.some(
12097
12116
  (cmd) => hasRedirection(cmd)
12098
12117
  );
12099
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12118
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12100
12119
  if (containsRedirection && !isAutoEdit) {
12101
12120
  extraInfoLines = 1;
12102
12121
  }
@@ -12122,7 +12141,7 @@ ${deceptiveUrlWarnings.map(
12122
12141
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12123
12142
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12124
12143
  const alwaysAndSaveIndex = options2.findIndex(
12125
- (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12144
+ (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12126
12145
  );
12127
12146
  if (alwaysAndSaveIndex !== -1) {
12128
12147
  initialIndex2 = alwaysAndSaveIndex;
@@ -12139,10 +12158,10 @@ ${deceptiveUrlWarnings.map(
12139
12158
  {
12140
12159
  questions: confirmationDetails.questions,
12141
12160
  onSubmit: (answers) => {
12142
- handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12161
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12143
12162
  },
12144
12163
  onCancel: () => {
12145
- handleConfirm("cancel" /* Cancel */);
12164
+ handleConfirm(ToolConfirmationOutcome.Cancel);
12146
12165
  },
12147
12166
  width: terminalWidth,
12148
12167
  availableHeight: bodyHeight
@@ -12163,19 +12182,19 @@ ${deceptiveUrlWarnings.map(
12163
12182
  planPath: confirmationDetails.planPath,
12164
12183
  getPreferredEditor,
12165
12184
  onApprove: (approvalMode) => {
12166
- handleConfirm("proceed_once" /* ProceedOnce */, {
12185
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12167
12186
  approved: true,
12168
12187
  approvalMode
12169
12188
  });
12170
12189
  },
12171
12190
  onFeedback: (feedback) => {
12172
- handleConfirm("proceed_once" /* ProceedOnce */, {
12191
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12173
12192
  approved: false,
12174
12193
  feedback
12175
12194
  });
12176
12195
  },
12177
12196
  onCancel: () => {
12178
- handleConfirm("cancel" /* Cancel */);
12197
+ handleConfirm(ToolConfirmationOutcome.Cancel);
12179
12198
  },
12180
12199
  width: terminalWidth,
12181
12200
  availableHeight: bodyHeight
@@ -12284,7 +12303,7 @@ ${deceptiveUrlWarnings.map(
12284
12303
  const containsRedirection = commandsToDisplay.some(
12285
12304
  (cmd) => hasRedirection(cmd)
12286
12305
  );
12287
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12306
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12288
12307
  let warnings = null;
12289
12308
  if (containsRedirection && !isAutoEdit) {
12290
12309
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12443,7 +12462,7 @@ ${deceptiveUrlWarnings.map(
12443
12462
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12444
12463
  const renderRadioItem = (0, import_react37.useCallback)(
12445
12464
  (item, { titleColor }) => {
12446
- if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12465
+ if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12447
12466
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12448
12467
  item.label,
12449
12468
  " ",
@@ -14473,7 +14492,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14473
14492
  if (settings.merged.security.auth.useExternal) {
14474
14493
  return null;
14475
14494
  }
14476
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14495
+ if (authType === AuthType.USE_GEMINI) {
14477
14496
  return null;
14478
14497
  }
14479
14498
  return validateAuthMethod(authType);
@@ -14525,7 +14544,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14525
14544
  }
14526
14545
  return;
14527
14546
  }
14528
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14547
+ if (authType === AuthType.USE_GEMINI) {
14529
14548
  const key = await reloadApiKey();
14530
14549
  if (!key) {
14531
14550
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14603,31 +14622,31 @@ function AuthDialog({
14603
14622
  let items = [
14604
14623
  {
14605
14624
  label: "Sign in with Google",
14606
- value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14607
- key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14625
+ value: AuthType.LOGIN_WITH_GOOGLE,
14626
+ key: AuthType.LOGIN_WITH_GOOGLE
14608
14627
  },
14609
14628
  ...process.env["CLOUD_SHELL"] === "true" ? [
14610
14629
  {
14611
14630
  label: "Use Cloud Shell user credentials",
14612
- value: "compute-default-credentials" /* COMPUTE_ADC */,
14613
- key: "compute-default-credentials" /* COMPUTE_ADC */
14631
+ value: AuthType.COMPUTE_ADC,
14632
+ key: AuthType.COMPUTE_ADC
14614
14633
  }
14615
14634
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14616
14635
  {
14617
14636
  label: "Use metadata server application default credentials",
14618
- value: "compute-default-credentials" /* COMPUTE_ADC */,
14619
- key: "compute-default-credentials" /* COMPUTE_ADC */
14637
+ value: AuthType.COMPUTE_ADC,
14638
+ key: AuthType.COMPUTE_ADC
14620
14639
  }
14621
14640
  ] : [],
14622
14641
  {
14623
14642
  label: "Use Gemini API Key",
14624
- value: "gemini-api-key" /* USE_GEMINI */,
14625
- key: "gemini-api-key" /* USE_GEMINI */
14643
+ value: AuthType.USE_GEMINI,
14644
+ key: AuthType.USE_GEMINI
14626
14645
  },
14627
14646
  {
14628
14647
  label: "Vertex AI",
14629
- value: "vertex-ai" /* USE_VERTEX_AI */,
14630
- key: "vertex-ai" /* USE_VERTEX_AI */
14648
+ value: AuthType.USE_VERTEX_AI,
14649
+ key: AuthType.USE_VERTEX_AI
14631
14650
  }
14632
14651
  ];
14633
14652
  if (settings.merged.security.auth.enforcedType) {
@@ -14649,9 +14668,9 @@ function AuthDialog({
14649
14668
  return item.value === defaultAuthType;
14650
14669
  }
14651
14670
  if (process.env["GEMINI_API_KEY"]) {
14652
- return item.value === "gemini-api-key" /* USE_GEMINI */;
14671
+ return item.value === AuthType.USE_GEMINI;
14653
14672
  }
14654
- return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14673
+ return item.value === AuthType.LOGIN_WITH_GOOGLE;
14655
14674
  });
14656
14675
  if (settings.merged.security.auth.enforcedType) {
14657
14676
  initialAuthIndex = 0;
@@ -14662,7 +14681,7 @@ function AuthDialog({
14662
14681
  return;
14663
14682
  }
14664
14683
  if (authType) {
14665
- const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14684
+ const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14666
14685
  if (needsRestart) {
14667
14686
  setAuthContext({ requiresRestart: true });
14668
14687
  } else {
@@ -14670,12 +14689,12 @@ function AuthDialog({
14670
14689
  }
14671
14690
  await clearCachedCredentialFile();
14672
14691
  settings.setValue(scope, "security.auth.selectedType", authType);
14673
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14692
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14674
14693
  setExiting(true);
14675
14694
  setTimeout(relaunchApp, 100);
14676
14695
  return;
14677
14696
  }
14678
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14697
+ if (authType === AuthType.USE_GEMINI) {
14679
14698
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14680
14699
  return;
14681
14700
  }
@@ -15422,11 +15441,11 @@ var PrivacyNoticeText = ({
15422
15441
  }) => {
15423
15442
  const authType = config.getContentGeneratorConfig()?.authType;
15424
15443
  switch (authType) {
15425
- case "gemini-api-key" /* USE_GEMINI */:
15444
+ case AuthType.USE_GEMINI:
15426
15445
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15427
- case "vertex-ai" /* USE_VERTEX_AI */:
15446
+ case AuthType.USE_VERTEX_AI:
15428
15447
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15429
- case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15448
+ case AuthType.LOGIN_WITH_GOOGLE:
15430
15449
  default:
15431
15450
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15432
15451
  }
@@ -15467,7 +15486,7 @@ function ProQuotaDialog({
15467
15486
  value: "retry_always",
15468
15487
  key: "retry_always"
15469
15488
  },
15470
- ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15489
+ ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15471
15490
  {
15472
15491
  label: "Upgrade for higher limits",
15473
15492
  value: "upgrade",
@@ -16625,7 +16644,7 @@ function ModelDialog({ onClose }) {
16625
16644
  const shouldShowPreviewModels = config?.getHasAccessToPreviewModel() ?? false;
16626
16645
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16627
16646
  const selectedAuthType = settings.merged.security.auth.selectedType;
16628
- const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16647
+ const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16629
16648
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16630
16649
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16631
16650
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -17943,10 +17962,10 @@ function initializeConsoleStore() {
17943
17962
  globalConsoleMessages = [];
17944
17963
  globalErrorCount = 0;
17945
17964
  notifyListeners();
17946
- coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
17947
- coreEvents.off("output" /* Output */, handleOutput);
17948
- coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
17949
- coreEvents.on("output" /* Output */, handleOutput);
17965
+ coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
17966
+ coreEvents.off(CoreEvent.Output, handleOutput);
17967
+ coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
17968
+ coreEvents.on(CoreEvent.Output, handleOutput);
17950
17969
  }
17951
17970
  function notifyListeners() {
17952
17971
  for (const listener of listeners) {
@@ -20083,7 +20102,7 @@ function usePromptCompletion({
20083
20102
  { model: "prompt-completion" },
20084
20103
  contents,
20085
20104
  signal,
20086
- "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20105
+ LlmRole.UTILITY_AUTOCOMPLETE
20087
20106
  );
20088
20107
  if (signal.aborted) {
20089
20108
  return;
@@ -22161,9 +22180,9 @@ var InputPrompt = ({
22161
22180
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22162
22181
  }
22163
22182
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22164
- const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22165
- const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22166
- const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22183
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22184
+ const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22185
+ const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22167
22186
  let statusColor;
22168
22187
  let statusText = "";
22169
22188
  if (shellModeActive) {
@@ -22995,22 +23014,22 @@ var ApprovalModeIndicator = ({
22995
23014
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
22996
23015
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
22997
23016
  switch (approvalMode) {
22998
- case "autoEdit" /* AUTO_EDIT */:
23017
+ case ApprovalMode.AUTO_EDIT:
22999
23018
  textColor = theme.status.warning;
23000
23019
  textContent = "auto-accept edits";
23001
23020
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23002
23021
  break;
23003
- case "plan" /* PLAN */:
23022
+ case ApprovalMode.PLAN:
23004
23023
  textColor = theme.status.success;
23005
23024
  textContent = "plan";
23006
23025
  subText = `${cycleHint} to manual`;
23007
23026
  break;
23008
- case "yolo" /* YOLO */:
23027
+ case ApprovalMode.YOLO:
23009
23028
  textColor = theme.status.error;
23010
23029
  textContent = "YOLO";
23011
23030
  subText = yoloHint;
23012
23031
  break;
23013
- case "default" /* DEFAULT */:
23032
+ case ApprovalMode.DEFAULT:
23014
23033
  default:
23015
23034
  textColor = theme.text.accent;
23016
23035
  textContent = "";
@@ -23058,7 +23077,7 @@ var useComposerStatus = () => {
23058
23077
  (item) => item.type === "tool_group"
23059
23078
  ).some(
23060
23079
  (item) => item.tools.some(
23061
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23080
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23062
23081
  )
23063
23082
  ),
23064
23083
  [uiState.pendingHistoryItems]
@@ -23073,13 +23092,13 @@ var useComposerStatus = () => {
23073
23092
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23074
23093
  if (hideMinimalModeHintWhileBusy) return null;
23075
23094
  switch (showApprovalModeIndicator) {
23076
- case "yolo" /* YOLO */:
23095
+ case ApprovalMode.YOLO:
23077
23096
  return { text: "YOLO", color: theme.status.error };
23078
- case "plan" /* PLAN */:
23097
+ case ApprovalMode.PLAN:
23079
23098
  return { text: "plan", color: theme.status.success };
23080
- case "autoEdit" /* AUTO_EDIT */:
23099
+ case ApprovalMode.AUTO_EDIT:
23081
23100
  return { text: "auto edit", color: theme.status.warning };
23082
- case "default" /* DEFAULT */:
23101
+ case ApprovalMode.DEFAULT:
23083
23102
  default:
23084
23103
  return null;
23085
23104
  }
@@ -23433,7 +23452,7 @@ var ConfigInitDisplay = ({
23433
23452
  let connected = 0;
23434
23453
  const connecting = [];
23435
23454
  for (const [name, client] of clients.entries()) {
23436
- if (client.getStatus() === "connected" /* CONNECTED */) {
23455
+ if (client.getStatus() === MCPServerStatus.CONNECTED) {
23437
23456
  connected++;
23438
23457
  } else {
23439
23458
  connecting.push(name);
@@ -23455,9 +23474,9 @@ var ConfigInitDisplay = ({
23455
23474
  );
23456
23475
  }
23457
23476
  };
23458
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23477
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23459
23478
  return () => {
23460
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23479
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23461
23480
  };
23462
23481
  }, [initialMessage]);
23463
23482
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24174,7 +24193,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24174
24193
  callId,
24175
24194
  name: SHELL_COMMAND_NAME,
24176
24195
  description: rawQuery,
24177
- status: "executing" /* Executing */,
24196
+ status: CoreToolCallStatus.Executing,
24178
24197
  isClientInitiated: true,
24179
24198
  resultDisplay: "",
24180
24199
  confirmationDetails: void 0
@@ -24315,7 +24334,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24315
24334
  mainContent = result.output.trim() || "(Command produced no output)";
24316
24335
  }
24317
24336
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24318
- let finalStatus = "success" /* Success */;
24337
+ let finalStatus = CoreToolCallStatus.Success;
24319
24338
  const prependToAnsiOutput = (output, text) => {
24320
24339
  const newLines = text.split("\n").map((line) => [
24321
24340
  {
@@ -24334,20 +24353,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24334
24353
  };
24335
24354
  let prefix = "";
24336
24355
  if (result.error) {
24337
- finalStatus = "error" /* Error */;
24356
+ finalStatus = CoreToolCallStatus.Error;
24338
24357
  prefix = result.error.message;
24339
24358
  } else if (result.aborted) {
24340
- finalStatus = "cancelled" /* Cancelled */;
24359
+ finalStatus = CoreToolCallStatus.Cancelled;
24341
24360
  prefix = "Command was cancelled.";
24342
24361
  } else if (result.backgrounded) {
24343
- finalStatus = "success" /* Success */;
24362
+ finalStatus = CoreToolCallStatus.Success;
24344
24363
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24345
24364
  mainContent = finalOutput;
24346
24365
  } else if (result.signal) {
24347
- finalStatus = "error" /* Error */;
24366
+ finalStatus = CoreToolCallStatus.Error;
24348
24367
  prefix = `Command terminated by signal: ${result.signal}.`;
24349
24368
  } else if (result.exitCode !== 0) {
24350
- finalStatus = "error" /* Error */;
24369
+ finalStatus = CoreToolCallStatus.Error;
24351
24370
  prefix = `Command exited with code ${result.exitCode}.`;
24352
24371
  }
24353
24372
  if (prefix) {
@@ -24373,7 +24392,7 @@ ${mainContent}`;
24373
24392
  status: finalStatus,
24374
24393
  resultDisplay: finalOutput
24375
24394
  };
24376
- if (finalStatus !== "cancelled" /* Cancelled */) {
24395
+ if (finalStatus !== CoreToolCallStatus.Cancelled) {
24377
24396
  addItemToHistory(
24378
24397
  {
24379
24398
  type: "tool_group",
@@ -25363,7 +25382,7 @@ function useQuotaAndFallback({
25363
25382
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25364
25383
  `/stats model for usage details`,
25365
25384
  `/model to switch models.`,
25366
- contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25385
+ contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25367
25386
  ].filter(Boolean);
25368
25387
  message = messageLines.join("\n");
25369
25388
  } else if (error instanceof ModelNotFoundError) {
@@ -25551,7 +25570,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25551
25570
  );
25552
25571
  setEditorError(null);
25553
25572
  setIsEditorDialogOpen(false);
25554
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25573
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25555
25574
  } catch (error) {
25556
25575
  setEditorError(`Failed to set editor preference: ${error}`);
25557
25576
  }
@@ -25560,7 +25579,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25560
25579
  );
25561
25580
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25562
25581
  setIsEditorDialogOpen(false);
25563
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25582
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25564
25583
  }, []);
25565
25584
  return {
25566
25585
  isEditorDialogOpen,
@@ -25937,7 +25956,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25937
25956
  canonicalPath: resolvedCommandPath
25938
25957
  } = parseSlashCommand(trimmed, commands);
25939
25958
  if (!commandToExecute) {
25940
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25959
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25941
25960
  if (isMcpLoading) {
25942
25961
  setIsProcessing(true);
25943
25962
  if (addToHistory) {
@@ -26117,7 +26136,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26117
26136
  onConfirm: async (resolvedOutcome) => {
26118
26137
  resolve3({
26119
26138
  outcome: resolvedOutcome,
26120
- approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26139
+ approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26121
26140
  });
26122
26141
  }
26123
26142
  };
@@ -26125,7 +26144,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26125
26144
  callId,
26126
26145
  name: "Expansion",
26127
26146
  description: "Command expansion needs shell access",
26128
- status: "awaiting_approval" /* AwaitingApproval */,
26147
+ status: CoreToolCallStatus.AwaitingApproval,
26129
26148
  isClientInitiated: true,
26130
26149
  resultDisplay: void 0,
26131
26150
  confirmationDetails
@@ -26136,7 +26155,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26136
26155
  });
26137
26156
  });
26138
26157
  setPendingItem(null);
26139
- if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26158
+ if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26140
26159
  addItem(
26141
26160
  {
26142
26161
  type: "info" /* INFO */,
@@ -26146,7 +26165,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26146
26165
  );
26147
26166
  return { type: "handled" };
26148
26167
  }
26149
- if (outcome === "proceed_always" /* ProceedAlways */) {
26168
+ if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26150
26169
  setSessionShellAllowlist(
26151
26170
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26152
26171
  );
@@ -26622,7 +26641,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26622
26641
  let description;
26623
26642
  let renderOutputAsMarkdown = false;
26624
26643
  const displayName = call.tool?.displayName ?? call.request.name;
26625
- if (call.status === "error" /* Error */) {
26644
+ if (call.status === CoreToolCallStatus.Error) {
26626
26645
  description = JSON.stringify(call.request.args);
26627
26646
  } else {
26628
26647
  description = call.invocation.getDescription();
@@ -26645,27 +26664,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26645
26664
  let progress = void 0;
26646
26665
  let progressTotal = void 0;
26647
26666
  switch (call.status) {
26648
- case "success" /* Success */:
26667
+ case CoreToolCallStatus.Success:
26649
26668
  resultDisplay = call.response.resultDisplay;
26650
26669
  outputFile = call.response.outputFile;
26651
26670
  break;
26652
- case "error" /* Error */:
26653
- case "cancelled" /* Cancelled */:
26671
+ case CoreToolCallStatus.Error:
26672
+ case CoreToolCallStatus.Cancelled:
26654
26673
  resultDisplay = call.response.resultDisplay;
26655
26674
  break;
26656
- case "awaiting_approval" /* AwaitingApproval */:
26675
+ case CoreToolCallStatus.AwaitingApproval:
26657
26676
  correlationId = call.correlationId;
26658
26677
  confirmationDetails = call.confirmationDetails;
26659
26678
  break;
26660
- case "executing" /* Executing */:
26679
+ case CoreToolCallStatus.Executing:
26661
26680
  resultDisplay = call.liveOutput;
26662
26681
  ptyId = call.pid;
26663
26682
  progressMessage = call.progressMessage;
26664
26683
  progress = call.progress;
26665
26684
  progressTotal = call.progressTotal;
26666
26685
  break;
26667
- case "scheduled" /* Scheduled */:
26668
- case "validating" /* Validating */:
26686
+ case CoreToolCallStatus.Scheduled:
26687
+ case CoreToolCallStatus.Validating:
26669
26688
  break;
26670
26689
  default: {
26671
26690
  const exhaustiveCheck = call;
@@ -26736,7 +26755,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26736
26755
  const handler = (event) => {
26737
26756
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26738
26757
  const hasExecuting = event.toolCalls.some(
26739
- (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26758
+ (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26740
26759
  );
26741
26760
  if (hasExecuting) {
26742
26761
  setLastToolOutputTime(Date.now());
@@ -26745,7 +26764,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26745
26764
  const prevCalls = prev[event.schedulerId] ?? [];
26746
26765
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26747
26766
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26748
- (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26767
+ (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26749
26768
  );
26750
26769
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26751
26770
  return prev;
@@ -26757,9 +26776,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26757
26776
  };
26758
26777
  });
26759
26778
  };
26760
- messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26779
+ messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26761
26780
  return () => {
26762
- messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26781
+ messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26763
26782
  };
26764
26783
  }, [messageBus, internalAdaptToolCalls]);
26765
26784
  (0, import_react98.useEffect)(() => {
@@ -26781,9 +26800,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26781
26800
  };
26782
26801
  });
26783
26802
  };
26784
- messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26803
+ messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26785
26804
  return () => {
26786
- messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26805
+ messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26787
26806
  };
26788
26807
  }, [messageBus]);
26789
26808
  const schedule = (0, import_react98.useCallback)(
@@ -26882,8 +26901,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26882
26901
  const prev = prevMap.get(coreCall.request.callId);
26883
26902
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26884
26903
  let status = coreCall.status;
26885
- if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26886
- status = "executing" /* Executing */;
26904
+ if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26905
+ status = CoreToolCallStatus.Executing;
26887
26906
  }
26888
26907
  return {
26889
26908
  ...coreCall,
@@ -26915,7 +26934,7 @@ function getBackgroundedToolInfo(toolCall) {
26915
26934
  };
26916
26935
  }
26917
26936
  function isBackgroundableExecutingToolCall(toolCall) {
26918
- return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26937
+ return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26919
26938
  }
26920
26939
  function showCitations(settings) {
26921
26940
  const enabled = settings.merged.ui.showCitations;
@@ -26925,14 +26944,14 @@ function showCitations(settings) {
26925
26944
  return true;
26926
26945
  }
26927
26946
  function calculateStreamingState(isResponding, toolCalls) {
26928
- if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26947
+ if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26929
26948
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26930
26949
  }
26931
26950
  const isAnyToolActive = toolCalls.some((tc) => {
26932
- if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26951
+ if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26933
26952
  return true;
26934
26953
  }
26935
- if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26954
+ if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26936
26955
  return !tc.responseSubmittedToGemini;
26937
26956
  }
26938
26957
  return false;
@@ -26978,9 +26997,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26978
26997
  }
26979
26998
  setRetryStatus(payload);
26980
26999
  };
26981
- coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27000
+ coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
26982
27001
  return () => {
26983
- coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27002
+ coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
26984
27003
  };
26985
27004
  }, [isRespondingRef]);
26986
27005
  const [
@@ -27113,12 +27132,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27113
27132
  const tc = toolCalls[i];
27114
27133
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27115
27134
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27116
- const isAgent = tc.tool?.kind === "agent" /* Agent */;
27135
+ const isAgent = tc.tool?.kind === Kind.Agent;
27117
27136
  if (isAgent) {
27118
27137
  let contigAgentsComplete = true;
27119
27138
  for (let j = i + 1; j < toolCalls.length; j++) {
27120
27139
  const nextTc = toolCalls[j];
27121
- if (nextTc.tool?.kind === "agent" /* Agent */) {
27140
+ if (nextTc.tool?.kind === Kind.Agent) {
27122
27141
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27123
27142
  contigAgentsComplete = false;
27124
27143
  break;
@@ -27144,7 +27163,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27144
27163
  let currentGroup = [];
27145
27164
  for (const tc of toolsToPush) {
27146
27165
  newPushed.add(tc.request.callId);
27147
- if (tc.tool?.kind === "agent" /* Agent */) {
27166
+ if (tc.tool?.kind === Kind.Agent) {
27148
27167
  currentGroup.push(tc);
27149
27168
  } else {
27150
27169
  if (currentGroup.length > 0) {
@@ -27294,7 +27313,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27294
27313
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27295
27314
  }, [activeShellPtyId, addItem, setIsResponding]);
27296
27315
  (0, import_react99.useEffect)(() => {
27297
- if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27316
+ if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27298
27317
  const lastUserMessageIndex = history.findLastIndex(
27299
27318
  (item) => item.type === "user" /* USER */
27300
27319
  );
@@ -27362,7 +27381,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27362
27381
  return;
27363
27382
  }
27364
27383
  const hasActiveTools = toolCalls.some(
27365
- (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27384
+ (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27366
27385
  );
27367
27386
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27368
27387
  if (clearBuffer) {
@@ -27389,7 +27408,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27389
27408
  if (tool.name === SHELL_COMMAND_NAME) {
27390
27409
  return {
27391
27410
  ...tool,
27392
- status: "cancelled" /* Cancelled */,
27411
+ status: CoreToolCallStatus.Cancelled,
27393
27412
  resultDisplay: tool.resultDisplay
27394
27413
  };
27395
27414
  }
@@ -27454,7 +27473,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27454
27473
  let localQueryToSendToGemini = null;
27455
27474
  if (typeof query === "string") {
27456
27475
  const trimmedQuery = query.trim();
27457
- await logger?.logMessage("user" /* USER */, trimmedQuery);
27476
+ await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27458
27477
  if (!shellModeActive) {
27459
27478
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27460
27479
  if (slashCommandResult) {
@@ -27610,7 +27629,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27610
27629
  if (pendingHistoryItemRef.current) {
27611
27630
  if (pendingHistoryItemRef.current.type === "tool_group") {
27612
27631
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27613
- (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27632
+ (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27614
27633
  );
27615
27634
  const pendingItem = {
27616
27635
  ...pendingHistoryItemRef.current,
@@ -27856,15 +27875,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27856
27875
  let geminiMessageBuffer = "";
27857
27876
  const toolCallRequests = [];
27858
27877
  for await (const event of stream) {
27859
- if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27878
+ if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27860
27879
  setThought(null);
27861
27880
  }
27862
27881
  switch (event.type) {
27863
- case "thought" /* Thought */:
27882
+ case GeminiEventType.Thought:
27864
27883
  setLastGeminiActivityTime(Date.now());
27865
27884
  handleThoughtEvent(event.value, userMessageTimestamp);
27866
27885
  break;
27867
- case "content" /* Content */:
27886
+ case GeminiEventType.Content:
27868
27887
  setLastGeminiActivityTime(Date.now());
27869
27888
  geminiMessageBuffer = handleContentEvent(
27870
27889
  event.value,
@@ -27872,16 +27891,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27872
27891
  userMessageTimestamp
27873
27892
  );
27874
27893
  break;
27875
- case "tool_call_request" /* ToolCallRequest */:
27894
+ case GeminiEventType.ToolCallRequest:
27876
27895
  toolCallRequests.push(event.value);
27877
27896
  break;
27878
- case "user_cancelled" /* UserCancelled */:
27897
+ case GeminiEventType.UserCancelled:
27879
27898
  handleUserCancelledEvent(userMessageTimestamp);
27880
27899
  break;
27881
- case "error" /* Error */:
27900
+ case GeminiEventType.Error:
27882
27901
  handleErrorEvent(event.value, userMessageTimestamp);
27883
27902
  break;
27884
- case "agent_execution_stopped" /* AgentExecutionStopped */:
27903
+ case GeminiEventType.AgentExecutionStopped:
27885
27904
  handleAgentExecutionStoppedEvent(
27886
27905
  event.value.reason,
27887
27906
  userMessageTimestamp,
@@ -27889,7 +27908,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27889
27908
  event.value.contextCleared
27890
27909
  );
27891
27910
  break;
27892
- case "agent_execution_blocked" /* AgentExecutionBlocked */:
27911
+ case GeminiEventType.AgentExecutionBlocked:
27893
27912
  handleAgentExecutionBlockedEvent(
27894
27913
  event.value.reason,
27895
27914
  userMessageTimestamp,
@@ -27897,35 +27916,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27897
27916
  event.value.contextCleared
27898
27917
  );
27899
27918
  break;
27900
- case "chat_compressed" /* ChatCompressed */:
27919
+ case GeminiEventType.ChatCompressed:
27901
27920
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27902
27921
  break;
27903
- case "tool_call_confirmation" /* ToolCallConfirmation */:
27904
- case "tool_call_response" /* ToolCallResponse */:
27922
+ case GeminiEventType.ToolCallConfirmation:
27923
+ case GeminiEventType.ToolCallResponse:
27905
27924
  break;
27906
- case "max_session_turns" /* MaxSessionTurns */:
27925
+ case GeminiEventType.MaxSessionTurns:
27907
27926
  handleMaxSessionTurnsEvent();
27908
27927
  break;
27909
- case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27928
+ case GeminiEventType.ContextWindowWillOverflow:
27910
27929
  handleContextWindowWillOverflowEvent(
27911
27930
  event.value.estimatedRequestTokenCount,
27912
27931
  event.value.remainingTokenCount
27913
27932
  );
27914
27933
  break;
27915
- case "finished" /* Finished */:
27934
+ case GeminiEventType.Finished:
27916
27935
  handleFinishedEvent(event, userMessageTimestamp);
27917
27936
  break;
27918
- case "citation" /* Citation */:
27937
+ case GeminiEventType.Citation:
27919
27938
  handleCitationEvent(event.value, userMessageTimestamp);
27920
27939
  break;
27921
- case "model_info" /* ModelInfo */:
27940
+ case GeminiEventType.ModelInfo:
27922
27941
  handleChatModelEvent(event.value, userMessageTimestamp);
27923
27942
  break;
27924
- case "loop_detected" /* LoopDetected */:
27943
+ case GeminiEventType.LoopDetected:
27925
27944
  loopDetectedRef.current = true;
27926
27945
  break;
27927
- case "retry" /* Retry */:
27928
- case "invalid_stream" /* InvalidStream */:
27946
+ case GeminiEventType.Retry:
27947
+ case GeminiEventType.InvalidStream:
27929
27948
  break;
27930
27949
  default: {
27931
27950
  const unreachable = event;
@@ -27966,7 +27985,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27966
27985
  const submitQuery = (0, import_react99.useCallback)(
27967
27986
  async (query, options, prompt_id) => runInDevTraceSpan(
27968
27987
  {
27969
- operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
27988
+ operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
27970
27989
  sessionId: config.getSessionId()
27971
27990
  },
27972
27991
  async ({ metadata: spanMetadata }) => {
@@ -28126,7 +28145,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28126
28145
  );
28127
28146
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28128
28147
  async (newApprovalMode) => {
28129
- if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28148
+ if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28130
28149
  if (geminiClient) {
28131
28150
  try {
28132
28151
  await geminiClient.addHistory({
@@ -28149,11 +28168,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28149
28168
  }
28150
28169
  }
28151
28170
  previousApprovalModeRef.current = newApprovalMode;
28152
- if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28171
+ if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28153
28172
  let awaitingApprovalCalls = toolCalls.filter(
28154
28173
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28155
28174
  );
28156
- if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28175
+ if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28157
28176
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28158
28177
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28159
28178
  return true;
@@ -28169,11 +28188,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28169
28188
  if (call.correlationId) {
28170
28189
  try {
28171
28190
  await config.getMessageBus().publish({
28172
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28191
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28173
28192
  correlationId: call.correlationId,
28174
28193
  confirmed: true,
28175
28194
  requiresUserConfirmation: false,
28176
- outcome: "proceed_once" /* ProceedOnce */
28195
+ outcome: ToolConfirmationOutcome.ProceedOnce
28177
28196
  });
28178
28197
  } catch (error) {
28179
28198
  debugLogger.warn(
@@ -28242,14 +28261,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28242
28261
  );
28243
28262
  if (isLowErrorVerbosity) {
28244
28263
  suppressedToolErrorCountRef.current += geminiTools.filter(
28245
- (tc) => tc.status === "error" /* Error */
28264
+ (tc) => tc.status === CoreToolCallStatus.Error
28246
28265
  ).length;
28247
28266
  }
28248
28267
  if (geminiTools.length === 0) {
28249
28268
  return;
28250
28269
  }
28251
28270
  const stopExecutionTool = geminiTools.find(
28252
- (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28271
+ (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28253
28272
  );
28254
28273
  if (stopExecutionTool && stopExecutionTool.response.error) {
28255
28274
  maybeAddSuppressedToolErrorNote();
@@ -28269,9 +28288,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28269
28288
  (tc) => !isTopicTool2(tc.request.name)
28270
28289
  );
28271
28290
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28272
- (tc) => tc.status === "cancelled" /* Cancelled */
28291
+ (tc) => tc.status === CoreToolCallStatus.Cancelled
28273
28292
  );
28274
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28293
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28275
28294
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28276
28295
  if (!turnCancelledRef.current) {
28277
28296
  addItem({
@@ -28351,7 +28370,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28351
28370
  return;
28352
28371
  }
28353
28372
  const restorableToolCalls = toolCalls.filter(
28354
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28373
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28355
28374
  );
28356
28375
  if (restorableToolCalls.length > 0) {
28357
28376
  if (!gitService) {
@@ -28574,14 +28593,14 @@ var useAgentStream = ({
28574
28593
  const displayName = legacyState?.displayName ?? event.name;
28575
28594
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28576
28595
  const desc = legacyState?.description ?? "";
28577
- const fallbackKind = "other" /* Other */;
28596
+ const fallbackKind = Kind.Other;
28578
28597
  const newCall = {
28579
28598
  callId: event.requestId,
28580
28599
  name: displayName,
28581
28600
  originalRequestName: event.name,
28582
28601
  description: desc,
28583
28602
  display: event.display,
28584
- status: "scheduled" /* Scheduled */,
28603
+ status: CoreToolCallStatus.Scheduled,
28585
28604
  isClientInitiated: false,
28586
28605
  renderOutputAsMarkdown: isOutputMarkdown,
28587
28606
  kind: legacyState?.kind ?? fallbackKind,
@@ -28599,10 +28618,10 @@ var useAgentStream = ({
28599
28618
  const evtStatus = legacyState?.status;
28600
28619
  let status = tc.status;
28601
28620
  if (evtStatus === "executing")
28602
- status = "executing" /* Executing */;
28603
- else if (evtStatus === "error") status = "error" /* Error */;
28621
+ status = CoreToolCallStatus.Executing;
28622
+ else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28604
28623
  else if (evtStatus === "success")
28605
- status = "success" /* Success */;
28624
+ status = CoreToolCallStatus.Success;
28606
28625
  const display = event.display?.result;
28607
28626
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28608
28627
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28635,7 +28654,7 @@ var useAgentStream = ({
28635
28654
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28636
28655
  return {
28637
28656
  ...tc,
28638
- status: event.isError ? "error" /* Error */ : "success" /* Success */,
28657
+ status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28639
28658
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28640
28659
  resultDisplay,
28641
28660
  outputFile
@@ -28701,7 +28720,7 @@ var useAgentStream = ({
28701
28720
  if (!options?.isContinuation) {
28702
28721
  if (typeof query === "string") {
28703
28722
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28704
- void logger?.logMessage("user" /* USER */, query);
28723
+ void logger?.logMessage(MessageSenderType.USER, query);
28705
28724
  }
28706
28725
  startNewPrompt();
28707
28726
  }
@@ -30228,9 +30247,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30228
30247
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30229
30248
  async (choice) => {
30230
30249
  const trustLevelMap = {
30231
- ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30232
- ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30233
- ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30250
+ ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30251
+ ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30252
+ ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30234
30253
  };
30235
30254
  const trustLevel = trustLevelMap[choice];
30236
30255
  if (!trustLevel) return;
@@ -30249,7 +30268,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30249
30268
  }, 100);
30250
30269
  return;
30251
30270
  }
30252
- const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30271
+ const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30253
30272
  onTrustChange(currentIsTrusted);
30254
30273
  setIsTrusted(currentIsTrusted);
30255
30274
  const wasTrusted = isTrusted ?? false;
@@ -31257,7 +31276,7 @@ function useMessageQueue({
31257
31276
  var import_react107 = __toESM(require_react(), 1);
31258
31277
  function useMcpStatus(config) {
31259
31278
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31260
- () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31279
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31261
31280
  );
31262
31281
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31263
31282
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31270,12 +31289,12 @@ function useMcpStatus(config) {
31270
31289
  setMcpServerCount(manager.getMcpServerCount());
31271
31290
  }
31272
31291
  };
31273
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31292
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31274
31293
  return () => {
31275
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31294
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31276
31295
  };
31277
31296
  }, [config]);
31278
- const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31297
+ const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31279
31298
  return {
31280
31299
  discoveryState,
31281
31300
  mcpServerCount,
@@ -31302,7 +31321,7 @@ function useApprovalModeIndicator({
31302
31321
  (key) => {
31303
31322
  let nextApprovalMode;
31304
31323
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31305
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31324
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31306
31325
  if (addItem) {
31307
31326
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31308
31327
  const adminSettings = config.getRemoteAdminSettings();
@@ -31320,21 +31339,21 @@ function useApprovalModeIndicator({
31320
31339
  }
31321
31340
  return;
31322
31341
  }
31323
- nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31342
+ nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31324
31343
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31325
31344
  const currentMode = config.getApprovalMode();
31326
31345
  switch (currentMode) {
31327
- case "default" /* DEFAULT */:
31328
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31346
+ case ApprovalMode.DEFAULT:
31347
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31329
31348
  break;
31330
- case "autoEdit" /* AUTO_EDIT */:
31331
- nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31349
+ case ApprovalMode.AUTO_EDIT:
31350
+ nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31332
31351
  break;
31333
- case "plan" /* PLAN */:
31334
- nextApprovalMode = "default" /* DEFAULT */;
31352
+ case ApprovalMode.PLAN:
31353
+ nextApprovalMode = ApprovalMode.DEFAULT;
31335
31354
  break;
31336
- case "yolo" /* YOLO */:
31337
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31355
+ case ApprovalMode.YOLO:
31356
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31338
31357
  break;
31339
31358
  default:
31340
31359
  }
@@ -31744,11 +31763,11 @@ var useHookDisplayState = () => {
31744
31763
  removeHook();
31745
31764
  }
31746
31765
  };
31747
- coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31748
- coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31766
+ coreEvents.on(CoreEvent.HookStart, handleHookStart);
31767
+ coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31749
31768
  return () => {
31750
- coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31751
- coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31769
+ coreEvents.off(CoreEvent.HookStart, handleHookStart);
31770
+ coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31752
31771
  activeTimeouts.forEach(clearTimeout);
31753
31772
  activeTimeouts.clear();
31754
31773
  };
@@ -32587,7 +32606,7 @@ var AppContainer = (props) => {
32587
32606
  setConfigInitialized(true);
32588
32607
  startupProfiler.flush(config);
32589
32608
  startAutoMemoryIfEnabled(config);
32590
- const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32609
+ const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32591
32610
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32592
32611
  if (result) {
32593
32612
  const additionalContext = result.getAdditionalContext();
@@ -32614,7 +32633,7 @@ var AppContainer = (props) => {
32614
32633
  );
32615
32634
  const ideClient = await IdeClient.getInstance();
32616
32635
  await ideClient.disconnect();
32617
- await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32636
+ await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32618
32637
  };
32619
32638
  registerCleanup(cleanupFn);
32620
32639
  return () => {
@@ -32639,11 +32658,11 @@ var AppContainer = (props) => {
32639
32658
  resetTime: payload.resetTime
32640
32659
  });
32641
32660
  };
32642
- coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32643
- coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32661
+ coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32662
+ coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32644
32663
  return () => {
32645
- coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32646
- coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32664
+ coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32665
+ coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32647
32666
  };
32648
32667
  }, [config]);
32649
32668
  (0, import_react121.useEffect)(() => {
@@ -32656,16 +32675,16 @@ var AppContainer = (props) => {
32656
32675
  const handleAgentsDiscovered = (payload) => {
32657
32676
  setNewAgents(payload.agents);
32658
32677
  };
32659
- coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32660
- coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32661
- coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32678
+ coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32679
+ coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32680
+ coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32662
32681
  return () => {
32663
- coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32682
+ coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32664
32683
  coreEvents.off(
32665
- "admin-settings-changed" /* AdminSettingsChanged */,
32684
+ CoreEvent.AdminSettingsChanged,
32666
32685
  handleAdminSettingsChanged
32667
32686
  );
32668
- coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32687
+ coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32669
32688
  };
32670
32689
  }, [settings]);
32671
32690
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32730,11 +32749,11 @@ var AppContainer = (props) => {
32730
32749
  exitEditorDialog
32731
32750
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32732
32751
  (0, import_react121.useEffect)(() => {
32733
- coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32734
- coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32752
+ coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32753
+ coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32735
32754
  return () => {
32736
- coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32737
- coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32755
+ coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32756
+ coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32738
32757
  };
32739
32758
  }, [handleEditorClose, openEditorDialog]);
32740
32759
  (0, import_react121.useEffect)(() => {
@@ -32802,7 +32821,7 @@ var AppContainer = (props) => {
32802
32821
  errorVerbosity: settings.merged.ui.errorVerbosity
32803
32822
  });
32804
32823
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32805
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32824
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32806
32825
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32807
32826
  const { loadHistoryForResume, isResuming } = useSessionResume({
32808
32827
  config,
@@ -32830,7 +32849,7 @@ var AppContainer = (props) => {
32830
32849
  async (authType, scope) => {
32831
32850
  if (authType) {
32832
32851
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32833
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32852
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32834
32853
  setAuthContext({ requiresRestart: true });
32835
32854
  } else {
32836
32855
  setAuthContext({});
@@ -32858,7 +32877,7 @@ var AppContainer = (props) => {
32858
32877
  );
32859
32878
  return;
32860
32879
  }
32861
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32880
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32862
32881
  writeToStdout(`
32863
32882
  ----------------------------------------------------------------
32864
32883
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32881,7 +32900,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32881
32900
  }
32882
32901
  await saveApiKey(apiKey);
32883
32902
  await reloadApiKey();
32884
- await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32903
+ await config.refreshAuth(AuthType.USE_GEMINI);
32885
32904
  setAuthState("authenticated" /* Authenticated */);
32886
32905
  } catch (e) {
32887
32906
  onAuthError(
@@ -32906,7 +32925,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32906
32925
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32907
32926
  );
32908
32927
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32909
- if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32928
+ if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32910
32929
  return;
32911
32930
  }
32912
32931
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33042,9 +33061,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33042
33061
  }
33043
33062
  });
33044
33063
  };
33045
- coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33064
+ coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33046
33065
  return () => {
33047
- coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33066
+ coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33048
33067
  };
33049
33068
  }, []);
33050
33069
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33702,7 +33721,7 @@ ${queuedText}` : queuedText;
33702
33721
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33703
33722
  if (settings.merged.general.devtools) {
33704
33723
  void (async () => {
33705
- const { toggleDevToolsPanel } = await import("./devtoolsService-4Y2RGEUE.js");
33724
+ const { toggleDevToolsPanel } = await import("./devtoolsService-SGV7MSUA.js");
33706
33725
  await toggleDevToolsPanel(
33707
33726
  config,
33708
33727
  showErrorDetails,
@@ -33920,17 +33939,17 @@ ${queuedText}` : queuedText;
33920
33939
  Date.now()
33921
33940
  );
33922
33941
  };
33923
- coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33924
- coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33942
+ coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33943
+ coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33925
33944
  coreEvents.drainBacklogs();
33926
33945
  return () => {
33927
- coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33928
- coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33946
+ coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33947
+ coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33929
33948
  };
33930
33949
  }, [historyManager]);
33931
33950
  const nightly = props.version.includes("nightly");
33932
33951
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
33933
- const loginRestartMessage = settings.merged.security.auth.selectedType === "vertex-ai" /* USE_VERTEX_AI */ ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
33952
+ const loginRestartMessage = settings.merged.security.auth.selectedType === AuthType.USE_VERTEX_AI ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
33934
33953
  const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
33935
33954
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
33936
33955
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34030,9 +34049,9 @@ ${queuedText}` : queuedText;
34030
34049
  const handleMemoryChanged = (result) => {
34031
34050
  setGeminiMdFileCount(result.fileCount);
34032
34051
  };
34033
- coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34052
+ coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34034
34053
  return () => {
34035
- coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34054
+ coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34036
34055
  };
34037
34056
  }, []);
34038
34057
  (0, import_react121.useEffect)(() => {