@google/gemini-cli 0.71.0-nightly.20261123.geecccfcd5 → 0.72.0-preview.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 (74) hide show
  1. package/bundle/{chunk-74F5ZRXI.js → chunk-2LHOWVR4.js} +2 -2
  2. package/bundle/{chunk-NBZ3S2OI.js → chunk-357SHFSP.js} +1 -1
  3. package/bundle/{chunk-DNLZQS6M.js → chunk-5URPLR2H.js} +1 -1
  4. package/bundle/{chunk-6FOUJKOM.js → chunk-7554FKWM.js} +4 -4
  5. package/bundle/{chunk-YHOSX4HX.js → chunk-7ZTBMXIU.js} +2 -2
  6. package/bundle/{chunk-L2ISE4LK.js → chunk-AJWHZBWZ.js} +6 -8
  7. package/bundle/{chunk-66M6QVYR.js → chunk-BRYTKVAX.js} +4 -4
  8. package/bundle/{chunk-DWF6VLET.js → chunk-BZ5FSDRR.js} +3 -3
  9. package/bundle/{chunk-6MLLHGAR.js → chunk-CIX33OUZ.js} +2 -2
  10. package/bundle/{chunk-3IQPEEFT.js → chunk-DDPEWL4G.js} +1 -1
  11. package/bundle/{chunk-RJEQTG6S.js → chunk-DIMNI6AC.js} +2 -2
  12. package/bundle/{chunk-QADAHCRT.js → chunk-ENSJIXBN.js} +1 -1
  13. package/bundle/{chunk-L2B5JJZC.js → chunk-EUWUJXIY.js} +1 -1
  14. package/bundle/{chunk-BTUHEN4Y.js → chunk-IGFGTPGV.js} +1 -1
  15. package/bundle/{chunk-YYWNIP3F.js → chunk-JTWV2RYT.js} +1 -1
  16. package/bundle/{chunk-GNXMAFUR.js → chunk-MNOSCPOM.js} +7 -7
  17. package/bundle/{chunk-A3SNIZ4K.js → chunk-N4ZMA5CZ.js} +1 -1
  18. package/bundle/{chunk-BVNLNGFD.js → chunk-QESC7SGF.js} +7 -7
  19. package/bundle/{chunk-4DJQWGT3.js → chunk-SJKJH5QA.js} +1 -1
  20. package/bundle/{chunk-QWS2TBZG.js → chunk-SMYIRL3Y.js} +3 -3
  21. package/bundle/{chunk-3OVOJOQV.js → chunk-TLQ4STKV.js} +58 -71
  22. package/bundle/{chunk-YEEWGYBU.js → chunk-UUAR3JIA.js} +2 -2
  23. package/bundle/{chunk-EUUDSNXQ.js → chunk-WHSJKDVL.js} +1 -1
  24. package/bundle/{chunk-PL6IIPTX.js → chunk-XER4IQTC.js} +1 -1
  25. package/bundle/{chunk-NLZKOWER.js → chunk-Y2AE7RGI.js} +8 -9
  26. package/bundle/{chunk-6NXCSVSN.js → chunk-YFNHROPZ.js} +15422 -8067
  27. package/bundle/{chunk-SLTPPXVT.js → chunk-Z4LLSOJM.js} +3 -3
  28. package/bundle/{cleanup-JXHWEYF4.js → cleanup-A7CTJL7Z.js} +2 -2
  29. package/bundle/{cleanup-NXI65SJI.js → cleanup-ACKRM2TX.js} +2 -2
  30. package/bundle/{cleanup-PQFQN5PN.js → cleanup-DSTWENO3.js} +2 -2
  31. package/bundle/{dist-YWJAC3IM.js → core-3V44EMV6.js} +1 -1
  32. package/bundle/{core-DQSJHYG4.js → core-UF6OK2YN.js} +1 -1
  33. package/bundle/{devtoolsService-CVJOOHGM.js → devtoolsService-7MR7MUMD.js} +2 -2
  34. package/bundle/{devtoolsService-NOXMAH56.js → devtoolsService-NP7EGEMK.js} +2 -2
  35. package/bundle/{devtoolsService-UZFFGBEG.js → devtoolsService-Q5HYPUU7.js} +3 -4
  36. package/bundle/{dist-G5K3DGI7.js → dist-J3MSC3FF.js} +1 -1
  37. package/bundle/{formatError-CAMIQWHM.js → formatError-EFFRJTZP.js} +2 -2
  38. package/bundle/{formatError-PB6SEHWE.js → formatError-RG2BTO6O.js} +2 -2
  39. package/bundle/{formatError-Q33TSKEK.js → formatError-RZ6FNHFK.js} +2 -2
  40. package/bundle/{gemini-QKY2KKYF.js → gemini-5N7SJRYD.js} +208 -224
  41. package/bundle/{gemini-TQYJRVJP.js → gemini-DQYZ2M5M.js} +14 -14
  42. package/bundle/{gemini-OAKFBKMR.js → gemini-NGMQM6D3.js} +15 -15
  43. package/bundle/gemini.js +8 -8
  44. package/bundle/{interactiveCli-L5IOZTYF.js → interactiveCli-3QAMPJPK.js} +8 -8
  45. package/bundle/{interactiveCli-3FEZU7GJ.js → interactiveCli-DBUWQW3L.js} +300 -319
  46. package/bundle/{interactiveCli-W4IK4C6F.js → interactiveCli-M2IE6ZF4.js} +8 -8
  47. package/bundle/{liteRtServerManager-7GQLUYCC.js → liteRtServerManager-LX6B5CI3.js} +4 -4
  48. package/bundle/{liteRtServerManager-GSYRGOB6.js → liteRtServerManager-TI6LO5RU.js} +4 -4
  49. package/bundle/{liteRtServerManager-TVKXINGU.js → liteRtServerManager-TW3MMGOA.js} +4 -4
  50. package/bundle/{oauth2-provider-XADKJYM3.js → oauth2-provider-2JRAM5FI.js} +1 -1
  51. package/bundle/{oauth2-provider-JAYH53PG.js → oauth2-provider-3PBBHV75.js} +1 -1
  52. package/bundle/{oauth2-provider-LZKJKLFG.js → oauth2-provider-PG5AFZDD.js} +79 -41
  53. package/bundle/{start-4GERR54C.js → start-2XM3XTTW.js} +6 -6
  54. package/bundle/{start-5Q2AJMC5.js → start-HGHTVHPT.js} +6 -6
  55. package/bundle/{start-7ZXOELXX.js → start-TDNB5CJ6.js} +6 -6
  56. package/package.json +1 -1
  57. package/bundle/chunk-5VAAW2SW.js +0 -118
  58. package/bundle/chunk-CPZ55WK4.js +0 -40031
  59. package/bundle/chunk-GPIHTZ7M.js +0 -190
  60. package/bundle/chunk-IOX7QOR4.js +0 -1962
  61. package/bundle/chunk-M2J4XK5W.js +0 -60338
  62. package/bundle/chunk-OSBXDFYN.js +0 -512
  63. package/bundle/chunk-TE62WOO3.js +0 -65
  64. package/bundle/chunk-VTIY77BF.js +0 -1571
  65. package/bundle/chunk-Y3VJ5NLZ.js +0 -420386
  66. package/bundle/cleanup-UNQWTWUR.js +0 -34
  67. package/bundle/devtoolsService-OCTFSUNQ.js +0 -919
  68. package/bundle/dist-GPX2ZA4V.js +0 -2372
  69. package/bundle/formatError-QRSNJJ27.js +0 -14
  70. package/bundle/gemini-Z66TS6IL.js +0 -20021
  71. package/bundle/interactiveCli-DBDBYD65.js +0 -36447
  72. package/bundle/liteRtServerManager-YUBDDMLI.js +0 -65
  73. package/bundle/oauth2-provider-ZOXGSM7Y.js +0 -273
  74. package/bundle/start-O7HDURUW.js +0 -18
@@ -149,10 +149,10 @@ import {
149
149
  useUIState,
150
150
  useVimMode,
151
151
  validateAuthMethod
152
- } from "./chunk-GNXMAFUR.js";
152
+ } from "./chunk-TLQ4STKV.js";
153
153
  import {
154
154
  require_source
155
- } from "./chunk-L2B5JJZC.js";
155
+ } from "./chunk-SJKJH5QA.js";
156
156
  import {
157
157
  appEvents
158
158
  } from "./chunk-5PS3AYFU.js";
@@ -226,38 +226,34 @@ import {
226
226
  widestLineFromStyledChars,
227
227
  wordBreakStyledChars,
228
228
  wrapStyledChars
229
- } from "./chunk-YHOSX4HX.js";
229
+ } from "./chunk-AJWHZBWZ.js";
230
230
  import {
231
231
  handleAutoUpdate,
232
232
  isDevelopment,
233
233
  relaunchApp,
234
234
  require_semver,
235
235
  setUpdateHandler
236
- } from "./chunk-6MLLHGAR.js";
236
+ } from "./chunk-DIMNI6AC.js";
237
237
  import {
238
238
  isTodoList,
239
239
  mapCoreStatusToDisplayStatus,
240
240
  require_react
241
- } from "./chunk-NBZ3S2OI.js";
241
+ } from "./chunk-JTWV2RYT.js";
242
242
  import {
243
243
  registerCleanup,
244
244
  removeCleanup,
245
245
  runExitCleanup,
246
246
  setupTtyCheck
247
- } from "./chunk-BTUHEN4Y.js";
247
+ } from "./chunk-WHSJKDVL.js";
248
248
  import {
249
249
  ACTIVATE_SKILL_TOOL_NAME,
250
250
  AGENT_TOOL_NAME,
251
251
  ApiKeyUpdatedEvent,
252
- ApprovalMode,
253
252
  AsyncFzf,
254
253
  AudioRecorder,
255
254
  AuthType,
256
255
  ChangeAuthRequestedError,
257
- CompressionStatus,
258
256
  ConversationFinishedEvent,
259
- CoreEvent,
260
- CoreToolCallStatus,
261
257
  CreditPurchaseClickEvent,
262
258
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
263
259
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -280,21 +276,14 @@ import {
280
276
  GEMMA_4_31B_IT_MODEL,
281
277
  GLOB_DISPLAY_NAME,
282
278
  GREP_DISPLAY_NAME,
283
- GeminiCliOperation,
284
- GeminiEventType,
285
279
  GitService,
286
280
  INTERACTIVE_GEMINI_SHELL_ERROR,
287
281
  IdeClient,
288
- Kind,
289
282
  LS_DISPLAY_NAME,
290
283
  LegacyAgentProtocol,
291
284
  LlmRole,
292
285
  Logger,
293
286
  MAX_TOKENS_EXCEEDED_SUGGESTION,
294
- MCPDiscoveryState,
295
- MCPServerStatus,
296
- MessageBusType,
297
- MessageSenderType,
298
287
  ModelNotFoundError,
299
288
  ModelSlashCommandEvent,
300
289
  OTHER_BLOCKED_MESSAGE,
@@ -307,7 +296,6 @@ import {
307
296
  PREVIEW_GEMINI_MODEL,
308
297
  PolicyIntegrityManager,
309
298
  ProjectIdRequiredError,
310
- QuestionType,
311
299
  READ_FILE_DISPLAY_NAME,
312
300
  READ_MANY_FILES_DISPLAY_NAME,
313
301
  RECITATION_BLOCKED_MESSAGE,
@@ -316,22 +304,16 @@ import {
316
304
  SAFETY_BLOCKED_MESSAGE,
317
305
  SHELL_TOOL_NAME,
318
306
  Scheduler,
319
- SessionEndReason,
320
- SessionStartSource,
321
307
  ShellExecutionService,
322
308
  SlashCommandStatus,
323
309
  Storage,
324
- SubagentState,
325
310
  THINKING_ONLY_COMPRESS_SUGGESTION,
326
311
  TOPIC_PARAM_STRATEGIC_INTENT,
327
312
  TOPIC_PARAM_SUMMARY,
328
313
  TOPIC_PARAM_TITLE,
329
314
  TRUE_EMPTY_RESPONSE_MESSAGE,
330
315
  TerminalQuotaError,
331
- ToolConfirmationOutcome,
332
- ToolErrorType,
333
316
  TranscriptionFactory,
334
- TrustLevel,
335
317
  UPDATE_TOPIC_DISPLAY_NAME,
336
318
  UPDATE_TOPIC_TOOL_NAME,
337
319
  UnauthorizedError,
@@ -344,7 +326,6 @@ import {
344
326
  WEB_FETCH_DISPLAY_NAME,
345
327
  WEB_SEARCH_DISPLAY_NAME,
346
328
  WRITE_FILE_DISPLAY_NAME,
347
- WarningPriority,
348
329
  WhisperModelManager,
349
330
  addCalendarDays,
350
331
  addMCPStatusChangeListener,
@@ -466,7 +447,7 @@ import {
466
447
  validatePlanContent,
467
448
  validatePlanPath,
468
449
  writeToStdout
469
- } from "./chunk-6NXCSVSN.js";
450
+ } from "./chunk-YFNHROPZ.js";
470
451
  import "./chunk-W2AJR23G.js";
471
452
  import "./chunk-N7J54YNL.js";
472
453
  import "./chunk-L6PII3GR.js";
@@ -5093,7 +5074,7 @@ function calculateShellMaxLines(options) {
5093
5074
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5094
5075
  return maxLinesBasedOnHeight;
5095
5076
  }
5096
- const isExecuting = status === CoreToolCallStatus.Executing;
5077
+ const isExecuting = status === "executing" /* Executing */;
5097
5078
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5098
5079
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5099
5080
  }
@@ -5129,13 +5110,13 @@ var formatToolArgs = (args) => {
5129
5110
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5130
5111
  let headerText;
5131
5112
  let headerColor = theme.text.secondary;
5132
- if (progress.state === SubagentState.CANCELLED) {
5113
+ if (progress.state === "cancelled" /* CANCELLED */) {
5133
5114
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5134
5115
  headerColor = theme.status.warning;
5135
- } else if (progress.state === SubagentState.ERROR) {
5116
+ } else if (progress.state === "error" /* ERROR */) {
5136
5117
  headerText = `Subagent ${progress.agentName} failed.`;
5137
5118
  headerColor = theme.status.error;
5138
- } else if (progress.state === SubagentState.COMPLETED) {
5119
+ } else if (progress.state === "completed" /* COMPLETED */) {
5139
5120
  headerText = `Subagent ${progress.agentName} completed.`;
5140
5121
  headerColor = theme.status.success;
5141
5122
  } else {
@@ -5155,7 +5136,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5155
5136
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color, children: item.content }) })
5156
5137
  ] }, item.id);
