@google/gemini-cli 0.37.0-preview.2 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/bundle/{chunk-T475D6CB.js → chunk-2LDNSLWJ.js} +4 -4
  2. package/bundle/{chunk-TZN2SS4V.js → chunk-4FL34AF3.js} +3 -3
  3. package/bundle/{chunk-4HLDGHKQ.js → chunk-HPS5HLVY.js} +11023 -5867
  4. package/bundle/{chunk-4GDVEGW6.js → chunk-JCJR4TJP.js} +4 -4
  5. package/bundle/{chunk-RKV6HN7Q.js → chunk-LP2WYGS4.js} +3 -3
  6. package/bundle/{chunk-KVB2FEJR.js → chunk-ZYD45INQ.js} +58 -70
  7. package/bundle/{core-YYXQJ7TH.js → core-7MVFLCVM.js} +1 -1
  8. package/bundle/{dist-WQ7AVR5S.js → core-IAVFIQIJ.js} +2 -2
  9. package/bundle/{devtoolsService-NRFH67X5.js → devtoolsService-QN6DTOQ4.js} +2 -2
  10. package/bundle/{devtoolsService-B6RHLEYB.js → devtoolsService-QPXA3DYV.js} +2 -2
  11. package/bundle/{devtoolsService-DHRIWISR.js → devtoolsService-QQAGVUAL.js} +4 -5
  12. package/bundle/{dist-2HVISZHF.js → dist-OPAGMUAE.js} +1 -1
  13. package/bundle/gemini.js +6 -6
  14. package/bundle/{interactiveCli-Z6APHR6N.js → interactiveCli-3PZKICTV.js} +3 -3
  15. package/bundle/{interactiveCli-M5FR2TSQ.js → interactiveCli-QUKUV3RI.js} +3 -3
  16. package/bundle/{interactiveCli-NNZT57UA.js → interactiveCli-UE3SKHMT.js} +247 -264
  17. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  18. package/bundle/{oauth2-provider-DFCNEZQQ.js → oauth2-provider-4KPORHHZ.js} +1 -1
  19. package/bundle/{oauth2-provider-6573WD2M.js → oauth2-provider-5PPDZYRY.js} +73 -39
  20. package/bundle/{oauth2-provider-3Z6BMHEW.js → oauth2-provider-NGPDVZHB.js} +1 -1
  21. package/package.json +1 -1
  22. package/bundle/chunk-Q7WBFJC3.js +0 -98376
  23. package/bundle/chunk-WY42FI6I.js +0 -356418
  24. package/bundle/devtoolsService-MSTYJNTU.js +0 -871
  25. package/bundle/dist-KYKNBAEA.js +0 -1942
  26. package/bundle/interactiveCli-WM3LDBWK.js +0 -50355
  27. package/bundle/oauth2-provider-UMCNQ5DH.js +0 -237
