@google/gemini-cli 0.64.0-preview.1 → 0.64.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 (66) hide show
  1. package/bundle/{chunk-6JF3XGX6.js → chunk-5XKZL6EB.js} +2 -2
  2. package/bundle/{chunk-2XMCTNPW.js → chunk-7H3F2KUX.js} +1 -1
  3. package/bundle/{chunk-BONG2QK5.js → chunk-DPNFVVVC.js} +2 -2
  4. package/bundle/{chunk-GWH2CDNQ.js → chunk-ENBP32XB.js} +1 -1
  5. package/bundle/{chunk-7AV6KELE.js → chunk-EV5MQULH.js} +1 -1
  6. package/bundle/{chunk-R7OEYEVK.js → chunk-FCPMU3HO.js} +3 -3
  7. package/bundle/{chunk-EE4FVMPM.js → chunk-FJUB4QHG.js} +3 -3
  8. package/bundle/{chunk-46DG3MEK.js → chunk-FLKY6NH5.js} +1 -1
  9. package/bundle/{chunk-XNLASMX4.js → chunk-HHALNKOO.js} +1 -1
  10. package/bundle/{chunk-RQB6UOWL.js → chunk-IESQO4NS.js} +1 -1
  11. package/bundle/{chunk-NTBZBCDY.js → chunk-J7SXW2FI.js} +4 -4
  12. package/bundle/{chunk-RIRMXE4G.js → chunk-KJWA3D3G.js} +7 -7
  13. package/bundle/{chunk-7FPYEHDV.js → chunk-MA35JFUP.js} +7 -7
  14. package/bundle/{chunk-MN5WGELB.js → chunk-NR7L3FXV.js} +4 -4
  15. package/bundle/{chunk-ONZZ4MZP.js → chunk-OQYJODOA.js} +1 -1
  16. package/bundle/{chunk-BRVQMVD5.js → chunk-P7ZJXXPR.js} +2 -2
  17. package/bundle/{chunk-BSE7BCTQ.js → chunk-PS4UL4AP.js} +1 -1
  18. package/bundle/{chunk-T7UXARRX.js → chunk-PZ4GDG24.js} +14895 -7864
  19. package/bundle/{chunk-L3JNREL2.js → chunk-QCHFD56F.js} +5 -7
  20. package/bundle/{chunk-J7KGQZGT.js → chunk-QLNDNLK5.js} +1 -1
  21. package/bundle/{chunk-TVJ4WAFU.js → chunk-QSLJVHXU.js} +8 -9
  22. package/bundle/{chunk-7OAPTXNW.js → chunk-V7G7CIBW.js} +58 -71
  23. package/bundle/{chunk-4TPFLAND.js → chunk-VOLZQW4I.js} +1 -1
  24. package/bundle/{chunk-SQZOWFWU.js → chunk-WLZT2COY.js} +3 -3
  25. package/bundle/{cleanup-5HA3CDPH.js → cleanup-K7PKM5O3.js} +2 -2
  26. package/bundle/{cleanup-LXXTR2OE.js → cleanup-NAOD2SQV.js} +2 -2
  27. package/bundle/{cleanup-RM72YALN.js → cleanup-QRBWTWKF.js} +2 -2
  28. package/bundle/{core-NBQGNNOM.js → core-4P3HPH34.js} +1 -1
  29. package/bundle/{dist-24APVFHT.js → core-ICFDSJL3.js} +1 -1
  30. package/bundle/{devtoolsService-BUAVC3ZD.js → devtoolsService-4MGN7S5K.js} +2 -2
  31. package/bundle/{devtoolsService-PXS65V3Y.js → devtoolsService-7CS2YIL6.js} +3 -4
  32. package/bundle/{devtoolsService-DCRIOTR4.js → devtoolsService-LKOU7QN7.js} +2 -2
  33. package/bundle/{dist-EOOSNLUQ.js → dist-YMXCTNJD.js} +1 -1
  34. package/bundle/{gemini-UEMV4Y7B.js → gemini-6ESINPDZ.js} +14 -14
  35. package/bundle/{gemini-Q4LI2KHU.js → gemini-IPXWMEB5.js} +198 -214
  36. package/bundle/{gemini-LHZDQRUM.js → gemini-Q2GRYIAK.js} +14 -14
  37. package/bundle/gemini.js +7 -7
  38. package/bundle/{interactiveCli-HMZ5ZWK4.js → interactiveCli-2T27ZS4G.js} +8 -8
  39. package/bundle/{interactiveCli-QXZXFSNY.js → interactiveCli-66E5CZDR.js} +8 -8
  40. package/bundle/{interactiveCli-IQQYS4AV.js → interactiveCli-IX4FVS6G.js} +293 -312
  41. package/bundle/{liteRtServerManager-2I4N5IEZ.js → liteRtServerManager-BFSWF4GA.js} +4 -4
  42. package/bundle/{liteRtServerManager-3IZ2LKBD.js → liteRtServerManager-CU5D7FDE.js} +4 -4
  43. package/bundle/{liteRtServerManager-RABYR6TB.js → liteRtServerManager-JJZYMP2G.js} +4 -4
  44. package/bundle/{oauth2-provider-XFPEOXNY.js → oauth2-provider-65ILSORU.js} +1 -1
  45. package/bundle/{oauth2-provider-I3CU23H3.js → oauth2-provider-CHSEPLKC.js} +1 -1
  46. package/bundle/{oauth2-provider-INBLO6HF.js → oauth2-provider-N73PS5ZT.js} +72 -38
  47. package/bundle/{start-4UWH3BI7.js → start-6JMUZJ7T.js} +6 -6
  48. package/bundle/{start-CQTZWDLV.js → start-6KYN7M6S.js} +6 -6
  49. package/bundle/{start-D6DJS7SZ.js → start-YI7IUIYU.js} +6 -6
  50. package/package.json +1 -1
  51. package/bundle/chunk-627EICDK.js +0 -401531
  52. package/bundle/chunk-BYVRH4VZ.js +0 -103137
  53. package/bundle/chunk-H2WBGLUF.js +0 -512
  54. package/bundle/chunk-JLBO43LX.js +0 -154
  55. package/bundle/chunk-POXVKWMH.js +0 -17519
  56. package/bundle/chunk-TDYDNMXH.js +0 -425
  57. package/bundle/chunk-Y3EQFIOM.js +0 -118
  58. package/bundle/chunk-YKGBOB2S.js +0 -1571
  59. package/bundle/cleanup-TBTZ6WZD.js +0 -32
  60. package/bundle/devtoolsService-ZHFOHPIS.js +0 -4359
  61. package/bundle/dist-YP3VMVL6.js +0 -2262
  62. package/bundle/gemini-QM6PZXIH.js +0 -17934
  63. package/bundle/interactiveCli-QCNSW3M7.js +0 -34968
  64. package/bundle/liteRtServerManager-T3MOB7VG.js +0 -65
  65. package/bundle/oauth2-provider-UZV2BJA3.js +0 -235
  66. package/bundle/start-IXFELTCY.js +0 -18
@@ -171,10 +171,10 @@ import {
171
171
  widestLineFromStyledChars,
172
172
  wordBreakStyledChars,
173
173
  wrapStyledChars
174
- } from "./chunk-7FPYEHDV.js";
174
+ } from "./chunk-KJWA3D3G.js";
175
175
  import {
176
176
  require_source
177
- } from "./chunk-2XMCTNPW.js";
177
+ } from "./chunk-ENBP32XB.js";
178
178
  import {
179
179
  appEvents
180
180
  } from "./chunk-5PS3AYFU.js";
@@ -227,37 +227,33 @@ import {
227
227
  stripAnsi,
228
228
  stripUnsafeCharacters,
229
229
  toCodePoints
230
- } from "./chunk-46DG3MEK.js";
230
+ } from "./chunk-PS4UL4AP.js";
231
231
  import {
232
232
  handleAutoUpdate,
233
233
  isDevelopment,
234
234
  relaunchApp,
235
235
  setUpdateHandler
236
- } from "./chunk-TDYDNMXH.js";
236
+ } from "./chunk-P7ZJXXPR.js";
237
237
  import {
238
238
  isTodoList,
239
239
  mapCoreStatusToDisplayStatus,
240
240
  require_react
241
- } from "./chunk-H2WBGLUF.js";
241
+ } from "./chunk-QLNDNLK5.js";
242
242
  import {
243
243
  registerCleanup,
244
244
  removeCleanup,
245
245
  runExitCleanup,
246
246
  setupTtyCheck
247
- } from "./chunk-XNLASMX4.js";
247
+ } from "./chunk-EV5MQULH.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,
@@ -279,20 +275,13 @@ import {
279
275
  GEMMA_4_31B_IT_MODEL,
280
276
  GLOB_DISPLAY_NAME,
281
277
  GREP_DISPLAY_NAME,
282
- GeminiCliOperation,
283
- GeminiEventType,
284
278
  GitService,
285
279
  IdeClient,
286
- Kind,
287
280
  LS_DISPLAY_NAME,
288
281
  LegacyAgentProtocol,
289
282
  LlmRole,
290
283
  Logger,
291
284
  MAX_TOKENS_EXCEEDED_SUGGESTION,
292
- MCPDiscoveryState,
293
- MCPServerStatus,
294
- MessageBusType,
295
- MessageSenderType,
296
285
  ModelNotFoundError,
297
286
  ModelSlashCommandEvent,
298
287
  OTHER_BLOCKED_MESSAGE,
@@ -305,7 +294,6 @@ import {
305
294
  PREVIEW_GEMINI_MODEL,
306
295
  PolicyIntegrityManager,
307
296
  ProjectIdRequiredError,
308
- QuestionType,
309
297
  READ_FILE_DISPLAY_NAME,
310
298
  READ_MANY_FILES_DISPLAY_NAME,
311
299
  RECITATION_BLOCKED_MESSAGE,
@@ -314,22 +302,16 @@ import {
314
302
  SAFETY_BLOCKED_MESSAGE,
315
303
  SHELL_TOOL_NAME,
316
304
  Scheduler,
317
- SessionEndReason,
318
- SessionStartSource,
319
305
  ShellExecutionService,
320
306
  SlashCommandStatus,
321
307
  Storage,
322
- SubagentState,
323
308
  THINKING_ONLY_COMPRESS_SUGGESTION,
324
309
  TOPIC_PARAM_STRATEGIC_INTENT,
325
310
  TOPIC_PARAM_SUMMARY,
326
311
  TOPIC_PARAM_TITLE,
327
312
  TRUE_EMPTY_RESPONSE_MESSAGE,
328
313
  TerminalQuotaError,
329
- ToolConfirmationOutcome,
330
- ToolErrorType,
331
314
  TranscriptionFactory,
332
- TrustLevel,
333
315
  UPDATE_TOPIC_DISPLAY_NAME,
334
316
  UPDATE_TOPIC_TOOL_NAME,
335
317
  UnauthorizedError,
@@ -341,7 +323,6 @@ import {
341
323
  WEB_FETCH_DISPLAY_NAME,
342
324
  WEB_SEARCH_DISPLAY_NAME,
343
325
  WRITE_FILE_DISPLAY_NAME,
344
- WarningPriority,
345
326
  WhisperModelManager,
346
327
  addMCPStatusChangeListener,
347
328
  allowEditorTypeInSandbox,
@@ -449,7 +430,7 @@ import {
449
430
  validatePlanContent,
450
431
  validatePlanPath,
451
432
  writeToStdout
452
- } from "./chunk-MN5WGELB.js";
433
+ } from "./chunk-J7SXW2FI.js";
453
434
  import "./chunk-664ZODQF.js";
454
435
  import "./chunk-IUUIT4SU.js";
455
436
  import "./chunk-L6PII3GR.js";
@@ -5076,7 +5057,7 @@ function calculateShellMaxLines(options) {
5076
5057
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5077
5058
  return maxLinesBasedOnHeight;
5078
5059
  }
5079
- const isExecuting = status === CoreToolCallStatus.Executing;
5060
+ const isExecuting = status === "executing" /* Executing */;
5080
5061
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5081
5062
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5082
5063
  }
@@ -5112,13 +5093,13 @@ var formatToolArgs = (args) => {
5112
5093
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5113
5094
  let headerText;
5114
5095
  let headerColor = theme.text.secondary;
5115
- if (progress.state === SubagentState.CANCELLED) {
5096
+ if (progress.state === "cancelled" /* CANCELLED */) {
5116
5097
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5117
5098
  headerColor = theme.status.warning;
5118
- } else if (progress.state === SubagentState.ERROR) {
5099
+ } else if (progress.state === "error" /* ERROR */) {
5119
5100
  headerText = `Subagent ${progress.agentName} failed.`;
5120
5101
  headerColor = theme.status.error;
5121
- } else if (progress.state === SubagentState.COMPLETED) {
5102
+ } else if (progress.state === "completed" /* COMPLETED */) {
5122
5103
  headerText = `Subagent ${progress.agentName} completed.`;
5123
5104
  headerColor = theme.status.success;
5124
5105
  } else {
@@ -5138,7 +5119,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5138
5119
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color, children: item.content }) })
5139
5120
  ] }, item.id);
