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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/bundle/builtin/antigravity-support/SKILL.md +58 -0
  2. package/bundle/{chunk-PIZZXDDG.js → chunk-46UNR4SE.js} +1 -1
  3. package/bundle/{chunk-E5QEVDYZ.js → chunk-6ZHP2EJW.js} +77 -12
  4. package/bundle/{chunk-PE7HOVW5.js → chunk-7EBO46BD.js} +2 -2
  5. package/bundle/{chunk-2K6L5FOH.js → chunk-BM5TFZWV.js} +1 -1
  6. package/bundle/{chunk-R4U5N4EA.js → chunk-CSKXYL76.js} +2 -2
  7. package/bundle/{chunk-RS7XVABE.js → chunk-EMVR5JTF.js} +8 -9
  8. package/bundle/{chunk-27JE2WT6.js → chunk-FC67CGD5.js} +1 -1
  9. package/bundle/{chunk-O6PTG534.js → chunk-G33JEOEV.js} +14132 -7532
  10. package/bundle/{chunk-J5LPI3LE.js → chunk-GPDO3T5B.js} +3 -3
  11. package/bundle/{chunk-7JQYEHGG.js → chunk-I4F637TN.js} +1 -1
  12. package/bundle/{chunk-LEOT5EUQ.js → chunk-IZGZZO6A.js} +1 -1
  13. package/bundle/{chunk-CRQJBWDY.js → chunk-IZZGJPR3.js} +1 -1
  14. package/bundle/{chunk-PRRK6JDC.js → chunk-JOFGDFVN.js} +3 -3
  15. package/bundle/{chunk-B5F4VQB4.js → chunk-MKQJU6N7.js} +1 -1
  16. package/bundle/{chunk-CWVF4ZTK.js → chunk-O3ZM34A3.js} +1 -1
  17. package/bundle/{chunk-EI75YPWJ.js → chunk-RCJSF5RP.js} +64 -8
  18. package/bundle/{chunk-SIKHBFAN.js → chunk-S5WKKTEF.js} +3 -3
  19. package/bundle/{chunk-QB7YVNGV.js → chunk-SCXTH56Q.js} +165 -114
  20. package/bundle/{chunk-5IDNG2OG.js → chunk-T55FPMGN.js} +212 -174
  21. package/bundle/{chunk-QW5AOX4N.js → chunk-V2OCZBTI.js} +5 -8
  22. package/bundle/{chunk-WUZJ6YCQ.js → chunk-VFPQ45DS.js} +2 -2
  23. package/bundle/{chunk-22XWYJCL.js → chunk-XWSJWBAL.js} +165 -114
  24. package/bundle/{chunk-RHCHEKOW.js → chunk-YIJWUMMP.js} +1 -1
  25. package/bundle/{chunk-7PDJUYG7.js → chunk-YIKH5LDT.js} +1 -1
  26. package/bundle/{cleanup-I5FUY2UQ.js → cleanup-HCSVNXSL.js} +2 -2
  27. package/bundle/{cleanup-OIBS4TJ5.js → cleanup-KA5YYXS3.js} +2 -2
  28. package/bundle/{cleanup-RODT76X7.js → cleanup-SBGWM3G7.js} +2 -2
  29. package/bundle/{dist-XLM4ONR2.js → core-K77SYAQL.js} +3 -1
  30. package/bundle/{core-DU2UPBEJ.js → core-LVRAYGT3.js} +3 -1
  31. package/bundle/{devtoolsService-C64GR2SQ.js → devtoolsService-ADGLR4UM.js} +2 -2
  32. package/bundle/{devtoolsService-U7Z6S7CA.js → devtoolsService-ORERBA72.js} +3 -4
  33. package/bundle/{devtoolsService-EJVCNXD4.js → devtoolsService-WRHZUKOW.js} +2 -2
  34. package/bundle/{dist-CEGGZCD6.js → dist-6R4J6OFH.js} +3 -1
  35. package/bundle/{gemini-EEFZ4W4N.js → gemini-LOO67E54.js} +196 -212
  36. package/bundle/{gemini-D5Y26G7I.js → gemini-STIONCRJ.js} +14 -14
  37. package/bundle/{gemini-3AA27X7W.js → gemini-YXO2QQ66.js} +14 -14
  38. package/bundle/gemini.js +7 -7
  39. package/bundle/{interactiveCli-B5QE2YQH.js → interactiveCli-F337IDVS.js} +30 -20
  40. package/bundle/{interactiveCli-5L4XUO4D.js → interactiveCli-NKTBHB7O.js} +30 -20
  41. package/bundle/{interactiveCli-S4W3W3HM.js → interactiveCli-OYDA765S.js} +317 -326
  42. package/bundle/{liteRtServerManager-2IHVDPV4.js → liteRtServerManager-6CQ3NBHQ.js} +4 -4
  43. package/bundle/{liteRtServerManager-7CA6UZB6.js → liteRtServerManager-N7CBKKD6.js} +4 -4
  44. package/bundle/{liteRtServerManager-P4UUE4PT.js → liteRtServerManager-YBJANX3B.js} +4 -4
  45. package/bundle/{oauth2-provider-WD62E6UF.js → oauth2-provider-AAJFAFW6.js} +1 -1
  46. package/bundle/{oauth2-provider-5IAYEVTS.js → oauth2-provider-CYIU4X4W.js} +1 -1
  47. package/bundle/{oauth2-provider-NQK2KDLL.js → oauth2-provider-YNWUFCNW.js} +72 -38
  48. package/bundle/{start-AAWVXW3L.js → start-CNBBYSNI.js} +6 -6
  49. package/bundle/{start-EHQUCJL4.js → start-DEWQ46DT.js} +6 -6
  50. package/bundle/{start-EJWSTD4L.js → start-H7TCWGQL.js} +6 -6
  51. package/package.json +1 -1
  52. package/bundle/chunk-3RBWPCUC.js +0 -154
  53. package/bundle/chunk-IPUQ7EE3.js +0 -81685
  54. package/bundle/chunk-NV6UIB5A.js +0 -1571
  55. package/bundle/chunk-R4UEOSDC.js +0 -398
  56. package/bundle/chunk-UEE43LJM.js +0 -118
  57. package/bundle/chunk-UHZJ6CQN.js +0 -17320
  58. package/bundle/chunk-USOBCNPR.js +0 -394545
  59. package/bundle/chunk-ZXFPRK6W.js +0 -512
  60. package/bundle/cleanup-WY7MMPH7.js +0 -32
  61. package/bundle/devtoolsService-LQXWZBCZ.js +0 -856
  62. package/bundle/dist-F4ZLD67R.js +0 -2140
  63. package/bundle/gemini-TPWWVYVB.js +0 -16409
  64. package/bundle/interactiveCli-CFKGEXFE.js +0 -34742
  65. package/bundle/liteRtServerManager-YN3VGMDA.js +0 -65
  66. package/bundle/oauth2-provider-WGTNZKF7.js +0 -235
  67. package/bundle/start-LAOVDDQF.js +0 -18
@@ -72,6 +72,7 @@ import {
72
72
  formatCommand,
73
73
  formatDuration,
74
74
  formatResetTime,
75
+ getAntigravityInstallInfo,
75
76
  getDialogRestartRequiredSettings,
76
77
  getDialogSettingKeys,
77
78
  getDisplayValue,
@@ -155,13 +156,13 @@ import {
155
156
  widestLineFromStyledChars,
156
157
  wordBreakStyledChars,
157
158
  wrapStyledChars
158
- } from "./chunk-IPUQ7EE3.js";
159
+ } from "./chunk-T55FPMGN.js";
159
160
  import {
160
161
  appEvents
161
162
  } from "./chunk-5PS3AYFU.js";
