@google/gemini-cli 0.46.0-preview.0 → 0.46.0-preview.1

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-4AGOZ7LL.js → chunk-24H54ISH.js} +7 -7
  2. package/bundle/{chunk-F2LLVPPS.js → chunk-3EC3ZLRQ.js} +2 -2
  3. package/bundle/{chunk-2GMVQS2Q.js → chunk-3WW2LTMX.js} +1 -1
  4. package/bundle/{chunk-ZXN4VW7M.js → chunk-4B7MDBUK.js} +1 -1
  5. package/bundle/{chunk-J444UQD3.js → chunk-5CWORGE3.js} +1 -1
  6. package/bundle/{chunk-HMR43ZX2.js → chunk-5IBYZHR7.js} +2 -2
  7. package/bundle/{chunk-QFEJQS5X.js → chunk-7Y6NU65D.js} +1 -1
  8. package/bundle/{chunk-4K3E3G6Z.js → chunk-EG7USKV5.js} +8 -5
  9. package/bundle/{chunk-SHFHGDWR.js → chunk-EZDKSTIF.js} +2 -2
  10. package/bundle/{chunk-RXG3JOOZ.js → chunk-GRD2P7HY.js} +1 -1
  11. package/bundle/chunk-HQNVDCXK.js +154 -0
  12. package/bundle/chunk-ILHDA6XU.js +17320 -0
  13. package/bundle/{chunk-XRDSBRG4.js → chunk-ITC7TFJU.js} +7560 -14072
  14. package/bundle/{chunk-BOJOJVNV.js → chunk-JF6RJW53.js} +1 -1
  15. package/bundle/chunk-JPYTHGMI.js +398 -0
  16. package/bundle/{chunk-FIM2LOYZ.js → chunk-KOJR46UO.js} +40 -23
  17. package/bundle/{chunk-MFYAVF7Y.js → chunk-KQ4V7ZN4.js} +67 -54
  18. package/bundle/chunk-O3UKVEBS.js +81685 -0
  19. package/bundle/{chunk-S2ICEQVC.js → chunk-ONUDATHO.js} +3 -3
  20. package/bundle/{chunk-HHFFICNK.js → chunk-QEVRJ7HY.js} +46 -23
  21. package/bundle/{chunk-LBE2WKE7.js → chunk-QFWAILKU.js} +3 -3
  22. package/bundle/{chunk-HZNEV3DS.js → chunk-QMCEWHRR.js} +1 -1
  23. package/bundle/{chunk-ZQGZKIDD.js → chunk-R4LEIQZM.js} +3 -3
  24. package/bundle/{chunk-5LUCCXOB.js → chunk-RXYIE5L5.js} +1 -1
  25. package/bundle/{chunk-GTRQQGSJ.js → chunk-UM53YDCH.js} +1 -1
  26. package/bundle/{chunk-YMNECODB.js → chunk-VEHSYWQT.js} +9 -8
  27. package/bundle/chunk-VETILJQA.js +1571 -0
  28. package/bundle/chunk-VOFVOS4I.js +118 -0
  29. package/bundle/chunk-WRWCUHAM.js +512 -0
  30. package/bundle/chunk-XVDCGVTF.js +394545 -0
  31. package/bundle/{chunk-TDYUKPZH.js → chunk-YINW7YTJ.js} +1 -1
  32. package/bundle/{chunk-773AJHDP.js → chunk-YIOYXRDP.js} +7 -7
  33. package/bundle/{cleanup-2WXD6UQP.js → cleanup-4ZTB4WMN.js} +2 -2
  34. package/bundle/{cleanup-L3CLNVX6.js → cleanup-7LLX4OFN.js} +2 -2
  35. package/bundle/{cleanup-SUDL37MT.js → cleanup-GI5426XS.js} +2 -2
  36. package/bundle/cleanup-ZBLVGXIK.js +32 -0
  37. package/bundle/{core-VVRQ2GQD.js → core-3UQQYNJF.js} +3 -1
  38. package/bundle/{devtoolsService-ZYCBBAV3.js → devtoolsService-GJWWZ2KK.js} +2 -2
  39. package/bundle/{devtoolsService-E62WA3CY.js → devtoolsService-UNQILSWI.js} +4 -3
  40. package/bundle/devtoolsService-Z2YXVMYF.js +856 -0
  41. package/bundle/{devtoolsService-GLW7S6PS.js → devtoolsService-ZYGDAPOV.js} +2 -2
  42. package/bundle/{dist-GPCRVPKS.js → dist-4NVM6I2N.js} +3 -1
  43. package/bundle/{core-MOYKPEYV.js → dist-LIQULVXZ.js} +3 -1
  44. package/bundle/dist-XPP357J7.js +2140 -0
  45. package/bundle/docs/reference/configuration.md +3 -1
  46. package/bundle/{gemini-R5NCXCEL.js → gemini-5WY2YO7R.js} +216 -197
  47. package/bundle/gemini-7GZVH4VW.js +16409 -0
  48. package/bundle/{gemini-2JTOIMGM.js → gemini-QDOVPRKF.js} +17 -14
  49. package/bundle/{gemini-KV5CHM4H.js → gemini-RBKWBGCC.js} +17 -14
  50. package/bundle/gemini.js +7 -7
  51. package/bundle/{interactiveCli-RMWTSIEN.js → interactiveCli-BMKHWEH4.js} +17 -11
  52. package/bundle/{interactiveCli-7SIMXKNU.js → interactiveCli-OEFOYFJU.js} +323 -298
  53. package/bundle/interactiveCli-OGE5OTZB.js +34742 -0
  54. package/bundle/{interactiveCli-HVAQTBJK.js → interactiveCli-W3CMLQIM.js} +17 -11
  55. package/bundle/{liteRtServerManager-FY23PYSD.js → liteRtServerManager-3QOJEGNL.js} +4 -4
  56. package/bundle/{liteRtServerManager-LDS45QKP.js → liteRtServerManager-HPVNUYFX.js} +4 -4
  57. package/bundle/{liteRtServerManager-BP7XKGNU.js → liteRtServerManager-Q6LTEYH4.js} +4 -4
  58. package/bundle/liteRtServerManager-YL4YRHOA.js +65 -0
  59. package/bundle/{oauth2-provider-VVNBQH45.js → oauth2-provider-3WXIASQA.js} +1 -1
  60. package/bundle/{oauth2-provider-KL44D6HV.js → oauth2-provider-CTPS7JLT.js} +1 -1
  61. package/bundle/{oauth2-provider-4SSSEI6P.js → oauth2-provider-K52EY6RG.js} +38 -72
  62. package/bundle/oauth2-provider-PJJE326A.js +235 -0
  63. package/bundle/{start-FRM2XDGC.js → start-25W6VZG6.js} +6 -6
  64. package/bundle/{start-OEPJINIW.js → start-JBJSIKIB.js} +6 -6
  65. package/bundle/{start-DLEOBFRC.js → start-PK22QMBT.js} +6 -6
  66. package/bundle/start-XAEHV6FV.js +18 -0
  67. package/package.json +1 -1
@@ -155,13 +155,13 @@ import {
155
155
  widestLineFromStyledChars,
156
156
  wordBreakStyledChars,
157
157
  wrapStyledChars
158
- } from "./chunk-773AJHDP.js";
158
+ } from "./chunk-O3UKVEBS.js";
159
159
  import {
160
160
  appEvents
161
161
  } from "./chunk-5PS3AYFU.js";
162
162
  import {
163
163
  require_source
164
- } from "./chunk-BOJOJVNV.js";
164
+ } from "./chunk-RXYIE5L5.js";
165
165
  import {
166
166
  ACTIVE_SHELL_MAX_LINES,
167
167
  COMPACT_TOOL_SUBVIEW_MAX_LINES,
@@ -211,33 +211,37 @@ import {
211
211
  stringWidth,
212
212
  stripUnsafeCharacters,
213
213
  toCodePoints
214
- } from "./chunk-4K3E3G6Z.js";
214
+ } from "./chunk-5CWORGE3.js";
215
215
  import {
216
216
  handleAutoUpdate,
217
217
  isDevelopment,
218
218
  relaunchApp,
219
219
  setUpdateHandler
220
- } from "./chunk-SHFHGDWR.js";
220
+ } from "./chunk-JPYTHGMI.js";
221
221
  import {
222
222
  isTodoList,
223
223
  mapCoreStatusToDisplayStatus,
224
224
  require_react
225
- } from "./chunk-TDYUKPZH.js";
225
+ } from "./chunk-WRWCUHAM.js";
226
226
  import {
227
227
  registerCleanup,
228
228
  removeCleanup,
229
229
  runExitCleanup,
230
230
  setupTtyCheck
231
- } from "./chunk-2GMVQS2Q.js";
231
+ } from "./chunk-7Y6NU65D.js";
232
232
  import {
233
233
  ACTIVATE_SKILL_TOOL_NAME,
234
234
  AGENT_TOOL_NAME,
235
235
  ApiKeyUpdatedEvent,
236
+ ApprovalMode,
236
237
  AsyncFzf,
237
238
  AudioRecorder,
238
239
  AuthType,
239
240
  ChangeAuthRequestedError,
241
+ CompressionStatus,
240
242
  ConversationFinishedEvent,
243
+ CoreEvent,
244
+ CoreToolCallStatus,
241
245
  CreditPurchaseClickEvent,
242
246
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
243
247
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -259,12 +263,19 @@ import {
259
263
  GEMMA_4_31B_IT_MODEL,
260
264
  GLOB_DISPLAY_NAME,
261
265
  GREP_DISPLAY_NAME,
266
+ GeminiCliOperation,
267
+ GeminiEventType,
262
268
  GitService,
263
269
  IdeClient,
270
+ Kind,
264
271
  LS_DISPLAY_NAME,
265
272
  LegacyAgentProtocol,
266
273
  LlmRole,
267
274
  Logger,
275
+ MCPDiscoveryState,
276
+ MCPServerStatus,
277
+ MessageBusType,
278
+ MessageSenderType,
268
279
  ModelNotFoundError,
269
280
  ModelSlashCommandEvent,
270
281
  OverageMenuShownEvent,
@@ -276,20 +287,27 @@ import {
276
287
  PREVIEW_GEMINI_MODEL,
277
288
  PolicyIntegrityManager,
278
289
  ProjectIdRequiredError,
290
+ QuestionType,
279
291
  READ_FILE_DISPLAY_NAME,
280
292
  READ_MANY_FILES_DISPLAY_NAME,
281
293
  RELEASE_CHANNEL_STABILITY,
282
294
  ROOT_SCHEDULER_ID,
283
295
  SHELL_TOOL_NAME,
284
296
  Scheduler,
297
+ SessionEndReason,
298
+ SessionStartSource,
285
299
  ShellExecutionService,
286
300
  SlashCommandStatus,
287
301
  Storage,
302
+ SubagentState,
288
303
  TOPIC_PARAM_STRATEGIC_INTENT,
289
304
  TOPIC_PARAM_SUMMARY,
290
305
  TOPIC_PARAM_TITLE,
291
306
  TerminalQuotaError,
307
+ ToolConfirmationOutcome,
308
+ ToolErrorType,
292
309
  TranscriptionFactory,
310
+ TrustLevel,
293
311
  UPDATE_TOPIC_DISPLAY_NAME,
294
312
  UPDATE_TOPIC_TOOL_NAME,
295
313
  UnauthorizedError,
@@ -301,6 +319,7 @@ import {
301
319
  WEB_FETCH_DISPLAY_NAME,
302
320
  WEB_SEARCH_DISPLAY_NAME,
303
321
  WRITE_FILE_DISPLAY_NAME,
322
+ WarningPriority,
304
323
  WhisperModelManager,
305
324
  addMCPStatusChangeListener,
306
325
  allowEditorTypeInSandbox,
@@ -410,7 +429,7 @@ import {
410
429
  validatePlanContent,
411
430
  validatePlanPath,
412
431
  writeToStdout
413
- } from "./chunk-HHFFICNK.js";
432
+ } from "./chunk-ITC7TFJU.js";
414
433
  import "./chunk-6HI7VNOG.js";
415
434
  import "./chunk-TUDYL3X4.js";
416
435
  import "./chunk-IUUIT4SU.js";
@@ -5036,7 +5055,7 @@ function calculateShellMaxLines(options) {
5036
5055
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5037
5056
  return maxLinesBasedOnHeight;
5038
5057
  }
5039
- const isExecuting = status === "executing" /* Executing */;
5058
+ const isExecuting = status === CoreToolCallStatus.Executing;
5040
5059
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5041
5060
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5042
5061
  }
@@ -5070,10 +5089,10 @@ function isShellTool(name) {
5070
5089
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
5071
5090
  }
5072
5091
  function isThisShellFocusable(name, status, config) {
5073
- return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
5092
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
5074
5093
  }
5075
5094
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
5076
- return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
5095
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
5077
5096
  }
5078
5097
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
5079
5098
  const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
@@ -5233,13 +5252,13 @@ var formatToolArgs = (args) => {
5233
5252
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5234
5253
  let headerText;
5235
5254
  let headerColor = theme.text.secondary;
5236
- if (progress.state === "cancelled" /* CANCELLED */) {
5255
+ if (progress.state === SubagentState.CANCELLED) {
5237
5256
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5238
5257
  headerColor = theme.status.warning;
5239
- } else if (progress.state === "error" /* ERROR */) {
5258
+ } else if (progress.state === SubagentState.ERROR) {
5240
5259
  headerText = `Subagent ${progress.agentName} failed.`;
5241
5260
  headerColor = theme.status.error;
5242
- } else if (progress.state === "completed" /* COMPLETED */) {
5261
+ } else if (progress.state === SubagentState.COMPLETED) {
5243
5262
  headerText = `Subagent ${progress.agentName} completed.`;
5244
5263
  headerColor = theme.status.success;
5245
5264
  } else {
@@ -5259,7 +5278,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5259
5278
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
5260
5279
  ] }, item.id);
5261
5280
  } else if (item.type === "tool_call") {
5262
- 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 });
5281
+ const statusSymbol = item.status === SubagentState.RUNNING ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === SubagentState.COMPLETED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === SubagentState.CANCELLED ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5263
5282
  const formattedArgs = item.description || formatToolArgs(item.args);