5140
5121
  } else if (item.type === "tool_call") {
5141
- 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 });
5122
+ 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 });
5142
5123
  const formattedArgs = item.description || formatToolArgs(item.args);
5143
5124
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5144
5125
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5149,7 +5130,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5149
5130
  {
5150
5131
  bold: true,
5151
5132
  color: theme.text.primary,
5152
- strikethrough: item.status === SubagentState.CANCELLED,
5133
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5153
5134
  children: item.displayName || item.content
5154
5135
  }
5155
5136
  ),
@@ -5158,7 +5139,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5158
5139
  {
5159
5140
  color: theme.text.secondary,
5160
5141
  wrap: "truncate",
5161
- strikethrough: item.status === SubagentState.CANCELLED,
5142
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5162
5143
  children: displayArgs
5163
5144
  }
5164
5145
  ) })
@@ -5178,7 +5159,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5178
5159
  MarkdownDisplay,
5179
5160
  {
5180
5161
  text: safeJsonToMarkdown(progress.result),
5181
- isPending: progress.state !== SubagentState.COMPLETED,
5162
+ isPending: progress.state !== "completed" /* COMPLETED */,
5182
5163
  terminalWidth
5183
5164
  }
5184
5165
  )
@@ -5533,14 +5514,14 @@ var ToolActionsProvider = (props) => {
5533
5514
  }
5534
5515
  const details = tool.confirmationDetails;
5535
5516
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5536
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5517
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5537
5518
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5538
5519
  }