162
163
  import {
163
164
  require_source
164
- } from "./chunk-7JQYEHGG.js";
165
+ } from "./chunk-I4F637TN.js";
165
166
  import {
166
167
  ACTIVE_SHELL_MAX_LINES,
167
168
  COMPACT_TOOL_SUBVIEW_MAX_LINES,
@@ -211,37 +212,33 @@ import {
211
212
  stringWidth,
212
213
  stripUnsafeCharacters,
213
214
  toCodePoints
214
- } from "./chunk-QW5AOX4N.js";
215
+ } from "./chunk-MKQJU6N7.js";
215
216
  import {
216
217
  handleAutoUpdate,
217
218
  isDevelopment,
218
219
  relaunchApp,
219
220
  setUpdateHandler
220
- } from "./chunk-R4UEOSDC.js";
221
+ } from "./chunk-VFPQ45DS.js";
221
222
  import {
222
223
  isTodoList,
223
224
  mapCoreStatusToDisplayStatus,
224
225
  require_react
225
- } from "./chunk-RHCHEKOW.js";
226
+ } from "./chunk-EMVR5JTF.js";
226
227
  import {
227
228
  registerCleanup,
228
229
  removeCleanup,
229
230
  runExitCleanup,
230
231
  setupTtyCheck
231
- } from "./chunk-27JE2WT6.js";
232
+ } from "./chunk-IZGZZO6A.js";
232
233
  import {
233
234
  ACTIVATE_SKILL_TOOL_NAME,
234
235
  AGENT_TOOL_NAME,
235
236
  ApiKeyUpdatedEvent,
236
- ApprovalMode,
237
237
  AsyncFzf,
238
238
  AudioRecorder,
239
239
  AuthType,
240
240
  ChangeAuthRequestedError,
241
- CompressionStatus,
242
241
  ConversationFinishedEvent,
243
- CoreEvent,
244
- CoreToolCallStatus,
245
242
  CreditPurchaseClickEvent,
246
243
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
247
244
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -263,19 +260,12 @@ import {
263
260
  GEMMA_4_31B_IT_MODEL,
264
261
  GLOB_DISPLAY_NAME,
265
262
  GREP_DISPLAY_NAME,
266
- GeminiCliOperation,
267
- GeminiEventType,
268
263
  GitService,
269
264
  IdeClient,
270
- Kind,
271
265
  LS_DISPLAY_NAME,
272
266
  LegacyAgentProtocol,
273
267
  LlmRole,
274
268
  Logger,
275
- MCPDiscoveryState,
276
- MCPServerStatus,
277
- MessageBusType,
278
- MessageSenderType,
279
269
  ModelNotFoundError,
280
270
  ModelSlashCommandEvent,
281
271
  OverageMenuShownEvent,
@@ -287,27 +277,20 @@ import {
287
277
  PREVIEW_GEMINI_MODEL,
288
278
  PolicyIntegrityManager,
289
279
  ProjectIdRequiredError,
290
- QuestionType,
291
280
  READ_FILE_DISPLAY_NAME,
292
281
  READ_MANY_FILES_DISPLAY_NAME,
293
282
  RELEASE_CHANNEL_STABILITY,
294
283
  ROOT_SCHEDULER_ID,
295
284
  SHELL_TOOL_NAME,
296
285
  Scheduler,
297
- SessionEndReason,
298
- SessionStartSource,
299
286
  ShellExecutionService,
300
287
  SlashCommandStatus,
301
288
  Storage,
302
- SubagentState,
303
289
  TOPIC_PARAM_STRATEGIC_INTENT,
304
290
  TOPIC_PARAM_SUMMARY,
305
291
  TOPIC_PARAM_TITLE,
306
292
  TerminalQuotaError,
307
- ToolConfirmationOutcome,
308
- ToolErrorType,
309
293
  TranscriptionFactory,
310
- TrustLevel,
311
294
  UPDATE_TOPIC_DISPLAY_NAME,
312
295
  UPDATE_TOPIC_TOOL_NAME,
313
296
  UnauthorizedError,
@@ -319,7 +302,6 @@ import {
319
302
  WEB_FETCH_DISPLAY_NAME,
320
303
  WEB_SEARCH_DISPLAY_NAME,
321
304
  WRITE_FILE_DISPLAY_NAME,
322
- WarningPriority,
323
305
  WhisperModelManager,
324
306
  addMCPStatusChangeListener,
325
307
  allowEditorTypeInSandbox,
@@ -429,7 +411,7 @@ import {
429
411
  validatePlanContent,
430
412
  validatePlanPath,
431
413
  writeToStdout
432
- } from "./chunk-EI75YPWJ.js";
414
+ } from "./chunk-G33JEOEV.js";
433
415
  import "./chunk-6HI7VNOG.js";
434
416
  import "./chunk-TUDYL3X4.js";
435
417
  import "./chunk-IUUIT4SU.js";
@@ -524,7 +506,7 @@ var require_prop_types = __commonJS({
524
506
  var require_gradient_string = __commonJS({
525
507
  "node_modules/gradient-string/index.js"(exports, module) {
526
508
  "use strict";
527
- var chalk4 = require_source();
509
+ var chalk5 = require_source();
528
510
  var tinygradient2 = require_tinygradient();
529
511
  var forbiddenChars = /\s/g;
530
512
  function InitGradient(...args) {
@@ -540,7 +522,7 @@ var require_gradient_string = __commonJS({
540
522
  const colors = getColors(gradient, options, colorsCount);
541
523
  let result = "";
542
524
  for (const s of str) {
543
- result += s.match(forbiddenChars) ? s : chalk4.hex(colors.shift().toHex())(s);
525
+ result += s.match(forbiddenChars) ? s : chalk5.hex(colors.shift().toHex())(s);
544
526
  }
545
527
  return result;
546
528
  }
@@ -554,7 +536,7 @@ var require_gradient_string = __commonJS({
554
536
  const lineColors = colors.slice(0);
555
537
  let lineResult = "";
556
538
  for (const l of line) {
557
- lineResult += chalk4.hex(lineColors.shift().toHex())(l);
539
+ lineResult += chalk5.hex(lineColors.shift().toHex())(l);
558
540
  }
559
541
  results.push(lineResult);
560
542
  }
@@ -5055,7 +5037,7 @@ function calculateShellMaxLines(options) {
5055
5037
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5056
5038
  return maxLinesBasedOnHeight;
5057
5039
  }
5058
- const isExecuting = status === CoreToolCallStatus.Executing;
5040
+ const isExecuting = status === "executing" /* Executing */;
5059
5041
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5060
5042
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5061
5043
  }
@@ -5089,10 +5071,10 @@ function isShellTool(name) {
5089
5071
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
5090
5072
  }
5091
5073
  function isThisShellFocusable(name, status, config) {
5092
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5074
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5093
5075
  }
5094
5076
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5095
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5077
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5096
5078
  }
5097
5079
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5098
5080
  const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
@@ -5252,13 +5234,13 @@ var formatToolArgs = (args) => {
5252
5234
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5253
5235
  let headerText;
5254
5236
  let headerColor = theme.text.secondary;
5255
- if (progress.state === SubagentState.CANCELLED) {
5237
+ if (progress.state === "cancelled" /* CANCELLED */) {
5256
5238
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5257
5239
  headerColor = theme.status.warning;
5258
- } else if (progress.state === SubagentState.ERROR) {
5240
+ } else if (progress.state === "error" /* ERROR */) {
5259
5241
  headerText = `Subagent ${progress.agentName} failed.`;
5260
5242
  headerColor = theme.status.error;
5261
- } else if (progress.state === SubagentState.COMPLETED) {
5243
+ } else if (progress.state === "completed" /* COMPLETED */) {
5262
5244
  headerText = `Subagent ${progress.agentName} completed.`;
5263
5245
  headerColor = theme.status.success;
5264
5246
  } else {
@@ -5278,7 +5260,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5278
5260
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
5279
5261
  ] }, item.id);
5280
5262
  } else if (item.type === "tool_call") {
5281
- const statusSymbol = item.status === SubagentState.RUNNING ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === SubagentState.COMPLETED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === SubagentState.CANCELLED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5263
+ const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5282
5264
  const formattedArgs = item.description || formatToolArgs(item.args);
5283
5265
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5284
5266
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5289,7 +5271,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5289
5271
  {
5290
5272
  bold: true,
5291
5273
  color: theme.text.primary,
5292
- strikethrough: item.status === SubagentState.CANCELLED,
5274
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5293
5275
  children: item.displayName || item.content
5294
5276
  }
5295
5277
  ),
@@ -5298,7 +5280,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5298
5280
  {
5299
5281
  color: theme.text.secondary,
5300
5282
  wrap: "truncate",
5301
- strikethrough: item.status === SubagentState.CANCELLED,
5283
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5302
5284
  children: displayArgs
5303
5285
  }
5304
5286
  ) })
@@ -5318,7 +5300,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5318
5300
  MarkdownDisplay,
5319
5301
  {
5320
5302
  text: safeJsonToMarkdown(progress.result),
5321
- isPending: progress.state !== SubagentState.COMPLETED,
5303
+ isPending: progress.state !== "completed" /* COMPLETED */,
5322
5304
  terminalWidth
5323
5305
  }
5324
5306
  )
@@ -5672,14 +5654,14 @@ var ToolActionsProvider = (props) => {
5672
5654
  }
5673
5655
  const details = tool.confirmationDetails;
5674
5656
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5675
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5657
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5676
5658
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5677
5659
  }
5678
5660
  if (tool.correlationId) {
5679
5661
  await config.getMessageBus().publish({
5680
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5662
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5681
5663
  correlationId: tool.correlationId,
5682
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5664
+ confirmed: outcome !== "cancel" /* Cancel */,
5683
5665
  requiresUserConfirmation: false,
5684
5666
  outcome,
5685
5667
  payload
@@ -5698,7 +5680,7 @@ var ToolActionsProvider = (props) => {
5698
5680
  );
5699
5681
  const cancel = (0, import_react12.useCallback)(
5700
5682
  async (callId) => {
5701
- await confirm(callId, ToolConfirmationOutcome.Cancel);
5683
+ await confirm(callId, "cancel" /* Cancel */);
5702
5684
  },
5703
5685
  [confirm]
5704
5686
  );
@@ -5817,7 +5799,7 @@ var ToolMessage = ({
5817
5799
  paddingX: 1,
5818
5800
  flexDirection: "column",
5819
5801
  children: [
5820
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5802
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5821
5803
  McpProgressIndicator,
5822
5804
  {
5823
5805
  progress,
@@ -5834,8 +5816,8 @@ var ToolMessage = ({
5834
5816
  terminalWidth,
5835
5817
  renderOutputAsMarkdown,
5836
5818
  hasFocus: isThisShellFocused2,
5837
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5838
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5819
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5820
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5839
5821
  }
5840
5822
  ),
5841
5823
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -6151,7 +6133,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6151
6133
  settings.merged,
6152
6134
  process3.cwd()
6153
6135
  );
6154
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6136
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6155
6137
  return {
6156
6138
  currentTrustLevel: explicitTrustLevel,
6157
6139
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6196,7 +6178,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6196
6178
  process3.cwd(),
6197
6179
  newConfig
6198
6180
  );
6199
- if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6181
+ if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6200
6182
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6201
6183
  if (source === "file") {
6202
6184
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6270,18 +6252,18 @@ function PermissionsModifyTrustDialog({
6270
6252
  const TRUST_LEVEL_ITEMS = [
6271
6253
  {
6272
6254
  label: `Trust this folder (${dirName})`,
6273
- value: TrustLevel.TRUST_FOLDER,
6274
- key: TrustLevel.TRUST_FOLDER
6255
+ value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6256
+ key: "TRUST_FOLDER" /* TRUST_FOLDER */
6275
6257
  },
6276
6258
  {
6277
6259
  label: `Trust parent folder (${parentFolder})`,
6278
- value: TrustLevel.TRUST_PARENT,
6279
- key: TrustLevel.TRUST_PARENT
6260
+ value: "TRUST_PARENT" /* TRUST_PARENT */,
6261
+ key: "TRUST_PARENT" /* TRUST_PARENT */
6280
6262
  },
6281
6263
  {
6282
6264
  label: "Don't trust",
6283
- value: TrustLevel.DO_NOT_TRUST,
6284
- key: TrustLevel.DO_NOT_TRUST
6265
+ value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6266
+ key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6285
6267
  }
6286
6268
  ];
6287
6269
  const {
@@ -6521,7 +6503,7 @@ var ShellToolMessage = ({
6521
6503
  maxLinesLimit: maxLines
6522
6504
  });
6523
6505
  import_react17.default.useEffect(() => {
6524
- const isExecuting = status === CoreToolCallStatus.Executing;
6506
+ const isExecuting = status === "executing" /* Executing */;
6525
6507
  if (isExecuting && ptyId) {
6526
6508
  try {
6527
6509
  const childWidth = terminalWidth - 4;
@@ -6734,13 +6716,13 @@ var SubagentGroupDisplay = ({
6734
6716
  const singleAgent = toolCalls[0].resultDisplay;
6735
6717
  if (isSubagentProgress(singleAgent)) {
6736
6718
  switch (singleAgent.state) {
6737
- case SubagentState.COMPLETED:
6719
+ case "completed" /* COMPLETED */:
6738
6720
  headerText = "Agent Completed";
6739
6721
  break;
6740
- case SubagentState.CANCELLED:
6722
+ case "cancelled" /* CANCELLED */:
6741
6723
  headerText = "Agent Cancelled";
6742
6724
  break;
6743
- case SubagentState.ERROR:
6725
+ case "error" /* ERROR */:
6744
6726
  headerText = "Agent Error";
6745
6727
  break;
6746
6728
  default:
@@ -6756,8 +6738,8 @@ var SubagentGroupDisplay = ({
6756
6738
  for (const tc of toolCalls) {
6757
6739
  const progress = tc.resultDisplay;
6758
6740
  if (isSubagentProgress(progress)) {
6759
- if (progress.state === SubagentState.COMPLETED) completedCount++;
6760
- else if (progress.state === SubagentState.RUNNING) runningCount++;
6741
+ if (progress.state === "completed" /* COMPLETED */) completedCount++;
6742
+ else if (progress.state === "running" /* RUNNING */) runningCount++;
6761
6743
  } else {
6762
6744
  runningCount++;
6763
6745
  }
@@ -6836,7 +6818,7 @@ var SubagentGroupDisplay = ({
6836
6818
  if (!isExpanded) {
6837
6819
  let content = "Starting...";
6838
6820
  let formattedArgs;
6839
- if (progress.state === SubagentState.COMPLETED) {
6821
+ if (progress.state === "completed" /* COMPLETED */) {
6840
6822
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6841
6823
  content = `Finished Early (${progress.terminateReason})`;
6842
6824
  } else {
@@ -6850,17 +6832,17 @@ var SubagentGroupDisplay = ({
6850
6832
  formattedArgs = formatToolArgs(lastActivity.args);
6851
6833
  }
6852
6834
  }
6853
- const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6835
+ const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6854
6836
  const renderStatusIcon = () => {
6855
- const state = progress.state ?? SubagentState.RUNNING;
6837
+ const state = progress.state ?? "running" /* RUNNING */;
6856
6838
  switch (state) {
6857
- case SubagentState.RUNNING:
6839
+ case "running" /* RUNNING */:
6858
6840
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
6859
- case SubagentState.COMPLETED:
6841
+ case "completed" /* COMPLETED */:
6860
6842
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6861
- case SubagentState.CANCELLED:
6843
+ case "cancelled" /* CANCELLED */:
6862
6844
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6863
- case SubagentState.ERROR:
6845
+ case "error" /* ERROR */:
6864
6846
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6865
6847
  default:
6866
6848
  return checkExhaustive(state);
@@ -6913,22 +6895,22 @@ var hasPayload = (res) => {
6913
6895
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6914
6896
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6915
6897
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6916
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6898
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6917
6899
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6918
6900
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6919
6901
  const showDiffStat = !!diff.diffStat;
6920
6902
  const description = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
6921
6903
  let resultSummary = "";
6922
6904
  let resultColor = theme.text.secondary;
6923
- if (status === CoreToolCallStatus.AwaitingApproval) {
6905
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
6924
6906
  resultSummary = "Confirming";
6925
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6907
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6926
6908
  resultSummary = "Accepted";
6927
6909
  resultColor = theme.text.accent;
6928
- } else if (status === CoreToolCallStatus.Cancelled) {
6910
+ } else if (status === "cancelled" /* Cancelled */) {
6929
6911
  resultSummary = "Rejected";
6930
6912
  resultColor = theme.status.error;
6931
- } else if (status === CoreToolCallStatus.Error) {
6913
+ } else if (status === "error" /* Error */) {
6932
6914
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6933
6915
  resultColor = theme.status.error;
6934
6916
  }
@@ -6959,7 +6941,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6959
6941
  filename: diff.fileName,
6960
6942
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
6961
6943
  availableTerminalHeight,
6962
- disableColor: status === CoreToolCallStatus.Cancelled
6944
+ disableColor: status === "cancelled" /* Cancelled */
6963
6945
  }
6964
6946
  );
6965
6947
  return { description, summary, payload };
@@ -7087,10 +7069,10 @@ var DenseToolMessage = (props) => {
7087
7069
  if (isGrepResult(resultDisplay)) {
7088
7070
  return getGenericSuccessData(resultDisplay, originalDescription);
7089
7071
  }
7090
- if (status === CoreToolCallStatus.Success && resultDisplay) {
7072
+ if (status === "success" /* Success */ && resultDisplay) {
7091
7073
  return getGenericSuccessData(resultDisplay, originalDescription);
7092
7074
  }
7093
- if (status === CoreToolCallStatus.Error) {
7075
+ if (status === "error" /* Error */) {
7094
7076
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7095
7077
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7096
7078
  "\u2192 ",
@@ -7131,7 +7113,7 @@ var DenseToolMessage = (props) => {
7131
7113
  language: fileExtension,
7132
7114
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7133
7115
  settings,
7134
- disableColor: status === CoreToolCallStatus.Cancelled,
7116
+ disableColor: status === "cancelled" /* Cancelled */,
7135
7117
  returnLines: true
7136
7118
  });
7137
7119
  } else {
@@ -7139,7 +7121,7 @@ var DenseToolMessage = (props) => {
7139
7121
  parsedLines,
7140
7122
  filename: diff.fileName,
7141
7123
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7142
- disableColor: status === CoreToolCallStatus.Cancelled
7124
+ disableColor: status === "cancelled" /* Cancelled */
7143
7125
  });
7144
7126
  }
7145
7127
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7269,7 +7251,7 @@ function isToolExecuting(pendingHistoryItems) {
7269
7251
  return pendingHistoryItems.some((item) => {
7270
7252
  if (item && item.type === "tool_group") {
7271
7253
  return item.tools.some(
7272
- (tool) => CoreToolCallStatus.Executing === tool.status
7254
+ (tool) => "executing" /* Executing */ === tool.status
7273
7255
  );
7274
7256
  }
7275
7257
  return false;
@@ -7278,7 +7260,7 @@ function isToolExecuting(pendingHistoryItems) {
7278
7260
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7279
7261
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7280
7262
  (item) => item.tools.some(
7281
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7263
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7282
7264
  )
7283
7265
  );
7284
7266
  }
@@ -7301,14 +7283,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
7301
7283
  if (isTrackedToolCall(t)) {
7302
7284
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
7303
7285
  } else {
7304
- return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7286
+ return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
7305
7287
  }
7306
7288
  });
7307
7289
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
7308
7290
  if (isTrackedToolCall(t)) {
7309
7291
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
7310
7292
  } else {
7311
- return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7293
+ return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7312
7294
  }
7313
7295
  });
7314
7296
  const isShellCommand = toolsToInspect.some((t) => {
@@ -7407,7 +7389,7 @@ var ToolGroupMessage = ({
7407
7389
  const groupedTools = (0, import_react21.useMemo)(() => {
7408
7390
  const groups = [];
7409
7391
  for (const tool of visibleToolCalls) {
7410
- if (tool.kind === Kind.Agent) {
7392
+ if (tool.kind === "agent" /* Agent */) {
7411
7393
  const lastGroup = groups[groups.length - 1];
7412
7394
  if (Array.isArray(lastGroup)) {
7413
7395
  lastGroup.push(tool);
@@ -7462,7 +7444,7 @@ var ToolGroupMessage = ({
7462
7444
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7463
7445
  let countToolCallsWithResults = 0;
7464
7446
  for (const tool of visibleToolCalls) {
7465
- if (tool.kind !== Kind.Agent) {
7447
+ if (tool.kind !== "agent" /* Agent */) {
7466
7448
  if (isCompactTool(tool, isCompactModeEnabled)) {
7467
7449
  if (hasDensePayload(tool)) {
7468
7450
  countToolCallsWithResults++;
@@ -7636,7 +7618,7 @@ var ToolGroupDisplay = ({
7636
7618
  }
7637
7619
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7638
7620
  const visibleTools = tools.filter(
7639
- (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7621
+ (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7640
7622
  );
7641
7623
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7642
7624
  const otherTools = visibleTools.filter(
@@ -7838,18 +7820,18 @@ function CompressionMessage({
7838
7820
  return "Compressing chat history";
7839
7821
  }
7840
7822
  switch (compressionStatus) {
7841
- case CompressionStatus.COMPRESSED:
7823
+ case 1 /* COMPRESSED */:
7842
7824
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7843
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7825
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7844
7826
  if (originalTokens < 5e4) {
7845
7827
  return "Compression was not beneficial for this history size.";
7846
7828
  }
7847
7829
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7848
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7830
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7849
7831
  return "Could not compress chat history due to a token counting error.";
7850
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7832
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7851
7833
  return "Chat history compression failed: the model returned an empty summary.";
7852
- case CompressionStatus.NOOP:
7834
+ case 5 /* NOOP */:
7853
7835
  return "Nothing to compress.";
7854
7836
  default:
7855
7837
  return "";
@@ -8275,8 +8257,8 @@ var ModelUsageTable = ({ models }) => {
8275
8257
  );
8276
8258
  roleEntries.sort(([a], [b]) => {
8277
8259
  if (a === b) return 0;
8278
- if (a === LlmRole.MAIN) return -1;
8279
- if (b === LlmRole.MAIN) return 1;
8260
+ if (a === "main" /* MAIN */) return -1;
8261
+ if (b === "main" /* MAIN */) return 1;
8280
8262
  return a.localeCompare(b);
8281
8263
  });
8282
8264
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8607,8 +8589,8 @@ var ModelStatsDisplay = ({
8607
8589
  return validRoles.includes(role);
8608
8590
  }).sort((a, b) => {
8609
8591
  if (a === b) return 0;
8610
- if (a === LlmRole.MAIN) return -1;
8611
- if (b === LlmRole.MAIN) return 1;
8592
+ if (a === "main" /* MAIN */) return -1;
8593
+ if (b === "main" /* MAIN */) return 1;
8612
8594
  return a.localeCompare(b);
8613
8595
  });
8614
8596
  const createRow = (metric, getValue, options = {}) => {
@@ -9399,7 +9381,7 @@ var McpStatus = ({
9399
9381
  );
9400
9382
  const originalStatus = serverStatus(serverName);
9401
9383
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9402
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9384
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9403
9385
  let statusIndicator = "";
9404
9386
  let statusText = "";
9405
9387
  let statusColor = theme.text.primary;
@@ -9411,17 +9393,17 @@ var McpStatus = ({
9411
9393
  statusColor = theme.text.secondary;
9412
9394
  } else {
9413
9395
  switch (status) {
9414
- case MCPServerStatus.CONNECTED:
9396
+ case "connected" /* CONNECTED */:
9415
9397
  statusIndicator = "\u{1F7E2}";
9416
9398
  statusText = "Ready";
9417
9399
  statusColor = theme.status.success;
9418
9400
  break;
9419
- case MCPServerStatus.CONNECTING:
9401
+ case "connecting" /* CONNECTING */:
9420
9402
  statusIndicator = "\u{1F504}";
9421
9403
  statusText = "Starting... (first startup may take longer)";
9422
9404
  statusColor = theme.status.warning;
9423
9405
  break;
9424
- case MCPServerStatus.DISCONNECTED:
9406
+ case "disconnected" /* DISCONNECTED */:
9425
9407
  default:
9426
9408
  statusIndicator = "\u{1F534}";
9427
9409
  statusText = "Disconnected";
@@ -9469,12 +9451,12 @@ var McpStatus = ({
9469
9451
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9470
9452
  " - ",
9471
9453
  statusText,
9472
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9454
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9473
9455
  ] }),
9474
9456
  authStatusNode
9475
9457
  ] }),
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: [
9458
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9459
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9478
9460
  " (",
9479
9461
  toolCount,
9480
9462
  " tools cached)"
@@ -10035,7 +10017,7 @@ var Notifications = () => {
10035
10017
  if (dismissed) return [];
10036
10018
  const counts = persistentState.get("startupWarningCounts") || {};
10037
10019
  return startupWarnings.filter((w) => {
10038
- if (w.priority === WarningPriority.Low) {
10020
+ if (w.priority === "low" /* Low */) {
10039
10021
  const count = counts[w.id] || 0;
10040
10022
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10041
10023
  }
@@ -10048,7 +10030,7 @@ var Notifications = () => {
10048
10030
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10049
10031
  let changed = false;
10050
10032
  visibleWarnings.forEach((w) => {
10051
- if (w.priority === WarningPriority.Low) {
10033
+ if (w.priority === "low" /* Low */) {
10052
10034
  counts[w.id] = (counts[w.id] || 0) + 1;
10053
10035
  changed = true;
10054
10036
  }
@@ -10155,7 +10137,7 @@ var UserIdentity = ({ config }) => {
10155
10137
  }
10156
10138
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
10157
10139
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
10158
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
10140
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
10159
10141
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
10160
10142
  "Signed in with Google",
10161
10143
  email ? ":" : ""
@@ -10241,6 +10223,7 @@ var Banner = ({ bannerText, isWarning, width }) => {
10241
10223
 
10242
10224
  // packages/cli/src/ui/hooks/useBanner.ts
10243
10225
  var import_react30 = __toESM(require_react(), 1);
10226
+ var import_chalk2 = __toESM(require_source(), 1);
10244
10227
  import crypto from "node:crypto";
10245
10228
  var DEFAULT_MAX_BANNER_SHOWN_COUNT = 5;
10246
10229
  var sessionIncrementedBanners = /* @__PURE__ */ new Set();
@@ -10254,7 +10237,15 @@ function useBanner(bannerData) {
10254
10237
  const currentBannerCount = bannerCounts[hashedText] || 0;
10255
10238
  const showBanner = activeText !== "" && (currentBannerCount < DEFAULT_MAX_BANNER_SHOWN_COUNT || activeText.includes("Antigravity"));
10256
10239
  const rawBannerText = showBanner ? activeText : "";
10257
- const bannerText = rawBannerText.replace(/\\n/g, "\n");
10240
+ let bannerText = rawBannerText.replace(/\\n/g, "\n");
10241
+ if (showBanner && activeText.includes("Antigravity")) {
10242
+ const info = getAntigravityInstallInfo();
10243
+ if (info) {
10244
+ bannerText += `
10245
+
10246
+ To install run "${import_chalk2.default.bold(info.installCmd)}"`;
10247
+ }
10248
+ }
10258
10249
  (0, import_react30.useEffect)(() => {
10259
10250
  if (showBanner && activeText) {
10260
10251
  if (!sessionIncrementedBanners.has(activeText)) {
@@ -10389,7 +10380,7 @@ var import_react32 = __toESM(require_react(), 1);
10389
10380
  function getConfirmingToolState(pendingHistoryItems) {
10390
10381
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10391
10382
  const confirmingTools = allPendingTools.filter(
10392
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10383
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10393
10384
  );
10394
10385
  if (confirmingTools.length === 0) {
10395
10386
  return null;
@@ -11697,7 +11688,7 @@ var ExitPlanModeDialog = ({
11697
11688
  {
11698
11689
  questions: [
11699
11690
  {
11700
- type: QuestionType.CHOICE,
11691
+ type: "choice" /* CHOICE */,
11701
11692
  header: "Approval",
11702
11693
  question: planContent,
11703
11694
  options: [
@@ -11718,9 +11709,9 @@ var ExitPlanModeDialog = ({
11718
11709
  onSubmit: (answers) => {
11719
11710
  const answer = answers["0"];
11720
11711
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11721
- onApprove(ApprovalMode.AUTO_EDIT);
11712
+ onApprove("autoEdit" /* AUTO_EDIT */);
11722
11713
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11723
- onApprove(ApprovalMode.DEFAULT);
11714
+ onApprove("default" /* DEFAULT */);
11724
11715
  } else if (answer) {
11725
11716
  onFeedback(answer);
11726
11717
  }
@@ -11931,7 +11922,7 @@ ${deceptiveUrlWarnings.map(
11931
11922
  );
11932
11923
  (0, import_react37.useEffect)(() => {
11933
11924
  if (isCancelling) {
11934
- handleConfirm(ToolConfirmationOutcome.Cancel);
11925
+ handleConfirm("cancel" /* Cancel */);
11935
11926
  }
11936
11927
  }, [isCancelling, handleConfirm]);
11937
11928
  const handleSelect = (0, import_react37.useCallback)(
@@ -11944,19 +11935,19 @@ ${deceptiveUrlWarnings.map(
11944
11935
  if (!confirmationDetails.isModifying) {
11945
11936
  options2.push({
11946
11937
  label: "Allow once",
11947
- value: ToolConfirmationOutcome.ProceedOnce,
11938
+ value: "proceed_once" /* ProceedOnce */,
11948
11939
  key: "Allow once"
11949
11940
  });
11950
11941
  if (isTrustedFolder) {
11951
11942
  options2.push({
11952
11943
  label: "Allow for this session",
11953
- value: ToolConfirmationOutcome.ProceedAlways,
11944
+ value: "proceed_always" /* ProceedAlways */,
11954
11945
  key: "Allow for this session"
11955
11946
  });
11956
11947
  if (allowPermanentApproval) {
11957
11948
  options2.push({
11958
11949
  label: "Allow for this file in all future sessions",
11959
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11950
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11960
11951
  key: "Allow for this file in all future sessions"
11961
11952
  });
11962
11953
  }
@@ -11964,119 +11955,119 @@ ${deceptiveUrlWarnings.map(
11964
11955
  if (!config.getIdeMode() || !isDiffingEnabled) {
11965
11956
  options2.push({
11966
11957
  label: "Modify with external editor",
11967
- value: ToolConfirmationOutcome.ModifyWithEditor,
11958
+ value: "modify_with_editor" /* ModifyWithEditor */,
11968
11959
  key: "Modify with external editor"
11969
11960
  });
11970
11961
  }
11971
11962
  options2.push({
11972
11963
  label: "No, suggest changes (esc)",
11973
- value: ToolConfirmationOutcome.Cancel,
11964
+ value: "cancel" /* Cancel */,
11974
11965
  key: "No, suggest changes (esc)"
11975
11966
  });
11976
11967
  }
11977
11968
  } else if (confirmationDetails.type === "sandbox_expansion") {
11978
11969
  options2.push({
11979
11970
  label: "Allow once",
11980
- value: ToolConfirmationOutcome.ProceedOnce,
11971
+ value: "proceed_once" /* ProceedOnce */,
11981
11972
  key: "Allow once"
11982
11973
  });
11983
11974
  if (isTrustedFolder) {
11984
11975
  options2.push({
11985
11976
  label: "Allow for this session",
11986
- value: ToolConfirmationOutcome.ProceedAlways,
11977
+ value: "proceed_always" /* ProceedAlways */,
11987
11978
  key: "Allow for this session"
11988
11979
  });
11989
11980
  if (allowPermanentApproval) {
11990
11981
  options2.push({
11991
11982
  label: "Allow for all future sessions",
11992
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11983
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11993
11984
  key: "Allow for all future sessions"
11994
11985
  });
11995
11986
  }
11996
11987
  }
11997
11988
  options2.push({
11998
11989
  label: "No, suggest changes (esc)",
11999
- value: ToolConfirmationOutcome.Cancel,
11990
+ value: "cancel" /* Cancel */,
12000
11991
  key: "No, suggest changes (esc)"
12001
11992
  });
12002
11993
  } else if (confirmationDetails.type === "exec") {
12003
11994
  options2.push({
12004
11995
  label: "Allow once",
12005
- value: ToolConfirmationOutcome.ProceedOnce,
11996
+ value: "proceed_once" /* ProceedOnce */,
12006
11997
  key: "Allow once"
12007
11998
  });
12008
11999
  if (isTrustedFolder) {
12009
12000
  options2.push({
12010
12001
  label: `Allow for this session`,
12011
- value: ToolConfirmationOutcome.ProceedAlways,
12002
+ value: "proceed_always" /* ProceedAlways */,
12012
12003
  key: `Allow for this session`
12013
12004
  });
12014
12005
  if (allowPermanentApproval) {
12015
12006
  options2.push({
12016
12007
  label: `Allow this command for all future sessions`,
12017
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12008
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12018
12009
  key: `Allow for all future sessions`
12019
12010
  });
12020
12011
  }
12021
12012
  }
12022
12013
  options2.push({
12023
12014
  label: "No, suggest changes (esc)",
12024
- value: ToolConfirmationOutcome.Cancel,
12015
+ value: "cancel" /* Cancel */,
12025
12016
  key: "No, suggest changes (esc)"
12026
12017
  });
12027
12018
  } else if (confirmationDetails.type === "info") {
12028
12019
  options2.push({
12029
12020
  label: "Allow once",
12030
- value: ToolConfirmationOutcome.ProceedOnce,
12021
+ value: "proceed_once" /* ProceedOnce */,
12031
12022
  key: "Allow once"
12032
12023
  });
12033
12024
  if (isTrustedFolder) {
12034
12025
  options2.push({
12035
12026
  label: "Allow for this session",
12036
- value: ToolConfirmationOutcome.ProceedAlways,
12027
+ value: "proceed_always" /* ProceedAlways */,
12037
12028
  key: "Allow for this session"
12038
12029
  });
12039
12030
  if (allowPermanentApproval) {
12040
12031
  options2.push({
12041
12032
  label: "Allow for all future sessions",
12042
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12033
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12043
12034
  key: "Allow for all future sessions"
12044
12035
  });
12045
12036
  }
12046
12037
  }
12047
12038
  options2.push({
12048
12039
  label: "No, suggest changes (esc)",
12049
- value: ToolConfirmationOutcome.Cancel,
12040
+ value: "cancel" /* Cancel */,
12050
12041
  key: "No, suggest changes (esc)"
12051
12042
  });
12052
12043
  } else if (confirmationDetails.type === "mcp") {
12053
12044
  options2.push({
12054
12045
  label: "Allow once",
12055
- value: ToolConfirmationOutcome.ProceedOnce,
12046
+ value: "proceed_once" /* ProceedOnce */,
12056
12047
  key: "Allow once"
12057
12048
  });
12058
12049
  if (isTrustedFolder) {
12059
12050
  options2.push({
12060
12051
  label: "Allow tool for this session",
12061
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
12052
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
12062
12053
  key: "Allow tool for this session"
12063
12054
  });
12064
12055
  options2.push({
12065
12056
  label: "Allow all server tools for this session",
12066
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
12057
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
12067
12058
  key: "Allow all server tools for this session"
12068
12059
  });
12069
12060
  if (allowPermanentApproval) {
12070
12061
  options2.push({
12071
12062
  label: "Allow tool for all future sessions",
12072
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12063
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12073
12064
  key: "Allow tool for all future sessions"
12074
12065
  });
12075
12066
  }
12076
12067
  }
12077
12068
  options2.push({
12078
12069
  label: "No, suggest changes (esc)",
12079
- value: ToolConfirmationOutcome.Cancel,
12070
+ value: "cancel" /* Cancel */,
12080
12071
  key: "No, suggest changes (esc)"
12081
12072
  });
12082
12073
  }
@@ -12115,7 +12106,7 @@ ${deceptiveUrlWarnings.map(
12115
12106
  const containsRedirection = commandsToDisplay.some(
12116
12107
  (cmd) => hasRedirection(cmd)
12117
12108
  );
12118
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12109
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12119
12110
  if (containsRedirection && !isAutoEdit) {
12120
12111
  extraInfoLines = 1;
12121
12112
  }
@@ -12141,7 +12132,7 @@ ${deceptiveUrlWarnings.map(
12141
12132
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12142
12133
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12143
12134
  const alwaysAndSaveIndex = options2.findIndex(
12144
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12135
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12145
12136
  );
12146
12137
  if (alwaysAndSaveIndex !== -1) {
12147
12138
  initialIndex2 = alwaysAndSaveIndex;
@@ -12158,10 +12149,10 @@ ${deceptiveUrlWarnings.map(
12158
12149
  {
12159
12150
  questions: confirmationDetails.questions,
12160
12151
  onSubmit: (answers) => {
12161
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12152
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12162
12153
  },
12163
12154
  onCancel: () => {
12164
- handleConfirm(ToolConfirmationOutcome.Cancel);
12155
+ handleConfirm("cancel" /* Cancel */);
12165
12156
  },
12166
12157
  width: terminalWidth,
12167
12158
  availableHeight: bodyHeight
@@ -12182,19 +12173,19 @@ ${deceptiveUrlWarnings.map(
12182
12173
  planPath: confirmationDetails.planPath,
12183
12174
  getPreferredEditor,
12184
12175
  onApprove: (approvalMode) => {
12185
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12176
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12186
12177
  approved: true,
12187
12178
  approvalMode
12188
12179
  });
12189
12180
  },
12190
12181
  onFeedback: (feedback) => {
12191
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12182
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12192
12183
  approved: false,
12193
12184
  feedback
12194
12185
  });
12195
12186
  },
12196
12187
  onCancel: () => {
12197
- handleConfirm(ToolConfirmationOutcome.Cancel);
12188
+ handleConfirm("cancel" /* Cancel */);
12198
12189
  },
12199
12190
  width: terminalWidth,
12200
12191
  availableHeight: bodyHeight
@@ -12303,7 +12294,7 @@ ${deceptiveUrlWarnings.map(
12303
12294
  const containsRedirection = commandsToDisplay.some(
12304
12295
  (cmd) => hasRedirection(cmd)
12305
12296
  );
12306
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12297
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12307
12298
  let warnings = null;
12308
12299
  if (containsRedirection && !isAutoEdit) {
12309
12300
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12462,7 +12453,7 @@ ${deceptiveUrlWarnings.map(
12462
12453
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12463
12454
  const renderRadioItem = (0, import_react37.useCallback)(
12464
12455
  (item, { titleColor }) => {
12465
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12456
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12466
12457
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12467
12458
  item.label,
12468
12459
  " ",
@@ -13575,7 +13566,7 @@ var import_react44 = __toESM(require_react(), 1);
13575
13566
 
13576
13567
  // packages/cli/src/ui/components/shared/BaseSettingsDialog.tsx
13577
13568
  var import_react43 = __toESM(require_react(), 1);
13578
- var import_chalk2 = __toESM(require_source(), 1);
13569
+ var import_chalk3 = __toESM(require_source(), 1);
13579
13570
 
13580
13571
  // packages/cli/src/ui/hooks/useSettingsNavigation.ts
13581
13572
  var import_react41 = __toESM(require_react(), 1);
@@ -14043,9 +14034,9 @@ function BaseSettingsDialog({
14043
14034
  editCursorPos + 1
14044
14035
  );
14045
14036
  const afterCursor = cpSlice(editBuffer, editCursorPos + 1);
14046
- displayValue = beforeCursor + import_chalk2.default.inverse(atCursor) + afterCursor;
14037
+ displayValue = beforeCursor + import_chalk3.default.inverse(atCursor) + afterCursor;
14047
14038
  } else if (editCursorPos >= cpLen(editBuffer)) {
14048
- displayValue = editBuffer + (cursorVisible ? import_chalk2.default.inverse(" ") : " ");
14039
+ displayValue = editBuffer + (cursorVisible ? import_chalk3.default.inverse(" ") : " ");
14049
14040
  } else {
14050
14041
  displayValue = editBuffer;
14051
14042
  }
@@ -14492,7 +14483,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14492
14483
  if (settings.merged.security.auth.useExternal) {
14493
14484
  return null;
14494
14485
  }
14495
- if (authType === AuthType.USE_GEMINI) {
14486
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14496
14487
  return null;
14497
14488
  }
14498
14489
  return validateAuthMethod(authType);
@@ -14544,7 +14535,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14544
14535
  }
14545
14536
  return;
14546
14537
  }
14547
- if (authType === AuthType.USE_GEMINI) {
14538
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14548
14539
  const key = await reloadApiKey();
14549
14540
  if (!key) {
14550
14541
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14622,31 +14613,31 @@ function AuthDialog({
14622
14613
  let items = [
14623
14614
  {
14624
14615
  label: "Sign in with Google",
14625
- value: AuthType.LOGIN_WITH_GOOGLE,
14626
- key: AuthType.LOGIN_WITH_GOOGLE
14616
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14617
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14627
14618
  },
14628
14619
  ...process.env["CLOUD_SHELL"] === "true" ? [
14629
14620
  {
14630
14621
  label: "Use Cloud Shell user credentials",
14631
- value: AuthType.COMPUTE_ADC,
14632
- key: AuthType.COMPUTE_ADC
14622
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14623
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14633
14624
  }
14634
14625
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14635
14626
  {
14636
14627
  label: "Use metadata server application default credentials",
14637
- value: AuthType.COMPUTE_ADC,
14638
- key: AuthType.COMPUTE_ADC
14628
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14629
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14639
14630
  }
14640
14631
  ] : [],
14641
14632
  {
14642
14633
  label: "Use Gemini API Key",
14643
- value: AuthType.USE_GEMINI,
14644
- key: AuthType.USE_GEMINI
14634
+ value: "gemini-api-key" /* USE_GEMINI */,
14635
+ key: "gemini-api-key" /* USE_GEMINI */
14645
14636
  },
14646
14637
  {
14647
14638
  label: "Vertex AI",
14648
- value: AuthType.USE_VERTEX_AI,
14649
- key: AuthType.USE_VERTEX_AI
14639
+ value: "vertex-ai" /* USE_VERTEX_AI */,
14640
+ key: "vertex-ai" /* USE_VERTEX_AI */
14650
14641
  }
14651
14642
  ];
14652
14643
  if (settings.merged.security.auth.enforcedType) {
@@ -14668,9 +14659,9 @@ function AuthDialog({
14668
14659
  return item.value === defaultAuthType;
14669
14660
  }
14670
14661
  if (process.env["GEMINI_API_KEY"]) {
14671
- return item.value === AuthType.USE_GEMINI;
14662
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
14672
14663
  }
14673
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
14664
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14674
14665
  });
14675
14666
  if (settings.merged.security.auth.enforcedType) {
14676
14667
  initialAuthIndex = 0;
@@ -14681,7 +14672,7 @@ function AuthDialog({
14681
14672
  return;
14682
14673
  }
14683
14674
  if (authType) {
14684
- const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14675
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14685
14676
  if (needsRestart) {
14686
14677
  setAuthContext({ requiresRestart: true });
14687
14678
  } else {
@@ -14689,12 +14680,12 @@ function AuthDialog({
14689
14680
  }
14690
14681
  await clearCachedCredentialFile();
14691
14682
  settings.setValue(scope, "security.auth.selectedType", authType);
14692
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14683
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14693
14684
  setExiting(true);
14694
14685
  setTimeout(relaunchApp, 100);
14695
14686
  return;
14696
14687
  }
14697
- if (authType === AuthType.USE_GEMINI) {
14688
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14698
14689
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14699
14690
  return;
14700
14691
  }
@@ -15450,11 +15441,11 @@ var PrivacyNoticeText = ({
15450
15441
  }) => {
15451
15442
  const authType = config.getContentGeneratorConfig()?.authType;
15452
15443
  switch (authType) {
15453
- case AuthType.USE_GEMINI:
15444
+ case "gemini-api-key" /* USE_GEMINI */:
15454
15445
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15455
- case AuthType.USE_VERTEX_AI:
15446
+ case "vertex-ai" /* USE_VERTEX_AI */:
15456
15447
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15457
- case AuthType.LOGIN_WITH_GOOGLE:
15448
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15458
15449
  default:
15459
15450
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15460
15451
  }
@@ -15495,7 +15486,7 @@ function ProQuotaDialog({
15495
15486
  value: "retry_always",
15496
15487
  key: "retry_always"
15497
15488
  },
15498
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15489
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15499
15490
  {
15500
15491
  label: "Upgrade for higher limits",
15501
15492
  value: "upgrade",
@@ -16654,7 +16645,7 @@ function ModelDialog({ onClose }) {
16654
16645
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16655
16646
  const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
16656
16647
  const selectedAuthType = settings.merged.security.auth.selectedType;
16657
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16648
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16658
16649
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16659
16650
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16660
16651
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -17977,10 +17968,10 @@ function initializeConsoleStore() {
17977
17968
  globalConsoleMessages = [];
17978
17969
  globalErrorCount = 0;
17979
17970
  notifyListeners();
17980
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
17981
- coreEvents.off(CoreEvent.Output, handleOutput);
17982
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
17983
- coreEvents.on(CoreEvent.Output, handleOutput);
17971
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
17972
+ coreEvents.off("output" /* Output */, handleOutput);
17973
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
17974
+ coreEvents.on("output" /* Output */, handleOutput);
17984
17975
  }
17985
17976
  function notifyListeners() {
17986
17977
  for (const listener of listeners) {
@@ -18458,7 +18449,7 @@ var ListeningIndicator = ({
18458
18449
  };
18459
18450
 
18460
18451
  // packages/cli/src/ui/components/InputPrompt.tsx
18461
- var import_chalk3 = __toESM(require_source(), 1);
18452
+ var import_chalk4 = __toESM(require_source(), 1);
18462
18453
 
18463
18454
  // packages/cli/src/ui/hooks/useShellHistory.ts
18464
18455
  var import_react63 = __toESM(require_react(), 1);
@@ -20117,7 +20108,7 @@ function usePromptCompletion({
20117
20108
  { model: "prompt-completion" },
20118
20109
  contents,
20119
20110
  signal,
20120
- LlmRole.UTILITY_AUTOCOMPLETE
20111
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20121
20112
  );
20122
20113
  if (signal.aborted) {
20123
20114
  return;
@@ -22115,7 +22106,7 @@ var InputPrompt = ({
22115
22106
  relCol - segStart,
22116
22107
  relCol - segStart + 1
22117
22108
  );
22118
- const highlighted = showCursor ? import_chalk3.default.inverse(charToHighlight) : charToHighlight;
22109
+ const highlighted = showCursor ? import_chalk4.default.inverse(charToHighlight) : charToHighlight;
22119
22110
  display = cpSlice(display, 0, relCol - segStart) + highlighted + cpSlice(display, relCol - segStart + 1);
22120
22111
  }
22121
22112
  charCount = segEnd;
@@ -22130,7 +22121,7 @@ var InputPrompt = ({
22130
22121
  const currentLineGhost = isOnCursorLine ? inlineGhost : "";
22131
22122
  if (isOnCursorLine && cursorVisualColAbsolute === cpLen(lineText) && !currentLineGhost) {
22132
22123
  renderedLine.push(
22133
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { children: showCursor ? import_chalk3.default.inverse(" ") : " " }, `cursor-end-${cursorVisualColAbsolute}`)
22124
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { children: showCursor ? import_chalk4.default.inverse(" ") : " " }, `cursor-end-${cursorVisualColAbsolute}`)
22134
22125
  );
22135
22126
  }
22136
22127
  const showCursorBeforeGhost = focus && isOnCursorLine && cursorVisualColAbsolute === cpLen(lineText) && currentLineGhost;
@@ -22144,7 +22135,7 @@ var InputPrompt = ({
22144
22135
  ),
22145
22136
  children: [
22146
22137
  renderedLine,
22147
- showCursorBeforeGhost && (showCursor ? import_chalk3.default.inverse(" ") : " "),
22138
+ showCursorBeforeGhost && (showCursor ? import_chalk4.default.inverse(" ") : " "),
22148
22139
  currentLineGhost && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: theme.text.secondary, children: currentLineGhost })
22149
22140
  ]
22150
22141
  }
@@ -22195,9 +22186,9 @@ var InputPrompt = ({
22195
22186
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22196
22187
  }
22197
22188
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22198
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22199
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22200
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22189
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22190
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22191
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22201
22192
  let statusColor;
22202
22193
  let statusText = "";
22203
22194
  if (shellModeActive) {
@@ -22279,7 +22270,7 @@ var InputPrompt = ({
22279
22270
  terminalCursorFocus: showCursor,
22280
22271
  terminalCursorPosition: 0,
22281
22272
  children: [
22282
- import_chalk3.default.inverse(effectivePlaceholder.slice(0, 1)),
22273
+ import_chalk4.default.inverse(effectivePlaceholder.slice(0, 1)),
22283
22274
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: theme.text.secondary, children: effectivePlaceholder.slice(1) })
22284
22275
  ]
22285
22276
  }
@@ -23030,22 +23021,22 @@ var ApprovalModeIndicator = ({
23030
23021
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23031
23022
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23032
23023
  switch (approvalMode) {
23033
- case ApprovalMode.AUTO_EDIT:
23024
+ case "autoEdit" /* AUTO_EDIT */:
23034
23025
  textColor = theme.status.warning;
23035
23026
  textContent = "auto-accept edits";
23036
23027
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23037
23028
  break;
23038
- case ApprovalMode.PLAN:
23029
+ case "plan" /* PLAN */:
23039
23030
  textColor = theme.status.success;
23040
23031
  textContent = "plan";
23041
23032
  subText = `${cycleHint} to manual`;
23042
23033
  break;
23043
- case ApprovalMode.YOLO:
23034
+ case "yolo" /* YOLO */:
23044
23035
  textColor = theme.status.error;
23045
23036
  textContent = "YOLO";
23046
23037
  subText = yoloHint;
23047
23038
  break;
23048
- case ApprovalMode.DEFAULT:
23039
+ case "default" /* DEFAULT */:
23049
23040
  default:
23050
23041
  textColor = theme.text.accent;
23051
23042
  textContent = "";
@@ -23093,7 +23084,7 @@ var useComposerStatus = () => {
23093
23084
  (item) => item.type === "tool_group"
23094
23085
  ).some(
23095
23086
  (item) => item.tools.some(
23096
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23087
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23097
23088
  )
23098
23089
  ),
23099
23090
  [uiState.pendingHistoryItems]
@@ -23108,13 +23099,13 @@ var useComposerStatus = () => {
23108
23099
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23109
23100
  if (hideMinimalModeHintWhileBusy) return null;
23110
23101
  switch (showApprovalModeIndicator) {
23111
- case ApprovalMode.YOLO:
23102
+ case "yolo" /* YOLO */:
23112
23103
  return { text: "YOLO", color: theme.status.error };
23113
- case ApprovalMode.PLAN:
23104
+ case "plan" /* PLAN */:
23114
23105
  return { text: "plan", color: theme.status.success };
23115
- case ApprovalMode.AUTO_EDIT:
23106
+ case "autoEdit" /* AUTO_EDIT */:
23116
23107
  return { text: "auto edit", color: theme.status.warning };
23117
- case ApprovalMode.DEFAULT:
23108
+ case "default" /* DEFAULT */:
23118
23109
  default:
23119
23110
  return null;
23120
23111
  }
@@ -23468,7 +23459,7 @@ var ConfigInitDisplay = ({
23468
23459
  let connected = 0;
23469
23460
  const connecting = [];
23470
23461
  for (const [name, client] of clients.entries()) {
23471
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23462
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23472
23463
  connected++;
23473
23464
  } else {
23474
23465
  connecting.push(name);
@@ -23490,9 +23481,9 @@ var ConfigInitDisplay = ({
23490
23481
  );
23491
23482
  }
23492
23483
  };
23493
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23484
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23494
23485
  return () => {
23495
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23486
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23496
23487
  };
23497
23488
  }, [initialMessage]);
23498
23489
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24209,7 +24200,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24209
24200
  callId,
24210
24201
  name: SHELL_COMMAND_NAME,
24211
24202
  description: rawQuery,
24212
- status: CoreToolCallStatus.Executing,
24203
+ status: "executing" /* Executing */,
24213
24204
  isClientInitiated: true,
24214
24205
  resultDisplay: "",
24215
24206
  confirmationDetails: void 0
@@ -24350,7 +24341,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24350
24341
  mainContent = result.output.trim() || "(Command produced no output)";
24351
24342
  }
24352
24343
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24353
- let finalStatus = CoreToolCallStatus.Success;
24344
+ let finalStatus = "success" /* Success */;
24354
24345
  const prependToAnsiOutput = (output, text) => {
24355
24346
  const newLines = text.split("\n").map((line) => [
24356
24347
  {
@@ -24369,20 +24360,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24369
24360
  };
24370
24361
  let prefix = "";
24371
24362
  if (result.error) {
24372
- finalStatus = CoreToolCallStatus.Error;
24363
+ finalStatus = "error" /* Error */;
24373
24364
  prefix = result.error.message;
24374
24365
  } else if (result.aborted) {
24375
- finalStatus = CoreToolCallStatus.Cancelled;
24366
+ finalStatus = "cancelled" /* Cancelled */;
24376
24367
  prefix = "Command was cancelled.";
24377
24368
  } else if (result.backgrounded) {
24378
- finalStatus = CoreToolCallStatus.Success;
24369
+ finalStatus = "success" /* Success */;
24379
24370
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24380
24371
  mainContent = finalOutput;
24381
24372
  } else if (result.signal) {
24382
- finalStatus = CoreToolCallStatus.Error;
24373
+ finalStatus = "error" /* Error */;
24383
24374
  prefix = `Command terminated by signal: ${result.signal}.`;
24384
24375
  } else if (result.exitCode !== 0) {
24385
- finalStatus = CoreToolCallStatus.Error;
24376
+ finalStatus = "error" /* Error */;
24386
24377
  prefix = `Command exited with code ${result.exitCode}.`;
24387
24378
  }
24388
24379
  if (prefix) {
@@ -24408,7 +24399,7 @@ ${mainContent}`;
24408
24399
  status: finalStatus,
24409
24400
  resultDisplay: finalOutput
24410
24401
  };
24411
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24402
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24412
24403
  addItemToHistory(
24413
24404
  {
24414
24405
  type: "tool_group",
@@ -25398,7 +25389,7 @@ function useQuotaAndFallback({
25398
25389
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25399
25390
  `/stats model for usage details`,
25400
25391
  `/model to switch models.`,
25401
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25392
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25402
25393
  ].filter(Boolean);
25403
25394
  message = messageLines.join("\n");
25404
25395
  } else if (error instanceof ModelNotFoundError) {
@@ -25586,7 +25577,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25586
25577
  );
25587
25578
  setEditorError(null);
25588
25579
  setIsEditorDialogOpen(false);
25589
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25580
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25590
25581
  } catch (error) {
25591
25582
  setEditorError(`Failed to set editor preference: ${error}`);
25592
25583
  }
@@ -25595,7 +25586,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25595
25586
  );
25596
25587
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25597
25588
  setIsEditorDialogOpen(false);
25598
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25589
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25599
25590
  }, []);
25600
25591
  return {
25601
25592
  isEditorDialogOpen,
@@ -25972,7 +25963,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25972
25963
  canonicalPath: resolvedCommandPath
25973
25964
  } = parseSlashCommand(trimmed, commands);
25974
25965
  if (!commandToExecute) {
25975
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25966
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25976
25967
  if (isMcpLoading) {
25977
25968
  setIsProcessing(true);
25978
25969
  if (addToHistory) {
@@ -26152,7 +26143,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26152
26143
  onConfirm: async (resolvedOutcome) => {
26153
26144
  resolve3({
26154
26145
  outcome: resolvedOutcome,
26155
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26146
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26156
26147
  });
26157
26148
  }
26158
26149
  };
@@ -26160,7 +26151,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26160
26151
  callId,
26161
26152
  name: "Expansion",
26162
26153
  description: "Command expansion needs shell access",
26163
- status: CoreToolCallStatus.AwaitingApproval,
26154
+ status: "awaiting_approval" /* AwaitingApproval */,
26164
26155
  isClientInitiated: true,
26165
26156
  resultDisplay: void 0,
26166
26157
  confirmationDetails
@@ -26171,7 +26162,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26171
26162
  });
26172
26163
  });
26173
26164
  setPendingItem(null);
26174
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26165
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26175
26166
  addItem(
26176
26167
  {
26177
26168
  type: "info" /* INFO */,
@@ -26181,7 +26172,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26181
26172
  );
26182
26173
  return { type: "handled" };
26183
26174
  }
26184
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26175
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26185
26176
  setSessionShellAllowlist(
26186
26177
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26187
26178
  );
@@ -26657,7 +26648,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26657
26648
  let description;
26658
26649
  let renderOutputAsMarkdown = false;
26659
26650
  const displayName = call.tool?.displayName ?? call.request.name;
26660
- if (call.status === CoreToolCallStatus.Error) {
26651
+ if (call.status === "error" /* Error */) {
26661
26652
  description = JSON.stringify(call.request.args);
26662
26653
  } else {
26663
26654
  description = call.invocation.getDescription();
@@ -26680,27 +26671,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26680
26671
  let progress = void 0;
26681
26672
  let progressTotal = void 0;
26682
26673
  switch (call.status) {
26683
- case CoreToolCallStatus.Success:
26674
+ case "success" /* Success */:
26684
26675
  resultDisplay = call.response.resultDisplay;
26685
26676
  outputFile = call.response.outputFile;
26686
26677
  break;
26687
- case CoreToolCallStatus.Error:
26688
- case CoreToolCallStatus.Cancelled:
26678
+ case "error" /* Error */:
26679
+ case "cancelled" /* Cancelled */:
26689
26680
  resultDisplay = call.response.resultDisplay;
26690
26681
  break;
26691
- case CoreToolCallStatus.AwaitingApproval:
26682
+ case "awaiting_approval" /* AwaitingApproval */:
26692
26683
  correlationId = call.correlationId;
26693
26684
  confirmationDetails = call.confirmationDetails;
26694
26685
  break;
26695
- case CoreToolCallStatus.Executing:
26686
+ case "executing" /* Executing */:
26696
26687
  resultDisplay = call.liveOutput;
26697
26688
  ptyId = call.pid;
26698
26689
  progressMessage = call.progressMessage;
26699
26690
  progress = call.progress;
26700
26691
  progressTotal = call.progressTotal;
26701
26692
  break;
26702
- case CoreToolCallStatus.Scheduled:
26703
- case CoreToolCallStatus.Validating:
26693
+ case "scheduled" /* Scheduled */:
26694
+ case "validating" /* Validating */:
26704
26695
  break;
26705
26696
  default: {
26706
26697
  const exhaustiveCheck = call;
@@ -26771,7 +26762,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26771
26762
  const handler = (event) => {
26772
26763
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26773
26764
  const hasExecuting = event.toolCalls.some(
26774
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26765
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26775
26766
  );
26776
26767
  if (hasExecuting) {
26777
26768
  setLastToolOutputTime(Date.now());
@@ -26780,7 +26771,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26780
26771
  const prevCalls = prev[event.schedulerId] ?? [];
26781
26772
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26782
26773
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26783
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26774
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26784
26775
  );
26785
26776
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26786
26777
  return prev;
@@ -26792,9 +26783,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26792
26783
  };
26793
26784
  });
26794
26785
  };
26795
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26786
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26796
26787
  return () => {
26797
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26788
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26798
26789
  };
26799
26790
  }, [messageBus, internalAdaptToolCalls]);
26800
26791
  (0, import_react98.useEffect)(() => {
@@ -26816,9 +26807,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26816
26807
  };
26817
26808
  });
26818
26809
  };
26819
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26810
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26820
26811
  return () => {
26821
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26812
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26822
26813
  };
26823
26814
  }, [messageBus]);
26824
26815
  const schedule = (0, import_react98.useCallback)(
@@ -26917,8 +26908,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26917
26908
  const prev = prevMap.get(coreCall.request.callId);
26918
26909
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26919
26910
  let status = coreCall.status;
26920
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26921
- status = CoreToolCallStatus.Executing;
26911
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26912
+ status = "executing" /* Executing */;
26922
26913
  }
26923
26914
  return {
26924
26915
  ...coreCall,
@@ -26950,7 +26941,7 @@ function getBackgroundedToolInfo(toolCall) {
26950
26941
  };
26951
26942
  }
26952
26943
  function isBackgroundableExecutingToolCall(toolCall) {
26953
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26944
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26954
26945
  }
26955
26946
  function showCitations(settings) {
26956
26947
  const enabled = settings.merged.ui.showCitations;
@@ -26960,14 +26951,14 @@ function showCitations(settings) {
26960
26951
  return true;
26961
26952
  }
26962
26953
  function calculateStreamingState(isResponding, toolCalls) {
26963
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26954
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26964
26955
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26965
26956
  }
26966
26957
  const isAnyToolActive = toolCalls.some((tc) => {
26967
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26958
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26968
26959
  return true;
26969
26960
  }
26970
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26961
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26971
26962
  return !tc.responseSubmittedToGemini;
26972
26963
  }
26973
26964
  return false;
@@ -27013,9 +27004,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27013
27004
  }
27014
27005
  setRetryStatus(payload);
27015
27006
  };
27016
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
27007
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27017
27008
  return () => {
27018
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
27009
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27019
27010
  };
27020
27011
  }, [isRespondingRef]);
27021
27012
  const [
@@ -27148,12 +27139,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27148
27139
  const tc = toolCalls[i];
27149
27140
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27150
27141
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27151
- const isAgent = tc.tool?.kind === Kind.Agent;
27142
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
27152
27143
  if (isAgent) {
27153
27144
  let contigAgentsComplete = true;
27154
27145
  for (let j = i + 1; j < toolCalls.length; j++) {
27155
27146
  const nextTc = toolCalls[j];
27156
- if (nextTc.tool?.kind === Kind.Agent) {
27147
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
27157
27148
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27158
27149
  contigAgentsComplete = false;
27159
27150
  break;
@@ -27179,7 +27170,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27179
27170
  let currentGroup = [];
27180
27171
  for (const tc of toolsToPush) {
27181
27172
  newPushed.add(tc.request.callId);
27182
- if (tc.tool?.kind === Kind.Agent) {
27173
+ if (tc.tool?.kind === "agent" /* Agent */) {
27183
27174
  currentGroup.push(tc);
27184
27175
  } else {
27185
27176
  if (currentGroup.length > 0) {
@@ -27329,7 +27320,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27329
27320
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27330
27321
  }, [activeShellPtyId, addItem, setIsResponding]);
27331
27322
  (0, import_react99.useEffect)(() => {
27332
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27323
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27333
27324
  const lastUserMessageIndex = history.findLastIndex(
27334
27325
  (item) => item.type === "user" /* USER */
27335
27326
  );
@@ -27397,7 +27388,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27397
27388
  return;
27398
27389
  }
27399
27390
  const hasActiveTools = toolCalls.some(
27400
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27391
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27401
27392
  );
27402
27393
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27403
27394
  if (clearBuffer) {
@@ -27424,7 +27415,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27424
27415
  if (tool.name === SHELL_COMMAND_NAME) {
27425
27416
  return {
27426
27417
  ...tool,
27427
- status: CoreToolCallStatus.Cancelled,
27418
+ status: "cancelled" /* Cancelled */,
27428
27419
  resultDisplay: tool.resultDisplay
27429
27420
  };
27430
27421
  }
@@ -27489,7 +27480,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27489
27480
  let localQueryToSendToGemini = null;
27490
27481
  if (typeof query === "string") {
27491
27482
  const trimmedQuery = query.trim();
27492
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27483
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
27493
27484
  if (!shellModeActive) {
27494
27485
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27495
27486
  if (slashCommandResult) {
@@ -27645,7 +27636,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27645
27636
  if (pendingHistoryItemRef.current) {
27646
27637
  if (pendingHistoryItemRef.current.type === "tool_group") {
27647
27638
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27648
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27639
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27649
27640
  );
27650
27641
  const pendingItem = {
27651
27642
  ...pendingHistoryItemRef.current,
@@ -27891,15 +27882,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27891
27882
  let geminiMessageBuffer = "";
27892
27883
  const toolCallRequests = [];
27893
27884
  for await (const event of stream) {
27894
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27885
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27895
27886
  setThought(null);
27896
27887
  }
27897
27888
  switch (event.type) {
27898
- case GeminiEventType.Thought:
27889
+ case "thought" /* Thought */:
27899
27890
  setLastGeminiActivityTime(Date.now());
27900
27891
  handleThoughtEvent(event.value, userMessageTimestamp);
27901
27892
  break;
27902
- case GeminiEventType.Content:
27893
+ case "content" /* Content */:
27903
27894
  setLastGeminiActivityTime(Date.now());
27904
27895
  geminiMessageBuffer = handleContentEvent(
27905
27896
  event.value,
@@ -27907,16 +27898,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27907
27898
  userMessageTimestamp
27908
27899
  );
27909
27900
  break;
27910
- case GeminiEventType.ToolCallRequest:
27901
+ case "tool_call_request" /* ToolCallRequest */:
27911
27902
  toolCallRequests.push(event.value);
27912
27903
  break;
27913
- case GeminiEventType.UserCancelled:
27904
+ case "user_cancelled" /* UserCancelled */:
27914
27905
  handleUserCancelledEvent(userMessageTimestamp);
27915
27906
  break;
27916
- case GeminiEventType.Error:
27907
+ case "error" /* Error */:
27917
27908
  handleErrorEvent(event.value, userMessageTimestamp);
27918
27909
  break;
27919
- case GeminiEventType.AgentExecutionStopped:
27910
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
27920
27911
  handleAgentExecutionStoppedEvent(
27921
27912
  event.value.reason,
27922
27913
  userMessageTimestamp,
@@ -27924,7 +27915,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27924
27915
  event.value.contextCleared
27925
27916
  );
27926
27917
  break;
27927
- case GeminiEventType.AgentExecutionBlocked:
27918
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
27928
27919
  handleAgentExecutionBlockedEvent(
27929
27920
  event.value.reason,
27930
27921
  userMessageTimestamp,
@@ -27932,35 +27923,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27932
27923
  event.value.contextCleared
27933
27924
  );
27934
27925
  break;
27935
- case GeminiEventType.ChatCompressed:
27926
+ case "chat_compressed" /* ChatCompressed */:
27936
27927
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27937
27928
  break;
27938
- case GeminiEventType.ToolCallConfirmation:
27939
- case GeminiEventType.ToolCallResponse:
27929
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
27930
+ case "tool_call_response" /* ToolCallResponse */:
27940
27931
  break;
27941
- case GeminiEventType.MaxSessionTurns:
27932
+ case "max_session_turns" /* MaxSessionTurns */:
27942
27933
  handleMaxSessionTurnsEvent();
27943
27934
  break;
27944
- case GeminiEventType.ContextWindowWillOverflow:
27935
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27945
27936
  handleContextWindowWillOverflowEvent(
27946
27937
  event.value.estimatedRequestTokenCount,
27947
27938
  event.value.remainingTokenCount
27948
27939
  );
27949
27940
  break;
27950
- case GeminiEventType.Finished:
27941
+ case "finished" /* Finished */:
27951
27942
  handleFinishedEvent(event, userMessageTimestamp);
27952
27943
  break;
27953
- case GeminiEventType.Citation:
27944
+ case "citation" /* Citation */:
27954
27945
  handleCitationEvent(event.value, userMessageTimestamp);
27955
27946
  break;
27956
- case GeminiEventType.ModelInfo:
27947
+ case "model_info" /* ModelInfo */:
27957
27948
  handleChatModelEvent(event.value, userMessageTimestamp);
27958
27949
  break;
27959
- case GeminiEventType.LoopDetected:
27950
+ case "loop_detected" /* LoopDetected */:
27960
27951
  loopDetectedRef.current = true;
27961
27952
  break;
27962
- case GeminiEventType.Retry:
27963
- case GeminiEventType.InvalidStream:
27953
+ case "retry" /* Retry */:
27954
+ case "invalid_stream" /* InvalidStream */:
27964
27955
  break;
27965
27956
  default: {
27966
27957
  const unreachable = event;
@@ -28001,7 +27992,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28001
27992
  const submitQuery = (0, import_react99.useCallback)(
28002
27993
  async (query, options, prompt_id) => runInDevTraceSpan(
28003
27994
  {
28004
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
27995
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
28005
27996
  sessionId: config.getSessionId()
28006
27997
  },
28007
27998
  async ({ metadata: spanMetadata }) => {
@@ -28161,7 +28152,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28161
28152
  );
28162
28153
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28163
28154
  async (newApprovalMode) => {
28164
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28155
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28165
28156
  if (geminiClient) {
28166
28157
  try {
28167
28158
  await geminiClient.addHistory({
@@ -28184,11 +28175,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28184
28175
  }
28185
28176
  }
28186
28177
  previousApprovalModeRef.current = newApprovalMode;
28187
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28178
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28188
28179
  let awaitingApprovalCalls = toolCalls.filter(
28189
28180
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28190
28181
  );
28191
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28182
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28192
28183
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28193
28184
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28194
28185
  return true;
@@ -28204,11 +28195,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28204
28195
  if (call.correlationId) {
28205
28196
  try {
28206
28197
  await config.getMessageBus().publish({
28207
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28198
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28208
28199
  correlationId: call.correlationId,
28209
28200
  confirmed: true,
28210
28201
  requiresUserConfirmation: false,
28211
- outcome: ToolConfirmationOutcome.ProceedOnce
28202
+ outcome: "proceed_once" /* ProceedOnce */
28212
28203
  });
28213
28204
  } catch (error) {
28214
28205
  debugLogger.warn(
@@ -28277,14 +28268,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28277
28268
  );
28278
28269
  if (isLowErrorVerbosity) {
28279
28270
  suppressedToolErrorCountRef.current += geminiTools.filter(
28280
- (tc) => tc.status === CoreToolCallStatus.Error
28271
+ (tc) => tc.status === "error" /* Error */
28281
28272
  ).length;
28282
28273
  }
28283
28274
  if (geminiTools.length === 0) {
28284
28275
  return;
28285
28276
  }
28286
28277
  const stopExecutionTool = geminiTools.find(
28287
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28278
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28288
28279
  );
28289
28280
  if (stopExecutionTool && stopExecutionTool.response.error) {
28290
28281
  maybeAddSuppressedToolErrorNote();
@@ -28304,9 +28295,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28304
28295
  (tc) => !isTopicTool2(tc.request.name)
28305
28296
  );
28306
28297
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28307
- (tc) => tc.status === CoreToolCallStatus.Cancelled
28298
+ (tc) => tc.status === "cancelled" /* Cancelled */
28308
28299
  );
28309
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28300
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28310
28301
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28311
28302
  if (!turnCancelledRef.current) {
28312
28303
  addItem({
@@ -28386,7 +28377,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28386
28377
  return;
28387
28378
  }
28388
28379
  const restorableToolCalls = toolCalls.filter(
28389
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28380
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28390
28381
  );
28391
28382
  if (restorableToolCalls.length > 0) {
28392
28383
  if (!gitService) {
@@ -28609,14 +28600,14 @@ var useAgentStream = ({
28609
28600
  const displayName = legacyState?.displayName ?? event.name;
28610
28601
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28611
28602
  const desc = legacyState?.description ?? "";
28612
- const fallbackKind = Kind.Other;
28603
+ const fallbackKind = "other" /* Other */;
28613
28604
  const newCall = {
28614
28605
  callId: event.requestId,
28615
28606
  name: displayName,
28616
28607
  originalRequestName: event.name,
28617
28608
  description: desc,
28618
28609
  display: event.display,
28619
- status: CoreToolCallStatus.Scheduled,
28610
+ status: "scheduled" /* Scheduled */,
28620
28611
  isClientInitiated: false,
28621
28612
  renderOutputAsMarkdown: isOutputMarkdown,
28622
28613
  kind: legacyState?.kind ?? fallbackKind,
@@ -28634,10 +28625,10 @@ var useAgentStream = ({
28634
28625
  const evtStatus = legacyState?.status;
28635
28626
  let status = tc.status;
28636
28627
  if (evtStatus === "executing")
28637
- status = CoreToolCallStatus.Executing;
28638
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28628
+ status = "executing" /* Executing */;
28629
+ else if (evtStatus === "error") status = "error" /* Error */;
28639
28630
  else if (evtStatus === "success")
28640
- status = CoreToolCallStatus.Success;
28631
+ status = "success" /* Success */;
28641
28632
  const display = event.display?.result;
28642
28633
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28643
28634
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28670,7 +28661,7 @@ var useAgentStream = ({
28670
28661
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28671
28662
  return {
28672
28663
  ...tc,
28673
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28664
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28674
28665
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28675
28666
  resultDisplay,
28676
28667
  outputFile
@@ -28736,7 +28727,7 @@ var useAgentStream = ({
28736
28727
  if (!options?.isContinuation) {
28737
28728
  if (typeof query === "string") {
28738
28729
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28739
- void logger?.logMessage(MessageSenderType.USER, query);
28730
+ void logger?.logMessage("user" /* USER */, query);
28740
28731
  }
28741
28732
  startNewPrompt();
28742
28733
  }
@@ -30263,9 +30254,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30263
30254
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30264
30255
  async (choice) => {
30265
30256
  const trustLevelMap = {
30266
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30267
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30268
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30257
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30258
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30259
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30269
30260
  };
30270
30261
  const trustLevel = trustLevelMap[choice];
30271
30262
  if (!trustLevel) return;
@@ -30284,7 +30275,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30284
30275
  }, 100);
30285
30276
  return;
30286
30277
  }
30287
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30278
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30288
30279
  onTrustChange(currentIsTrusted);
30289
30280
  setIsTrusted(currentIsTrusted);
30290
30281
  const wasTrusted = isTrusted ?? false;
@@ -31292,7 +31283,7 @@ function useMessageQueue({
31292
31283
  var import_react107 = __toESM(require_react(), 1);
31293
31284
  function useMcpStatus(config) {
31294
31285
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31295
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31286
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31296
31287
  );
31297
31288
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31298
31289
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31305,12 +31296,12 @@ function useMcpStatus(config) {
31305
31296
  setMcpServerCount(manager.getMcpServerCount());
31306
31297
  }
31307
31298
  };
31308
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31299
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31309
31300
  return () => {
31310
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31301
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31311
31302
  };
31312
31303
  }, [config]);
31313
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31304
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31314
31305
  return {
31315
31306
  discoveryState,
31316
31307
  mcpServerCount,
@@ -31337,7 +31328,7 @@ function useApprovalModeIndicator({
31337
31328
  (key) => {
31338
31329
  let nextApprovalMode;
31339
31330
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31340
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31331
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31341
31332
  if (addItem) {
31342
31333
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31343
31334
  const adminSettings = config.getRemoteAdminSettings();
@@ -31355,21 +31346,21 @@ function useApprovalModeIndicator({
31355
31346
  }
31356
31347
  return;
31357
31348
  }
31358
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31349
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31359
31350
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31360
31351
  const currentMode = config.getApprovalMode();
31361
31352
  switch (currentMode) {
31362
- case ApprovalMode.DEFAULT:
31363
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31353
+ case "default" /* DEFAULT */:
31354
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31364
31355
  break;
31365
- case ApprovalMode.AUTO_EDIT:
31366
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31356
+ case "autoEdit" /* AUTO_EDIT */:
31357
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31367
31358
  break;
31368
- case ApprovalMode.PLAN:
31369
- nextApprovalMode = ApprovalMode.DEFAULT;
31359
+ case "plan" /* PLAN */:
31360
+ nextApprovalMode = "default" /* DEFAULT */;
31370
31361
  break;
31371
- case ApprovalMode.YOLO:
31372
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31362
+ case "yolo" /* YOLO */:
31363
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31373
31364
  break;
31374
31365
  default:
31375
31366
  }
@@ -31779,11 +31770,11 @@ var useHookDisplayState = () => {
31779
31770
  removeHook();
31780
31771
  }
31781
31772
  };
31782
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
31783
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31773
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31774
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31784
31775
  return () => {
31785
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
31786
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31776
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31777
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31787
31778
  activeTimeouts.forEach(clearTimeout);
31788
31779
  activeTimeouts.clear();
31789
31780
  };
@@ -32622,7 +32613,7 @@ var AppContainer = (props) => {
32622
32613
  setConfigInitialized(true);
32623
32614
  startupProfiler.flush(config);
32624
32615
  startAutoMemoryIfEnabled(config);
32625
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32616
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32626
32617
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32627
32618
  if (result) {
32628
32619
  const additionalContext = result.getAdditionalContext();
@@ -32649,7 +32640,7 @@ var AppContainer = (props) => {
32649
32640
  );
32650
32641
  const ideClient = await IdeClient.getInstance();
32651
32642
  await ideClient.disconnect();
32652
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32643
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32653
32644
  };
32654
32645
  registerCleanup(cleanupFn);
32655
32646
  return () => {
@@ -32674,11 +32665,11 @@ var AppContainer = (props) => {
32674
32665
  resetTime: payload.resetTime
32675
32666
  });
32676
32667
  };
32677
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32678
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32668
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32669
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32679
32670
  return () => {
32680
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32681
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32671
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32672
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32682
32673
  };
32683
32674
  }, [config]);
32684
32675
  (0, import_react121.useEffect)(() => {
@@ -32691,16 +32682,16 @@ var AppContainer = (props) => {
32691
32682
  const handleAgentsDiscovered = (payload) => {
32692
32683
  setNewAgents(payload.agents);
32693
32684
  };
32694
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32695
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32696
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32685
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32686
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32687
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32697
32688
  return () => {
32698
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32689
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32699
32690
  coreEvents.off(
32700
- CoreEvent.AdminSettingsChanged,
32691
+ "admin-settings-changed" /* AdminSettingsChanged */,
32701
32692
  handleAdminSettingsChanged
32702
32693
  );
32703
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32694
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32704
32695
  };
32705
32696
  }, [settings]);
32706
32697
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32765,11 +32756,11 @@ var AppContainer = (props) => {
32765
32756
  exitEditorDialog
32766
32757
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32767
32758
  (0, import_react121.useEffect)(() => {
32768
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32769
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32759
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32760
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32770
32761
  return () => {
32771
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32772
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32762
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32763
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32773
32764
  };
32774
32765
  }, [handleEditorClose, openEditorDialog]);
32775
32766
  (0, import_react121.useEffect)(() => {
@@ -32837,7 +32828,7 @@ var AppContainer = (props) => {
32837
32828
  errorVerbosity: settings.merged.ui.errorVerbosity
32838
32829
  });
32839
32830
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32840
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32831
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32841
32832
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32842
32833
  const { loadHistoryForResume, isResuming } = useSessionResume({
32843
32834
  config,
@@ -32865,7 +32856,7 @@ var AppContainer = (props) => {
32865
32856
  async (authType, scope) => {
32866
32857
  if (authType) {
32867
32858
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32868
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32859
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32869
32860
  setAuthContext({ requiresRestart: true });
32870
32861
  } else {
32871
32862
  setAuthContext({});
@@ -32893,7 +32884,7 @@ var AppContainer = (props) => {
32893
32884
  );
32894
32885
  return;
32895
32886
  }
32896
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32887
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32897
32888
  writeToStdout(`
32898
32889
  ----------------------------------------------------------------
32899
32890
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32916,7 +32907,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32916
32907
  }
32917
32908
  await saveApiKey(apiKey);
32918
32909
  await reloadApiKey();
32919
- await config.refreshAuth(AuthType.USE_GEMINI);
32910
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32920
32911
  setAuthState("authenticated" /* Authenticated */);
32921
32912
  } catch (e) {
32922
32913
  onAuthError(
@@ -32941,7 +32932,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32941
32932
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32942
32933
  );
32943
32934
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32944
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32935
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32945
32936
  return;
32946
32937
  }
32947
32938
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33077,9 +33068,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33077
33068
  }
33078
33069
  });
33079
33070
  };
33080
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33071
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33081
33072
  return () => {
33082
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33073
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33083
33074
  };
33084
33075
  }, []);
33085
33076
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33737,7 +33728,7 @@ ${queuedText}` : queuedText;
33737
33728
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33738
33729
  if (settings.merged.general.devtools) {
33739
33730
  void (async () => {
33740
- const { toggleDevToolsPanel } = await import("./devtoolsService-U7Z6S7CA.js");
33731
+ const { toggleDevToolsPanel } = await import("./devtoolsService-ORERBA72.js");
33741
33732
  await toggleDevToolsPanel(
33742
33733
  config,
33743
33734
  showErrorDetails,
@@ -33955,17 +33946,17 @@ ${queuedText}` : queuedText;
33955
33946
  Date.now()
33956
33947
  );
33957
33948
  };
33958
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33959
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33949
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33950
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33960
33951
  coreEvents.drainBacklogs();
33961
33952
  return () => {
33962
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33963
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33953
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33954
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33964
33955
  };
33965
33956
  }, [historyManager]);
33966
33957
  const nightly = props.version.includes("nightly");
33967
33958
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
33968
- const loginRestartMessage = settings.merged.security.auth.selectedType === AuthType.USE_VERTEX_AI ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
33959
+ const loginRestartMessage = settings.merged.security.auth.selectedType === "vertex-ai" /* USE_VERTEX_AI */ ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
33969
33960
  const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
33970
33961
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
33971
33962
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34065,9 +34056,9 @@ ${queuedText}` : queuedText;
34065
34056
  const handleMemoryChanged = (result) => {
34066
34057
  setGeminiMdFileCount(result.fileCount);
34067
34058
  };
34068
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34059
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34069
34060
  return () => {
34070
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34061
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34071
34062
  };
34072
34063
  }, []);
34073
34064
  (0, import_react121.useEffect)(() => {