@google/gemini-cli 0.45.0 → 0.45.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-2ARYG3KE.js → chunk-3TMWYG7A.js} +1 -1
  2. package/bundle/{chunk-53SRWMUU.js → chunk-4ISYEWVQ.js} +1 -1
  3. package/bundle/{chunk-6T7N6JF2.js → chunk-6HYYI5PZ.js} +155 -49
  4. package/bundle/{chunk-VL3FKVC7.js → chunk-7U7BOSLX.js} +3 -3
  5. package/bundle/{chunk-YI3KORH5.js → chunk-AFS5F2VL.js} +2 -2
  6. package/bundle/{chunk-K6WTIGVC.js → chunk-AJTJWT5R.js} +2 -2
  7. package/bundle/{chunk-EORX7LYI.js → chunk-BMS36MLD.js} +1 -1
  8. package/bundle/{chunk-SG46YSQ3.js → chunk-BRQZ5N67.js} +7 -7
  9. package/bundle/{chunk-3TWZMAJU.js → chunk-CGB6VOFW.js} +3 -3
  10. package/bundle/{chunk-Z5F25543.js → chunk-CXWB6LIZ.js} +1 -1
  11. package/bundle/{chunk-TWSSMLUS.js → chunk-EN62YYKQ.js} +1 -1
  12. package/bundle/{chunk-HFVEWB6N.js → chunk-FAMDZ3OS.js} +1 -1
  13. package/bundle/{chunk-XV2YFH7B.js → chunk-FFUBQCSE.js} +7654 -14056
  14. package/bundle/chunk-GIZG2CGQ.js +394545 -0
  15. package/bundle/{chunk-THZMPVCN.js → chunk-JKX72O3X.js} +1 -1
  16. package/bundle/{chunk-PNU4GACG.js → chunk-JTXGVKX5.js} +2 -2
  17. package/bundle/{chunk-4EBMYFID.js → chunk-NXVUP5BP.js} +67 -54
  18. package/bundle/chunk-OFSAI2ND.js +398 -0
  19. package/bundle/{chunk-EUYIPFPA.js → chunk-OJ7TLNJC.js} +1 -1
  20. package/bundle/{chunk-4KOU3QNT.js → chunk-QCGIKZK5.js} +8 -5
  21. package/bundle/{chunk-PXEK5ENZ.js → chunk-QDW2YJ2D.js} +9 -8
  22. package/bundle/chunk-S3TA2KSA.js +81685 -0
  23. package/bundle/{chunk-IL7J46PP.js → chunk-T3BZEZLU.js} +3 -3
  24. package/bundle/{chunk-KSNTXH4E.js → chunk-THHB2S2R.js} +7 -7
  25. package/bundle/{chunk-GVEZJIV3.js → chunk-TTFMSSFY.js} +1 -1
  26. package/bundle/chunk-VJA5NYRM.js +17320 -0
  27. package/bundle/{chunk-N6QPQL7E.js → chunk-VXAIUB7K.js} +181 -48
  28. package/bundle/chunk-W53HJSSZ.js +154 -0
  29. package/bundle/{chunk-JLFE3KRS.js → chunk-X5XPILBU.js} +1 -1
  30. package/bundle/chunk-XLA3MMYB.js +512 -0
  31. package/bundle/chunk-Y7YEJIFD.js +118 -0
  32. package/bundle/chunk-ZSZHQ7QN.js +1571 -0
  33. package/bundle/{cleanup-3SMSXJJA.js → cleanup-6QT55YQX.js} +2 -2
  34. package/bundle/{cleanup-FNQ3LEWG.js → cleanup-ASNHXVN2.js} +2 -2
  35. package/bundle/{cleanup-I56KHTTC.js → cleanup-SZ4DUWDJ.js} +2 -2
  36. package/bundle/cleanup-UWYNKBAK.js +32 -0
  37. package/bundle/{core-KGXBOJTX.js → core-FN764RWM.js} +7 -1
  38. package/bundle/{devtoolsService-EW3B2Y63.js → devtoolsService-5GK2JZD4.js} +2 -2
  39. package/bundle/{devtoolsService-F7PHNBEQ.js → devtoolsService-AWH6SSZC.js} +4 -3
  40. package/bundle/{devtoolsService-VFEFRDYG.js → devtoolsService-HS6NZVWU.js} +2 -2
  41. package/bundle/devtoolsService-VDTVF5OM.js +856 -0
  42. package/bundle/{dist-2G5KTD32.js → dist-CVH2R6ZI.js} +7 -1
  43. package/bundle/{core-AQUUQTX2.js → dist-LKE6MKVW.js} +7 -1
  44. package/bundle/dist-VK25J7B7.js +2140 -0
  45. package/bundle/docs/reference/configuration.md +71 -0
  46. package/bundle/{gemini-JMMBFICD.js → gemini-2CSQYYM7.js} +17 -14
  47. package/bundle/{gemini-4KS2EZX6.js → gemini-UUAZKUMD.js} +216 -197
  48. package/bundle/{gemini-ORQHD633.js → gemini-UZPU2BDT.js} +17 -14
  49. package/bundle/gemini-V3OTI3NY.js +16409 -0
  50. package/bundle/gemini.js +7 -7
  51. package/bundle/{interactiveCli-XUZZOZXX.js → interactiveCli-3LDUDMZL.js} +17 -11
  52. package/bundle/{interactiveCli-ESB66RW7.js → interactiveCli-JBILZ4Z2.js} +323 -298
  53. package/bundle/interactiveCli-QUFKABYB.js +34732 -0
  54. package/bundle/{interactiveCli-ZJXV4DW7.js → interactiveCli-TRAAWA7S.js} +17 -11
  55. package/bundle/{liteRtServerManager-HELKQKOZ.js → liteRtServerManager-4LZDDC3B.js} +4 -4
  56. package/bundle/{liteRtServerManager-RNNHEQJI.js → liteRtServerManager-BONHUK6G.js} +4 -4
  57. package/bundle/{liteRtServerManager-DORIWEMR.js → liteRtServerManager-GNA7BP24.js} +4 -4
  58. package/bundle/liteRtServerManager-ILOJICS6.js +65 -0
  59. package/bundle/{oauth2-provider-2IJNOFOO.js → oauth2-provider-FBCFQYBU.js} +1 -1
  60. package/bundle/{oauth2-provider-YYLBPESU.js → oauth2-provider-LYKMC2R6.js} +38 -72
  61. package/bundle/{oauth2-provider-7N4OFPTL.js → oauth2-provider-P4WHK2SH.js} +1 -1
  62. package/bundle/oauth2-provider-WLJL6V4W.js +235 -0
  63. package/bundle/{start-IGG6LDST.js → start-45UFBKOY.js} +6 -6
  64. package/bundle/{start-R7DTCFCN.js → start-PCZ7YDTR.js} +6 -6
  65. package/bundle/{start-66KF6MVV.js → start-VVVRWNSH.js} +6 -6
  66. package/bundle/start-XMLICH3K.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-4EBMYFID.js";
