@google/gemini-cli 0.43.0-preview.1 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/bundle/{chunk-LTSFEC7U.js → chunk-2PZUIVU3.js} +2 -2
  2. package/bundle/{chunk-EWAAFVBK.js → chunk-4IXP3BQP.js} +1 -1
  3. package/bundle/{chunk-N3MLU4IQ.js → chunk-4N6JQGX6.js} +7 -7
  4. package/bundle/{chunk-6YMGRLOQ.js → chunk-5LLZICYH.js} +1 -1
  5. package/bundle/{chunk-CKPZGEE3.js → chunk-6KWJMH6E.js} +2 -2
  6. package/bundle/{chunk-L4LBKMR6.js → chunk-6LSSATGP.js} +1 -1
  7. package/bundle/{chunk-QAQT56LH.js → chunk-6PXLKFEE.js} +3 -3
  8. package/bundle/{chunk-ICOPZSVB.js → chunk-AR2D7G5V.js} +3 -3
  9. package/bundle/{chunk-3BNJIKEP.js → chunk-DB4PQOJV.js} +2 -2
  10. package/bundle/{chunk-UBCHSKF2.js → chunk-DP6V2BFN.js} +7 -7
  11. package/bundle/{chunk-4ZT3EIBI.js → chunk-KL6UT6F7.js} +1 -1
  12. package/bundle/{chunk-VSTO23O2.js → chunk-KZP4B2KY.js} +1 -1
  13. package/bundle/{chunk-IF5BAOVJ.js → chunk-ORAERZ7C.js} +1 -1
  14. package/bundle/{chunk-NG2WIKH5.js → chunk-QH43L44B.js} +4 -4
  15. package/bundle/{chunk-PLEERNRJ.js → chunk-SP2PGMIB.js} +2 -2
  16. package/bundle/{chunk-DJCG6GWZ.js → chunk-SSOGRVCN.js} +2 -2
  17. package/bundle/{chunk-LTFEPQ67.js → chunk-TK52UAKX.js} +1 -1
  18. package/bundle/{chunk-4G3X2H3F.js → chunk-TUSXQIOT.js} +6 -9
  19. package/bundle/{chunk-MRVZNBXY.js → chunk-U6X4OPT5.js} +4 -4
  20. package/bundle/{chunk-S36EONMM.js → chunk-UH3BLMAQ.js} +1 -1
  21. package/bundle/{chunk-KILFUY3Y.js → chunk-VNPDB5AB.js} +1 -1
  22. package/bundle/{chunk-NDSJWRFE.js → chunk-W2MTI7FK.js} +13059 -6973
  23. package/bundle/{chunk-4SLX6GS6.js → chunk-YS4NB3TW.js} +54 -67
  24. package/bundle/{chunk-CZPVSLJF.js → chunk-ZWSMHWOL.js} +8 -9
  25. package/bundle/{cleanup-NMUMRIEF.js → cleanup-5M6XXPD5.js} +2 -2
  26. package/bundle/{cleanup-LMJA4J5S.js → cleanup-RDTCKYOC.js} +3 -3
  27. package/bundle/{cleanup-BMLCC7SO.js → cleanup-TI2NCMMY.js} +2 -2
  28. package/bundle/{core-WXTAU5UX.js → core-KK5NR7XJ.js} +1 -1
  29. package/bundle/{dist-MXL7ZG46.js → core-PKLJMNGJ.js} +2 -2
  30. package/bundle/{devtoolsService-6THA6GNX.js → devtoolsService-I65SE4OX.js} +2 -2
  31. package/bundle/{devtoolsService-2L5U47ZQ.js → devtoolsService-OFCX6SOA.js} +2 -2
  32. package/bundle/{devtoolsService-J2AC6YXM.js → devtoolsService-WA4GU73C.js} +4 -5
  33. package/bundle/{dist-DIIMIT2U.js → dist-BDJKFMK4.js} +1 -1
  34. package/bundle/{gemini-HYQU2RK2.js → gemini-H266Z57W.js} +188 -202
  35. package/bundle/{gemini-D32FDZXN.js → gemini-PBHAWQU6.js} +14 -14
  36. package/bundle/{gemini-DLZ2R4X7.js → gemini-YQATFAPB.js} +14 -14
  37. package/bundle/gemini.js +7 -7
  38. package/bundle/{interactiveCli-NR7OUF3G.js → interactiveCli-2RXDSQZ7.js} +8 -8
  39. package/bundle/{interactiveCli-K7ETWJMN.js → interactiveCli-MHCNTGQB.js} +296 -315
  40. package/bundle/{interactiveCli-DHMPW4RS.js → interactiveCli-YR3FARLA.js} +8 -8
  41. package/bundle/{liteRtServerManager-PKRLUK2P.js → liteRtServerManager-HTBHSP3E.js} +4 -4
  42. package/bundle/{liteRtServerManager-L7C3D5RL.js → liteRtServerManager-WMZJWUGC.js} +4 -4
  43. package/bundle/{liteRtServerManager-UPCAT7Z2.js → liteRtServerManager-ZU6GBYTQ.js} +5 -5
  44. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  45. package/bundle/{oauth2-provider-52IJKUJI.js → oauth2-provider-7A7OEBRV.js} +1 -1
  46. package/bundle/{oauth2-provider-OPOTTZ5C.js → oauth2-provider-7AMBXQXB.js} +1 -1
  47. package/bundle/{oauth2-provider-WN4YIDA4.js → oauth2-provider-EUHAWOQQ.js} +73 -39
  48. package/bundle/{start-TMFPUYEL.js → start-D7BGLINR.js} +6 -6
  49. package/bundle/{start-6KIIUSAH.js → start-FNWNJC6F.js} +7 -7
  50. package/bundle/{start-7ZNSGJD6.js → start-ZXZSKJFC.js} +6 -6
  51. package/package.json +1 -1
  52. package/bundle/chunk-ERQUIEOO.js +0 -512
  53. package/bundle/chunk-F7PEGIBA.js +0 -156
  54. package/bundle/chunk-UB4AWMZC.js +0 -391
  55. package/bundle/chunk-ULCEBJMK.js +0 -17248
  56. package/bundle/chunk-UUHMEKLA.js +0 -357199
  57. package/bundle/chunk-UW3H4T6A.js +0 -1571
  58. package/bundle/chunk-XKIM3BNI.js +0 -118
  59. package/bundle/chunk-YIHNW7CC.js +0 -81649
  60. package/bundle/cleanup-M7RSLDBR.js +0 -33
  61. package/bundle/devtoolsService-SRWIME2Q.js +0 -857
  62. package/bundle/dist-POIHCQVM.js +0 -2124
  63. package/bundle/gemini-JJG7ZGWB.js +0 -16356
  64. package/bundle/interactiveCli-X4AUP7T7.js +0 -34752
  65. package/bundle/liteRtServerManager-TEBDIGEN.js +0 -66
  66. package/bundle/oauth2-provider-TOAKXOL7.js +0 -237
  67. package/bundle/start-EPIILWLN.js +0 -19
@@ -155,13 +155,13 @@ import {
155
155
  widestLineFromStyledChars,
156
156
  wordBreakStyledChars,
157
157
  wrapStyledChars
158
- } from "./chunk-YIHNW7CC.js";
158
+ } from "./chunk-DP6V2BFN.js";
159
159
  import {
160
160
  appEvents
161
161
  } from "./chunk-5PS3AYFU.js";
