@google/gemini-cli 0.57.0-preview.1 → 0.57.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-S5UX3QS5.js → chunk-4H4K2RBL.js} +3 -3
  2. package/bundle/{chunk-G65GW52B.js → chunk-7HKQGPWB.js} +4 -4
  3. package/bundle/{chunk-EAK33LFP.js → chunk-7IKUWYZO.js} +1 -1
  4. package/bundle/{chunk-ALVDOQNA.js → chunk-7ZGWPQVZ.js} +1 -1
  5. package/bundle/{chunk-ZMPGHLGO.js → chunk-AOE6E7MU.js} +2 -2
  6. package/bundle/{chunk-65C235NM.js → chunk-ASZFEU6C.js} +7 -7
  7. package/bundle/{chunk-O7SBKM7M.js → chunk-DFPYJMVX.js} +4 -4
  8. package/bundle/{chunk-VBK54QCZ.js → chunk-FVC4WCSP.js} +1 -1
  9. package/bundle/{chunk-3BVBON3V.js → chunk-FYAMITQ2.js} +1 -1
  10. package/bundle/{chunk-GK7NUJ35.js → chunk-GAROUUGQ.js} +1 -1
  11. package/bundle/{chunk-3NPMAHLX.js → chunk-GAS2GAYB.js} +1 -1
  12. package/bundle/{chunk-4ALCU2HQ.js → chunk-GPOBVDAD.js} +5 -8
  13. package/bundle/{chunk-RLDNUS35.js → chunk-HY6GN2F7.js} +1 -1
  14. package/bundle/{chunk-AKCYXG7C.js → chunk-IKHAM2LG.js} +7 -7
  15. package/bundle/{chunk-MBWROXYM.js → chunk-ISXOUBN5.js} +2 -2
  16. package/bundle/{chunk-NMMXRZ53.js → chunk-LQJHQ4BU.js} +2 -2
  17. package/bundle/{chunk-UMQE7UC6.js → chunk-MNBBUQQS.js} +3 -3
  18. package/bundle/{chunk-W23OOD2C.js → chunk-O7TOZUUB.js} +3 -3
  19. package/bundle/{chunk-FHDRG5U4.js → chunk-QJ33O2NH.js} +54 -67
  20. package/bundle/{chunk-Q73BPF7A.js → chunk-RLDNVR77.js} +1 -1
  21. package/bundle/{chunk-NPOI4K6X.js → chunk-S3MXVTTY.js} +14357 -7673
  22. package/bundle/{chunk-NQ4RH42O.js → chunk-TAWZWX2B.js} +8 -9
  23. package/bundle/{chunk-GMQ6QNZB.js → chunk-XG56CL6B.js} +1 -1
  24. package/bundle/{chunk-SCBVGZXH.js → chunk-YW7SDLZQ.js} +1 -1
  25. package/bundle/{cleanup-2W5DPMY3.js → cleanup-2HUWGXK6.js} +2 -2
  26. package/bundle/{cleanup-OTHE7RNU.js → cleanup-7N2HFE2E.js} +2 -2
  27. package/bundle/{cleanup-SM67K64R.js → cleanup-DA7OSZS5.js} +2 -2
  28. package/bundle/{core-US34OW5M.js → core-2NMRPWUN.js} +1 -1
  29. package/bundle/{dist-5TYMQVIZ.js → core-CFPIDJ4Z.js} +1 -1
  30. package/bundle/{devtoolsService-5J53UK6Z.js → devtoolsService-7YYOUGVF.js} +2 -2
  31. package/bundle/{devtoolsService-JBFUXTCT.js → devtoolsService-VQSLUOYF.js} +3 -4
  32. package/bundle/{devtoolsService-GU2GQSOF.js → devtoolsService-WMEEEXY6.js} +2 -2
  33. package/bundle/{dist-OWKHVWTR.js → dist-AMP5W5P2.js} +1 -1
  34. package/bundle/{gemini-W2B6CLJC.js → gemini-5LF4JAP7.js} +198 -214
  35. package/bundle/{gemini-LSMTDETS.js → gemini-OYYGXMHL.js} +14 -14
  36. package/bundle/{gemini-3M22N2C3.js → gemini-PSRJNVY5.js} +14 -14
  37. package/bundle/gemini.js +7 -7
  38. package/bundle/{interactiveCli-LQJM6LRE.js → interactiveCli-5E2C3XOC.js} +8 -8
  39. package/bundle/{interactiveCli-D6H37PJQ.js → interactiveCli-5O6FZS57.js} +8 -8
  40. package/bundle/{interactiveCli-L3ZXOVEV.js → interactiveCli-PP7WTUZL.js} +296 -315
  41. package/bundle/{liteRtServerManager-3BY6TBHG.js → liteRtServerManager-5QBFCLBK.js} +4 -4
  42. package/bundle/{liteRtServerManager-C5WZRQUF.js → liteRtServerManager-LK6HOSMO.js} +4 -4
  43. package/bundle/{liteRtServerManager-IGKUGGP4.js → liteRtServerManager-ZPDALIDY.js} +4 -4
  44. package/bundle/{oauth2-provider-KSRLPOK3.js → oauth2-provider-BGMEA7RS.js} +1 -1
  45. package/bundle/{oauth2-provider-RWKTMYJF.js → oauth2-provider-BYKBBEKI.js} +1 -1
  46. package/bundle/{oauth2-provider-VHNLCU4Y.js → oauth2-provider-CO22I6UM.js} +72 -38
  47. package/bundle/{start-EXAQFM4Y.js → start-JRTTCV3K.js} +6 -6
  48. package/bundle/{start-IPZF32E3.js → start-KH6WSP5C.js} +6 -6
  49. package/bundle/{start-SVNTSNHV.js → start-O6LWZY6K.js} +6 -6
  50. package/package.json +1 -1
  51. package/bundle/chunk-4SNEOO5E.js +0 -398
  52. package/bundle/chunk-LNXGFWGZ.js +0 -17332
  53. package/bundle/chunk-QJP6CMLN.js +0 -118
  54. package/bundle/chunk-SWQAIZEQ.js +0 -102506
  55. package/bundle/chunk-VGGWKRAC.js +0 -154
  56. package/bundle/chunk-WDFSF5L4.js +0 -397601
  57. package/bundle/chunk-XESAM7IL.js +0 -512
  58. package/bundle/chunk-Y3APL4PE.js +0 -1571
  59. package/bundle/cleanup-XAUT5CMD.js +0 -32
  60. package/bundle/devtoolsService-V46GUHRF.js +0 -4359
  61. package/bundle/dist-V5VJYW6J.js +0 -2180
  62. package/bundle/gemini-OZOYJF22.js +0 -17091
  63. package/bundle/interactiveCli-RGOYDSMH.js +0 -34984
  64. package/bundle/liteRtServerManager-IJ4I2PZA.js +0 -65
  65. package/bundle/oauth2-provider-ZT4OFVMK.js +0 -235
  66. package/bundle/start-ZXU5BFZY.js +0 -18
@@ -157,10 +157,10 @@ import {
157
157
  widestLineFromStyledChars,
158
158
  wordBreakStyledChars,
159
159
  wrapStyledChars
160
- } from "./chunk-65C235NM.js";
160
+ } from "./chunk-QJ33O2NH.js";
161
161
  import {
162
162
  require_source
163
- } from "./chunk-RLDNUS35.js";
163
+ } from "./chunk-YW7SDLZQ.js";
164
164
  import {
165
165
  appEvents
166
166
  } from "./chunk-5PS3AYFU.js";