@@ -186,14 +186,12 @@ import {
186
186
  widestLineFromStyledChars,
187
187
  wordBreakStyledChars,
188
188
  wrapStyledChars
189
- } from "./chunk-KVB2FEJR.js";
189
+ } from "./chunk-ZYD45INQ.js";
190
190
  import {
191
191
  ApiKeyUpdatedEvent,
192
192
  AsyncFzf,
193
193
  AuthType,
194
- CompressionStatus,
195
194
  ConversationFinishedEvent,
196
- CoreToolCallStatus,
197
195
  CreditPurchaseClickEvent,
198
196
  EDITOR_DISPLAY_NAMES,
199
197
  EmptyWalletMenuShownEvent,
@@ -203,15 +201,10 @@ import {
203
201
  FileSearchFactory,
204
202
  FolderTrustDiscoveryService,
205
203
  G1_UTM_CAMPAIGNS,
206
- GeminiCliOperation,
207
- GeminiEventType,
208
204
  GitService,
209
205
  IdeClient,
210
206
  LlmRole,
211
207
  Logger,
212
- MCPDiscoveryState,
213
- MCPServerStatus,
214
- MessageSenderType,
215
208
  ModelNotFoundError,
216
209
  ModelSlashCommandEvent,
217
210
  OverageMenuShownEvent,
@@ -220,8 +213,6 @@ import {
220
213
  ProjectIdRequiredError,
221
214
  ROOT_SCHEDULER_ID,
222
215
  Scheduler,
223
- SessionEndReason,
224
- SessionStartSource,
225
216
  ShellExecutionService,
226
217
  SlashCommandStatus,
227
218
  TerminalQuotaError,
@@ -229,7 +220,6 @@ import {
229
220
  UserPromptEvent,
230
221
  UserTierId,
231
222
  ValidationRequiredError,
232
- WarningPriority,
233
223
  addMCPStatusChangeListener,
234
224
  allowEditorTypeInSandbox,
235
225
  buildG1Url,
@@ -306,12 +296,10 @@ import {
306
296
  validatePlanContent,
307
297
  validatePlanPath,
308
298
  writeToStdout
309
- } from "./chunk-WY42FI6I.js";
299
+ } from "./chunk-2LDNSLWJ.js";
310
300
  import {
311
301
  ACTIVATE_SKILL_TOOL_NAME,
312
- ApprovalMode,
313
302
  ChangeAuthRequestedError,
314
- CoreEvent,
315
303
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
316
304
  DEFAULT_GEMINI_FLASH_MODEL,
317
305
  DEFAULT_GEMINI_MODEL,
@@ -322,16 +310,13 @@ import {
322
310
  GEMINI_DIR,
323
311
  GLOB_DISPLAY_NAME,
324
312
  GREP_DISPLAY_NAME,
325
- Kind,
326
313
  LS_DISPLAY_NAME,
327
- MessageBusType,
328
314
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
329
315
  PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
330
316
  PREVIEW_GEMINI_3_1_MODEL,
331
317
  PREVIEW_GEMINI_FLASH_MODEL,
332
318
  PREVIEW_GEMINI_MODEL,
333
319
  PREVIEW_GEMINI_MODEL_AUTO,
334
- QuestionType,
335
320
  READ_FILE_DISPLAY_NAME,
336
321
  READ_MANY_FILES_DISPLAY_NAME,
337
322
  SHELL_TOOL_NAME,
@@ -339,8 +324,6 @@ import {
339
324
  TOPIC_PARAM_STRATEGIC_INTENT,
340
325
  TOPIC_PARAM_SUMMARY,
341
326
  TOPIC_PARAM_TITLE,
342
- ToolConfirmationOutcome,
343
- ToolErrorType,
344
327
  UPDATE_TOPIC_DISPLAY_NAME,
345
328
  UPDATE_TOPIC_TOOL_NAME,
346
329
  UnauthorizedError,
@@ -371,7 +354,7 @@ import {
371
354
  safeJsonToMarkdown,
372
355
  shortenPath,
373
356
  tildeifyPath
374
- } from "./chunk-JS5WSGB2.js";
357
+ } from "./chunk-5OOT636U.js";
375
358
  import "./chunk-664ZODQF.js";
376
359
  import {
377
360
  appEvents
@@ -22338,7 +22321,7 @@ function calculateShellMaxLines(options) {
22338
22321
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
22339
22322
  return maxLinesBasedOnHeight;
22340
22323
  }
22341
- const isExecuting = status === CoreToolCallStatus.Executing;
22324
+ const isExecuting = status === "executing" /* Executing */;
22342
22325
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
22343
22326
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
22344
22327
  }
@@ -22371,10 +22354,10 @@ function isShellTool(name) {
22371
22354
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
22372
22355
  }
22373
22356
  function isThisShellFocusable(name, status, config) {
22374
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
22357
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
22375
22358
  }
22376
22359
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
22377
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
22360
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
22378
22361
  }
22379
22362
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
22380
22363
  const [userHasFocused, setUserHasFocused] = (0, import_react21.useState)(false);
@@ -22934,7 +22917,7 @@ var ToolMessage = ({
22934
22917
  paddingX: 1,
22935
22918
  flexDirection: "column",
22936
22919
  children: [
22937
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
22920
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
22938
22921
  McpProgressIndicator,
22939
22922
  {
22940
22923
  progress,
@@ -22951,8 +22934,8 @@ var ToolMessage = ({
22951
22934
  terminalWidth,
22952
22935
  renderOutputAsMarkdown,
22953
22936
  hasFocus: isThisShellFocused2,
22954
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
22955
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
22937
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
22938
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
22956
22939
  }
22957
22940
  ),
22958
22941
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
@@ -23677,7 +23660,7 @@ var ShellToolMessage = ({
23677
23660
  maxLinesLimit: maxLines
23678
23661
  });
23679
23662
  import_react29.default.useEffect(() => {
23680
- const isExecuting = status === CoreToolCallStatus.Executing;
23663
+ const isExecuting = status === "executing" /* Executing */;
23681
23664
  if (isExecuting && ptyId) {
23682
23665
  try {
23683
23666
  const childWidth = terminalWidth - 4;
@@ -24077,14 +24060,14 @@ var ToolActionsProvider = (props) => {
24077
24060
  }
24078
24061
  const details = tool.confirmationDetails;
24079
24062
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
24080
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
24063
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
24081
24064
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
24082
24065
  }
24083
24066
  if (tool.correlationId) {
24084
24067
  await config.getMessageBus().publish({
24085
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
24068
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
24086
24069
  correlationId: tool.correlationId,
24087
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
24070
+ confirmed: outcome !== "cancel" /* Cancel */,
24088
24071
  requiresUserConfirmation: false,
24089
24072
  outcome,
24090
24073
  payload
@@ -24103,7 +24086,7 @@ var ToolActionsProvider = (props) => {
24103
24086
  );
24104
24087
  const cancel = (0, import_react31.useCallback)(
24105
24088
  async (callId) => {
24106
- await confirm(callId, ToolConfirmationOutcome.Cancel);
24089
+ await confirm(callId, "cancel" /* Cancel */);
24107
24090
  },
24108
24091
  [confirm]
24109
24092
  );
@@ -24149,22 +24132,22 @@ var RenderItemsList = ({ items, maxVisible = 20 }) => {
24149
24132
  function getFileOpData(diff2, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
24150
24133
  const added = (diff2.diffStat?.model_added_lines ?? 0) + (diff2.diffStat?.user_added_lines ?? 0);
24151
24134
  const removed = (diff2.diffStat?.model_removed_lines ?? 0) + (diff2.diffStat?.user_removed_lines ?? 0);
24152
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
24135
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
24153
24136
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
24154
24137
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
24155
24138
  const showDiffStat = !!diff2.diffStat;
24156
24139
  const description = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff2.fileName }) });
24157
24140
  let resultSummary = "";
24158
24141
  let resultColor = theme.text.secondary;
24159
- if (status === CoreToolCallStatus.AwaitingApproval) {
24142
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
24160
24143
  resultSummary = "Confirming";
24161
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
24144
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
24162
24145
  resultSummary = "Accepted";
24163
24146
  resultColor = theme.text.accent;
24164
- } else if (status === CoreToolCallStatus.Cancelled) {
24147
+ } else if (status === "cancelled" /* Cancelled */) {
24165
24148
  resultSummary = "Rejected";
24166
24149
  resultColor = theme.status.error;
24167
- } else if (status === CoreToolCallStatus.Error) {
24150
+ } else if (status === "error" /* Error */) {
24168
24151
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
24169
24152
  resultColor = theme.status.error;
24170
24153
  }
@@ -24195,7 +24178,7 @@ function getFileOpData(diff2, status, resultDisplay, terminalWidth, availableTer
24195
24178
  filename: diff2.fileName,
24196
24179
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
24197
24180
  availableTerminalHeight,
24198
- disableColor: status === CoreToolCallStatus.Cancelled
24181
+ disableColor: status === "cancelled" /* Cancelled */
24199
24182
  }
24200
24183
  );
24201
24184
  return { description, summary, payload };
@@ -24339,10 +24322,10 @@ var DenseToolMessage = (props) => {
24339
24322
  if (isGrepResult(resultDisplay)) {
24340
24323
  return getGenericSuccessData(resultDisplay, originalDescription);
24341
24324
  }
24342
- if (status === CoreToolCallStatus.Success && resultDisplay) {
24325
+ if (status === "success" /* Success */ && resultDisplay) {
24343
24326
  return getGenericSuccessData(resultDisplay, originalDescription);
24344
24327
  }
24345
- if (status === CoreToolCallStatus.Error) {
24328
+ if (status === "error" /* Error */) {
24346
24329
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
24347
24330
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
24348
24331
  "\u2192 ",
@@ -24383,7 +24366,7 @@ var DenseToolMessage = (props) => {
24383
24366
  language: fileExtension,
24384
24367
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
24385
24368
  settings,
24386
- disableColor: status === CoreToolCallStatus.Cancelled,
24369
+ disableColor: status === "cancelled" /* Cancelled */,
24387
24370
  returnLines: true
24388
24371
  });
24389
24372
  } else {
@@ -24391,7 +24374,7 @@ var DenseToolMessage = (props) => {
24391
24374
  parsedLines,
24392
24375
  filename: diff2.fileName,
24393
24376
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
24394
- disableColor: status === CoreToolCallStatus.Cancelled
24377
+ disableColor: status === "cancelled" /* Cancelled */
24395
24378
  });
24396
24379
  }
24397
24380
  }, [diff2, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -24491,14 +24474,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
24491
24474
  if (isTrackedToolCall(t)) {
24492
24475
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
24493
24476
  } else {
24494
- return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
24477
+ return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
24495
24478
  }
24496
24479
  });
24497
24480
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
24498
24481
  if (isTrackedToolCall(t)) {
24499
24482
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
24500
24483
  } else {
24501
- return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
24484
+ return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
24502
24485
  }
24503
24486
  });
24504
24487
  const isShellCommand = toolsToInspect.some((t) => {
@@ -24568,7 +24551,7 @@ var ToolGroupMessage = ({
24568
24551
  const isCompactModeEnabled = settings.merged.ui?.compactToolOutput === true;
24569
24552
  const visibleToolCalls = (0, import_react33.useMemo)(
24570
24553
  () => allToolCalls.filter((t) => {
24571
- if (isLowErrorVerbosity && t.status === CoreToolCallStatus.Error && !t.isClientInitiated) {
24554
+ if (isLowErrorVerbosity && t.status === "error" /* Error */ && !t.isClientInitiated) {
24572
24555
  return false;
24573
24556
  }
24574
24557
  if (shouldHideToolCall({
@@ -24611,7 +24594,7 @@ var ToolGroupMessage = ({
24611
24594
  const groupedTools = (0, import_react33.useMemo)(() => {
24612
24595
  const groups = [];
24613
24596
  for (const tool of visibleToolCalls) {
24614
- if (tool.kind === Kind.Agent) {
24597
+ if (tool.kind === "agent" /* Agent */) {
24615
24598
  const lastGroup = groups[groups.length - 1];
24616
24599
  if (Array.isArray(lastGroup)) {
24617
24600
  lastGroup.push(tool);
@@ -24660,7 +24643,7 @@ var ToolGroupMessage = ({
24660
24643
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
24661
24644
  let countToolCallsWithResults = 0;
24662
24645
  for (const tool of visibleToolCalls) {
24663
- if (tool.kind !== Kind.Agent) {
24646
+ if (tool.kind !== "agent" /* Agent */) {
24664
24647
  if (isCompactTool(tool, isCompactModeEnabled)) {
24665
24648
  if (hasDensePayload(tool)) {
24666
24649
  countToolCallsWithResults++;
@@ -24875,18 +24858,18 @@ function CompressionMessage({
24875
24858
  return "Compressing chat history";
24876
24859
  }
24877
24860
  switch (compressionStatus) {
24878
- case CompressionStatus.COMPRESSED:
24861
+ case 1 /* COMPRESSED */:
24879
24862
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
24880
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
24863
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
24881
24864
  if (originalTokens < 5e4) {
24882
24865
  return "Compression was not beneficial for this history size.";
24883
24866
  }
24884
24867
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
24885
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
24868
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
24886
24869
  return "Could not compress chat history due to a token counting error.";
24887
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
24870
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
24888
24871
  return "Chat history compression failed: the model returned an empty summary.";
24889
- case CompressionStatus.NOOP:
24872
+ case 5 /* NOOP */:
24890
24873
  return "Nothing to compress.";
24891
24874
  default:
24892
24875
  return "";
@@ -25655,7 +25638,7 @@ var StatsDisplay = ({
25655
25638
  const config = useConfig();
25656
25639
  const useGemini3_1 = config.getGemini31LaunchedSync?.() ?? false;
25657
25640
  const useGemini3_1FlashLite = config.getGemini31FlashLiteLaunchedSync?.() ?? false;
25658
- const useCustomToolModel = useGemini3_1 && config.getContentGeneratorConfig().authType === AuthType.USE_GEMINI;
25641
+ const useCustomToolModel = useGemini3_1 && config.getContentGeneratorConfig().authType === "gemini-api-key" /* USE_GEMINI */;
25659
25642
  const pooledRemaining = quotaStats?.remaining;
25660
25643
  const pooledLimit = quotaStats?.limit;
25661
25644
  const pooledResetTime = quotaStats?.resetTime;
@@ -25885,8 +25868,8 @@ var ModelStatsDisplay = ({
25885
25868
  return validRoles.includes(role);
25886
25869
  }).sort((a, b) => {
25887
25870
  if (a === b) return 0;
25888
- if (a === LlmRole.MAIN) return -1;
25889
- if (b === LlmRole.MAIN) return 1;
25871
+ if (a === "main" /* MAIN */) return -1;
25872
+ if (b === "main" /* MAIN */) return 1;
25890
25873
  return a.localeCompare(b);
25891
25874
  });
25892
25875
  const createRow = (metric, getValue, options = {}) => {
@@ -26676,7 +26659,7 @@ var McpStatus = ({
26676
26659
  );
26677
26660
  const originalStatus = serverStatus(serverName);
26678
26661
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
26679
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
26662
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
26680
26663
  let statusIndicator = "";
26681
26664
  let statusText = "";
26682
26665
  let statusColor = theme.text.primary;
@@ -26688,17 +26671,17 @@ var McpStatus = ({
26688
26671
  statusColor = theme.text.secondary;
26689
26672
  } else {
26690
26673
  switch (status) {
26691
- case MCPServerStatus.CONNECTED:
26674
+ case "connected" /* CONNECTED */:
26692
26675
  statusIndicator = "\u{1F7E2}";
26693
26676
  statusText = "Ready";
26694
26677
  statusColor = theme.status.success;
26695
26678
  break;
26696
- case MCPServerStatus.CONNECTING:
26679
+ case "connecting" /* CONNECTING */:
26697
26680
  statusIndicator = "\u{1F504}";
26698
26681
  statusText = "Starting... (first startup may take longer)";
26699
26682
  statusColor = theme.status.warning;
26700
26683
  break;
26701
- case MCPServerStatus.DISCONNECTED:
26684
+ case "disconnected" /* DISCONNECTED */:
26702
26685
  default:
26703
26686
  statusIndicator = "\u{1F534}";
26704
26687
  statusText = "Disconnected";
@@ -26746,12 +26729,12 @@ var McpStatus = ({
26746
26729
  /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { children: [
26747
26730
  " - ",
26748
26731
  statusText,
26749
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
26732
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
26750
26733
  ] }),
26751
26734
  authStatusNode
26752
26735
  ] }),
26753
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
26754
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { children: [
26736
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
26737
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { children: [
26755
26738
  " (",
26756
26739
  toolCount,
26757
26740
  " tools cached)"
@@ -27240,7 +27223,7 @@ var Notifications = () => {
27240
27223
  if (dismissed) return [];
27241
27224
  const counts = persistentState.get("startupWarningCounts") || {};
27242
27225
  return startupWarnings.filter((w) => {
27243
- if (w.priority === WarningPriority.Low) {
27226
+ if (w.priority === "low" /* Low */) {
27244
27227
  const count = counts[w.id] || 0;
27245
27228
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
27246
27229
  }
@@ -27253,7 +27236,7 @@ var Notifications = () => {
27253
27236
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
27254
27237
  let changed = false;
27255
27238
  visibleWarnings.forEach((w) => {
27256
- if (w.priority === WarningPriority.Low) {
27239
+ if (w.priority === "low" /* Low */) {
27257
27240
  counts[w.id] = (counts[w.id] || 0) + 1;
27258
27241
  changed = true;
27259
27242
  }
@@ -27360,7 +27343,7 @@ var UserIdentity = ({ config }) => {
27360
27343
  }
27361
27344
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Box_default, { flexDirection: "column", children: [
27362
27345
  /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Box_default, { children: [
27363
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { children: [
27346
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { children: [
27364
27347
  /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { bold: true, children: [
27365
27348
  "Signed in with Google",
27366
27349
  email ? ":" : ""
@@ -27613,7 +27596,7 @@ function isToolExecuting(pendingHistoryItems) {
27613
27596
  return pendingHistoryItems.some((item) => {
27614
27597
  if (item && item.type === "tool_group") {
27615
27598
  return item.tools.some(
27616
- (tool) => CoreToolCallStatus.Executing === tool.status
27599
+ (tool) => "executing" /* Executing */ === tool.status
27617
27600
  );
27618
27601
  }
27619
27602
  return false;
@@ -27622,7 +27605,7 @@ function isToolExecuting(pendingHistoryItems) {
27622
27605
  function isToolAwaitingConfirmation(pendingHistoryItems) {
27623
27606
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
27624
27607
  (item) => item.tools.some(
27625
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
27608
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
27626
27609
  )
27627
27610
  );
27628
27611
  }
@@ -27634,7 +27617,7 @@ function getAllToolCalls(historyItems) {
27634
27617
  function getConfirmingToolState(pendingHistoryItems) {
27635
27618
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
27636
27619
  const confirmingTools = allPendingTools.filter(
27637
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
27620
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
27638
27621
  );
27639
27622
  if (confirmingTools.length === 0) {
27640
27623
  return null;
@@ -28922,7 +28905,7 @@ var ExitPlanModeDialog = ({
28922
28905
  {
28923
28906
  questions: [
28924
28907
  {
28925
- type: QuestionType.CHOICE,
28908
+ type: "choice" /* CHOICE */,
28926
28909
  header: "Approval",
28927
28910
  question: planContent,
28928
28911
  options: [
@@ -28943,9 +28926,9 @@ var ExitPlanModeDialog = ({
28943
28926
  onSubmit: (answers) => {
28944
28927
  const answer = answers["0"];
28945
28928
  if (answer === "Yes, automatically accept edits" /* Auto */) {
28946
- onApprove(ApprovalMode.AUTO_EDIT);
28929
+ onApprove("autoEdit" /* AUTO_EDIT */);
28947
28930
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
28948
- onApprove(ApprovalMode.DEFAULT);
28931
+ onApprove("default" /* DEFAULT */);
28949
28932
  } else if (answer) {
28950
28933
  onFeedback(answer);
28951
28934
  }
@@ -29151,7 +29134,7 @@ ${deceptiveUrlWarnings.map(
29151
29134
  );
29152
29135
  (0, import_react49.useEffect)(() => {
29153
29136
  if (isCancelling) {
29154
- handleConfirm(ToolConfirmationOutcome.Cancel);
29137
+ handleConfirm("cancel" /* Cancel */);
29155
29138
  }
29156
29139
  }, [isCancelling, handleConfirm]);
29157
29140
  const handleSelect = (0, import_react49.useCallback)(
@@ -29164,19 +29147,19 @@ ${deceptiveUrlWarnings.map(
29164
29147
  if (!confirmationDetails.isModifying) {
29165
29148
  options2.push({
29166
29149
  label: "Allow once",
29167
- value: ToolConfirmationOutcome.ProceedOnce,
29150
+ value: "proceed_once" /* ProceedOnce */,
29168
29151
  key: "Allow once"
29169
29152
  });
29170
29153
  if (isTrustedFolder) {
29171
29154
  options2.push({
29172
29155
  label: "Allow for this session",
29173
- value: ToolConfirmationOutcome.ProceedAlways,
29156
+ value: "proceed_always" /* ProceedAlways */,
29174
29157
  key: "Allow for this session"
29175
29158
  });
29176
29159
  if (allowPermanentApproval) {
29177
29160
  options2.push({
29178
29161
  label: "Allow for this file in all future sessions",
29179
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
29162
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
29180
29163
  key: "Allow for this file in all future sessions"
29181
29164
  });
29182
29165
  }
@@ -29184,119 +29167,119 @@ ${deceptiveUrlWarnings.map(
29184
29167
  if (!config.getIdeMode() || !isDiffingEnabled) {
29185
29168
  options2.push({
29186
29169
  label: "Modify with external editor",
29187
- value: ToolConfirmationOutcome.ModifyWithEditor,
29170
+ value: "modify_with_editor" /* ModifyWithEditor */,
29188
29171
  key: "Modify with external editor"
29189
29172
  });
29190
29173
  }
29191
29174
  options2.push({
29192
29175
  label: "No, suggest changes (esc)",
29193
- value: ToolConfirmationOutcome.Cancel,
29176
+ value: "cancel" /* Cancel */,
29194
29177
  key: "No, suggest changes (esc)"
29195
29178
  });
29196
29179
  }
29197
29180
  } else if (confirmationDetails.type === "sandbox_expansion") {
29198
29181
  options2.push({
29199
29182
  label: "Allow once",
29200
- value: ToolConfirmationOutcome.ProceedOnce,
29183
+ value: "proceed_once" /* ProceedOnce */,
29201
29184
  key: "Allow once"
29202
29185
  });
29203
29186
  if (isTrustedFolder) {
29204
29187
  options2.push({
29205
29188
  label: "Allow for this session",
29206
- value: ToolConfirmationOutcome.ProceedAlways,
29189
+ value: "proceed_always" /* ProceedAlways */,
29207
29190
  key: "Allow for this session"
29208
29191
  });
29209
29192
  if (allowPermanentApproval) {
29210
29193
  options2.push({
29211
29194
  label: "Allow for all future sessions",
29212
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
29195
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
29213
29196
  key: "Allow for all future sessions"
29214
29197
  });
29215
29198
  }
29216
29199
  }
29217
29200
  options2.push({
29218
29201
  label: "No, suggest changes (esc)",
29219
- value: ToolConfirmationOutcome.Cancel,
29202
+ value: "cancel" /* Cancel */,
29220
29203
  key: "No, suggest changes (esc)"
29221
29204
  });
29222
29205
  } else if (confirmationDetails.type === "exec") {
29223
29206
  options2.push({
29224
29207
  label: "Allow once",
29225
- value: ToolConfirmationOutcome.ProceedOnce,
29208
+ value: "proceed_once" /* ProceedOnce */,
29226
29209
  key: "Allow once"
29227
29210
  });
29228
29211
  if (isTrustedFolder) {
29229
29212
  options2.push({
29230
29213
  label: `Allow for this session`,
29231
- value: ToolConfirmationOutcome.ProceedAlways,
29214
+ value: "proceed_always" /* ProceedAlways */,
29232
29215
  key: `Allow for this session`
29233
29216
  });
29234
29217
  if (allowPermanentApproval) {
29235
29218
  options2.push({
29236
29219
  label: `Allow this command for all future sessions`,
29237
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
29220
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
29238
29221
  key: `Allow for all future sessions`
29239
29222
  });
29240
29223
  }
29241
29224
  }
29242
29225
  options2.push({
29243
29226
  label: "No, suggest changes (esc)",
29244
- value: ToolConfirmationOutcome.Cancel,
29227
+ value: "cancel" /* Cancel */,
29245
29228
  key: "No, suggest changes (esc)"
29246
29229
  });
29247
29230
  } else if (confirmationDetails.type === "info") {
29248
29231
  options2.push({
29249
29232
  label: "Allow once",
29250
- value: ToolConfirmationOutcome.ProceedOnce,
29233
+ value: "proceed_once" /* ProceedOnce */,
29251
29234
  key: "Allow once"
29252
29235
  });
29253
29236
  if (isTrustedFolder) {
29254
29237
  options2.push({
29255
29238
  label: "Allow for this session",
29256
- value: ToolConfirmationOutcome.ProceedAlways,
29239
+ value: "proceed_always" /* ProceedAlways */,
29257
29240
  key: "Allow for this session"
29258
29241
  });
29259
29242
  if (allowPermanentApproval) {
29260
29243
  options2.push({
29261
29244
  label: "Allow for all future sessions",
29262
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
29245
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
29263
29246
  key: "Allow for all future sessions"
29264
29247
  });
29265
29248
  }
29266
29249
  }
29267
29250
  options2.push({
29268
29251
  label: "No, suggest changes (esc)",
29269
- value: ToolConfirmationOutcome.Cancel,
29252
+ value: "cancel" /* Cancel */,
29270
29253
  key: "No, suggest changes (esc)"
29271
29254
  });
29272
29255
  } else if (confirmationDetails.type === "mcp") {
29273
29256
  options2.push({
29274
29257
  label: "Allow once",
29275
- value: ToolConfirmationOutcome.ProceedOnce,
29258
+ value: "proceed_once" /* ProceedOnce */,
29276
29259
  key: "Allow once"
29277
29260
  });
29278
29261
  if (isTrustedFolder) {
29279
29262
  options2.push({
29280
29263
  label: "Allow tool for this session",
29281
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
29264
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
29282
29265
  key: "Allow tool for this session"
29283
29266
  });
29284
29267
  options2.push({
29285
29268
  label: "Allow all server tools for this session",
29286
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
29269
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
29287
29270
  key: "Allow all server tools for this session"
29288
29271
  });
29289
29272
  if (allowPermanentApproval) {
29290
29273
  options2.push({
29291
29274
  label: "Allow tool for all future sessions",
29292
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
29275
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
29293
29276
  key: "Allow tool for all future sessions"
29294
29277
  });
29295
29278
  }
29296
29279
  }
29297
29280
  options2.push({
29298
29281
  label: "No, suggest changes (esc)",
29299
- value: ToolConfirmationOutcome.Cancel,
29282
+ value: "cancel" /* Cancel */,
29300
29283
  key: "No, suggest changes (esc)"
29301
29284
  });
29302
29285
  }
@@ -29341,7 +29324,7 @@ ${deceptiveUrlWarnings.map(
29341
29324
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
29342
29325
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
29343
29326
  const alwaysAndSaveIndex = options2.findIndex(
29344
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
29327
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
29345
29328
  );
29346
29329
  if (alwaysAndSaveIndex !== -1) {
29347
29330
  initialIndex2 = alwaysAndSaveIndex;
@@ -29357,10 +29340,10 @@ ${deceptiveUrlWarnings.map(
29357
29340
  {
29358
29341
  questions: confirmationDetails.questions,
29359
29342
  onSubmit: (answers) => {
29360
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
29343
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
29361
29344
  },
29362
29345
  onCancel: () => {
29363
- handleConfirm(ToolConfirmationOutcome.Cancel);
29346
+ handleConfirm("cancel" /* Cancel */);
29364
29347
  },
29365
29348
  width: terminalWidth,
29366
29349
  availableHeight: availableBodyContentHeight()
@@ -29381,19 +29364,19 @@ ${deceptiveUrlWarnings.map(
29381
29364
  planPath: confirmationDetails.planPath,
29382
29365
  getPreferredEditor,
29383
29366
  onApprove: (approvalMode) => {
29384
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
29367
+ handleConfirm("proceed_once" /* ProceedOnce */, {
29385
29368
  approved: true,
29386
29369
  approvalMode
29387
29370
  });
29388
29371
  },
29389
29372
  onFeedback: (feedback) => {
29390
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
29373
+ handleConfirm("proceed_once" /* ProceedOnce */, {
29391
29374
  approved: false,
29392
29375
  feedback
29393
29376
  });
29394
29377
  },
29395
29378
  onCancel: () => {
29396
- handleConfirm(ToolConfirmationOutcome.Cancel);
29379
+ handleConfirm("cancel" /* Cancel */);
29397
29380
  },
29398
29381
  width: terminalWidth,
29399
29382
  availableHeight: availableBodyContentHeight()
@@ -29470,7 +29453,7 @@ ${deceptiveUrlWarnings.map(
29470
29453
  );
29471
29454
  let bodyContentHeight = availableBodyContentHeight();
29472
29455
  let warnings = null;
29473
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
29456
+ const isAutoEdit = config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
29474
29457
  if (containsRedirection && !isAutoEdit) {
29475
29458
  const safeWidth = Math.max(terminalWidth, 1);
29476
29459
  const noteLength = REDIRECTION_WARNING_NOTE_LABEL.length + REDIRECTION_WARNING_NOTE_TEXT.length;
@@ -31688,7 +31671,7 @@ function validateAuthMethodWithSettings(authType, settings) {
31688
31671
  if (settings.merged.security.auth.useExternal) {
31689
31672
  return null;
31690
31673
  }
31691
- if (authType === AuthType.USE_GEMINI) {
31674
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
31692
31675
  return null;
31693
31676
  }
31694
31677
  return validateAuthMethod(authType);
@@ -31740,7 +31723,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
31740
31723
  }
31741
31724
  return;
31742
31725
  }
31743
- if (authType === AuthType.USE_GEMINI) {
31726
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
31744
31727
  const key = await reloadApiKey();
31745
31728
  if (!key) {
31746
31729
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -31815,31 +31798,31 @@ function AuthDialog({
31815
31798
  let items = [
31816
31799
  {
31817
31800
  label: "Sign in with Google",
31818
- value: AuthType.LOGIN_WITH_GOOGLE,
31819
- key: AuthType.LOGIN_WITH_GOOGLE
31801
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
31802
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
31820
31803
  },
31821
31804
  ...process.env["CLOUD_SHELL"] === "true" ? [
31822
31805
  {
31823
31806
  label: "Use Cloud Shell user credentials",
31824
- value: AuthType.COMPUTE_ADC,
31825
- key: AuthType.COMPUTE_ADC
31807
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
31808
+ key: "compute-default-credentials" /* COMPUTE_ADC */
31826
31809
  }
31827
31810
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
31828
31811
  {
31829
31812
  label: "Use metadata server application default credentials",
31830
- value: AuthType.COMPUTE_ADC,
31831
- key: AuthType.COMPUTE_ADC
31813
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
31814
+ key: "compute-default-credentials" /* COMPUTE_ADC */
31832
31815
  }
31833
31816
  ] : [],
31834
31817
  {
31835
31818
  label: "Use Gemini API Key",
31836
- value: AuthType.USE_GEMINI,
31837
- key: AuthType.USE_GEMINI
31819
+ value: "gemini-api-key" /* USE_GEMINI */,
31820
+ key: "gemini-api-key" /* USE_GEMINI */
31838
31821
  },
31839
31822
  {
31840
31823
  label: "Vertex AI",
31841
- value: AuthType.USE_VERTEX_AI,
31842
- key: AuthType.USE_VERTEX_AI
31824
+ value: "vertex-ai" /* USE_VERTEX_AI */,
31825
+ key: "vertex-ai" /* USE_VERTEX_AI */
31843
31826
  }
31844
31827
  ];
31845
31828
  if (settings.merged.security.auth.enforcedType) {
@@ -31861,9 +31844,9 @@ function AuthDialog({
31861
31844
  return item.value === defaultAuthType;
31862
31845
  }
31863
31846
  if (process.env["GEMINI_API_KEY"]) {
31864
- return item.value === AuthType.USE_GEMINI;
31847
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
31865
31848
  }
31866
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
31849
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
31867
31850
  });
31868
31851
  if (settings.merged.security.auth.enforcedType) {
31869
31852
  initialAuthIndex = 0;
@@ -31874,19 +31857,19 @@ function AuthDialog({
31874
31857
  return;
31875
31858
  }
31876
31859
  if (authType) {
31877
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
31860
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
31878
31861
  setAuthContext({ requiresRestart: true });
31879
31862
  } else {
31880
31863
  setAuthContext({});
31881
31864
  }
31882
31865
  await clearCachedCredentialFile();
31883
31866
  settings.setValue(scope, "security.auth.selectedType", authType);
31884
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
31867
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
31885
31868
  setExiting(true);
31886
31869
  setTimeout(relaunchApp, 100);
31887
31870
  return;
31888
31871
  }
31889
- if (authType === AuthType.USE_GEMINI) {
31872
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
31890
31873
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
31891
31874
  return;
31892
31875
  }
@@ -32636,11 +32619,11 @@ var PrivacyNoticeText = ({
32636
32619
  }) => {
32637
32620
  const authType = config.getContentGeneratorConfig()?.authType;
32638
32621
  switch (authType) {
32639
- case AuthType.USE_GEMINI:
32622
+ case "gemini-api-key" /* USE_GEMINI */:
32640
32623
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(GeminiPrivacyNotice, { onExit });
32641
- case AuthType.USE_VERTEX_AI:
32624
+ case "vertex-ai" /* USE_VERTEX_AI */:
32642
32625
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(CloudPaidPrivacyNotice, { onExit });
32643
- case AuthType.LOGIN_WITH_GOOGLE:
32626
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
32644
32627
  default:
32645
32628
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(CloudFreePrivacyNotice, { config, onExit });
32646
32629
  }
@@ -32681,7 +32664,7 @@ function ProQuotaDialog({
32681
32664
  value: "retry_always",
32682
32665
  key: "retry_always"
32683
32666
  },
32684
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
32667
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
32685
32668
  {
32686
32669
  label: "Upgrade for higher limits",
32687
32670
  value: "upgrade",
@@ -33685,7 +33668,7 @@ function ModelDialog({ onClose }) {
33685
33668
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
33686
33669
  const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
33687
33670
  const selectedAuthType = settings.merged.security.auth.selectedType;
33688
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
33671
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
33689
33672
  const manualModelSelected = (0, import_react66.useMemo)(() => {
33690
33673
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
33691
33674
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -34730,10 +34713,10 @@ function initializeConsoleStore() {
34730
34713
  globalConsoleMessages = [];
34731
34714
  globalErrorCount = 0;
34732
34715
  notifyListeners();
34733
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
34734
- coreEvents.off(CoreEvent.Output, handleOutput);
34735
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
34736
- coreEvents.on(CoreEvent.Output, handleOutput);
34716
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
34717
+ coreEvents.off("output" /* Output */, handleOutput);
34718
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
34719
+ coreEvents.on("output" /* Output */, handleOutput);
34737
34720
  }
34738
34721
  function notifyListeners() {
34739
34722
  for (const listener of listeners) {
@@ -36809,7 +36792,7 @@ function usePromptCompletion({
36809
36792
  { model: "prompt-completion" },
36810
36793
  contents,
36811
36794
  signal,
36812
- LlmRole.UTILITY_AUTOCOMPLETE
36795
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
36813
36796
  );
36814
36797
  if (signal.aborted) {
36815
36798
  return;
@@ -38393,9 +38376,9 @@ var InputPrompt = ({
38393
38376
  onSuggestionsVisibilityChange(shouldShowSuggestions);
38394
38377
  }
38395
38378
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
38396
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
38397
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
38398
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
38379
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
38380
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
38381
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
38399
38382
  let statusColor;
38400
38383
  let statusText = "";
38401
38384
  if (shellModeActive) {
@@ -39308,22 +39291,22 @@ var ApprovalModeIndicator = ({
39308
39291
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
39309
39292
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
39310
39293
  switch (approvalMode) {
39311
- case ApprovalMode.AUTO_EDIT:
39294
+ case "autoEdit" /* AUTO_EDIT */:
39312
39295
  textColor = theme.status.warning;
39313
39296
  textContent = "auto-accept edits";
39314
39297
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
39315
39298
  break;
39316
- case ApprovalMode.PLAN:
39299
+ case "plan" /* PLAN */:
39317
39300
  textColor = theme.status.success;
39318
39301
  textContent = "plan";
39319
39302
  subText = `${cycleHint} to manual`;
39320
39303
  break;
39321
- case ApprovalMode.YOLO:
39304
+ case "yolo" /* YOLO */:
39322
39305
  textColor = theme.status.error;
39323
39306
  textContent = "YOLO";
39324
39307
  subText = yoloHint;
39325
39308
  break;
39326
- case ApprovalMode.DEFAULT:
39309
+ case "default" /* DEFAULT */:
39327
39310
  default:
39328
39311
  textColor = theme.text.accent;
39329
39312
  textContent = "";
@@ -39370,7 +39353,7 @@ var useComposerStatus = () => {
39370
39353
  (item) => item.type === "tool_group"
39371
39354
  ).some(
39372
39355
  (item) => item.tools.some(
39373
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
39356
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
39374
39357
  )
39375
39358
  ),
39376
39359
  [uiState.pendingHistoryItems]
@@ -39385,13 +39368,13 @@ var useComposerStatus = () => {
39385
39368
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
39386
39369
  if (hideMinimalModeHintWhileBusy) return null;
39387
39370
  switch (showApprovalModeIndicator) {
39388
- case ApprovalMode.YOLO:
39371
+ case "yolo" /* YOLO */:
39389
39372
  return { text: "YOLO", color: theme.status.error };
39390
- case ApprovalMode.PLAN:
39373
+ case "plan" /* PLAN */:
39391
39374
  return { text: "plan", color: theme.status.success };
39392
- case ApprovalMode.AUTO_EDIT:
39375
+ case "autoEdit" /* AUTO_EDIT */:
39393
39376
  return { text: "auto edit", color: theme.status.warning };
39394
- case ApprovalMode.DEFAULT:
39377
+ case "default" /* DEFAULT */:
39395
39378
  default:
39396
39379
  return null;
39397
39380
  }
@@ -39732,7 +39715,7 @@ var ConfigInitDisplay = ({
39732
39715
  let connected = 0;
39733
39716
  const connecting = [];
39734
39717
  for (const [name, client] of clients.entries()) {
39735
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
39718
+ if (client.getStatus() === "connected" /* CONNECTED */) {
39736
39719
  connected++;
39737
39720
  } else {
39738
39721
  connecting.push(name);
@@ -39754,9 +39737,9 @@ var ConfigInitDisplay = ({
39754
39737
  );
39755
39738
  }
39756
39739
  };
39757
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
39740
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
39758
39741
  return () => {
39759
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
39742
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
39760
39743
  };
39761
39744
  }, [initialMessage]);
39762
39745
  return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(Text, { children: [
@@ -40481,7 +40464,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
40481
40464
  callId,
40482
40465
  name: SHELL_COMMAND_NAME,
40483
40466
  description: rawQuery,
40484
- status: CoreToolCallStatus.Executing,
40467
+ status: "executing" /* Executing */,
40485
40468
  isClientInitiated: true,
40486
40469
  resultDisplay: "",
40487
40470
  confirmationDetails: void 0
@@ -40606,24 +40589,24 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
40606
40589
  mainContent = result.output.trim() || "(Command produced no output)";
40607
40590
  }
40608
40591
  let finalOutput = mainContent;
40609
- let finalStatus = CoreToolCallStatus.Success;
40592
+ let finalStatus = "success" /* Success */;
40610
40593
  if (result.error) {
40611
- finalStatus = CoreToolCallStatus.Error;
40594
+ finalStatus = "error" /* Error */;
40612
40595
  finalOutput = `${result.error.message}
40613
40596
  ${finalOutput}`;
40614
40597
  } else if (result.aborted) {
40615
- finalStatus = CoreToolCallStatus.Cancelled;
40598
+ finalStatus = "cancelled" /* Cancelled */;
40616
40599
  finalOutput = `Command was cancelled.
40617
40600
  ${finalOutput}`;
40618
40601
  } else if (result.backgrounded) {
40619
- finalStatus = CoreToolCallStatus.Success;
40602
+ finalStatus = "success" /* Success */;
40620
40603
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
40621
40604
  } else if (result.signal) {
40622
- finalStatus = CoreToolCallStatus.Error;
40605
+ finalStatus = "error" /* Error */;
40623
40606
  finalOutput = `Command terminated by signal: ${result.signal}.
40624
40607
  ${finalOutput}`;
40625
40608
  } else if (result.exitCode !== 0) {
40626
- finalStatus = CoreToolCallStatus.Error;
40609
+ finalStatus = "error" /* Error */;
40627
40610
  finalOutput = `Command exited with code ${result.exitCode}.
40628
40611
  ${finalOutput}`;
40629
40612
  }
@@ -40641,7 +40624,7 @@ ${finalOutput}`;
40641
40624
  status: finalStatus,
40642
40625
  resultDisplay: finalOutput
40643
40626
  };
40644
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
40627
+ if (finalStatus !== "cancelled" /* Cancelled */) {
40645
40628
  addItemToHistory(
40646
40629
  {
40647
40630
  type: "tool_group",
@@ -41622,7 +41605,7 @@ function useQuotaAndFallback({
41622
41605
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
41623
41606
  `/stats model for usage details`,
41624
41607
  `/model to switch models.`,
41625
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
41608
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
41626
41609
  ].filter(Boolean);
41627
41610
  message = messageLines.join("\n");
41628
41611
  } else if (error instanceof ModelNotFoundError) {
@@ -41810,7 +41793,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
41810
41793
  );
41811
41794
  setEditorError(null);
41812
41795
  setIsEditorDialogOpen(false);
41813
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
41796
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
41814
41797
  } catch (error) {
41815
41798
  setEditorError(`Failed to set editor preference: ${error}`);
41816
41799
  }
@@ -41819,7 +41802,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
41819
41802
  );
41820
41803
  const exitEditorDialog = (0, import_react99.useCallback)(() => {
41821
41804
  setIsEditorDialogOpen(false);
41822
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
41805
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
41823
41806
  }, []);
41824
41807
  return {
41825
41808
  isEditorDialogOpen,
@@ -42174,7 +42157,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
42174
42157
  canonicalPath: resolvedCommandPath
42175
42158
  } = parseSlashCommand(trimmed, commands);
42176
42159
  if (!commandToExecute) {
42177
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
42160
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
42178
42161
  if (isMcpLoading) {
42179
42162
  setIsProcessing(true);
42180
42163
  if (addToHistory) {
@@ -42342,7 +42325,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
42342
42325
  onConfirm: async (resolvedOutcome) => {
42343
42326
  resolve3({
42344
42327
  outcome: resolvedOutcome,
42345
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
42328
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
42346
42329
  });
42347
42330
  }
42348
42331
  };
@@ -42350,7 +42333,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
42350
42333
  callId,
42351
42334
  name: "Expansion",
42352
42335
  description: "Command expansion needs shell access",
42353
- status: CoreToolCallStatus.AwaitingApproval,
42336
+ status: "awaiting_approval" /* AwaitingApproval */,
42354
42337
  isClientInitiated: true,
42355
42338
  resultDisplay: void 0,
42356
42339
  confirmationDetails
@@ -42361,7 +42344,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
42361
42344
  });
42362
42345
  });
42363
42346
  setPendingItem(null);
42364
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
42347
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
42365
42348
  addItem(
42366
42349
  {
42367
42350
  type: "info" /* INFO */,
@@ -42371,7 +42354,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
42371
42354
  );
42372
42355
  return { type: "handled" };
42373
42356
  }
42374
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
42357
+ if (outcome === "proceed_always" /* ProceedAlways */) {
42375
42358
  setSessionShellAllowlist(
42376
42359
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
42377
42360
  );
@@ -42851,7 +42834,7 @@ function mapToDisplay(toolOrTools, options = {}) {
42851
42834
  let description;
42852
42835
  let renderOutputAsMarkdown = false;
42853
42836
  const displayName = call.tool?.displayName ?? call.request.name;
42854
- if (call.status === CoreToolCallStatus.Error) {
42837
+ if (call.status === "error" /* Error */) {
42855
42838
  description = JSON.stringify(call.request.args);
42856
42839
  } else {
42857
42840
  description = call.invocation.getDescription();
@@ -42874,27 +42857,27 @@ function mapToDisplay(toolOrTools, options = {}) {
42874
42857
  let progress = void 0;
42875
42858
  let progressTotal = void 0;
42876
42859
  switch (call.status) {
42877
- case CoreToolCallStatus.Success:
42860
+ case "success" /* Success */:
42878
42861
  resultDisplay = call.response.resultDisplay;
42879
42862
  outputFile = call.response.outputFile;
42880
42863
  break;
42881
- case CoreToolCallStatus.Error:
42882
- case CoreToolCallStatus.Cancelled:
42864
+ case "error" /* Error */:
42865
+ case "cancelled" /* Cancelled */:
42883
42866
  resultDisplay = call.response.resultDisplay;
42884
42867
  break;
42885
- case CoreToolCallStatus.AwaitingApproval:
42868
+ case "awaiting_approval" /* AwaitingApproval */:
42886
42869
  correlationId = call.correlationId;
42887
42870
  confirmationDetails = call.confirmationDetails;
42888
42871
  break;
42889
- case CoreToolCallStatus.Executing:
42872
+ case "executing" /* Executing */:
42890
42873
  resultDisplay = call.liveOutput;
42891
42874
  ptyId = call.pid;
42892
42875
  progressMessage = call.progressMessage;
42893
42876
  progress = call.progress;
42894
42877
  progressTotal = call.progressTotal;
42895
42878
  break;
42896
- case CoreToolCallStatus.Scheduled:
42897
- case CoreToolCallStatus.Validating:
42879
+ case "scheduled" /* Scheduled */:
42880
+ case "validating" /* Validating */:
42898
42881
  break;
42899
42882
  default: {
42900
42883
  const exhaustiveCheck = call;
@@ -42965,7 +42948,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42965
42948
  const handler = (event) => {
42966
42949
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
42967
42950
  const hasExecuting = event.toolCalls.some(
42968
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
42951
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
42969
42952
  );
42970
42953
  if (hasExecuting) {
42971
42954
  setLastToolOutputTime(Date.now());
@@ -42974,7 +42957,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42974
42957
  const prevCalls = prev[event.schedulerId] ?? [];
42975
42958
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
42976
42959
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
42977
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
42960
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
42978
42961
  );
42979
42962
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
42980
42963
  return prev;
@@ -42986,9 +42969,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42986
42969
  };
42987
42970
  });
42988
42971
  };
42989
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
42972
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
42990
42973
  return () => {
42991
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
42974
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
42992
42975
  };
42993
42976
  }, [messageBus, internalAdaptToolCalls]);
42994
42977
  (0, import_react105.useEffect)(() => {
@@ -43010,9 +42993,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
43010
42993
  };
43011
42994
  });
43012
42995
  };
43013
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
42996
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
43014
42997
  return () => {
43015
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
42998
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
43016
42999
  };
43017
43000
  }, [messageBus]);
43018
43001
  const schedule = (0, import_react105.useCallback)(
@@ -43110,8 +43093,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
43110
43093
  const prev = prevMap.get(coreCall.request.callId);
43111
43094
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
43112
43095
  let status = coreCall.status;
43113
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
43114
- status = CoreToolCallStatus.Executing;
43096
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
43097
+ status = "executing" /* Executing */;
43115
43098
  }
43116
43099
  return {
43117
43100
  ...coreCall,
@@ -43143,7 +43126,7 @@ function getBackgroundedToolInfo(toolCall) {
43143
43126
  };
43144
43127
  }
43145
43128
  function isBackgroundableExecutingToolCall(toolCall) {
43146
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
43129
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
43147
43130
  }
43148
43131
  function showCitations(settings) {
43149
43132
  const enabled = settings.merged.ui.showCitations;
@@ -43153,14 +43136,14 @@ function showCitations(settings) {
43153
43136
  return true;
43154
43137
  }
43155
43138
  function calculateStreamingState(isResponding, toolCalls) {
43156
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
43139
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
43157
43140
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
43158
43141
  }
43159
43142
  const isAnyToolActive = toolCalls.some((tc) => {
43160
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
43143
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
43161
43144
  return true;
43162
43145
  }
43163
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
43146
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
43164
43147
  return !tc.responseSubmittedToGemini;
43165
43148
  }
43166
43149
  return false;
@@ -43213,9 +43196,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43213
43196
  const handleRetryAttempt = (payload) => {
43214
43197
  setRetryStatus(payload);
43215
43198
  };
43216
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
43199
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
43217
43200
  return () => {
43218
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
43201
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
43219
43202
  };
43220
43203
  }, []);
43221
43204
  const [
@@ -43348,12 +43331,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43348
43331
  const tc = toolCalls[i];
43349
43332
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
43350
43333
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
43351
- const isAgent = tc.tool?.kind === Kind.Agent;
43334
+ const isAgent = tc.tool?.kind === "agent" /* Agent */;
43352
43335
  if (isAgent) {
43353
43336
  let contigAgentsComplete = true;
43354
43337
  for (let j = i + 1; j < toolCalls.length; j++) {
43355
43338
  const nextTc = toolCalls[j];
43356
- if (nextTc.tool?.kind === Kind.Agent) {
43339
+ if (nextTc.tool?.kind === "agent" /* Agent */) {
43357
43340
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
43358
43341
  contigAgentsComplete = false;
43359
43342
  break;
@@ -43379,7 +43362,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43379
43362
  let currentGroup = [];
43380
43363
  for (const tc of toolsToPush) {
43381
43364
  newPushed.add(tc.request.callId);
43382
- if (tc.tool?.kind === Kind.Agent) {
43365
+ if (tc.tool?.kind === "agent" /* Agent */) {
43383
43366
  currentGroup.push(tc);
43384
43367
  } else {
43385
43368
  if (currentGroup.length > 0) {
@@ -43478,9 +43461,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43478
43461
  const isToolVisible = (tc) => {
43479
43462
  const displayName = tc.tool?.displayName ?? tc.request.name;
43480
43463
  let hasResultDisplay = false;
43481
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
43464
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
43482
43465
  hasResultDisplay = !!tc.response?.resultDisplay;
43483
- } else if (tc.status === CoreToolCallStatus.Executing) {
43466
+ } else if (tc.status === "executing" /* Executing */) {
43484
43467
  hasResultDisplay = !!tc.liveOutput;
43485
43468
  }
43486
43469
  if (shouldHideToolCall({
@@ -43542,7 +43525,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43542
43525
  prevActiveShellPtyIdRef.current = activeShellPtyId;
43543
43526
  }, [activeShellPtyId, addItem, setIsResponding]);
43544
43527
  (0, import_react106.useEffect)(() => {
43545
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
43528
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
43546
43529
  const lastUserMessageIndex = history.findLastIndex(
43547
43530
  (item) => item.type === "user" /* USER */
43548
43531
  );
@@ -43627,7 +43610,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43627
43610
  if (tool.name === SHELL_COMMAND_NAME) {
43628
43611
  return {
43629
43612
  ...tool,
43630
- status: CoreToolCallStatus.Cancelled,
43613
+ status: "cancelled" /* Cancelled */,
43631
43614
  resultDisplay: tool.resultDisplay
43632
43615
  };
43633
43616
  }
@@ -43683,7 +43666,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43683
43666
  let localQueryToSendToGemini = null;
43684
43667
  if (typeof query === "string") {
43685
43668
  const trimmedQuery = query.trim();
43686
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
43669
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
43687
43670
  if (!shellModeActive) {
43688
43671
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
43689
43672
  if (slashCommandResult) {
@@ -43839,7 +43822,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43839
43822
  if (pendingHistoryItemRef.current) {
43840
43823
  if (pendingHistoryItemRef.current.type === "tool_group") {
43841
43824
  const updatedTools = pendingHistoryItemRef.current.tools.map(
43842
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
43825
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
43843
43826
  );
43844
43827
  const pendingItem = {
43845
43828
  ...pendingHistoryItemRef.current,
@@ -44085,15 +44068,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44085
44068
  let geminiMessageBuffer = "";
44086
44069
  const toolCallRequests = [];
44087
44070
  for await (const event of stream) {
44088
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
44071
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
44089
44072
  setThought(null);
44090
44073
  }
44091
44074
  switch (event.type) {
44092
- case GeminiEventType.Thought:
44075
+ case "thought" /* Thought */:
44093
44076
  setLastGeminiActivityTime(Date.now());
44094
44077
  handleThoughtEvent(event.value, userMessageTimestamp);
44095
44078
  break;
44096
- case GeminiEventType.Content:
44079
+ case "content" /* Content */:
44097
44080
  setLastGeminiActivityTime(Date.now());
44098
44081
  geminiMessageBuffer = handleContentEvent(
44099
44082
  event.value,
@@ -44101,16 +44084,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44101
44084
  userMessageTimestamp
44102
44085
  );
44103
44086
  break;
44104
- case GeminiEventType.ToolCallRequest:
44087
+ case "tool_call_request" /* ToolCallRequest */:
44105
44088
  toolCallRequests.push(event.value);
44106
44089
  break;
44107
- case GeminiEventType.UserCancelled:
44090
+ case "user_cancelled" /* UserCancelled */:
44108
44091
  handleUserCancelledEvent(userMessageTimestamp);
44109
44092
  break;
44110
- case GeminiEventType.Error:
44093
+ case "error" /* Error */:
44111
44094
  handleErrorEvent(event.value, userMessageTimestamp);
44112
44095
  break;
44113
- case GeminiEventType.AgentExecutionStopped:
44096
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
44114
44097
  handleAgentExecutionStoppedEvent(
44115
44098
  event.value.reason,
44116
44099
  userMessageTimestamp,
@@ -44118,7 +44101,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44118
44101
  event.value.contextCleared
44119
44102
  );
44120
44103
  break;
44121
- case GeminiEventType.AgentExecutionBlocked:
44104
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
44122
44105
  handleAgentExecutionBlockedEvent(
44123
44106
  event.value.reason,
44124
44107
  userMessageTimestamp,
@@ -44126,35 +44109,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44126
44109
  event.value.contextCleared
44127
44110
  );
44128
44111
  break;
44129
- case GeminiEventType.ChatCompressed:
44112
+ case "chat_compressed" /* ChatCompressed */:
44130
44113
  handleChatCompressionEvent(event.value, userMessageTimestamp);
44131
44114
  break;
44132
- case GeminiEventType.ToolCallConfirmation:
44133
- case GeminiEventType.ToolCallResponse:
44115
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
44116
+ case "tool_call_response" /* ToolCallResponse */:
44134
44117
  break;
44135
- case GeminiEventType.MaxSessionTurns:
44118
+ case "max_session_turns" /* MaxSessionTurns */:
44136
44119
  handleMaxSessionTurnsEvent();
44137
44120
  break;
44138
- case GeminiEventType.ContextWindowWillOverflow:
44121
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
44139
44122
  handleContextWindowWillOverflowEvent(
44140
44123
  event.value.estimatedRequestTokenCount,
44141
44124
  event.value.remainingTokenCount
44142
44125
  );
44143
44126
  break;
44144
- case GeminiEventType.Finished:
44127
+ case "finished" /* Finished */:
44145
44128
  handleFinishedEvent(event, userMessageTimestamp);
44146
44129
  break;
44147
- case GeminiEventType.Citation:
44130
+ case "citation" /* Citation */:
44148
44131
  handleCitationEvent(event.value, userMessageTimestamp);
44149
44132
  break;
44150
- case GeminiEventType.ModelInfo:
44133
+ case "model_info" /* ModelInfo */:
44151
44134
  handleChatModelEvent(event.value, userMessageTimestamp);
44152
44135
  break;
44153
- case GeminiEventType.LoopDetected:
44136
+ case "loop_detected" /* LoopDetected */:
44154
44137
  loopDetectedRef.current = true;
44155
44138
  break;
44156
- case GeminiEventType.Retry:
44157
- case GeminiEventType.InvalidStream:
44139
+ case "retry" /* Retry */:
44140
+ case "invalid_stream" /* InvalidStream */:
44158
44141
  break;
44159
44142
  default: {
44160
44143
  const unreachable = event;
@@ -44195,7 +44178,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44195
44178
  const submitQuery = (0, import_react106.useCallback)(
44196
44179
  async (query, options, prompt_id) => runInDevTraceSpan(
44197
44180
  {
44198
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt
44181
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */
44199
44182
  },
44200
44183
  async ({ metadata: spanMetadata }) => {
44201
44184
  spanMetadata.input = query;
@@ -44354,7 +44337,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44354
44337
  );
44355
44338
  const handleApprovalModeChange = (0, import_react106.useCallback)(
44356
44339
  async (newApprovalMode) => {
44357
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
44340
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
44358
44341
  if (geminiClient) {
44359
44342
  try {
44360
44343
  await geminiClient.addHistory({
@@ -44377,11 +44360,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44377
44360
  }
44378
44361
  }
44379
44362
  previousApprovalModeRef.current = newApprovalMode;
44380
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
44363
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
44381
44364
  let awaitingApprovalCalls = toolCalls.filter(
44382
44365
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
44383
44366
  );
44384
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
44367
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
44385
44368
  awaitingApprovalCalls = awaitingApprovalCalls.filter(
44386
44369
  (call) => EDIT_TOOL_NAMES.has(call.request.name)
44387
44370
  );
@@ -44390,11 +44373,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44390
44373
  if (call.correlationId) {
44391
44374
  try {
44392
44375
  await config.getMessageBus().publish({
44393
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
44376
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
44394
44377
  correlationId: call.correlationId,
44395
44378
  confirmed: true,
44396
44379
  requiresUserConfirmation: false,
44397
- outcome: ToolConfirmationOutcome.ProceedOnce
44380
+ outcome: "proceed_once" /* ProceedOnce */
44398
44381
  });
44399
44382
  } catch (error) {
44400
44383
  debugLogger.warn(
@@ -44472,14 +44455,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44472
44455
  );
44473
44456
  if (isLowErrorVerbosity) {
44474
44457
  suppressedToolErrorCountRef.current += geminiTools.filter(
44475
- (tc) => tc.status === CoreToolCallStatus.Error
44458
+ (tc) => tc.status === "error" /* Error */
44476
44459
  ).length;
44477
44460
  }
44478
44461
  if (geminiTools.length === 0) {
44479
44462
  return;
44480
44463
  }
44481
44464
  const stopExecutionTool = geminiTools.find(
44482
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
44465
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
44483
44466
  );
44484
44467
  if (stopExecutionTool && stopExecutionTool.response.error) {
44485
44468
  maybeAddSuppressedToolErrorNote();
@@ -44496,7 +44479,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44496
44479
  return;
44497
44480
  }
44498
44481
  const allToolsCancelled = geminiTools.every(
44499
- (tc) => tc.status === CoreToolCallStatus.Cancelled
44482
+ (tc) => tc.status === "cancelled" /* Cancelled */
44500
44483
  );
44501
44484
  if (allToolsCancelled) {
44502
44485
  if (!turnCancelledRef.current) {
@@ -44578,7 +44561,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44578
44561
  return;
44579
44562
  }
44580
44563
  const restorableToolCalls = toolCalls.filter(
44581
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
44564
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
44582
44565
  );
44583
44566
  if (restorableToolCalls.length > 0) {
44584
44567
  if (!gitService) {
@@ -47045,7 +47028,7 @@ function useMessageQueue({
47045
47028
  var import_react113 = __toESM(require_react(), 1);
47046
47029
  function useMcpStatus(config) {
47047
47030
  const [discoveryState, setDiscoveryState] = (0, import_react113.useState)(
47048
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
47031
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
47049
47032
  );
47050
47033
  const [mcpServerCount, setMcpServerCount] = (0, import_react113.useState)(
47051
47034
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -47058,12 +47041,12 @@ function useMcpStatus(config) {
47058
47041
  setMcpServerCount(manager.getMcpServerCount());
47059
47042
  }
47060
47043
  };
47061
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
47044
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
47062
47045
  return () => {
47063
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
47046
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
47064
47047
  };
47065
47048
  }, [config]);
47066
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
47049
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
47067
47050
  return {
47068
47051
  discoveryState,
47069
47052
  mcpServerCount,
@@ -47090,7 +47073,7 @@ function useApprovalModeIndicator({
47090
47073
  (key) => {
47091
47074
  let nextApprovalMode;
47092
47075
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
47093
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
47076
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
47094
47077
  if (addItem) {
47095
47078
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
47096
47079
  const adminSettings = config.getRemoteAdminSettings();
@@ -47108,21 +47091,21 @@ function useApprovalModeIndicator({
47108
47091
  }
47109
47092
  return;
47110
47093
  }
47111
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
47094
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
47112
47095
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
47113
47096
  const currentMode = config.getApprovalMode();
47114
47097
  switch (currentMode) {
47115
- case ApprovalMode.DEFAULT:
47116
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
47098
+ case "default" /* DEFAULT */:
47099
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
47117
47100
  break;
47118
- case ApprovalMode.AUTO_EDIT:
47119
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
47101
+ case "autoEdit" /* AUTO_EDIT */:
47102
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
47120
47103
  break;
47121
- case ApprovalMode.PLAN:
47122
- nextApprovalMode = ApprovalMode.DEFAULT;
47104
+ case "plan" /* PLAN */:
47105
+ nextApprovalMode = "default" /* DEFAULT */;
47123
47106
  break;
47124
- case ApprovalMode.YOLO:
47125
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
47107
+ case "yolo" /* YOLO */:
47108
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
47126
47109
  break;
47127
47110
  default:
47128
47111
  }
@@ -47515,11 +47498,11 @@ var useHookDisplayState = () => {
47515
47498
  removeHook();
47516
47499
  }
47517
47500
  };
47518
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
47519
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
47501
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
47502
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
47520
47503
  return () => {
47521
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
47522
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
47504
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
47505
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
47523
47506
  activeTimeouts.forEach(clearTimeout);
47524
47507
  activeTimeouts.clear();
47525
47508
  };
@@ -48344,7 +48327,7 @@ var AppContainer = (props) => {
48344
48327
  }
48345
48328
  setConfigInitialized(true);
48346
48329
  startupProfiler.flush(config);
48347
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
48330
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
48348
48331
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
48349
48332
  if (result) {
48350
48333
  if (result.systemMessage) {
@@ -48380,7 +48363,7 @@ var AppContainer = (props) => {
48380
48363
  );
48381
48364
  const ideClient = await IdeClient.getInstance();
48382
48365
  await ideClient.disconnect();
48383
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
48366
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
48384
48367
  });
48385
48368
  }, [config, resumedSessionData]);
48386
48369
  (0, import_react127.useEffect)(
@@ -48398,11 +48381,11 @@ var AppContainer = (props) => {
48398
48381
  resetTime: payload.resetTime
48399
48382
  });
48400
48383
  };
48401
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
48402
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
48384
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
48385
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
48403
48386
  return () => {
48404
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
48405
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
48387
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
48388
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
48406
48389
  };
48407
48390
  }, [config]);
48408
48391
  (0, import_react127.useEffect)(() => {
@@ -48415,16 +48398,16 @@ var AppContainer = (props) => {
48415
48398
  const handleAgentsDiscovered = (payload) => {
48416
48399
  setNewAgents(payload.agents);
48417
48400
  };
48418
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
48419
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
48420
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
48401
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
48402
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
48403
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
48421
48404
  return () => {
48422
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
48405
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
48423
48406
  coreEvents.off(
48424
- CoreEvent.AdminSettingsChanged,
48407
+ "admin-settings-changed" /* AdminSettingsChanged */,
48425
48408
  handleAdminSettingsChanged
48426
48409
  );
48427
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
48410
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
48428
48411
  };
48429
48412
  }, [settings]);
48430
48413
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -48490,11 +48473,11 @@ var AppContainer = (props) => {
48490
48473
  exitEditorDialog
48491
48474
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
48492
48475
  (0, import_react127.useEffect)(() => {
48493
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
48494
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
48476
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
48477
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
48495
48478
  return () => {
48496
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
48497
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
48479
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
48480
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
48498
48481
  };
48499
48482
  }, [handleEditorClose, openEditorDialog]);
48500
48483
  (0, import_react127.useEffect)(() => {
@@ -48562,7 +48545,7 @@ var AppContainer = (props) => {
48562
48545
  errorVerbosity: settings.merged.ui.errorVerbosity
48563
48546
  });
48564
48547
  const isAuthDialogOpen = authState === "updating" /* Updating */;
48565
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
48548
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
48566
48549
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
48567
48550
  const { loadHistoryForResume, isResuming } = useSessionResume({
48568
48551
  config,
@@ -48590,7 +48573,7 @@ var AppContainer = (props) => {
48590
48573
  async (authType, scope) => {
48591
48574
  if (authType) {
48592
48575
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
48593
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
48576
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
48594
48577
  setAuthContext({ requiresRestart: true });
48595
48578
  } else {
48596
48579
  setAuthContext({});
@@ -48618,7 +48601,7 @@ var AppContainer = (props) => {
48618
48601
  );
48619
48602
  return;
48620
48603
  }
48621
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
48604
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
48622
48605
  writeToStdout(`
48623
48606
  ----------------------------------------------------------------
48624
48607
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -48643,7 +48626,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
48643
48626
  }
48644
48627
  await saveApiKey(apiKey);
48645
48628
  await reloadApiKey();
48646
- await config.refreshAuth(AuthType.USE_GEMINI);
48629
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
48647
48630
  setAuthState("authenticated" /* Authenticated */);
48648
48631
  } catch (e) {
48649
48632
  onAuthError(
@@ -48668,7 +48651,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
48668
48651
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
48669
48652
  );
48670
48653
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
48671
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
48654
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
48672
48655
  return;
48673
48656
  }
48674
48657
  const error = validateAuthMethod(
@@ -48787,9 +48770,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
48787
48770
  }
48788
48771
  });
48789
48772
  };
48790
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
48773
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
48791
48774
  return () => {
48792
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
48775
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
48793
48776
  };
48794
48777
  }, []);
48795
48778
  const performMemoryRefresh = (0, import_react127.useCallback)(async () => {
@@ -49406,7 +49389,7 @@ ${queuedText}` : queuedText;
49406
49389
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
49407
49390
  if (settings.merged.general.devtools) {
49408
49391
  void (async () => {
49409
- const { toggleDevToolsPanel } = await import("./devtoolsService-NRFH67X5.js");
49392
+ const { toggleDevToolsPanel } = await import("./devtoolsService-QPXA3DYV.js");
49410
49393
  await toggleDevToolsPanel(
49411
49394
  config,
49412
49395
  showErrorDetails,
@@ -49608,10 +49591,10 @@ ${queuedText}` : queuedText;
49608
49591
  );
49609
49592
  }
49610
49593
  };
49611
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
49594
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
49612
49595
  coreEvents.drainBacklogs();
49613
49596
  return () => {
49614
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
49597
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
49615
49598
  };
49616
49599
  }, [historyManager]);
49617
49600
  const nightly = props.version.includes("nightly");
@@ -49713,9 +49696,9 @@ ${queuedText}` : queuedText;
49713
49696
  const handleMemoryChanged = (result) => {
49714
49697
  setGeminiMdFileCount(result.fileCount);
49715
49698
  };
49716
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
49699
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
49717
49700
  return () => {
49718
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
49701
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
49719
49702
  };
49720
49703
  }, []);
49721
49704
  (0, import_react127.useEffect)(() => {