5264
5283
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5265
5284
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5270,7 +5289,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5270
5289
  {
5271
5290
  bold: true,
5272
5291
  color: theme.text.primary,
5273
- strikethrough: item.status === "cancelled" /* CANCELLED */,
5292
+ strikethrough: item.status === SubagentState.CANCELLED,
5274
5293
  children: item.displayName || item.content
5275
5294
  }
5276
5295
  ),
@@ -5279,7 +5298,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5279
5298
  {
5280
5299
  color: theme.text.secondary,
5281
5300
  wrap: "truncate",
5282
- strikethrough: item.status === "cancelled" /* CANCELLED */,
5301
+ strikethrough: item.status === SubagentState.CANCELLED,
5283
5302
  children: displayArgs
5284
5303
  }
5285
5304
  ) })
@@ -5299,7 +5318,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5299
5318
  MarkdownDisplay,
5300
5319
  {
5301
5320
  text: safeJsonToMarkdown(progress.result),
5302
- isPending: progress.state !== "completed" /* COMPLETED */,
5321
+ isPending: progress.state !== SubagentState.COMPLETED,
5303
5322
  terminalWidth
5304
5323
  }
5305
5324
  )
@@ -5653,14 +5672,14 @@ var ToolActionsProvider = (props) => {
5653
5672
  }
5654
5673
  const details = tool.confirmationDetails;
5655
5674
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5656
- const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5675
+ const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5657
5676
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5658
5677
  }