@@ -214,37 +214,33 @@ import {
214
214
  stripAnsi,
215
215
  stripUnsafeCharacters,
216
216
  toCodePoints
217
- } from "./chunk-LNXGFWGZ.js";
217
+ } from "./chunk-7ZGWPQVZ.js";
218
218
  import {
219
219
  handleAutoUpdate,
220
220
  isDevelopment,
221
221
  relaunchApp,
222
222
  setUpdateHandler
223
- } from "./chunk-NMMXRZ53.js";
223
+ } from "./chunk-AOE6E7MU.js";
224
224
  import {
225
225
  isTodoList,
226
226
  mapCoreStatusToDisplayStatus,
227
227
  require_react
228
- } from "./chunk-GMQ6QNZB.js";
228
+ } from "./chunk-TAWZWX2B.js";
229
229
  import {
230
230
  registerCleanup,
231
231
  removeCleanup,
232
232
  runExitCleanup,
233
233
  setupTtyCheck
234
- } from "./chunk-EAK33LFP.js";
234
+ } from "./chunk-7IKUWYZO.js";
235
235
  import {
236
236
  ACTIVATE_SKILL_TOOL_NAME,
237
237
  AGENT_TOOL_NAME,
238
238
  ApiKeyUpdatedEvent,
239
- ApprovalMode,
240
239
  AsyncFzf,
241
240
  AudioRecorder,
242
241
  AuthType,
243
242
  ChangeAuthRequestedError,
244
- CompressionStatus,
245
243
  ConversationFinishedEvent,
246
- CoreEvent,
247
- CoreToolCallStatus,
248
244
  CreditPurchaseClickEvent,
249
245
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
250
246
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -266,20 +262,13 @@ import {
266
262
  GEMMA_4_31B_IT_MODEL,
267
263
  GLOB_DISPLAY_NAME,
268
264
  GREP_DISPLAY_NAME,
269
- GeminiCliOperation,
270
- GeminiEventType,
271
265
  GitService,
272
266
  IdeClient,
273
- Kind,
274
267
  LS_DISPLAY_NAME,
275
268
  LegacyAgentProtocol,
276
269
  LlmRole,
277
270
  Logger,
278
271
  MAX_TOKENS_EXCEEDED_SUGGESTION,
279
- MCPDiscoveryState,
280
- MCPServerStatus,
281
- MessageBusType,
282
- MessageSenderType,
283
272
  ModelNotFoundError,
284
273
  ModelSlashCommandEvent,
285
274
  OTHER_BLOCKED_MESSAGE,
@@ -292,7 +281,6 @@ import {
292
281
  PREVIEW_GEMINI_MODEL,
293
282
  PolicyIntegrityManager,
294
283
  ProjectIdRequiredError,
295
- QuestionType,
296
284
  READ_FILE_DISPLAY_NAME,
297
285
  READ_MANY_FILES_DISPLAY_NAME,
298
286
  RECITATION_BLOCKED_MESSAGE,
@@ -301,22 +289,16 @@ import {
301
289
  SAFETY_BLOCKED_MESSAGE,
302
290
  SHELL_TOOL_NAME,
303
291
  Scheduler,
304
- SessionEndReason,
305
- SessionStartSource,
306
292
  ShellExecutionService,
307
293
  SlashCommandStatus,
308
294
  Storage,
309
- SubagentState,
310
295
  THINKING_ONLY_COMPRESS_SUGGESTION,
311
296
  TOPIC_PARAM_STRATEGIC_INTENT,
312
297
  TOPIC_PARAM_SUMMARY,
313
298
  TOPIC_PARAM_TITLE,
314
299
  TRUE_EMPTY_RESPONSE_MESSAGE,
315
300
  TerminalQuotaError,
316
- ToolConfirmationOutcome,
317
- ToolErrorType,
318
301
  TranscriptionFactory,
319
- TrustLevel,
320
302
  UPDATE_TOPIC_DISPLAY_NAME,
321
303
  UPDATE_TOPIC_TOOL_NAME,
322
304
  UnauthorizedError,
@@ -328,7 +310,6 @@ import {
328
310
  WEB_FETCH_DISPLAY_NAME,
329
311
  WEB_SEARCH_DISPLAY_NAME,
330
312
  WRITE_FILE_DISPLAY_NAME,
331
- WarningPriority,
332
313
  WhisperModelManager,
333
314
  addMCPStatusChangeListener,
334
315
  allowEditorTypeInSandbox,
@@ -437,7 +418,7 @@ import {
437
418
  validatePlanContent,
438
419
  validatePlanPath,
439
420
  writeToStdout
440
- } from "./chunk-WDFSF5L4.js";
421
+ } from "./chunk-S3MXVTTY.js";
441
422
  import "./chunk-664ZODQF.js";
442
423
  import "./chunk-IUUIT4SU.js";
443
424
  import "./chunk-TUDYL3X4.js";
@@ -5063,7 +5044,7 @@ function calculateShellMaxLines(options) {
5063
5044
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5064
5045
  return maxLinesBasedOnHeight;
5065
5046
  }
5066
- const isExecuting = status === CoreToolCallStatus.Executing;
5047
+ const isExecuting = status === "executing" /* Executing */;
5067
5048
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5068
5049
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5069
5050
  }
@@ -5097,10 +5078,10 @@ function isShellTool(name) {
5097
5078
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
5098
5079
  }
5099
5080
  function isThisShellFocusable(name, status, config) {
5100
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5081
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5101
5082
  }
5102
5083
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5103
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5084
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5104
5085
  }
5105
5086
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5106
5087
  const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
@@ -5260,13 +5241,13 @@ var formatToolArgs = (args) => {
5260
5241
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5261
5242
  let headerText;
5262
5243
  let headerColor = theme.text.secondary;
5263
- if (progress.state === SubagentState.CANCELLED) {
5244
+ if (progress.state === "cancelled" /* CANCELLED */) {
5264
5245
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5265
5246
  headerColor = theme.status.warning;
5266
- } else if (progress.state === SubagentState.ERROR) {
5247
+ } else if (progress.state === "error" /* ERROR */) {
5267
5248
  headerText = `Subagent ${progress.agentName} failed.`;
5268
5249
  headerColor = theme.status.error;
5269
- } else if (progress.state === SubagentState.COMPLETED) {
5250
+ } else if (progress.state === "completed" /* COMPLETED */) {
5270
5251
  headerText = `Subagent ${progress.agentName} completed.`;
5271
5252
  headerColor = theme.status.success;
5272
5253
  } else {
@@ -5286,7 +5267,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5286
5267
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
5287
5268
  ] }, item.id);
5288
5269
  } else if (item.type === "tool_call") {
5289
- const statusSymbol = item.status === SubagentState.RUNNING ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === SubagentState.COMPLETED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === SubagentState.CANCELLED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5270
+ const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5290
5271
  const formattedArgs = item.description || formatToolArgs(item.args);
5291
5272
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5292
5273
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5297,7 +5278,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5297
5278
  {
5298
5279
  bold: true,
5299
5280
  color: theme.text.primary,
5300
- strikethrough: item.status === SubagentState.CANCELLED,
5281
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5301
5282
  children: item.displayName || item.content
5302
5283
  }
5303
5284
  ),
@@ -5306,7 +5287,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5306
5287
  {
5307
5288
  color: theme.text.secondary,
5308
5289
  wrap: "truncate",
5309
- strikethrough: item.status === SubagentState.CANCELLED,
5290
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5310
5291
  children: displayArgs
5311
5292
  }
5312
5293
  ) })
@@ -5326,7 +5307,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5326
5307
  MarkdownDisplay,
5327
5308
  {
5328
5309
  text: safeJsonToMarkdown(progress.result),
5329
- isPending: progress.state !== SubagentState.COMPLETED,
5310
+ isPending: progress.state !== "completed" /* COMPLETED */,
5330
5311
  terminalWidth
5331
5312
  }
5332
5313
  )
@@ -5680,14 +5661,14 @@ var ToolActionsProvider = (props) => {
5680
5661
  }
5681
5662
  const details = tool.confirmationDetails;
5682
5663
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5683
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5664
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5684
5665
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5685
5666
  }