5539
5520
  if (tool.correlationId) {
5540
5521
  await config.getMessageBus().publish({
5541
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5522
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5542
5523
  correlationId: tool.correlationId,
5543
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5524
+ confirmed: outcome !== "cancel" /* Cancel */,
5544
5525
  requiresUserConfirmation: false,
5545
5526
  outcome,
5546
5527
  payload
@@ -5559,7 +5540,7 @@ var ToolActionsProvider = (props) => {
5559
5540
  );
5560
5541
  const cancel = (0, import_react10.useCallback)(
5561
5542
  async (callId) => {
5562
- await confirm(callId, ToolConfirmationOutcome.Cancel);
5543
+ await confirm(callId, "cancel" /* Cancel */);
5563
5544
  },
5564
5545
  [confirm]
5565
5546
  );
@@ -5680,7 +5661,7 @@ var ToolMessage = ({
5680
5661
  paddingX: 1,
5681
5662
  flexDirection: "column",
5682
5663
  children: [
5683
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5664
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5684
5665
  McpProgressIndicator,
5685
5666
  {
5686
5667
  progress,
@@ -5697,8 +5678,8 @@ var ToolMessage = ({
5697
5678
  terminalWidth: safeTerminalWidth,
5698
5679
  renderOutputAsMarkdown,
5699
5680
  hasFocus: isThisShellFocused2,
5700
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5701
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5681
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5682
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5702
5683
  }
5703
5684
  ),
5704
5685
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -6014,7 +5995,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6014
5995
  settings.merged,
6015
5996
  process3.cwd()
6016
5997
  );
6017
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
5998
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6018
5999
  return {
6019
6000
  currentTrustLevel: explicitTrustLevel,
6020
6001
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6059,7 +6040,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6059
6040
  process3.cwd(),
6060
6041
  newConfig
6061
6042
  );
6062
- if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6043
+ if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6063
6044
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6064
6045
  if (source === "file") {
6065
6046
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6133,18 +6114,18 @@ function PermissionsModifyTrustDialog({
6133
6114
  const TRUST_LEVEL_ITEMS = [
6134
6115
  {
6135
6116
  label: `Trust this folder (${dirName})`,
6136
- value: TrustLevel.TRUST_FOLDER,
6137
- key: TrustLevel.TRUST_FOLDER
6117
+ value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6118
+ key: "TRUST_FOLDER" /* TRUST_FOLDER */
6138
6119
  },
6139
6120
  {
6140
6121
  label: `Trust parent folder (${parentFolder})`,
6141
- value: TrustLevel.TRUST_PARENT,
6142
- key: TrustLevel.TRUST_PARENT
6122
+ value: "TRUST_PARENT" /* TRUST_PARENT */,
6123
+ key: "TRUST_PARENT" /* TRUST_PARENT */
6143
6124
  },
6144
6125
  {
6145
6126
  label: "Don't trust",
6146
- value: TrustLevel.DO_NOT_TRUST,
6147
- key: TrustLevel.DO_NOT_TRUST
6127
+ value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6128
+ key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6148
6129
  }
6149
6130
  ];
6150
6131
  const {
@@ -6385,7 +6366,7 @@ var ShellToolMessage = ({
6385
6366
  maxLinesLimit: maxLines
6386
6367
  });
6387
6368
  import_react15.default.useEffect(() => {
6388
- const isExecuting = status === CoreToolCallStatus.Executing;
6369
+ const isExecuting = status === "executing" /* Executing */;
6389
6370
  if (isExecuting && ptyId) {
6390
6371
  try {
6391
6372
  const childWidth = safeTerminalWidth - 4;
@@ -6599,13 +6580,13 @@ var SubagentGroupDisplay = ({
6599
6580
  const singleAgent = toolCalls[0].resultDisplay;
6600
6581
  if (isSubagentProgress(singleAgent)) {
6601
6582
  switch (singleAgent.state) {
6602
- case SubagentState.COMPLETED:
6583
+ case "completed" /* COMPLETED */:
6603
6584
  headerText = "Agent Completed";
6604
6585
  break;
6605
- case SubagentState.CANCELLED:
6586
+ case "cancelled" /* CANCELLED */:
6606
6587
  headerText = "Agent Cancelled";
6607
6588
  break;
6608
- case SubagentState.ERROR:
6589
+ case "error" /* ERROR */:
6609
6590
  headerText = "Agent Error";
6610
6591
  break;
6611
6592
  default:
@@ -6621,8 +6602,8 @@ var SubagentGroupDisplay = ({
6621
6602
  for (const tc of toolCalls) {
6622
6603
  const progress = tc.resultDisplay;
6623
6604
  if (isSubagentProgress(progress)) {
6624
- if (progress.state === SubagentState.COMPLETED) completedCount++;
6625
- else if (progress.state === SubagentState.RUNNING) runningCount++;
6605
+ if (progress.state === "completed" /* COMPLETED */) completedCount++;
6606
+ else if (progress.state === "running" /* RUNNING */) runningCount++;
6626
6607
  } else {
6627
6608
  runningCount++;
6628
6609
  }
@@ -6701,7 +6682,7 @@ var SubagentGroupDisplay = ({
6701
6682
  if (!isExpanded) {
6702
6683
  let content = "Starting...";
6703
6684
  let formattedArgs;
6704
- if (progress.state === SubagentState.COMPLETED) {
6685
+ if (progress.state === "completed" /* COMPLETED */) {
6705
6686
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6706
6687
  content = `Finished Early (${progress.terminateReason})`;
6707
6688
  } else {
@@ -6715,17 +6696,17 @@ var SubagentGroupDisplay = ({
6715
6696
  formattedArgs = formatToolArgs(lastActivity.args);
6716
6697
  }
6717
6698
  }
6718
- const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6699
+ const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6719
6700
  const renderStatusIcon = () => {
6720
- const state = progress.state ?? SubagentState.RUNNING;
6701
+ const state = progress.state ?? "running" /* RUNNING */;
6721
6702
  switch (state) {
6722
- case SubagentState.RUNNING:
6703
+ case "running" /* RUNNING */:
6723
6704
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: "!" });
6724
- case SubagentState.COMPLETED:
6705
+ case "completed" /* COMPLETED */:
6725
6706
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6726
- case SubagentState.CANCELLED:
6707
+ case "cancelled" /* CANCELLED */:
6727
6708
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6728
- case SubagentState.ERROR:
6709
+ case "error" /* ERROR */:
6729
6710
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6730
6711
  default:
6731
6712
  return checkExhaustive(state);
@@ -6778,22 +6759,22 @@ var hasPayload = (res) => {
6778
6759
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6779
6760
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6780
6761
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6781
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6762
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6782
6763
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6783
6764
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6784
6765
  const showDiffStat = !!diff.diffStat;
6785
6766
  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 }) });
6786
6767
  let resultSummary = "";
6787
6768
  let resultColor = theme.text.secondary;
6788
- if (status === CoreToolCallStatus.AwaitingApproval) {
6769
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
6789
6770
  resultSummary = "Confirming";
6790
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6771
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6791
6772
  resultSummary = "Accepted";
6792
6773
  resultColor = theme.text.accent;
6793
- } else if (status === CoreToolCallStatus.Cancelled) {
6774
+ } else if (status === "cancelled" /* Cancelled */) {
6794
6775
  resultSummary = "Rejected";
6795
6776
  resultColor = theme.status.error;
6796
- } else if (status === CoreToolCallStatus.Error) {
6777
+ } else if (status === "error" /* Error */) {
6797
6778
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6798
6779
  resultColor = theme.status.error;
6799
6780
  }
@@ -6824,7 +6805,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6824
6805
  filename: diff.fileName,
6825
6806
  terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
6826
6807
  availableTerminalHeight,
6827
- disableColor: status === CoreToolCallStatus.Cancelled
6808
+ disableColor: status === "cancelled" /* Cancelled */
6828
6809
  }
6829
6810
  );
6830
6811
  return { description, summary, payload };
@@ -6952,10 +6933,10 @@ var DenseToolMessage = (props) => {
6952
6933
  if (isGrepResult(resultDisplay)) {
6953
6934
  return getGenericSuccessData(resultDisplay, originalDescription);
6954
6935
  }
6955
- if (status === CoreToolCallStatus.Success && resultDisplay) {
6936
+ if (status === "success" /* Success */ && resultDisplay) {
6956
6937
  return getGenericSuccessData(resultDisplay, originalDescription);
6957
6938
  }
6958
- if (status === CoreToolCallStatus.Error) {
6939
+ if (status === "error" /* Error */) {
6959
6940
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
6960
6941
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
6961
6942
  "\u2192 ",
@@ -6996,7 +6977,7 @@ var DenseToolMessage = (props) => {
6996
6977
  language: fileExtension,
6997
6978
  maxWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
6998
6979
  settings,
6999
- disableColor: status === CoreToolCallStatus.Cancelled,
6980
+ disableColor: status === "cancelled" /* Cancelled */,
7000
6981
  returnLines: true
7001
6982
  });
7002
6983
  } else {
@@ -7004,7 +6985,7 @@ var DenseToolMessage = (props) => {
7004
6985
  parsedLines,
7005
6986
  filename: diff.fileName,
7006
6987
  terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
7007
- disableColor: status === CoreToolCallStatus.Cancelled
6988
+ disableColor: status === "cancelled" /* Cancelled */
7008
6989
  });
7009
6990
  }
7010
6991
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7141,7 +7122,7 @@ function isToolExecuting(pendingHistoryItems) {
7141
7122
  return pendingHistoryItems.some((item) => {
7142
7123
  if (item && item.type === "tool_group") {
7143
7124
  return item.tools.some(
7144
- (tool) => CoreToolCallStatus.Executing === tool.status
7125
+ (tool) => "executing" /* Executing */ === tool.status
7145
7126
  );
7146
7127
  }
7147
7128
  return false;
@@ -7150,7 +7131,7 @@ function isToolExecuting(pendingHistoryItems) {
7150
7131
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7151
7132
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7152
7133
  (item) => item.tools.some(
7153
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7134
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7154
7135
  )
7155
7136
  );
7156
7137
  }
@@ -7238,7 +7219,7 @@ var ToolGroupMessage = ({
7238
7219
  const groupedTools = (0, import_react19.useMemo)(() => {
7239
7220
  const groups = [];
7240
7221
  for (const tool of visibleToolCalls) {
7241
- if (tool.kind === Kind.Agent) {
7222
+ if (tool.kind === "agent" /* Agent */) {
7242
7223
  const lastGroup = groups[groups.length - 1];
7243
7224
  if (Array.isArray(lastGroup)) {
7244
7225
  lastGroup.push(tool);
@@ -7293,7 +7274,7 @@ var ToolGroupMessage = ({
7293
7274
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7294
7275
  let countToolCallsWithResults = 0;
7295
7276
  for (const tool of visibleToolCalls) {
7296
- if (tool.kind !== Kind.Agent) {
7277
+ if (tool.kind !== "agent" /* Agent */) {
7297
7278
  if (isCompactTool(tool, isCompactModeEnabled)) {
7298
7279
  if (hasDensePayload(tool)) {
7299
7280
  countToolCallsWithResults++;
@@ -7484,7 +7465,7 @@ var ToolGroupDisplay = ({
7484
7465
  }
7485
7466
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7486
7467
  const visibleTools = tools.filter(
7487
- (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7468
+ (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7488
7469
  );
7489
7470
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7490
7471
  const otherTools = visibleTools.filter(
@@ -7686,18 +7667,18 @@ function CompressionMessage({
7686
7667
  return "Compressing chat history";
7687
7668
  }
7688
7669
  switch (compressionStatus) {
7689
- case CompressionStatus.COMPRESSED:
7670
+ case 1 /* COMPRESSED */:
7690
7671
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7691
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7672
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7692
7673
  if (originalTokens < 5e4) {
7693
7674
  return "Compression was not beneficial for this history size.";
7694
7675
  }
7695
7676
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7696
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7677
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7697
7678
  return "Could not compress chat history due to a token counting error.";
7698
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7679
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7699
7680
  return "Chat history compression failed: the model returned an empty summary.";
7700
- case CompressionStatus.NOOP:
7681
+ case 5 /* NOOP */:
7701
7682
  return "Nothing to compress.";
7702
7683
  default:
7703
7684
  return "";
@@ -8135,8 +8116,8 @@ var ModelUsageTable = ({ models }) => {
8135
8116
  );
8136
8117
  roleEntries.sort(([a], [b]) => {
8137
8118
  if (a === b) return 0;
8138
- if (a === LlmRole.MAIN) return -1;
8139
- if (b === LlmRole.MAIN) return 1;
8119
+ if (a === "main" /* MAIN */) return -1;
8120
+ if (b === "main" /* MAIN */) return 1;
8140
8121
  return a.localeCompare(b);
8141
8122
  });
8142
8123
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8467,8 +8448,8 @@ var ModelStatsDisplay = ({
8467
8448
  return validRoles.includes(role);
8468
8449
  }).sort((a, b) => {
8469
8450
  if (a === b) return 0;
8470
- if (a === LlmRole.MAIN) return -1;
8471
- if (b === LlmRole.MAIN) return 1;
8451
+ if (a === "main" /* MAIN */) return -1;
8452
+ if (b === "main" /* MAIN */) return 1;
8472
8453
  return a.localeCompare(b);
8473
8454
  });
8474
8455
  const createRow = (metric, getValue, options = {}) => {
@@ -9259,7 +9240,7 @@ var McpStatus = ({
9259
9240
  );
9260
9241
  const originalStatus = serverStatus(serverName);
9261
9242
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9262
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9243
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9263
9244
  let statusIndicator = "";
9264
9245
  let statusText = "";
9265
9246
  let statusColor = theme.text.primary;
@@ -9271,17 +9252,17 @@ var McpStatus = ({
9271
9252
  statusColor = theme.text.secondary;
9272
9253
  } else {
9273
9254
  switch (status) {
9274
- case MCPServerStatus.CONNECTED:
9255
+ case "connected" /* CONNECTED */:
9275
9256
  statusIndicator = "\u{1F7E2}";
9276
9257
  statusText = "Ready";
9277
9258
  statusColor = theme.status.success;
9278
9259
  break;
9279
- case MCPServerStatus.CONNECTING:
9260
+ case "connecting" /* CONNECTING */:
9280
9261
  statusIndicator = "\u{1F504}";
9281
9262
  statusText = "Starting... (first startup may take longer)";
9282
9263
  statusColor = theme.status.warning;
9283
9264
  break;
9284
- case MCPServerStatus.DISCONNECTED:
9265
+ case "disconnected" /* DISCONNECTED */:
9285
9266
  default:
9286
9267
  statusIndicator = "\u{1F534}";
9287
9268
  statusText = "Disconnected";
@@ -9329,12 +9310,12 @@ var McpStatus = ({
9329
9310
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
9330
9311
  " - ",
9331
9312
  statusText,
9332
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9313
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9333
9314
  ] }),
9334
9315
  authStatusNode
9335
9316
  ] }),
9336
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9337
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
9317
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9318
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
9338
9319
  " (",
9339
9320
  toolCount,
9340
9321
  " tools cached)"
@@ -9895,7 +9876,7 @@ var Notifications = () => {
9895
9876
  if (dismissed) return [];
9896
9877
  const counts = persistentState.get("startupWarningCounts") || {};
9897
9878
  return startupWarnings.filter((w) => {
9898
- if (w.priority === WarningPriority.Low) {
9879
+ if (w.priority === "low" /* Low */) {
9899
9880
  const count = counts[w.id] || 0;
9900
9881
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
9901
9882
  }
@@ -9908,7 +9889,7 @@ var Notifications = () => {
9908
9889
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
9909
9890
  let changed = false;
9910
9891
  visibleWarnings.forEach((w) => {
9911
- if (w.priority === WarningPriority.Low) {
9892
+ if (w.priority === "low" /* Low */) {
9912
9893
  counts[w.id] = (counts[w.id] || 0) + 1;
9913
9894
  changed = true;
9914
9895
  }
@@ -10015,7 +9996,7 @@ var UserIdentity = ({ config }) => {
10015
9996
  }
10016
9997
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { flexDirection: "column", children: [
10017
9998
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { children: [
10018
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { children: [
9999
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { children: [
10019
10000
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { bold: true, children: [
10020
10001
  "Signed in with Google",
10021
10002
  email ? ":" : ""
@@ -10258,7 +10239,7 @@ var import_react30 = __toESM(require_react(), 1);
10258
10239
  function getConfirmingToolState(pendingHistoryItems) {
10259
10240
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10260
10241
  const confirmingTools = allPendingTools.filter(
10261
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10242
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10262
10243
  );
10263
10244
  if (confirmingTools.length === 0) {
10264
10245
  return null;
@@ -11568,7 +11549,7 @@ var ExitPlanModeDialog = ({
11568
11549
  {
11569
11550
  questions: [
11570
11551
  {
11571
- type: QuestionType.CHOICE,
11552
+ type: "choice" /* CHOICE */,
11572
11553
  header: "Approval",
11573
11554
  question: planContent,
11574
11555
  options: [
@@ -11589,9 +11570,9 @@ var ExitPlanModeDialog = ({
11589
11570
  onSubmit: (answers) => {
11590
11571
  const answer = answers["0"];
11591
11572
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11592
- onApprove(ApprovalMode.AUTO_EDIT);
11573
+ onApprove("autoEdit" /* AUTO_EDIT */);
11593
11574
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11594
- onApprove(ApprovalMode.DEFAULT);
11575
+ onApprove("default" /* DEFAULT */);
11595
11576
  } else if (answer) {
11596
11577
  onFeedback(answer);
11597
11578
  }
@@ -11803,7 +11784,7 @@ ${deceptiveUrlWarnings.map(
11803
11784
  );
11804
11785
  (0, import_react35.useEffect)(() => {
11805
11786
  if (isCancelling) {
11806
- handleConfirm(ToolConfirmationOutcome.Cancel);
11787
+ handleConfirm("cancel" /* Cancel */);
11807
11788
  }
11808
11789
  }, [isCancelling, handleConfirm]);
11809
11790
  const handleSelect = (0, import_react35.useCallback)(
@@ -11816,19 +11797,19 @@ ${deceptiveUrlWarnings.map(
11816
11797
  if (!confirmationDetails.isModifying) {
11817
11798
  options2.push({
11818
11799
  label: "Allow once",
11819
- value: ToolConfirmationOutcome.ProceedOnce,
11800
+ value: "proceed_once" /* ProceedOnce */,
11820
11801
  key: "Allow once"
11821
11802
  });
11822
11803
  if (isTrustedFolder && !confirmationDetails.isBuildFile) {
11823
11804
  options2.push({
11824
11805
  label: "Allow for this session",
11825
- value: ToolConfirmationOutcome.ProceedAlways,
11806
+ value: "proceed_always" /* ProceedAlways */,
11826
11807
  key: "Allow for this session"
11827
11808
  });
11828
11809
  if (allowPermanentApproval) {
11829
11810
  options2.push({
11830
11811
  label: "Allow for this file in all future sessions",
11831
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11812
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11832
11813
  key: "Allow for this file in all future sessions"
11833
11814
  });
11834
11815
  }
@@ -11836,45 +11817,45 @@ ${deceptiveUrlWarnings.map(
11836
11817
  if (!config.getIdeMode() || !isDiffingEnabled) {
11837
11818
  options2.push({
11838
11819
  label: "Modify with external editor",
11839
- value: ToolConfirmationOutcome.ModifyWithEditor,
11820
+ value: "modify_with_editor" /* ModifyWithEditor */,
11840
11821
  key: "Modify with external editor"
11841
11822
  });
11842
11823
  }
11843
11824
  options2.push({
11844
11825
  label: "No, suggest changes (esc)",
11845
- value: ToolConfirmationOutcome.Cancel,
11826
+ value: "cancel" /* Cancel */,
11846
11827
  key: "No, suggest changes (esc)"
11847
11828
  });
11848
11829
  }
11849
11830
  } else if (confirmationDetails.type === "sandbox_expansion") {
11850
11831
  options2.push({
11851
11832
  label: "Allow once",
11852
- value: ToolConfirmationOutcome.ProceedOnce,
11833
+ value: "proceed_once" /* ProceedOnce */,
11853
11834
  key: "Allow once"
11854
11835
  });
11855
11836
  if (isTrustedFolder) {
11856
11837
  options2.push({
11857
11838
  label: "Allow for this session",
11858
- value: ToolConfirmationOutcome.ProceedAlways,
11839
+ value: "proceed_always" /* ProceedAlways */,
11859
11840
  key: "Allow for this session"
11860
11841
  });
11861
11842
  if (allowPermanentApproval) {
11862
11843
  options2.push({
11863
11844
  label: "Allow for all future sessions",
11864
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11845
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11865
11846
  key: "Allow for all future sessions"
11866
11847
  });
11867
11848
  }
11868
11849
  }
11869
11850
  options2.push({
11870
11851
  label: "No, suggest changes (esc)",
11871
- value: ToolConfirmationOutcome.Cancel,
11852
+ value: "cancel" /* Cancel */,
11872
11853
  key: "No, suggest changes (esc)"
11873
11854
  });
11874
11855
  } else if (confirmationDetails.type === "exec") {
11875
11856
  options2.push({
11876
11857
  label: "Allow once",
11877
- value: ToolConfirmationOutcome.ProceedOnce,
11858
+ value: "proceed_once" /* ProceedOnce */,
11878
11859
  key: "Allow once"
11879
11860
  });
11880
11861
  const hasUntrustedFlags = confirmationDetails.untrustedFlags && confirmationDetails.untrustedFlags.length > 0;
@@ -11882,75 +11863,75 @@ ${deceptiveUrlWarnings.map(
11882
11863
  if (isTrustedFolder && !hasUntrustedFlags && !hasModifiedBuildFiles) {
11883
11864
  options2.push({
11884
11865
  label: `Allow for this session`,
11885
- value: ToolConfirmationOutcome.ProceedAlways,
11866
+ value: "proceed_always" /* ProceedAlways */,
11886
11867
  key: `Allow for this session`
11887
11868
  });
11888
11869
  if (allowPermanentApproval) {
11889
11870
  options2.push({
11890
11871
  label: `Allow this command for all future sessions`,
11891
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11872
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11892
11873
  key: `Allow for all future sessions`
11893
11874
  });
11894
11875
  }
11895
11876
  }
11896
11877
  options2.push({
11897
11878
  label: "No, suggest changes (esc)",
11898
- value: ToolConfirmationOutcome.Cancel,
11879
+ value: "cancel" /* Cancel */,
11899
11880
  key: "No, suggest changes (esc)"
11900
11881
  });
11901
11882
  } else if (confirmationDetails.type === "info") {
11902
11883
  options2.push({
11903
11884
  label: "Allow once",
11904
- value: ToolConfirmationOutcome.ProceedOnce,
11885
+ value: "proceed_once" /* ProceedOnce */,
11905
11886
  key: "Allow once"
11906
11887
  });
11907
11888
  if (isTrustedFolder) {
11908
11889
  options2.push({
11909
11890
  label: "Allow for this session",
11910
- value: ToolConfirmationOutcome.ProceedAlways,
11891
+ value: "proceed_always" /* ProceedAlways */,
11911
11892
  key: "Allow for this session"
11912
11893
  });
11913
11894
  if (allowPermanentApproval) {
11914
11895
  options2.push({
11915
11896
  label: "Allow for all future sessions",
11916
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11897
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11917
11898
  key: "Allow for all future sessions"
11918
11899
  });
11919
11900
  }
11920
11901
  }
11921
11902
  options2.push({
11922
11903
  label: "No, suggest changes (esc)",
11923
- value: ToolConfirmationOutcome.Cancel,
11904
+ value: "cancel" /* Cancel */,
11924
11905
  key: "No, suggest changes (esc)"
11925
11906
  });
11926
11907
  } else if (confirmationDetails.type === "mcp") {
11927
11908
  options2.push({
11928
11909
  label: "Allow once",
11929
- value: ToolConfirmationOutcome.ProceedOnce,
11910
+ value: "proceed_once" /* ProceedOnce */,
11930
11911
  key: "Allow once"
11931
11912
  });
11932
11913
  if (isTrustedFolder) {
11933
11914
  options2.push({
11934
11915
  label: "Allow tool for this session",
11935
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
11916
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
11936
11917
  key: "Allow tool for this session"
11937
11918
  });
11938
11919
  options2.push({
11939
11920
  label: "Allow all server tools for this session",
11940
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
11921
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
11941
11922
  key: "Allow all server tools for this session"
11942
11923
  });
11943
11924
  if (allowPermanentApproval) {
11944
11925
  options2.push({
11945
11926
  label: "Allow tool for all future sessions",
11946
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11927
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11947
11928
  key: "Allow tool for all future sessions"
11948
11929
  });
11949
11930
  }
11950
11931
  }
11951
11932
  options2.push({
11952
11933
  label: "No, suggest changes (esc)",
11953
- value: ToolConfirmationOutcome.Cancel,
11934
+ value: "cancel" /* Cancel */,
11954
11935
  key: "No, suggest changes (esc)"
11955
11936
  });
11956
11937
  }
@@ -11991,7 +11972,7 @@ ${deceptiveUrlWarnings.map(
11991
11972
  const containsRedirection = commandsToDisplay.some(
11992
11973
  (cmd) => hasRedirection(cmd)
11993
11974
  );
11994
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
11975
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
11995
11976
  if (containsRedirection && !isAutoEdit) {
11996
11977
  extraInfoLines = 1;
11997
11978
  }
@@ -12018,7 +11999,7 @@ ${deceptiveUrlWarnings.map(
12018
11999
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12019
12000
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12020
12001
  const alwaysAndSaveIndex = options2.findIndex(
12021
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12002
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12022
12003
  );
12023
12004
  if (alwaysAndSaveIndex !== -1) {
12024
12005
  initialIndex2 = alwaysAndSaveIndex;
@@ -12067,10 +12048,10 @@ Ensure you trust all modifications made to build files before approving executio
12067
12048
  {
12068
12049
  questions: confirmationDetails.questions,
12069
12050
  onSubmit: (answers) => {
12070
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12051
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12071
12052
  },
12072
12053
  onCancel: () => {
12073
- handleConfirm(ToolConfirmationOutcome.Cancel);
12054
+ handleConfirm("cancel" /* Cancel */);
12074
12055
  },
12075
12056
  width: safeTerminalWidth,
12076
12057
  availableHeight: bodyHeight
@@ -12091,19 +12072,19 @@ Ensure you trust all modifications made to build files before approving executio
12091
12072
  planPath: confirmationDetails.planPath,
12092
12073
  getPreferredEditor,
12093
12074
  onApprove: (approvalMode) => {
12094
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12075
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12095
12076
  approved: true,
12096
12077
  approvalMode
12097
12078
  });
12098
12079
  },
12099
12080
  onFeedback: (feedback) => {
12100
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12081
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12101
12082
  approved: false,
12102
12083
  feedback
12103
12084
  });
12104
12085
  },
12105
12086
  onCancel: () => {
12106
- handleConfirm(ToolConfirmationOutcome.Cancel);
12087
+ handleConfirm("cancel" /* Cancel */);
12107
12088
  },
12108
12089
  width: safeTerminalWidth,
12109
12090
  availableHeight: bodyHeight
@@ -12213,7 +12194,7 @@ Ensure you trust all modifications made to build files before approving executio
12213
12194
  const containsRedirection = commandsToDisplay.some(
12214
12195
  (cmd) => hasRedirection(cmd)
12215
12196
  );
12216
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12197
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12217
12198
  let warnings = null;
12218
12199
  if (containsRedirection && !isAutoEdit) {
12219
12200
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12372,7 +12353,7 @@ Ensure you trust all modifications made to build files before approving executio
12372
12353
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12373
12354
  const renderRadioItem = (0, import_react35.useCallback)(
12374
12355
  (item, { titleColor }) => {
12375
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12356
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12376
12357
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12377
12358
  item.label,
12378
12359
  " ",
@@ -12761,7 +12742,7 @@ var MainContent = () => {
12761
12742
  const hasConfirmationQueue = Boolean(
12762
12743
  showConfirmationQueue && confirmingTool
12763
12744
  );
12764
- const isVisiblePendingItem = (item) => item.type !== "tool_group" || item.tools.some((t) => t.status !== CoreToolCallStatus.AwaitingApproval);
12745
+ const isVisiblePendingItem = (item) => item.type !== "tool_group" || item.tools.some((t) => t.status !== "awaiting_approval" /* AwaitingApproval */);
12765
12746
  const visiblePendingCount = pendingHistoryItems.filter(isVisiblePendingItem).length;
12766
12747
  const shouldPartitionHeight = !isAlternateBufferOrTerminalBuffer && hasConfirmationQueue && visiblePendingCount > 0;
12767
12748
  const pendingCount = Math.max(1, visiblePendingCount);
@@ -14465,7 +14446,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14465
14446
  if (settings.merged.security.auth.useExternal) {
14466
14447
  return null;
14467
14448
  }
14468
- if (authType === AuthType.USE_GEMINI) {
14449
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14469
14450
  return null;
14470
14451
  }
14471
14452
  return validateAuthMethod(authType);
@@ -14517,7 +14498,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14517
14498
  }
14518
14499
  return;
14519
14500
  }
14520
- if (authType === AuthType.USE_GEMINI) {
14501
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14521
14502
  const key = await reloadApiKey();
14522
14503
  if (!key) {
14523
14504
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14595,31 +14576,31 @@ function AuthDialog({
14595
14576
  let items = [
14596
14577
  {
14597
14578
  label: "Sign in with Google",
14598
- value: AuthType.LOGIN_WITH_GOOGLE,
14599
- key: AuthType.LOGIN_WITH_GOOGLE
14579
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14580
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14600
14581
  },
14601
14582
  ...process.env["CLOUD_SHELL"] === "true" ? [
14602
14583
  {
14603
14584
  label: "Use Cloud Shell user credentials",
14604
- value: AuthType.COMPUTE_ADC,
14605
- key: AuthType.COMPUTE_ADC
14585
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14586
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14606
14587
  }
14607
14588
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14608
14589
  {
14609
14590
  label: "Use metadata server application default credentials",
14610
- value: AuthType.COMPUTE_ADC,
14611
- key: AuthType.COMPUTE_ADC
14591
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14592
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14612
14593
  }
14613
14594
  ] : [],
14614
14595
  {
14615
14596
  label: "Use Gemini API Key",
14616
- value: AuthType.USE_GEMINI,
14617
- key: AuthType.USE_GEMINI
14597
+ value: "gemini-api-key" /* USE_GEMINI */,
14598
+ key: "gemini-api-key" /* USE_GEMINI */
14618
14599
  },
14619
14600
  {
14620
14601
  label: "Vertex AI",
14621
- value: AuthType.USE_VERTEX_AI,
14622
- key: AuthType.USE_VERTEX_AI
14602
+ value: "vertex-ai" /* USE_VERTEX_AI */,
14603
+ key: "vertex-ai" /* USE_VERTEX_AI */
14623
14604
  }
14624
14605
  ];
14625
14606
  if (settings.merged.security.auth.enforcedType) {
@@ -14641,9 +14622,9 @@ function AuthDialog({
14641
14622
  return item.value === defaultAuthType;
14642
14623
  }
14643
14624
  if (process.env["GEMINI_API_KEY"]) {
14644
- return item.value === AuthType.USE_GEMINI;
14625
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
14645
14626
  }
14646
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
14627
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14647
14628
  });
14648
14629
  if (settings.merged.security.auth.enforcedType) {
14649
14630
  initialAuthIndex = 0;
@@ -14654,7 +14635,7 @@ function AuthDialog({
14654
14635
  return;
14655
14636
  }
14656
14637
  if (authType) {
14657
- const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14638
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14658
14639
  if (needsRestart) {
14659
14640
  setAuthContext({ requiresRestart: true });
14660
14641
  } else {
@@ -14665,7 +14646,7 @@ function AuthDialog({
14665
14646
  await clearCachedCredentialFile();
14666
14647
  }
14667
14648
  settings.setValue(scope, "security.auth.selectedType", authType);
14668
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14649
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14669
14650
  setExiting(true);
14670
14651
  setTimeout(() => {
14671
14652
  void relaunchApp({ overrideAuthType: authType }).catch((err) => {
@@ -14675,7 +14656,7 @@ function AuthDialog({
14675
14656
  }, 100);
14676
14657
  return;
14677
14658
  }
14678
- if (authType === AuthType.USE_GEMINI) {
14659
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14679
14660
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14680
14661
  return;
14681
14662
  }
@@ -15482,11 +15463,11 @@ var PrivacyNoticeText = ({
15482
15463
  }) => {
15483
15464
  const authType = config.getContentGeneratorConfig()?.authType;
15484
15465
  switch (authType) {
15485
- case AuthType.USE_GEMINI:
15466
+ case "gemini-api-key" /* USE_GEMINI */:
15486
15467
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GeminiPrivacyNotice, { onExit });
15487
- case AuthType.USE_VERTEX_AI:
15468
+ case "vertex-ai" /* USE_VERTEX_AI */:
15488
15469
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudPaidPrivacyNotice, { onExit });
15489
- case AuthType.LOGIN_WITH_GOOGLE:
15470
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15490
15471
  default:
15491
15472
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudFreePrivacyNotice, { config, onExit });
15492
15473
  }
@@ -15546,7 +15527,7 @@ function ProQuotaDialog({
15546
15527
  value: "retry_always",
15547
15528
  key: "retry_always"
15548
15529
  },
15549
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15530
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15550
15531
  {
15551
15532
  label: "Upgrade for higher limits",
15552
15533
  value: "upgrade",
@@ -16713,7 +16694,7 @@ function ModelDialog({ onClose }) {
16713
16694
  const useLatestFlash = config?.hasLatestFlashGAAccess?.() ?? false;
16714
16695
  const useLatestFlashLite = config?.hasLatestFlashLiteGAAccess?.() ?? false;
16715
16696
  const selectedAuthType = settings.merged.security.auth.selectedType;
16716
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16697
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16717
16698
  const manualModelSelected = (0, import_react53.useMemo)(() => {
16718
16699
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16719
16700
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -18041,10 +18022,10 @@ function initializeConsoleStore() {
18041
18022
  globalConsoleMessages = [];
18042
18023
  globalErrorCount = 0;
18043
18024
  notifyListeners();
18044
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
18045
- coreEvents.off(CoreEvent.Output, handleOutput);
18046
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
18047
- coreEvents.on(CoreEvent.Output, handleOutput);
18025
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
18026
+ coreEvents.off("output" /* Output */, handleOutput);
18027
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
18028
+ coreEvents.on("output" /* Output */, handleOutput);
18048
18029
  }
18049
18030
  function notifyListeners() {
18050
18031
  for (const listener of listeners) {
@@ -20181,7 +20162,7 @@ function usePromptCompletion({
20181
20162
  { model: "prompt-completion" },
20182
20163
  contents,
20183
20164
  signal,
20184
- LlmRole.UTILITY_AUTOCOMPLETE
20165
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20185
20166
  );
20186
20167
  if (signal.aborted) {
20187
20168
  return;
@@ -22260,9 +22241,9 @@ var InputPrompt = ({
22260
22241
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22261
22242
  }
22262
22243
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22263
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22264
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22265
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22244
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22245
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22246
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22266
22247
  let statusColor;
22267
22248
  let statusText = "";
22268
22249
  if (shellModeActive) {
@@ -23096,22 +23077,22 @@ var ApprovalModeIndicator = ({
23096
23077
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23097
23078
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23098
23079
  switch (approvalMode) {
23099
- case ApprovalMode.AUTO_EDIT:
23080
+ case "autoEdit" /* AUTO_EDIT */:
23100
23081
  textColor = theme.status.warning;
23101
23082
  textContent = "auto-accept edits";
23102
23083
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23103
23084
  break;
23104
- case ApprovalMode.PLAN:
23085
+ case "plan" /* PLAN */:
23105
23086
  textColor = theme.status.success;
23106
23087
  textContent = "plan";
23107
23088
  subText = `${cycleHint} to manual`;
23108
23089
  break;
23109
- case ApprovalMode.YOLO:
23090
+ case "yolo" /* YOLO */:
23110
23091
  textColor = theme.status.error;
23111
23092
  textContent = "YOLO";
23112
23093
  subText = yoloHint;
23113
23094
  break;
23114
- case ApprovalMode.DEFAULT:
23095
+ case "default" /* DEFAULT */:
23115
23096
  default:
23116
23097
  textColor = theme.text.accent;
23117
23098
  textContent = "";
@@ -23159,7 +23140,7 @@ var useComposerStatus = () => {
23159
23140
  (item) => item.type === "tool_group"
23160
23141
  ).some(
23161
23142
  (item) => item.tools.some(
23162
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23143
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23163
23144
  )
23164
23145
  ),
23165
23146
  [uiState.pendingHistoryItems]
@@ -23174,13 +23155,13 @@ var useComposerStatus = () => {
23174
23155
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23175
23156
  if (hideMinimalModeHintWhileBusy) return null;
23176
23157
  switch (showApprovalModeIndicator) {
23177
- case ApprovalMode.YOLO:
23158
+ case "yolo" /* YOLO */:
23178
23159
  return { text: "YOLO", color: theme.status.error };
23179
- case ApprovalMode.PLAN:
23160
+ case "plan" /* PLAN */:
23180
23161
  return { text: "plan", color: theme.status.success };
23181
- case ApprovalMode.AUTO_EDIT:
23162
+ case "autoEdit" /* AUTO_EDIT */:
23182
23163
  return { text: "auto edit", color: theme.status.warning };
23183
- case ApprovalMode.DEFAULT:
23164
+ case "default" /* DEFAULT */:
23184
23165
  default:
23185
23166
  return null;
23186
23167
  }
@@ -23542,7 +23523,7 @@ var ConfigInitDisplay = ({
23542
23523
  let connected = 0;
23543
23524
  const connecting = [];
23544
23525
  for (const [name, client] of clients.entries()) {
23545
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23526
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23546
23527
  connected++;
23547
23528
  } else {
23548
23529
  connecting.push(name);
@@ -23564,9 +23545,9 @@ var ConfigInitDisplay = ({
23564
23545
  );
23565
23546
  }
23566
23547
  };
23567
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23548
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23568
23549
  return () => {
23569
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23550
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23570
23551
  };
23571
23552
  }, [initialMessage]);
23572
23553
  return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { children: [
@@ -24287,7 +24268,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24287
24268
  callId,
24288
24269
  name: SHELL_COMMAND_NAME,
24289
24270
  description: rawQuery,
24290
- status: CoreToolCallStatus.Executing,
24271
+ status: "executing" /* Executing */,
24291
24272
  isClientInitiated: true,
24292
24273
  resultDisplay: "",
24293
24274
  confirmationDetails: void 0
@@ -24428,7 +24409,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24428
24409
  mainContent = result.output.trim() || "(Command produced no output)";
24429
24410
  }
24430
24411
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24431
- let finalStatus = CoreToolCallStatus.Success;
24412
+ let finalStatus = "success" /* Success */;
24432
24413
  const prependToAnsiOutput = (output, text) => {
24433
24414
  const newLines = text.split("\n").map((line) => [
24434
24415
  {
@@ -24447,20 +24428,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24447
24428
  };
24448
24429
  let prefix = "";
24449
24430
  if (result.error) {
24450
- finalStatus = CoreToolCallStatus.Error;
24431
+ finalStatus = "error" /* Error */;
24451
24432
  prefix = result.error.message;
24452
24433
  } else if (result.aborted) {
24453
- finalStatus = CoreToolCallStatus.Cancelled;
24434
+ finalStatus = "cancelled" /* Cancelled */;
24454
24435
  prefix = "Command was cancelled.";
24455
24436
  } else if (result.backgrounded) {
24456
- finalStatus = CoreToolCallStatus.Success;
24437
+ finalStatus = "success" /* Success */;
24457
24438
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24458
24439
  mainContent = finalOutput;
24459
24440
  } else if (result.signal) {
24460
- finalStatus = CoreToolCallStatus.Error;
24441
+ finalStatus = "error" /* Error */;
24461
24442
  prefix = `Command terminated by signal: ${result.signal}.`;
24462
24443
  } else if (result.exitCode !== 0) {
24463
- finalStatus = CoreToolCallStatus.Error;
24444
+ finalStatus = "error" /* Error */;
24464
24445
  prefix = `Command exited with code ${result.exitCode}.`;
24465
24446
  }
24466
24447
  if (prefix) {
@@ -24486,7 +24467,7 @@ ${mainContent}`;
24486
24467
  status: finalStatus,
24487
24468
  resultDisplay: finalOutput
24488
24469
  };
24489
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24470
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24490
24471
  addItemToHistory(
24491
24472
  {
24492
24473
  type: "tool_group",
@@ -25496,13 +25477,13 @@ function useQuotaAndFallback({
25496
25477
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25497
25478
  `/stats model for usage details`,
25498
25479
  `/model to switch models.`,
25499
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25480
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25500
25481
  ].filter(Boolean);
25501
25482
  message = messageLines.join("\n");
25502
25483
  }
25503
25484
  } else if (error instanceof ModelNotFoundError) {
25504
25485
  isModelNotFoundError = true;
25505
- if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
25486
+ if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
25506
25487
  const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
25507
25488
  const messageLines = [
25508
25489
  `Model "${failedModel}" is not available in region "${location}".`,
@@ -25696,7 +25677,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25696
25677
  );
25697
25678
  setEditorError(null);
25698
25679
  setIsEditorDialogOpen(false);
25699
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25680
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25700
25681
  } catch (error) {
25701
25682
  setEditorError(`Failed to set editor preference: ${error}`);
25702
25683
  }
@@ -25705,7 +25686,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25705
25686
  );
25706
25687
  const exitEditorDialog = (0, import_react89.useCallback)(() => {
25707
25688
  setIsEditorDialogOpen(false);
25708
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25689
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25709
25690
  }, []);
25710
25691
  return {
25711
25692
  isEditorDialogOpen,
@@ -26082,7 +26063,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26082
26063
  canonicalPath: resolvedCommandPath
26083
26064
  } = parseSlashCommand(trimmed, commands);
26084
26065
  if (!commandToExecute) {
26085
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
26066
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
26086
26067
  if (isMcpLoading) {
26087
26068
  setIsProcessing(true);
26088
26069
  if (addToHistory) {
@@ -26262,7 +26243,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26262
26243
  onConfirm: async (resolvedOutcome) => {
26263
26244
  resolve3({
26264
26245
  outcome: resolvedOutcome,
26265
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26246
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26266
26247
  });
26267
26248
  }
26268
26249
  };
@@ -26270,7 +26251,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26270
26251
  callId,
26271
26252
  name: "Expansion",
26272
26253
  description: "Command expansion needs shell access",
26273
- status: CoreToolCallStatus.AwaitingApproval,
26254
+ status: "awaiting_approval" /* AwaitingApproval */,
26274
26255
  isClientInitiated: true,
26275
26256
  resultDisplay: void 0,
26276
26257
  confirmationDetails
@@ -26281,7 +26262,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26281
26262
  });
26282
26263
  });
26283
26264
  setPendingItem(null);
26284
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26265
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26285
26266
  addItem(
26286
26267
  {
26287
26268
  type: "info" /* INFO */,
@@ -26291,7 +26272,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26291
26272
  );
26292
26273
  return { type: "handled" };
26293
26274
  }
26294
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26275
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26295
26276
  setSessionShellAllowlist(
26296
26277
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26297
26278
  );
@@ -26767,7 +26748,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26767
26748
  let description;
26768
26749
  let renderOutputAsMarkdown = false;
26769
26750
  const displayName = call.tool?.displayName ?? call.request.name;
26770
- if (call.status === CoreToolCallStatus.Error) {
26751
+ if (call.status === "error" /* Error */) {
26771
26752
  description = JSON.stringify(call.request.args);
26772
26753
  } else {
26773
26754
  description = call.invocation.getDescription();
@@ -26790,27 +26771,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26790
26771
  let progress = void 0;
26791
26772
  let progressTotal = void 0;
26792
26773
  switch (call.status) {
26793
- case CoreToolCallStatus.Success:
26774
+ case "success" /* Success */:
26794
26775
  resultDisplay = call.response.resultDisplay;
26795
26776
  outputFile = call.response.outputFile;
26796
26777
  break;
26797
- case CoreToolCallStatus.Error:
26798
- case CoreToolCallStatus.Cancelled:
26778
+ case "error" /* Error */:
26779
+ case "cancelled" /* Cancelled */:
26799
26780
  resultDisplay = call.response.resultDisplay;
26800
26781
  break;
26801
- case CoreToolCallStatus.AwaitingApproval:
26782
+ case "awaiting_approval" /* AwaitingApproval */:
26802
26783
  correlationId = call.correlationId;
26803
26784
  confirmationDetails = call.confirmationDetails;
26804
26785
  break;
26805
- case CoreToolCallStatus.Executing:
26786
+ case "executing" /* Executing */:
26806
26787
  resultDisplay = call.liveOutput;
26807
26788
  ptyId = call.pid;
26808
26789
  progressMessage = call.progressMessage;
26809
26790
  progress = call.progress;
26810
26791
  progressTotal = call.progressTotal;
26811
26792
  break;
26812
- case CoreToolCallStatus.Scheduled:
26813
- case CoreToolCallStatus.Validating:
26793
+ case "scheduled" /* Scheduled */:
26794
+ case "validating" /* Validating */:
26814
26795
  break;
26815
26796
  default: {
26816
26797
  const exhaustiveCheck = call;
@@ -26881,7 +26862,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26881
26862
  const handler = (event) => {
26882
26863
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26883
26864
  const hasExecuting = event.toolCalls.some(
26884
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26865
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26885
26866
  );
26886
26867
  if (hasExecuting) {
26887
26868
  setLastToolOutputTime(Date.now());
@@ -26890,7 +26871,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26890
26871
  const prevCalls = prev[event.schedulerId] ?? [];
26891
26872
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26892
26873
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26893
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26874
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26894
26875
  );
26895
26876
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26896
26877
  return prev;
@@ -26902,9 +26883,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26902
26883
  };
26903
26884
  });
26904
26885
  };
26905
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26886
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26906
26887
  return () => {
26907
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26888
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26908
26889
  };
26909
26890
  }, [messageBus, internalAdaptToolCalls]);
26910
26891
  (0, import_react96.useEffect)(() => {
@@ -26926,9 +26907,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26926
26907
  };
26927
26908
  });
26928
26909
  };
26929
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26910
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26930
26911
  return () => {
26931
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26912
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26932
26913
  };
26933
26914
  }, [messageBus]);
26934
26915
  const schedule = (0, import_react96.useCallback)(
@@ -27027,8 +27008,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
27027
27008
  const prev = prevMap.get(coreCall.request.callId);
27028
27009
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
27029
27010
  let status = coreCall.status;
27030
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
27031
- status = CoreToolCallStatus.Executing;
27011
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
27012
+ status = "executing" /* Executing */;
27032
27013
  }
27033
27014
  return {
27034
27015
  ...coreCall,
@@ -27060,7 +27041,7 @@ function getBackgroundedToolInfo(toolCall) {
27060
27041
  };
27061
27042
  }
27062
27043
  function isBackgroundableExecutingToolCall(toolCall) {
27063
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
27044
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
27064
27045
  }
27065
27046
  function showCitations(settings) {
27066
27047
  const enabled = settings.merged.ui.showCitations;
@@ -27070,14 +27051,14 @@ function showCitations(settings) {
27070
27051
  return true;
27071
27052
  }
27072
27053
  function calculateStreamingState(isResponding, toolCalls) {
27073
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
27054
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
27074
27055
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
27075
27056
  }
27076
27057
  const isAnyToolActive = toolCalls.some((tc) => {
27077
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
27058
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
27078
27059
  return true;
27079
27060
  }
27080
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
27061
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
27081
27062
  return !tc.responseSubmittedToGemini;
27082
27063
  }
27083
27064
  return false;
@@ -27123,9 +27104,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27123
27104
  }
27124
27105
  setRetryStatus(payload);
27125
27106
  };
27126
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
27107
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27127
27108
  return () => {
27128
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
27109
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27129
27110
  };
27130
27111
  }, [isRespondingRef]);
27131
27112
  const [
@@ -27258,12 +27239,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27258
27239
  const tc = toolCalls[i];
27259
27240
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27260
27241
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27261
- const isAgent = tc.tool?.kind === Kind.Agent;
27242
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
27262
27243
  if (isAgent) {
27263
27244
  let contigAgentsComplete = true;
27264
27245
  for (let j = i + 1; j < toolCalls.length; j++) {
27265
27246
  const nextTc = toolCalls[j];
27266
- if (nextTc.tool?.kind === Kind.Agent) {
27247
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
27267
27248
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27268
27249
  contigAgentsComplete = false;
27269
27250
  break;
@@ -27289,7 +27270,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27289
27270
  let currentGroup = [];
27290
27271
  for (const tc of toolsToPush) {
27291
27272
  newPushed.add(tc.request.callId);
27292
- if (tc.tool?.kind === Kind.Agent) {
27273
+ if (tc.tool?.kind === "agent" /* Agent */) {
27293
27274
  currentGroup.push(tc);
27294
27275
  } else {
27295
27276
  if (currentGroup.length > 0) {
@@ -27442,7 +27423,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27442
27423
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27443
27424
  }, [activeShellPtyId, addItem, setIsResponding]);
27444
27425
  (0, import_react97.useEffect)(() => {
27445
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27426
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27446
27427
  const lastUserMessageIndex = history.findLastIndex(
27447
27428
  (item) => item.type === "user" /* USER */
27448
27429
  );
@@ -27510,7 +27491,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27510
27491
  return;
27511
27492
  }
27512
27493
  const hasActiveTools = toolCalls.some(
27513
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27494
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27514
27495
  );
27515
27496
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27516
27497
  if (clearBuffer) {
@@ -27537,7 +27518,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27537
27518
  if (tool.name === SHELL_COMMAND_NAME) {
27538
27519
  return {
27539
27520
  ...tool,
27540
- status: CoreToolCallStatus.Cancelled,
27521
+ status: "cancelled" /* Cancelled */,
27541
27522
  resultDisplay: tool.resultDisplay
27542
27523
  };
27543
27524
  }
@@ -27602,7 +27583,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27602
27583
  let localQueryToSendToGemini = null;
27603
27584
  if (typeof query === "string") {
27604
27585
  const trimmedQuery = query.trim();
27605
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27586
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
27606
27587
  if (!shellModeActive) {
27607
27588
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27608
27589
  if (slashCommandResult) {
@@ -27758,7 +27739,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27758
27739
  if (pendingHistoryItemRef.current) {
27759
27740
  if (pendingHistoryItemRef.current.type === "tool_group") {
27760
27741
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27761
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27742
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27762
27743
  );
27763
27744
  const pendingItem = {
27764
27745
  ...pendingHistoryItemRef.current,
@@ -28050,15 +28031,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28050
28031
  let geminiMessageBuffer = "";
28051
28032
  const toolCallRequests = [];
28052
28033
  for await (const event of stream) {
28053
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
28034
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
28054
28035
  setThought(null);
28055
28036
  }
28056
28037
  switch (event.type) {
28057
- case GeminiEventType.Thought:
28038
+ case "thought" /* Thought */:
28058
28039
  setLastGeminiActivityTime(Date.now());
28059
28040
  handleThoughtEvent(event.value, userMessageTimestamp);
28060
28041
  break;
28061
- case GeminiEventType.Content:
28042
+ case "content" /* Content */:
28062
28043
  setLastGeminiActivityTime(Date.now());
28063
28044
  geminiMessageBuffer = handleContentEvent(
28064
28045
  event.value,
@@ -28066,16 +28047,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28066
28047
  userMessageTimestamp
28067
28048
  );
28068
28049
  break;
28069
- case GeminiEventType.ToolCallRequest:
28050
+ case "tool_call_request" /* ToolCallRequest */:
28070
28051
  toolCallRequests.push(event.value);
28071
28052
  break;
28072
- case GeminiEventType.UserCancelled:
28053
+ case "user_cancelled" /* UserCancelled */:
28073
28054
  handleUserCancelledEvent(userMessageTimestamp);
28074
28055
  break;
28075
- case GeminiEventType.Error:
28056
+ case "error" /* Error */:
28076
28057
  handleErrorEvent(event.value, userMessageTimestamp);
28077
28058
  break;
28078
- case GeminiEventType.AgentExecutionStopped:
28059
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
28079
28060
  handleAgentExecutionStoppedEvent(
28080
28061
  event.value.reason,
28081
28062
  userMessageTimestamp,
@@ -28083,7 +28064,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28083
28064
  event.value.contextCleared
28084
28065
  );
28085
28066
  break;
28086
- case GeminiEventType.AgentExecutionBlocked:
28067
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
28087
28068
  handleAgentExecutionBlockedEvent(
28088
28069
  event.value.reason,
28089
28070
  userMessageTimestamp,
@@ -28091,36 +28072,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28091
28072
  event.value.contextCleared
28092
28073
  );
28093
28074
  break;
28094
- case GeminiEventType.ChatCompressed:
28075
+ case "chat_compressed" /* ChatCompressed */:
28095
28076
  handleChatCompressionEvent(event.value, userMessageTimestamp);
28096
28077
  break;
28097
- case GeminiEventType.ToolCallConfirmation:
28098
- case GeminiEventType.ToolCallResponse:
28078
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
28079
+ case "tool_call_response" /* ToolCallResponse */:
28099
28080
  break;
28100
- case GeminiEventType.MaxSessionTurns:
28081
+ case "max_session_turns" /* MaxSessionTurns */:
28101
28082
  handleMaxSessionTurnsEvent();
28102
28083
  break;
28103
- case GeminiEventType.ContextWindowWillOverflow:
28084
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
28104
28085
  handleContextWindowWillOverflowEvent(
28105
28086
  event.value.estimatedRequestTokenCount,
28106
28087
  event.value.remainingTokenCount
28107
28088
  );
28108
28089
  break;
28109
- case GeminiEventType.Finished:
28090
+ case "finished" /* Finished */:
28110
28091
  handleFinishedEvent(event, userMessageTimestamp);
28111
28092
  break;
28112
- case GeminiEventType.Citation:
28093
+ case "citation" /* Citation */:
28113
28094
  handleCitationEvent(event.value, userMessageTimestamp);
28114
28095
  break;
28115
- case GeminiEventType.ModelInfo:
28096
+ case "model_info" /* ModelInfo */:
28116
28097
  handleChatModelEvent(event.value, userMessageTimestamp);
28117
28098
  break;
28118
- case GeminiEventType.LoopDetected:
28099
+ case "loop_detected" /* LoopDetected */:
28119
28100
  loopDetectedRef.current = true;
28120
28101
  break;
28121
- case GeminiEventType.Retry:
28102
+ case "retry" /* Retry */:
28122
28103
  break;
28123
- case GeminiEventType.InvalidStream:
28104
+ case "invalid_stream" /* InvalidStream */:
28124
28105
  handleInvalidStreamEvent(event.value, userMessageTimestamp);
28125
28106
  break;
28126
28107
  default: {
@@ -28174,7 +28155,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28174
28155
  const submitQuery = (0, import_react97.useCallback)(
28175
28156
  async (query, options, prompt_id) => runInDevTraceSpan(
28176
28157
  {
28177
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
28158
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
28178
28159
  sessionId: config.getSessionId()
28179
28160
  },
28180
28161
  async ({ metadata: spanMetadata }) => {
@@ -28338,7 +28319,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28338
28319
  submitQueryRef.current = submitQuery;
28339
28320
  const handleApprovalModeChange = (0, import_react97.useCallback)(
28340
28321
  async (newApprovalMode) => {
28341
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28322
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28342
28323
  if (geminiClient) {
28343
28324
  try {
28344
28325
  await geminiClient.addHistory({
@@ -28361,11 +28342,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28361
28342
  }
28362
28343
  }
28363
28344
  previousApprovalModeRef.current = newApprovalMode;
28364
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28345
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28365
28346
  let awaitingApprovalCalls = toolCalls.filter(
28366
28347
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28367
28348
  );
28368
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28349
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28369
28350
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28370
28351
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28371
28352
  return true;
@@ -28381,11 +28362,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28381
28362
  if (call.correlationId) {
28382
28363
  try {
28383
28364
  await config.getMessageBus().publish({
28384
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28365
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28385
28366
  correlationId: call.correlationId,
28386
28367
  confirmed: true,
28387
28368
  requiresUserConfirmation: false,
28388
- outcome: ToolConfirmationOutcome.ProceedOnce
28369
+ outcome: "proceed_once" /* ProceedOnce */
28389
28370
  });
28390
28371
  } catch (error) {
28391
28372
  debugLogger.warn(
@@ -28476,14 +28457,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28476
28457
  );
28477
28458
  if (isLowErrorVerbosity) {
28478
28459
  suppressedToolErrorCountRef.current += geminiTools.filter(
28479
- (tc) => tc.status === CoreToolCallStatus.Error
28460
+ (tc) => tc.status === "error" /* Error */
28480
28461
  ).length;
28481
28462
  }
28482
28463
  if (geminiTools.length === 0) {
28483
28464
  return;
28484
28465
  }
28485
28466
  const stopExecutionTool = geminiTools.find(
28486
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28467
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28487
28468
  );
28488
28469
  if (stopExecutionTool && stopExecutionTool.response.error) {
28489
28470
  maybeAddSuppressedToolErrorNote();
@@ -28503,9 +28484,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28503
28484
  (tc) => !isTopicTool2(tc.request.name)
28504
28485
  );
28505
28486
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28506
- (tc) => tc.status === CoreToolCallStatus.Cancelled
28487
+ (tc) => tc.status === "cancelled" /* Cancelled */
28507
28488
  );
28508
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28489
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28509
28490
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28510
28491
  if (!turnCancelledRef.current) {
28511
28492
  addItem({
@@ -28584,7 +28565,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28584
28565
  return;
28585
28566
  }
28586
28567
  const restorableToolCalls = toolCalls.filter(
28587
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28568
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28588
28569
  );
28589
28570
  if (restorableToolCalls.length > 0) {
28590
28571
  if (!gitService) {
@@ -28807,14 +28788,14 @@ var useAgentStream = ({
28807
28788
  const displayName = legacyState?.displayName ?? event.name;
28808
28789
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28809
28790
  const desc = legacyState?.description ?? "";
28810
- const fallbackKind = Kind.Other;
28791
+ const fallbackKind = "other" /* Other */;
28811
28792
  const newCall = {
28812
28793
  callId: event.requestId,
28813
28794
  name: displayName,
28814
28795
  originalRequestName: event.name,
28815
28796
  description: desc,
28816
28797
  display: event.display,
28817
- status: CoreToolCallStatus.Scheduled,
28798
+ status: "scheduled" /* Scheduled */,
28818
28799
  isClientInitiated: false,
28819
28800
  renderOutputAsMarkdown: isOutputMarkdown,
28820
28801
  kind: legacyState?.kind ?? fallbackKind,
@@ -28832,10 +28813,10 @@ var useAgentStream = ({
28832
28813
  const evtStatus = legacyState?.status;
28833
28814
  let status = tc.status;
28834
28815
  if (evtStatus === "executing")
28835
- status = CoreToolCallStatus.Executing;
28836
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28816
+ status = "executing" /* Executing */;
28817
+ else if (evtStatus === "error") status = "error" /* Error */;
28837
28818
  else if (evtStatus === "success")
28838
- status = CoreToolCallStatus.Success;
28819
+ status = "success" /* Success */;
28839
28820
  const display = event.display?.result;
28840
28821
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28841
28822
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28868,7 +28849,7 @@ var useAgentStream = ({
28868
28849
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28869
28850
  return {
28870
28851
  ...tc,
28871
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28852
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28872
28853
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28873
28854
  resultDisplay,
28874
28855
  outputFile
@@ -28934,7 +28915,7 @@ var useAgentStream = ({
28934
28915
  if (!options?.isContinuation) {
28935
28916
  if (typeof query === "string") {
28936
28917
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28937
- void logger?.logMessage(MessageSenderType.USER, query);
28918
+ void logger?.logMessage("user" /* USER */, query);
28938
28919
  }
28939
28920
  startNewPrompt();
28940
28921
  }
@@ -30465,9 +30446,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30465
30446
  const handleFolderTrustSelect = (0, import_react103.useCallback)(
30466
30447
  async (choice) => {
30467
30448
  const trustLevelMap = {
30468
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30469
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30470
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30449
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30450
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30451
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30471
30452
  };
30472
30453
  const trustLevel = trustLevelMap[choice];
30473
30454
  if (!trustLevel) return;
@@ -30486,7 +30467,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30486
30467
  }, 100);
30487
30468
  return;
30488
30469
  }
30489
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30470
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30490
30471
  onTrustChangeRef.current(currentIsTrusted);
30491
30472
  setIsTrusted(currentIsTrusted);
30492
30473
  const wasTrusted = isTrusted ?? false;
@@ -31494,7 +31475,7 @@ function useMessageQueue({
31494
31475
  var import_react105 = __toESM(require_react(), 1);
31495
31476
  function useMcpStatus(config) {
31496
31477
  const [discoveryState, setDiscoveryState] = (0, import_react105.useState)(
31497
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31478
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31498
31479
  );
31499
31480
  const [mcpServerCount, setMcpServerCount] = (0, import_react105.useState)(
31500
31481
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31507,12 +31488,12 @@ function useMcpStatus(config) {
31507
31488
  setMcpServerCount(manager.getMcpServerCount());
31508
31489
  }
31509
31490
  };
31510
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31491
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31511
31492
  return () => {
31512
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31493
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31513
31494
  };
31514
31495
  }, [config]);
31515
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31496
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31516
31497
  return {
31517
31498
  discoveryState,
31518
31499
  mcpServerCount,
@@ -31539,7 +31520,7 @@ function useApprovalModeIndicator({
31539
31520
  (key) => {
31540
31521
  let nextApprovalMode;
31541
31522
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31542
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31523
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31543
31524
  if (addItem) {
31544
31525
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31545
31526
  const adminSettings = config.getRemoteAdminSettings();
@@ -31557,21 +31538,21 @@ function useApprovalModeIndicator({
31557
31538
  }
31558
31539
  return;
31559
31540
  }
31560
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31541
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31561
31542
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31562
31543
  const currentMode = config.getApprovalMode();
31563
31544
  switch (currentMode) {
31564
- case ApprovalMode.DEFAULT:
31565
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31545
+ case "default" /* DEFAULT */:
31546
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31566
31547
  break;
31567
- case ApprovalMode.AUTO_EDIT:
31568
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31548
+ case "autoEdit" /* AUTO_EDIT */:
31549
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31569
31550
  break;
31570
- case ApprovalMode.PLAN:
31571
- nextApprovalMode = ApprovalMode.DEFAULT;
31551
+ case "plan" /* PLAN */:
31552
+ nextApprovalMode = "default" /* DEFAULT */;
31572
31553
  break;
31573
- case ApprovalMode.YOLO:
31574
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31554
+ case "yolo" /* YOLO */:
31555
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31575
31556
  break;
31576
31557
  default:
31577
31558
  }
@@ -31981,11 +31962,11 @@ var useHookDisplayState = () => {
31981
31962
  removeHook();
31982
31963
  }
31983
31964
  };
31984
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
31985
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31965
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31966
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31986
31967
  return () => {
31987
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
31988
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31968
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31969
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31989
31970
  activeTimeouts.forEach(clearTimeout);
31990
31971
  activeTimeouts.clear();
31991
31972
  };
@@ -32824,7 +32805,7 @@ var AppContainer = (props) => {
32824
32805
  setConfigInitialized(true);
32825
32806
  startupProfiler.flush(config);
32826
32807
  startAutoMemoryIfEnabled(config);
32827
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32808
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32828
32809
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32829
32810
  if (result) {
32830
32811
  const additionalContext = result.getAdditionalContext();
@@ -32851,7 +32832,7 @@ var AppContainer = (props) => {
32851
32832
  );
32852
32833
  const ideClient = await IdeClient.getInstance();
32853
32834
  await ideClient.disconnect();
32854
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32835
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32855
32836
  };
32856
32837
  registerCleanup(cleanupFn);
32857
32838
  return () => {
@@ -32876,11 +32857,11 @@ var AppContainer = (props) => {
32876
32857
  resetTime: payload.resetTime
32877
32858
  });
32878
32859
  };
32879
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32880
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32860
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32861
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32881
32862
  return () => {
32882
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32883
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32863
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32864
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32884
32865
  };
32885
32866
  }, [config]);
32886
32867
  (0, import_react119.useEffect)(() => {
@@ -32893,16 +32874,16 @@ var AppContainer = (props) => {
32893
32874
  const handleAgentsDiscovered = (payload) => {
32894
32875
  setNewAgents(payload.agents);
32895
32876
  };
32896
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32897
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32898
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32877
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32878
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32879
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32899
32880
  return () => {
32900
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32881
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32901
32882
  coreEvents.off(
32902
- CoreEvent.AdminSettingsChanged,
32883
+ "admin-settings-changed" /* AdminSettingsChanged */,
32903
32884
  handleAdminSettingsChanged
32904
32885
  );
32905
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32886
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32906
32887
  };
32907
32888
  }, [settings]);
32908
32889
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32969,11 +32950,11 @@ var AppContainer = (props) => {
32969
32950
  exitEditorDialog
32970
32951
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32971
32952
  (0, import_react119.useEffect)(() => {
32972
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32973
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32953
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32954
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32974
32955
  return () => {
32975
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32976
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32956
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32957
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32977
32958
  };
32978
32959
  }, [handleEditorClose, openEditorDialog]);
32979
32960
  (0, import_react119.useEffect)(() => {
@@ -33041,7 +33022,7 @@ var AppContainer = (props) => {
33041
33022
  errorVerbosity: settings.merged.ui.errorVerbosity
33042
33023
  });
33043
33024
  const isAuthDialogOpen = authState === "updating" /* Updating */;
33044
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
33025
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
33045
33026
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
33046
33027
  const { loadHistoryForResume, isResuming } = useSessionResume({
33047
33028
  config,
@@ -33069,7 +33050,7 @@ var AppContainer = (props) => {
33069
33050
  async (authType, scope) => {
33070
33051
  if (authType) {
33071
33052
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
33072
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
33053
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
33073
33054
  setAuthContext({ requiresRestart: true });
33074
33055
  } else {
33075
33056
  setAuthContext({});
@@ -33097,7 +33078,7 @@ var AppContainer = (props) => {
33097
33078
  );
33098
33079
  return;
33099
33080
  }
33100
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
33081
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
33101
33082
  writeToStdout(`
33102
33083
  ----------------------------------------------------------------
33103
33084
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -33120,7 +33101,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
33120
33101
  }
33121
33102
  await saveApiKey(apiKey);
33122
33103
  await reloadApiKey();
33123
- await config.refreshAuth(AuthType.USE_GEMINI);
33104
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
33124
33105
  setAuthState("authenticated" /* Authenticated */);
33125
33106
  } catch (e) {
33126
33107
  onAuthError(
@@ -33145,7 +33126,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
33145
33126
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
33146
33127
  );
33147
33128
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
33148
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
33129
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
33149
33130
  return;
33150
33131
  }
33151
33132
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33281,9 +33262,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33281
33262
  }
33282
33263
  });
33283
33264
  };
33284
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33265
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33285
33266
  return () => {
33286
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33267
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33287
33268
  };
33288
33269
  }, []);
33289
33270
  const performMemoryRefresh = (0, import_react119.useCallback)(async () => {
@@ -33853,7 +33834,7 @@ ${queuedText}` : queuedText;
33853
33834
  [handleSlashCommand, settings]
33854
33835
  );
33855
33836
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
33856
- 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;
33837
+ 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;
33857
33838
  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;
33858
33839
  const handleGlobalKeypress = (0, import_react119.useCallback)(
33859
33840
  (key) => {
@@ -33943,7 +33924,7 @@ ${queuedText}` : queuedText;
33943
33924
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33944
33925
  if (settings.merged.general.devtools) {
33945
33926
  void (async () => {
33946
- const { toggleDevToolsPanel } = await import("./devtoolsService-PXS65V3Y.js");
33927
+ const { toggleDevToolsPanel } = await import("./devtoolsService-4MGN7S5K.js");
33947
33928
  await toggleDevToolsPanel(
33948
33929
  config,
33949
33930
  showErrorDetails,
@@ -34162,12 +34143,12 @@ ${queuedText}` : queuedText;
34162
34143
  Date.now()
34163
34144
  );
34164
34145
  };
34165
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
34166
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
34146
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
34147
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34167
34148
  coreEvents.drainBacklogs();
34168
34149
  return () => {
34169
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
34170
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
34150
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
34151
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34171
34152
  };
34172
34153
  }, [historyManager]);
34173
34154
  const nightly = props.version.includes("nightly");
@@ -34275,9 +34256,9 @@ ${queuedText}` : queuedText;
34275
34256
  const handleMemoryChanged = (result) => {
34276
34257
  setGeminiMdFileCount(result.fileCount);
34277
34258
  };
34278
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34259
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34279
34260
  return () => {
34280
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34261
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34281
34262
  };
34282
34263
  }, []);
34283
34264
  (0, import_react119.useEffect)(() => {