5659
5678
  if (tool.correlationId) {
5660
5679
  await config.getMessageBus().publish({
5661
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5680
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5662
5681
  correlationId: tool.correlationId,
5663
- confirmed: outcome !== "cancel" /* Cancel */,
5682
+ confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5664
5683
  requiresUserConfirmation: false,
5665
5684
  outcome,
5666
5685
  payload
@@ -5679,7 +5698,7 @@ var ToolActionsProvider = (props) => {
5679
5698
  );
5680
5699
  const cancel = (0, import_react12.useCallback)(
5681
5700
  async (callId) => {
5682
- await confirm(callId, "cancel" /* Cancel */);
5701
+ await confirm(callId, ToolConfirmationOutcome.Cancel);
5683
5702
  },
5684
5703
  [confirm]
5685
5704
  );
@@ -5798,7 +5817,7 @@ var ToolMessage = ({
5798
5817
  paddingX: 1,
5799
5818
  flexDirection: "column",
5800
5819
  children: [
5801
- status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5820
+ status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5802
5821
  McpProgressIndicator,
5803
5822
  {
5804
5823
  progress,
@@ -5815,8 +5834,8 @@ var ToolMessage = ({
5815
5834
  terminalWidth,
5816
5835
  renderOutputAsMarkdown,
5817
5836
  hasFocus: isThisShellFocused2,
5818
- maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5819
- overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5837
+ maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5838
+ overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5820
5839
  }
5821
5840
  ),
5822
5841
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -6132,7 +6151,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6132
6151
  settings.merged,
6133
6152
  process3.cwd()
6134
6153
  );
6135
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6154
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6136
6155
  return {
6137
6156
  currentTrustLevel: explicitTrustLevel,
6138
6157
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6177,7 +6196,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6177
6196
  process3.cwd(),
6178
6197
  newConfig
6179
6198
  );
6180
- if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6199
+ if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6181
6200
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6182
6201
  if (source === "file") {
6183
6202
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6251,18 +6270,18 @@ function PermissionsModifyTrustDialog({
6251
6270
  const TRUST_LEVEL_ITEMS = [
6252
6271
  {
6253
6272
  label: `Trust this folder (${dirName})`,
6254
- value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6255
- key: "TRUST_FOLDER" /* TRUST_FOLDER */
6273
+ value: TrustLevel.TRUST_FOLDER,
6274
+ key: TrustLevel.TRUST_FOLDER
6256
6275
  },
6257
6276
  {
6258
6277
  label: `Trust parent folder (${parentFolder})`,
6259
- value: "TRUST_PARENT" /* TRUST_PARENT */,
6260
- key: "TRUST_PARENT" /* TRUST_PARENT */
6278
+ value: TrustLevel.TRUST_PARENT,
6279
+ key: TrustLevel.TRUST_PARENT
6261
6280
  },
6262
6281
  {
6263
6282
  label: "Don't trust",
6264
- value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6265
- key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6283
+ value: TrustLevel.DO_NOT_TRUST,
6284
+ key: TrustLevel.DO_NOT_TRUST
6266
6285
  }
6267
6286
  ];
6268
6287
  const {
@@ -6502,7 +6521,7 @@ var ShellToolMessage = ({
6502
6521
  maxLinesLimit: maxLines
6503
6522
  });
6504
6523
  import_react17.default.useEffect(() => {
6505
- const isExecuting = status === "executing" /* Executing */;
6524
+ const isExecuting = status === CoreToolCallStatus.Executing;
6506
6525
  if (isExecuting && ptyId) {
6507
6526
  try {
6508
6527
  const childWidth = terminalWidth - 4;
@@ -6715,13 +6734,13 @@ var SubagentGroupDisplay = ({
6715
6734
  const singleAgent = toolCalls[0].resultDisplay;
6716
6735
  if (isSubagentProgress(singleAgent)) {
6717
6736
  switch (singleAgent.state) {
6718
- case "completed" /* COMPLETED */:
6737
+ case SubagentState.COMPLETED:
6719
6738
  headerText = "Agent Completed";
6720
6739
  break;
6721
- case "cancelled" /* CANCELLED */:
6740
+ case SubagentState.CANCELLED:
6722
6741
  headerText = "Agent Cancelled";
6723
6742
  break;
6724
- case "error" /* ERROR */:
6743
+ case SubagentState.ERROR:
6725
6744
  headerText = "Agent Error";
6726
6745
  break;
6727
6746
  default:
@@ -6737,8 +6756,8 @@ var SubagentGroupDisplay = ({
6737
6756
  for (const tc of toolCalls) {
6738
6757
  const progress = tc.resultDisplay;
6739
6758
  if (isSubagentProgress(progress)) {
6740
- if (progress.state === "completed" /* COMPLETED */) completedCount++;
6741
- else if (progress.state === "running" /* RUNNING */) runningCount++;
6759
+ if (progress.state === SubagentState.COMPLETED) completedCount++;
6760
+ else if (progress.state === SubagentState.RUNNING) runningCount++;
6742
6761
  } else {
6743
6762
  runningCount++;
6744
6763
  }
@@ -6817,7 +6836,7 @@ var SubagentGroupDisplay = ({
6817
6836
  if (!isExpanded) {
6818
6837
  let content = "Starting...";
6819
6838
  let formattedArgs;
6820
- if (progress.state === "completed" /* COMPLETED */) {
6839
+ if (progress.state === SubagentState.COMPLETED) {
6821
6840
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6822
6841
  content = `Finished Early (${progress.terminateReason})`;
6823
6842
  } else {
@@ -6831,17 +6850,17 @@ var SubagentGroupDisplay = ({
6831
6850
  formattedArgs = formatToolArgs(lastActivity.args);
6832
6851
  }
6833
6852
  }
6834
- const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6853
+ const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6835
6854
  const renderStatusIcon = () => {
6836
- const state = progress.state ?? "running" /* RUNNING */;
6855
+ const state = progress.state ?? SubagentState.RUNNING;
6837
6856
  switch (state) {
6838
- case "running" /* RUNNING */:
6857
+ case SubagentState.RUNNING:
6839
6858
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
6840
- case "completed" /* COMPLETED */:
6859
+ case SubagentState.COMPLETED:
6841
6860
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6842
- case "cancelled" /* CANCELLED */:
6861
+ case SubagentState.CANCELLED:
6843
6862
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6844
- case "error" /* ERROR */:
6863
+ case SubagentState.ERROR:
6845
6864
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6846
6865
  default:
6847
6866
  return checkExhaustive(state);
@@ -6894,22 +6913,22 @@ var hasPayload = (res) => {
6894
6913
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6895
6914
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6896
6915
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6897
- const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6916
+ const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6898
6917
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6899
6918
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6900
6919
  const showDiffStat = !!diff.diffStat;
6901
6920
  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 }) });
6902
6921
  let resultSummary = "";
6903
6922
  let resultColor = theme.text.secondary;
6904
- if (status === "awaiting_approval" /* AwaitingApproval */) {
6923
+ if (status === CoreToolCallStatus.AwaitingApproval) {
6905
6924
  resultSummary = "Confirming";
6906
- } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6925
+ } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6907
6926
  resultSummary = "Accepted";
6908
6927
  resultColor = theme.text.accent;
6909
- } else if (status === "cancelled" /* Cancelled */) {
6928
+ } else if (status === CoreToolCallStatus.Cancelled) {
6910
6929
  resultSummary = "Rejected";
6911
6930
  resultColor = theme.status.error;
6912
- } else if (status === "error" /* Error */) {
6931
+ } else if (status === CoreToolCallStatus.Error) {
6913
6932
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6914
6933
  resultColor = theme.status.error;
6915
6934
  }
@@ -6940,7 +6959,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6940
6959
  filename: diff.fileName,
6941
6960
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
6942
6961
  availableTerminalHeight,
6943
- disableColor: status === "cancelled" /* Cancelled */
6962
+ disableColor: status === CoreToolCallStatus.Cancelled
6944
6963
  }
6945
6964
  );
6946
6965
  return { description, summary, payload };
@@ -7068,10 +7087,10 @@ var DenseToolMessage = (props) => {
7068
7087
  if (isGrepResult(resultDisplay)) {
7069
7088
  return getGenericSuccessData(resultDisplay, originalDescription);
7070
7089
  }
7071
- if (status === "success" /* Success */ && resultDisplay) {
7090
+ if (status === CoreToolCallStatus.Success && resultDisplay) {
7072
7091
  return getGenericSuccessData(resultDisplay, originalDescription);
7073
7092
  }
7074
- if (status === "error" /* Error */) {
7093
+ if (status === CoreToolCallStatus.Error) {
7075
7094
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
7076
7095
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
7077
7096
  "\u2192 ",
@@ -7112,7 +7131,7 @@ var DenseToolMessage = (props) => {
7112
7131
  language: fileExtension,
7113
7132
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7114
7133
  settings,
7115
- disableColor: status === "cancelled" /* Cancelled */,
7134
+ disableColor: status === CoreToolCallStatus.Cancelled,
7116
7135
  returnLines: true
7117
7136
  });
7118
7137
  } else {
@@ -7120,7 +7139,7 @@ var DenseToolMessage = (props) => {
7120
7139
  parsedLines,
7121
7140
  filename: diff.fileName,
7122
7141
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
7123
- disableColor: status === "cancelled" /* Cancelled */
7142
+ disableColor: status === CoreToolCallStatus.Cancelled
7124
7143
  });
7125
7144
  }
7126
7145
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7250,7 +7269,7 @@ function isToolExecuting(pendingHistoryItems) {
7250
7269
  return pendingHistoryItems.some((item) => {
7251
7270
  if (item && item.type === "tool_group") {
7252
7271
  return item.tools.some(
7253
- (tool) => "executing" /* Executing */ === tool.status
7272
+ (tool) => CoreToolCallStatus.Executing === tool.status
7254
7273
  );
7255
7274
  }
7256
7275
  return false;
@@ -7259,7 +7278,7 @@ function isToolExecuting(pendingHistoryItems) {
7259
7278
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7260
7279
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7261
7280
  (item) => item.tools.some(
7262
- (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7281
+ (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7263
7282
  )
7264
7283
  );
7265
7284
  }
@@ -7282,14 +7301,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
7282
7301
  if (isTrackedToolCall(t)) {
7283
7302
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
7284
7303
  } else {
7285
- return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
7304
+ return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
7286
7305
  }
7287
7306
  });
7288
7307
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
7289
7308
  if (isTrackedToolCall(t)) {
7290
7309
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
7291
7310
  } else {
7292
- return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7311
+ return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
7293
7312
  }
7294
7313
  });
7295
7314
  const isShellCommand = toolsToInspect.some((t) => {
@@ -7388,7 +7407,7 @@ var ToolGroupMessage = ({
7388
7407
  const groupedTools = (0, import_react21.useMemo)(() => {
7389
7408
  const groups = [];
7390
7409
  for (const tool of visibleToolCalls) {
7391
- if (tool.kind === "agent" /* Agent */) {
7410
+ if (tool.kind === Kind.Agent) {
7392
7411
  const lastGroup = groups[groups.length - 1];
7393
7412
  if (Array.isArray(lastGroup)) {
7394
7413
  lastGroup.push(tool);
@@ -7443,7 +7462,7 @@ var ToolGroupMessage = ({
7443
7462
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7444
7463
  let countToolCallsWithResults = 0;
7445
7464
  for (const tool of visibleToolCalls) {
7446
- if (tool.kind !== "agent" /* Agent */) {
7465
+ if (tool.kind !== Kind.Agent) {
7447
7466
  if (isCompactTool(tool, isCompactModeEnabled)) {
7448
7467
  if (hasDensePayload(tool)) {
7449
7468
  countToolCallsWithResults++;
@@ -7617,7 +7636,7 @@ var ToolGroupDisplay = ({
7617
7636
  }
7618
7637
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7619
7638
  const visibleTools = tools.filter(
7620
- (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7639
+ (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7621
7640
  );
7622
7641
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7623
7642
  const otherTools = visibleTools.filter(
@@ -7819,18 +7838,18 @@ function CompressionMessage({
7819
7838
  return "Compressing chat history";
7820
7839
  }
7821
7840
  switch (compressionStatus) {
7822
- case 1 /* COMPRESSED */:
7841
+ case CompressionStatus.COMPRESSED:
7823
7842
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7824
- case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7843
+ case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7825
7844
  if (originalTokens < 5e4) {
7826
7845
  return "Compression was not beneficial for this history size.";
7827
7846
  }
7828
7847
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7829
- case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7848
+ case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7830
7849
  return "Could not compress chat history due to a token counting error.";
7831
- case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7850
+ case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7832
7851
  return "Chat history compression failed: the model returned an empty summary.";
7833
- case 5 /* NOOP */:
7852
+ case CompressionStatus.NOOP:
7834
7853
  return "Nothing to compress.";
7835
7854
  default:
7836
7855
  return "";
@@ -8243,7 +8262,7 @@ var ModelUsageTable = ({ models }) => {
8243
8262
  Object.entries(models).forEach(([name, metrics]) => {
8244
8263
  rows.push({
8245
8264
  name,
8246
- displayName: name,
8265
+ displayName: getDisplayString(name),
8247
8266
  requests: metrics.api.totalRequests,
8248
8267
  cachedTokens: metrics.tokens.cached.toLocaleString(),
8249
8268
  inputTokens: metrics.tokens.prompt.toLocaleString(),
@@ -8256,8 +8275,8 @@ var ModelUsageTable = ({ models }) => {
8256
8275
  );
8257
8276
  roleEntries.sort(([a], [b]) => {
8258
8277
  if (a === b) return 0;
8259
- if (a === "main" /* MAIN */) return -1;
8260
- if (b === "main" /* MAIN */) return 1;
8278
+ if (a === LlmRole.MAIN) return -1;
8279
+ if (b === LlmRole.MAIN) return 1;
8261
8280
  return a.localeCompare(b);
8262
8281
  });
8263
8282
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8588,8 +8607,8 @@ var ModelStatsDisplay = ({
8588
8607
  return validRoles.includes(role);
8589
8608
  }).sort((a, b) => {
8590
8609
  if (a === b) return 0;
8591
- if (a === "main" /* MAIN */) return -1;
8592
- if (b === "main" /* MAIN */) return 1;
8610
+ if (a === LlmRole.MAIN) return -1;
8611
+ if (b === LlmRole.MAIN) return 1;
8593
8612
  return a.localeCompare(b);
8594
8613
  });
8595
8614
  const createRow = (metric, getValue, options = {}) => {
@@ -8727,7 +8746,7 @@ var ModelStatsDisplay = ({
8727
8746
  },
8728
8747
  ...modelNames.map((name) => ({
8729
8748
  key: name,
8730
- header: name,
8749
+ header: getDisplayString(name),
8731
8750
  flexGrow: 1,
8732
8751
  renderCell: (row) => {
8733
8752
  if (row.isSection) return null;
@@ -9380,7 +9399,7 @@ var McpStatus = ({
9380
9399
  );
9381
9400
  const originalStatus = serverStatus(serverName);
9382
9401
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9383
- const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9402
+ const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9384
9403
  let statusIndicator = "";
9385
9404
  let statusText = "";
9386
9405
  let statusColor = theme.text.primary;
@@ -9392,17 +9411,17 @@ var McpStatus = ({
9392
9411
  statusColor = theme.text.secondary;
9393
9412
  } else {
9394
9413
  switch (status) {
9395
- case "connected" /* CONNECTED */:
9414
+ case MCPServerStatus.CONNECTED:
9396
9415
  statusIndicator = "\u{1F7E2}";
9397
9416
  statusText = "Ready";
9398
9417
  statusColor = theme.status.success;
9399
9418
  break;
9400
- case "connecting" /* CONNECTING */:
9419
+ case MCPServerStatus.CONNECTING:
9401
9420
  statusIndicator = "\u{1F504}";
9402
9421
  statusText = "Starting... (first startup may take longer)";
9403
9422
  statusColor = theme.status.warning;
9404
9423
  break;
9405
- case "disconnected" /* DISCONNECTED */:
9424
+ case MCPServerStatus.DISCONNECTED:
9406
9425
  default:
9407
9426
  statusIndicator = "\u{1F534}";
9408
9427
  statusText = "Disconnected";
@@ -9450,12 +9469,12 @@ var McpStatus = ({
9450
9469
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9451
9470
  " - ",
9452
9471
  statusText,
9453
- status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9472
+ status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9454
9473
  ] }),
9455
9474
  authStatusNode
9456
9475
  ] }),
9457
- status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9458
- status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9476
+ status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9477
+ status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
9459
9478
  " (",
9460
9479
  toolCount,
9461
9480
  " tools cached)"
@@ -10016,7 +10035,7 @@ var Notifications = () => {
10016
10035
  if (dismissed) return [];
10017
10036
  const counts = persistentState.get("startupWarningCounts") || {};
10018
10037
  return startupWarnings.filter((w) => {
10019
- if (w.priority === "low" /* Low */) {
10038
+ if (w.priority === WarningPriority.Low) {
10020
10039
  const count = counts[w.id] || 0;
10021
10040
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
10022
10041
  }
@@ -10029,7 +10048,7 @@ var Notifications = () => {
10029
10048
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
10030
10049
  let changed = false;
10031
10050
  visibleWarnings.forEach((w) => {
10032
- if (w.priority === "low" /* Low */) {
10051
+ if (w.priority === WarningPriority.Low) {
10033
10052
  counts[w.id] = (counts[w.id] || 0) + 1;
10034
10053
  changed = true;
10035
10054
  }
@@ -10136,7 +10155,7 @@ var UserIdentity = ({ config }) => {
10136
10155
  }
10137
10156
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
10138
10157
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
10139
- /* @__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: [
10158
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
10140
10159
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
10141
10160
  "Signed in with Google",
10142
10161
  email ? ":" : ""
@@ -10370,7 +10389,7 @@ var import_react32 = __toESM(require_react(), 1);
10370
10389
  function getConfirmingToolState(pendingHistoryItems) {
10371
10390
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10372
10391
  const confirmingTools = allPendingTools.filter(
10373
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10392
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10374
10393
  );
10375
10394
  if (confirmingTools.length === 0) {
10376
10395
  return null;
@@ -11678,7 +11697,7 @@ var ExitPlanModeDialog = ({
11678
11697
  {
11679
11698
  questions: [
11680
11699
  {
11681
- type: "choice" /* CHOICE */,
11700
+ type: QuestionType.CHOICE,
11682
11701
  header: "Approval",
11683
11702
  question: planContent,
11684
11703
  options: [
@@ -11699,9 +11718,9 @@ var ExitPlanModeDialog = ({
11699
11718
  onSubmit: (answers) => {
11700
11719
  const answer = answers["0"];
11701
11720
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11702
- onApprove("autoEdit" /* AUTO_EDIT */);
11721
+ onApprove(ApprovalMode.AUTO_EDIT);
11703
11722
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11704
- onApprove("default" /* DEFAULT */);
11723
+ onApprove(ApprovalMode.DEFAULT);
11705
11724
  } else if (answer) {
11706
11725
  onFeedback(answer);
11707
11726
  }
@@ -11912,7 +11931,7 @@ ${deceptiveUrlWarnings.map(
11912
11931
  );
11913
11932
  (0, import_react37.useEffect)(() => {
11914
11933
  if (isCancelling) {
11915
- handleConfirm("cancel" /* Cancel */);
11934
+ handleConfirm(ToolConfirmationOutcome.Cancel);
11916
11935
  }
11917
11936
  }, [isCancelling, handleConfirm]);
11918
11937
  const handleSelect = (0, import_react37.useCallback)(
@@ -11925,19 +11944,19 @@ ${deceptiveUrlWarnings.map(
11925
11944
  if (!confirmationDetails.isModifying) {
11926
11945
  options2.push({
11927
11946
  label: "Allow once",
11928
- value: "proceed_once" /* ProceedOnce */,
11947
+ value: ToolConfirmationOutcome.ProceedOnce,
11929
11948
  key: "Allow once"
11930
11949
  });
11931
11950
  if (isTrustedFolder) {
11932
11951
  options2.push({
11933
11952
  label: "Allow for this session",
11934
- value: "proceed_always" /* ProceedAlways */,
11953
+ value: ToolConfirmationOutcome.ProceedAlways,
11935
11954
  key: "Allow for this session"
11936
11955
  });
11937
11956
  if (allowPermanentApproval) {
11938
11957
  options2.push({
11939
11958
  label: "Allow for this file in all future sessions",
11940
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11959
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11941
11960
  key: "Allow for this file in all future sessions"
11942
11961
  });
11943
11962
  }
@@ -11945,119 +11964,119 @@ ${deceptiveUrlWarnings.map(
11945
11964
  if (!config.getIdeMode() || !isDiffingEnabled) {
11946
11965
  options2.push({
11947
11966
  label: "Modify with external editor",
11948
- value: "modify_with_editor" /* ModifyWithEditor */,
11967
+ value: ToolConfirmationOutcome.ModifyWithEditor,
11949
11968
  key: "Modify with external editor"
11950
11969
  });
11951
11970
  }
11952
11971
  options2.push({
11953
11972
  label: "No, suggest changes (esc)",
11954
- value: "cancel" /* Cancel */,
11973
+ value: ToolConfirmationOutcome.Cancel,
11955
11974
  key: "No, suggest changes (esc)"
11956
11975
  });
11957
11976
  }
11958
11977
  } else if (confirmationDetails.type === "sandbox_expansion") {
11959
11978
  options2.push({
11960
11979
  label: "Allow once",
11961
- value: "proceed_once" /* ProceedOnce */,
11980
+ value: ToolConfirmationOutcome.ProceedOnce,
11962
11981
  key: "Allow once"
11963
11982
  });
11964
11983
  if (isTrustedFolder) {
11965
11984
  options2.push({
11966
11985
  label: "Allow for this session",
11967
- value: "proceed_always" /* ProceedAlways */,
11986
+ value: ToolConfirmationOutcome.ProceedAlways,
11968
11987
  key: "Allow for this session"
11969
11988
  });
11970
11989
  if (allowPermanentApproval) {
11971
11990
  options2.push({
11972
11991
  label: "Allow for all future sessions",
11973
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11992
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11974
11993
  key: "Allow for all future sessions"
11975
11994
  });
11976
11995
  }
11977
11996
  }
11978
11997
  options2.push({
11979
11998
  label: "No, suggest changes (esc)",
11980
- value: "cancel" /* Cancel */,
11999
+ value: ToolConfirmationOutcome.Cancel,
11981
12000
  key: "No, suggest changes (esc)"
11982
12001
  });
11983
12002
  } else if (confirmationDetails.type === "exec") {
11984
12003
  options2.push({
11985
12004
  label: "Allow once",
11986
- value: "proceed_once" /* ProceedOnce */,
12005
+ value: ToolConfirmationOutcome.ProceedOnce,
11987
12006
  key: "Allow once"
11988
12007
  });
11989
12008
  if (isTrustedFolder) {
11990
12009
  options2.push({
11991
12010
  label: `Allow for this session`,
11992
- value: "proceed_always" /* ProceedAlways */,
12011
+ value: ToolConfirmationOutcome.ProceedAlways,
11993
12012
  key: `Allow for this session`
11994
12013
  });
11995
12014
  if (allowPermanentApproval) {
11996
12015
  options2.push({
11997
12016
  label: `Allow this command for all future sessions`,
11998
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12017
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11999
12018
  key: `Allow for all future sessions`
12000
12019
  });
12001
12020
  }
12002
12021
  }
12003
12022
  options2.push({
12004
12023
  label: "No, suggest changes (esc)",
12005
- value: "cancel" /* Cancel */,
12024
+ value: ToolConfirmationOutcome.Cancel,
12006
12025
  key: "No, suggest changes (esc)"
12007
12026
  });
12008
12027
  } else if (confirmationDetails.type === "info") {
12009
12028
  options2.push({
12010
12029
  label: "Allow once",
12011
- value: "proceed_once" /* ProceedOnce */,
12030
+ value: ToolConfirmationOutcome.ProceedOnce,
12012
12031
  key: "Allow once"
12013
12032
  });
12014
12033
  if (isTrustedFolder) {
12015
12034
  options2.push({
12016
12035
  label: "Allow for this session",
12017
- value: "proceed_always" /* ProceedAlways */,
12036
+ value: ToolConfirmationOutcome.ProceedAlways,
12018
12037
  key: "Allow for this session"
12019
12038
  });
12020
12039
  if (allowPermanentApproval) {
12021
12040
  options2.push({
12022
12041
  label: "Allow for all future sessions",
12023
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12042
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12024
12043
  key: "Allow for all future sessions"
12025
12044
  });
12026
12045
  }
12027
12046
  }
12028
12047
  options2.push({
12029
12048
  label: "No, suggest changes (esc)",
12030
- value: "cancel" /* Cancel */,
12049
+ value: ToolConfirmationOutcome.Cancel,
12031
12050
  key: "No, suggest changes (esc)"
12032
12051
  });
12033
12052
  } else if (confirmationDetails.type === "mcp") {
12034
12053
  options2.push({
12035
12054
  label: "Allow once",
12036
- value: "proceed_once" /* ProceedOnce */,
12055
+ value: ToolConfirmationOutcome.ProceedOnce,
12037
12056
  key: "Allow once"
12038
12057
  });
12039
12058
  if (isTrustedFolder) {
12040
12059
  options2.push({
12041
12060
  label: "Allow tool for this session",
12042
- value: "proceed_always_tool" /* ProceedAlwaysTool */,
12061
+ value: ToolConfirmationOutcome.ProceedAlwaysTool,
12043
12062
  key: "Allow tool for this session"
12044
12063
  });
12045
12064
  options2.push({
12046
12065
  label: "Allow all server tools for this session",
12047
- value: "proceed_always_server" /* ProceedAlwaysServer */,
12066
+ value: ToolConfirmationOutcome.ProceedAlwaysServer,
12048
12067
  key: "Allow all server tools for this session"
12049
12068
  });
12050
12069
  if (allowPermanentApproval) {
12051
12070
  options2.push({
12052
12071
  label: "Allow tool for all future sessions",
12053
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
12072
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
12054
12073
  key: "Allow tool for all future sessions"
12055
12074
  });
12056
12075
  }
12057
12076
  }
12058
12077
  options2.push({
12059
12078
  label: "No, suggest changes (esc)",
12060
- value: "cancel" /* Cancel */,
12079
+ value: ToolConfirmationOutcome.Cancel,
12061
12080
  key: "No, suggest changes (esc)"
12062
12081
  });
12063
12082
  }
@@ -12096,7 +12115,7 @@ ${deceptiveUrlWarnings.map(
12096
12115
  const containsRedirection = commandsToDisplay.some(
12097
12116
  (cmd) => hasRedirection(cmd)
12098
12117
  );
12099
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12118
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12100
12119
  if (containsRedirection && !isAutoEdit) {
12101
12120
  extraInfoLines = 1;
12102
12121
  }
@@ -12122,7 +12141,7 @@ ${deceptiveUrlWarnings.map(
12122
12141
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12123
12142
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12124
12143
  const alwaysAndSaveIndex = options2.findIndex(
12125
- (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12144
+ (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12126
12145
  );
12127
12146
  if (alwaysAndSaveIndex !== -1) {
12128
12147
  initialIndex2 = alwaysAndSaveIndex;
@@ -12139,10 +12158,10 @@ ${deceptiveUrlWarnings.map(
12139
12158
  {
12140
12159
  questions: confirmationDetails.questions,
12141
12160
  onSubmit: (answers) => {
12142
- handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12161
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12143
12162
  },
12144
12163
  onCancel: () => {
12145
- handleConfirm("cancel" /* Cancel */);
12164
+ handleConfirm(ToolConfirmationOutcome.Cancel);
12146
12165
  },
12147
12166
  width: terminalWidth,
12148
12167
  availableHeight: bodyHeight
@@ -12163,19 +12182,19 @@ ${deceptiveUrlWarnings.map(
12163
12182
  planPath: confirmationDetails.planPath,
12164
12183
  getPreferredEditor,
12165
12184
  onApprove: (approvalMode) => {
12166
- handleConfirm("proceed_once" /* ProceedOnce */, {
12185
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12167
12186
  approved: true,
12168
12187
  approvalMode
12169
12188
  });
12170
12189
  },
12171
12190
  onFeedback: (feedback) => {
12172
- handleConfirm("proceed_once" /* ProceedOnce */, {
12191
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12173
12192
  approved: false,
12174
12193
  feedback
12175
12194
  });
12176
12195
  },
12177
12196
  onCancel: () => {
12178
- handleConfirm("cancel" /* Cancel */);
12197
+ handleConfirm(ToolConfirmationOutcome.Cancel);
12179
12198
  },
12180
12199
  width: terminalWidth,
12181
12200
  availableHeight: bodyHeight
@@ -12284,7 +12303,7 @@ ${deceptiveUrlWarnings.map(
12284
12303
  const containsRedirection = commandsToDisplay.some(
12285
12304
  (cmd) => hasRedirection(cmd)
12286
12305
  );
12287
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12306
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12288
12307
  let warnings = null;
12289
12308
  if (containsRedirection && !isAutoEdit) {
12290
12309
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12443,7 +12462,7 @@ ${deceptiveUrlWarnings.map(
12443
12462
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12444
12463
  const renderRadioItem = (0, import_react37.useCallback)(
12445
12464
  (item, { titleColor }) => {
12446
- if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12465
+ if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12447
12466
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12448
12467
  item.label,
12449
12468
  " ",
@@ -14473,7 +14492,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14473
14492
  if (settings.merged.security.auth.useExternal) {
14474
14493
  return null;
14475
14494
  }
14476
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14495
+ if (authType === AuthType.USE_GEMINI) {
14477
14496
  return null;
14478
14497
  }
14479
14498
  return validateAuthMethod(authType);
@@ -14525,7 +14544,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14525
14544
  }
14526
14545
  return;
14527
14546
  }
14528
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14547
+ if (authType === AuthType.USE_GEMINI) {
14529
14548
  const key = await reloadApiKey();
14530
14549
  if (!key) {
14531
14550
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14603,31 +14622,31 @@ function AuthDialog({
14603
14622
  let items = [
14604
14623
  {
14605
14624
  label: "Sign in with Google",
14606
- value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14607
- key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14625
+ value: AuthType.LOGIN_WITH_GOOGLE,
14626
+ key: AuthType.LOGIN_WITH_GOOGLE
14608
14627
  },
14609
14628
  ...process.env["CLOUD_SHELL"] === "true" ? [
14610
14629
  {
14611
14630
  label: "Use Cloud Shell user credentials",
14612
- value: "compute-default-credentials" /* COMPUTE_ADC */,
14613
- key: "compute-default-credentials" /* COMPUTE_ADC */
14631
+ value: AuthType.COMPUTE_ADC,
14632
+ key: AuthType.COMPUTE_ADC
14614
14633
  }
14615
14634
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14616
14635
  {
14617
14636
  label: "Use metadata server application default credentials",
14618
- value: "compute-default-credentials" /* COMPUTE_ADC */,
14619
- key: "compute-default-credentials" /* COMPUTE_ADC */
14637
+ value: AuthType.COMPUTE_ADC,
14638
+ key: AuthType.COMPUTE_ADC
14620
14639
  }
14621
14640
  ] : [],
14622
14641
  {
14623
14642
  label: "Use Gemini API Key",
14624
- value: "gemini-api-key" /* USE_GEMINI */,
14625
- key: "gemini-api-key" /* USE_GEMINI */
14643
+ value: AuthType.USE_GEMINI,
14644
+ key: AuthType.USE_GEMINI
14626
14645
  },
14627
14646
  {
14628
14647
  label: "Vertex AI",
14629
- value: "vertex-ai" /* USE_VERTEX_AI */,
14630
- key: "vertex-ai" /* USE_VERTEX_AI */
14648
+ value: AuthType.USE_VERTEX_AI,
14649
+ key: AuthType.USE_VERTEX_AI
14631
14650
  }
14632
14651
  ];
14633
14652
  if (settings.merged.security.auth.enforcedType) {
@@ -14649,9 +14668,9 @@ function AuthDialog({
14649
14668
  return item.value === defaultAuthType;
14650
14669
  }
14651
14670
  if (process.env["GEMINI_API_KEY"]) {
14652
- return item.value === "gemini-api-key" /* USE_GEMINI */;
14671
+ return item.value === AuthType.USE_GEMINI;
14653
14672
  }
14654
- return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14673
+ return item.value === AuthType.LOGIN_WITH_GOOGLE;
14655
14674
  });
14656
14675
  if (settings.merged.security.auth.enforcedType) {
14657
14676
  initialAuthIndex = 0;
@@ -14662,7 +14681,7 @@ function AuthDialog({
14662
14681
  return;
14663
14682
  }
14664
14683
  if (authType) {
14665
- const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14684
+ const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14666
14685
  if (needsRestart) {
14667
14686
  setAuthContext({ requiresRestart: true });
14668
14687
  } else {
@@ -14670,12 +14689,12 @@ function AuthDialog({
14670
14689
  }
14671
14690
  await clearCachedCredentialFile();
14672
14691
  settings.setValue(scope, "security.auth.selectedType", authType);
14673
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14692
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14674
14693
  setExiting(true);
14675
14694
  setTimeout(relaunchApp, 100);
14676
14695
  return;
14677
14696
  }
14678
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14697
+ if (authType === AuthType.USE_GEMINI) {
14679
14698
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14680
14699
  return;
14681
14700
  }
@@ -15431,11 +15450,11 @@ var PrivacyNoticeText = ({
15431
15450
  }) => {
15432
15451
  const authType = config.getContentGeneratorConfig()?.authType;
15433
15452
  switch (authType) {
15434
- case "gemini-api-key" /* USE_GEMINI */:
15453
+ case AuthType.USE_GEMINI:
15435
15454
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15436
- case "vertex-ai" /* USE_VERTEX_AI */:
15455
+ case AuthType.USE_VERTEX_AI:
15437
15456
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15438
- case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15457
+ case AuthType.LOGIN_WITH_GOOGLE:
15439
15458
  default:
15440
15459
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15441
15460
  }
@@ -15476,7 +15495,7 @@ function ProQuotaDialog({
15476
15495
  value: "retry_always",
15477
15496
  key: "retry_always"
15478
15497
  },
15479
- ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15498
+ ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15480
15499
  {
15481
15500
  label: "Upgrade for higher limits",
15482
15501
  value: "upgrade",
@@ -16633,8 +16652,9 @@ function ModelDialog({ onClose }) {
16633
16652
  const preferredModel = config?.getModel() || GEMINI_MODEL_ALIAS_AUTO;
16634
16653
  const shouldShowPreviewModels = config?.getHasAccessToPreviewModel() ?? false;
16635
16654
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16655
+ const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
16636
16656
  const selectedAuthType = settings.merged.security.auth.selectedType;
16637
- const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16657
+ const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16638
16658
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16639
16659
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16640
16660
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -16677,6 +16697,7 @@ function ModelDialog({ onClose }) {
16677
16697
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16678
16698
  const allOptions = config.getModelConfigService().getAvailableModelOptions({
16679
16699
  useGemini3_1: useGemini31,
16700
+ useGemini3_5Flash,
16680
16701
  useCustomTools: useCustomToolModel,
16681
16702
  hasAccessToPreview: shouldShowPreviewModels,
16682
16703
  hasAccessToProModel
@@ -16701,7 +16722,8 @@ function ModelDialog({ onClose }) {
16701
16722
  title: getDisplayString(GEMINI_MODEL_ALIAS_AUTO),
16702
16723
  description: getAutoModelDescription(
16703
16724
  shouldShowPreviewModels,
16704
- useGemini31
16725
+ useGemini31,
16726
+ useGemini3_5Flash
16705
16727
  ),
16706
16728
  key: GEMINI_MODEL_ALIAS_AUTO
16707
16729
  },
@@ -16718,6 +16740,7 @@ function ModelDialog({ onClose }) {
16718
16740
  shouldShowPreviewModels,
16719
16741
  manualModelSelected,
16720
16742
  useGemini31,
16743
+ useGemini3_5Flash,
16721
16744
  useCustomToolModel,
16722
16745
  hasAccessToProModel
16723
16746
  ]);
@@ -16725,6 +16748,7 @@ function ModelDialog({ onClose }) {
16725
16748
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16726
16749
  const allOptions = config.getModelConfigService().getAvailableModelOptions({
16727
16750
  useGemini3_1: useGemini31,
16751
+ useGemini3_5Flash,
16728
16752
  useCustomTools: useCustomToolModel,
16729
16753
  hasAccessToPreview: shouldShowPreviewModels,
16730
16754
  hasAccessToProModel
@@ -16798,6 +16822,7 @@ function ModelDialog({ onClose }) {
16798
16822
  }, [
16799
16823
  shouldShowPreviewModels,
16800
16824
  useGemini31,
16825
+ useGemini3_5Flash,
16801
16826
  useCustomToolModel,
16802
16827
  hasAccessToProModel,
16803
16828
  config
@@ -17952,10 +17977,10 @@ function initializeConsoleStore() {
17952
17977
  globalConsoleMessages = [];
17953
17978
  globalErrorCount = 0;
17954
17979
  notifyListeners();
17955
- coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
17956
- coreEvents.off("output" /* Output */, handleOutput);
17957
- coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
17958
- coreEvents.on("output" /* Output */, handleOutput);
17980
+ coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
17981
+ coreEvents.off(CoreEvent.Output, handleOutput);
17982
+ coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
17983
+ coreEvents.on(CoreEvent.Output, handleOutput);
17959
17984
  }
17960
17985
  function notifyListeners() {
17961
17986
  for (const listener of listeners) {
@@ -20092,7 +20117,7 @@ function usePromptCompletion({
20092
20117
  { model: "prompt-completion" },
20093
20118
  contents,
20094
20119
  signal,
20095
- "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20120
+ LlmRole.UTILITY_AUTOCOMPLETE
20096
20121
  );
20097
20122
  if (signal.aborted) {
20098
20123
  return;
@@ -22170,9 +22195,9 @@ var InputPrompt = ({
22170
22195
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22171
22196
  }
22172
22197
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22173
- const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22174
- const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22175
- const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22198
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22199
+ const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22200
+ const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22176
22201
  let statusColor;
22177
22202
  let statusText = "";
22178
22203
  if (shellModeActive) {
@@ -23005,22 +23030,22 @@ var ApprovalModeIndicator = ({
23005
23030
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23006
23031
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23007
23032
  switch (approvalMode) {
23008
- case "autoEdit" /* AUTO_EDIT */:
23033
+ case ApprovalMode.AUTO_EDIT:
23009
23034
  textColor = theme.status.warning;
23010
23035
  textContent = "auto-accept edits";
23011
23036
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23012
23037
  break;
23013
- case "plan" /* PLAN */:
23038
+ case ApprovalMode.PLAN:
23014
23039
  textColor = theme.status.success;
23015
23040
  textContent = "plan";
23016
23041
  subText = `${cycleHint} to manual`;
23017
23042
  break;
23018
- case "yolo" /* YOLO */:
23043
+ case ApprovalMode.YOLO:
23019
23044
  textColor = theme.status.error;
23020
23045
  textContent = "YOLO";
23021
23046
  subText = yoloHint;
23022
23047
  break;
23023
- case "default" /* DEFAULT */:
23048
+ case ApprovalMode.DEFAULT:
23024
23049
  default:
23025
23050
  textColor = theme.text.accent;
23026
23051
  textContent = "";
@@ -23068,7 +23093,7 @@ var useComposerStatus = () => {
23068
23093
  (item) => item.type === "tool_group"
23069
23094
  ).some(
23070
23095
  (item) => item.tools.some(
23071
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23096
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23072
23097
  )
23073
23098
  ),
23074
23099
  [uiState.pendingHistoryItems]
@@ -23083,13 +23108,13 @@ var useComposerStatus = () => {
23083
23108
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23084
23109
  if (hideMinimalModeHintWhileBusy) return null;
23085
23110
  switch (showApprovalModeIndicator) {
23086
- case "yolo" /* YOLO */:
23111
+ case ApprovalMode.YOLO:
23087
23112
  return { text: "YOLO", color: theme.status.error };
23088
- case "plan" /* PLAN */:
23113
+ case ApprovalMode.PLAN:
23089
23114
  return { text: "plan", color: theme.status.success };
23090
- case "autoEdit" /* AUTO_EDIT */:
23115
+ case ApprovalMode.AUTO_EDIT:
23091
23116
  return { text: "auto edit", color: theme.status.warning };
23092
- case "default" /* DEFAULT */:
23117
+ case ApprovalMode.DEFAULT:
23093
23118
  default:
23094
23119
  return null;
23095
23120
  }
@@ -23443,7 +23468,7 @@ var ConfigInitDisplay = ({
23443
23468
  let connected = 0;
23444
23469
  const connecting = [];
23445
23470
  for (const [name, client] of clients.entries()) {
23446
- if (client.getStatus() === "connected" /* CONNECTED */) {
23471
+ if (client.getStatus() === MCPServerStatus.CONNECTED) {
23447
23472
  connected++;
23448
23473
  } else {
23449
23474
  connecting.push(name);
@@ -23465,9 +23490,9 @@ var ConfigInitDisplay = ({
23465
23490
  );
23466
23491
  }
23467
23492
  };
23468
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23493
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23469
23494
  return () => {
23470
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23495
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23471
23496
  };
23472
23497
  }, [initialMessage]);
23473
23498
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24184,7 +24209,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24184
24209
  callId,
24185
24210
  name: SHELL_COMMAND_NAME,
24186
24211
  description: rawQuery,
24187
- status: "executing" /* Executing */,
24212
+ status: CoreToolCallStatus.Executing,
24188
24213
  isClientInitiated: true,
24189
24214
  resultDisplay: "",
24190
24215
  confirmationDetails: void 0
@@ -24325,7 +24350,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24325
24350
  mainContent = result.output.trim() || "(Command produced no output)";
24326
24351
  }
24327
24352
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24328
- let finalStatus = "success" /* Success */;
24353
+ let finalStatus = CoreToolCallStatus.Success;
24329
24354
  const prependToAnsiOutput = (output, text) => {
24330
24355
  const newLines = text.split("\n").map((line) => [
24331
24356
  {
@@ -24344,20 +24369,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24344
24369
  };
24345
24370
  let prefix = "";
24346
24371
  if (result.error) {
24347
- finalStatus = "error" /* Error */;
24372
+ finalStatus = CoreToolCallStatus.Error;
24348
24373
  prefix = result.error.message;
24349
24374
  } else if (result.aborted) {
24350
- finalStatus = "cancelled" /* Cancelled */;
24375
+ finalStatus = CoreToolCallStatus.Cancelled;
24351
24376
  prefix = "Command was cancelled.";
24352
24377
  } else if (result.backgrounded) {
24353
- finalStatus = "success" /* Success */;
24378
+ finalStatus = CoreToolCallStatus.Success;
24354
24379
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24355
24380
  mainContent = finalOutput;
24356
24381
  } else if (result.signal) {
24357
- finalStatus = "error" /* Error */;
24382
+ finalStatus = CoreToolCallStatus.Error;
24358
24383
  prefix = `Command terminated by signal: ${result.signal}.`;
24359
24384
  } else if (result.exitCode !== 0) {
24360
- finalStatus = "error" /* Error */;
24385
+ finalStatus = CoreToolCallStatus.Error;
24361
24386
  prefix = `Command exited with code ${result.exitCode}.`;
24362
24387
  }
24363
24388
  if (prefix) {
@@ -24383,7 +24408,7 @@ ${mainContent}`;
24383
24408
  status: finalStatus,
24384
24409
  resultDisplay: finalOutput
24385
24410
  };
24386
- if (finalStatus !== "cancelled" /* Cancelled */) {
24411
+ if (finalStatus !== CoreToolCallStatus.Cancelled) {
24387
24412
  addItemToHistory(
24388
24413
  {
24389
24414
  type: "tool_group",
@@ -25373,7 +25398,7 @@ function useQuotaAndFallback({
25373
25398
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25374
25399
  `/stats model for usage details`,
25375
25400
  `/model to switch models.`,
25376
- contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25401
+ contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25377
25402
  ].filter(Boolean);
25378
25403
  message = messageLines.join("\n");
25379
25404
  } else if (error instanceof ModelNotFoundError) {
@@ -25561,7 +25586,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25561
25586
  );
25562
25587
  setEditorError(null);
25563
25588
  setIsEditorDialogOpen(false);
25564
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25589
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25565
25590
  } catch (error) {
25566
25591
  setEditorError(`Failed to set editor preference: ${error}`);
25567
25592
  }
@@ -25570,7 +25595,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25570
25595
  );
25571
25596
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25572
25597
  setIsEditorDialogOpen(false);
25573
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25598
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25574
25599
  }, []);
25575
25600
  return {
25576
25601
  isEditorDialogOpen,
@@ -25947,7 +25972,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25947
25972
  canonicalPath: resolvedCommandPath
25948
25973
  } = parseSlashCommand(trimmed, commands);
25949
25974
  if (!commandToExecute) {
25950
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25975
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25951
25976
  if (isMcpLoading) {
25952
25977
  setIsProcessing(true);
25953
25978
  if (addToHistory) {
@@ -26127,7 +26152,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26127
26152
  onConfirm: async (resolvedOutcome) => {
26128
26153
  resolve3({
26129
26154
  outcome: resolvedOutcome,
26130
- approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26155
+ approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26131
26156
  });
26132
26157
  }
26133
26158
  };
@@ -26135,7 +26160,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26135
26160
  callId,
26136
26161
  name: "Expansion",
26137
26162
  description: "Command expansion needs shell access",
26138
- status: "awaiting_approval" /* AwaitingApproval */,
26163
+ status: CoreToolCallStatus.AwaitingApproval,
26139
26164
  isClientInitiated: true,
26140
26165
  resultDisplay: void 0,
26141
26166
  confirmationDetails
@@ -26146,7 +26171,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26146
26171
  });
26147
26172
  });
26148
26173
  setPendingItem(null);
26149
- if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26174
+ if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26150
26175
  addItem(
26151
26176
  {
26152
26177
  type: "info" /* INFO */,
@@ -26156,7 +26181,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26156
26181
  );
26157
26182
  return { type: "handled" };
26158
26183
  }
26159
- if (outcome === "proceed_always" /* ProceedAlways */) {
26184
+ if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26160
26185
  setSessionShellAllowlist(
26161
26186
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26162
26187
  );
@@ -26632,7 +26657,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26632
26657
  let description;
26633
26658
  let renderOutputAsMarkdown = false;
26634
26659
  const displayName = call.tool?.displayName ?? call.request.name;
26635
- if (call.status === "error" /* Error */) {
26660
+ if (call.status === CoreToolCallStatus.Error) {
26636
26661
  description = JSON.stringify(call.request.args);
26637
26662
  } else {
26638
26663
  description = call.invocation.getDescription();
@@ -26655,27 +26680,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26655
26680
  let progress = void 0;
26656
26681
  let progressTotal = void 0;
26657
26682
  switch (call.status) {
26658
- case "success" /* Success */:
26683
+ case CoreToolCallStatus.Success:
26659
26684
  resultDisplay = call.response.resultDisplay;
26660
26685
  outputFile = call.response.outputFile;
26661
26686
  break;
26662
- case "error" /* Error */:
26663
- case "cancelled" /* Cancelled */:
26687
+ case CoreToolCallStatus.Error:
26688
+ case CoreToolCallStatus.Cancelled:
26664
26689
  resultDisplay = call.response.resultDisplay;
26665
26690
  break;
26666
- case "awaiting_approval" /* AwaitingApproval */:
26691
+ case CoreToolCallStatus.AwaitingApproval:
26667
26692
  correlationId = call.correlationId;
26668
26693
  confirmationDetails = call.confirmationDetails;
26669
26694
  break;
26670
- case "executing" /* Executing */:
26695
+ case CoreToolCallStatus.Executing:
26671
26696
  resultDisplay = call.liveOutput;
26672
26697
  ptyId = call.pid;
26673
26698
  progressMessage = call.progressMessage;
26674
26699
  progress = call.progress;
26675
26700
  progressTotal = call.progressTotal;
26676
26701
  break;
26677
- case "scheduled" /* Scheduled */:
26678
- case "validating" /* Validating */:
26702
+ case CoreToolCallStatus.Scheduled:
26703
+ case CoreToolCallStatus.Validating:
26679
26704
  break;
26680
26705
  default: {
26681
26706
  const exhaustiveCheck = call;
@@ -26746,7 +26771,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26746
26771
  const handler = (event) => {
26747
26772
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26748
26773
  const hasExecuting = event.toolCalls.some(
26749
- (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26774
+ (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26750
26775
  );
26751
26776
  if (hasExecuting) {
26752
26777
  setLastToolOutputTime(Date.now());
@@ -26755,7 +26780,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26755
26780
  const prevCalls = prev[event.schedulerId] ?? [];
26756
26781
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26757
26782
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26758
- (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26783
+ (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26759
26784
  );
26760
26785
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26761
26786
  return prev;
@@ -26767,9 +26792,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26767
26792
  };
26768
26793
  });
26769
26794
  };
26770
- messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26795
+ messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26771
26796
  return () => {
26772
- messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26797
+ messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26773
26798
  };
26774
26799
  }, [messageBus, internalAdaptToolCalls]);
26775
26800
  (0, import_react98.useEffect)(() => {
@@ -26791,9 +26816,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26791
26816
  };
26792
26817
  });
26793
26818
  };
26794
- messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26819
+ messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26795
26820
  return () => {
26796
- messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26821
+ messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26797
26822
  };
26798
26823
  }, [messageBus]);
26799
26824
  const schedule = (0, import_react98.useCallback)(
@@ -26892,8 +26917,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26892
26917
  const prev = prevMap.get(coreCall.request.callId);
26893
26918
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26894
26919
  let status = coreCall.status;
26895
- if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26896
- status = "executing" /* Executing */;
26920
+ if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26921
+ status = CoreToolCallStatus.Executing;
26897
26922
  }
26898
26923
  return {
26899
26924
  ...coreCall,
@@ -26925,7 +26950,7 @@ function getBackgroundedToolInfo(toolCall) {
26925
26950
  };
26926
26951
  }
26927
26952
  function isBackgroundableExecutingToolCall(toolCall) {
26928
- return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26953
+ return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26929
26954
  }
26930
26955
  function showCitations(settings) {
26931
26956
  const enabled = settings.merged.ui.showCitations;
@@ -26935,14 +26960,14 @@ function showCitations(settings) {
26935
26960
  return true;
26936
26961
  }
26937
26962
  function calculateStreamingState(isResponding, toolCalls) {
26938
- if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26963
+ if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26939
26964
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26940
26965
  }
26941
26966
  const isAnyToolActive = toolCalls.some((tc) => {
26942
- if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26967
+ if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26943
26968
  return true;
26944
26969
  }
26945
- if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26970
+ if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26946
26971
  return !tc.responseSubmittedToGemini;
26947
26972
  }
26948
26973
  return false;
@@ -26988,9 +27013,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26988
27013
  }
26989
27014
  setRetryStatus(payload);
26990
27015
  };
26991
- coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27016
+ coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
26992
27017
  return () => {
26993
- coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27018
+ coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
26994
27019
  };
26995
27020
  }, [isRespondingRef]);
26996
27021
  const [
@@ -27123,12 +27148,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27123
27148
  const tc = toolCalls[i];
27124
27149
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27125
27150
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27126
- const isAgent = tc.tool?.kind === "agent" /* Agent */;
27151
+ const isAgent = tc.tool?.kind === Kind.Agent;
27127
27152
  if (isAgent) {
27128
27153
  let contigAgentsComplete = true;
27129
27154
  for (let j = i + 1; j < toolCalls.length; j++) {
27130
27155
  const nextTc = toolCalls[j];
27131
- if (nextTc.tool?.kind === "agent" /* Agent */) {
27156
+ if (nextTc.tool?.kind === Kind.Agent) {
27132
27157
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27133
27158
  contigAgentsComplete = false;
27134
27159
  break;
@@ -27154,7 +27179,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27154
27179
  let currentGroup = [];
27155
27180
  for (const tc of toolsToPush) {
27156
27181
  newPushed.add(tc.request.callId);
27157
- if (tc.tool?.kind === "agent" /* Agent */) {
27182
+ if (tc.tool?.kind === Kind.Agent) {
27158
27183
  currentGroup.push(tc);
27159
27184
  } else {
27160
27185
  if (currentGroup.length > 0) {
@@ -27304,7 +27329,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27304
27329
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27305
27330
  }, [activeShellPtyId, addItem, setIsResponding]);
27306
27331
  (0, import_react99.useEffect)(() => {
27307
- if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27332
+ if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27308
27333
  const lastUserMessageIndex = history.findLastIndex(
27309
27334
  (item) => item.type === "user" /* USER */
27310
27335
  );
@@ -27372,7 +27397,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27372
27397
  return;
27373
27398
  }
27374
27399
  const hasActiveTools = toolCalls.some(
27375
- (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27400
+ (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27376
27401
  );
27377
27402
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27378
27403
  if (clearBuffer) {
@@ -27399,7 +27424,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27399
27424
  if (tool.name === SHELL_COMMAND_NAME) {
27400
27425
  return {
27401
27426
  ...tool,
27402
- status: "cancelled" /* Cancelled */,
27427
+ status: CoreToolCallStatus.Cancelled,
27403
27428
  resultDisplay: tool.resultDisplay
27404
27429
  };
27405
27430
  }
@@ -27464,7 +27489,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27464
27489
  let localQueryToSendToGemini = null;
27465
27490
  if (typeof query === "string") {
27466
27491
  const trimmedQuery = query.trim();
27467
- await logger?.logMessage("user" /* USER */, trimmedQuery);
27492
+ await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27468
27493
  if (!shellModeActive) {
27469
27494
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27470
27495
  if (slashCommandResult) {
@@ -27620,7 +27645,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27620
27645
  if (pendingHistoryItemRef.current) {
27621
27646
  if (pendingHistoryItemRef.current.type === "tool_group") {
27622
27647
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27623
- (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27648
+ (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27624
27649
  );
27625
27650
  const pendingItem = {
27626
27651
  ...pendingHistoryItemRef.current,
@@ -27866,15 +27891,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27866
27891
  let geminiMessageBuffer = "";
27867
27892
  const toolCallRequests = [];
27868
27893
  for await (const event of stream) {
27869
- if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27894
+ if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27870
27895
  setThought(null);
27871
27896
  }
27872
27897
  switch (event.type) {
27873
- case "thought" /* Thought */:
27898
+ case GeminiEventType.Thought:
27874
27899
  setLastGeminiActivityTime(Date.now());
27875
27900
  handleThoughtEvent(event.value, userMessageTimestamp);
27876
27901
  break;
27877
- case "content" /* Content */:
27902
+ case GeminiEventType.Content:
27878
27903
  setLastGeminiActivityTime(Date.now());
27879
27904
  geminiMessageBuffer = handleContentEvent(
27880
27905
  event.value,
@@ -27882,16 +27907,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27882
27907
  userMessageTimestamp
27883
27908
  );
27884
27909
  break;
27885
- case "tool_call_request" /* ToolCallRequest */:
27910
+ case GeminiEventType.ToolCallRequest:
27886
27911
  toolCallRequests.push(event.value);
27887
27912
  break;
27888
- case "user_cancelled" /* UserCancelled */:
27913
+ case GeminiEventType.UserCancelled:
27889
27914
  handleUserCancelledEvent(userMessageTimestamp);
27890
27915
  break;
27891
- case "error" /* Error */:
27916
+ case GeminiEventType.Error:
27892
27917
  handleErrorEvent(event.value, userMessageTimestamp);
27893
27918
  break;
27894
- case "agent_execution_stopped" /* AgentExecutionStopped */:
27919
+ case GeminiEventType.AgentExecutionStopped:
27895
27920
  handleAgentExecutionStoppedEvent(
27896
27921
  event.value.reason,
27897
27922
  userMessageTimestamp,
@@ -27899,7 +27924,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27899
27924
  event.value.contextCleared
27900
27925
  );
27901
27926
  break;
27902
- case "agent_execution_blocked" /* AgentExecutionBlocked */:
27927
+ case GeminiEventType.AgentExecutionBlocked:
27903
27928
  handleAgentExecutionBlockedEvent(
27904
27929
  event.value.reason,
27905
27930
  userMessageTimestamp,
@@ -27907,35 +27932,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27907
27932
  event.value.contextCleared
27908
27933
  );
27909
27934
  break;
27910
- case "chat_compressed" /* ChatCompressed */:
27935
+ case GeminiEventType.ChatCompressed:
27911
27936
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27912
27937
  break;
27913
- case "tool_call_confirmation" /* ToolCallConfirmation */:
27914
- case "tool_call_response" /* ToolCallResponse */:
27938
+ case GeminiEventType.ToolCallConfirmation:
27939
+ case GeminiEventType.ToolCallResponse:
27915
27940
  break;
27916
- case "max_session_turns" /* MaxSessionTurns */:
27941
+ case GeminiEventType.MaxSessionTurns:
27917
27942
  handleMaxSessionTurnsEvent();
27918
27943
  break;
27919
- case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27944
+ case GeminiEventType.ContextWindowWillOverflow:
27920
27945
  handleContextWindowWillOverflowEvent(
27921
27946
  event.value.estimatedRequestTokenCount,
27922
27947
  event.value.remainingTokenCount
27923
27948
  );
27924
27949
  break;
27925
- case "finished" /* Finished */:
27950
+ case GeminiEventType.Finished:
27926
27951
  handleFinishedEvent(event, userMessageTimestamp);
27927
27952
  break;
27928
- case "citation" /* Citation */:
27953
+ case GeminiEventType.Citation:
27929
27954
  handleCitationEvent(event.value, userMessageTimestamp);
27930
27955
  break;
27931
- case "model_info" /* ModelInfo */:
27956
+ case GeminiEventType.ModelInfo:
27932
27957
  handleChatModelEvent(event.value, userMessageTimestamp);
27933
27958
  break;
27934
- case "loop_detected" /* LoopDetected */:
27959
+ case GeminiEventType.LoopDetected:
27935
27960
  loopDetectedRef.current = true;
27936
27961
  break;
27937
- case "retry" /* Retry */:
27938
- case "invalid_stream" /* InvalidStream */:
27962
+ case GeminiEventType.Retry:
27963
+ case GeminiEventType.InvalidStream:
27939
27964
  break;
27940
27965
  default: {
27941
27966
  const unreachable = event;
@@ -27976,7 +28001,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27976
28001
  const submitQuery = (0, import_react99.useCallback)(
27977
28002
  async (query, options, prompt_id) => runInDevTraceSpan(
27978
28003
  {
27979
- operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
28004
+ operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
27980
28005
  sessionId: config.getSessionId()
27981
28006
  },
27982
28007
  async ({ metadata: spanMetadata }) => {
@@ -28136,7 +28161,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28136
28161
  );
28137
28162
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28138
28163
  async (newApprovalMode) => {
28139
- if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28164
+ if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28140
28165
  if (geminiClient) {
28141
28166
  try {
28142
28167
  await geminiClient.addHistory({
@@ -28159,11 +28184,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28159
28184
  }
28160
28185
  }
28161
28186
  previousApprovalModeRef.current = newApprovalMode;
28162
- if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28187
+ if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28163
28188
  let awaitingApprovalCalls = toolCalls.filter(
28164
28189
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28165
28190
  );
28166
- if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28191
+ if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28167
28192
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28168
28193
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28169
28194
  return true;
@@ -28179,11 +28204,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28179
28204
  if (call.correlationId) {
28180
28205
  try {
28181
28206
  await config.getMessageBus().publish({
28182
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28207
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28183
28208
  correlationId: call.correlationId,
28184
28209
  confirmed: true,
28185
28210
  requiresUserConfirmation: false,
28186
- outcome: "proceed_once" /* ProceedOnce */
28211
+ outcome: ToolConfirmationOutcome.ProceedOnce
28187
28212
  });
28188
28213
  } catch (error) {
28189
28214
  debugLogger.warn(
@@ -28252,14 +28277,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28252
28277
  );
28253
28278
  if (isLowErrorVerbosity) {
28254
28279
  suppressedToolErrorCountRef.current += geminiTools.filter(
28255
- (tc) => tc.status === "error" /* Error */
28280
+ (tc) => tc.status === CoreToolCallStatus.Error
28256
28281
  ).length;
28257
28282
  }
28258
28283
  if (geminiTools.length === 0) {
28259
28284
  return;
28260
28285
  }
28261
28286
  const stopExecutionTool = geminiTools.find(
28262
- (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28287
+ (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28263
28288
  );
28264
28289
  if (stopExecutionTool && stopExecutionTool.response.error) {
28265
28290
  maybeAddSuppressedToolErrorNote();
@@ -28279,9 +28304,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28279
28304
  (tc) => !isTopicTool2(tc.request.name)
28280
28305
  );
28281
28306
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28282
- (tc) => tc.status === "cancelled" /* Cancelled */
28307
+ (tc) => tc.status === CoreToolCallStatus.Cancelled
28283
28308
  );
28284
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28309
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28285
28310
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28286
28311
  if (!turnCancelledRef.current) {
28287
28312
  addItem({
@@ -28361,7 +28386,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28361
28386
  return;
28362
28387
  }
28363
28388
  const restorableToolCalls = toolCalls.filter(
28364
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28389
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28365
28390
  );
28366
28391
  if (restorableToolCalls.length > 0) {
28367
28392
  if (!gitService) {
@@ -28584,14 +28609,14 @@ var useAgentStream = ({
28584
28609
  const displayName = legacyState?.displayName ?? event.name;
28585
28610
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28586
28611
  const desc = legacyState?.description ?? "";
28587
- const fallbackKind = "other" /* Other */;
28612
+ const fallbackKind = Kind.Other;
28588
28613
  const newCall = {
28589
28614
  callId: event.requestId,
28590
28615
  name: displayName,
28591
28616
  originalRequestName: event.name,
28592
28617
  description: desc,
28593
28618
  display: event.display,
28594
- status: "scheduled" /* Scheduled */,
28619
+ status: CoreToolCallStatus.Scheduled,
28595
28620
  isClientInitiated: false,
28596
28621
  renderOutputAsMarkdown: isOutputMarkdown,
28597
28622
  kind: legacyState?.kind ?? fallbackKind,
@@ -28609,10 +28634,10 @@ var useAgentStream = ({
28609
28634
  const evtStatus = legacyState?.status;
28610
28635
  let status = tc.status;
28611
28636
  if (evtStatus === "executing")
28612
- status = "executing" /* Executing */;
28613
- else if (evtStatus === "error") status = "error" /* Error */;
28637
+ status = CoreToolCallStatus.Executing;
28638
+ else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28614
28639
  else if (evtStatus === "success")
28615
- status = "success" /* Success */;
28640
+ status = CoreToolCallStatus.Success;
28616
28641
  const display = event.display?.result;
28617
28642
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28618
28643
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28645,7 +28670,7 @@ var useAgentStream = ({
28645
28670
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28646
28671
  return {
28647
28672
  ...tc,
28648
- status: event.isError ? "error" /* Error */ : "success" /* Success */,
28673
+ status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28649
28674
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28650
28675
  resultDisplay,
28651
28676
  outputFile
@@ -28711,7 +28736,7 @@ var useAgentStream = ({
28711
28736
  if (!options?.isContinuation) {
28712
28737
  if (typeof query === "string") {
28713
28738
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28714
- void logger?.logMessage("user" /* USER */, query);
28739
+ void logger?.logMessage(MessageSenderType.USER, query);
28715
28740
  }
28716
28741
  startNewPrompt();
28717
28742
  }
@@ -30238,9 +30263,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30238
30263
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30239
30264
  async (choice) => {
30240
30265
  const trustLevelMap = {
30241
- ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30242
- ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30243
- ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30266
+ ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30267
+ ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30268
+ ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30244
30269
  };
30245
30270
  const trustLevel = trustLevelMap[choice];
30246
30271
  if (!trustLevel) return;
@@ -30259,7 +30284,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30259
30284
  }, 100);
30260
30285
  return;
30261
30286
  }
30262
- const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30287
+ const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30263
30288
  onTrustChange(currentIsTrusted);
30264
30289
  setIsTrusted(currentIsTrusted);
30265
30290
  const wasTrusted = isTrusted ?? false;
@@ -31267,7 +31292,7 @@ function useMessageQueue({
31267
31292
  var import_react107 = __toESM(require_react(), 1);
31268
31293
  function useMcpStatus(config) {
31269
31294
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31270
- () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31295
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31271
31296
  );
31272
31297
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31273
31298
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31280,12 +31305,12 @@ function useMcpStatus(config) {
31280
31305
  setMcpServerCount(manager.getMcpServerCount());
31281
31306
  }
31282
31307
  };
31283
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31308
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31284
31309
  return () => {
31285
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31310
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31286
31311
  };
31287
31312
  }, [config]);
31288
- const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31313
+ const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31289
31314
  return {
31290
31315
  discoveryState,
31291
31316
  mcpServerCount,
@@ -31312,7 +31337,7 @@ function useApprovalModeIndicator({
31312
31337
  (key) => {
31313
31338
  let nextApprovalMode;
31314
31339
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31315
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31340
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31316
31341
  if (addItem) {
31317
31342
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31318
31343
  const adminSettings = config.getRemoteAdminSettings();
@@ -31330,21 +31355,21 @@ function useApprovalModeIndicator({
31330
31355
  }
31331
31356
  return;
31332
31357
  }
31333
- nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31358
+ nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31334
31359
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31335
31360
  const currentMode = config.getApprovalMode();
31336
31361
  switch (currentMode) {
31337
- case "default" /* DEFAULT */:
31338
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31362
+ case ApprovalMode.DEFAULT:
31363
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31339
31364
  break;
31340
- case "autoEdit" /* AUTO_EDIT */:
31341
- nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31365
+ case ApprovalMode.AUTO_EDIT:
31366
+ nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31342
31367
  break;
31343
- case "plan" /* PLAN */:
31344
- nextApprovalMode = "default" /* DEFAULT */;
31368
+ case ApprovalMode.PLAN:
31369
+ nextApprovalMode = ApprovalMode.DEFAULT;
31345
31370
  break;
31346
- case "yolo" /* YOLO */:
31347
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31371
+ case ApprovalMode.YOLO:
31372
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31348
31373
  break;
31349
31374
  default:
31350
31375
  }
@@ -31754,11 +31779,11 @@ var useHookDisplayState = () => {
31754
31779
  removeHook();
31755
31780
  }
31756
31781
  };
31757
- coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31758
- coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31782
+ coreEvents.on(CoreEvent.HookStart, handleHookStart);
31783
+ coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31759
31784
  return () => {
31760
- coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31761
- coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31785
+ coreEvents.off(CoreEvent.HookStart, handleHookStart);
31786
+ coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31762
31787
  activeTimeouts.forEach(clearTimeout);
31763
31788
  activeTimeouts.clear();
31764
31789
  };
@@ -32597,7 +32622,7 @@ var AppContainer = (props) => {
32597
32622
  setConfigInitialized(true);
32598
32623
  startupProfiler.flush(config);
32599
32624
  startAutoMemoryIfEnabled(config);
32600
- const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32625
+ const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32601
32626
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32602
32627
  if (result) {
32603
32628
  const additionalContext = result.getAdditionalContext();
@@ -32624,7 +32649,7 @@ var AppContainer = (props) => {
32624
32649
  );
32625
32650
  const ideClient = await IdeClient.getInstance();
32626
32651
  await ideClient.disconnect();
32627
- await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32652
+ await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32628
32653
  };
32629
32654
  registerCleanup(cleanupFn);
32630
32655
  return () => {
@@ -32649,11 +32674,11 @@ var AppContainer = (props) => {
32649
32674
  resetTime: payload.resetTime
32650
32675
  });
32651
32676
  };
32652
- coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32653
- coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32677
+ coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32678
+ coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32654
32679
  return () => {
32655
- coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32656
- coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32680
+ coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32681
+ coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32657
32682
  };
32658
32683
  }, [config]);
32659
32684
  (0, import_react121.useEffect)(() => {
@@ -32666,16 +32691,16 @@ var AppContainer = (props) => {
32666
32691
  const handleAgentsDiscovered = (payload) => {
32667
32692
  setNewAgents(payload.agents);
32668
32693
  };
32669
- coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32670
- coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32671
- coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32694
+ coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32695
+ coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32696
+ coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32672
32697
  return () => {
32673
- coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32698
+ coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32674
32699
  coreEvents.off(
32675
- "admin-settings-changed" /* AdminSettingsChanged */,
32700
+ CoreEvent.AdminSettingsChanged,
32676
32701
  handleAdminSettingsChanged
32677
32702
  );
32678
- coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32703
+ coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32679
32704
  };
32680
32705
  }, [settings]);
32681
32706
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32740,11 +32765,11 @@ var AppContainer = (props) => {
32740
32765
  exitEditorDialog
32741
32766
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32742
32767
  (0, import_react121.useEffect)(() => {
32743
- coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32744
- coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32768
+ coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32769
+ coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32745
32770
  return () => {
32746
- coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32747
- coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32771
+ coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32772
+ coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32748
32773
  };
32749
32774
  }, [handleEditorClose, openEditorDialog]);
32750
32775
  (0, import_react121.useEffect)(() => {
@@ -32812,7 +32837,7 @@ var AppContainer = (props) => {
32812
32837
  errorVerbosity: settings.merged.ui.errorVerbosity
32813
32838
  });
32814
32839
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32815
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32840
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32816
32841
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32817
32842
  const { loadHistoryForResume, isResuming } = useSessionResume({
32818
32843
  config,
@@ -32840,7 +32865,7 @@ var AppContainer = (props) => {
32840
32865
  async (authType, scope) => {
32841
32866
  if (authType) {
32842
32867
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32843
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32868
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32844
32869
  setAuthContext({ requiresRestart: true });
32845
32870
  } else {
32846
32871
  setAuthContext({});
@@ -32868,7 +32893,7 @@ var AppContainer = (props) => {
32868
32893
  );
32869
32894
  return;
32870
32895
  }
32871
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32896
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32872
32897
  writeToStdout(`
32873
32898
  ----------------------------------------------------------------
32874
32899
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32891,7 +32916,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32891
32916
  }
32892
32917
  await saveApiKey(apiKey);
32893
32918
  await reloadApiKey();
32894
- await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32919
+ await config.refreshAuth(AuthType.USE_GEMINI);
32895
32920
  setAuthState("authenticated" /* Authenticated */);
32896
32921
  } catch (e) {
32897
32922
  onAuthError(
@@ -32916,7 +32941,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32916
32941
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32917
32942
  );
32918
32943
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32919
- if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32944
+ if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32920
32945
  return;
32921
32946
  }
32922
32947
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33052,9 +33077,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33052
33077
  }
33053
33078
  });
33054
33079
  };
33055
- coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33080
+ coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33056
33081
  return () => {
33057
- coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33082
+ coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33058
33083
  };
33059
33084
  }, []);
33060
33085
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33712,7 +33737,7 @@ ${queuedText}` : queuedText;
33712
33737
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33713
33738
  if (settings.merged.general.devtools) {
33714
33739
  void (async () => {
33715
- const { toggleDevToolsPanel } = await import("./devtoolsService-E62WA3CY.js");
33740
+ const { toggleDevToolsPanel } = await import("./devtoolsService-Z2YXVMYF.js");
33716
33741
  await toggleDevToolsPanel(
33717
33742
  config,
33718
33743
  showErrorDetails,
@@ -33930,17 +33955,17 @@ ${queuedText}` : queuedText;
33930
33955
  Date.now()
33931
33956
  );
33932
33957
  };
33933
- coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33934
- coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33958
+ coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33959
+ coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33935
33960
  coreEvents.drainBacklogs();
33936
33961
  return () => {
33937
- coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33938
- coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33962
+ coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33963
+ coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33939
33964
  };
33940
33965
  }, [historyManager]);
33941
33966
  const nightly = props.version.includes("nightly");
33942
33967
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
33943
- 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;
33968
+ const loginRestartMessage = settings.merged.security.auth.selectedType === AuthType.USE_VERTEX_AI ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
33944
33969
  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;
33945
33970
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
33946
33971
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34040,9 +34065,9 @@ ${queuedText}` : queuedText;
34040
34065
  const handleMemoryChanged = (result) => {
34041
34066
  setGeminiMdFileCount(result.fileCount);
34042
34067
  };
34043
- coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34068
+ coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34044
34069
  return () => {
34045
- coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34070
+ coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34046
34071
  };
34047
34072
  }, []);
34048
34073
  (0, import_react121.useEffect)(() => {