158
+ } from "./chunk-S3TA2KSA.js";
159
159
  import {
160
160
  appEvents
161
161
  } from "./chunk-5PS3AYFU.js";
162
162
  import {
163
163
  require_source
164
- } from "./chunk-JLFE3KRS.js";
164
+ } from "./chunk-TTFMSSFY.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-4KOU3QNT.js";
214
+ } from "./chunk-QCGIKZK5.js";
215
215
  import {
216
216
  handleAutoUpdate,
217
217
  isDevelopment,
218
218
  relaunchApp,
219
219
  setUpdateHandler
220
- } from "./chunk-PNU4GACG.js";
220
+ } from "./chunk-OFSAI2ND.js";
221
221
  import {
222
222
  isTodoList,
223
223
  mapCoreStatusToDisplayStatus,
224
224
  require_react
225
- } from "./chunk-PXEK5ENZ.js";
225
+ } from "./chunk-CXWB6LIZ.js";
226
226
  import {
227
227
  registerCleanup,
228
228
  removeCleanup,
229
229
  runExitCleanup,
230
230
  setupTtyCheck
231
- } from "./chunk-THZMPVCN.js";
231
+ } from "./chunk-W53HJSSZ.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-XV2YFH7B.js";
432
+ } from "./chunk-FFUBQCSE.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
  }