5157
5138
  } else if (item.type === "tool_call") {
5158
- const statusSymbol = item.status === SubagentState.RUNNING ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(build_default, { type: "dots" }) : item.status === SubagentState.COMPLETED ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === SubagentState.CANCELLED ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5139
+ const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5159
5140
  const formattedArgs = item.description || formatToolArgs(item.args);
5160
5141
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5161
5142
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5166,7 +5147,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5166
5147
  {
5167
5148
  bold: true,
5168
5149
  color: theme.text.primary,
5169
- strikethrough: item.status === SubagentState.CANCELLED,
5150
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5170
5151
  children: item.displayName || item.content
5171
5152
  }
5172
5153
  ),
@@ -5175,7 +5156,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5175
5156
  {
5176
5157
  color: theme.text.secondary,
5177
5158
  wrap: "truncate",
5178
- strikethrough: item.status === SubagentState.CANCELLED,
5159
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5179
5160
  children: displayArgs
5180
5161
  }
5181
5162
  ) })
@@ -5195,7 +5176,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5195
5176
  MarkdownDisplay,
5196
5177
  {
5197
5178
  text: safeJsonToMarkdown(progress.result),
5198
- isPending: progress.state !== SubagentState.COMPLETED,
5179
+ isPending: progress.state !== "completed" /* COMPLETED */,
5199
5180
  terminalWidth
5200
5181
  }
5201
5182
  )
@@ -5556,7 +5537,7 @@ var ToolActionsProvider = (props) => {
5556
5537
  }
5557
5538
  const details = tool.confirmationDetails;