5686
5667
  if (tool.correlationId) {
5687
5668
  await config.getMessageBus().publish({
5688
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5669
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5689
5670
  correlationId: tool.correlationId,
5690
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5671
+ confirmed: outcome !== "cancel" /* Cancel */,
5691
5672
  requiresUserConfirmation: false,
5692
5673
  outcome,
5693
5674
  payload
@@ -5706,7 +5687,7 @@ var ToolActionsProvider = (props) => {
5706
5687
  );
5707
5688
  const cancel = (0, import_react12.useCallback)(
5708
5689
  async (callId) => {
5709
- await confirm(callId, ToolConfirmationOutcome.Cancel);
5690
+ await confirm(callId, "cancel" /* Cancel */);
5710
5691
  },
5711
5692
  [confirm]
5712
5693
  );
@@ -5825,7 +5806,7 @@ var ToolMessage = ({
5825
5806
  paddingX: 1,
5826
5807
  flexDirection: "column",
5827
5808
  children: [
5828
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5809
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5829
5810
  McpProgressIndicator,
5830
5811
  {
5831
5812
  progress,
@@ -5842,8 +5823,8 @@ var ToolMessage = ({
5842
5823
  terminalWidth,
5843
5824
  renderOutputAsMarkdown,
5844
5825
  hasFocus: isThisShellFocused2,
5845
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5846
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5826
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5827
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5847
5828
  }
5848
5829
  ),
5849
5830
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -6159,7 +6140,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6159
6140
  settings.merged,
6160
6141
  process3.cwd()
6161
6142
  );
6162
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6143
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6163
6144
  return {
6164
6145
  currentTrustLevel: explicitTrustLevel,
6165
6146
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6204,7 +6185,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6204
6185
  process3.cwd(),
6205
6186
  newConfig
6206
6187
  );
6207
- if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6188
+ if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6208
6189
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6209
6190
  if (source === "file") {
6210
6191
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6278,18 +6259,18 @@ function PermissionsModifyTrustDialog({
6278
6259
  const TRUST_LEVEL_ITEMS = [
6279
6260
  {
6280
6261
  label: `Trust this folder (${dirName})`,
6281
- value: TrustLevel.TRUST_FOLDER,
6282
- key: TrustLevel.TRUST_FOLDER
6262
+ value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6263
+ key: "TRUST_FOLDER" /* TRUST_FOLDER */
6283
6264
  },
6284
6265
  {
6285
6266
  label: `Trust parent folder (${parentFolder})`,
6286
- value: TrustLevel.TRUST_PARENT,
6287
- key: TrustLevel.TRUST_PARENT
6267
+ value: "TRUST_PARENT" /* TRUST_PARENT */,
6268
+ key: "TRUST_PARENT" /* TRUST_PARENT */
6288
6269
  },
6289
6270
  {
6290
6271
  label: "Don't trust",
6291
- value: TrustLevel.DO_NOT_TRUST,
6292
- key: TrustLevel.DO_NOT_TRUST
6272
+ value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6273
+ key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6293
6274
  }
6294
6275
  ];
6295
6276
  const {
@@ -6529,7 +6510,7 @@ var ShellToolMessage = ({
6529
6510
  maxLinesLimit: maxLines
6530
6511
  });
6531
6512
  import_react17.default.useEffect(() => {
6532
- const isExecuting = status === CoreToolCallStatus.Executing;
6513
+ const isExecuting = status === "executing" /* Executing */;
6533
6514
  if (isExecuting && ptyId) {
6534
6515
  try {
6535
6516
  const childWidth = terminalWidth - 4;
@@ -6742,13 +6723,13 @@ var SubagentGroupDisplay = ({
6742
6723
  const singleAgent = toolCalls[0].resultDisplay;
6743
6724
  if (isSubagentProgress(singleAgent)) {
6744
6725
  switch (singleAgent.state) {
6745
- case SubagentState.COMPLETED:
6726
+ case "completed" /* COMPLETED */:
6746
6727
  headerText = "Agent Completed";
6747
6728
  break;
6748
- case SubagentState.CANCELLED:
6729
+ case "cancelled" /* CANCELLED */:
6749
6730
  headerText = "Agent Cancelled";
6750
6731
  break;
6751
- case SubagentState.ERROR:
6732
+ case "error" /* ERROR */:
6752
6733
  headerText = "Agent Error";
6753
6734
  break;
6754
6735
  default:
@@ -6764,8 +6745,8 @@ var SubagentGroupDisplay = ({
6764
6745
  for (const tc of toolCalls) {
6765
6746
  const progress = tc.resultDisplay;
6766
6747
  if (isSubagentProgress(progress)) {
6767
- if (progress.state === SubagentState.COMPLETED) completedCount++;
6768
- else if (progress.state === SubagentState.RUNNING) runningCount++;
6748
+ if (progress.state === "completed" /* COMPLETED */) completedCount++;
6749
+ else if (progress.state === "running" /* RUNNING */) runningCount++;
6769
6750
  } else {
6770
6751
  runningCount++;
6771
6752
  }
@@ -6844,7 +6825,7 @@ var SubagentGroupDisplay = ({
6844
6825
  if (!isExpanded) {
6845
6826
  let content = "Starting...";
6846
6827
  let formattedArgs;
6847
- if (progress.state === SubagentState.COMPLETED) {
6828
+ if (progress.state === "completed" /* COMPLETED */) {
6848
6829
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6849
6830
  content = `Finished Early (${progress.terminateReason})`;
6850
6831
  } else {
@@ -6858,17 +6839,17 @@ var SubagentGroupDisplay = ({
6858
6839
  formattedArgs = formatToolArgs(lastActivity.args);
6859
6840
  }
6860
6841
  }
6861
- const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6842
+ const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6862
6843
  const renderStatusIcon = () => {
6863
- const state = progress.state ?? SubagentState.RUNNING;
6844
+ const state = progress.state ?? "running" /* RUNNING */;
6864
6845
  switch (state) {
6865
- case SubagentState.RUNNING:
6846
+ case "running" /* RUNNING */:
6866
6847
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
6867
- case SubagentState.COMPLETED:
6848
+ case "completed" /* COMPLETED */:
6868
6849
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6869
- case SubagentState.CANCELLED:
6850
+ case "cancelled" /* CANCELLED */:
6870
6851
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6871
- case SubagentState.ERROR:
6852
+ case "error" /* ERROR */:
6872
6853
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6873
6854
  default:
6874
6855
  return checkExhaustive(state);
@@ -6921,22 +6902,22 @@ var hasPayload = (res) => {
6921
6902
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6922
6903
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6923
6904
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6924
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6905
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6925
6906
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6926
6907
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6927
6908
  const showDiffStat = !!diff.diffStat;
6928
6909
  const description = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
6929
6910
  let resultSummary = "";
6930
6911
  let resultColor = theme.text.secondary;
6931
- if (status === CoreToolCallStatus.AwaitingApproval) {
6912
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
6932
6913
  resultSummary = "Confirming";
6933
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6914
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6934
6915
  resultSummary = "Accepted";
6935
6916
  resultColor = theme.text.accent;
6936
- } else if (status === CoreToolCallStatus.Cancelled) {
6917
+ } else if (status === "cancelled" /* Cancelled */) {
6937
6918
  resultSummary = "Rejected";
6938
6919
  resultColor = theme.status.error;
6939
- } else if (status === CoreToolCallStatus.Error) {
6920
+ } else if (status === "error" /* Error */) {
6940
6921
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6941
6922
  resultColor = theme.status.error;
6942
6923
  }
@@ -6967,7 +6948,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6967
6948
  filename: diff.fileName,
6968
6949
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
6969
6950
  availableTerminalHeight,
6970
- disableColor: status === CoreToolCallStatus.Cancelled
6951
+ disableColor: status === "cancelled" /* Cancelled */
6971
6952
  }
6972
6953
  );
6973
6954
  return { description, summary, payload };
@@ -7095,10 +7076,10 @@ var DenseToolMessage = (props) => {
7095
7076
  if (isGrepResult(resultDisplay)) {
7096
7077
  return getGenericSuccessData(resultDisplay, originalDescription);
7097
7078
  }
7098
- if (status === CoreToolCallStatus.Success && resultDisplay) {
7079
+ if (status === "success" /* Success */ && resultDisplay) {
7099
7080
  return getGenericSuccessData(resultDisplay, originalDescription);
7100
7081
  }
7101
- if (status === CoreToolCallStatus.Error) {
7082
+ if (status === "error" /* Error */) {
7102
7083
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7103
7084
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7104
7085
  "\u2192 ",
@@ -7139,7 +7120,7 @@ var DenseToolMessage = (props) => {
7139
7120
  language: fileExtension,
7140
7121
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7141
7122
  settings,
7142
- disableColor: status === CoreToolCallStatus.Cancelled,
7123
+ disableColor: status === "cancelled" /* Cancelled */,
7143
7124
  returnLines: true
7144
7125
  });
7145
7126
  } else {
@@ -7147,7 +7128,7 @@ var DenseToolMessage = (props) => {
7147
7128
  parsedLines,
7148
7129
  filename: diff.fileName,
7149
7130
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7150
- disableColor: status === CoreToolCallStatus.Cancelled
7131
+ disableColor: status === "cancelled" /* Cancelled */
7151
7132
  });
7152
7133
  }
7153
7134
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7277,7 +7258,7 @@ function isToolExecuting(pendingHistoryItems) {
7277
7258
  return pendingHistoryItems.some((item) => {
7278
7259
  if (item && item.type === "tool_group") {
7279
7260
  return item.tools.some(
7280
- (tool) => CoreToolCallStatus.Executing === tool.status
7261
+ (tool) => "executing" /* Executing */ === tool.status
7281
7262
  );
7282
7263
  }
7283
7264
  return false;
@@ -7286,7 +7267,7 @@ function isToolExecuting(pendingHistoryItems) {
7286
7267
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7287
7268
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7288
7269
  (item) => item.tools.some(
7289
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7270
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7290
7271
  )
7291
7272
  );
7292
7273
  }
@@ -7309,14 +7290,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
7309
7290
  if (isTrackedToolCall(t)) {
7310
7291
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
7311
7292
  } else {
7312
- return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7293
+ return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
7313
7294
  }
7314
7295
  });
7315
7296
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
7316
7297
  if (isTrackedToolCall(t)) {
7317
7298
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
7318
7299
  } else {
7319
- return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7300
+ return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7320
7301
  }
7321
7302
  });
7322
7303
  const isShellCommand = toolsToInspect.some((t) => {
@@ -7415,7 +7396,7 @@ var ToolGroupMessage = ({
7415
7396
  const groupedTools = (0, import_react21.useMemo)(() => {
7416
7397
  const groups = [];
7417
7398
  for (const tool of visibleToolCalls) {
7418
- if (tool.kind === Kind.Agent) {
7399
+ if (tool.kind === "agent" /* Agent */) {
7419
7400
  const lastGroup = groups[groups.length - 1];
7420
7401
  if (Array.isArray(lastGroup)) {
7421
7402
  lastGroup.push(tool);
@@ -7470,7 +7451,7 @@ var ToolGroupMessage = ({
7470
7451
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7471
7452
  let countToolCallsWithResults = 0;
7472
7453
  for (const tool of visibleToolCalls) {
7473
- if (tool.kind !== Kind.Agent) {
7454
+ if (tool.kind !== "agent" /* Agent */) {
7474
7455
  if (isCompactTool(tool, isCompactModeEnabled)) {
7475
7456
  if (hasDensePayload(tool)) {
7476
7457
  countToolCallsWithResults++;
@@ -7644,7 +7625,7 @@ var ToolGroupDisplay = ({
7644
7625
  }
7645
7626
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7646
7627
  const visibleTools = tools.filter(
7647
- (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7628
+ (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7648
7629
  );
7649
7630
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7650
7631
  const otherTools = visibleTools.filter(
@@ -7846,18 +7827,18 @@ function CompressionMessage({
7846
7827
  return "Compressing chat history";
7847
7828
  }
7848
7829
  switch (compressionStatus) {
7849
- case CompressionStatus.COMPRESSED:
7830
+ case 1 /* COMPRESSED */:
7850
7831
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7851
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7832
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7852
7833
  if (originalTokens < 5e4) {
7853
7834
  return "Compression was not beneficial for this history size.";
7854
7835
  }
7855
7836
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7856
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7837
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7857
7838
  return "Could not compress chat history due to a token counting error.";
7858
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7839
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7859
7840
  return "Chat history compression failed: the model returned an empty summary.";
7860
- case CompressionStatus.NOOP:
7841
+ case 5 /* NOOP */:
7861
7842
  return "Nothing to compress.";
7862
7843
  default:
7863
7844
  return "";
@@ -8295,8 +8276,8 @@ var ModelUsageTable = ({ models }) => {
8295
8276
  );
8296
8277
  roleEntries.sort(([a], [b]) => {
8297
8278
  if (a === b) return 0;
8298
- if (a === LlmRole.MAIN) return -1;
8299
- if (b === LlmRole.MAIN) return 1;
8279
+ if (a === "main" /* MAIN */) return -1;
8280
+ if (b === "main" /* MAIN */) return 1;
8300
8281
  return a.localeCompare(b);
8301
8282
  });
8302
8283
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8627,8 +8608,8 @@ var ModelStatsDisplay = ({
8627
8608
  return validRoles.includes(role);
8628
8609
  }).sort((a, b) => {
8629
8610
  if (a === b) return 0;
8630
- if (a === LlmRole.MAIN) return -1;
8631
- if (b === LlmRole.MAIN) return 1;
8611
+ if (a === "main" /* MAIN */) return -1;
8612
+ if (b === "main" /* MAIN */) return 1;
8632
8613
  return a.localeCompare(b);
8633
8614
  });
8634
8615
  const createRow = (metric, getValue, options = {}) => {
@@ -9419,7 +9400,7 @@ var McpStatus = ({
9419
9400
  );
9420
9401
  const originalStatus = serverStatus(serverName);
9421
9402
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9422
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9403
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9423
9404
  let statusIndicator = "";
9424
9405
  let statusText = "";
9425
9406
  let statusColor = theme.text.primary;
@@ -9431,17 +9412,17 @@ var McpStatus = ({
9431
9412
  statusColor = theme.text.secondary;
9432
9413
  } else {
9433
9414
  switch (status) {
9434
- case MCPServerStatus.CONNECTED:
9415
+ case "connected" /* CONNECTED */:
9435
9416
  statusIndicator = "\u{1F7E2}";
9436
9417
  statusText = "Ready";
9437
9418
  statusColor = theme.status.success;
9438
9419
  break;
9439
- case MCPServerStatus.CONNECTING:
9420
+ case "connecting" /* CONNECTING */:
9440
9421
  statusIndicator = "\u{1F504}";
9441
9422
  statusText = "Starting... (first startup may take longer)";
9442
9423
  statusColor = theme.status.warning;
9443
9424
  break;
9444
- case MCPServerStatus.DISCONNECTED:
9425
+ case "disconnected" /* DISCONNECTED */:
9445
9426
  default:
9446
9427
  statusIndicator = "\u{1F534}";
9447
9428
  statusText = "Disconnected";
@@ -9489,12 +9470,12 @@ var McpStatus = ({
9489
9470
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9490
9471
  " - ",
9491
9472
  statusText,
9492
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9473
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9493
9474
  ] }),
9494
9475
  authStatusNode
9495
9476
  ] }),
9496
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9497
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9477
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9478
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9498
9479
  " (",
9499
9480
  toolCount,
9500
9481
  " tools cached)"
@@ -10055,7 +10036,7 @@ var Notifications = () => {
10055
10036
  if (dismissed) return [];
10056
10037
  const counts = persistentState.get("startupWarningCounts") || {};
10057
10038
  return startupWarnings.filter((w) => {
10058
- if (w.priority === WarningPriority.Low) {
10039
+ if (w.priority === "low" /* Low */) {
10059
10040
  const count = counts[w.id] || 0;
10060
10041
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10061
10042
  }
@@ -10068,7 +10049,7 @@ var Notifications = () => {
10068
10049
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10069
10050
  let changed = false;
10070
10051
  visibleWarnings.forEach((w) => {
10071
- if (w.priority === WarningPriority.Low) {
10052
+ if (w.priority === "low" /* Low */) {
10072
10053
  counts[w.id] = (counts[w.id] || 0) + 1;
10073
10054
  changed = true;
10074
10055
  }
@@ -10175,7 +10156,7 @@ var UserIdentity = ({ config }) => {
10175
10156
  }
10176
10157
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
10177
10158
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
10178
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
10159
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
10179
10160
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
10180
10161
  "Signed in with Google",
10181
10162
  email ? ":" : ""
@@ -10418,7 +10399,7 @@ var import_react32 = __toESM(require_react(), 1);
10418
10399
  function getConfirmingToolState(pendingHistoryItems) {
10419
10400
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10420
10401
  const confirmingTools = allPendingTools.filter(
10421
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10402
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10422
10403
  );
10423
10404
  if (confirmingTools.length === 0) {
10424
10405
  return null;
@@ -11726,7 +11707,7 @@ var ExitPlanModeDialog = ({
11726
11707
  {
11727
11708
  questions: [
11728
11709
  {
11729
- type: QuestionType.CHOICE,
11710
+ type: "choice" /* CHOICE */,
11730
11711
  header: "Approval",
11731
11712
  question: planContent,
11732
11713
  options: [
@@ -11747,9 +11728,9 @@ var ExitPlanModeDialog = ({
11747
11728
  onSubmit: (answers) => {
11748
11729
  const answer = answers["0"];
11749
11730
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11750
- onApprove(ApprovalMode.AUTO_EDIT);
11731
+ onApprove("autoEdit" /* AUTO_EDIT */);
11751
11732
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11752
- onApprove(ApprovalMode.DEFAULT);
11733
+ onApprove("default" /* DEFAULT */);
11753
11734
  } else if (answer) {
11754
11735
  onFeedback(answer);
11755
11736
  }
@@ -11960,7 +11941,7 @@ ${deceptiveUrlWarnings.map(
11960
11941
  );
11961
11942
  (0, import_react37.useEffect)(() => {
11962
11943
  if (isCancelling) {
11963
- handleConfirm(ToolConfirmationOutcome.Cancel);
11944
+ handleConfirm("cancel" /* Cancel */);
11964
11945
  }
11965
11946
  }, [isCancelling, handleConfirm]);
11966
11947
  const handleSelect = (0, import_react37.useCallback)(
@@ -11973,19 +11954,19 @@ ${deceptiveUrlWarnings.map(
11973
11954
  if (!confirmationDetails.isModifying) {
11974
11955
  options2.push({
11975
11956
  label: "Allow once",
11976
- value: ToolConfirmationOutcome.ProceedOnce,
11957
+ value: "proceed_once" /* ProceedOnce */,
11977
11958
  key: "Allow once"
11978
11959
  });
11979
11960
  if (isTrustedFolder) {
11980
11961
  options2.push({
11981
11962
  label: "Allow for this session",
11982
- value: ToolConfirmationOutcome.ProceedAlways,
11963
+ value: "proceed_always" /* ProceedAlways */,
11983
11964
  key: "Allow for this session"
11984
11965
  });
11985
11966
  if (allowPermanentApproval) {
11986
11967
  options2.push({
11987
11968
  label: "Allow for this file in all future sessions",
11988
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11969
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11989
11970
  key: "Allow for this file in all future sessions"
11990
11971
  });
11991
11972
  }
@@ -11993,119 +11974,119 @@ ${deceptiveUrlWarnings.map(
11993
11974
  if (!config.getIdeMode() || !isDiffingEnabled) {
11994
11975
  options2.push({
11995
11976
  label: "Modify with external editor",
11996
- value: ToolConfirmationOutcome.ModifyWithEditor,
11977
+ value: "modify_with_editor" /* ModifyWithEditor */,
11997
11978
  key: "Modify with external editor"
11998
11979
  });
11999
11980
  }
12000
11981
  options2.push({
12001
11982
  label: "No, suggest changes (esc)",
12002
- value: ToolConfirmationOutcome.Cancel,
11983
+ value: "cancel" /* Cancel */,
12003
11984
  key: "No, suggest changes (esc)"
12004
11985
  });
12005
11986
  }
12006
11987
  } else if (confirmationDetails.type === "sandbox_expansion") {
12007
11988
  options2.push({
12008
11989
  label: "Allow once",
12009
- value: ToolConfirmationOutcome.ProceedOnce,
11990
+ value: "proceed_once" /* ProceedOnce */,
12010
11991
  key: "Allow once"
12011
11992
  });
12012
11993
  if (isTrustedFolder) {
12013
11994
  options2.push({
12014
11995
  label: "Allow for this session",
12015
- value: ToolConfirmationOutcome.ProceedAlways,
11996
+ value: "proceed_always" /* ProceedAlways */,
12016
11997
  key: "Allow for this session"
12017
11998
  });
12018
11999
  if (allowPermanentApproval) {
12019
12000
  options2.push({
12020
12001
  label: "Allow for all future sessions",
12021
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12002
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12022
12003
  key: "Allow for all future sessions"
12023
12004
  });
12024
12005
  }
12025
12006
  }
12026
12007
  options2.push({
12027
12008
  label: "No, suggest changes (esc)",
12028
- value: ToolConfirmationOutcome.Cancel,
12009
+ value: "cancel" /* Cancel */,
12029
12010
  key: "No, suggest changes (esc)"
12030
12011
  });
12031
12012
  } else if (confirmationDetails.type === "exec") {
12032
12013
  options2.push({
12033
12014
  label: "Allow once",
12034
- value: ToolConfirmationOutcome.ProceedOnce,
12015
+ value: "proceed_once" /* ProceedOnce */,
12035
12016
  key: "Allow once"
12036
12017
  });
12037
12018
  if (isTrustedFolder) {
12038
12019
  options2.push({
12039
12020
  label: `Allow for this session`,
12040
- value: ToolConfirmationOutcome.ProceedAlways,
12021
+ value: "proceed_always" /* ProceedAlways */,
12041
12022
  key: `Allow for this session`
12042
12023
  });
12043
12024
  if (allowPermanentApproval) {
12044
12025
  options2.push({
12045
12026
  label: `Allow this command for all future sessions`,
12046
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12027
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12047
12028
  key: `Allow for all future sessions`
12048
12029
  });
12049
12030
  }
12050
12031
  }
12051
12032
  options2.push({
12052
12033
  label: "No, suggest changes (esc)",
12053
- value: ToolConfirmationOutcome.Cancel,
12034
+ value: "cancel" /* Cancel */,
12054
12035
  key: "No, suggest changes (esc)"
12055
12036
  });
12056
12037
  } else if (confirmationDetails.type === "info") {
12057
12038
  options2.push({
12058
12039
  label: "Allow once",
12059
- value: ToolConfirmationOutcome.ProceedOnce,
12040
+ value: "proceed_once" /* ProceedOnce */,
12060
12041
  key: "Allow once"
12061
12042
  });
12062
12043
  if (isTrustedFolder) {
12063
12044
  options2.push({
12064
12045
  label: "Allow for this session",
12065
- value: ToolConfirmationOutcome.ProceedAlways,
12046
+ value: "proceed_always" /* ProceedAlways */,
12066
12047
  key: "Allow for this session"
12067
12048
  });
12068
12049
  if (allowPermanentApproval) {
12069
12050
  options2.push({
12070
12051
  label: "Allow for all future sessions",
12071
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12052
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12072
12053
  key: "Allow for all future sessions"
12073
12054
  });
12074
12055
  }
12075
12056
  }
12076
12057
  options2.push({
12077
12058
  label: "No, suggest changes (esc)",
12078
- value: ToolConfirmationOutcome.Cancel,
12059
+ value: "cancel" /* Cancel */,
12079
12060
  key: "No, suggest changes (esc)"
12080
12061
  });
12081
12062
  } else if (confirmationDetails.type === "mcp") {
12082
12063
  options2.push({
12083
12064
  label: "Allow once",
12084
- value: ToolConfirmationOutcome.ProceedOnce,
12065
+ value: "proceed_once" /* ProceedOnce */,
12085
12066
  key: "Allow once"
12086
12067
  });
12087
12068
  if (isTrustedFolder) {
12088
12069
  options2.push({
12089
12070
  label: "Allow tool for this session",
12090
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
12071
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
12091
12072
  key: "Allow tool for this session"
12092
12073
  });
12093
12074
  options2.push({
12094
12075
  label: "Allow all server tools for this session",
12095
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
12076
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
12096
12077
  key: "Allow all server tools for this session"
12097
12078
  });
12098
12079
  if (allowPermanentApproval) {
12099
12080
  options2.push({
12100
12081
  label: "Allow tool for all future sessions",
12101
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12082
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12102
12083
  key: "Allow tool for all future sessions"
12103
12084
  });
12104
12085
  }
12105
12086
  }
12106
12087
  options2.push({
12107
12088
  label: "No, suggest changes (esc)",
12108
- value: ToolConfirmationOutcome.Cancel,
12089
+ value: "cancel" /* Cancel */,
12109
12090
  key: "No, suggest changes (esc)"
12110
12091
  });
12111
12092
  }
@@ -12144,7 +12125,7 @@ ${deceptiveUrlWarnings.map(
12144
12125
  const containsRedirection = commandsToDisplay.some(
12145
12126
  (cmd) => hasRedirection(cmd)
12146
12127
  );
12147
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12128
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12148
12129
  if (containsRedirection && !isAutoEdit) {
12149
12130
  extraInfoLines = 1;
12150
12131
  }
@@ -12170,7 +12151,7 @@ ${deceptiveUrlWarnings.map(
12170
12151
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12171
12152
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12172
12153
  const alwaysAndSaveIndex = options2.findIndex(
12173
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12154
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12174
12155
  );
12175
12156
  if (alwaysAndSaveIndex !== -1) {
12176
12157
  initialIndex2 = alwaysAndSaveIndex;
@@ -12187,10 +12168,10 @@ ${deceptiveUrlWarnings.map(
12187
12168
  {
12188
12169
  questions: confirmationDetails.questions,
12189
12170
  onSubmit: (answers) => {
12190
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12171
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12191
12172
  },
12192
12173
  onCancel: () => {
12193
- handleConfirm(ToolConfirmationOutcome.Cancel);
12174
+ handleConfirm("cancel" /* Cancel */);
12194
12175
  },
12195
12176
  width: terminalWidth,
12196
12177
  availableHeight: bodyHeight
@@ -12211,19 +12192,19 @@ ${deceptiveUrlWarnings.map(
12211
12192
  planPath: confirmationDetails.planPath,
12212
12193
  getPreferredEditor,
12213
12194
  onApprove: (approvalMode) => {
12214
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12195
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12215
12196
  approved: true,
12216
12197
  approvalMode
12217
12198
  });
12218
12199
  },
12219
12200
  onFeedback: (feedback) => {
12220
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12201
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12221
12202
  approved: false,
12222
12203
  feedback
12223
12204
  });
12224
12205
  },
12225
12206
  onCancel: () => {
12226
- handleConfirm(ToolConfirmationOutcome.Cancel);
12207
+ handleConfirm("cancel" /* Cancel */);
12227
12208
  },
12228
12209
  width: terminalWidth,
12229
12210
  availableHeight: bodyHeight
@@ -12332,7 +12313,7 @@ ${deceptiveUrlWarnings.map(
12332
12313
  const containsRedirection = commandsToDisplay.some(
12333
12314
  (cmd) => hasRedirection(cmd)
12334
12315
  );
12335
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12316
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12336
12317
  let warnings = null;
12337
12318
  if (containsRedirection && !isAutoEdit) {
12338
12319
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12491,7 +12472,7 @@ ${deceptiveUrlWarnings.map(
12491
12472
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12492
12473
  const renderRadioItem = (0, import_react37.useCallback)(
12493
12474
  (item, { titleColor }) => {
12494
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12475
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12495
12476
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12496
12477
  item.label,
12497
12478
  " ",
@@ -14521,7 +14502,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14521
14502
  if (settings.merged.security.auth.useExternal) {
14522
14503
  return null;
14523
14504
  }
14524
- if (authType === AuthType.USE_GEMINI) {
14505
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14525
14506
  return null;
14526
14507
  }
14527
14508
  return validateAuthMethod(authType);
@@ -14573,7 +14554,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14573
14554
  }
14574
14555
  return;
14575
14556
  }
14576
- if (authType === AuthType.USE_GEMINI) {
14557
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14577
14558
  const key = await reloadApiKey();
14578
14559
  if (!key) {
14579
14560
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14651,31 +14632,31 @@ function AuthDialog({
14651
14632
  let items = [
14652
14633
  {
14653
14634
  label: "Sign in with Google",
14654
- value: AuthType.LOGIN_WITH_GOOGLE,
14655
- key: AuthType.LOGIN_WITH_GOOGLE
14635
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14636
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14656
14637
  },
14657
14638
  ...process.env["CLOUD_SHELL"] === "true" ? [
14658
14639
  {
14659
14640
  label: "Use Cloud Shell user credentials",
14660
- value: AuthType.COMPUTE_ADC,
14661
- key: AuthType.COMPUTE_ADC
14641
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14642
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14662
14643
  }
14663
14644
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14664
14645
  {
14665
14646
  label: "Use metadata server application default credentials",
14666
- value: AuthType.COMPUTE_ADC,
14667
- key: AuthType.COMPUTE_ADC
14647
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14648
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14668
14649
  }
14669
14650
  ] : [],
14670
14651
  {
14671
14652
  label: "Use Gemini API Key",
14672
- value: AuthType.USE_GEMINI,
14673
- key: AuthType.USE_GEMINI
14653
+ value: "gemini-api-key" /* USE_GEMINI */,
14654
+ key: "gemini-api-key" /* USE_GEMINI */
14674
14655
  },
14675
14656
  {
14676
14657
  label: "Vertex AI",
14677
- value: AuthType.USE_VERTEX_AI,
14678
- key: AuthType.USE_VERTEX_AI
14658
+ value: "vertex-ai" /* USE_VERTEX_AI */,
14659
+ key: "vertex-ai" /* USE_VERTEX_AI */
14679
14660
  }
14680
14661
  ];
14681
14662
  if (settings.merged.security.auth.enforcedType) {
@@ -14697,9 +14678,9 @@ function AuthDialog({
14697
14678
  return item.value === defaultAuthType;
14698
14679
  }
14699
14680
  if (process.env["GEMINI_API_KEY"]) {
14700
- return item.value === AuthType.USE_GEMINI;
14681
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
14701
14682
  }
14702
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
14683
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14703
14684
  });
14704
14685
  if (settings.merged.security.auth.enforcedType) {
14705
14686
  initialAuthIndex = 0;
@@ -14710,7 +14691,7 @@ function AuthDialog({
14710
14691
  return;
14711
14692
  }
14712
14693
  if (authType) {
14713
- const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14694
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14714
14695
  if (needsRestart) {
14715
14696
  setAuthContext({ requiresRestart: true });
14716
14697
  } else {
@@ -14718,12 +14699,12 @@ function AuthDialog({
14718
14699
  }
14719
14700
  await clearCachedCredentialFile();
14720
14701
  settings.setValue(scope, "security.auth.selectedType", authType);
14721
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14702
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14722
14703
  setExiting(true);
14723
14704
  setTimeout(relaunchApp, 100);
14724
14705
  return;
14725
14706
  }
14726
- if (authType === AuthType.USE_GEMINI) {
14707
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14727
14708
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14728
14709
  return;
14729
14710
  }
@@ -15530,11 +15511,11 @@ var PrivacyNoticeText = ({
15530
15511
  }) => {
15531
15512
  const authType = config.getContentGeneratorConfig()?.authType;
15532
15513
  switch (authType) {
15533
- case AuthType.USE_GEMINI:
15514
+ case "gemini-api-key" /* USE_GEMINI */:
15534
15515
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15535
- case AuthType.USE_VERTEX_AI:
15516
+ case "vertex-ai" /* USE_VERTEX_AI */:
15536
15517
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15537
- case AuthType.LOGIN_WITH_GOOGLE:
15518
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15538
15519
  default:
15539
15520
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15540
15521
  }
@@ -15594,7 +15575,7 @@ function ProQuotaDialog({
15594
15575
  value: "retry_always",
15595
15576
  key: "retry_always"
15596
15577
  },
15597
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15578
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15598
15579
  {
15599
15580
  label: "Upgrade for higher limits",
15600
15581
  value: "upgrade",
@@ -16753,7 +16734,7 @@ function ModelDialog({ onClose }) {
16753
16734
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16754
16735
  const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
16755
16736
  const selectedAuthType = settings.merged.security.auth.selectedType;
16756
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16737
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16757
16738
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16758
16739
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16759
16740
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -18077,10 +18058,10 @@ function initializeConsoleStore() {
18077
18058
  globalConsoleMessages = [];
18078
18059
  globalErrorCount = 0;
18079
18060
  notifyListeners();
18080
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
18081
- coreEvents.off(CoreEvent.Output, handleOutput);
18082
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
18083
- coreEvents.on(CoreEvent.Output, handleOutput);
18061
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
18062
+ coreEvents.off("output" /* Output */, handleOutput);
18063
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
18064
+ coreEvents.on("output" /* Output */, handleOutput);
18084
18065
  }
18085
18066
  function notifyListeners() {
18086
18067
  for (const listener of listeners) {
@@ -20217,7 +20198,7 @@ function usePromptCompletion({
20217
20198
  { model: "prompt-completion" },
20218
20199
  contents,
20219
20200
  signal,
20220
- LlmRole.UTILITY_AUTOCOMPLETE
20201
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20221
20202
  );
20222
20203
  if (signal.aborted) {
20223
20204
  return;
@@ -22289,9 +22270,9 @@ var InputPrompt = ({
22289
22270
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22290
22271
  }
22291
22272
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22292
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22293
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22294
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22273
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22274
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22275
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22295
22276
  let statusColor;
22296
22277
  let statusText = "";
22297
22278
  if (shellModeActive) {
@@ -23124,22 +23105,22 @@ var ApprovalModeIndicator = ({
23124
23105
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23125
23106
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23126
23107
  switch (approvalMode) {
23127
- case ApprovalMode.AUTO_EDIT:
23108
+ case "autoEdit" /* AUTO_EDIT */:
23128
23109
  textColor = theme.status.warning;
23129
23110
  textContent = "auto-accept edits";
23130
23111
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23131
23112
  break;
23132
- case ApprovalMode.PLAN:
23113
+ case "plan" /* PLAN */:
23133
23114
  textColor = theme.status.success;
23134
23115
  textContent = "plan";
23135
23116
  subText = `${cycleHint} to manual`;
23136
23117
  break;
23137
- case ApprovalMode.YOLO:
23118
+ case "yolo" /* YOLO */:
23138
23119
  textColor = theme.status.error;
23139
23120
  textContent = "YOLO";
23140
23121
  subText = yoloHint;
23141
23122
  break;
23142
- case ApprovalMode.DEFAULT:
23123
+ case "default" /* DEFAULT */:
23143
23124
  default:
23144
23125
  textColor = theme.text.accent;
23145
23126
  textContent = "";
@@ -23187,7 +23168,7 @@ var useComposerStatus = () => {
23187
23168
  (item) => item.type === "tool_group"
23188
23169
  ).some(
23189
23170
  (item) => item.tools.some(
23190
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23171
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23191
23172
  )
23192
23173
  ),
23193
23174
  [uiState.pendingHistoryItems]
@@ -23202,13 +23183,13 @@ var useComposerStatus = () => {
23202
23183
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23203
23184
  if (hideMinimalModeHintWhileBusy) return null;
23204
23185
  switch (showApprovalModeIndicator) {
23205
- case ApprovalMode.YOLO:
23186
+ case "yolo" /* YOLO */:
23206
23187
  return { text: "YOLO", color: theme.status.error };
23207
- case ApprovalMode.PLAN:
23188
+ case "plan" /* PLAN */:
23208
23189
  return { text: "plan", color: theme.status.success };
23209
- case ApprovalMode.AUTO_EDIT:
23190
+ case "autoEdit" /* AUTO_EDIT */:
23210
23191
  return { text: "auto edit", color: theme.status.warning };
23211
- case ApprovalMode.DEFAULT:
23192
+ case "default" /* DEFAULT */:
23212
23193
  default:
23213
23194
  return null;
23214
23195
  }
@@ -23562,7 +23543,7 @@ var ConfigInitDisplay = ({
23562
23543
  let connected = 0;
23563
23544
  const connecting = [];
23564
23545
  for (const [name, client] of clients.entries()) {
23565
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23546
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23566
23547
  connected++;
23567
23548
  } else {
23568
23549
  connecting.push(name);
@@ -23584,9 +23565,9 @@ var ConfigInitDisplay = ({
23584
23565
  );
23585
23566
  }
23586
23567
  };
23587
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23568
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23588
23569
  return () => {
23589
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23570
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23590
23571
  };
23591
23572
  }, [initialMessage]);
23592
23573
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24303,7 +24284,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24303
24284
  callId,
24304
24285
  name: SHELL_COMMAND_NAME,
24305
24286
  description: rawQuery,
24306
- status: CoreToolCallStatus.Executing,
24287
+ status: "executing" /* Executing */,
24307
24288
  isClientInitiated: true,
24308
24289
  resultDisplay: "",
24309
24290
  confirmationDetails: void 0
@@ -24444,7 +24425,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24444
24425
  mainContent = result.output.trim() || "(Command produced no output)";
24445
24426
  }
24446
24427
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24447
- let finalStatus = CoreToolCallStatus.Success;
24428
+ let finalStatus = "success" /* Success */;
24448
24429
  const prependToAnsiOutput = (output, text) => {
24449
24430
  const newLines = text.split("\n").map((line) => [
24450
24431
  {
@@ -24463,20 +24444,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24463
24444
  };
24464
24445
  let prefix = "";
24465
24446
  if (result.error) {
24466
- finalStatus = CoreToolCallStatus.Error;
24447
+ finalStatus = "error" /* Error */;
24467
24448
  prefix = result.error.message;
24468
24449
  } else if (result.aborted) {
24469
- finalStatus = CoreToolCallStatus.Cancelled;
24450
+ finalStatus = "cancelled" /* Cancelled */;
24470
24451
  prefix = "Command was cancelled.";
24471
24452
  } else if (result.backgrounded) {
24472
- finalStatus = CoreToolCallStatus.Success;
24453
+ finalStatus = "success" /* Success */;
24473
24454
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24474
24455
  mainContent = finalOutput;
24475
24456
  } else if (result.signal) {
24476
- finalStatus = CoreToolCallStatus.Error;
24457
+ finalStatus = "error" /* Error */;
24477
24458
  prefix = `Command terminated by signal: ${result.signal}.`;
24478
24459
  } else if (result.exitCode !== 0) {
24479
- finalStatus = CoreToolCallStatus.Error;
24460
+ finalStatus = "error" /* Error */;
24480
24461
  prefix = `Command exited with code ${result.exitCode}.`;
24481
24462
  }
24482
24463
  if (prefix) {
@@ -24502,7 +24483,7 @@ ${mainContent}`;
24502
24483
  status: finalStatus,
24503
24484
  resultDisplay: finalOutput
24504
24485
  };
24505
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24486
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24506
24487
  addItemToHistory(
24507
24488
  {
24508
24489
  type: "tool_group",
@@ -25512,13 +25493,13 @@ function useQuotaAndFallback({
25512
25493
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25513
25494
  `/stats model for usage details`,
25514
25495
  `/model to switch models.`,
25515
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25496
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25516
25497
  ].filter(Boolean);
25517
25498
  message = messageLines.join("\n");
25518
25499
  }
25519
25500
  } else if (error instanceof ModelNotFoundError) {
25520
25501
  isModelNotFoundError = true;
25521
- if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
25502
+ if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
25522
25503
  const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
25523
25504
  const messageLines = [
25524
25505
  `Model "${failedModel}" is not available in region "${location}".`,
@@ -25712,7 +25693,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25712
25693
  );
25713
25694
  setEditorError(null);
25714
25695
  setIsEditorDialogOpen(false);
25715
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25696
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25716
25697
  } catch (error) {
25717
25698
  setEditorError(`Failed to set editor preference: ${error}`);
25718
25699
  }
@@ -25721,7 +25702,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25721
25702
  );
25722
25703
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25723
25704
  setIsEditorDialogOpen(false);
25724
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25705
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25725
25706
  }, []);
25726
25707
  return {
25727
25708
  isEditorDialogOpen,
@@ -26098,7 +26079,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26098
26079
  canonicalPath: resolvedCommandPath
26099
26080
  } = parseSlashCommand(trimmed, commands);
26100
26081
  if (!commandToExecute) {
26101
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
26082
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
26102
26083
  if (isMcpLoading) {
26103
26084
  setIsProcessing(true);
26104
26085
  if (addToHistory) {
@@ -26278,7 +26259,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26278
26259
  onConfirm: async (resolvedOutcome) => {
26279
26260
  resolve3({
26280
26261
  outcome: resolvedOutcome,
26281
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26262
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26282
26263
  });
26283
26264
  }
26284
26265
  };
@@ -26286,7 +26267,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26286
26267
  callId,
26287
26268
  name: "Expansion",
26288
26269
  description: "Command expansion needs shell access",
26289
- status: CoreToolCallStatus.AwaitingApproval,
26270
+ status: "awaiting_approval" /* AwaitingApproval */,
26290
26271
  isClientInitiated: true,
26291
26272
  resultDisplay: void 0,
26292
26273
  confirmationDetails
@@ -26297,7 +26278,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26297
26278
  });
26298
26279
  });
26299
26280
  setPendingItem(null);
26300
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26281
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26301
26282
  addItem(
26302
26283
  {
26303
26284
  type: "info" /* INFO */,
@@ -26307,7 +26288,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26307
26288
  );
26308
26289
  return { type: "handled" };
26309
26290
  }
26310
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26291
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26311
26292
  setSessionShellAllowlist(
26312
26293
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26313
26294
  );
@@ -26783,7 +26764,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26783
26764
  let description;
26784
26765
  let renderOutputAsMarkdown = false;
26785
26766
  const displayName = call.tool?.displayName ?? call.request.name;
26786
- if (call.status === CoreToolCallStatus.Error) {
26767
+ if (call.status === "error" /* Error */) {
26787
26768
  description = JSON.stringify(call.request.args);
26788
26769
  } else {
26789
26770
  description = call.invocation.getDescription();
@@ -26806,27 +26787,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26806
26787
  let progress = void 0;
26807
26788
  let progressTotal = void 0;
26808
26789
  switch (call.status) {
26809
- case CoreToolCallStatus.Success:
26790
+ case "success" /* Success */:
26810
26791
  resultDisplay = call.response.resultDisplay;
26811
26792
  outputFile = call.response.outputFile;
26812
26793
  break;
26813
- case CoreToolCallStatus.Error:
26814
- case CoreToolCallStatus.Cancelled:
26794
+ case "error" /* Error */:
26795
+ case "cancelled" /* Cancelled */:
26815
26796
  resultDisplay = call.response.resultDisplay;
26816
26797
  break;
26817
- case CoreToolCallStatus.AwaitingApproval:
26798
+ case "awaiting_approval" /* AwaitingApproval */:
26818
26799
  correlationId = call.correlationId;
26819
26800
  confirmationDetails = call.confirmationDetails;
26820
26801
  break;
26821
- case CoreToolCallStatus.Executing:
26802
+ case "executing" /* Executing */:
26822
26803
  resultDisplay = call.liveOutput;
26823
26804
  ptyId = call.pid;
26824
26805
  progressMessage = call.progressMessage;
26825
26806
  progress = call.progress;
26826
26807
  progressTotal = call.progressTotal;
26827
26808
  break;
26828
- case CoreToolCallStatus.Scheduled:
26829
- case CoreToolCallStatus.Validating:
26809
+ case "scheduled" /* Scheduled */:
26810
+ case "validating" /* Validating */:
26830
26811
  break;
26831
26812
  default: {
26832
26813
  const exhaustiveCheck = call;
@@ -26897,7 +26878,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26897
26878
  const handler = (event) => {
26898
26879
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26899
26880
  const hasExecuting = event.toolCalls.some(
26900
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26881
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26901
26882
  );
26902
26883
  if (hasExecuting) {
26903
26884
  setLastToolOutputTime(Date.now());
@@ -26906,7 +26887,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26906
26887
  const prevCalls = prev[event.schedulerId] ?? [];
26907
26888
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26908
26889
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26909
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26890
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26910
26891
  );
26911
26892
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26912
26893
  return prev;
@@ -26918,9 +26899,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26918
26899
  };
26919
26900
  });
26920
26901
  };
26921
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26902
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26922
26903
  return () => {
26923
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26904
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26924
26905
  };
26925
26906
  }, [messageBus, internalAdaptToolCalls]);
26926
26907
  (0, import_react98.useEffect)(() => {
@@ -26942,9 +26923,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26942
26923
  };
26943
26924
  });
26944
26925
  };
26945
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26926
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26946
26927
  return () => {
26947
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26928
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26948
26929
  };
26949
26930
  }, [messageBus]);
26950
26931
  const schedule = (0, import_react98.useCallback)(
@@ -27043,8 +27024,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
27043
27024
  const prev = prevMap.get(coreCall.request.callId);
27044
27025
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
27045
27026
  let status = coreCall.status;
27046
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
27047
- status = CoreToolCallStatus.Executing;
27027
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
27028
+ status = "executing" /* Executing */;
27048
27029
  }
27049
27030
  return {
27050
27031
  ...coreCall,
@@ -27076,7 +27057,7 @@ function getBackgroundedToolInfo(toolCall) {
27076
27057
  };
27077
27058
  }
27078
27059
  function isBackgroundableExecutingToolCall(toolCall) {
27079
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
27060
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
27080
27061
  }
27081
27062
  function showCitations(settings) {
27082
27063
  const enabled = settings.merged.ui.showCitations;
@@ -27086,14 +27067,14 @@ function showCitations(settings) {
27086
27067
  return true;
27087
27068
  }
27088
27069
  function calculateStreamingState(isResponding, toolCalls) {
27089
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
27070
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
27090
27071
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
27091
27072
  }
27092
27073
  const isAnyToolActive = toolCalls.some((tc) => {
27093
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
27074
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
27094
27075
  return true;
27095
27076
  }
27096
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
27077
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
27097
27078
  return !tc.responseSubmittedToGemini;
27098
27079
  }
27099
27080
  return false;
@@ -27140,9 +27121,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27140
27121
  }
27141
27122
  setRetryStatus(payload);
27142
27123
  };
27143
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
27124
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27144
27125
  return () => {
27145
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
27126
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27146
27127
  };
27147
27128
  }, [isRespondingRef]);
27148
27129
  const [
@@ -27275,12 +27256,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27275
27256
  const tc = toolCalls[i];
27276
27257
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27277
27258
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27278
- const isAgent = tc.tool?.kind === Kind.Agent;
27259
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
27279
27260
  if (isAgent) {
27280
27261
  let contigAgentsComplete = true;
27281
27262
  for (let j = i + 1; j < toolCalls.length; j++) {
27282
27263
  const nextTc = toolCalls[j];
27283
- if (nextTc.tool?.kind === Kind.Agent) {
27264
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
27284
27265
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27285
27266
  contigAgentsComplete = false;
27286
27267
  break;
@@ -27306,7 +27287,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27306
27287
  let currentGroup = [];
27307
27288
  for (const tc of toolsToPush) {
27308
27289
  newPushed.add(tc.request.callId);
27309
- if (tc.tool?.kind === Kind.Agent) {
27290
+ if (tc.tool?.kind === "agent" /* Agent */) {
27310
27291
  currentGroup.push(tc);
27311
27292
  } else {
27312
27293
  if (currentGroup.length > 0) {
@@ -27459,7 +27440,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27459
27440
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27460
27441
  }, [activeShellPtyId, addItem, setIsResponding]);
27461
27442
  (0, import_react99.useEffect)(() => {
27462
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27443
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27463
27444
  const lastUserMessageIndex = history.findLastIndex(
27464
27445
  (item) => item.type === "user" /* USER */
27465
27446
  );
@@ -27527,7 +27508,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27527
27508
  return;
27528
27509
  }
27529
27510
  const hasActiveTools = toolCalls.some(
27530
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27511
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27531
27512
  );
27532
27513
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27533
27514
  if (clearBuffer) {
@@ -27554,7 +27535,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27554
27535
  if (tool.name === SHELL_COMMAND_NAME) {
27555
27536
  return {
27556
27537
  ...tool,
27557
- status: CoreToolCallStatus.Cancelled,
27538
+ status: "cancelled" /* Cancelled */,
27558
27539
  resultDisplay: tool.resultDisplay
27559
27540
  };
27560
27541
  }
@@ -27619,7 +27600,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27619
27600
  let localQueryToSendToGemini = null;
27620
27601
  if (typeof query === "string") {
27621
27602
  const trimmedQuery = query.trim();
27622
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27603
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
27623
27604
  if (!shellModeActive) {
27624
27605
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27625
27606
  if (slashCommandResult) {
@@ -27775,7 +27756,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27775
27756
  if (pendingHistoryItemRef.current) {
27776
27757
  if (pendingHistoryItemRef.current.type === "tool_group") {
27777
27758
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27778
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27759
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27779
27760
  );
27780
27761
  const pendingItem = {
27781
27762
  ...pendingHistoryItemRef.current,
@@ -28067,15 +28048,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28067
28048
  let geminiMessageBuffer = "";
28068
28049
  const toolCallRequests = [];
28069
28050
  for await (const event of stream) {
28070
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
28051
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
28071
28052
  setThought(null);
28072
28053
  }
28073
28054
  switch (event.type) {
28074
- case GeminiEventType.Thought:
28055
+ case "thought" /* Thought */:
28075
28056
  setLastGeminiActivityTime(Date.now());
28076
28057
  handleThoughtEvent(event.value, userMessageTimestamp);
28077
28058
  break;
28078
- case GeminiEventType.Content:
28059
+ case "content" /* Content */:
28079
28060
  setLastGeminiActivityTime(Date.now());
28080
28061
  geminiMessageBuffer = handleContentEvent(
28081
28062
  event.value,
@@ -28083,16 +28064,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28083
28064
  userMessageTimestamp
28084
28065
  );
28085
28066
  break;
28086
- case GeminiEventType.ToolCallRequest:
28067
+ case "tool_call_request" /* ToolCallRequest */:
28087
28068
  toolCallRequests.push(event.value);
28088
28069
  break;
28089
- case GeminiEventType.UserCancelled:
28070
+ case "user_cancelled" /* UserCancelled */:
28090
28071
  handleUserCancelledEvent(userMessageTimestamp);
28091
28072
  break;
28092
- case GeminiEventType.Error:
28073
+ case "error" /* Error */:
28093
28074
  handleErrorEvent(event.value, userMessageTimestamp);
28094
28075
  break;
28095
- case GeminiEventType.AgentExecutionStopped:
28076
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
28096
28077
  handleAgentExecutionStoppedEvent(
28097
28078
  event.value.reason,
28098
28079
  userMessageTimestamp,
@@ -28100,7 +28081,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28100
28081
  event.value.contextCleared
28101
28082
  );
28102
28083
  break;
28103
- case GeminiEventType.AgentExecutionBlocked:
28084
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
28104
28085
  handleAgentExecutionBlockedEvent(
28105
28086
  event.value.reason,
28106
28087
  userMessageTimestamp,
@@ -28108,36 +28089,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28108
28089
  event.value.contextCleared
28109
28090
  );
28110
28091
  break;
28111
- case GeminiEventType.ChatCompressed:
28092
+ case "chat_compressed" /* ChatCompressed */:
28112
28093
  handleChatCompressionEvent(event.value, userMessageTimestamp);
28113
28094
  break;
28114
- case GeminiEventType.ToolCallConfirmation:
28115
- case GeminiEventType.ToolCallResponse:
28095
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
28096
+ case "tool_call_response" /* ToolCallResponse */:
28116
28097
  break;
28117
- case GeminiEventType.MaxSessionTurns:
28098
+ case "max_session_turns" /* MaxSessionTurns */:
28118
28099
  handleMaxSessionTurnsEvent();
28119
28100
  break;
28120
- case GeminiEventType.ContextWindowWillOverflow:
28101
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
28121
28102
  handleContextWindowWillOverflowEvent(
28122
28103
  event.value.estimatedRequestTokenCount,
28123
28104
  event.value.remainingTokenCount
28124
28105
  );
28125
28106
  break;
28126
- case GeminiEventType.Finished:
28107
+ case "finished" /* Finished */:
28127
28108
  handleFinishedEvent(event, userMessageTimestamp);
28128
28109
  break;
28129
- case GeminiEventType.Citation:
28110
+ case "citation" /* Citation */:
28130
28111
  handleCitationEvent(event.value, userMessageTimestamp);
28131
28112
  break;
28132
- case GeminiEventType.ModelInfo:
28113
+ case "model_info" /* ModelInfo */:
28133
28114
  handleChatModelEvent(event.value, userMessageTimestamp);
28134
28115
  break;
28135
- case GeminiEventType.LoopDetected:
28116
+ case "loop_detected" /* LoopDetected */:
28136
28117
  loopDetectedRef.current = true;
28137
28118
  break;
28138
- case GeminiEventType.Retry:
28119
+ case "retry" /* Retry */:
28139
28120
  break;
28140
- case GeminiEventType.InvalidStream:
28121
+ case "invalid_stream" /* InvalidStream */:
28141
28122
  handleInvalidStreamEvent(event.value, userMessageTimestamp);
28142
28123
  break;
28143
28124
  default: {
@@ -28191,7 +28172,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28191
28172
  const submitQuery = (0, import_react99.useCallback)(
28192
28173
  async (query, options, prompt_id) => runInDevTraceSpan(
28193
28174
  {
28194
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
28175
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
28195
28176
  sessionId: config.getSessionId()
28196
28177
  },
28197
28178
  async ({ metadata: spanMetadata }) => {
@@ -28358,7 +28339,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28358
28339
  submitQueryRef.current = submitQuery;
28359
28340
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28360
28341
  async (newApprovalMode) => {
28361
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28342
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28362
28343
  if (geminiClient) {
28363
28344
  try {
28364
28345
  await geminiClient.addHistory({
@@ -28381,11 +28362,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28381
28362
  }
28382
28363
  }
28383
28364
  previousApprovalModeRef.current = newApprovalMode;
28384
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28365
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28385
28366
  let awaitingApprovalCalls = toolCalls.filter(
28386
28367
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28387
28368
  );
28388
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28369
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28389
28370
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28390
28371
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28391
28372
  return true;
@@ -28401,11 +28382,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28401
28382
  if (call.correlationId) {
28402
28383
  try {
28403
28384
  await config.getMessageBus().publish({
28404
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28385
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28405
28386
  correlationId: call.correlationId,
28406
28387
  confirmed: true,
28407
28388
  requiresUserConfirmation: false,
28408
- outcome: ToolConfirmationOutcome.ProceedOnce
28389
+ outcome: "proceed_once" /* ProceedOnce */
28409
28390
  });
28410
28391
  } catch (error) {
28411
28392
  debugLogger.warn(
@@ -28496,14 +28477,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28496
28477
  );
28497
28478
  if (isLowErrorVerbosity) {
28498
28479
  suppressedToolErrorCountRef.current += geminiTools.filter(
28499
- (tc) => tc.status === CoreToolCallStatus.Error
28480
+ (tc) => tc.status === "error" /* Error */
28500
28481
  ).length;
28501
28482
  }
28502
28483
  if (geminiTools.length === 0) {
28503
28484
  return;
28504
28485
  }
28505
28486
  const stopExecutionTool = geminiTools.find(
28506
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28487
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28507
28488
  );
28508
28489
  if (stopExecutionTool && stopExecutionTool.response.error) {
28509
28490
  maybeAddSuppressedToolErrorNote();
@@ -28523,9 +28504,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28523
28504
  (tc) => !isTopicTool2(tc.request.name)
28524
28505
  );
28525
28506
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28526
- (tc) => tc.status === CoreToolCallStatus.Cancelled
28507
+ (tc) => tc.status === "cancelled" /* Cancelled */
28527
28508
  );
28528
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28509
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28529
28510
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28530
28511
  if (!turnCancelledRef.current) {
28531
28512
  addItem({
@@ -28612,7 +28593,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28612
28593
  return;
28613
28594
  }
28614
28595
  const restorableToolCalls = toolCalls.filter(
28615
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28596
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28616
28597
  );
28617
28598
  if (restorableToolCalls.length > 0) {
28618
28599
  if (!gitService) {
@@ -28835,14 +28816,14 @@ var useAgentStream = ({
28835
28816
  const displayName = legacyState?.displayName ?? event.name;
28836
28817
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28837
28818
  const desc = legacyState?.description ?? "";
28838
- const fallbackKind = Kind.Other;
28819
+ const fallbackKind = "other" /* Other */;
28839
28820
  const newCall = {
28840
28821
  callId: event.requestId,
28841
28822
  name: displayName,
28842
28823
  originalRequestName: event.name,
28843
28824
  description: desc,
28844
28825
  display: event.display,
28845
- status: CoreToolCallStatus.Scheduled,
28826
+ status: "scheduled" /* Scheduled */,
28846
28827
  isClientInitiated: false,
28847
28828
  renderOutputAsMarkdown: isOutputMarkdown,
28848
28829
  kind: legacyState?.kind ?? fallbackKind,
@@ -28860,10 +28841,10 @@ var useAgentStream = ({
28860
28841
  const evtStatus = legacyState?.status;
28861
28842
  let status = tc.status;
28862
28843
  if (evtStatus === "executing")
28863
- status = CoreToolCallStatus.Executing;
28864
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28844
+ status = "executing" /* Executing */;
28845
+ else if (evtStatus === "error") status = "error" /* Error */;
28865
28846
  else if (evtStatus === "success")
28866
- status = CoreToolCallStatus.Success;
28847
+ status = "success" /* Success */;
28867
28848
  const display = event.display?.result;
28868
28849
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28869
28850
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28896,7 +28877,7 @@ var useAgentStream = ({
28896
28877
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28897
28878
  return {
28898
28879
  ...tc,
28899
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28880
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28900
28881
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28901
28882
  resultDisplay,
28902
28883
  outputFile
@@ -28962,7 +28943,7 @@ var useAgentStream = ({
28962
28943
  if (!options?.isContinuation) {
28963
28944
  if (typeof query === "string") {
28964
28945
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28965
- void logger?.logMessage(MessageSenderType.USER, query);
28946
+ void logger?.logMessage("user" /* USER */, query);
28966
28947
  }
28967
28948
  startNewPrompt();
28968
28949
  }
@@ -30489,9 +30470,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30489
30470
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30490
30471
  async (choice) => {
30491
30472
  const trustLevelMap = {
30492
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30493
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30494
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30473
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30474
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30475
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30495
30476
  };
30496
30477
  const trustLevel = trustLevelMap[choice];
30497
30478
  if (!trustLevel) return;
@@ -30510,7 +30491,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30510
30491
  }, 100);
30511
30492
  return;
30512
30493
  }
30513
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30494
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30514
30495
  onTrustChange(currentIsTrusted);
30515
30496
  setIsTrusted(currentIsTrusted);
30516
30497
  const wasTrusted = isTrusted ?? false;
@@ -31518,7 +31499,7 @@ function useMessageQueue({
31518
31499
  var import_react107 = __toESM(require_react(), 1);
31519
31500
  function useMcpStatus(config) {
31520
31501
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31521
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31502
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31522
31503
  );
31523
31504
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31524
31505
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31531,12 +31512,12 @@ function useMcpStatus(config) {
31531
31512
  setMcpServerCount(manager.getMcpServerCount());
31532
31513
  }
31533
31514
  };
31534
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31515
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31535
31516
  return () => {
31536
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31517
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31537
31518
  };
31538
31519
  }, [config]);
31539
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31520
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31540
31521
  return {
31541
31522
  discoveryState,
31542
31523
  mcpServerCount,
@@ -31563,7 +31544,7 @@ function useApprovalModeIndicator({
31563
31544
  (key) => {
31564
31545
  let nextApprovalMode;
31565
31546
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31566
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31547
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31567
31548
  if (addItem) {
31568
31549
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31569
31550
  const adminSettings = config.getRemoteAdminSettings();
@@ -31581,21 +31562,21 @@ function useApprovalModeIndicator({
31581
31562
  }
31582
31563
  return;
31583
31564
  }
31584
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31565
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31585
31566
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31586
31567
  const currentMode = config.getApprovalMode();
31587
31568
  switch (currentMode) {
31588
- case ApprovalMode.DEFAULT:
31589
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31569
+ case "default" /* DEFAULT */:
31570
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31590
31571
  break;
31591
- case ApprovalMode.AUTO_EDIT:
31592
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31572
+ case "autoEdit" /* AUTO_EDIT */:
31573
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31593
31574
  break;
31594
- case ApprovalMode.PLAN:
31595
- nextApprovalMode = ApprovalMode.DEFAULT;
31575
+ case "plan" /* PLAN */:
31576
+ nextApprovalMode = "default" /* DEFAULT */;
31596
31577
  break;
31597
- case ApprovalMode.YOLO:
31598
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31578
+ case "yolo" /* YOLO */:
31579
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31599
31580
  break;
31600
31581
  default:
31601
31582
  }
@@ -32005,11 +31986,11 @@ var useHookDisplayState = () => {
32005
31986
  removeHook();
32006
31987
  }
32007
31988
  };
32008
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
32009
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31989
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31990
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
32010
31991
  return () => {
32011
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
32012
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31992
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31993
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
32013
31994
  activeTimeouts.forEach(clearTimeout);
32014
31995
  activeTimeouts.clear();
32015
31996
  };
@@ -32848,7 +32829,7 @@ var AppContainer = (props) => {
32848
32829
  setConfigInitialized(true);
32849
32830
  startupProfiler.flush(config);
32850
32831
  startAutoMemoryIfEnabled(config);
32851
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32832
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32852
32833
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32853
32834
  if (result) {
32854
32835
  const additionalContext = result.getAdditionalContext();
@@ -32875,7 +32856,7 @@ var AppContainer = (props) => {
32875
32856
  );
32876
32857
  const ideClient = await IdeClient.getInstance();
32877
32858
  await ideClient.disconnect();
32878
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32859
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32879
32860
  };
32880
32861
  registerCleanup(cleanupFn);
32881
32862
  return () => {
@@ -32900,11 +32881,11 @@ var AppContainer = (props) => {
32900
32881
  resetTime: payload.resetTime
32901
32882
  });
32902
32883
  };
32903
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32904
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32884
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32885
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32905
32886
  return () => {
32906
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32907
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32887
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32888
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32908
32889
  };
32909
32890
  }, [config]);
32910
32891
  (0, import_react121.useEffect)(() => {
@@ -32917,16 +32898,16 @@ var AppContainer = (props) => {
32917
32898
  const handleAgentsDiscovered = (payload) => {
32918
32899
  setNewAgents(payload.agents);
32919
32900
  };
32920
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32921
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32922
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32901
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32902
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32903
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32923
32904
  return () => {
32924
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32905
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32925
32906
  coreEvents.off(
32926
- CoreEvent.AdminSettingsChanged,
32907
+ "admin-settings-changed" /* AdminSettingsChanged */,
32927
32908
  handleAdminSettingsChanged
32928
32909
  );
32929
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32910
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32930
32911
  };
32931
32912
  }, [settings]);
32932
32913
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32993,11 +32974,11 @@ var AppContainer = (props) => {
32993
32974
  exitEditorDialog
32994
32975
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32995
32976
  (0, import_react121.useEffect)(() => {
32996
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32997
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32977
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32978
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32998
32979
  return () => {
32999
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
33000
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32980
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32981
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
33001
32982
  };
33002
32983
  }, [handleEditorClose, openEditorDialog]);
33003
32984
  (0, import_react121.useEffect)(() => {
@@ -33065,7 +33046,7 @@ var AppContainer = (props) => {
33065
33046
  errorVerbosity: settings.merged.ui.errorVerbosity
33066
33047
  });
33067
33048
  const isAuthDialogOpen = authState === "updating" /* Updating */;
33068
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
33049
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
33069
33050
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
33070
33051
  const { loadHistoryForResume, isResuming } = useSessionResume({
33071
33052
  config,
@@ -33093,7 +33074,7 @@ var AppContainer = (props) => {
33093
33074
  async (authType, scope) => {
33094
33075
  if (authType) {
33095
33076
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
33096
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
33077
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
33097
33078
  setAuthContext({ requiresRestart: true });
33098
33079
  } else {
33099
33080
  setAuthContext({});
@@ -33121,7 +33102,7 @@ var AppContainer = (props) => {
33121
33102
  );
33122
33103
  return;
33123
33104
  }
33124
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
33105
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
33125
33106
  writeToStdout(`
33126
33107
  ----------------------------------------------------------------
33127
33108
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -33144,7 +33125,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
33144
33125
  }
33145
33126
  await saveApiKey(apiKey);
33146
33127
  await reloadApiKey();
33147
- await config.refreshAuth(AuthType.USE_GEMINI);
33128
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
33148
33129
  setAuthState("authenticated" /* Authenticated */);
33149
33130
  } catch (e) {
33150
33131
  onAuthError(
@@ -33169,7 +33150,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
33169
33150
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
33170
33151
  );
33171
33152
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
33172
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
33153
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
33173
33154
  return;
33174
33155
  }
33175
33156
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33305,9 +33286,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33305
33286
  }
33306
33287
  });
33307
33288
  };
33308
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33289
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33309
33290
  return () => {
33310
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33291
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33311
33292
  };
33312
33293
  }, []);
33313
33294
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33965,7 +33946,7 @@ ${queuedText}` : queuedText;
33965
33946
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33966
33947
  if (settings.merged.general.devtools) {
33967
33948
  void (async () => {
33968
- const { toggleDevToolsPanel } = await import("./devtoolsService-GU2GQSOF.js");
33949
+ const { toggleDevToolsPanel } = await import("./devtoolsService-VQSLUOYF.js");
33969
33950
  await toggleDevToolsPanel(
33970
33951
  config,
33971
33952
  showErrorDetails,
@@ -34183,17 +34164,17 @@ ${queuedText}` : queuedText;
34183
34164
  Date.now()
34184
34165
  );
34185
34166
  };
34186
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
34187
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
34167
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
34168
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34188
34169
  coreEvents.drainBacklogs();
34189
34170
  return () => {
34190
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
34191
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
34171
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
34172
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34192
34173
  };
34193
34174
  }, [historyManager]);
34194
34175
  const nightly = props.version.includes("nightly");
34195
34176
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
34196
- 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;
34177
+ 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;
34197
34178
  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;
34198
34179
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
34199
34180
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34293,9 +34274,9 @@ ${queuedText}` : queuedText;
34293
34274
  const handleMemoryChanged = (result) => {
34294
34275
  setGeminiMdFileCount(result.fileCount);
34295
34276
  };
34296
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34277
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34297
34278
  return () => {
34298
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34279
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34299
34280
  };
34300
34281
  }, []);
34301
34282
  (0, import_react121.useEffect)(() => {