@@ -15422,11 +15441,11 @@ var PrivacyNoticeText = ({
15422
15441
  }) => {
15423
15442
  const authType = config.getContentGeneratorConfig()?.authType;
15424
15443
  switch (authType) {
15425
- case "gemini-api-key" /* USE_GEMINI */:
15444
+ case AuthType.USE_GEMINI:
15426
15445
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
15427
- case "vertex-ai" /* USE_VERTEX_AI */:
15446
+ case AuthType.USE_VERTEX_AI:
15428
15447
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
15429
- case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15448
+ case AuthType.LOGIN_WITH_GOOGLE:
15430
15449
  default:
15431
15450
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
15432
15451
  }
@@ -15467,7 +15486,7 @@ function ProQuotaDialog({
15467
15486
  value: "retry_always",
15468
15487
  key: "retry_always"
15469
15488
  },
15470
- ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15489
+ ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15471
15490
  {
15472
15491
  label: "Upgrade for higher limits",
15473
15492
  value: "upgrade",
@@ -16624,8 +16643,9 @@ function ModelDialog({ onClose }) {
16624
16643
  const preferredModel = config?.getModel() || GEMINI_MODEL_ALIAS_AUTO;
16625
16644
  const shouldShowPreviewModels = config?.getHasAccessToPreviewModel() ?? false;
16626
16645
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
16646
+ const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
16627
16647
  const selectedAuthType = settings.merged.security.auth.selectedType;
16628
- const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16648
+ const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16629
16649
  const manualModelSelected = (0, import_react55.useMemo)(() => {
16630
16650
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16631
16651
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -16668,6 +16688,7 @@ function ModelDialog({ onClose }) {
16668
16688
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16669
16689
  const allOptions = config.getModelConfigService().getAvailableModelOptions({
16670
16690
  useGemini3_1: useGemini31,
16691
+ useGemini3_5Flash,
16671
16692
  useCustomTools: useCustomToolModel,
16672
16693
  hasAccessToPreview: shouldShowPreviewModels,
16673
16694
  hasAccessToProModel
@@ -16692,7 +16713,8 @@ function ModelDialog({ onClose }) {
16692
16713
  title: getDisplayString(GEMINI_MODEL_ALIAS_AUTO),
16693
16714
  description: getAutoModelDescription(
16694
16715
  shouldShowPreviewModels,
16695
- useGemini31
16716
+ useGemini31,
16717
+ useGemini3_5Flash
16696
16718
  ),
16697
16719
  key: GEMINI_MODEL_ALIAS_AUTO
16698
16720
  },
@@ -16709,6 +16731,7 @@ function ModelDialog({ onClose }) {
16709
16731
  shouldShowPreviewModels,
16710
16732
  manualModelSelected,
16711
16733
  useGemini31,
16734
+ useGemini3_5Flash,
16712
16735
  useCustomToolModel,
16713
16736
  hasAccessToProModel
16714
16737
  ]);
@@ -16716,6 +16739,7 @@ function ModelDialog({ onClose }) {
16716
16739
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16717
16740
  const allOptions = config.getModelConfigService().getAvailableModelOptions({
16718
16741
  useGemini3_1: useGemini31,
16742
+ useGemini3_5Flash,
16719
16743
  useCustomTools: useCustomToolModel,
16720
16744
  hasAccessToPreview: shouldShowPreviewModels,
16721
16745
  hasAccessToProModel
@@ -16789,6 +16813,7 @@ function ModelDialog({ onClose }) {
16789
16813
  }, [
16790
16814
  shouldShowPreviewModels,
16791
16815
  useGemini31,
16816
+ useGemini3_5Flash,
16792
16817
  useCustomToolModel,
16793
16818
  hasAccessToProModel,
16794
16819
  config
@@ -17943,10 +17968,10 @@ function initializeConsoleStore() {
17943
17968
  globalConsoleMessages = [];
17944
17969
  globalErrorCount = 0;
17945
17970
  notifyListeners();
17946
- coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
17947
- coreEvents.off("output" /* Output */, handleOutput);
17948
- coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
17949
- coreEvents.on("output" /* Output */, handleOutput);
17971
+ coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
17972
+ coreEvents.off(CoreEvent.Output, handleOutput);
17973
+ coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
17974
+ coreEvents.on(CoreEvent.Output, handleOutput);
17950
17975
  }
17951
17976
  function notifyListeners() {
17952
17977
  for (const listener of listeners) {
@@ -20083,7 +20108,7 @@ function usePromptCompletion({
20083
20108
  { model: "prompt-completion" },
20084
20109
  contents,
20085
20110
  signal,
20086
- "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20111
+ LlmRole.UTILITY_AUTOCOMPLETE
20087
20112
  );
20088
20113
  if (signal.aborted) {
20089
20114
  return;
@@ -22161,9 +22186,9 @@ var InputPrompt = ({
22161
22186
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22162
22187
  }
22163
22188
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22164
- const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22165
- const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22166
- const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22189
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22190
+ const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22191
+ const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22167
22192
  let statusColor;
22168
22193
  let statusText = "";
22169
22194
  if (shellModeActive) {
@@ -22995,22 +23020,22 @@ var ApprovalModeIndicator = ({
22995
23020
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
22996
23021
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
22997
23022
  switch (approvalMode) {
22998
- case "autoEdit" /* AUTO_EDIT */:
23023
+ case ApprovalMode.AUTO_EDIT:
22999
23024
  textColor = theme.status.warning;
23000
23025
  textContent = "auto-accept edits";
23001
23026
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23002
23027
  break;
23003
- case "plan" /* PLAN */:
23028
+ case ApprovalMode.PLAN:
23004
23029
  textColor = theme.status.success;
23005
23030
  textContent = "plan";
23006
23031
  subText = `${cycleHint} to manual`;
23007
23032
  break;
23008
- case "yolo" /* YOLO */:
23033
+ case ApprovalMode.YOLO:
23009
23034
  textColor = theme.status.error;
23010
23035
  textContent = "YOLO";
23011
23036
  subText = yoloHint;
23012
23037
  break;
23013
- case "default" /* DEFAULT */:
23038
+ case ApprovalMode.DEFAULT:
23014
23039
  default:
23015
23040
  textColor = theme.text.accent;
23016
23041
  textContent = "";
@@ -23058,7 +23083,7 @@ var useComposerStatus = () => {
23058
23083
  (item) => item.type === "tool_group"
23059
23084
  ).some(
23060
23085
  (item) => item.tools.some(
23061
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23086
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23062
23087
  )
23063
23088
  ),
23064
23089
  [uiState.pendingHistoryItems]
@@ -23073,13 +23098,13 @@ var useComposerStatus = () => {
23073
23098
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23074
23099
  if (hideMinimalModeHintWhileBusy) return null;
23075
23100
  switch (showApprovalModeIndicator) {
23076
- case "yolo" /* YOLO */:
23101
+ case ApprovalMode.YOLO:
23077
23102
  return { text: "YOLO", color: theme.status.error };
23078
- case "plan" /* PLAN */:
23103
+ case ApprovalMode.PLAN:
23079
23104
  return { text: "plan", color: theme.status.success };
23080
- case "autoEdit" /* AUTO_EDIT */:
23105
+ case ApprovalMode.AUTO_EDIT:
23081
23106
  return { text: "auto edit", color: theme.status.warning };
23082
- case "default" /* DEFAULT */:
23107
+ case ApprovalMode.DEFAULT:
23083
23108
  default:
23084
23109
  return null;
23085
23110
  }
@@ -23433,7 +23458,7 @@ var ConfigInitDisplay = ({
23433
23458
  let connected = 0;
23434
23459
  const connecting = [];
23435
23460
  for (const [name, client] of clients.entries()) {
23436
- if (client.getStatus() === "connected" /* CONNECTED */) {
23461
+ if (client.getStatus() === MCPServerStatus.CONNECTED) {
23437
23462
  connected++;
23438
23463
  } else {
23439
23464
  connecting.push(name);
@@ -23455,9 +23480,9 @@ var ConfigInitDisplay = ({
23455
23480
  );
23456
23481
  }
23457
23482
  };
23458
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23483
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23459
23484
  return () => {
23460
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23485
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23461
23486
  };
23462
23487
  }, [initialMessage]);
23463
23488
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
@@ -24174,7 +24199,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24174
24199
  callId,
24175
24200
  name: SHELL_COMMAND_NAME,
24176
24201
  description: rawQuery,
24177
- status: "executing" /* Executing */,
24202
+ status: CoreToolCallStatus.Executing,
24178
24203
  isClientInitiated: true,
24179
24204
  resultDisplay: "",
24180
24205
  confirmationDetails: void 0
@@ -24315,7 +24340,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24315
24340
  mainContent = result.output.trim() || "(Command produced no output)";
24316
24341
  }
24317
24342
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24318
- let finalStatus = "success" /* Success */;
24343
+ let finalStatus = CoreToolCallStatus.Success;
24319
24344
  const prependToAnsiOutput = (output, text) => {
24320
24345
  const newLines = text.split("\n").map((line) => [
24321
24346
  {
@@ -24334,20 +24359,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24334
24359
  };
24335
24360
  let prefix = "";
24336
24361
  if (result.error) {
24337
- finalStatus = "error" /* Error */;
24362
+ finalStatus = CoreToolCallStatus.Error;
24338
24363
  prefix = result.error.message;
24339
24364
  } else if (result.aborted) {
24340
- finalStatus = "cancelled" /* Cancelled */;
24365
+ finalStatus = CoreToolCallStatus.Cancelled;
24341
24366
  prefix = "Command was cancelled.";
24342
24367
  } else if (result.backgrounded) {
24343
- finalStatus = "success" /* Success */;
24368
+ finalStatus = CoreToolCallStatus.Success;
24344
24369
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24345
24370
  mainContent = finalOutput;
24346
24371
  } else if (result.signal) {
24347
- finalStatus = "error" /* Error */;
24372
+ finalStatus = CoreToolCallStatus.Error;
24348
24373
  prefix = `Command terminated by signal: ${result.signal}.`;
24349
24374
  } else if (result.exitCode !== 0) {
24350
- finalStatus = "error" /* Error */;
24375
+ finalStatus = CoreToolCallStatus.Error;
24351
24376
  prefix = `Command exited with code ${result.exitCode}.`;
24352
24377
  }
24353
24378
  if (prefix) {
@@ -24373,7 +24398,7 @@ ${mainContent}`;
24373
24398
  status: finalStatus,
24374
24399
  resultDisplay: finalOutput
24375
24400
  };
24376
- if (finalStatus !== "cancelled" /* Cancelled */) {
24401
+ if (finalStatus !== CoreToolCallStatus.Cancelled) {
24377
24402
  addItemToHistory(
24378
24403
  {
24379
24404
  type: "tool_group",
@@ -25363,7 +25388,7 @@ function useQuotaAndFallback({
25363
25388
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25364
25389
  `/stats model for usage details`,
25365
25390
  `/model to switch models.`,
25366
- contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25391
+ contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25367
25392
  ].filter(Boolean);
25368
25393
  message = messageLines.join("\n");
25369
25394
  } else if (error instanceof ModelNotFoundError) {
@@ -25551,7 +25576,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25551
25576
  );
25552
25577
  setEditorError(null);
25553
25578
  setIsEditorDialogOpen(false);
25554
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25579
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25555
25580
  } catch (error) {
25556
25581
  setEditorError(`Failed to set editor preference: ${error}`);
25557
25582
  }
@@ -25560,7 +25585,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25560
25585
  );
25561
25586
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25562
25587
  setIsEditorDialogOpen(false);
25563
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25588
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25564
25589
  }, []);
25565
25590
  return {
25566
25591
  isEditorDialogOpen,
@@ -25937,7 +25962,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25937
25962
  canonicalPath: resolvedCommandPath
25938
25963
  } = parseSlashCommand(trimmed, commands);
25939
25964
  if (!commandToExecute) {
25940
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
25965
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25941
25966
  if (isMcpLoading) {
25942
25967
  setIsProcessing(true);
25943
25968
  if (addToHistory) {
@@ -26117,7 +26142,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26117
26142
  onConfirm: async (resolvedOutcome) => {
26118
26143
  resolve3({
26119
26144
  outcome: resolvedOutcome,
26120
- approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26145
+ approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26121
26146
  });
26122
26147
  }
26123
26148
  };
@@ -26125,7 +26150,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26125
26150
  callId,
26126
26151
  name: "Expansion",
26127
26152
  description: "Command expansion needs shell access",
26128
- status: "awaiting_approval" /* AwaitingApproval */,
26153
+ status: CoreToolCallStatus.AwaitingApproval,
26129
26154
  isClientInitiated: true,
26130
26155
  resultDisplay: void 0,
26131
26156
  confirmationDetails
@@ -26136,7 +26161,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26136
26161
  });
26137
26162
  });
26138
26163
  setPendingItem(null);
26139
- if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26164
+ if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26140
26165
  addItem(
26141
26166
  {
26142
26167
  type: "info" /* INFO */,
@@ -26146,7 +26171,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26146
26171
  );
26147
26172
  return { type: "handled" };
26148
26173
  }
26149
- if (outcome === "proceed_always" /* ProceedAlways */) {
26174
+ if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26150
26175
  setSessionShellAllowlist(
26151
26176
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26152
26177
  );
@@ -26622,7 +26647,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26622
26647
  let description;
26623
26648
  let renderOutputAsMarkdown = false;
26624
26649
  const displayName = call.tool?.displayName ?? call.request.name;
26625
- if (call.status === "error" /* Error */) {
26650
+ if (call.status === CoreToolCallStatus.Error) {
26626
26651
  description = JSON.stringify(call.request.args);
26627
26652
  } else {
26628
26653
  description = call.invocation.getDescription();
@@ -26645,27 +26670,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26645
26670
  let progress = void 0;
26646
26671
  let progressTotal = void 0;
26647
26672
  switch (call.status) {
26648
- case "success" /* Success */:
26673
+ case CoreToolCallStatus.Success:
26649
26674
  resultDisplay = call.response.resultDisplay;
26650
26675
  outputFile = call.response.outputFile;
26651
26676
  break;
26652
- case "error" /* Error */:
26653
- case "cancelled" /* Cancelled */:
26677
+ case CoreToolCallStatus.Error:
26678
+ case CoreToolCallStatus.Cancelled:
26654
26679
  resultDisplay = call.response.resultDisplay;
26655
26680
  break;
26656
- case "awaiting_approval" /* AwaitingApproval */:
26681
+ case CoreToolCallStatus.AwaitingApproval:
26657
26682
  correlationId = call.correlationId;
26658
26683
  confirmationDetails = call.confirmationDetails;
26659
26684
  break;
26660
- case "executing" /* Executing */:
26685
+ case CoreToolCallStatus.Executing:
26661
26686
  resultDisplay = call.liveOutput;
26662
26687
  ptyId = call.pid;
26663
26688
  progressMessage = call.progressMessage;
26664
26689
  progress = call.progress;
26665
26690
  progressTotal = call.progressTotal;
26666
26691
  break;
26667
- case "scheduled" /* Scheduled */:
26668
- case "validating" /* Validating */:
26692
+ case CoreToolCallStatus.Scheduled:
26693
+ case CoreToolCallStatus.Validating:
26669
26694
  break;
26670
26695
  default: {
26671
26696
  const exhaustiveCheck = call;
@@ -26736,7 +26761,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26736
26761
  const handler = (event) => {
26737
26762
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26738
26763
  const hasExecuting = event.toolCalls.some(
26739
- (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26764
+ (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26740
26765
  );
26741
26766
  if (hasExecuting) {
26742
26767
  setLastToolOutputTime(Date.now());
@@ -26745,7 +26770,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26745
26770
  const prevCalls = prev[event.schedulerId] ?? [];
26746
26771
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26747
26772
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26748
- (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26773
+ (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26749
26774
  );
26750
26775
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26751
26776
  return prev;
@@ -26757,9 +26782,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26757
26782
  };
26758
26783
  });
26759
26784
  };
26760
- messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26785
+ messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26761
26786
  return () => {
26762
- messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26787
+ messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26763
26788
  };
26764
26789
  }, [messageBus, internalAdaptToolCalls]);
26765
26790
  (0, import_react98.useEffect)(() => {
@@ -26781,9 +26806,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26781
26806
  };
26782
26807
  });
26783
26808
  };
26784
- messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26809
+ messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26785
26810
  return () => {
26786
- messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26811
+ messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26787
26812
  };
26788
26813
  }, [messageBus]);
26789
26814
  const schedule = (0, import_react98.useCallback)(
@@ -26882,8 +26907,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26882
26907
  const prev = prevMap.get(coreCall.request.callId);
26883
26908
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26884
26909
  let status = coreCall.status;
26885
- if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26886
- status = "executing" /* Executing */;
26910
+ if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26911
+ status = CoreToolCallStatus.Executing;
26887
26912
  }
26888
26913
  return {
26889
26914
  ...coreCall,
@@ -26915,7 +26940,7 @@ function getBackgroundedToolInfo(toolCall) {
26915
26940
  };
26916
26941
  }
26917
26942
  function isBackgroundableExecutingToolCall(toolCall) {
26918
- return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26943
+ return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26919
26944
  }
26920
26945
  function showCitations(settings) {
26921
26946
  const enabled = settings.merged.ui.showCitations;
@@ -26925,14 +26950,14 @@ function showCitations(settings) {
26925
26950
  return true;
26926
26951
  }
26927
26952
  function calculateStreamingState(isResponding, toolCalls) {
26928
- if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
26953
+ if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26929
26954
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26930
26955
  }
26931
26956
  const isAnyToolActive = toolCalls.some((tc) => {
26932
- if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
26957
+ if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26933
26958
  return true;
26934
26959
  }
26935
- if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
26960
+ if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26936
26961
  return !tc.responseSubmittedToGemini;
26937
26962
  }
26938
26963
  return false;
@@ -26978,9 +27003,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
26978
27003
  }
26979
27004
  setRetryStatus(payload);
26980
27005
  };
26981
- coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27006
+ coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
26982
27007
  return () => {
26983
- coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27008
+ coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
26984
27009
  };
26985
27010
  }, [isRespondingRef]);
26986
27011
  const [
@@ -27113,12 +27138,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27113
27138
  const tc = toolCalls[i];
27114
27139
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27115
27140
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27116
- const isAgent = tc.tool?.kind === "agent" /* Agent */;
27141
+ const isAgent = tc.tool?.kind === Kind.Agent;
27117
27142
  if (isAgent) {
27118
27143
  let contigAgentsComplete = true;
27119
27144
  for (let j = i + 1; j < toolCalls.length; j++) {
27120
27145
  const nextTc = toolCalls[j];
27121
- if (nextTc.tool?.kind === "agent" /* Agent */) {
27146
+ if (nextTc.tool?.kind === Kind.Agent) {
27122
27147
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27123
27148
  contigAgentsComplete = false;
27124
27149
  break;
@@ -27144,7 +27169,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27144
27169
  let currentGroup = [];
27145
27170
  for (const tc of toolsToPush) {
27146
27171
  newPushed.add(tc.request.callId);
27147
- if (tc.tool?.kind === "agent" /* Agent */) {
27172
+ if (tc.tool?.kind === Kind.Agent) {
27148
27173
  currentGroup.push(tc);
27149
27174
  } else {
27150
27175
  if (currentGroup.length > 0) {
@@ -27294,7 +27319,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27294
27319
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27295
27320
  }, [activeShellPtyId, addItem, setIsResponding]);
27296
27321
  (0, import_react99.useEffect)(() => {
27297
- if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27322
+ if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27298
27323
  const lastUserMessageIndex = history.findLastIndex(
27299
27324
  (item) => item.type === "user" /* USER */
27300
27325
  );
@@ -27362,7 +27387,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27362
27387
  return;
27363
27388
  }
27364
27389
  const hasActiveTools = toolCalls.some(
27365
- (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27390
+ (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27366
27391
  );
27367
27392
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27368
27393
  if (clearBuffer) {
@@ -27389,7 +27414,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27389
27414
  if (tool.name === SHELL_COMMAND_NAME) {
27390
27415
  return {
27391
27416
  ...tool,
27392
- status: "cancelled" /* Cancelled */,
27417
+ status: CoreToolCallStatus.Cancelled,
27393
27418
  resultDisplay: tool.resultDisplay
27394
27419
  };
27395
27420
  }
@@ -27454,7 +27479,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27454
27479
  let localQueryToSendToGemini = null;
27455
27480
  if (typeof query === "string") {
27456
27481
  const trimmedQuery = query.trim();
27457
- await logger?.logMessage("user" /* USER */, trimmedQuery);
27482
+ await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27458
27483
  if (!shellModeActive) {
27459
27484
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27460
27485
  if (slashCommandResult) {
@@ -27610,7 +27635,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27610
27635
  if (pendingHistoryItemRef.current) {
27611
27636
  if (pendingHistoryItemRef.current.type === "tool_group") {
27612
27637
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27613
- (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27638
+ (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27614
27639
  );
27615
27640
  const pendingItem = {
27616
27641
  ...pendingHistoryItemRef.current,
@@ -27856,15 +27881,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27856
27881
  let geminiMessageBuffer = "";
27857
27882
  const toolCallRequests = [];
27858
27883
  for await (const event of stream) {
27859
- if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27884
+ if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27860
27885
  setThought(null);
27861
27886
  }
27862
27887
  switch (event.type) {
27863
- case "thought" /* Thought */:
27888
+ case GeminiEventType.Thought:
27864
27889
  setLastGeminiActivityTime(Date.now());
27865
27890
  handleThoughtEvent(event.value, userMessageTimestamp);
27866
27891
  break;
27867
- case "content" /* Content */:
27892
+ case GeminiEventType.Content:
27868
27893
  setLastGeminiActivityTime(Date.now());
27869
27894
  geminiMessageBuffer = handleContentEvent(
27870
27895
  event.value,
@@ -27872,16 +27897,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27872
27897
  userMessageTimestamp
27873
27898
  );
27874
27899
  break;
27875
- case "tool_call_request" /* ToolCallRequest */:
27900
+ case GeminiEventType.ToolCallRequest:
27876
27901
  toolCallRequests.push(event.value);
27877
27902
  break;
27878
- case "user_cancelled" /* UserCancelled */:
27903
+ case GeminiEventType.UserCancelled:
27879
27904
  handleUserCancelledEvent(userMessageTimestamp);
27880
27905
  break;
27881
- case "error" /* Error */:
27906
+ case GeminiEventType.Error:
27882
27907
  handleErrorEvent(event.value, userMessageTimestamp);
27883
27908
  break;
27884
- case "agent_execution_stopped" /* AgentExecutionStopped */:
27909
+ case GeminiEventType.AgentExecutionStopped:
27885
27910
  handleAgentExecutionStoppedEvent(
27886
27911
  event.value.reason,
27887
27912
  userMessageTimestamp,
@@ -27889,7 +27914,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27889
27914
  event.value.contextCleared
27890
27915
  );
27891
27916
  break;
27892
- case "agent_execution_blocked" /* AgentExecutionBlocked */:
27917
+ case GeminiEventType.AgentExecutionBlocked:
27893
27918
  handleAgentExecutionBlockedEvent(
27894
27919
  event.value.reason,
27895
27920
  userMessageTimestamp,
@@ -27897,35 +27922,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27897
27922
  event.value.contextCleared
27898
27923
  );
27899
27924
  break;
27900
- case "chat_compressed" /* ChatCompressed */:
27925
+ case GeminiEventType.ChatCompressed:
27901
27926
  handleChatCompressionEvent(event.value, userMessageTimestamp);
27902
27927
  break;
27903
- case "tool_call_confirmation" /* ToolCallConfirmation */:
27904
- case "tool_call_response" /* ToolCallResponse */:
27928
+ case GeminiEventType.ToolCallConfirmation:
27929
+ case GeminiEventType.ToolCallResponse:
27905
27930
  break;
27906
- case "max_session_turns" /* MaxSessionTurns */:
27931
+ case GeminiEventType.MaxSessionTurns:
27907
27932
  handleMaxSessionTurnsEvent();
27908
27933
  break;
27909
- case "context_window_will_overflow" /* ContextWindowWillOverflow */:
27934
+ case GeminiEventType.ContextWindowWillOverflow:
27910
27935
  handleContextWindowWillOverflowEvent(
27911
27936
  event.value.estimatedRequestTokenCount,
27912
27937
  event.value.remainingTokenCount
27913
27938
  );
27914
27939
  break;
27915
- case "finished" /* Finished */:
27940
+ case GeminiEventType.Finished:
27916
27941
  handleFinishedEvent(event, userMessageTimestamp);
27917
27942
  break;
27918
- case "citation" /* Citation */:
27943
+ case GeminiEventType.Citation:
27919
27944
  handleCitationEvent(event.value, userMessageTimestamp);
27920
27945
  break;
27921
- case "model_info" /* ModelInfo */:
27946
+ case GeminiEventType.ModelInfo:
27922
27947
  handleChatModelEvent(event.value, userMessageTimestamp);
27923
27948
  break;
27924
- case "loop_detected" /* LoopDetected */:
27949
+ case GeminiEventType.LoopDetected:
27925
27950
  loopDetectedRef.current = true;
27926
27951
  break;
27927
- case "retry" /* Retry */:
27928
- case "invalid_stream" /* InvalidStream */:
27952
+ case GeminiEventType.Retry:
27953
+ case GeminiEventType.InvalidStream:
27929
27954
  break;
27930
27955
  default: {
27931
27956
  const unreachable = event;
@@ -27966,7 +27991,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27966
27991
  const submitQuery = (0, import_react99.useCallback)(
27967
27992
  async (query, options, prompt_id) => runInDevTraceSpan(
27968
27993
  {
27969
- operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
27994
+ operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
27970
27995
  sessionId: config.getSessionId()
27971
27996
  },
27972
27997
  async ({ metadata: spanMetadata }) => {
@@ -28126,7 +28151,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28126
28151
  );
28127
28152
  const handleApprovalModeChange = (0, import_react99.useCallback)(
28128
28153
  async (newApprovalMode) => {
28129
- if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28154
+ if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28130
28155
  if (geminiClient) {
28131
28156
  try {
28132
28157
  await geminiClient.addHistory({
@@ -28149,11 +28174,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28149
28174
  }
28150
28175
  }
28151
28176
  previousApprovalModeRef.current = newApprovalMode;
28152
- if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28177
+ if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28153
28178
  let awaitingApprovalCalls = toolCalls.filter(
28154
28179
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28155
28180
  );
28156
- if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28181
+ if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28157
28182
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28158
28183
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28159
28184
  return true;
@@ -28169,11 +28194,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28169
28194
  if (call.correlationId) {
28170
28195
  try {
28171
28196
  await config.getMessageBus().publish({
28172
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28197
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28173
28198
  correlationId: call.correlationId,
28174
28199
  confirmed: true,
28175
28200
  requiresUserConfirmation: false,
28176
- outcome: "proceed_once" /* ProceedOnce */
28201
+ outcome: ToolConfirmationOutcome.ProceedOnce
28177
28202
  });
28178
28203
  } catch (error) {
28179
28204
  debugLogger.warn(
@@ -28242,14 +28267,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28242
28267
  );
28243
28268
  if (isLowErrorVerbosity) {
28244
28269
  suppressedToolErrorCountRef.current += geminiTools.filter(
28245
- (tc) => tc.status === "error" /* Error */
28270
+ (tc) => tc.status === CoreToolCallStatus.Error
28246
28271
  ).length;
28247
28272
  }
28248
28273
  if (geminiTools.length === 0) {
28249
28274
  return;
28250
28275
  }
28251
28276
  const stopExecutionTool = geminiTools.find(
28252
- (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28277
+ (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28253
28278
  );
28254
28279
  if (stopExecutionTool && stopExecutionTool.response.error) {
28255
28280
  maybeAddSuppressedToolErrorNote();
@@ -28269,9 +28294,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28269
28294
  (tc) => !isTopicTool2(tc.request.name)
28270
28295
  );
28271
28296
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28272
- (tc) => tc.status === "cancelled" /* Cancelled */
28297
+ (tc) => tc.status === CoreToolCallStatus.Cancelled
28273
28298
  );
28274
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28299
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28275
28300
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28276
28301
  if (!turnCancelledRef.current) {
28277
28302
  addItem({
@@ -28351,7 +28376,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28351
28376
  return;
28352
28377
  }
28353
28378
  const restorableToolCalls = toolCalls.filter(
28354
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28379
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28355
28380
  );
28356
28381
  if (restorableToolCalls.length > 0) {
28357
28382
  if (!gitService) {
@@ -28574,14 +28599,14 @@ var useAgentStream = ({
28574
28599
  const displayName = legacyState?.displayName ?? event.name;
28575
28600
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28576
28601
  const desc = legacyState?.description ?? "";
28577
- const fallbackKind = "other" /* Other */;
28602
+ const fallbackKind = Kind.Other;
28578
28603
  const newCall = {
28579
28604
  callId: event.requestId,
28580
28605
  name: displayName,
28581
28606
  originalRequestName: event.name,
28582
28607
  description: desc,
28583
28608
  display: event.display,
28584
- status: "scheduled" /* Scheduled */,
28609
+ status: CoreToolCallStatus.Scheduled,
28585
28610
  isClientInitiated: false,
28586
28611
  renderOutputAsMarkdown: isOutputMarkdown,
28587
28612
  kind: legacyState?.kind ?? fallbackKind,
@@ -28599,10 +28624,10 @@ var useAgentStream = ({
28599
28624
  const evtStatus = legacyState?.status;
28600
28625
  let status = tc.status;
28601
28626
  if (evtStatus === "executing")
28602
- status = "executing" /* Executing */;
28603
- else if (evtStatus === "error") status = "error" /* Error */;
28627
+ status = CoreToolCallStatus.Executing;
28628
+ else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28604
28629
  else if (evtStatus === "success")
28605
- status = "success" /* Success */;
28630
+ status = CoreToolCallStatus.Success;
28606
28631
  const display = event.display?.result;
28607
28632
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28608
28633
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28635,7 +28660,7 @@ var useAgentStream = ({
28635
28660
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28636
28661
  return {
28637
28662
  ...tc,
28638
- status: event.isError ? "error" /* Error */ : "success" /* Success */,
28663
+ status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28639
28664
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28640
28665
  resultDisplay,
28641
28666
  outputFile
@@ -28701,7 +28726,7 @@ var useAgentStream = ({
28701
28726
  if (!options?.isContinuation) {
28702
28727
  if (typeof query === "string") {
28703
28728
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28704
- void logger?.logMessage("user" /* USER */, query);
28729
+ void logger?.logMessage(MessageSenderType.USER, query);
28705
28730
  }
28706
28731
  startNewPrompt();
28707
28732
  }
@@ -30228,9 +30253,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30228
30253
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30229
30254
  async (choice) => {
30230
30255
  const trustLevelMap = {
30231
- ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30232
- ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30233
- ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30256
+ ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30257
+ ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30258
+ ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30234
30259
  };
30235
30260
  const trustLevel = trustLevelMap[choice];
30236
30261
  if (!trustLevel) return;
@@ -30249,7 +30274,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30249
30274
  }, 100);
30250
30275
  return;
30251
30276
  }
30252
- const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30277
+ const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30253
30278
  onTrustChange(currentIsTrusted);
30254
30279
  setIsTrusted(currentIsTrusted);
30255
30280
  const wasTrusted = isTrusted ?? false;
@@ -31257,7 +31282,7 @@ function useMessageQueue({
31257
31282
  var import_react107 = __toESM(require_react(), 1);
31258
31283
  function useMcpStatus(config) {
31259
31284
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31260
- () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31285
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31261
31286
  );
31262
31287
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31263
31288
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31270,12 +31295,12 @@ function useMcpStatus(config) {
31270
31295
  setMcpServerCount(manager.getMcpServerCount());
31271
31296
  }
31272
31297
  };
31273
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31298
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31274
31299
  return () => {
31275
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31300
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31276
31301
  };
31277
31302
  }, [config]);
31278
- const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31303
+ const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31279
31304
  return {
31280
31305
  discoveryState,
31281
31306
  mcpServerCount,
@@ -31302,7 +31327,7 @@ function useApprovalModeIndicator({
31302
31327
  (key) => {
31303
31328
  let nextApprovalMode;
31304
31329
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31305
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31330
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31306
31331
  if (addItem) {
31307
31332
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31308
31333
  const adminSettings = config.getRemoteAdminSettings();
@@ -31320,21 +31345,21 @@ function useApprovalModeIndicator({
31320
31345
  }
31321
31346
  return;
31322
31347
  }
31323
- nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31348
+ nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31324
31349
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31325
31350
  const currentMode = config.getApprovalMode();
31326
31351
  switch (currentMode) {
31327
- case "default" /* DEFAULT */:
31328
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31352
+ case ApprovalMode.DEFAULT:
31353
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31329
31354
  break;
31330
- case "autoEdit" /* AUTO_EDIT */:
31331
- nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31355
+ case ApprovalMode.AUTO_EDIT:
31356
+ nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31332
31357
  break;
31333
- case "plan" /* PLAN */:
31334
- nextApprovalMode = "default" /* DEFAULT */;
31358
+ case ApprovalMode.PLAN:
31359
+ nextApprovalMode = ApprovalMode.DEFAULT;
31335
31360
  break;
31336
- case "yolo" /* YOLO */:
31337
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31361
+ case ApprovalMode.YOLO:
31362
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31338
31363
  break;
31339
31364
  default:
31340
31365
  }
@@ -31744,11 +31769,11 @@ var useHookDisplayState = () => {
31744
31769
  removeHook();
31745
31770
  }
31746
31771
  };
31747
- coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31748
- coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31772
+ coreEvents.on(CoreEvent.HookStart, handleHookStart);
31773
+ coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31749
31774
  return () => {
31750
- coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31751
- coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31775
+ coreEvents.off(CoreEvent.HookStart, handleHookStart);
31776
+ coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31752
31777
  activeTimeouts.forEach(clearTimeout);
31753
31778
  activeTimeouts.clear();
31754
31779
  };
@@ -32587,7 +32612,7 @@ var AppContainer = (props) => {
32587
32612
  setConfigInitialized(true);
32588
32613
  startupProfiler.flush(config);
32589
32614
  startAutoMemoryIfEnabled(config);
32590
- const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32615
+ const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32591
32616
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32592
32617
  if (result) {
32593
32618
  const additionalContext = result.getAdditionalContext();
@@ -32614,7 +32639,7 @@ var AppContainer = (props) => {
32614
32639
  );
32615
32640
  const ideClient = await IdeClient.getInstance();
32616
32641
  await ideClient.disconnect();
32617
- await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32642
+ await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32618
32643
  };
32619
32644
  registerCleanup(cleanupFn);
32620
32645
  return () => {
@@ -32639,11 +32664,11 @@ var AppContainer = (props) => {
32639
32664
  resetTime: payload.resetTime
32640
32665
  });
32641
32666
  };
32642
- coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32643
- coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32667
+ coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32668
+ coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32644
32669
  return () => {
32645
- coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32646
- coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32670
+ coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32671
+ coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32647
32672
  };
32648
32673
  }, [config]);
32649
32674
  (0, import_react121.useEffect)(() => {
@@ -32656,16 +32681,16 @@ var AppContainer = (props) => {
32656
32681
  const handleAgentsDiscovered = (payload) => {
32657
32682
  setNewAgents(payload.agents);
32658
32683
  };
32659
- coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32660
- coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32661
- coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32684
+ coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32685
+ coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32686
+ coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32662
32687
  return () => {
32663
- coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32688
+ coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32664
32689
  coreEvents.off(
32665
- "admin-settings-changed" /* AdminSettingsChanged */,
32690
+ CoreEvent.AdminSettingsChanged,
32666
32691
  handleAdminSettingsChanged
32667
32692
  );
32668
- coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32693
+ coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32669
32694
  };
32670
32695
  }, [settings]);
32671
32696
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32730,11 +32755,11 @@ var AppContainer = (props) => {
32730
32755
  exitEditorDialog
32731
32756
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32732
32757
  (0, import_react121.useEffect)(() => {
32733
- coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32734
- coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32758
+ coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32759
+ coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32735
32760
  return () => {
32736
- coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32737
- coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32761
+ coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32762
+ coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32738
32763
  };
32739
32764
  }, [handleEditorClose, openEditorDialog]);
32740
32765
  (0, import_react121.useEffect)(() => {
@@ -32802,7 +32827,7 @@ var AppContainer = (props) => {
32802
32827
  errorVerbosity: settings.merged.ui.errorVerbosity
32803
32828
  });
32804
32829
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32805
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32830
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32806
32831
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32807
32832
  const { loadHistoryForResume, isResuming } = useSessionResume({
32808
32833
  config,
@@ -32830,7 +32855,7 @@ var AppContainer = (props) => {
32830
32855
  async (authType, scope) => {
32831
32856
  if (authType) {
32832
32857
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32833
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
32858
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32834
32859
  setAuthContext({ requiresRestart: true });
32835
32860
  } else {
32836
32861
  setAuthContext({});
@@ -32858,7 +32883,7 @@ var AppContainer = (props) => {
32858
32883
  );
32859
32884
  return;
32860
32885
  }
32861
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
32886
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
32862
32887
  writeToStdout(`
32863
32888
  ----------------------------------------------------------------
32864
32889
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -32881,7 +32906,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32881
32906
  }
32882
32907
  await saveApiKey(apiKey);
32883
32908
  await reloadApiKey();
32884
- await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
32909
+ await config.refreshAuth(AuthType.USE_GEMINI);
32885
32910
  setAuthState("authenticated" /* Authenticated */);
32886
32911
  } catch (e) {
32887
32912
  onAuthError(
@@ -32906,7 +32931,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
32906
32931
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
32907
32932
  );
32908
32933
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
32909
- if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
32934
+ if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
32910
32935
  return;
32911
32936
  }
32912
32937
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33042,9 +33067,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33042
33067
  }
33043
33068
  });
33044
33069
  };
33045
- coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33070
+ coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33046
33071
  return () => {
33047
- coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33072
+ coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33048
33073
  };
33049
33074
  }, []);
33050
33075
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -33702,7 +33727,7 @@ ${queuedText}` : queuedText;
33702
33727
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33703
33728
  if (settings.merged.general.devtools) {
33704
33729
  void (async () => {
33705
- const { toggleDevToolsPanel } = await import("./devtoolsService-VFEFRDYG.js");
33730
+ const { toggleDevToolsPanel } = await import("./devtoolsService-VDTVF5OM.js");
33706
33731
  await toggleDevToolsPanel(
33707
33732
  config,
33708
33733
  showErrorDetails,
@@ -33920,17 +33945,17 @@ ${queuedText}` : queuedText;
33920
33945
  Date.now()
33921
33946
  );
33922
33947
  };
33923
- coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
33924
- coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33948
+ coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
33949
+ coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33925
33950
  coreEvents.drainBacklogs();
33926
33951
  return () => {
33927
- coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
33928
- coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
33952
+ coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
33953
+ coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
33929
33954
  };
33930
33955
  }, [historyManager]);
33931
33956
  const nightly = props.version.includes("nightly");
33932
33957
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
33933
- 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;
33958
+ 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;
33934
33959
  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;
33935
33960
  const hasPendingToolConfirmation = (0, import_react121.useMemo)(
33936
33961
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34030,9 +34055,9 @@ ${queuedText}` : queuedText;
34030
34055
  const handleMemoryChanged = (result) => {
34031
34056
  setGeminiMdFileCount(result.fileCount);
34032
34057
  };
34033
- coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34058
+ coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34034
34059
  return () => {
34035
- coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34060
+ coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34036
34061
  };
34037
34062
  }, []);
34038
34063
  (0, import_react121.useEffect)(() => {