5558
5539
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5559
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5540
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5560
5541
  if (ideClient) {
5561
5542
  void ideClient.resolveDiffFromCli(details.filePath, cliOutcome)?.catch((error) => {
5562
5543
  debugLogger.error(
@@ -5568,9 +5549,9 @@ var ToolActionsProvider = (props) => {
5568
5549
  }
5569
5550
  if (tool.correlationId) {
5570
5551
  await config.getMessageBus().publish({
5571
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5552
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5572
5553
  correlationId: tool.correlationId,
5573
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5554
+ confirmed: outcome !== "cancel" /* Cancel */,
5574
5555
  requiresUserConfirmation: false,
5575
5556
  outcome,
5576
5557
  payload
@@ -5589,7 +5570,7 @@ var ToolActionsProvider = (props) => {
5589
5570
  );
5590
5571
  const cancel = (0, import_react10.useCallback)(
5591
5572
  async (callId) => {
5592
- await confirm(callId, ToolConfirmationOutcome.Cancel);
5573
+ await confirm(callId, "cancel" /* Cancel */);
5593
5574
  },
5594
5575
  [confirm]
5595
5576
  );
@@ -5710,7 +5691,7 @@ var ToolMessage = ({
5710
5691
  paddingX: 1,
5711
5692
  flexDirection: "column",
5712
5693
  children: [
5713
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5694
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5714
5695
  McpProgressIndicator,
5715
5696
  {
5716
5697
  progress,
@@ -5727,8 +5708,8 @@ var ToolMessage = ({
5727
5708
  terminalWidth: safeTerminalWidth,
5728
5709
  renderOutputAsMarkdown,
5729
5710
  hasFocus: isThisShellFocused2,
5730
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5731
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5711
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5712
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5732
5713
  }
5733
5714
  ),
5734
5715
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -6044,7 +6025,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6044
6025
  settings.merged,
6045
6026
  process3.cwd()
6046
6027
  );
6047
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6028
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6048
6029
  return {
6049
6030
  currentTrustLevel: explicitTrustLevel,
6050
6031
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6089,7 +6070,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6089
6070
  process3.cwd(),
6090
6071
  newConfig
6091
6072
  );
6092
- if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6073
+ if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6093
6074
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6094
6075
  if (source === "file") {
6095
6076
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6163,18 +6144,18 @@ function PermissionsModifyTrustDialog({
6163
6144
  const TRUST_LEVEL_ITEMS = [
6164
6145
  {
6165
6146
  label: `Trust this folder (${dirName})`,
6166
- value: TrustLevel.TRUST_FOLDER,
6167
- key: TrustLevel.TRUST_FOLDER
6147
+ value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6148
+ key: "TRUST_FOLDER" /* TRUST_FOLDER */
6168
6149
  },
6169
6150
  {
6170
6151
  label: `Trust parent folder (${parentFolder})`,
6171
- value: TrustLevel.TRUST_PARENT,
6172
- key: TrustLevel.TRUST_PARENT
6152
+ value: "TRUST_PARENT" /* TRUST_PARENT */,
6153
+ key: "TRUST_PARENT" /* TRUST_PARENT */
6173
6154
  },
6174
6155
  {
6175
6156
  label: "Don't trust",
6176
- value: TrustLevel.DO_NOT_TRUST,
6177
- key: TrustLevel.DO_NOT_TRUST
6157
+ value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6158
+ key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6178
6159
  }
6179
6160
  ];
6180
6161
  const {
@@ -6415,7 +6396,7 @@ var ShellToolMessage = ({
6415
6396
  maxLinesLimit: maxLines
6416
6397
  });
6417
6398
  import_react15.default.useEffect(() => {
6418
- const isExecuting = status === CoreToolCallStatus.Executing;
6399
+ const isExecuting = status === "executing" /* Executing */;
6419
6400
  if (isExecuting && ptyId) {
6420
6401
  try {
6421
6402
  const childWidth = safeTerminalWidth - 4;
@@ -6629,13 +6610,13 @@ var SubagentGroupDisplay = ({
6629
6610
  const singleAgent = toolCalls[0].resultDisplay;
6630
6611
  if (isSubagentProgress(singleAgent)) {
6631
6612
  switch (singleAgent.state) {
6632
- case SubagentState.COMPLETED:
6613
+ case "completed" /* COMPLETED */:
6633
6614
  headerText = "Agent Completed";
6634
6615
  break;
6635
- case SubagentState.CANCELLED:
6616
+ case "cancelled" /* CANCELLED */:
6636
6617
  headerText = "Agent Cancelled";
6637
6618
  break;
6638
- case SubagentState.ERROR:
6619
+ case "error" /* ERROR */:
6639
6620
  headerText = "Agent Error";
6640
6621
  break;
6641
6622
  default:
@@ -6651,8 +6632,8 @@ var SubagentGroupDisplay = ({
6651
6632
  for (const tc of toolCalls) {
6652
6633
  const progress = tc.resultDisplay;
6653
6634
  if (isSubagentProgress(progress)) {
6654
- if (progress.state === SubagentState.COMPLETED) completedCount++;
6655
- else if (progress.state === SubagentState.RUNNING) runningCount++;
6635
+ if (progress.state === "completed" /* COMPLETED */) completedCount++;
6636
+ else if (progress.state === "running" /* RUNNING */) runningCount++;
6656
6637
  } else {
6657
6638
  runningCount++;
6658
6639
  }
@@ -6731,7 +6712,7 @@ var SubagentGroupDisplay = ({
6731
6712
  if (!isExpanded) {
6732
6713
  let content = "Starting...";
6733
6714
  let formattedArgs;
6734
- if (progress.state === SubagentState.COMPLETED) {
6715
+ if (progress.state === "completed" /* COMPLETED */) {
6735
6716
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6736
6717
  content = `Finished Early (${progress.terminateReason})`;
6737
6718
  } else {
@@ -6745,17 +6726,17 @@ var SubagentGroupDisplay = ({
6745
6726
  formattedArgs = formatToolArgs(lastActivity.args);
6746
6727
  }
6747
6728
  }
6748
- const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6729
+ const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6749
6730
  const renderStatusIcon = () => {
6750
- const state = progress.state ?? SubagentState.RUNNING;
6731
+ const state = progress.state ?? "running" /* RUNNING */;
6751
6732
  switch (state) {
6752
- case SubagentState.RUNNING:
6733
+ case "running" /* RUNNING */:
6753
6734
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: "!" });
6754
- case SubagentState.COMPLETED:
6735
+ case "completed" /* COMPLETED */:
6755
6736
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6756
- case SubagentState.CANCELLED:
6737
+ case "cancelled" /* CANCELLED */:
6757
6738
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6758
- case SubagentState.ERROR:
6739
+ case "error" /* ERROR */:
6759
6740
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6760
6741
  default:
6761
6742
  return checkExhaustive(state);
@@ -6834,7 +6815,7 @@ function mapToDisplay(toolOrTools, options = {}) {
6834
6815
  let description;
6835
6816
  let renderOutputAsMarkdown = false;
6836
6817
  const displayName = call.tool?.displayName ?? call.request.name;
6837
- if (call.status === CoreToolCallStatus.Error) {
6818
+ if (call.status === "error" /* Error */) {
6838
6819
  description = JSON.stringify(call.request.args);
6839
6820
  } else {
6840
6821
  description = call.invocation.getDescription();
@@ -6857,27 +6838,27 @@ function mapToDisplay(toolOrTools, options = {}) {
6857
6838
  let progress = void 0;
6858
6839
  let progressTotal = void 0;
6859
6840
  switch (call.status) {
6860
- case CoreToolCallStatus.Success:
6841
+ case "success" /* Success */:
6861
6842
  resultDisplay = call.response.resultDisplay;
6862
6843
  outputFile = call.response.outputFile;
6863
6844
  break;
6864
- case CoreToolCallStatus.Error:
6865
- case CoreToolCallStatus.Cancelled:
6845
+ case "error" /* Error */:
6846
+ case "cancelled" /* Cancelled */:
6866
6847
  resultDisplay = call.response.resultDisplay;
6867
6848
  break;
6868
- case CoreToolCallStatus.AwaitingApproval:
6849
+ case "awaiting_approval" /* AwaitingApproval */:
6869
6850
  correlationId = call.correlationId;
6870
6851
  confirmationDetails = call.confirmationDetails;
6871
6852
  break;
6872
- case CoreToolCallStatus.Executing:
6853
+ case "executing" /* Executing */:
6873
6854
  resultDisplay = call.liveOutput;
6874
6855
  ptyId = call.pid;
6875
6856
  progressMessage = call.progressMessage;
6876
6857
  progress = call.progress;
6877
6858
  progressTotal = call.progressTotal;
6878
6859
  break;
6879
- case CoreToolCallStatus.Scheduled:
6880
- case CoreToolCallStatus.Validating:
6860
+ case "scheduled" /* Scheduled */:
6861
+ case "validating" /* Validating */:
6881
6862
  break;
6882
6863
  default: {
6883
6864
  const exhaustiveCheck = call;
@@ -6929,22 +6910,22 @@ var PAYLOAD_MAX_WIDTH = 120 + PAYLOAD_BORDER_CHROME_WIDTH;
6929
6910
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6930
6911
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6931
6912
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6932
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6913
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6933
6914
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6934
6915
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6935
6916
  const showDiffStat = !!diff.diffStat;
6936
6917
  const description = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
6937
6918
  let resultSummary = "";
6938
6919
  let resultColor = theme.text.secondary;
6939
- if (status === CoreToolCallStatus.AwaitingApproval) {
6920
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
6940
6921
  resultSummary = "Confirming";
6941
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6922
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6942
6923
  resultSummary = "Accepted";
6943
6924
  resultColor = theme.text.accent;
6944
- } else if (status === CoreToolCallStatus.Cancelled) {
6925
+ } else if (status === "cancelled" /* Cancelled */) {
6945
6926
  resultSummary = "Rejected";
6946
6927
  resultColor = theme.status.error;
6947
- } else if (status === CoreToolCallStatus.Error) {
6928
+ } else if (status === "error" /* Error */) {
6948
6929
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6949
6930
  resultColor = theme.status.error;
6950
6931
  }
@@ -6975,7 +6956,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6975
6956
  filename: diff.fileName,
6976
6957
  terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
6977
6958
  availableTerminalHeight,
6978
- disableColor: status === CoreToolCallStatus.Cancelled
6959
+ disableColor: status === "cancelled" /* Cancelled */
6979
6960
  }
6980
6961
  );
6981
6962
  return { description, summary, payload };
@@ -7095,10 +7076,10 @@ var DenseToolMessage = (props) => {
7095
7076
  if (isGrepResult(resultDisplay)) {
7096
7077
  return getGenericSuccessData(resultDisplay, originalDescription);
7097
7078
  }
7098
- if (status === CoreToolCallStatus.Success && resultDisplay) {
7079
+ if (status === "success" /* Success */ && resultDisplay) {
7099
7080
  return getGenericSuccessData(resultDisplay, originalDescription);
7100
7081
  }
7101
- if (status === CoreToolCallStatus.Error) {
7082
+ if (status === "error" /* Error */) {
7102
7083
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7103
7084
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7104
7085
  "\u2192 ",
@@ -7150,7 +7131,7 @@ var DenseToolMessage = (props) => {
7150
7131
  language: fileExtension,
7151
7132
  maxWidth: safeContentWidth,
7152
7133
  settings,
7153
- disableColor: status === CoreToolCallStatus.Cancelled,
7134
+ disableColor: status === "cancelled" /* Cancelled */,
7154
7135
  returnLines: true
7155
7136
  });
7156
7137
  } else {
@@ -7158,7 +7139,7 @@ var DenseToolMessage = (props) => {
7158
7139
  parsedLines,
7159
7140
  filename: diff.fileName,
7160
7141
  terminalWidth: safeContentWidth,
7161
- disableColor: status === CoreToolCallStatus.Cancelled
7142
+ disableColor: status === "cancelled" /* Cancelled */
7162
7143
  });
7163
7144
  }
7164
7145
  }, [diff, isExpanded, isAlternateBuffer, safeContentWidth, settings, status]);
@@ -7290,7 +7271,7 @@ function isToolExecuting(pendingHistoryItems) {
7290
7271
  return pendingHistoryItems.some((item) => {
7291
7272
  if (item && item.type === "tool_group") {
7292
7273
  return item.tools.some(
7293
- (tool) => CoreToolCallStatus.Executing === tool.status
7274
+ (tool) => "executing" /* Executing */ === tool.status
7294
7275
  );
7295
7276
  }
7296
7277
  return false;
@@ -7299,7 +7280,7 @@ function isToolExecuting(pendingHistoryItems) {
7299
7280
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7300
7281
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7301
7282
  (item) => item.tools.some(
7302
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7283
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7303
7284
  )
7304
7285
  );
7305
7286
  }
@@ -7376,7 +7357,7 @@ var ToolGroupMessage = ({
7376
7357
  const groupedTools = (0, import_react19.useMemo)(() => {
7377
7358
  const groups = [];
7378
7359
  for (const tool of visibleToolCalls) {
7379
- if (tool.kind === Kind.Agent) {
7360
+ if (tool.kind === "agent" /* Agent */) {
7380
7361
  const lastGroup = groups[groups.length - 1];
7381
7362
  if (Array.isArray(lastGroup)) {
7382
7363
  lastGroup.push(tool);
@@ -7431,7 +7412,7 @@ var ToolGroupMessage = ({
7431
7412
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7432
7413
  let countToolCallsWithResults = 0;
7433
7414
  for (const tool of visibleToolCalls) {
7434
- if (tool.kind !== Kind.Agent) {
7415
+ if (tool.kind !== "agent" /* Agent */) {
7435
7416
  if (isCompactTool(tool, isCompactModeEnabled)) {
7436
7417
  if (tool.hasDensePayload ?? hasDensePayload(tool)) {
7437
7418
  countToolCallsWithResults++;
@@ -7622,7 +7603,7 @@ var ToolGroupDisplay = ({
7622
7603
  }
7623
7604
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7624
7605
  const visibleTools = tools.filter(
7625
- (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7606
+ (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7626
7607
  );
7627
7608
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7628
7609
  const otherTools = visibleTools.filter(
@@ -7824,18 +7805,18 @@ function CompressionMessage({
7824
7805
  return "Compressing chat history";
7825
7806
  }
7826
7807
  switch (compressionStatus) {
7827
- case CompressionStatus.COMPRESSED:
7808
+ case 1 /* COMPRESSED */:
7828
7809
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7829
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7810
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7830
7811
  if (originalTokens < 5e4) {
7831
7812
  return "Compression was not beneficial for this history size.";
7832
7813
  }
7833
7814
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7834
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7815
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7835
7816
  return "Could not compress chat history due to a token counting error.";
7836
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7817
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7837
7818
  return "Chat history compression failed: the model returned an empty summary.";
7838
- case CompressionStatus.NOOP:
7819
+ case 5 /* NOOP */:
7839
7820
  return "Nothing to compress.";
7840
7821
  default:
7841
7822
  return "";
@@ -8273,8 +8254,8 @@ var ModelUsageTable = ({ models }) => {
8273
8254
  );
8274
8255
  roleEntries.sort(([a], [b]) => {
8275
8256
  if (a === b) return 0;
8276
- if (a === LlmRole.MAIN) return -1;
8277
- if (b === LlmRole.MAIN) return 1;
8257
+ if (a === "main" /* MAIN */) return -1;
8258
+ if (b === "main" /* MAIN */) return 1;
8278
8259
  return a.localeCompare(b);
8279
8260
  });
8280
8261
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8605,8 +8586,8 @@ var ModelStatsDisplay = ({
8605
8586
  return validRoles.includes(role);
8606
8587
  }).sort((a, b) => {
8607
8588
  if (a === b) return 0;
8608
- if (a === LlmRole.MAIN) return -1;
8609
- if (b === LlmRole.MAIN) return 1;
8589
+ if (a === "main" /* MAIN */) return -1;
8590
+ if (b === "main" /* MAIN */) return 1;
8610
8591
  return a.localeCompare(b);
8611
8592
  });
8612
8593
  const createRow = (metric, getValue, options = {}) => {
@@ -9751,7 +9732,7 @@ var McpStatus = ({
9751
9732
  );
9752
9733
  const originalStatus = serverStatus(serverName);
9753
9734
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9754
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9735
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9755
9736
  let statusIndicator = "";
9756
9737
  let statusText = "";
9757
9738
  let statusColor = theme.text.primary;
@@ -9763,17 +9744,17 @@ var McpStatus = ({
9763
9744
  statusColor = theme.text.secondary;
9764
9745
  } else {
9765
9746
  switch (status) {
9766
- case MCPServerStatus.CONNECTED:
9747
+ case "connected" /* CONNECTED */:
9767
9748
  statusIndicator = "\u{1F7E2}";
9768
9749
  statusText = "Ready";
9769
9750
  statusColor = theme.status.success;
9770
9751
  break;
9771
- case MCPServerStatus.CONNECTING:
9752
+ case "connecting" /* CONNECTING */:
9772
9753
  statusIndicator = "\u{1F504}";
9773
9754
  statusText = "Starting... (first startup may take longer)";
9774
9755
  statusColor = theme.status.warning;
9775
9756
  break;
9776
- case MCPServerStatus.DISCONNECTED:
9757
+ case "disconnected" /* DISCONNECTED */:
9777
9758
  default:
9778
9759
  statusIndicator = "\u{1F534}";
9779
9760
  statusText = "Disconnected";
@@ -9821,12 +9802,12 @@ var McpStatus = ({
9821
9802
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9822
9803
  " - ",
9823
9804
  statusText,
9824
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9805
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9825
9806
  ] }),
9826
9807
  authStatusNode
9827
9808
  ] }),
9828
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9829
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9809
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9810
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9830
9811
  " (",
9831
9812
  toolCount,
9832
9813
  " tools cached)"
@@ -10404,7 +10385,7 @@ var Notifications = () => {
10404
10385
  if (dismissed) return [];
10405
10386
  const counts = persistentState.get("startupWarningCounts") || {};
10406
10387
  return startupWarnings.filter((w) => {
10407
- if (w.priority === WarningPriority.Low) {
10388
+ if (w.priority === "low" /* Low */) {
10408
10389
  const count = counts[w.id] || 0;
10409
10390
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10410
10391
  }
@@ -10417,7 +10398,7 @@ var Notifications = () => {
10417
10398
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10418
10399
  let changed = false;
10419
10400
  visibleWarnings.forEach((w) => {
10420
- if (w.priority === WarningPriority.Low) {
10401
+ if (w.priority === "low" /* Low */) {
10421
10402
  counts[w.id] = (counts[w.id] || 0) + 1;
10422
10403
  changed = true;
10423
10404
  }
@@ -10524,7 +10505,7 @@ var UserIdentity = ({ config }) => {
10524
10505
  }
10525
10506
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
10526
10507
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
10527
- /* @__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: [
10508
+ /* @__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: [
10528
10509
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
10529
10510
  "Signed in with Google",
10530
10511
  email ? ":" : ""
@@ -10916,7 +10897,7 @@ var import_react31 = __toESM(require_react(), 1);
10916
10897
  function getConfirmingToolState(pendingHistoryItems) {
10917
10898
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10918
10899
  const confirmingTools = allPendingTools.filter(
10919
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10900
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10920
10901
  );
10921
10902
  if (confirmingTools.length === 0) {
10922
10903
  return null;
@@ -12226,7 +12207,7 @@ var ExitPlanModeDialog = ({
12226
12207
  {
12227
12208
  questions: [
12228
12209
  {
12229
- type: QuestionType.CHOICE,
12210
+ type: "choice" /* CHOICE */,
12230
12211
  header: "Approval",
12231
12212
  question: planContent,
12232
12213
  options: [
@@ -12247,9 +12228,9 @@ var ExitPlanModeDialog = ({
12247
12228
  onSubmit: (answers) => {
12248
12229
  const answer = answers["0"];
12249
12230
  if (answer === "Yes, automatically accept edits" /* Auto */) {
12250
- onApprove(ApprovalMode.AUTO_EDIT);
12231
+ onApprove("autoEdit" /* AUTO_EDIT */);
12251
12232
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
12252
- onApprove(ApprovalMode.DEFAULT);
12233
+ onApprove("default" /* DEFAULT */);
12253
12234
  } else if (answer) {
12254
12235
  onFeedback(answer);
12255
12236
  }
@@ -12462,7 +12443,7 @@ ${deceptiveUrlWarnings.map(
12462
12443
  (0, import_react36.useEffect)(() => {
12463
12444
  if (isCancelling) {
12464
12445
  setIsCancelling(false);
12465
- handleConfirm(ToolConfirmationOutcome.Cancel);
12446
+ handleConfirm("cancel" /* Cancel */);
12466
12447
  }
12467
12448
  }, [isCancelling, handleConfirm]);
12468
12449
  const handleSelect = (0, import_react36.useCallback)(
@@ -12475,19 +12456,19 @@ ${deceptiveUrlWarnings.map(
12475
12456
  if (!confirmationDetails.isModifying) {
12476
12457
  options2.push({
12477
12458
  label: "Allow once",
12478
- value: ToolConfirmationOutcome.ProceedOnce,
12459
+ value: "proceed_once" /* ProceedOnce */,
12479
12460
  key: "Allow once"
12480
12461
  });
12481
12462
  if (isTrustedFolder && !confirmationDetails.isBuildFile) {
12482
12463
  options2.push({
12483
12464
  label: "Allow for this session",
12484
- value: ToolConfirmationOutcome.ProceedAlways,
12465
+ value: "proceed_always" /* ProceedAlways */,
12485
12466
  key: "Allow for this session"
12486
12467
  });
12487
12468
  if (allowPermanentApproval) {
12488
12469
  options2.push({
12489
12470
  label: "Allow for this file in all future sessions",
12490
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12471
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12491
12472
  key: "Allow for this file in all future sessions"
12492
12473
  });
12493
12474
  }
@@ -12495,45 +12476,45 @@ ${deceptiveUrlWarnings.map(
12495
12476
  if (!config.getIdeMode() || !isDiffingEnabled) {
12496
12477
  options2.push({
12497
12478
  label: "Modify with external editor",
12498
- value: ToolConfirmationOutcome.ModifyWithEditor,
12479
+ value: "modify_with_editor" /* ModifyWithEditor */,
12499
12480
  key: "Modify with external editor"
12500
12481
  });
12501
12482
  }
12502
12483
  options2.push({
12503
12484
  label: "No, suggest changes (esc)",
12504
- value: ToolConfirmationOutcome.Cancel,
12485
+ value: "cancel" /* Cancel */,
12505
12486
  key: "No, suggest changes (esc)"
12506
12487
  });
12507
12488
  }
12508
12489
  } else if (confirmationDetails.type === "sandbox_expansion") {
12509
12490
  options2.push({
12510
12491
  label: "Allow once",
12511
- value: ToolConfirmationOutcome.ProceedOnce,
12492
+ value: "proceed_once" /* ProceedOnce */,
12512
12493
  key: "Allow once"
12513
12494
  });
12514
12495
  if (isTrustedFolder) {
12515
12496
  options2.push({
12516
12497
  label: "Allow for this session",
12517
- value: ToolConfirmationOutcome.ProceedAlways,
12498
+ value: "proceed_always" /* ProceedAlways */,
12518
12499
  key: "Allow for this session"
12519
12500
  });
12520
12501
  if (allowPermanentApproval) {
12521
12502
  options2.push({
12522
12503
  label: "Allow for all future sessions",
12523
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12504
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12524
12505
  key: "Allow for all future sessions"
12525
12506
  });
12526
12507
  }
12527
12508
  }
12528
12509
  options2.push({
12529
12510
  label: "No, suggest changes (esc)",
12530
- value: ToolConfirmationOutcome.Cancel,
12511
+ value: "cancel" /* Cancel */,
12531
12512
  key: "No, suggest changes (esc)"
12532
12513
  });
12533
12514
  } else if (confirmationDetails.type === "exec") {
12534
12515
  options2.push({
12535
12516
  label: "Allow once",
12536
- value: ToolConfirmationOutcome.ProceedOnce,
12517
+ value: "proceed_once" /* ProceedOnce */,
12537
12518
  key: "Allow once"
12538
12519
  });
12539
12520
  const hasUntrustedFlags = confirmationDetails.untrustedFlags && confirmationDetails.untrustedFlags.length > 0;
@@ -12541,75 +12522,75 @@ ${deceptiveUrlWarnings.map(
12541
12522
  if (isTrustedFolder && !hasUntrustedFlags && !hasModifiedBuildFiles) {
12542
12523
  options2.push({
12543
12524
  label: `Allow for this session`,
12544
- value: ToolConfirmationOutcome.ProceedAlways,
12525
+ value: "proceed_always" /* ProceedAlways */,
12545
12526
  key: `Allow for this session`
12546
12527
  });
12547
12528
  if (allowPermanentApproval) {
12548
12529
  options2.push({
12549
12530
  label: `Allow this command for all future sessions`,
12550
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12531
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12551
12532
  key: `Allow for all future sessions`
12552
12533
  });
12553
12534
  }
12554
12535
  }
12555
12536
  options2.push({
12556
12537
  label: "No, suggest changes (esc)",
12557
- value: ToolConfirmationOutcome.Cancel,
12538
+ value: "cancel" /* Cancel */,
12558
12539
  key: "No, suggest changes (esc)"
12559
12540
  });
12560
12541
  } else if (confirmationDetails.type === "info") {
12561
12542
  options2.push({
12562
12543
  label: "Allow once",
12563
- value: ToolConfirmationOutcome.ProceedOnce,
12544
+ value: "proceed_once" /* ProceedOnce */,
12564
12545
  key: "Allow once"
12565
12546
  });
12566
12547
  if (isTrustedFolder) {
12567
12548
  options2.push({
12568
12549
  label: "Allow for this session",
12569
- value: ToolConfirmationOutcome.ProceedAlways,
12550
+ value: "proceed_always" /* ProceedAlways */,
12570
12551
  key: "Allow for this session"
12571
12552
  });
12572
12553
  if (allowPermanentApproval) {
12573
12554
  options2.push({
12574
12555
  label: "Allow for all future sessions",
12575
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12556
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12576
12557
  key: "Allow for all future sessions"
12577
12558
  });
12578
12559
  }
12579
12560
  }
12580
12561
  options2.push({
12581
12562
  label: "No, suggest changes (esc)",
12582
- value: ToolConfirmationOutcome.Cancel,
12563
+ value: "cancel" /* Cancel */,
12583
12564
  key: "No, suggest changes (esc)"
12584
12565
  });
12585
12566
  } else if (confirmationDetails.type === "mcp") {
12586
12567
  options2.push({
12587
12568
  label: "Allow once",
12588
- value: ToolConfirmationOutcome.ProceedOnce,
12569
+ value: "proceed_once" /* ProceedOnce */,
12589
12570
  key: "Allow once"
12590
12571
  });
12591
12572
  if (isTrustedFolder) {
12592
12573
  options2.push({
12593
12574
  label: "Allow tool for this session",
12594
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
12575
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
12595
12576
  key: "Allow tool for this session"
12596
12577
  });
12597
12578
  options2.push({
12598
12579
  label: "Allow all server tools for this session",
12599
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
12580
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
12600
12581
  key: "Allow all server tools for this session"
12601
12582
  });
12602
12583
  if (allowPermanentApproval) {
12603
12584
  options2.push({
12604
12585
  label: "Allow tool for all future sessions",
12605
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12586
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12606
12587
  key: "Allow tool for all future sessions"
12607
12588
  });
12608
12589
  }
12609
12590
  }
12610
12591
  options2.push({
12611
12592
  label: "No, suggest changes (esc)",
12612
- value: ToolConfirmationOutcome.Cancel,
12593
+ value: "cancel" /* Cancel */,
12613
12594
  key: "No, suggest changes (esc)"
12614
12595
  });
12615
12596
  }
@@ -12648,7 +12629,7 @@ ${deceptiveUrlWarnings.map(
12648
12629
  const executionProps = confirmationDetails;
12649
12630
  const commandsToDisplay = executionProps.commands && executionProps.commands.length > 0 ? executionProps.commands : [executionProps.command];
12650
12631
  const containsRedirection = typeof executionProps.hasRedirection === "boolean" ? executionProps.hasRedirection : commandsToDisplay.some((cmd) => hasRedirection(cmd));
12651
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12632
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12652
12633
  if (containsRedirection && !isAutoEdit) {
12653
12634
  extraInfoLines = 1;
12654
12635
  }
@@ -12675,7 +12656,7 @@ ${deceptiveUrlWarnings.map(
12675
12656
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12676
12657
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12677
12658
  const alwaysAndSaveIndex = options2.findIndex(
12678
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12659
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12679
12660
  );
12680
12661
  if (alwaysAndSaveIndex !== -1) {
12681
12662
  initialIndex2 = alwaysAndSaveIndex;
@@ -12731,10 +12712,10 @@ Ensure you trust all modifications made to build files before approving executio
12731
12712
  {
12732
12713
  questions: confirmationDetails.questions,
12733
12714
  onSubmit: (answers) => {
12734
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12715
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12735
12716
  },
12736
12717
  onCancel: () => {
12737
- handleConfirm(ToolConfirmationOutcome.Cancel);
12718
+ handleConfirm("cancel" /* Cancel */);
12738
12719
  },
12739
12720
  width: safeTerminalWidth,
12740
12721
  availableHeight: bodyHeight
@@ -12755,19 +12736,19 @@ Ensure you trust all modifications made to build files before approving executio
12755
12736
  planPath: confirmationDetails.planPath,
12756
12737
  getPreferredEditor,
12757
12738
  onApprove: (approvalMode) => {
12758
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12739
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12759
12740
  approved: true,
12760
12741
  approvalMode
12761
12742
  });
12762
12743
  },
12763
12744
  onFeedback: (feedback) => {
12764
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12745
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12765
12746
  approved: false,
12766
12747
  feedback
12767
12748
  });
12768
12749
  },
12769
12750
  onCancel: () => {
12770
- handleConfirm(ToolConfirmationOutcome.Cancel);
12751
+ handleConfirm("cancel" /* Cancel */);
12771
12752
  },
12772
12753
  width: safeTerminalWidth,
12773
12754
  availableHeight: bodyHeight
@@ -12875,7 +12856,7 @@ Ensure you trust all modifications made to build files before approving executio
12875
12856
  const isShell = isShellTool(toolName);
12876
12857
  const commandsToDisplay = executionProps.commands && executionProps.commands.length > 1 ? executionProps.commands : [executionProps.command];
12877
12858
  const containsRedirection = typeof executionProps.hasRedirection === "boolean" ? executionProps.hasRedirection : commandsToDisplay.some((cmd) => hasRedirection(cmd));
12878
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12859
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12879
12860
  let warnings = null;
12880
12861
  if (containsRedirection && !isAutoEdit) {
12881
12862
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -13034,7 +13015,7 @@ Ensure you trust all modifications made to build files before approving executio
13034
13015
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
13035
13016
  const renderRadioItem = (0, import_react36.useCallback)(
13036
13017
  (item, { titleColor }) => {
13037
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
13018
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
13038
13019
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
13039
13020
  item.label,
13040
13021
  " ",
@@ -13449,7 +13430,7 @@ var MainContent = () => {
13449
13430
  const hasConfirmationQueue = Boolean(
13450
13431
  showConfirmationQueue && confirmingTool
13451
13432
  );
13452
- const isVisiblePendingItem = (item) => item.type !== "tool_group" || item.tools.some((t) => t.status !== CoreToolCallStatus.AwaitingApproval);
13433
+ const isVisiblePendingItem = (item) => item.type !== "tool_group" || item.tools.some((t) => t.status !== "awaiting_approval" /* AwaitingApproval */);
13453
13434
  const visiblePendingCount = pendingHistoryItems.filter(isVisiblePendingItem).length;
13454
13435
  const shouldPartitionHeight = !isAlternateBufferOrTerminalBuffer && hasConfirmationQueue && visiblePendingCount > 0;
13455
13436
  const pendingCount = Math.max(1, visiblePendingCount);
@@ -15174,7 +15155,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
15174
15155
  if (settings.merged.security.auth.useExternal) {
15175
15156
  return null;
15176
15157
  }
15177
- if (authType === AuthType.USE_GEMINI) {
15158
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
15178
15159
  return null;
15179
15160
  }
15180
15161
  return validateAuthMethod(authType);
@@ -15226,7 +15207,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
15226
15207
  }
15227
15208
  return;
15228
15209
  }
15229
- if (authType === AuthType.USE_GEMINI) {
15210
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
15230
15211
  const key = await reloadApiKey();
15231
15212
  if (!key) {
15232
15213
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -15309,31 +15290,31 @@ function AuthDialog({
15309
15290
  let items = [
15310
15291
  {
15311
15292
  label: "Sign in with Google",
15312
- value: AuthType.LOGIN_WITH_GOOGLE,
15313
- key: AuthType.LOGIN_WITH_GOOGLE
15293
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
15294
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
15314
15295
  },
15315
15296
  ...process.env["CLOUD_SHELL"] === "true" ? [
15316
15297
  {
15317
15298
  label: "Use Cloud Shell user credentials",
15318
- value: AuthType.COMPUTE_ADC,
15319
- key: AuthType.COMPUTE_ADC
15299
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
15300
+ key: "compute-default-credentials" /* COMPUTE_ADC */
15320
15301
  }
15321
15302
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
15322
15303
  {
15323
15304
  label: "Use metadata server application default credentials",
15324
- value: AuthType.COMPUTE_ADC,
15325
- key: AuthType.COMPUTE_ADC
15305
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
15306
+ key: "compute-default-credentials" /* COMPUTE_ADC */
15326
15307
  }
15327
15308
  ] : [],
15328
15309
  {
15329
15310
  label: "Use Gemini API Key",
15330
- value: AuthType.USE_GEMINI,
15331
- key: AuthType.USE_GEMINI
15311
+ value: "gemini-api-key" /* USE_GEMINI */,
15312
+ key: "gemini-api-key" /* USE_GEMINI */
15332
15313
  },
15333
15314
  {
15334
15315
  label: "Vertex AI",
15335
- value: AuthType.USE_VERTEX_AI,
15336
- key: AuthType.USE_VERTEX_AI
15316
+ value: "vertex-ai" /* USE_VERTEX_AI */,
15317
+ key: "vertex-ai" /* USE_VERTEX_AI */
15337
15318
  }
15338
15319
  ];
15339
15320
  if (settings.merged.security.auth.enforcedType) {
@@ -15355,9 +15336,9 @@ function AuthDialog({
15355
15336
  return item.value === defaultAuthType;
15356
15337
  }
15357
15338
  if (process.env["GEMINI_API_KEY"]) {
15358
- return item.value === AuthType.USE_GEMINI;
15339
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
15359
15340
  }
15360
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
15341
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
15361
15342
  });
15362
15343
  if (settings.merged.security.auth.enforcedType) {
15363
15344
  initialAuthIndex = 0;
@@ -15368,14 +15349,14 @@ function AuthDialog({
15368
15349
  return;
15369
15350
  }
15370
15351
  if (authType) {
15371
- const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
15352
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
15372
15353
  if (needsRestart) {
15373
15354
  setAuthContext({ requiresRestart: true });
15374
15355
  } else {
15375
15356
  setAuthContext({});
15376
15357
  }
15377
15358
  const currentAuthType = settings.merged.security?.auth?.selectedType;
15378
- if (authType === AuthType.LOGIN_WITH_GOOGLE || currentAuthType === AuthType.LOGIN_WITH_GOOGLE) {
15359
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || currentAuthType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
15379
15360
  try {
15380
15361
  await clearCachedCredentialFile();
15381
15362
  } catch (error) {
@@ -15383,13 +15364,13 @@ function AuthDialog({
15383
15364
  onAuthError(
15384
15365
  "Failed to clear cached credentials: " + (error instanceof Error ? error.message : String(error))
15385
15366
  );
15386
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
15367
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
15387
15368
  return;
15388
15369
  }
15389
15370
  }
15390
15371
  }
15391
15372
  settings.setValue(scope, "security.auth.selectedType", authType);
15392
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
15373
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
15393
15374
  setExiting(true);
15394
15375
  setTimeout(() => {
15395
15376
  void relaunchApp({ overrideAuthType: authType }).catch((err) => {
@@ -15399,7 +15380,7 @@ function AuthDialog({
15399
15380
  }, 100);
15400
15381
  return;
15401
15382
  }
15402
- if (authType === AuthType.USE_GEMINI) {
15383
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
15403
15384
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
15404
15385
  return;
15405
15386
  }
@@ -16213,11 +16194,11 @@ var PrivacyNoticeText = ({
16213
16194
  }) => {
16214
16195
  const authType = config.getContentGeneratorConfig()?.authType;
16215
16196
  switch (authType) {
16216
- case AuthType.USE_GEMINI:
16197
+ case "gemini-api-key" /* USE_GEMINI */:
16217
16198
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
16218
- case AuthType.USE_VERTEX_AI:
16199
+ case "vertex-ai" /* USE_VERTEX_AI */:
16219
16200
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
16220
- case AuthType.LOGIN_WITH_GOOGLE:
16201
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
16221
16202
  default:
16222
16203
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
16223
16204
  }
@@ -16277,7 +16258,7 @@ function ProQuotaDialog({
16277
16258
  value: "retry_always",
16278
16259
  key: "retry_always"
16279
16260
  },
16280
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
16261
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
16281
16262
  {
16282
16263
  label: "Upgrade for higher limits",
16283
16264
  value: "upgrade",
@@ -17450,7 +17431,7 @@ function ModelDialog({ onClose }) {
17450
17431
  const useLatestFlash = config?.hasLatestFlashGAAccess?.() ?? false;
17451
17432
  const useLatestFlashLite = config?.hasLatestFlashLiteGAAccess?.() ?? false;
17452
17433
  const selectedAuthType = settings.merged.security.auth.selectedType;
17453
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
17434
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
17454
17435
  const manualModelSelected = (0, import_react54.useMemo)(() => {
17455
17436
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
17456
17437
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -18778,10 +18759,10 @@ function initializeConsoleStore() {
18778
18759
  globalConsoleMessages = [];
18779
18760
  globalErrorCount = 0;
18780
18761
  notifyListeners();
18781
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
18782
- coreEvents.off(CoreEvent.Output, handleOutput);
18783
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
18784
- coreEvents.on(CoreEvent.Output, handleOutput);
18762
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
18763
+ coreEvents.off("output" /* Output */, handleOutput);
18764
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
18765
+ coreEvents.on("output" /* Output */, handleOutput);
18785
18766
  }
18786
18767
  function notifyListeners() {
18787
18768
  for (const listener of listeners) {
@@ -20924,7 +20905,7 @@ function usePromptCompletion({
20924
20905
  { model: "prompt-completion" },
20925
20906
  contents,
20926
20907
  signal,
20927
- LlmRole.UTILITY_AUTOCOMPLETE
20908
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20928
20909
  );
20929
20910
  if (signal.aborted) {
20930
20911
  return;
@@ -23006,9 +22987,9 @@ var InputPrompt = ({
23006
22987
  onSuggestionsVisibilityChange(shouldShowSuggestions);
23007
22988
  }
23008
22989
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
23009
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
23010
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
23011
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22990
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22991
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22992
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
23012
22993
  let statusColor;
23013
22994
  let statusText = "";
23014
22995
  if (shellModeActive) {
@@ -23856,22 +23837,22 @@ var ApprovalModeIndicator = ({
23856
23837
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23857
23838
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23858
23839
  switch (approvalMode) {
23859
- case ApprovalMode.AUTO_EDIT:
23840
+ case "autoEdit" /* AUTO_EDIT */:
23860
23841
  textColor = theme.status.warning;
23861
23842
  textContent = "auto-accept edits";
23862
23843
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23863
23844
  break;
23864
- case ApprovalMode.PLAN:
23845
+ case "plan" /* PLAN */:
23865
23846
  textColor = theme.status.success;
23866
23847
  textContent = "plan";
23867
23848
  subText = `${cycleHint} to manual`;
23868
23849
  break;
23869
- case ApprovalMode.YOLO:
23850
+ case "yolo" /* YOLO */:
23870
23851
  textColor = theme.status.error;
23871
23852
  textContent = "YOLO";
23872
23853
  subText = yoloHint;
23873
23854
  break;
23874
- case ApprovalMode.DEFAULT:
23855
+ case "default" /* DEFAULT */:
23875
23856
  default:
23876
23857
  textColor = theme.text.accent;
23877
23858
  textContent = "";
@@ -23919,7 +23900,7 @@ var useComposerStatus = () => {
23919
23900
  (item) => item.type === "tool_group"
23920
23901
  ).some(
23921
23902
  (item) => item.tools.some(
23922
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23903
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23923
23904
  )
23924
23905
  ),
23925
23906
  [uiState.pendingHistoryItems]
@@ -23934,13 +23915,13 @@ var useComposerStatus = () => {
23934
23915
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23935
23916
  if (hideMinimalModeHintWhileBusy) return null;
23936
23917
  switch (showApprovalModeIndicator) {
23937
- case ApprovalMode.YOLO:
23918
+ case "yolo" /* YOLO */:
23938
23919
  return { text: "YOLO", color: theme.status.error };
23939
- case ApprovalMode.PLAN:
23920
+ case "plan" /* PLAN */:
23940
23921
  return { text: "plan", color: theme.status.success };
23941
- case ApprovalMode.AUTO_EDIT:
23922
+ case "autoEdit" /* AUTO_EDIT */:
23942
23923
  return { text: "auto edit", color: theme.status.warning };
23943
- case ApprovalMode.DEFAULT:
23924
+ case "default" /* DEFAULT */:
23944
23925
  default:
23945
23926
  return null;
23946
23927
  }
@@ -24310,7 +24291,7 @@ var ConfigInitDisplay = ({
24310
24291
  let connected = 0;
24311
24292
  const connecting = [];
24312
24293
  for (const [name, client] of clients.entries()) {
24313
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
24294
+ if (client.getStatus() === "connected" /* CONNECTED */) {
24314
24295
  connected++;
24315
24296
  } else {
24316
24297
  connecting.push(name);
@@ -24332,9 +24313,9 @@ var ConfigInitDisplay = ({
24332
24313
  );
24333
24314
  }
24334
24315
  };
24335
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
24316
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
24336
24317
  return () => {
24337
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
24318
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
24338
24319
  };
24339
24320
  }, [initialMessage]);
24340
24321
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -25080,7 +25061,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
25080
25061
  callId,
25081
25062
  name: SHELL_COMMAND_NAME,
25082
25063
  description: rawQuery,
25083
- status: CoreToolCallStatus.Executing,
25064
+ status: "executing" /* Executing */,
25084
25065
  isClientInitiated: true,
25085
25066
  resultDisplay: "",
25086
25067
  confirmationDetails: void 0
@@ -25221,7 +25202,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
25221
25202
  mainContent = result.output.trim() || "(Command produced no output)";
25222
25203
  }
25223
25204
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
25224
- let finalStatus = CoreToolCallStatus.Success;
25205
+ let finalStatus = "success" /* Success */;
25225
25206
  const prependToAnsiOutput = (output, text) => {
25226
25207
  const newLines = text.split("\n").map((line) => [
25227
25208
  {
@@ -25240,20 +25221,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
25240
25221
  };
25241
25222
  let prefix = "";
25242
25223
  if (result.error) {
25243
- finalStatus = CoreToolCallStatus.Error;
25224
+ finalStatus = "error" /* Error */;
25244
25225
  prefix = result.error.message;
25245
25226
  } else if (result.aborted) {
25246
- finalStatus = CoreToolCallStatus.Cancelled;
25227
+ finalStatus = "cancelled" /* Cancelled */;
25247
25228
  prefix = "Command was cancelled.";
25248
25229
  } else if (result.backgrounded) {
25249
- finalStatus = CoreToolCallStatus.Success;
25230
+ finalStatus = "success" /* Success */;
25250
25231
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
25251
25232
  mainContent = finalOutput;
25252
25233
  } else if (result.signal) {
25253
- finalStatus = CoreToolCallStatus.Error;
25234
+ finalStatus = "error" /* Error */;
25254
25235
  prefix = `Command terminated by signal: ${result.signal}.`;
25255
25236
  } else if (result.exitCode !== 0) {
25256
- finalStatus = CoreToolCallStatus.Error;
25237
+ finalStatus = "error" /* Error */;
25257
25238
  prefix = `Command exited with code ${result.exitCode}.`;
25258
25239
  }
25259
25240
  if (prefix) {
@@ -25279,7 +25260,7 @@ ${mainContent}`;
25279
25260
  status: finalStatus,
25280
25261
  resultDisplay: finalOutput
25281
25262
  };
25282
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
25263
+ if (finalStatus !== "cancelled" /* Cancelled */) {
25283
25264
  addItemToHistory(
25284
25265
  {
25285
25266
  type: "tool_group",
@@ -26305,13 +26286,13 @@ function useQuotaAndFallback({
26305
26286
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
26306
26287
  `/stats model for usage details`,
26307
26288
  `/model to switch models.`,
26308
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
26289
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
26309
26290
  ].filter(Boolean);
26310
26291
  message = messageLines.join("\n");
26311
26292
  }
26312
26293
  } else if (error instanceof ModelNotFoundError) {
26313
26294
  isModelNotFoundError = true;
26314
- if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
26295
+ if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
26315
26296
  const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
26316
26297
  const messageLines = [
26317
26298
  `Model "${failedModel}" is not available in region "${location}".`,
@@ -26505,7 +26486,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
26505
26486
  );
26506
26487
  setEditorError(null);
26507
26488
  setIsEditorDialogOpen(false);
26508
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
26489
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
26509
26490
  } catch (error) {
26510
26491
  setEditorError(`Failed to set editor preference: ${error}`);
26511
26492
  }
@@ -26514,7 +26495,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
26514
26495
  );
26515
26496
  const exitEditorDialog = (0, import_react92.useCallback)(() => {
26516
26497
  setIsEditorDialogOpen(false);
26517
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
26498
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
26518
26499
  }, []);
26519
26500
  return {
26520
26501
  isEditorDialogOpen,
@@ -26902,7 +26883,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26902
26883
  canonicalPath: resolvedCommandPath
26903
26884
  } = parseSlashCommand(trimmed, commands);
26904
26885
  if (!commandToExecute) {
26905
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
26886
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
26906
26887
  if (isMcpLoading) {
26907
26888
  setIsProcessing(true);
26908
26889
  if (addToHistory) {
@@ -27083,7 +27064,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
27083
27064
  onConfirm: async (resolvedOutcome) => {
27084
27065
  resolve3({
27085
27066
  outcome: resolvedOutcome,
27086
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
27067
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
27087
27068
  });
27088
27069
  }
27089
27070
  };
@@ -27091,7 +27072,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
27091
27072
  callId,
27092
27073
  name: "Expansion",
27093
27074
  description: "Command expansion needs shell access",
27094
- status: CoreToolCallStatus.AwaitingApproval,
27075
+ status: "awaiting_approval" /* AwaitingApproval */,
27095
27076
  isClientInitiated: true,
27096
27077
  resultDisplay: void 0,
27097
27078
  confirmationDetails
@@ -27102,7 +27083,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
27102
27083
  });
27103
27084
  });
27104
27085
  setPendingItem(null);
27105
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
27086
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
27106
27087
  addItem(
27107
27088
  {
27108
27089
  type: "info" /* INFO */,
@@ -27112,7 +27093,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
27112
27093
  );
27113
27094
  return { type: "handled" };
27114
27095
  }
27115
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
27096
+ if (outcome === "proceed_always" /* ProceedAlways */) {
27116
27097
  setSessionShellAllowlist(
27117
27098
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
27118
27099
  );
@@ -27614,7 +27595,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
27614
27595
  const handler = (event) => {
27615
27596
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
27616
27597
  const hasExecuting = event.toolCalls.some(
27617
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
27598
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
27618
27599
  );
27619
27600
  if (hasExecuting) {
27620
27601
  setLastToolOutputTime(Date.now());
@@ -27623,7 +27604,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
27623
27604
  const prevCalls = prev[event.schedulerId] ?? [];
27624
27605
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
27625
27606
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
27626
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
27607
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
27627
27608
  );
27628
27609
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
27629
27610
  return prev;
@@ -27635,9 +27616,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
27635
27616
  };
27636
27617
  });
27637
27618
  };
27638
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
27619
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
27639
27620
  return () => {
27640
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
27621
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
27641
27622
  };
27642
27623
  }, [messageBus, internalAdaptToolCalls]);
27643
27624
  (0, import_react99.useEffect)(() => {
@@ -27659,9 +27640,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
27659
27640
  };
27660
27641
  });
27661
27642
  };
27662
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
27643
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
27663
27644
  return () => {
27664
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
27645
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
27665
27646
  };
27666
27647
  }, [messageBus]);
27667
27648
  const schedule = (0, import_react99.useCallback)(
@@ -27760,8 +27741,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
27760
27741
  const prev = prevMap.get(coreCall.request.callId);
27761
27742
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
27762
27743
  let status = coreCall.status;
27763
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
27764
- status = CoreToolCallStatus.Executing;
27744
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
27745
+ status = "executing" /* Executing */;
27765
27746
  }
27766
27747
  return {
27767
27748
  ...coreCall,
@@ -27910,7 +27891,7 @@ var CANCELLED_TOOL_ERROR_MESSAGE = "[Operation Cancelled] Reason: User cancelled
27910
27891
  function createCancelledToolCall(request, tool, invocation) {
27911
27892
  const fallbackToolName = request.name.trim() || "generic_tool";
27912
27893
  return {
27913
- status: CoreToolCallStatus.Cancelled,
27894
+ status: "cancelled" /* Cancelled */,
27914
27895
  request,
27915
27896
  // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
27916
27897
  tool: tool ?? {
@@ -27936,7 +27917,7 @@ function createCancelledToolCall(request, tool, invocation) {
27936
27917
  ],
27937
27918
  resultDisplay: void 0,
27938
27919
  error: new Error(CANCELLED_TOOL_ERROR_MESSAGE),
27939
- errorType: ToolErrorType.UNHANDLED_EXCEPTION
27920
+ errorType: "unhandled_exception" /* UNHANDLED_EXCEPTION */
27940
27921
  }
27941
27922
  };
27942
27923
  }
@@ -28041,10 +28022,10 @@ var useAgentStream = ({
28041
28022
  if (unpushedTools.length > 0) {
28042
28023
  setTrackedTools(
28043
28024
  (prev) => prev.map((tc) => {
28044
- if (!pushedToolCallIdsRef.current.has(tc.callId) && tc.status !== CoreToolCallStatus.Success && tc.status !== CoreToolCallStatus.Error && tc.status !== CoreToolCallStatus.Cancelled) {
28025
+ if (!pushedToolCallIdsRef.current.has(tc.callId) && tc.status !== "success" /* Success */ && tc.status !== "error" /* Error */ && tc.status !== "cancelled" /* Cancelled */) {
28045
28026
  return {
28046
28027
  ...tc,
28047
- status: CoreToolCallStatus.Cancelled
28028
+ status: "cancelled" /* Cancelled */
28048
28029
  };
28049
28030
  }
28050
28031
  return tc;
@@ -28189,14 +28170,14 @@ var useAgentStream = ({
28189
28170
  const displayName = legacyState?.displayName ?? event.name;
28190
28171
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28191
28172
  const desc = legacyState?.description ?? "";
28192
- const fallbackKind = Kind.Other;
28173
+ const fallbackKind = "other" /* Other */;
28193
28174
  const newCall = {
28194
28175
  callId: event.requestId,
28195
28176
  name: displayName,
28196
28177
  originalRequestName: event.name,
28197
28178
  description: desc,
28198
28179
  display: event.display,
28199
- status: CoreToolCallStatus.Scheduled,
28180
+ status: "scheduled" /* Scheduled */,
28200
28181
  isClientInitiated: false,
28201
28182
  renderOutputAsMarkdown: isOutputMarkdown,
28202
28183
  kind: legacyState?.kind ?? fallbackKind,
@@ -28214,10 +28195,10 @@ var useAgentStream = ({
28214
28195
  const evtStatus = legacyState?.status;
28215
28196
  let status = tc.status;
28216
28197
  if (evtStatus === "executing")
28217
- status = CoreToolCallStatus.Executing;
28218
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28198
+ status = "executing" /* Executing */;
28199
+ else if (evtStatus === "error") status = "error" /* Error */;
28219
28200
  else if (evtStatus === "success")
28220
- status = CoreToolCallStatus.Success;
28201
+ status = "success" /* Success */;
28221
28202
  const display = event.display?.result;
28222
28203
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28223
28204
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28250,7 +28231,7 @@ var useAgentStream = ({
28250
28231
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28251
28232
  return {
28252
28233
  ...tc,
28253
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28234
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28254
28235
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28255
28236
  resultDisplay,
28256
28237
  outputFile
@@ -28317,7 +28298,7 @@ var useAgentStream = ({
28317
28298
  toolRequestArgsRef.current.clear();
28318
28299
  if (typeof query === "string") {
28319
28300
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28320
- void logger?.logMessage(MessageSenderType.USER, query);
28301
+ void logger?.logMessage("user" /* USER */, query);
28321
28302
  }
28322
28303
  startNewPrompt();
28323
28304
  }
@@ -28519,7 +28500,7 @@ function getBackgroundedToolInfo(toolCall) {
28519
28500
  };
28520
28501
  }
28521
28502
  function isBackgroundableExecutingToolCall(toolCall) {
28522
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
28503
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
28523
28504
  }
28524
28505
  function showCitations(settings) {
28525
28506
  const enabled = settings.merged.ui.showCitations;
@@ -28529,14 +28510,14 @@ function showCitations(settings) {
28529
28510
  return true;
28530
28511
  }
28531
28512
  function calculateStreamingState(isResponding, toolCalls) {
28532
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
28513
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
28533
28514
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
28534
28515
  }
28535
28516
  const isAnyToolActive = toolCalls.some((tc) => {
28536
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
28517
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
28537
28518
  return true;
28538
28519
  }
28539
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
28520
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
28540
28521
  return !tc.responseSubmittedToGemini;
28541
28522
  }
28542
28523
  return false;
@@ -28585,14 +28566,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28585
28566
  }, [config]);
28586
28567
  (0, import_react102.useEffect)(() => {
28587
28568
  const handleRetryAttempt = (payload) => {
28588
- if (turnCancelledRef.current || !isRespondingRef.current || payload.role !== LlmRole.MAIN || !lastPromptIdRef.current || payload.promptId !== lastPromptIdRef.current) {
28569
+ if (turnCancelledRef.current || !isRespondingRef.current || payload.role !== "main" /* MAIN */ || !lastPromptIdRef.current || payload.promptId !== lastPromptIdRef.current) {
28589
28570
  return;
28590
28571
  }
28591
28572
  setRetryStatus(payload);
28592
28573
  };
28593
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
28574
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
28594
28575
  return () => {
28595
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
28576
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
28596
28577
  };
28597
28578
  }, [isRespondingRef]);
28598
28579
  const [
@@ -28643,7 +28624,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28643
28624
  const currentModel = client?.getCurrentSequenceModel?.() ?? config.getModel();
28644
28625
  const normalizedCompletedCalls = completedToolCallsFromScheduler.map(
28645
28626
  (tc) => {
28646
- if (tc.status === CoreToolCallStatus.Cancelled && (!tc.response?.responseParts || tc.response.responseParts.length === 0)) {
28627
+ if (tc.status === "cancelled" /* Cancelled */ && (!tc.response?.responseParts || tc.response.responseParts.length === 0)) {
28647
28628
  return {
28648
28629
  ...tc,
28649
28630
  response: createCancelledToolCall(
@@ -28901,7 +28882,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28901
28882
  prevActiveShellPtyIdRef.current = activeShellPtyId;
28902
28883
  }, [activeShellPtyId, addItem, setIsResponding]);
28903
28884
  (0, import_react102.useEffect)(() => {
28904
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
28885
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
28905
28886
  const lastUserMessageIndex = history.findLastIndex(
28906
28887
  (item) => item.type === "user" /* USER */
28907
28888
  );
@@ -28978,7 +28959,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28978
28959
  return;
28979
28960
  }
28980
28961
  const hasActiveTools = pendingToolCallRequestsRef.current.length > 0 || toolCalls.some(
28981
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating || tc.status === CoreToolCallStatus.AwaitingApproval
28962
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */ || tc.status === "awaiting_approval" /* AwaitingApproval */
28982
28963
  );
28983
28964
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
28984
28965
  if (clearBuffer) {
@@ -29006,13 +28987,13 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29006
28987
  if (tc.request.isClientInitiated) {
29007
28988
  continue;
29008
28989
  }
29009
- const isAlreadySubmitted = (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) && tc.responseSubmittedToGemini;
28990
+ const isAlreadySubmitted = (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) && tc.responseSubmittedToGemini;
29010
28991
  if (isAlreadySubmitted) {
29011
28992
  seenCallIds.add(tc.request.callId);
29012
28993
  continue;
29013
28994
  }
29014
28995
  seenCallIds.add(tc.request.callId);
29015
- if ((tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) && (tc.response?.responseParts?.length ?? 0) > 0) {
28996
+ if ((tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) && (tc.response?.responseParts?.length ?? 0) > 0) {
29016
28997
  synthesizedCalls.push(tc);
29017
28998
  } else {
29018
28999
  synthesizedCalls.push(
@@ -29074,7 +29055,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29074
29055
  if (tool.name === SHELL_COMMAND_NAME) {
29075
29056
  return {
29076
29057
  ...tool,
29077
- status: CoreToolCallStatus.Cancelled,
29058
+ status: "cancelled" /* Cancelled */,
29078
29059
  resultDisplay: tool.resultDisplay
29079
29060
  };
29080
29061
  }
@@ -29170,7 +29151,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29170
29151
  let localQueryToSendToGemini = null;
29171
29152
  if (typeof query === "string") {
29172
29153
  const trimmedQuery = query.trim();
29173
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
29154
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
29174
29155
  if (!shellModeActive) {
29175
29156
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
29176
29157
  if (slashCommandResult) {
@@ -29328,7 +29309,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29328
29309
  if (pendingHistoryItemRef.current) {
29329
29310
  if (pendingHistoryItemRef.current.type === "tool_group") {
29330
29311
  const updatedTools = pendingHistoryItemRef.current.tools.map(
29331
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
29312
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
29332
29313
  );
29333
29314
  const pendingItem = {
29334
29315
  ...pendingHistoryItemRef.current,
@@ -29621,15 +29602,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29621
29602
  const toolCallRequests = [];
29622
29603
  let hasTerminalEvent = false;
29623
29604
  for await (const event of stream) {
29624
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
29605
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
29625
29606
  setThought(null);
29626
29607
  }
29627
29608
  switch (event.type) {
29628
- case GeminiEventType.Thought:
29609
+ case "thought" /* Thought */:
29629
29610
  setLastGeminiActivityTime(Date.now());
29630
29611
  handleThoughtEvent(event.value, userMessageTimestamp);
29631
29612
  break;
29632
- case GeminiEventType.Content:
29613
+ case "content" /* Content */:
29633
29614
  setLastGeminiActivityTime(Date.now());
29634
29615
  geminiMessageBuffer = handleContentEvent(
29635
29616
  event.value,
@@ -29637,20 +29618,20 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29637
29618
  userMessageTimestamp
29638
29619
  );
29639
29620
  break;
29640
- case GeminiEventType.ToolCallRequest:
29621
+ case "tool_call_request" /* ToolCallRequest */:
29641
29622
  setRetryStatus(null);
29642
29623
  toolCallRequests.push(event.value);
29643
29624
  pendingToolCallRequestsRef.current.push(event.value);
29644
29625
  break;
29645
- case GeminiEventType.UserCancelled:
29626
+ case "user_cancelled" /* UserCancelled */:
29646
29627
  handleUserCancelledEvent(userMessageTimestamp);
29647
29628
  pendingToolCallRequestsRef.current = [];
29648
29629
  return 1 /* UserCancelled */;
29649
- case GeminiEventType.Error:
29630
+ case "error" /* Error */:
29650
29631
  hasTerminalEvent = true;
29651
29632
  handleErrorEvent(event.value, userMessageTimestamp);
29652
29633
  break;
29653
- case GeminiEventType.AgentExecutionStopped:
29634
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
29654
29635
  hasTerminalEvent = true;
29655
29636
  handleAgentExecutionStoppedEvent(
29656
29637
  event.value.reason,
@@ -29659,7 +29640,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29659
29640
  event.value.contextCleared
29660
29641
  );
29661
29642
  break;
29662
- case GeminiEventType.AgentExecutionBlocked:
29643
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
29663
29644
  hasTerminalEvent = true;
29664
29645
  handleAgentExecutionBlockedEvent(
29665
29646
  event.value.reason,
@@ -29668,38 +29649,38 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29668
29649
  event.value.contextCleared
29669
29650
  );
29670
29651
  break;
29671
- case GeminiEventType.ChatCompressed:
29652
+ case "chat_compressed" /* ChatCompressed */:
29672
29653
  handleChatCompressionEvent(event.value, userMessageTimestamp);
29673
29654
  break;
29674
- case GeminiEventType.ToolCallConfirmation:
29675
- case GeminiEventType.ToolCallResponse:
29655
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
29656
+ case "tool_call_response" /* ToolCallResponse */:
29676
29657
  break;
29677
- case GeminiEventType.MaxSessionTurns:
29658
+ case "max_session_turns" /* MaxSessionTurns */:
29678
29659
  hasTerminalEvent = true;
29679
29660
  handleMaxSessionTurnsEvent();
29680
29661
  break;
29681
- case GeminiEventType.ContextWindowWillOverflow:
29662
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
29682
29663
  hasTerminalEvent = true;
29683
29664
  handleContextWindowWillOverflowEvent(
29684
29665
  event.value.estimatedRequestTokenCount,
29685
29666
  event.value.remainingTokenCount
29686
29667
  );
29687
29668
  break;
29688
- case GeminiEventType.Finished:
29669
+ case "finished" /* Finished */:
29689
29670
  handleFinishedEvent(event, userMessageTimestamp);
29690
29671
  break;
29691
- case GeminiEventType.Citation:
29672
+ case "citation" /* Citation */:
29692
29673
  handleCitationEvent(event.value, userMessageTimestamp);
29693
29674
  break;
29694
- case GeminiEventType.ModelInfo:
29675
+ case "model_info" /* ModelInfo */:
29695
29676
  handleChatModelEvent(event.value, userMessageTimestamp);
29696
29677
  break;
29697
- case GeminiEventType.LoopDetected:
29678
+ case "loop_detected" /* LoopDetected */:
29698
29679
  loopDetectedRef.current = true;
29699
29680
  break;
29700
- case GeminiEventType.Retry:
29681
+ case "retry" /* Retry */:
29701
29682
  break;
29702
- case GeminiEventType.InvalidStream:
29683
+ case "invalid_stream" /* InvalidStream */:
29703
29684
  hasTerminalEvent = true;
29704
29685
  handleInvalidStreamEvent(event.value, userMessageTimestamp);
29705
29686
  break;
@@ -29769,7 +29750,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29769
29750
  const submitQuery = (0, import_react102.useCallback)(
29770
29751
  async (query, options, prompt_id) => runInDevTraceSpan(
29771
29752
  {
29772
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
29753
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
29773
29754
  sessionId: config.getSessionId()
29774
29755
  },
29775
29756
  async ({ metadata: spanMetadata }) => {
@@ -29939,7 +29920,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29939
29920
  submitQueryRef.current = submitQuery;
29940
29921
  const handleApprovalModeChange = (0, import_react102.useCallback)(
29941
29922
  async (newApprovalMode) => {
29942
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
29923
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
29943
29924
  if (geminiClient) {
29944
29925
  try {
29945
29926
  await geminiClient.addHistory({
@@ -29962,11 +29943,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29962
29943
  }
29963
29944
  }
29964
29945
  previousApprovalModeRef.current = newApprovalMode;
29965
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
29946
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
29966
29947
  let awaitingApprovalCalls = toolCalls.filter(
29967
29948
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
29968
29949
  );
29969
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
29950
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
29970
29951
  const filteredCalls = [];
29971
29952
  for (const call of awaitingApprovalCalls) {
29972
29953
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
@@ -29994,11 +29975,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29994
29975
  if (call.correlationId) {
29995
29976
  try {
29996
29977
  await config.getMessageBus().publish({
29997
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
29978
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
29998
29979
  correlationId: call.correlationId,
29999
29980
  confirmed: true,
30000
29981
  requiresUserConfirmation: false,
30001
- outcome: ToolConfirmationOutcome.ProceedOnce
29982
+ outcome: "proceed_once" /* ProceedOnce */
30002
29983
  });
30003
29984
  } catch (error) {
30004
29985
  debugLogger.warn(
@@ -30090,14 +30071,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
30090
30071
  );
30091
30072
  if (isLowErrorVerbosity) {
30092
30073
  suppressedToolErrorCountRef.current += geminiTools.filter(
30093
- (tc) => tc.status === CoreToolCallStatus.Error
30074
+ (tc) => tc.status === "error" /* Error */
30094
30075
  ).length;
30095
30076
  }
30096
30077
  if (geminiTools.length === 0) {
30097
30078
  return;
30098
30079
  }
30099
30080
  const stopExecutionTool = geminiTools.find(
30100
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
30081
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
30101
30082
  );
30102
30083
  if (stopExecutionTool && stopExecutionTool.response.error) {
30103
30084
  maybeAddSuppressedToolErrorNote();
@@ -30117,9 +30098,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
30117
30098
  (tc) => !isTopicTool2(tc.request.name)
30118
30099
  );
30119
30100
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
30120
- (tc) => tc.status === CoreToolCallStatus.Cancelled
30101
+ (tc) => tc.status === "cancelled" /* Cancelled */
30121
30102
  );
30122
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
30103
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
30123
30104
  if (allDeclinableToolsCancelled || allToolsCancelled) {
30124
30105
  if (!turnCancelledRef.current) {
30125
30106
  addItem({
@@ -30209,7 +30190,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
30209
30190
  return;
30210
30191
  }
30211
30192
  const restorableToolCalls = toolCalls.filter(
30212
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
30193
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
30213
30194
  );
30214
30195
  if (restorableToolCalls.length > 0) {
30215
30196
  if (!gitService) {
@@ -31678,9 +31659,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
31678
31659
  const handleFolderTrustSelect = (0, import_react106.useCallback)(
31679
31660
  async (choice) => {
31680
31661
  const trustLevelMap = {
31681
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
31682
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
31683
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
31662
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
31663
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
31664
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
31684
31665
  };
31685
31666
  const trustLevel = trustLevelMap[choice];
31686
31667
  if (!trustLevel) return;
@@ -31699,7 +31680,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
31699
31680
  }, 100);
31700
31681
  return;
31701
31682
  }
31702
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
31683
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
31703
31684
  onTrustChangeRef.current(currentIsTrusted);
31704
31685
  setIsTrusted(currentIsTrusted);
31705
31686
  const wasTrusted = isTrusted ?? false;
@@ -32709,7 +32690,7 @@ function useMessageQueue({
32709
32690
  var import_react108 = __toESM(require_react(), 1);
32710
32691
  function useMcpStatus(config) {
32711
32692
  const [discoveryState, setDiscoveryState] = (0, import_react108.useState)(
32712
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
32693
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
32713
32694
  );
32714
32695
  const [mcpServerCount, setMcpServerCount] = (0, import_react108.useState)(
32715
32696
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -32722,12 +32703,12 @@ function useMcpStatus(config) {
32722
32703
  setMcpServerCount(manager.getMcpServerCount());
32723
32704
  }
32724
32705
  };
32725
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
32706
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
32726
32707
  return () => {
32727
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
32708
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
32728
32709
  };
32729
32710
  }, [config]);
32730
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
32711
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
32731
32712
  return {
32732
32713
  discoveryState,
32733
32714
  mcpServerCount,
@@ -32754,7 +32735,7 @@ function useApprovalModeIndicator({
32754
32735
  (key) => {
32755
32736
  let nextApprovalMode;
32756
32737
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
32757
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
32738
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
32758
32739
  if (addItem) {
32759
32740
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
32760
32741
  const adminSettings = config.getRemoteAdminSettings();
@@ -32772,21 +32753,21 @@ function useApprovalModeIndicator({
32772
32753
  }
32773
32754
  return;
32774
32755
  }
32775
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
32756
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
32776
32757
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
32777
32758
  const currentMode = config.getApprovalMode();
32778
32759
  switch (currentMode) {
32779
- case ApprovalMode.DEFAULT:
32780
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
32760
+ case "default" /* DEFAULT */:
32761
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
32781
32762
  break;
32782
- case ApprovalMode.AUTO_EDIT:
32783
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
32763
+ case "autoEdit" /* AUTO_EDIT */:
32764
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
32784
32765
  break;
32785
- case ApprovalMode.PLAN:
32786
- nextApprovalMode = ApprovalMode.DEFAULT;
32766
+ case "plan" /* PLAN */:
32767
+ nextApprovalMode = "default" /* DEFAULT */;
32787
32768
  break;
32788
- case ApprovalMode.YOLO:
32789
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
32769
+ case "yolo" /* YOLO */:
32770
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
32790
32771
  break;
32791
32772
  default:
32792
32773
  }
@@ -33210,11 +33191,11 @@ var useHookDisplayState = () => {
33210
33191
  removeHook();
33211
33192
  }
33212
33193
  };
33213
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
33214
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
33194
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
33195
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
33215
33196
  return () => {
33216
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
33217
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
33197
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
33198
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
33218
33199
  activeTimeouts.forEach(clearTimeout);
33219
33200
  activeTimeouts.clear();
33220
33201
  };
@@ -34107,7 +34088,7 @@ var AppContainer = (props) => {
34107
34088
  setConfigInitialized(true);
34108
34089
  startupProfiler.flush(config);
34109
34090
  startAutoMemoryIfEnabled(config);
34110
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
34091
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
34111
34092
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
34112
34093
  if (result) {
34113
34094
  const additionalContext = result.getAdditionalContext();
@@ -34134,7 +34115,7 @@ var AppContainer = (props) => {
34134
34115
  );
34135
34116
  const ideClient = await IdeClient.getInstance();
34136
34117
  await ideClient.disconnect();
34137
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
34118
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
34138
34119
  };
34139
34120
  registerCleanup(cleanupFn);
34140
34121
  return () => {
@@ -34159,11 +34140,11 @@ var AppContainer = (props) => {
34159
34140
  resetTime: payload.resetTime
34160
34141
  });
34161
34142
  };
34162
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
34163
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
34143
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
34144
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
34164
34145
  return () => {
34165
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
34166
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
34146
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
34147
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
34167
34148
  };
34168
34149
  }, [config]);
34169
34150
  (0, import_react122.useEffect)(() => {
@@ -34176,16 +34157,16 @@ var AppContainer = (props) => {
34176
34157
  const handleAgentsDiscovered = (payload) => {
34177
34158
  setNewAgents(payload.agents);
34178
34159
  };
34179
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
34180
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
34181
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
34160
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
34161
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
34162
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
34182
34163
  return () => {
34183
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
34164
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
34184
34165
  coreEvents.off(
34185
- CoreEvent.AdminSettingsChanged,
34166
+ "admin-settings-changed" /* AdminSettingsChanged */,
34186
34167
  handleAdminSettingsChanged
34187
34168
  );
34188
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
34169
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
34189
34170
  };
34190
34171
  }, [settings]);
34191
34172
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -34336,11 +34317,11 @@ var AppContainer = (props) => {
34336
34317
  exitEditorDialog
34337
34318
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
34338
34319
  (0, import_react122.useEffect)(() => {
34339
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
34340
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
34320
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
34321
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
34341
34322
  return () => {
34342
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
34343
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
34323
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
34324
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
34344
34325
  };
34345
34326
  }, [handleEditorClose, openEditorDialog]);
34346
34327
  (0, import_react122.useEffect)(() => {
@@ -34411,7 +34392,7 @@ var AppContainer = (props) => {
34411
34392
  errorVerbosity: settings.merged.ui.errorVerbosity
34412
34393
  });
34413
34394
  const isAuthDialogOpen = authState === "updating" /* Updating */;
34414
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
34395
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
34415
34396
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
34416
34397
  const { loadHistoryForResume, isResuming } = useSessionResume({
34417
34398
  config,
@@ -34439,7 +34420,7 @@ var AppContainer = (props) => {
34439
34420
  async (authType, scope) => {
34440
34421
  if (authType) {
34441
34422
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
34442
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
34423
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
34443
34424
  setAuthContext({ requiresRestart: true });
34444
34425
  } else {
34445
34426
  setAuthContext({});
@@ -34467,7 +34448,7 @@ var AppContainer = (props) => {
34467
34448
  );
34468
34449
  return;
34469
34450
  }
34470
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
34451
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
34471
34452
  writeToStdout(`
34472
34453
  ----------------------------------------------------------------
34473
34454
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -34490,7 +34471,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
34490
34471
  }
34491
34472
  await saveApiKey(apiKey);
34492
34473
  await reloadApiKey();
34493
- await config.refreshAuth(AuthType.USE_GEMINI);
34474
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
34494
34475
  setAuthState("authenticated" /* Authenticated */);
34495
34476
  } catch (e) {
34496
34477
  onAuthError(
@@ -34515,7 +34496,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
34515
34496
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
34516
34497
  );
34517
34498
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
34518
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
34499
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
34519
34500
  return;
34520
34501
  }
34521
34502
  const authMethod = settings.merged.security.auth.selectedType;
@@ -34675,9 +34656,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
34675
34656
  }
34676
34657
  });
34677
34658
  };
34678
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
34659
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
34679
34660
  return () => {
34680
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
34661
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
34681
34662
  };
34682
34663
  }, []);
34683
34664
  const performMemoryRefresh = (0, import_react122.useCallback)(async () => {
@@ -35317,7 +35298,7 @@ ${queuedText}` : queuedText;
35317
35298
  [handleSlashCommand, settings]
35318
35299
  );
35319
35300
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
35320
- 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;
35301
+ 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;
35321
35302
  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;
35322
35303
  const handleGlobalKeypress = (0, import_react122.useCallback)(
35323
35304
  (key) => {
@@ -35410,7 +35391,7 @@ ${queuedText}` : queuedText;
35410
35391
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
35411
35392
  if (settings.merged.general.devtools) {
35412
35393
  void (async () => {
35413
- const { toggleDevToolsPanel } = await import("./devtoolsService-OCTFSUNQ.js");
35394
+ const { toggleDevToolsPanel } = await import("./devtoolsService-Q5HYPUU7.js");
35414
35395
  await toggleDevToolsPanel(
35415
35396
  config,
35416
35397
  showErrorDetails,
@@ -35631,12 +35612,12 @@ ${queuedText}` : queuedText;
35631
35612
  Date.now()
35632
35613
  );
35633
35614
  };
35634
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
35635
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
35615
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
35616
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
35636
35617
  coreEvents.drainBacklogs();
35637
35618
  return () => {
35638
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
35639
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
35619
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
35620
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
35640
35621
  };
35641
35622
  }, [historyManager]);
35642
35623
  const nightly = props.version.includes("nightly");
@@ -35745,9 +35726,9 @@ ${queuedText}` : queuedText;
35745
35726
  const handleMemoryChanged = (result) => {
35746
35727
  setGeminiMdFileCount(result.fileCount);
35747
35728
  };
35748
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
35729
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
35749
35730
  return () => {
35750
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
35731
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
35751
35732
  };
35752
35733
  }, []);
35753
35734
  (0, import_react122.useEffect)(() => {