162
162
  import {
163
163
  require_source
164
- } from "./chunk-L4LBKMR6.js";
164
+ } from "./chunk-6LSSATGP.js";
165
165
  import {
166
166
  ACTIVE_SHELL_MAX_LINES,
167
167
  COMPACT_TOOL_SUBVIEW_MAX_LINES,
@@ -211,32 +211,30 @@ import {
211
211
  stringWidth,
212
212
  stripUnsafeCharacters,
213
213
  toCodePoints
214
- } from "./chunk-ULCEBJMK.js";
214
+ } from "./chunk-TUSXQIOT.js";
215
215
  import {
216
216
  handleAutoUpdate,
217
217
  isDevelopment,
218
218
  relaunchApp,
219
219
  setUpdateHandler
220
- } from "./chunk-UB4AWMZC.js";
220
+ } from "./chunk-6KWJMH6E.js";
221
221
  import {
222
222
  isTodoList,
223
223
  mapCoreStatusToDisplayStatus,
224
224
  require_react
225
- } from "./chunk-ERQUIEOO.js";
225
+ } from "./chunk-ZWSMHWOL.js";
226
226
  import {
227
227
  registerCleanup,
228
228
  removeCleanup,
229
229
  runExitCleanup,
230
230
  setupTtyCheck
231
- } from "./chunk-PLEERNRJ.js";
231
+ } from "./chunk-SP2PGMIB.js";
232
232
  import {
233
233
  ApiKeyUpdatedEvent,
234
234
  AsyncFzf,
235
235
  AudioRecorder,
236
236
  AuthType,
237
- CompressionStatus,
238
237
  ConversationFinishedEvent,
239
- CoreToolCallStatus,
240
238
  CreditPurchaseClickEvent,
241
239
  EDITOR_DISPLAY_NAMES,
242
240
  EmptyWalletMenuShownEvent,
@@ -246,16 +244,11 @@ import {
246
244
  FileSearchFactory,
247
245
  FolderTrustDiscoveryService,
248
246
  G1_UTM_CAMPAIGNS,
249
- GeminiCliOperation,
250
- GeminiEventType,
251
247
  GitService,
252
248
  IdeClient,
253
249
  LegacyAgentProtocol,
254
250
  LlmRole,
255
251
  Logger,
256
- MCPDiscoveryState,
257
- MCPServerStatus,
258
- MessageSenderType,
259
252
  ModelNotFoundError,
260
253
  ModelSlashCommandEvent,
261
254
  OverageMenuShownEvent,
@@ -265,19 +258,14 @@ import {
265
258
  RELEASE_CHANNEL_STABILITY,
266
259
  ROOT_SCHEDULER_ID,
267
260
  Scheduler,
268
- SessionEndReason,
269
- SessionStartSource,
270
261
  ShellExecutionService,
271
262
  SlashCommandStatus,
272
- SubagentState,
273
263
  TerminalQuotaError,
274
264
  TranscriptionFactory,
275
- TrustLevel,
276
265
  UserAccountManager,
277
266
  UserPromptEvent,
278
267
  UserTierId,
279
268
  ValidationRequiredError,
280
- WarningPriority,
281
269
  WhisperModelManager,
282
270
  addMCPStatusChangeListener,
283
271
  allowEditorTypeInSandbox,
@@ -365,13 +353,11 @@ import {
365
353
  validatePlanContent,
366
354
  validatePlanPath,
367
355
  writeToStdout
368
- } from "./chunk-UUHMEKLA.js";
356
+ } from "./chunk-QH43L44B.js";
369
357
  import {
370
358
  ACTIVATE_SKILL_TOOL_NAME,
371
359
  AGENT_TOOL_NAME,
372
- ApprovalMode,
373
360
  ChangeAuthRequestedError,
374
- CoreEvent,
375
361
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
376
362
  DEFAULT_GEMINI_FLASH_MODEL,
377
363
  DEFAULT_GEMINI_MODEL,
@@ -384,16 +370,13 @@ import {
384
370
  GEMMA_4_31B_IT_MODEL,
385
371
  GLOB_DISPLAY_NAME,
386
372
  GREP_DISPLAY_NAME,
387
- Kind,
388
373
  LS_DISPLAY_NAME,
389
- MessageBusType,
390
374
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
391
375
  PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
392
376
  PREVIEW_GEMINI_3_1_MODEL,
393
377
  PREVIEW_GEMINI_FLASH_MODEL,
394
378
  PREVIEW_GEMINI_MODEL,
395
379
  PREVIEW_GEMINI_MODEL_AUTO,
396
- QuestionType,
397
380
  READ_FILE_DISPLAY_NAME,
398
381
  READ_MANY_FILES_DISPLAY_NAME,
399
382
  SHELL_TOOL_NAME,
@@ -401,8 +384,6 @@ import {
401
384
  TOPIC_PARAM_STRATEGIC_INTENT,
402
385
  TOPIC_PARAM_SUMMARY,
403
386
  TOPIC_PARAM_TITLE,
404
- ToolConfirmationOutcome,
405
- ToolErrorType,
406
387
  UPDATE_TOPIC_DISPLAY_NAME,
407
388
  UPDATE_TOPIC_TOOL_NAME,
408
389
  UnauthorizedError,
@@ -432,7 +413,7 @@ import {
432
413
  safeJsonToMarkdown,
433
414
  shortenPath,
434
415
  tildeifyPath
435
- } from "./chunk-UJ26GAE5.js";
416
+ } from "./chunk-N6QYTC2T.js";
436
417
  import "./chunk-664ZODQF.js";
437
418
  import "./chunk-RJTRUG2J.js";
438
419
  import "./chunk-IUUIT4SU.js";
@@ -5058,7 +5039,7 @@ function calculateShellMaxLines(options) {
5058
5039
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5059
5040
  return maxLinesBasedOnHeight;
5060
5041
  }
5061
- const isExecuting = status === CoreToolCallStatus.Executing;
5042
+ const isExecuting = status === "executing" /* Executing */;
5062
5043
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5063
5044
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5064
5045
  }
@@ -5092,10 +5073,10 @@ function isShellTool(name) {
5092
5073
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
5093
5074
  }
5094
5075
  function isThisShellFocusable(name, status, config) {
5095
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5076
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5096
5077
  }
5097
5078
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5098
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5079
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5099
5080
  }
5100
5081
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5101
5082
  const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
@@ -5255,13 +5236,13 @@ var formatToolArgs = (args) => {
5255
5236
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5256
5237
  let headerText;
5257
5238
  let headerColor = theme.text.secondary;
5258
- if (progress.state === SubagentState.CANCELLED) {
5239
+ if (progress.state === "cancelled" /* CANCELLED */) {
5259
5240
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5260
5241
  headerColor = theme.status.warning;
5261
- } else if (progress.state === SubagentState.ERROR) {
5242
+ } else if (progress.state === "error" /* ERROR */) {
5262
5243
  headerText = `Subagent ${progress.agentName} failed.`;
5263
5244
  headerColor = theme.status.error;
5264
- } else if (progress.state === SubagentState.COMPLETED) {
5245
+ } else if (progress.state === "completed" /* COMPLETED */) {
5265
5246
  headerText = `Subagent ${progress.agentName} completed.`;
5266
5247
  headerColor = theme.status.success;
5267
5248
  } else {
@@ -5281,7 +5262,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5281
5262
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
5282
5263
  ] }, item.id);
5283
5264
  } else if (item.type === "tool_call") {
5284
- 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 });
5265
+ 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 });
5285
5266
  const formattedArgs = item.description || formatToolArgs(item.args);
5286
5267
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5287
5268
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5292,7 +5273,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5292
5273
  {
5293
5274
  bold: true,
5294
5275
  color: theme.text.primary,
5295
- strikethrough: item.status === SubagentState.CANCELLED,
5276
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5296
5277
  children: item.displayName || item.content
5297
5278
  }
5298
5279
  ),
@@ -5301,7 +5282,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5301
5282
  {
5302
5283
  color: theme.text.secondary,
5303
5284
  wrap: "truncate",
5304
- strikethrough: item.status === SubagentState.CANCELLED,
5285
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5305
5286
  children: displayArgs
5306
5287
  }
5307
5288
  ) })
@@ -5321,7 +5302,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5321
5302
  MarkdownDisplay,
5322
5303
  {
5323
5304
  text: safeJsonToMarkdown(progress.result),
5324
- isPending: progress.state !== SubagentState.COMPLETED,
5305
+ isPending: progress.state !== "completed" /* COMPLETED */,
5325
5306
  terminalWidth
5326
5307
  }
5327
5308
  )
@@ -5675,14 +5656,14 @@ var ToolActionsProvider = (props) => {
5675
5656
  }
5676
5657
  const details = tool.confirmationDetails;
5677
5658
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5678
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5659
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5679
5660
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5680
5661
  }
5681
5662
  if (tool.correlationId) {
5682
5663
  await config.getMessageBus().publish({
5683
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5664
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5684
5665
  correlationId: tool.correlationId,
5685
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5666
+ confirmed: outcome !== "cancel" /* Cancel */,
5686
5667
  requiresUserConfirmation: false,
5687
5668
  outcome,
5688
5669
  payload
@@ -5701,7 +5682,7 @@ var ToolActionsProvider = (props) => {
5701
5682
  );
5702
5683
  const cancel = (0, import_react12.useCallback)(
5703
5684
  async (callId) => {
5704
- await confirm(callId, ToolConfirmationOutcome.Cancel);
5685
+ await confirm(callId, "cancel" /* Cancel */);
5705
5686
  },
5706
5687
  [confirm]
5707
5688
  );
@@ -5820,7 +5801,7 @@ var ToolMessage = ({
5820
5801
  paddingX: 1,
5821
5802
  flexDirection: "column",
5822
5803
  children: [
5823
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5804
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5824
5805
  McpProgressIndicator,
5825
5806
  {
5826
5807
  progress,
@@ -5837,8 +5818,8 @@ var ToolMessage = ({
5837
5818
  terminalWidth,
5838
5819
  renderOutputAsMarkdown,
5839
5820
  hasFocus: isThisShellFocused2,
5840
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5841
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5821
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5822
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5842
5823
  }
5843
5824
  ),
5844
5825
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -6154,7 +6135,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6154
6135
  settings.merged,
6155
6136
  process3.cwd()
6156
6137
  );
6157
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6138
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6158
6139
  return {
6159
6140
  currentTrustLevel: explicitTrustLevel,
6160
6141
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6199,7 +6180,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6199
6180
  process3.cwd(),
6200
6181
  newConfig
6201
6182
  );
6202
- if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6183
+ if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6203
6184
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6204
6185
  if (source === "file") {
6205
6186
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6273,18 +6254,18 @@ function PermissionsModifyTrustDialog({
6273
6254
  const TRUST_LEVEL_ITEMS = [
6274
6255
  {
6275
6256
  label: `Trust this folder (${dirName})`,
6276
- value: TrustLevel.TRUST_FOLDER,
6277
- key: TrustLevel.TRUST_FOLDER
6257
+ value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6258
+ key: "TRUST_FOLDER" /* TRUST_FOLDER */
6278
6259
  },
6279
6260
  {
6280
6261
  label: `Trust parent folder (${parentFolder})`,
6281
- value: TrustLevel.TRUST_PARENT,
6282
- key: TrustLevel.TRUST_PARENT
6262
+ value: "TRUST_PARENT" /* TRUST_PARENT */,
6263
+ key: "TRUST_PARENT" /* TRUST_PARENT */
6283
6264
  },
6284
6265
  {
6285
6266
  label: "Don't trust",
6286
- value: TrustLevel.DO_NOT_TRUST,
6287
- key: TrustLevel.DO_NOT_TRUST
6267
+ value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6268
+ key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6288
6269
  }
6289
6270
  ];
6290
6271
  const {
@@ -6524,7 +6505,7 @@ var ShellToolMessage = ({
6524
6505
  maxLinesLimit: maxLines
6525
6506
  });
6526
6507
  import_react17.default.useEffect(() => {
6527
- const isExecuting = status === CoreToolCallStatus.Executing;
6508
+ const isExecuting = status === "executing" /* Executing */;
6528
6509
  if (isExecuting && ptyId) {
6529
6510
  try {
6530
6511
  const childWidth = terminalWidth - 4;
@@ -6737,13 +6718,13 @@ var SubagentGroupDisplay = ({
6737
6718
  const singleAgent = toolCalls[0].resultDisplay;
6738
6719
  if (isSubagentProgress(singleAgent)) {
6739
6720
  switch (singleAgent.state) {
6740
- case SubagentState.COMPLETED:
6721
+ case "completed" /* COMPLETED */:
6741
6722
  headerText = "Agent Completed";
6742
6723
  break;
6743
- case SubagentState.CANCELLED:
6724
+ case "cancelled" /* CANCELLED */:
6744
6725
  headerText = "Agent Cancelled";
6745
6726
  break;
6746
- case SubagentState.ERROR:
6727
+ case "error" /* ERROR */:
6747
6728
  headerText = "Agent Error";
6748
6729
  break;
6749
6730
  default:
@@ -6759,8 +6740,8 @@ var SubagentGroupDisplay = ({
6759
6740
  for (const tc of toolCalls) {
6760
6741
  const progress = tc.resultDisplay;
6761
6742
  if (isSubagentProgress(progress)) {
6762
- if (progress.state === SubagentState.COMPLETED) completedCount++;
6763
- else if (progress.state === SubagentState.RUNNING) runningCount++;
6743
+ if (progress.state === "completed" /* COMPLETED */) completedCount++;
6744
+ else if (progress.state === "running" /* RUNNING */) runningCount++;
6764
6745
  } else {
6765
6746
  runningCount++;
6766
6747
  }
@@ -6839,7 +6820,7 @@ var SubagentGroupDisplay = ({
6839
6820
  if (!isExpanded) {
6840
6821
  let content = "Starting...";
6841
6822
  let formattedArgs;
6842
- if (progress.state === SubagentState.COMPLETED) {
6823
+ if (progress.state === "completed" /* COMPLETED */) {
6843
6824
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6844
6825
  content = `Finished Early (${progress.terminateReason})`;
6845
6826
  } else {
@@ -6853,17 +6834,17 @@ var SubagentGroupDisplay = ({
6853
6834
  formattedArgs = formatToolArgs(lastActivity.args);
6854
6835
  }
6855
6836
  }
6856
- const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6837
+ const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6857
6838
  const renderStatusIcon = () => {
6858
- const state = progress.state ?? SubagentState.RUNNING;
6839
+ const state = progress.state ?? "running" /* RUNNING */;
6859
6840
  switch (state) {
6860
- case SubagentState.RUNNING:
6841
+ case "running" /* RUNNING */:
6861
6842
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
6862
- case SubagentState.COMPLETED:
6843
+ case "completed" /* COMPLETED */:
6863
6844
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6864
- case SubagentState.CANCELLED:
6845
+ case "cancelled" /* CANCELLED */:
6865
6846
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6866
- case SubagentState.ERROR:
6847
+ case "error" /* ERROR */:
6867
6848
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6868
6849
  default:
6869
6850
  return checkExhaustive(state);
@@ -6916,22 +6897,22 @@ var hasPayload = (res) => {
6916
6897
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6917
6898
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6918
6899
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6919
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6900
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6920
6901
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6921
6902
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6922
6903
  const showDiffStat = !!diff.diffStat;
6923
6904
  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 }) });
6924
6905
  let resultSummary = "";
6925
6906
  let resultColor = theme.text.secondary;
6926
- if (status === CoreToolCallStatus.AwaitingApproval) {
6907
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
6927
6908
  resultSummary = "Confirming";
6928
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6909
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6929
6910
  resultSummary = "Accepted";
6930
6911
  resultColor = theme.text.accent;
6931
- } else if (status === CoreToolCallStatus.Cancelled) {
6912
+ } else if (status === "cancelled" /* Cancelled */) {
6932
6913
  resultSummary = "Rejected";
6933
6914
  resultColor = theme.status.error;
6934
- } else if (status === CoreToolCallStatus.Error) {
6915
+ } else if (status === "error" /* Error */) {
6935
6916
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6936
6917
  resultColor = theme.status.error;
6937
6918
  }
@@ -6962,7 +6943,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6962
6943
  filename: diff.fileName,
6963
6944
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
6964
6945
  availableTerminalHeight,
6965
- disableColor: status === CoreToolCallStatus.Cancelled
6946
+ disableColor: status === "cancelled" /* Cancelled */
6966
6947
  }
6967
6948
  );
6968
6949
  return { description, summary, payload };
@@ -7090,10 +7071,10 @@ var DenseToolMessage = (props) => {
7090
7071
  if (isGrepResult(resultDisplay)) {
7091
7072
  return getGenericSuccessData(resultDisplay, originalDescription);
7092
7073
  }
7093
- if (status === CoreToolCallStatus.Success && resultDisplay) {
7074
+ if (status === "success" /* Success */ && resultDisplay) {
7094
7075
  return getGenericSuccessData(resultDisplay, originalDescription);
7095
7076
  }
7096
- if (status === CoreToolCallStatus.Error) {
7077
+ if (status === "error" /* Error */) {
7097
7078
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7098
7079
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7099
7080
  "\u2192 ",
@@ -7134,7 +7115,7 @@ var DenseToolMessage = (props) => {
7134
7115
  language: fileExtension,
7135
7116
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7136
7117
  settings,
7137
- disableColor: status === CoreToolCallStatus.Cancelled,
7118
+ disableColor: status === "cancelled" /* Cancelled */,
7138
7119
  returnLines: true
7139
7120
  });
7140
7121
  } else {
@@ -7142,7 +7123,7 @@ var DenseToolMessage = (props) => {
7142
7123
  parsedLines,
7143
7124
  filename: diff.fileName,
7144
7125
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7145
- disableColor: status === CoreToolCallStatus.Cancelled
7126
+ disableColor: status === "cancelled" /* Cancelled */
7146
7127
  });
7147
7128
  }
7148
7129
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7272,7 +7253,7 @@ function isToolExecuting(pendingHistoryItems) {
7272
7253
  return pendingHistoryItems.some((item) => {
7273
7254
  if (item && item.type === "tool_group") {
7274
7255
  return item.tools.some(
7275
- (tool) => CoreToolCallStatus.Executing === tool.status
7256
+ (tool) => "executing" /* Executing */ === tool.status
7276
7257
  );
7277
7258
  }
7278
7259
  return false;
@@ -7281,7 +7262,7 @@ function isToolExecuting(pendingHistoryItems) {
7281
7262
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7282
7263
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7283
7264
  (item) => item.tools.some(
7284
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7265
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7285
7266
  )
7286
7267
  );
7287
7268
  }
@@ -7304,14 +7285,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
7304
7285
  if (isTrackedToolCall(t)) {
7305
7286
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
7306
7287
  } else {
7307
- return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7288
+ return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
7308
7289
  }
7309
7290
  });
7310
7291
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
7311
7292
  if (isTrackedToolCall(t)) {
7312
7293
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
7313
7294
  } else {
7314
- return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7295
+ return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7315
7296
  }
7316
7297
  });
7317
7298
  const isShellCommand = toolsToInspect.some((t) => {
@@ -7410,7 +7391,7 @@ var ToolGroupMessage = ({
7410
7391
  const groupedTools = (0, import_react21.useMemo)(() => {
7411
7392
  const groups = [];
7412
7393
  for (const tool of visibleToolCalls) {
7413
- if (tool.kind === Kind.Agent) {
7394
+ if (tool.kind === "agent" /* Agent */) {
7414
7395
  const lastGroup = groups[groups.length - 1];
7415
7396
  if (Array.isArray(lastGroup)) {
7416
7397
  lastGroup.push(tool);
@@ -7465,7 +7446,7 @@ var ToolGroupMessage = ({
7465
7446
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7466
7447
  let countToolCallsWithResults = 0;
7467
7448
  for (const tool of visibleToolCalls) {
7468
- if (tool.kind !== Kind.Agent) {
7449
+ if (tool.kind !== "agent" /* Agent */) {
7469
7450
  if (isCompactTool(tool, isCompactModeEnabled)) {
7470
7451
  if (hasDensePayload(tool)) {
7471
7452
  countToolCallsWithResults++;
@@ -7639,7 +7620,7 @@ var ToolGroupDisplay = ({
7639
7620
  }
7640
7621
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7641
7622
  const visibleTools = tools.filter(
7642
- (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7623
+ (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7643
7624
  );
7644
7625
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7645
7626
  const otherTools = visibleTools.filter(
@@ -7841,18 +7822,18 @@ function CompressionMessage({
7841
7822
  return "Compressing chat history";
7842
7823
  }
7843
7824
  switch (compressionStatus) {
7844
- case CompressionStatus.COMPRESSED:
7825
+ case 1 /* COMPRESSED */:
7845
7826
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7846
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7827
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7847
7828
  if (originalTokens < 5e4) {
7848
7829
  return "Compression was not beneficial for this history size.";
7849
7830
  }
7850
7831
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7851
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7832
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7852
7833
  return "Could not compress chat history due to a token counting error.";
7853
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7834
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7854
7835
  return "Chat history compression failed: the model returned an empty summary.";
7855
- case CompressionStatus.NOOP:
7836
+ case 5 /* NOOP */:
7856
7837
  return "Nothing to compress.";
7857
7838
  default:
7858
7839
  return "";
@@ -8278,8 +8259,8 @@ var ModelUsageTable = ({ models }) => {
8278
8259
  );
8279
8260
  roleEntries.sort(([a], [b]) => {
8280
8261
  if (a === b) return 0;
8281
- if (a === LlmRole.MAIN) return -1;
8282
- if (b === LlmRole.MAIN) return 1;
8262
+ if (a === "main" /* MAIN */) return -1;
8263
+ if (b === "main" /* MAIN */) return 1;
8283
8264
  return a.localeCompare(b);
8284
8265
  });
8285
8266
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8610,8 +8591,8 @@ var ModelStatsDisplay = ({
8610
8591
  return validRoles.includes(role);
8611
8592
  }).sort((a, b) => {
8612
8593
  if (a === b) return 0;
8613
- if (a === LlmRole.MAIN) return -1;
8614
- if (b === LlmRole.MAIN) return 1;
8594
+ if (a === "main" /* MAIN */) return -1;
8595
+ if (b === "main" /* MAIN */) return 1;
8615
8596
  return a.localeCompare(b);
8616
8597
  });
8617
8598
  const createRow = (metric, getValue, options = {}) => {
@@ -9402,7 +9383,7 @@ var McpStatus = ({
9402
9383
  );
9403
9384
  const originalStatus = serverStatus(serverName);
9404
9385
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9405
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9386
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9406
9387
  let statusIndicator = "";
9407
9388
  let statusText = "";
9408
9389
  let statusColor = theme.text.primary;
@@ -9414,17 +9395,17 @@ var McpStatus = ({
9414
9395
  statusColor = theme.text.secondary;
9415
9396
  } else {
9416
9397
  switch (status) {
9417
- case MCPServerStatus.CONNECTED:
9398
+ case "connected" /* CONNECTED */:
9418
9399
  statusIndicator = "\u{1F7E2}";
9419
9400
  statusText = "Ready";
9420
9401
  statusColor = theme.status.success;
9421
9402
  break;
9422
- case MCPServerStatus.CONNECTING:
9403
+ case "connecting" /* CONNECTING */:
9423
9404
  statusIndicator = "\u{1F504}";
9424
9405
  statusText = "Starting... (first startup may take longer)";
9425
9406
  statusColor = theme.status.warning;
9426
9407
  break;
9427
- case MCPServerStatus.DISCONNECTED:
9408
+ case "disconnected" /* DISCONNECTED */:
9428
9409
  default:
9429
9410
  statusIndicator = "\u{1F534}";
9430
9411
  statusText = "Disconnected";
@@ -9472,12 +9453,12 @@ var McpStatus = ({
9472
9453
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9473
9454
  " - ",
9474
9455
  statusText,
9475
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9456
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9476
9457
  ] }),
9477
9458
  authStatusNode
9478
9459
  ] }),
9479
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9480
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9460
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9461
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9481
9462
  " (",
9482
9463
  toolCount,
9483
9464
  " tools cached)"
@@ -10038,7 +10019,7 @@ var Notifications = () => {
10038
10019
  if (dismissed) return [];
10039
10020
  const counts = persistentState.get("startupWarningCounts") || {};
10040
10021
  return startupWarnings.filter((w) => {
10041
- if (w.priority === WarningPriority.Low) {
10022
+ if (w.priority === "low" /* Low */) {
10042
10023
  const count = counts[w.id] || 0;
10043
10024
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10044
10025
  }
@@ -10051,7 +10032,7 @@ var Notifications = () => {
10051
10032
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10052
10033
  let changed = false;
10053
10034
  visibleWarnings.forEach((w) => {
10054
- if (w.priority === WarningPriority.Low) {
10035
+ if (w.priority === "low" /* Low */) {
10055
10036
  counts[w.id] = (counts[w.id] || 0) + 1;
10056
10037
  changed = true;
10057
10038
  }
@@ -10158,7 +10139,7 @@ var UserIdentity = ({ config }) => {
10158
10139
  }
10159
10140
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
10160
10141
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
10161
- /* @__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: [
10142
+ /* @__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: [
10162
10143
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
10163
10144
  "Signed in with Google",
10164
10145
  email ? ":" : ""
@@ -10392,7 +10373,7 @@ var import_react32 = __toESM(require_react(), 1);
10392
10373
  function getConfirmingToolState(pendingHistoryItems) {
10393
10374
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10394
10375
  const confirmingTools = allPendingTools.filter(
10395
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10376
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10396
10377
  );
10397
10378
  if (confirmingTools.length === 0) {
10398
10379
  return null;
@@ -11700,7 +11681,7 @@ var ExitPlanModeDialog = ({
11700
11681
  {
11701
11682
  questions: [
11702
11683
  {
11703
- type: QuestionType.CHOICE,
11684
+ type: "choice" /* CHOICE */,
11704
11685
  header: "Approval",
11705
11686
  question: planContent,
11706
11687
  options: [
@@ -11721,9 +11702,9 @@ var ExitPlanModeDialog = ({
11721
11702
  onSubmit: (answers) => {
11722
11703
  const answer = answers["0"];
11723
11704
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11724
- onApprove(ApprovalMode.AUTO_EDIT);
11705
+ onApprove("autoEdit" /* AUTO_EDIT */);
11725
11706
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11726
- onApprove(ApprovalMode.DEFAULT);
11707
+ onApprove("default" /* DEFAULT */);
11727
11708
  } else if (answer) {
11728
11709
  onFeedback(answer);
11729
11710
  }
@@ -11934,7 +11915,7 @@ ${deceptiveUrlWarnings.map(
11934
11915
  );
11935
11916
  (0, import_react37.useEffect)(() => {
11936
11917
  if (isCancelling) {
11937
- handleConfirm(ToolConfirmationOutcome.Cancel);
11918
+ handleConfirm("cancel" /* Cancel */);
11938
11919
  }
11939
11920
  }, [isCancelling, handleConfirm]);
11940
11921
  const handleSelect = (0, import_react37.useCallback)(
@@ -11947,19 +11928,19 @@ ${deceptiveUrlWarnings.map(
11947
11928
  if (!confirmationDetails.isModifying) {
11948
11929
  options2.push({
11949
11930
  label: "Allow once",
11950
- value: ToolConfirmationOutcome.ProceedOnce,
11931
+ value: "proceed_once" /* ProceedOnce */,
11951
11932
  key: "Allow once"
11952
11933
  });
11953
11934
  if (isTrustedFolder) {
11954
11935
  options2.push({
11955
11936
  label: "Allow for this session",
11956
- value: ToolConfirmationOutcome.ProceedAlways,
11937
+ value: "proceed_always" /* ProceedAlways */,
11957
11938
  key: "Allow for this session"
11958
11939
  });
11959
11940
  if (allowPermanentApproval) {
11960
11941
  options2.push({
11961
11942
  label: "Allow for this file in all future sessions",
11962
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11943
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11963
11944
  key: "Allow for this file in all future sessions"
11964
11945
  });
11965
11946
  }
@@ -11967,119 +11948,119 @@ ${deceptiveUrlWarnings.map(
11967
11948
  if (!config.getIdeMode() || !isDiffingEnabled) {
11968
11949
  options2.push({
11969
11950
  label: "Modify with external editor",
11970
- value: ToolConfirmationOutcome.ModifyWithEditor,
11951
+ value: "modify_with_editor" /* ModifyWithEditor */,
11971
11952
  key: "Modify with external editor"
11972
11953
  });
11973
11954
  }
11974
11955
  options2.push({
11975
11956
  label: "No, suggest changes (esc)",
11976
- value: ToolConfirmationOutcome.Cancel,
11957
+ value: "cancel" /* Cancel */,
11977
11958
  key: "No, suggest changes (esc)"
11978
11959
  });
11979
11960
  }
11980
11961
  } else if (confirmationDetails.type === "sandbox_expansion") {
11981
11962
  options2.push({
11982
11963
  label: "Allow once",
11983
- value: ToolConfirmationOutcome.ProceedOnce,
11964
+ value: "proceed_once" /* ProceedOnce */,
11984
11965
  key: "Allow once"
11985
11966
  });
11986
11967
  if (isTrustedFolder) {
11987
11968
  options2.push({
11988
11969
  label: "Allow for this session",
11989
- value: ToolConfirmationOutcome.ProceedAlways,
11970
+ value: "proceed_always" /* ProceedAlways */,
11990
11971
  key: "Allow for this session"
11991
11972
  });
11992
11973
  if (allowPermanentApproval) {
11993
11974
  options2.push({
11994
11975
  label: "Allow for all future sessions",
11995
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11976
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11996
11977
  key: "Allow for all future sessions"
11997
11978
  });
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
  } else if (confirmationDetails.type === "exec") {
12006
11987
  options2.push({
12007
11988
  label: "Allow once",
12008
- value: ToolConfirmationOutcome.ProceedOnce,
11989
+ value: "proceed_once" /* ProceedOnce */,
12009
11990
  key: "Allow once"
12010
11991
  });
12011
11992
  if (isTrustedFolder) {
12012
11993
  options2.push({
12013
11994
  label: `Allow for this session`,
12014
- value: ToolConfirmationOutcome.ProceedAlways,
11995
+ value: "proceed_always" /* ProceedAlways */,
12015
11996
  key: `Allow for this session`
12016
11997
  });
12017
11998
  if (allowPermanentApproval) {
12018
11999
  options2.push({
12019
12000
  label: `Allow this command for all future sessions`,
12020
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12001
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12021
12002
  key: `Allow for all future sessions`
12022
12003
  });
12023
12004
  }
12024
12005
  }
12025
12006
  options2.push({
12026
12007
  label: "No, suggest changes (esc)",
12027
- value: ToolConfirmationOutcome.Cancel,
12008
+ value: "cancel" /* Cancel */,
12028
12009
  key: "No, suggest changes (esc)"
12029
12010
  });
12030
12011
  } else if (confirmationDetails.type === "info") {
12031
12012
  options2.push({
12032
12013
  label: "Allow once",
12033
- value: ToolConfirmationOutcome.ProceedOnce,
12014
+ value: "proceed_once" /* ProceedOnce */,
12034
12015
  key: "Allow once"
12035
12016
  });
12036
12017
  if (isTrustedFolder) {
12037
12018
  options2.push({
12038
12019
  label: "Allow for this session",
12039
- value: ToolConfirmationOutcome.ProceedAlways,
12020
+ value: "proceed_always" /* ProceedAlways */,
12040
12021
  key: "Allow for this session"
12041
12022
  });
12042
12023
  if (allowPermanentApproval) {
12043
12024
  options2.push({
12044
12025
  label: "Allow for all future sessions",
12045
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12026
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12046
12027
  key: "Allow for all future sessions"
12047
12028
  });
12048
12029
  }
12049
12030
  }
12050
12031
  options2.push({
12051
12032
  label: "No, suggest changes (esc)",
12052
- value: ToolConfirmationOutcome.Cancel,
12033
+ value: "cancel" /* Cancel */,
12053
12034
  key: "No, suggest changes (esc)"
12054
12035
  });
12055
12036
  } else if (confirmationDetails.type === "mcp") {
12056
12037
  options2.push({
12057
12038
  label: "Allow once",
12058
- value: ToolConfirmationOutcome.ProceedOnce,
12039
+ value: "proceed_once" /* ProceedOnce */,
12059
12040
  key: "Allow once"
12060
12041
  });
12061
12042
  if (isTrustedFolder) {
12062
12043
  options2.push({
12063
12044
  label: "Allow tool for this session",
12064
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
12045
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
12065
12046
  key: "Allow tool for this session"
12066
12047
  });
12067
12048
  options2.push({
12068
12049
  label: "Allow all server tools for this session",
12069
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
12050
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
12070
12051
  key: "Allow all server tools for this session"
12071
12052
  });
12072
12053
  if (allowPermanentApproval) {
12073
12054
  options2.push({
12074
12055
  label: "Allow tool for all future sessions",
12075
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12056
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12076
12057
  key: "Allow tool for all future sessions"
12077
12058
  });
12078
12059
  }
12079
12060
  }
12080
12061
  options2.push({
12081
12062
  label: "No, suggest changes (esc)",
12082
- value: ToolConfirmationOutcome.Cancel,
12063
+ value: "cancel" /* Cancel */,
12083
12064
  key: "No, suggest changes (esc)"
12084
12065
  });
12085
12066
  }
@@ -12118,7 +12099,7 @@ ${deceptiveUrlWarnings.map(
12118
12099
  const containsRedirection = commandsToDisplay.some(
12119
12100
  (cmd) => hasRedirection(cmd)
12120
12101
  );
12121
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12102
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12122
12103
  if (containsRedirection && !isAutoEdit) {
12123
12104
  extraInfoLines = 1;
12124
12105
  }
@@ -12144,7 +12125,7 @@ ${deceptiveUrlWarnings.map(
12144
12125
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12145
12126
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12146
12127
  const alwaysAndSaveIndex = options2.findIndex(
12147
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12128
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12148
12129
  );
12149
12130
  if (alwaysAndSaveIndex !== -1) {
12150
12131
  initialIndex2 = alwaysAndSaveIndex;
@@ -12161,10 +12142,10 @@ ${deceptiveUrlWarnings.map(
12161
12142
  {
12162
12143
  questions: confirmationDetails.questions,
12163
12144
  onSubmit: (answers) => {
12164
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12145
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12165
12146
  },
12166
12147
  onCancel: () => {
12167
- handleConfirm(ToolConfirmationOutcome.Cancel);
12148
+ handleConfirm("cancel" /* Cancel */);
12168
12149
  },
12169
12150
  width: terminalWidth,
12170
12151
  availableHeight: bodyHeight
@@ -12185,19 +12166,19 @@ ${deceptiveUrlWarnings.map(
12185
12166
  planPath: confirmationDetails.planPath,
12186
12167
  getPreferredEditor,
12187
12168
  onApprove: (approvalMode) => {
12188
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12169
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12189
12170
  approved: true,
12190
12171
  approvalMode
12191
12172
  });
12192
12173
  },
12193
12174
  onFeedback: (feedback) => {
12194
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12175
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12195
12176
  approved: false,
12196
12177
  feedback
12197
12178
  });
12198
12179
  },
12199
12180
  onCancel: () => {
12200
- handleConfirm(ToolConfirmationOutcome.Cancel);
12181
+ handleConfirm("cancel" /* Cancel */);
12201
12182
  },
12202
12183
  width: terminalWidth,
12203
12184
  availableHeight: bodyHeight
@@ -12306,7 +12287,7 @@ ${deceptiveUrlWarnings.map(
12306
12287
  const containsRedirection = commandsToDisplay.some(
12307
12288
  (cmd) => hasRedirection(cmd)
12308
12289
  );
12309
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12290
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12310
12291
  let warnings = null;
12311
12292
  if (containsRedirection && !isAutoEdit) {
12312
12293
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12465,7 +12446,7 @@ ${deceptiveUrlWarnings.map(
12465
12446
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12466
12447
  const renderRadioItem = (0, import_react37.useCallback)(
12467
12448
  (item, { titleColor }) => {
12468
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12449
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12469
12450
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12470
12451
  item.label,
12471
12452
  " ",
@@ -14495,7 +14476,7 @@ function validateAuthMethodWithSettings(authType, settings) {
14495
14476
  if (settings.merged.security.auth.useExternal) {
14496
14477
  return null;
14497
14478
  }
14498
- if (authType === AuthType.USE_GEMINI) {
14479
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14499
14480
  return null;
14500
14481
  }
14501
14482
  return validateAuthMethod(authType);
@@ -14547,7 +14528,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14547
14528
  }
14548
14529
  return;
14549
14530
  }
14550
- if (authType === AuthType.USE_GEMINI) {
14531
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14551
14532
  const key = await reloadApiKey();
14552
14533
  if (!key) {
14553
14534
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14622,31 +14603,31 @@ function AuthDialog({
14622
14603
  let items = [
14623
14604
  {
14624
14605
  label: "Sign in with Google",
14625
- value: AuthType.LOGIN_WITH_GOOGLE,
14626
- key: AuthType.LOGIN_WITH_GOOGLE
14606
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14607
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14627
14608
  },
14628
14609
  ...process.env["CLOUD_SHELL"] === "true" ? [
14629
14610
  {
14630
14611
  label: "Use Cloud Shell user credentials",
14631
- value: AuthType.COMPUTE_ADC,
14632
- key: AuthType.COMPUTE_ADC
14612
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14613
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14633
14614
  }
14634
14615
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14635
14616
  {
14636
14617
  label: "Use metadata server application default credentials",
14637
- value: AuthType.COMPUTE_ADC,
14638
- key: AuthType.COMPUTE_ADC
14618
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14619
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14639
14620
  }
14640
14621
  ] : [],
14641
14622
  {
14642
14623
  label: "Use Gemini API Key",
14643
- value: AuthType.USE_GEMINI,
14644
- key: AuthType.USE_GEMINI
14624
+ value: "gemini-api-key" /* USE_GEMINI */,
14625
+ key: "gemini-api-key" /* USE_GEMINI */
14645
14626
  },
14646
14627
  {
14647
14628
  label: "Vertex AI",
14648
- value: AuthType.USE_VERTEX_AI,
14649
- key: AuthType.USE_VERTEX_AI
14629
+ value: "vertex-ai" /* USE_VERTEX_AI */,
14630
+ key: "vertex-ai" /* USE_VERTEX_AI */
14650
14631
  }
14651
14632
  ];
14652
14633
  if (settings.merged.security.auth.enforcedType) {
@@ -14668,9 +14649,9 @@ function AuthDialog({
14668
14649
  return item.value === defaultAuthType;
14669
14650
  }
14670
14651
  if (process.env["GEMINI_API_KEY"]) {
14671
- return item.value === AuthType.USE_GEMINI;
14652
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
14672
14653
  }
14673
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
14654
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14674
14655
  });
14675
14656
  if (settings.merged.security.auth.enforcedType) {
14676
14657
  initialAuthIndex = 0;
@@ -14681,7 +14662,7 @@ function AuthDialog({
14681
14662
  return;
14682
14663
  }
14683
14664
  if (authType) {
14684
- const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14665
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14685
14666
  if (needsRestart) {
14686
14667
  setAuthContext({ requiresRestart: true });
14687
14668
  } else {
@@ -14689,12 +14670,12 @@ function AuthDialog({
14689
14670
  }
14690
14671
  await clearCachedCredentialFile();
14691
14672
  settings.setValue(scope, "security.auth.selectedType", authType);
14692
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14673
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14693
14674
  setExiting(true);
14694
14675
  setTimeout(relaunchApp, 100);
14695
14676
  return;
14696
14677
  }
14697
- if (authType === AuthType.USE_GEMINI) {
14678
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14698
14679
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14699
14680
  return;
14700
14681
  }
@@ -15444,11 +15425,11 @@ var PrivacyNoticeText = ({
15444
15425
  }) => {
15445
15426
  const authType = config.getContentGeneratorConfig()?.authType;
15446
15427
  switch (authType) {
15447
- case AuthType.USE_GEMINI:
15428
+ case "gemini-api-key" /* USE_GEMINI */:
15448
15429
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15449
- case AuthType.USE_VERTEX_AI:
15430
+ case "vertex-ai" /* USE_VERTEX_AI */:
15450
15431
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15451
- case AuthType.LOGIN_WITH_GOOGLE:
15432
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15452
15433
  default:
15453
15434
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15454
15435
  }
@@ -15489,7 +15470,7 @@ function ProQuotaDialog({
15489
15470
  value: "retry_always",
15490
15471
  key: "retry_always"
15491
15472
  },
15492
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15473
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15493
15474
  {
15494
15475
  label: "Upgrade for higher limits",
15495
15476
  value: "upgrade",
@@ -16648,7 +16629,7 @@ function ModelDialog({ onClose }) {
16648
16629
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16649
16630
  const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
16650
16631
  const selectedAuthType = settings.merged.security.auth.selectedType;
16651
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16632
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16652
16633
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16653
16634
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16654
16635
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -17965,10 +17946,10 @@ function initializeConsoleStore() {
17965
17946
  globalConsoleMessages = [];
17966
17947
  globalErrorCount = 0;
17967
17948
  notifyListeners();
17968
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
17969
- coreEvents.off(CoreEvent.Output, handleOutput);
17970
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
17971
- coreEvents.on(CoreEvent.Output, handleOutput);
17949
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
17950
+ coreEvents.off("output" /* Output */, handleOutput);
17951
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
17952
+ coreEvents.on("output" /* Output */, handleOutput);
17972
17953
  }
17973
17954
  function notifyListeners() {
17974
17955
  for (const listener of listeners) {
@@ -20101,7 +20082,7 @@ function usePromptCompletion({
20101
20082
  { model: "prompt-completion" },
20102
20083
  contents,
20103
20084
  signal,
20104
- LlmRole.UTILITY_AUTOCOMPLETE
20085
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20105
20086
  );
20106
20087
  if (signal.aborted) {
20107
20088
  return;
@@ -22175,9 +22156,9 @@ var InputPrompt = ({
22175
22156
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22176
22157
  }
22177
22158
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22178
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22179
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22180
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22159
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22160
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22161
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22181
22162
  let statusColor;
22182
22163
  let statusText = "";
22183
22164
  if (shellModeActive) {
@@ -23010,22 +22991,22 @@ var ApprovalModeIndicator = ({
23010
22991
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23011
22992
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23012
22993
  switch (approvalMode) {
23013
- case ApprovalMode.AUTO_EDIT:
22994
+ case "autoEdit" /* AUTO_EDIT */:
23014
22995
  textColor = theme.status.warning;
23015
22996
  textContent = "auto-accept edits";
23016
22997
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23017
22998
  break;
23018
- case ApprovalMode.PLAN:
22999
+ case "plan" /* PLAN */:
23019
23000
  textColor = theme.status.success;
23020
23001
  textContent = "plan";
23021
23002
  subText = `${cycleHint} to manual`;
23022
23003
  break;
23023
- case ApprovalMode.YOLO:
23004
+ case "yolo" /* YOLO */:
23024
23005
  textColor = theme.status.error;
23025
23006
  textContent = "YOLO";
23026
23007
  subText = yoloHint;
23027
23008
  break;
23028
- case ApprovalMode.DEFAULT:
23009
+ case "default" /* DEFAULT */:
23029
23010
  default:
23030
23011
  textColor = theme.text.accent;
23031
23012
  textContent = "";
@@ -23073,7 +23054,7 @@ var useComposerStatus = () => {
23073
23054
  (item) => item.type === "tool_group"
23074
23055
  ).some(
23075
23056
  (item) => item.tools.some(
23076
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23057
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23077
23058
  )
23078
23059
  ),
23079
23060
  [uiState.pendingHistoryItems]
@@ -23088,13 +23069,13 @@ var useComposerStatus = () => {
23088
23069
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23089
23070
  if (hideMinimalModeHintWhileBusy) return null;
23090
23071
  switch (showApprovalModeIndicator) {
23091
- case ApprovalMode.YOLO:
23072
+ case "yolo" /* YOLO */:
23092
23073
  return { text: "YOLO", color: theme.status.error };
23093
- case ApprovalMode.PLAN:
23074
+ case "plan" /* PLAN */:
23094
23075
  return { text: "plan", color: theme.status.success };
23095
- case ApprovalMode.AUTO_EDIT:
23076
+ case "autoEdit" /* AUTO_EDIT */:
23096
23077
  return { text: "auto edit", color: theme.status.warning };
23097
- case ApprovalMode.DEFAULT:
23078
+ case "default" /* DEFAULT */:
23098
23079
  default:
23099
23080
  return null;
23100
23081
  }
@@ -23448,7 +23429,7 @@ var ConfigInitDisplay = ({
23448
23429
  let connected = 0;
23449
23430
  const connecting = [];
23450
23431
  for (const [name, client] of clients.entries()) {
23451
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23432
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23452
23433
  connected++;
23453
23434
  } else {
23454
23435
  connecting.push(name);
@@ -23470,9 +23451,9 @@ var ConfigInitDisplay = ({
23470
23451
  );
23471
23452
  }
23472
23453
  };
23473
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23454
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23474
23455
  return () => {
23475
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23456
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23476
23457
  };
23477
23458
  }, [initialMessage]);
23478
23459
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24187,7 +24168,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24187
24168
  callId,
24188
24169
  name: SHELL_COMMAND_NAME,
24189
24170
  description: rawQuery,
24190
- status: CoreToolCallStatus.Executing,
24171
+ status: "executing" /* Executing */,
24191
24172
  isClientInitiated: true,
24192
24173
  resultDisplay: "",
24193
24174
  confirmationDetails: void 0
@@ -24328,7 +24309,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24328
24309
  mainContent = result.output.trim() || "(Command produced no output)";
24329
24310
  }
24330
24311
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24331
- let finalStatus = CoreToolCallStatus.Success;
24312
+ let finalStatus = "success" /* Success */;
24332
24313
  const prependToAnsiOutput = (output, text) => {
24333
24314
  const newLines = text.split("\n").map((line) => [
24334
24315
  {
@@ -24347,20 +24328,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24347
24328
  };
24348
24329
  let prefix = "";
24349
24330
  if (result.error) {
24350
- finalStatus = CoreToolCallStatus.Error;
24331
+ finalStatus = "error" /* Error */;
24351
24332
  prefix = result.error.message;
24352
24333
  } else if (result.aborted) {
24353
- finalStatus = CoreToolCallStatus.Cancelled;
24334
+ finalStatus = "cancelled" /* Cancelled */;
24354
24335
  prefix = "Command was cancelled.";
24355
24336
  } else if (result.backgrounded) {
24356
- finalStatus = CoreToolCallStatus.Success;
24337
+ finalStatus = "success" /* Success */;
24357
24338
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24358
24339
  mainContent = finalOutput;
24359
24340
  } else if (result.signal) {
24360
- finalStatus = CoreToolCallStatus.Error;
24341
+ finalStatus = "error" /* Error */;
24361
24342
  prefix = `Command terminated by signal: ${result.signal}.`;
24362
24343
  } else if (result.exitCode !== 0) {
24363
- finalStatus = CoreToolCallStatus.Error;
24344
+ finalStatus = "error" /* Error */;
24364
24345
  prefix = `Command exited with code ${result.exitCode}.`;
24365
24346
  }
24366
24347
  if (prefix) {
@@ -24386,7 +24367,7 @@ ${mainContent}`;
24386
24367
  status: finalStatus,
24387
24368
  resultDisplay: finalOutput
24388
24369
  };
24389
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24370
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24390
24371
  addItemToHistory(
24391
24372
  {
24392
24373
  type: "tool_group",
@@ -25376,7 +25357,7 @@ function useQuotaAndFallback({
25376
25357
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25377
25358
  `/stats model for usage details`,
25378
25359
  `/model to switch models.`,
25379
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25360
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25380
25361
  ].filter(Boolean);
25381
25362
  message = messageLines.join("\n");
25382
25363
  } else if (error instanceof ModelNotFoundError) {
@@ -25564,7 +25545,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25564
25545
  );
25565
25546
  setEditorError(null);
25566
25547
  setIsEditorDialogOpen(false);
25567
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25548
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25568
25549
  } catch (error) {
25569
25550
  setEditorError(`Failed to set editor preference: ${error}`);
25570
25551
  }
@@ -25573,7 +25554,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25573
25554
  );
25574
25555
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25575
25556
  setIsEditorDialogOpen(false);
25576
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25557
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25577
25558
  }, []);
25578
25559
  return {
25579
25560
  isEditorDialogOpen,
@@ -25950,7 +25931,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25950
25931
  canonicalPath: resolvedCommandPath
25951
25932
  } = parseSlashCommand(trimmed, commands);
25952
25933
  if (!commandToExecute) {
25953
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25934
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25954
25935
  if (isMcpLoading) {
25955
25936
  setIsProcessing(true);
25956
25937
  if (addToHistory) {
@@ -26130,7 +26111,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26130
26111
  onConfirm: async (resolvedOutcome) => {
26131
26112
  resolve3({
26132
26113
  outcome: resolvedOutcome,
26133
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26114
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26134
26115
  });
26135
26116
  }
26136
26117
  };
@@ -26138,7 +26119,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26138
26119
  callId,
26139
26120
  name: "Expansion",
26140
26121
  description: "Command expansion needs shell access",
26141
- status: CoreToolCallStatus.AwaitingApproval,
26122
+ status: "awaiting_approval" /* AwaitingApproval */,
26142
26123
  isClientInitiated: true,
26143
26124
  resultDisplay: void 0,
26144
26125
  confirmationDetails
@@ -26149,7 +26130,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26149
26130
  });
26150
26131
  });
26151
26132
  setPendingItem(null);
26152
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26133
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26153
26134
  addItem(
26154
26135
  {
26155
26136
  type: "info" /* INFO */,
@@ -26159,7 +26140,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26159
26140
  );
26160
26141
  return { type: "handled" };
26161
26142
  }
26162
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26143
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26163
26144
  setSessionShellAllowlist(
26164
26145
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26165
26146
  );
@@ -26635,7 +26616,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26635
26616
  let description;
26636
26617
  let renderOutputAsMarkdown = false;
26637
26618
  const displayName = call.tool?.displayName ?? call.request.name;
26638
- if (call.status === CoreToolCallStatus.Error) {
26619
+ if (call.status === "error" /* Error */) {
26639
26620
  description = JSON.stringify(call.request.args);
26640
26621
  } else {
26641
26622
  description = call.invocation.getDescription();
@@ -26658,27 +26639,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26658
26639
  let progress = void 0;
26659
26640
  let progressTotal = void 0;
26660
26641
  switch (call.status) {
26661
- case CoreToolCallStatus.Success:
26642
+ case "success" /* Success */:
26662
26643
  resultDisplay = call.response.resultDisplay;
26663
26644
  outputFile = call.response.outputFile;
26664
26645
  break;
26665
- case CoreToolCallStatus.Error:
26666
- case CoreToolCallStatus.Cancelled:
26646
+ case "error" /* Error */:
26647
+ case "cancelled" /* Cancelled */:
26667
26648
  resultDisplay = call.response.resultDisplay;
26668
26649
  break;
26669
- case CoreToolCallStatus.AwaitingApproval:
26650
+ case "awaiting_approval" /* AwaitingApproval */:
26670
26651
  correlationId = call.correlationId;
26671
26652
  confirmationDetails = call.confirmationDetails;
26672
26653
  break;
26673
- case CoreToolCallStatus.Executing:
26654
+ case "executing" /* Executing */:
26674
26655
  resultDisplay = call.liveOutput;
26675
26656
  ptyId = call.pid;
26676
26657
  progressMessage = call.progressMessage;
26677
26658
  progress = call.progress;
26678
26659
  progressTotal = call.progressTotal;
26679
26660
  break;
26680
- case CoreToolCallStatus.Scheduled:
26681
- case CoreToolCallStatus.Validating:
26661
+ case "scheduled" /* Scheduled */:
26662
+ case "validating" /* Validating */:
26682
26663
  break;
26683
26664
  default: {
26684
26665
  const exhaustiveCheck = call;
@@ -26749,7 +26730,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26749
26730
  const handler = (event) => {
26750
26731
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26751
26732
  const hasExecuting = event.toolCalls.some(
26752
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26733
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26753
26734
  );
26754
26735
  if (hasExecuting) {
26755
26736
  setLastToolOutputTime(Date.now());
@@ -26758,7 +26739,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26758
26739
  const prevCalls = prev[event.schedulerId] ?? [];
26759
26740
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26760
26741
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26761
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26742
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26762
26743
  );
26763
26744
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26764
26745
  return prev;
@@ -26770,9 +26751,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26770
26751
  };
26771
26752
  });
26772
26753
  };
26773
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26754
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26774
26755
  return () => {
26775
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26756
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26776
26757
  };
26777
26758
  }, [messageBus, internalAdaptToolCalls]);
26778
26759
  (0, import_react98.useEffect)(() => {
@@ -26794,9 +26775,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26794
26775
  };
26795
26776
  });
26796
26777
  };
26797
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26778
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26798
26779
  return () => {
26799
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26780
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26800
26781
  };
26801
26782
  }, [messageBus]);
26802
26783
  const schedule = (0, import_react98.useCallback)(
@@ -26895,8 +26876,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26895
26876
  const prev = prevMap.get(coreCall.request.callId);
26896
26877
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26897
26878
  let status = coreCall.status;
26898
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26899
- status = CoreToolCallStatus.Executing;
26879
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26880
+ status = "executing" /* Executing */;
26900
26881
  }
26901
26882
  return {
26902
26883
  ...coreCall,
@@ -26928,7 +26909,7 @@ function getBackgroundedToolInfo(toolCall) {
26928
26909
  };
26929
26910
  }
26930
26911
  function isBackgroundableExecutingToolCall(toolCall) {
26931
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26912
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26932
26913
  }
26933
26914
  function showCitations(settings) {
26934
26915
  const enabled = settings.merged.ui.showCitations;
@@ -26938,14 +26919,14 @@ function showCitations(settings) {
26938
26919
  return true;
26939
26920
  }
26940
26921
  function calculateStreamingState(isResponding, toolCalls) {
26941
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26922
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26942
26923
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26943
26924
  }
26944
26925
  const isAnyToolActive = toolCalls.some((tc) => {
26945
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26926
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26946
26927
  return true;
26947
26928
  }
26948
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26929
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26949
26930
  return !tc.responseSubmittedToGemini;
26950
26931
  }
26951
26932
  return false;
@@ -26992,9 +26973,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26992
26973
  }
26993
26974
  setRetryStatus(payload);
26994
26975
  };
26995
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
26976
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
26996
26977
  return () => {
26997
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
26978
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
26998
26979
  };
26999
26980
  }, [isRespondingRef]);
27000
26981
  const [
@@ -27127,12 +27108,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27127
27108
  const tc = toolCalls[i];
27128
27109
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27129
27110
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27130
- const isAgent = tc.tool?.kind === Kind.Agent;
27111
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
27131
27112
  if (isAgent) {
27132
27113
  let contigAgentsComplete = true;
27133
27114
  for (let j = i + 1; j < toolCalls.length; j++) {
27134
27115
  const nextTc = toolCalls[j];
27135
- if (nextTc.tool?.kind === Kind.Agent) {
27116
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
27136
27117
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27137
27118
  contigAgentsComplete = false;
27138
27119
  break;
@@ -27158,7 +27139,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27158
27139
  let currentGroup = [];
27159
27140
  for (const tc of toolsToPush) {
27160
27141
  newPushed.add(tc.request.callId);
27161
- if (tc.tool?.kind === Kind.Agent) {
27142
+ if (tc.tool?.kind === "agent" /* Agent */) {
27162
27143
  currentGroup.push(tc);
27163
27144
  } else {
27164
27145
  if (currentGroup.length > 0) {
@@ -27308,7 +27289,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27308
27289
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27309
27290
  }, [activeShellPtyId, addItem, setIsResponding]);
27310
27291
  (0, import_react99.useEffect)(() => {
27311
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27292
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27312
27293
  const lastUserMessageIndex = history.findLastIndex(
27313
27294
  (item) => item.type === "user" /* USER */
27314
27295
  );
@@ -27376,7 +27357,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27376
27357
  return;
27377
27358
  }
27378
27359
  const hasActiveTools = toolCalls.some(
27379
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27360
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27380
27361
  );
27381
27362
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27382
27363
  if (clearBuffer) {
@@ -27403,7 +27384,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27403
27384
  if (tool.name === SHELL_COMMAND_NAME) {
27404
27385
  return {
27405
27386
  ...tool,
27406
- status: CoreToolCallStatus.Cancelled,
27387
+ status: "cancelled" /* Cancelled */,
27407
27388
  resultDisplay: tool.resultDisplay
27408
27389
  };
27409
27390
  }
@@ -27468,7 +27449,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27468
27449
  let localQueryToSendToGemini = null;
27469
27450
  if (typeof query === "string") {
27470
27451
  const trimmedQuery = query.trim();
27471
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27452
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
27472
27453
  if (!shellModeActive) {
27473
27454
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27474
27455
  if (slashCommandResult) {
@@ -27624,7 +27605,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27624
27605
  if (pendingHistoryItemRef.current) {
27625
27606
  if (pendingHistoryItemRef.current.type === "tool_group") {
27626
27607
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27627
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27608
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27628
27609
  );
27629
27610
  const pendingItem = {
27630
27611
  ...pendingHistoryItemRef.current,
@@ -27870,15 +27851,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27870
27851
  let geminiMessageBuffer = "";
27871
27852
  const toolCallRequests = [];
27872
27853
  for await (const event of stream) {
27873
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27854
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27874
27855
  setThought(null);
27875
27856
  }
27876
27857
  switch (event.type) {
27877
- case GeminiEventType.Thought:
27858
+ case "thought" /* Thought */:
27878
27859
  setLastGeminiActivityTime(Date.now());
27879
27860
  handleThoughtEvent(event.value, userMessageTimestamp);
27880
27861
  break;
27881
- case GeminiEventType.Content:
27862
+ case "content" /* Content */:
27882
27863
  setLastGeminiActivityTime(Date.now());
27883
27864
  geminiMessageBuffer = handleContentEvent(
27884
27865
  event.value,
@@ -27886,16 +27867,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27886
27867
  userMessageTimestamp
27887
27868
  );
27888
27869
  break;
27889
- case GeminiEventType.ToolCallRequest:
27870
+ case "tool_call_request" /* ToolCallRequest */:
27890
27871
  toolCallRequests.push(event.value);
27891
27872
  break;
27892
- case GeminiEventType.UserCancelled:
27873
+ case "user_cancelled" /* UserCancelled */:
27893
27874
  handleUserCancelledEvent(userMessageTimestamp);
27894
27875
  break;
27895
- case GeminiEventType.Error:
27876
+ case "error" /* Error */:
27896
27877
  handleErrorEvent(event.value, userMessageTimestamp);
27897
27878
  break;
27898
- case GeminiEventType.AgentExecutionStopped:
27879
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
27899
27880
  handleAgentExecutionStoppedEvent(
27900
27881
  event.value.reason,
27901
27882
  userMessageTimestamp,
@@ -27903,7 +27884,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27903
27884
  event.value.contextCleared
27904
27885
  );
27905
27886
  break;
27906
- case GeminiEventType.AgentExecutionBlocked:
27887
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
27907
27888
  handleAgentExecutionBlockedEvent(
27908
27889
  event.value.reason,
27909
27890
  userMessageTimestamp,
@@ -27911,35 +27892,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27911
27892
  event.value.contextCleared
27912
27893
  );
27913
27894
  break;
27914
- case GeminiEventType.ChatCompressed:
27895
+ case "chat_compressed" /* ChatCompressed */:
27915
27896
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27916
27897
  break;
27917
- case GeminiEventType.ToolCallConfirmation:
27918
- case GeminiEventType.ToolCallResponse:
27898
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
27899
+ case "tool_call_response" /* ToolCallResponse */:
27919
27900
  break;
27920
- case GeminiEventType.MaxSessionTurns:
27901
+ case "max_session_turns" /* MaxSessionTurns */:
27921
27902
  handleMaxSessionTurnsEvent();
27922
27903
  break;
27923
- case GeminiEventType.ContextWindowWillOverflow:
27904
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27924
27905
  handleContextWindowWillOverflowEvent(
27925
27906
  event.value.estimatedRequestTokenCount,
27926
27907
  event.value.remainingTokenCount
27927
27908
  );
27928
27909
  break;
27929
- case GeminiEventType.Finished:
27910
+ case "finished" /* Finished */:
27930
27911
  handleFinishedEvent(event, userMessageTimestamp);
27931
27912
  break;
27932
- case GeminiEventType.Citation:
27913
+ case "citation" /* Citation */:
27933
27914
  handleCitationEvent(event.value, userMessageTimestamp);
27934
27915
  break;
27935
- case GeminiEventType.ModelInfo:
27916
+ case "model_info" /* ModelInfo */:
27936
27917
  handleChatModelEvent(event.value, userMessageTimestamp);
27937
27918
  break;
27938
- case GeminiEventType.LoopDetected:
27919
+ case "loop_detected" /* LoopDetected */:
27939
27920
  loopDetectedRef.current = true;
27940
27921
  break;
27941
- case GeminiEventType.Retry:
27942
- case GeminiEventType.InvalidStream:
27922
+ case "retry" /* Retry */:
27923
+ case "invalid_stream" /* InvalidStream */:
27943
27924
  break;
27944
27925
  default: {
27945
27926
  const unreachable = event;
@@ -27980,7 +27961,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27980
27961
  const submitQuery = (0, import_react99.useCallback)(
27981
27962
  async (query, options, prompt_id) => runInDevTraceSpan(
27982
27963
  {
27983
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
27964
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
27984
27965
  sessionId: config.getSessionId()
27985
27966
  },
27986
27967
  async ({ metadata: spanMetadata }) => {
@@ -28140,7 +28121,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28140
28121
  );
28141
28122
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28142
28123
  async (newApprovalMode) => {
28143
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28124
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28144
28125
  if (geminiClient) {
28145
28126
  try {
28146
28127
  await geminiClient.addHistory({
@@ -28163,11 +28144,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28163
28144
  }
28164
28145
  }
28165
28146
  previousApprovalModeRef.current = newApprovalMode;
28166
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28147
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28167
28148
  let awaitingApprovalCalls = toolCalls.filter(
28168
28149
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28169
28150
  );
28170
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28151
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28171
28152
  awaitingApprovalCalls = awaitingApprovalCalls.filter(
28172
28153
  (call) => EDIT_TOOL_NAMES.has(call.request.name)
28173
28154
  );
@@ -28176,11 +28157,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28176
28157
  if (call.correlationId) {
28177
28158
  try {
28178
28159
  await config.getMessageBus().publish({
28179
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28160
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28180
28161
  correlationId: call.correlationId,
28181
28162
  confirmed: true,
28182
28163
  requiresUserConfirmation: false,
28183
- outcome: ToolConfirmationOutcome.ProceedOnce
28164
+ outcome: "proceed_once" /* ProceedOnce */
28184
28165
  });
28185
28166
  } catch (error) {
28186
28167
  debugLogger.warn(
@@ -28258,14 +28239,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28258
28239
  );
28259
28240
  if (isLowErrorVerbosity) {
28260
28241
  suppressedToolErrorCountRef.current += geminiTools.filter(
28261
- (tc) => tc.status === CoreToolCallStatus.Error
28242
+ (tc) => tc.status === "error" /* Error */
28262
28243
  ).length;
28263
28244
  }
28264
28245
  if (geminiTools.length === 0) {
28265
28246
  return;
28266
28247
  }
28267
28248
  const stopExecutionTool = geminiTools.find(
28268
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28249
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28269
28250
  );
28270
28251
  if (stopExecutionTool && stopExecutionTool.response.error) {
28271
28252
  maybeAddSuppressedToolErrorNote();
@@ -28285,9 +28266,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28285
28266
  (tc) => !isTopicTool2(tc.request.name)
28286
28267
  );
28287
28268
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28288
- (tc) => tc.status === CoreToolCallStatus.Cancelled
28269
+ (tc) => tc.status === "cancelled" /* Cancelled */
28289
28270
  );
28290
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28271
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28291
28272
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28292
28273
  if (!turnCancelledRef.current) {
28293
28274
  addItem({
@@ -28368,7 +28349,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28368
28349
  return;
28369
28350
  }
28370
28351
  const restorableToolCalls = toolCalls.filter(
28371
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28352
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28372
28353
  );
28373
28354
  if (restorableToolCalls.length > 0) {
28374
28355
  if (!gitService) {
@@ -28591,14 +28572,14 @@ var useAgentStream = ({
28591
28572
  const displayName = legacyState?.displayName ?? event.name;
28592
28573
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28593
28574
  const desc = legacyState?.description ?? "";
28594
- const fallbackKind = Kind.Other;
28575
+ const fallbackKind = "other" /* Other */;
28595
28576
  const newCall = {
28596
28577
  callId: event.requestId,
28597
28578
  name: displayName,
28598
28579
  originalRequestName: event.name,
28599
28580
  description: desc,
28600
28581
  display: event.display,
28601
- status: CoreToolCallStatus.Scheduled,
28582
+ status: "scheduled" /* Scheduled */,
28602
28583
  isClientInitiated: false,
28603
28584
  renderOutputAsMarkdown: isOutputMarkdown,
28604
28585
  kind: legacyState?.kind ?? fallbackKind,
@@ -28616,10 +28597,10 @@ var useAgentStream = ({
28616
28597
  const evtStatus = legacyState?.status;
28617
28598
  let status = tc.status;
28618
28599
  if (evtStatus === "executing")
28619
- status = CoreToolCallStatus.Executing;
28620
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28600
+ status = "executing" /* Executing */;
28601
+ else if (evtStatus === "error") status = "error" /* Error */;
28621
28602
  else if (evtStatus === "success")
28622
- status = CoreToolCallStatus.Success;
28603
+ status = "success" /* Success */;
28623
28604
  const display = event.display?.result;
28624
28605
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28625
28606
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28652,7 +28633,7 @@ var useAgentStream = ({
28652
28633
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28653
28634
  return {
28654
28635
  ...tc,
28655
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28636
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
28656
28637
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28657
28638
  resultDisplay,
28658
28639
  outputFile
@@ -28718,7 +28699,7 @@ var useAgentStream = ({
28718
28699
  if (!options?.isContinuation) {
28719
28700
  if (typeof query === "string") {
28720
28701
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28721
- void logger?.logMessage(MessageSenderType.USER, query);
28702
+ void logger?.logMessage("user" /* USER */, query);
28722
28703
  }
28723
28704
  startNewPrompt();
28724
28705
  }
@@ -30242,9 +30223,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30242
30223
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30243
30224
  async (choice) => {
30244
30225
  const trustLevelMap = {
30245
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30246
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30247
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30226
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30227
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30228
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30248
30229
  };
30249
30230
  const trustLevel = trustLevelMap[choice];
30250
30231
  if (!trustLevel) return;
@@ -30263,7 +30244,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30263
30244
  }, 100);
30264
30245
  return;
30265
30246
  }
30266
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30247
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30267
30248
  onTrustChange(currentIsTrusted);
30268
30249
  setIsTrusted(currentIsTrusted);
30269
30250
  const wasTrusted = isTrusted ?? false;
@@ -31271,7 +31252,7 @@ function useMessageQueue({
31271
31252
  var import_react107 = __toESM(require_react(), 1);
31272
31253
  function useMcpStatus(config) {
31273
31254
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31274
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31255
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31275
31256
  );
31276
31257
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31277
31258
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31284,12 +31265,12 @@ function useMcpStatus(config) {
31284
31265
  setMcpServerCount(manager.getMcpServerCount());
31285
31266
  }
31286
31267
  };
31287
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31268
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31288
31269
  return () => {
31289
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31270
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31290
31271
  };
31291
31272
  }, [config]);
31292
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31273
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31293
31274
  return {
31294
31275
  discoveryState,
31295
31276
  mcpServerCount,
@@ -31316,7 +31297,7 @@ function useApprovalModeIndicator({
31316
31297
  (key) => {
31317
31298
  let nextApprovalMode;
31318
31299
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31319
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31300
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31320
31301
  if (addItem) {
31321
31302
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31322
31303
  const adminSettings = config.getRemoteAdminSettings();
@@ -31334,21 +31315,21 @@ function useApprovalModeIndicator({
31334
31315
  }
31335
31316
  return;
31336
31317
  }
31337
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31318
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31338
31319
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31339
31320
  const currentMode = config.getApprovalMode();
31340
31321
  switch (currentMode) {
31341
- case ApprovalMode.DEFAULT:
31342
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31322
+ case "default" /* DEFAULT */:
31323
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31343
31324
  break;
31344
- case ApprovalMode.AUTO_EDIT:
31345
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31325
+ case "autoEdit" /* AUTO_EDIT */:
31326
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31346
31327
  break;
31347
- case ApprovalMode.PLAN:
31348
- nextApprovalMode = ApprovalMode.DEFAULT;
31328
+ case "plan" /* PLAN */:
31329
+ nextApprovalMode = "default" /* DEFAULT */;
31349
31330
  break;
31350
- case ApprovalMode.YOLO:
31351
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31331
+ case "yolo" /* YOLO */:
31332
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31352
31333
  break;
31353
31334
  default:
31354
31335
  }
@@ -31758,11 +31739,11 @@ var useHookDisplayState = () => {
31758
31739
  removeHook();
31759
31740
  }
31760
31741
  };
31761
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
31762
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31742
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31743
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31763
31744
  return () => {
31764
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
31765
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31745
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31746
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31766
31747
  activeTimeouts.forEach(clearTimeout);
31767
31748
  activeTimeouts.clear();
31768
31749
  };
@@ -32615,7 +32596,7 @@ var AppContainer = (props) => {
32615
32596
  setConfigInitialized(true);
32616
32597
  startupProfiler.flush(config);
32617
32598
  startAutoMemoryIfEnabled(config);
32618
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32599
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32619
32600
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32620
32601
  if (result) {
32621
32602
  const additionalContext = result.getAdditionalContext();
@@ -32642,7 +32623,7 @@ var AppContainer = (props) => {
32642
32623
  );
32643
32624
  const ideClient = await IdeClient.getInstance();
32644
32625
  await ideClient.disconnect();
32645
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32626
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32646
32627
  };
32647
32628
  registerCleanup(cleanupFn);
32648
32629
  return () => {
@@ -32667,11 +32648,11 @@ var AppContainer = (props) => {
32667
32648
  resetTime: payload.resetTime
32668
32649
  });
32669
32650
  };
32670
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32671
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32651
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32652
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32672
32653
  return () => {
32673
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32674
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32654
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32655
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32675
32656
  };
32676
32657
  }, [config]);
32677
32658
  (0, import_react121.useEffect)(() => {
@@ -32684,16 +32665,16 @@ var AppContainer = (props) => {
32684
32665
  const handleAgentsDiscovered = (payload) => {
32685
32666
  setNewAgents(payload.agents);
32686
32667
  };
32687
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32688
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32689
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32668
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32669
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32670
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32690
32671
  return () => {
32691
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32672
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32692
32673
  coreEvents.off(
32693
- CoreEvent.AdminSettingsChanged,
32674
+ "admin-settings-changed" /* AdminSettingsChanged */,
32694
32675
  handleAdminSettingsChanged
32695
32676
  );
32696
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32677
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32697
32678
  };
32698
32679
  }, [settings]);
32699
32680
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32759,11 +32740,11 @@ var AppContainer = (props) => {
32759
32740
  exitEditorDialog
32760
32741
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32761
32742
  (0, import_react121.useEffect)(() => {
32762
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32763
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32743
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32744
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32764
32745
  return () => {
32765
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32766
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32746
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32747
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32767
32748
  };
32768
32749
  }, [handleEditorClose, openEditorDialog]);
32769
32750
  (0, import_react121.useEffect)(() => {
@@ -32831,7 +32812,7 @@ var AppContainer = (props) => {
32831
32812
  errorVerbosity: settings.merged.ui.errorVerbosity
32832
32813
  });
32833
32814
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32834
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32815
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32835
32816
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32836
32817
  const { loadHistoryForResume, isResuming } = useSessionResume({
32837
32818
  config,
@@ -32859,7 +32840,7 @@ var AppContainer = (props) => {
32859
32840
  async (authType, scope) => {
32860
32841
  if (authType) {
32861
32842
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32862
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32843
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32863
32844
  setAuthContext({ requiresRestart: true });
32864
32845
  } else {
32865
32846
  setAuthContext({});
@@ -32887,7 +32868,7 @@ var AppContainer = (props) => {
32887
32868
  );
32888
32869
  return;
32889
32870
  }
32890
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32871
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32891
32872
  writeToStdout(`
32892
32873
  ----------------------------------------------------------------
32893
32874
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32910,7 +32891,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32910
32891
  }
32911
32892
  await saveApiKey(apiKey);
32912
32893
  await reloadApiKey();
32913
- await config.refreshAuth(AuthType.USE_GEMINI);
32894
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32914
32895
  setAuthState("authenticated" /* Authenticated */);
32915
32896
  } catch (e) {
32916
32897
  onAuthError(
@@ -32935,7 +32916,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32935
32916
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32936
32917
  );
32937
32918
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32938
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32919
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32939
32920
  return;
32940
32921
  }
32941
32922
  const error = validateAuthMethod(
@@ -33064,9 +33045,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33064
33045
  }
33065
33046
  });
33066
33047
  };
33067
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33048
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33068
33049
  return () => {
33069
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33050
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33070
33051
  };
33071
33052
  }, []);
33072
33053
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33747,7 +33728,7 @@ ${queuedText}` : queuedText;
33747
33728
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33748
33729
  if (settings.merged.general.devtools) {
33749
33730
  void (async () => {
33750
- const { toggleDevToolsPanel } = await import("./devtoolsService-J2AC6YXM.js");
33731
+ const { toggleDevToolsPanel } = await import("./devtoolsService-WA4GU73C.js");
33751
33732
  await toggleDevToolsPanel(
33752
33733
  config,
33753
33734
  showErrorDetails,
@@ -33965,17 +33946,17 @@ ${queuedText}` : queuedText;
33965
33946
  Date.now()
33966
33947
  );
33967
33948
  };
33968
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33969
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33949
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33950
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33970
33951
  coreEvents.drainBacklogs();
33971
33952
  return () => {
33972
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33973
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33953
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33954
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33974
33955
  };
33975
33956
  }, [historyManager]);
33976
33957
  const nightly = props.version.includes("nightly");
33977
33958
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
33978
- const loginRestartMessage = settings.merged.security.auth.selectedType === AuthType.USE_VERTEX_AI ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
33959
+ const loginRestartMessage = settings.merged.security.auth.selectedType === "vertex-ai" /* USE_VERTEX_AI */ ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
33979
33960
  const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
33980
33961
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
33981
33962
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34075,9 +34056,9 @@ ${queuedText}` : queuedText;
34075
34056
  const handleMemoryChanged = (result) => {
34076
34057
  setGeminiMdFileCount(result.fileCount);
34077
34058
  };
34078
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34059
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34079
34060
  return () => {
34080
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34061
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34081
34062
  };
34082
34063
  }, []);
34083
34064
  (0, import_react121.useEffect)(() => {