@google/gemini-cli 0.38.0 → 0.38.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 (28) hide show
  1. package/bundle/{chunk-E3PKFKX6.js → chunk-A3CCSDTB.js} +3 -3
  2. package/bundle/{chunk-UTDAP6W7.js → chunk-B7OCRC72.js} +3 -3
  3. package/bundle/{chunk-ZN2B66X6.js → chunk-C3HWPYQ6.js} +71 -59
  4. package/bundle/chunk-M5Q72DDY.js +85174 -0
  5. package/bundle/{chunk-UIKF2OKQ.js → chunk-QVG5CRLZ.js} +35 -27
  6. package/bundle/{chunk-A5WACHT3.js → chunk-VTZC6I7F.js} +36 -28
  7. package/bundle/{chunk-UKTSS4BC.js → chunk-XGCOPSUV.js} +6147 -11463
  8. package/bundle/chunk-ZTFHMKKJ.js +358524 -0
  9. package/bundle/{core-3K4DOF2Q.js → core-KQILLJHB.js} +1 -1
  10. package/bundle/{devtoolsService-4VP27OSR.js → devtoolsService-5M3WXUDY.js} +2 -2
  11. package/bundle/{devtoolsService-7O5W72JB.js → devtoolsService-BEZR7FLM.js} +2 -2
  12. package/bundle/{devtoolsService-6WC7CXEJ.js → devtoolsService-H4GY23C4.js} +5 -4
  13. package/bundle/devtoolsService-YE72BGQU.js +871 -0
  14. package/bundle/{dist-3YVD622R.js → dist-3OA65TOZ.js} +1 -1
  15. package/bundle/{core-TF7HWCEH.js → dist-5XEVU7IN.js} +2 -2
  16. package/bundle/dist-VGVT6XFG.js +1962 -0
  17. package/bundle/docs/cli/plan-mode.md +4 -0
  18. package/bundle/gemini.js +7 -7
  19. package/bundle/{interactiveCli-JYMN562N.js → interactiveCli-EOCVNM6H.js} +3 -3
  20. package/bundle/{interactiveCli-PTUYCBMF.js → interactiveCli-HY2PQVEN.js} +3 -3
  21. package/bundle/{interactiveCli-RKW6AY7S.js → interactiveCli-PJT3XCNJ.js} +270 -253
  22. package/bundle/interactiveCli-ZZDSQ5YT.js +49974 -0
  23. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  24. package/bundle/{oauth2-provider-NANAQOXS.js → oauth2-provider-5N6BXCUZ.js} +1 -1
  25. package/bundle/{oauth2-provider-UZQMUGRV.js → oauth2-provider-5XLVQZYJ.js} +39 -73
  26. package/bundle/oauth2-provider-7EQWCVGC.js +237 -0
  27. package/bundle/{oauth2-provider-EG32OGVI.js → oauth2-provider-PFVXC625.js} +1 -1
  28. package/package.json +1 -1
@@ -188,12 +188,14 @@ import {
188
188
  widestLineFromStyledChars,
189
189
  wordBreakStyledChars,
190
190
  wrapStyledChars
191
- } from "./chunk-E3PKFKX6.js";
191
+ } from "./chunk-M5Q72DDY.js";
192
192
  import {
193
193
  ApiKeyUpdatedEvent,
194
194
  AsyncFzf,
195
195
  AuthType,
196
+ CompressionStatus,
196
197
  ConversationFinishedEvent,
198
+ CoreToolCallStatus,
197
199
  CreditPurchaseClickEvent,
198
200
  EDITOR_DISPLAY_NAMES,
199
201
  EmptyWalletMenuShownEvent,
@@ -203,10 +205,15 @@ import {
203
205
  FileSearchFactory,
204
206
  FolderTrustDiscoveryService,
205
207
  G1_UTM_CAMPAIGNS,
208
+ GeminiCliOperation,
209
+ GeminiEventType,
206
210
  GitService,
207
211
  IdeClient,
208
212
  LlmRole,
209
213
  Logger,
214
+ MCPDiscoveryState,
215
+ MCPServerStatus,
216
+ MessageSenderType,
210
217
  ModelNotFoundError,
211
218
  ModelSlashCommandEvent,
212
219
  OverageMenuShownEvent,
@@ -215,6 +222,8 @@ import {
215
222
  ProjectIdRequiredError,
216
223
  ROOT_SCHEDULER_ID,
217
224
  Scheduler,
225
+ SessionEndReason,
226
+ SessionStartSource,
218
227
  ShellExecutionService,
219
228
  SlashCommandStatus,
220
229
  TerminalQuotaError,
@@ -222,6 +231,7 @@ import {
222
231
  UserPromptEvent,
223
232
  UserTierId,
224
233
  ValidationRequiredError,
234
+ WarningPriority,
225
235
  addMCPStatusChangeListener,
226
236
  allowEditorTypeInSandbox,
227
237
  buildG1Url,
@@ -299,10 +309,12 @@ import {
299
309
  validatePlanContent,
300
310
  validatePlanPath,
301
311
  writeToStdout
302
- } from "./chunk-A5WACHT3.js";
312
+ } from "./chunk-XGCOPSUV.js";
303
313
  import {
304
314
  ACTIVATE_SKILL_TOOL_NAME,
315
+ ApprovalMode,
305
316
  ChangeAuthRequestedError,
317
+ CoreEvent,
306
318
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
307
319
  DEFAULT_GEMINI_FLASH_MODEL,
308
320
  DEFAULT_GEMINI_MODEL,
@@ -313,13 +325,16 @@ import {
313
325
  GEMINI_DIR,
314
326
  GLOB_DISPLAY_NAME,
315
327
  GREP_DISPLAY_NAME,
328
+ Kind,
316
329
  LS_DISPLAY_NAME,
330
+ MessageBusType,
317
331
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
318
332
  PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
319
333
  PREVIEW_GEMINI_3_1_MODEL,
320
334
  PREVIEW_GEMINI_FLASH_MODEL,
321
335
  PREVIEW_GEMINI_MODEL,
322
336
  PREVIEW_GEMINI_MODEL_AUTO,
337
+ QuestionType,
323
338
  READ_FILE_DISPLAY_NAME,
324
339
  READ_MANY_FILES_DISPLAY_NAME,
325
340
  SHELL_TOOL_NAME,
@@ -327,6 +342,8 @@ import {
327
342
  TOPIC_PARAM_STRATEGIC_INTENT,
328
343
  TOPIC_PARAM_SUMMARY,
329
344
  TOPIC_PARAM_TITLE,
345
+ ToolConfirmationOutcome,
346
+ ToolErrorType,
330
347
  UPDATE_TOPIC_DISPLAY_NAME,
331
348
  UPDATE_TOPIC_TOOL_NAME,
332
349
  UnauthorizedError,
@@ -356,7 +373,7 @@ import {
356
373
  safeJsonToMarkdown,
357
374
  shortenPath,
358
375
  tildeifyPath
359
- } from "./chunk-Z34XA6FT.js";
376
+ } from "./chunk-ETUADTWF.js";
360
377
  import "./chunk-664ZODQF.js";
361
378
  import {
362
379
  appEvents
@@ -21580,7 +21597,7 @@ function calculateShellMaxLines(options) {
21580
21597
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
21581
21598
  return maxLinesBasedOnHeight;
21582
21599
  }
21583
- const isExecuting = status === "executing" /* Executing */;
21600
+ const isExecuting = status === CoreToolCallStatus.Executing;
21584
21601
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
21585
21602
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
21586
21603
  }
@@ -21613,10 +21630,10 @@ function isShellTool(name) {
21613
21630
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
21614
21631
  }
21615
21632
  function isThisShellFocusable(name, status, config) {
21616
- return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
21633
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
21617
21634
  }
21618
21635
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
21619
- return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
21636
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
21620
21637
  }
21621
21638
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
21622
21639
  const [userHasFocused, setUserHasFocused] = (0, import_react21.useState)(false);
@@ -22214,7 +22231,7 @@ var ToolMessage = ({
22214
22231
  paddingX: 1,
22215
22232
  flexDirection: "column",
22216
22233
  children: [
22217
- status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
22234
+ status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
22218
22235
  McpProgressIndicator,
22219
22236
  {
22220
22237
  progress,
@@ -22231,8 +22248,8 @@ var ToolMessage = ({
22231
22248
  terminalWidth,
22232
22249
  renderOutputAsMarkdown,
22233
22250
  hasFocus: isThisShellFocused2,
22234
- maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
22235
- overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
22251
+ maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
22252
+ overflowDirection: kind === Kind.Agent ? "bottom" : "top"
22236
22253
  }
22237
22254
  ),
22238
22255
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
@@ -22957,7 +22974,7 @@ var ShellToolMessage = ({
22957
22974
  maxLinesLimit: maxLines
22958
22975
  });
22959
22976
  import_react29.default.useEffect(() => {
22960
- const isExecuting = status === "executing" /* Executing */;
22977
+ const isExecuting = status === CoreToolCallStatus.Executing;
22961
22978
  if (isExecuting && ptyId) {
22962
22979
  try {
22963
22980
  const childWidth = terminalWidth - 4;
@@ -23143,14 +23160,14 @@ var ToolActionsProvider = (props) => {
23143
23160
  }
23144
23161
  const details = tool.confirmationDetails;
23145
23162
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
23146
- const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
23163
+ const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
23147
23164
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
23148
23165
  }
23149
23166
  if (tool.correlationId) {
23150
23167
  await config.getMessageBus().publish({
23151
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
23168
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
23152
23169
  correlationId: tool.correlationId,
23153
- confirmed: outcome !== "cancel" /* Cancel */,
23170
+ confirmed: outcome !== ToolConfirmationOutcome.Cancel,
23154
23171
  requiresUserConfirmation: false,
23155
23172
  outcome,
23156
23173
  payload
@@ -23169,7 +23186,7 @@ var ToolActionsProvider = (props) => {
23169
23186
  );
23170
23187
  const cancel = (0, import_react30.useCallback)(
23171
23188
  async (callId) => {
23172
- await confirm(callId, "cancel" /* Cancel */);
23189
+ await confirm(callId, ToolConfirmationOutcome.Cancel);
23173
23190
  },
23174
23191
  [confirm]
23175
23192
  );
@@ -23467,22 +23484,22 @@ var RenderItemsList = ({ items, maxVisible = 20 }) => {
23467
23484
  function getFileOpData(diff2, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
23468
23485
  const added = (diff2.diffStat?.model_added_lines ?? 0) + (diff2.diffStat?.user_added_lines ?? 0);
23469
23486
  const removed = (diff2.diffStat?.model_removed_lines ?? 0) + (diff2.diffStat?.user_removed_lines ?? 0);
23470
- const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
23487
+ const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
23471
23488
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
23472
23489
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
23473
23490
  const showDiffStat = !!diff2.diffStat;
23474
23491
  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 }) });
23475
23492
  let resultSummary = "";
23476
23493
  let resultColor = theme.text.secondary;
23477
- if (status === "awaiting_approval" /* AwaitingApproval */) {
23494
+ if (status === CoreToolCallStatus.AwaitingApproval) {
23478
23495
  resultSummary = "Confirming";
23479
- } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
23496
+ } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
23480
23497
  resultSummary = "Accepted";
23481
23498
  resultColor = theme.text.accent;
23482
- } else if (status === "cancelled" /* Cancelled */) {
23499
+ } else if (status === CoreToolCallStatus.Cancelled) {
23483
23500
  resultSummary = "Rejected";
23484
23501
  resultColor = theme.status.error;
23485
- } else if (status === "error" /* Error */) {
23502
+ } else if (status === CoreToolCallStatus.Error) {
23486
23503
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
23487
23504
  resultColor = theme.status.error;
23488
23505
  }
@@ -23513,7 +23530,7 @@ function getFileOpData(diff2, status, resultDisplay, terminalWidth, availableTer
23513
23530
  filename: diff2.fileName,
23514
23531
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
23515
23532
  availableTerminalHeight,
23516
- disableColor: status === "cancelled" /* Cancelled */
23533
+ disableColor: status === CoreToolCallStatus.Cancelled
23517
23534
  }
23518
23535
  );
23519
23536
  return { description, summary, payload };
@@ -23657,10 +23674,10 @@ var DenseToolMessage = (props) => {
23657
23674
  if (isGrepResult(resultDisplay)) {
23658
23675
  return getGenericSuccessData(resultDisplay, originalDescription);
23659
23676
  }
23660
- if (status === "success" /* Success */ && resultDisplay) {
23677
+ if (status === CoreToolCallStatus.Success && resultDisplay) {
23661
23678
  return getGenericSuccessData(resultDisplay, originalDescription);
23662
23679
  }
23663
- if (status === "error" /* Error */) {
23680
+ if (status === CoreToolCallStatus.Error) {
23664
23681
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
23665
23682
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
23666
23683
  "\u2192 ",
@@ -23701,7 +23718,7 @@ var DenseToolMessage = (props) => {
23701
23718
  language: fileExtension,
23702
23719
  maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
23703
23720
  settings,
23704
- disableColor: status === "cancelled" /* Cancelled */,
23721
+ disableColor: status === CoreToolCallStatus.Cancelled,
23705
23722
  returnLines: true
23706
23723
  });
23707
23724
  } else {
@@ -23709,7 +23726,7 @@ var DenseToolMessage = (props) => {
23709
23726
  parsedLines,
23710
23727
  filename: diff2.fileName,
23711
23728
  terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
23712
- disableColor: status === "cancelled" /* Cancelled */
23729
+ disableColor: status === CoreToolCallStatus.Cancelled
23713
23730
  });
23714
23731
  }
23715
23732
  }, [diff2, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -23809,14 +23826,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
23809
23826
  if (isTrackedToolCall(t)) {
23810
23827
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
23811
23828
  } else {
23812
- return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
23829
+ return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
23813
23830
  }
23814
23831
  });
23815
23832
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
23816
23833
  if (isTrackedToolCall(t)) {
23817
23834
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
23818
23835
  } else {
23819
- return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
23836
+ return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
23820
23837
  }
23821
23838
  });
23822
23839
  const isShellCommand = toolsToInspect.some((t) => {
@@ -23887,7 +23904,7 @@ var ToolGroupMessage = ({
23887
23904
  const isCompactModeEnabled = settings.merged.ui?.compactToolOutput === true;
23888
23905
  const visibleToolCalls = (0, import_react34.useMemo)(
23889
23906
  () => allToolCalls.filter((t) => {
23890
- if (isLowErrorVerbosity && t.status === "error" /* Error */ && !t.isClientInitiated) {
23907
+ if (isLowErrorVerbosity && t.status === CoreToolCallStatus.Error && !t.isClientInitiated) {
23891
23908
  return false;
23892
23909
  }
23893
23910
  if (shouldHideToolCall({
@@ -23930,7 +23947,7 @@ var ToolGroupMessage = ({
23930
23947
  const groupedTools = (0, import_react34.useMemo)(() => {
23931
23948
  const groups = [];
23932
23949
  for (const tool of visibleToolCalls) {
23933
- if (tool.kind === "agent" /* Agent */) {
23950
+ if (tool.kind === Kind.Agent) {
23934
23951
  const lastGroup = groups[groups.length - 1];
23935
23952
  if (Array.isArray(lastGroup)) {
23936
23953
  lastGroup.push(tool);
@@ -23990,7 +24007,7 @@ var ToolGroupMessage = ({
23990
24007
  ]);
23991
24008
  let countToolCallsWithResults = 0;
23992
24009
  for (const tool of visibleToolCalls) {
23993
- if (tool.kind !== "agent" /* Agent */) {
24010
+ if (tool.kind !== Kind.Agent) {
23994
24011
  if (isCompactTool(tool, isCompactModeEnabled)) {
23995
24012
  if (hasDensePayload(tool)) {
23996
24013
  countToolCallsWithResults++;
@@ -24193,18 +24210,18 @@ function CompressionMessage({
24193
24210
  return "Compressing chat history";
24194
24211
  }
24195
24212
  switch (compressionStatus) {
24196
- case 1 /* COMPRESSED */:
24213
+ case CompressionStatus.COMPRESSED:
24197
24214
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
24198
- case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
24215
+ case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
24199
24216
  if (originalTokens < 5e4) {
24200
24217
  return "Compression was not beneficial for this history size.";
24201
24218
  }
24202
24219
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
24203
- case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
24220
+ case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
24204
24221
  return "Could not compress chat history due to a token counting error.";
24205
- case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
24222
+ case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
24206
24223
  return "Chat history compression failed: the model returned an empty summary.";
24207
- case 5 /* NOOP */:
24224
+ case CompressionStatus.NOOP:
24208
24225
  return "Nothing to compress.";
24209
24226
  default:
24210
24227
  return "";
@@ -24620,8 +24637,8 @@ var ModelUsageTable = ({ models }) => {
24620
24637
  );
24621
24638
  roleEntries.sort(([a], [b]) => {
24622
24639
  if (a === b) return 0;
24623
- if (a === "main" /* MAIN */) return -1;
24624
- if (b === "main" /* MAIN */) return 1;
24640
+ if (a === LlmRole.MAIN) return -1;
24641
+ if (b === LlmRole.MAIN) return 1;
24625
24642
  return a.localeCompare(b);
24626
24643
  });
24627
24644
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -24952,8 +24969,8 @@ var ModelStatsDisplay = ({
24952
24969
  return validRoles.includes(role);
24953
24970
  }).sort((a, b) => {
24954
24971
  if (a === b) return 0;
24955
- if (a === "main" /* MAIN */) return -1;
24956
- if (b === "main" /* MAIN */) return 1;
24972
+ if (a === LlmRole.MAIN) return -1;
24973
+ if (b === LlmRole.MAIN) return 1;
24957
24974
  return a.localeCompare(b);
24958
24975
  });
24959
24976
  const createRow = (metric, getValue, options = {}) => {
@@ -25743,7 +25760,7 @@ var McpStatus = ({
25743
25760
  );
25744
25761
  const originalStatus = serverStatus(serverName);
25745
25762
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
25746
- const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
25763
+ const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
25747
25764
  let statusIndicator = "";
25748
25765
  let statusText = "";
25749
25766
  let statusColor = theme.text.primary;
@@ -25755,17 +25772,17 @@ var McpStatus = ({
25755
25772
  statusColor = theme.text.secondary;
25756
25773
  } else {
25757
25774
  switch (status) {
25758
- case "connected" /* CONNECTED */:
25775
+ case MCPServerStatus.CONNECTED:
25759
25776
  statusIndicator = "\u{1F7E2}";
25760
25777
  statusText = "Ready";
25761
25778
  statusColor = theme.status.success;
25762
25779
  break;
25763
- case "connecting" /* CONNECTING */:
25780
+ case MCPServerStatus.CONNECTING:
25764
25781
  statusIndicator = "\u{1F504}";
25765
25782
  statusText = "Starting... (first startup may take longer)";
25766
25783
  statusColor = theme.status.warning;
25767
25784
  break;
25768
- case "disconnected" /* DISCONNECTED */:
25785
+ case MCPServerStatus.DISCONNECTED:
25769
25786
  default:
25770
25787
  statusIndicator = "\u{1F534}";
25771
25788
  statusText = "Disconnected";
@@ -25813,12 +25830,12 @@ var McpStatus = ({
25813
25830
  /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { children: [
25814
25831
  " - ",
25815
25832
  statusText,
25816
- status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
25833
+ status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
25817
25834
  ] }),
25818
25835
  authStatusNode
25819
25836
  ] }),
25820
- status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
25821
- status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { children: [
25837
+ status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
25838
+ status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { children: [
25822
25839
  " (",
25823
25840
  toolCount,
25824
25841
  " tools cached)"
@@ -26302,7 +26319,7 @@ var Notifications = () => {
26302
26319
  if (dismissed) return [];
26303
26320
  const counts = persistentState.get("startupWarningCounts") || {};
26304
26321
  return startupWarnings.filter((w) => {
26305
- if (w.priority === "low" /* Low */) {
26322
+ if (w.priority === WarningPriority.Low) {
26306
26323
  const count = counts[w.id] || 0;
26307
26324
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
26308
26325
  }
@@ -26315,7 +26332,7 @@ var Notifications = () => {
26315
26332
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
26316
26333
  let changed = false;
26317
26334
  visibleWarnings.forEach((w) => {
26318
- if (w.priority === "low" /* Low */) {
26335
+ if (w.priority === WarningPriority.Low) {
26319
26336
  counts[w.id] = (counts[w.id] || 0) + 1;
26320
26337
  changed = true;
26321
26338
  }
@@ -26422,7 +26439,7 @@ var UserIdentity = ({ config }) => {
26422
26439
  }
26423
26440
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Box_default, { flexDirection: "column", children: [
26424
26441
  /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Box_default, { children: [
26425
- /* @__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: [
26442
+ /* @__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: [
26426
26443
  /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { bold: true, children: [
26427
26444
  "Signed in with Google",
26428
26445
  email ? ":" : ""
@@ -26683,7 +26700,7 @@ function isToolExecuting(pendingHistoryItems) {
26683
26700
  return pendingHistoryItems.some((item) => {
26684
26701
  if (item && item.type === "tool_group") {
26685
26702
  return item.tools.some(
26686
- (tool) => "executing" /* Executing */ === tool.status
26703
+ (tool) => CoreToolCallStatus.Executing === tool.status
26687
26704
  );
26688
26705
  }
26689
26706
  return false;
@@ -26692,7 +26709,7 @@ function isToolExecuting(pendingHistoryItems) {
26692
26709
  function isToolAwaitingConfirmation(pendingHistoryItems) {
26693
26710
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
26694
26711
  (item) => item.tools.some(
26695
- (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
26712
+ (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
26696
26713
  )
26697
26714
  );
26698
26715
  }
@@ -26704,7 +26721,7 @@ function getAllToolCalls(historyItems) {
26704
26721
  function getConfirmingToolState(pendingHistoryItems) {
26705
26722
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
26706
26723
  const confirmingTools = allPendingTools.filter(
26707
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
26724
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
26708
26725
  );
26709
26726
  if (confirmingTools.length === 0) {
26710
26727
  return null;
@@ -27999,7 +28016,7 @@ var ExitPlanModeDialog = ({
27999
28016
  {
28000
28017
  questions: [
28001
28018
  {
28002
- type: "choice" /* CHOICE */,
28019
+ type: QuestionType.CHOICE,
28003
28020
  header: "Approval",
28004
28021
  question: planContent,
28005
28022
  options: [
@@ -28020,9 +28037,9 @@ var ExitPlanModeDialog = ({
28020
28037
  onSubmit: (answers) => {
28021
28038
  const answer = answers["0"];
28022
28039
  if (answer === "Yes, automatically accept edits" /* Auto */) {
28023
- onApprove("autoEdit" /* AUTO_EDIT */);
28040
+ onApprove(ApprovalMode.AUTO_EDIT);
28024
28041
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
28025
- onApprove("default" /* DEFAULT */);
28042
+ onApprove(ApprovalMode.DEFAULT);
28026
28043
  } else if (answer) {
28027
28044
  onFeedback(answer);
28028
28045
  }
@@ -28233,7 +28250,7 @@ ${deceptiveUrlWarnings.map(
28233
28250
  );
28234
28251
  (0, import_react50.useEffect)(() => {
28235
28252
  if (isCancelling) {
28236
- handleConfirm("cancel" /* Cancel */);
28253
+ handleConfirm(ToolConfirmationOutcome.Cancel);
28237
28254
  }
28238
28255
  }, [isCancelling, handleConfirm]);
28239
28256
  const handleSelect = (0, import_react50.useCallback)(
@@ -28246,19 +28263,19 @@ ${deceptiveUrlWarnings.map(
28246
28263
  if (!confirmationDetails.isModifying) {
28247
28264
  options2.push({
28248
28265
  label: "Allow once",
28249
- value: "proceed_once" /* ProceedOnce */,
28266
+ value: ToolConfirmationOutcome.ProceedOnce,
28250
28267
  key: "Allow once"
28251
28268
  });
28252
28269
  if (isTrustedFolder) {
28253
28270
  options2.push({
28254
28271
  label: "Allow for this session",
28255
- value: "proceed_always" /* ProceedAlways */,
28272
+ value: ToolConfirmationOutcome.ProceedAlways,
28256
28273
  key: "Allow for this session"
28257
28274
  });
28258
28275
  if (allowPermanentApproval) {
28259
28276
  options2.push({
28260
28277
  label: "Allow for this file in all future sessions",
28261
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28278
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28262
28279
  key: "Allow for this file in all future sessions"
28263
28280
  });
28264
28281
  }
@@ -28266,119 +28283,119 @@ ${deceptiveUrlWarnings.map(
28266
28283
  if (!config.getIdeMode() || !isDiffingEnabled) {
28267
28284
  options2.push({
28268
28285
  label: "Modify with external editor",
28269
- value: "modify_with_editor" /* ModifyWithEditor */,
28286
+ value: ToolConfirmationOutcome.ModifyWithEditor,
28270
28287
  key: "Modify with external editor"
28271
28288
  });
28272
28289
  }
28273
28290
  options2.push({
28274
28291
  label: "No, suggest changes (esc)",
28275
- value: "cancel" /* Cancel */,
28292
+ value: ToolConfirmationOutcome.Cancel,
28276
28293
  key: "No, suggest changes (esc)"
28277
28294
  });
28278
28295
  }
28279
28296
  } else if (confirmationDetails.type === "sandbox_expansion") {
28280
28297
  options2.push({
28281
28298
  label: "Allow once",
28282
- value: "proceed_once" /* ProceedOnce */,
28299
+ value: ToolConfirmationOutcome.ProceedOnce,
28283
28300
  key: "Allow once"
28284
28301
  });
28285
28302
  if (isTrustedFolder) {
28286
28303
  options2.push({
28287
28304
  label: "Allow for this session",
28288
- value: "proceed_always" /* ProceedAlways */,
28305
+ value: ToolConfirmationOutcome.ProceedAlways,
28289
28306
  key: "Allow for this session"
28290
28307
  });
28291
28308
  if (allowPermanentApproval) {
28292
28309
  options2.push({
28293
28310
  label: "Allow for all future sessions",
28294
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28311
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28295
28312
  key: "Allow for all future sessions"
28296
28313
  });
28297
28314
  }
28298
28315
  }
28299
28316
  options2.push({
28300
28317
  label: "No, suggest changes (esc)",
28301
- value: "cancel" /* Cancel */,
28318
+ value: ToolConfirmationOutcome.Cancel,
28302
28319
  key: "No, suggest changes (esc)"
28303
28320
  });
28304
28321
  } else if (confirmationDetails.type === "exec") {
28305
28322
  options2.push({
28306
28323
  label: "Allow once",
28307
- value: "proceed_once" /* ProceedOnce */,
28324
+ value: ToolConfirmationOutcome.ProceedOnce,
28308
28325
  key: "Allow once"
28309
28326
  });
28310
28327
  if (isTrustedFolder) {
28311
28328
  options2.push({
28312
28329
  label: `Allow for this session`,
28313
- value: "proceed_always" /* ProceedAlways */,
28330
+ value: ToolConfirmationOutcome.ProceedAlways,
28314
28331
  key: `Allow for this session`
28315
28332
  });
28316
28333
  if (allowPermanentApproval) {
28317
28334
  options2.push({
28318
28335
  label: `Allow this command for all future sessions`,
28319
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28336
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28320
28337
  key: `Allow for all future sessions`
28321
28338
  });
28322
28339
  }
28323
28340
  }
28324
28341
  options2.push({
28325
28342
  label: "No, suggest changes (esc)",
28326
- value: "cancel" /* Cancel */,
28343
+ value: ToolConfirmationOutcome.Cancel,
28327
28344
  key: "No, suggest changes (esc)"
28328
28345
  });
28329
28346
  } else if (confirmationDetails.type === "info") {
28330
28347
  options2.push({
28331
28348
  label: "Allow once",
28332
- value: "proceed_once" /* ProceedOnce */,
28349
+ value: ToolConfirmationOutcome.ProceedOnce,
28333
28350
  key: "Allow once"
28334
28351
  });
28335
28352
  if (isTrustedFolder) {
28336
28353
  options2.push({
28337
28354
  label: "Allow for this session",
28338
- value: "proceed_always" /* ProceedAlways */,
28355
+ value: ToolConfirmationOutcome.ProceedAlways,
28339
28356
  key: "Allow for this session"
28340
28357
  });
28341
28358
  if (allowPermanentApproval) {
28342
28359
  options2.push({
28343
28360
  label: "Allow for all future sessions",
28344
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28361
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28345
28362
  key: "Allow for all future sessions"
28346
28363
  });
28347
28364
  }
28348
28365
  }
28349
28366
  options2.push({
28350
28367
  label: "No, suggest changes (esc)",
28351
- value: "cancel" /* Cancel */,
28368
+ value: ToolConfirmationOutcome.Cancel,
28352
28369
  key: "No, suggest changes (esc)"
28353
28370
  });
28354
28371
  } else if (confirmationDetails.type === "mcp") {
28355
28372
  options2.push({
28356
28373
  label: "Allow once",
28357
- value: "proceed_once" /* ProceedOnce */,
28374
+ value: ToolConfirmationOutcome.ProceedOnce,
28358
28375
  key: "Allow once"
28359
28376
  });
28360
28377
  if (isTrustedFolder) {
28361
28378
  options2.push({
28362
28379
  label: "Allow tool for this session",
28363
- value: "proceed_always_tool" /* ProceedAlwaysTool */,
28380
+ value: ToolConfirmationOutcome.ProceedAlwaysTool,
28364
28381
  key: "Allow tool for this session"
28365
28382
  });
28366
28383
  options2.push({
28367
28384
  label: "Allow all server tools for this session",
28368
- value: "proceed_always_server" /* ProceedAlwaysServer */,
28385
+ value: ToolConfirmationOutcome.ProceedAlwaysServer,
28369
28386
  key: "Allow all server tools for this session"
28370
28387
  });
28371
28388
  if (allowPermanentApproval) {
28372
28389
  options2.push({
28373
28390
  label: "Allow tool for all future sessions",
28374
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28391
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28375
28392
  key: "Allow tool for all future sessions"
28376
28393
  });
28377
28394
  }
28378
28395
  }
28379
28396
  options2.push({
28380
28397
  label: "No, suggest changes (esc)",
28381
- value: "cancel" /* Cancel */,
28398
+ value: ToolConfirmationOutcome.Cancel,
28382
28399
  key: "No, suggest changes (esc)"
28383
28400
  });
28384
28401
  }
@@ -28417,7 +28434,7 @@ ${deceptiveUrlWarnings.map(
28417
28434
  const containsRedirection = commandsToDisplay.some(
28418
28435
  (cmd) => hasRedirection(cmd)
28419
28436
  );
28420
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
28437
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
28421
28438
  if (containsRedirection && !isAutoEdit) {
28422
28439
  extraInfoLines = 1;
28423
28440
  }
@@ -28443,7 +28460,7 @@ ${deceptiveUrlWarnings.map(
28443
28460
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
28444
28461
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
28445
28462
  const alwaysAndSaveIndex = options2.findIndex(
28446
- (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
28463
+ (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
28447
28464
  );
28448
28465
  if (alwaysAndSaveIndex !== -1) {
28449
28466
  initialIndex2 = alwaysAndSaveIndex;
@@ -28460,10 +28477,10 @@ ${deceptiveUrlWarnings.map(
28460
28477
  {
28461
28478
  questions: confirmationDetails.questions,
28462
28479
  onSubmit: (answers) => {
28463
- handleConfirm("proceed_once" /* ProceedOnce */, { answers });
28480
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
28464
28481
  },
28465
28482
  onCancel: () => {
28466
- handleConfirm("cancel" /* Cancel */);
28483
+ handleConfirm(ToolConfirmationOutcome.Cancel);
28467
28484
  },
28468
28485
  width: terminalWidth,
28469
28486
  availableHeight: bodyHeight
@@ -28484,19 +28501,19 @@ ${deceptiveUrlWarnings.map(
28484
28501
  planPath: confirmationDetails.planPath,
28485
28502
  getPreferredEditor,
28486
28503
  onApprove: (approvalMode) => {
28487
- handleConfirm("proceed_once" /* ProceedOnce */, {
28504
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
28488
28505
  approved: true,
28489
28506
  approvalMode
28490
28507
  });
28491
28508
  },
28492
28509
  onFeedback: (feedback) => {
28493
- handleConfirm("proceed_once" /* ProceedOnce */, {
28510
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
28494
28511
  approved: false,
28495
28512
  feedback
28496
28513
  });
28497
28514
  },
28498
28515
  onCancel: () => {
28499
- handleConfirm("cancel" /* Cancel */);
28516
+ handleConfirm(ToolConfirmationOutcome.Cancel);
28500
28517
  },
28501
28518
  width: terminalWidth,
28502
28519
  availableHeight: bodyHeight
@@ -28606,7 +28623,7 @@ ${deceptiveUrlWarnings.map(
28606
28623
  const containsRedirection = commandsToDisplay.some(
28607
28624
  (cmd) => hasRedirection(cmd)
28608
28625
  );
28609
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
28626
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
28610
28627
  let warnings = null;
28611
28628
  if (containsRedirection && !isAutoEdit) {
28612
28629
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -28769,7 +28786,7 @@ ${deceptiveUrlWarnings.map(
28769
28786
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
28770
28787
  const renderRadioItem = (0, import_react50.useCallback)(
28771
28788
  (item, { titleColor }) => {
28772
- if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
28789
+ if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
28773
28790
  return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
28774
28791
  item.label,
28775
28792
  " ",
@@ -30951,7 +30968,7 @@ function validateAuthMethodWithSettings(authType, settings) {
30951
30968
  if (settings.merged.security.auth.useExternal) {
30952
30969
  return null;
30953
30970
  }
30954
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
30971
+ if (authType === AuthType.USE_GEMINI) {
30955
30972
  return null;
30956
30973
  }
30957
30974
  return validateAuthMethod(authType);
@@ -31003,7 +31020,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
31003
31020
  }
31004
31021
  return;
31005
31022
  }
31006
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
31023
+ if (authType === AuthType.USE_GEMINI) {
31007
31024
  const key = await reloadApiKey();
31008
31025
  if (!key) {
31009
31026
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -31078,31 +31095,31 @@ function AuthDialog({
31078
31095
  let items = [
31079
31096
  {
31080
31097
  label: "Sign in with Google",
31081
- value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
31082
- key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
31098
+ value: AuthType.LOGIN_WITH_GOOGLE,
31099
+ key: AuthType.LOGIN_WITH_GOOGLE
31083
31100
  },
31084
31101
  ...process.env["CLOUD_SHELL"] === "true" ? [
31085
31102
  {
31086
31103
  label: "Use Cloud Shell user credentials",
31087
- value: "compute-default-credentials" /* COMPUTE_ADC */,
31088
- key: "compute-default-credentials" /* COMPUTE_ADC */
31104
+ value: AuthType.COMPUTE_ADC,
31105
+ key: AuthType.COMPUTE_ADC
31089
31106
  }
31090
31107
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
31091
31108
  {
31092
31109
  label: "Use metadata server application default credentials",
31093
- value: "compute-default-credentials" /* COMPUTE_ADC */,
31094
- key: "compute-default-credentials" /* COMPUTE_ADC */
31110
+ value: AuthType.COMPUTE_ADC,
31111
+ key: AuthType.COMPUTE_ADC
31095
31112
  }
31096
31113
  ] : [],
31097
31114
  {
31098
31115
  label: "Use Gemini API Key",
31099
- value: "gemini-api-key" /* USE_GEMINI */,
31100
- key: "gemini-api-key" /* USE_GEMINI */
31116
+ value: AuthType.USE_GEMINI,
31117
+ key: AuthType.USE_GEMINI
31101
31118
  },
31102
31119
  {
31103
31120
  label: "Vertex AI",
31104
- value: "vertex-ai" /* USE_VERTEX_AI */,
31105
- key: "vertex-ai" /* USE_VERTEX_AI */
31121
+ value: AuthType.USE_VERTEX_AI,
31122
+ key: AuthType.USE_VERTEX_AI
31106
31123
  }
31107
31124
  ];
31108
31125
  if (settings.merged.security.auth.enforcedType) {
@@ -31124,9 +31141,9 @@ function AuthDialog({
31124
31141
  return item.value === defaultAuthType;
31125
31142
  }
31126
31143
  if (process.env["GEMINI_API_KEY"]) {
31127
- return item.value === "gemini-api-key" /* USE_GEMINI */;
31144
+ return item.value === AuthType.USE_GEMINI;
31128
31145
  }
31129
- return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
31146
+ return item.value === AuthType.LOGIN_WITH_GOOGLE;
31130
31147
  });
31131
31148
  if (settings.merged.security.auth.enforcedType) {
31132
31149
  initialAuthIndex = 0;
@@ -31137,19 +31154,19 @@ function AuthDialog({
31137
31154
  return;
31138
31155
  }
31139
31156
  if (authType) {
31140
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
31157
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
31141
31158
  setAuthContext({ requiresRestart: true });
31142
31159
  } else {
31143
31160
  setAuthContext({});
31144
31161
  }
31145
31162
  await clearCachedCredentialFile();
31146
31163
  settings.setValue(scope, "security.auth.selectedType", authType);
31147
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
31164
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
31148
31165
  setExiting(true);
31149
31166
  setTimeout(relaunchApp, 100);
31150
31167
  return;
31151
31168
  }
31152
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
31169
+ if (authType === AuthType.USE_GEMINI) {
31153
31170
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
31154
31171
  return;
31155
31172
  }
@@ -31899,11 +31916,11 @@ var PrivacyNoticeText = ({
31899
31916
  }) => {
31900
31917
  const authType = config.getContentGeneratorConfig()?.authType;
31901
31918
  switch (authType) {
31902
- case "gemini-api-key" /* USE_GEMINI */:
31919
+ case AuthType.USE_GEMINI:
31903
31920
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(GeminiPrivacyNotice, { onExit });
31904
- case "vertex-ai" /* USE_VERTEX_AI */:
31921
+ case AuthType.USE_VERTEX_AI:
31905
31922
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(CloudPaidPrivacyNotice, { onExit });
31906
- case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
31923
+ case AuthType.LOGIN_WITH_GOOGLE:
31907
31924
  default:
31908
31925
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(CloudFreePrivacyNotice, { config, onExit });
31909
31926
  }
@@ -31944,7 +31961,7 @@ function ProQuotaDialog({
31944
31961
  value: "retry_always",
31945
31962
  key: "retry_always"
31946
31963
  },
31947
- ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
31964
+ ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
31948
31965
  {
31949
31966
  label: "Upgrade for higher limits",
31950
31967
  value: "upgrade",
@@ -33097,7 +33114,7 @@ function ModelDialog({ onClose }) {
33097
33114
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
33098
33115
  const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
33099
33116
  const selectedAuthType = settings.merged.security.auth.selectedType;
33100
- const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
33117
+ const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
33101
33118
  const manualModelSelected = (0, import_react68.useMemo)(() => {
33102
33119
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
33103
33120
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -34148,10 +34165,10 @@ function initializeConsoleStore() {
34148
34165
  globalConsoleMessages = [];
34149
34166
  globalErrorCount = 0;
34150
34167
  notifyListeners();
34151
- coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
34152
- coreEvents.off("output" /* Output */, handleOutput);
34153
- coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
34154
- coreEvents.on("output" /* Output */, handleOutput);
34168
+ coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
34169
+ coreEvents.off(CoreEvent.Output, handleOutput);
34170
+ coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
34171
+ coreEvents.on(CoreEvent.Output, handleOutput);
34155
34172
  }
34156
34173
  function notifyListeners() {
34157
34174
  for (const listener of listeners) {
@@ -36227,7 +36244,7 @@ function usePromptCompletion({
36227
36244
  { model: "prompt-completion" },
36228
36245
  contents,
36229
36246
  signal,
36230
- "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
36247
+ LlmRole.UTILITY_AUTOCOMPLETE
36231
36248
  );
36232
36249
  if (signal.aborted) {
36233
36250
  return;
@@ -37964,9 +37981,9 @@ var InputPrompt = ({
37964
37981
  onSuggestionsVisibilityChange(shouldShowSuggestions);
37965
37982
  }
37966
37983
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
37967
- const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
37968
- const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
37969
- const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
37984
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
37985
+ const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
37986
+ const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
37970
37987
  let statusColor;
37971
37988
  let statusText = "";
37972
37989
  if (shellModeActive) {
@@ -38812,22 +38829,22 @@ var ApprovalModeIndicator = ({
38812
38829
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
38813
38830
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
38814
38831
  switch (approvalMode) {
38815
- case "autoEdit" /* AUTO_EDIT */:
38832
+ case ApprovalMode.AUTO_EDIT:
38816
38833
  textColor = theme.status.warning;
38817
38834
  textContent = "auto-accept edits";
38818
38835
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
38819
38836
  break;
38820
- case "plan" /* PLAN */:
38837
+ case ApprovalMode.PLAN:
38821
38838
  textColor = theme.status.success;
38822
38839
  textContent = "plan";
38823
38840
  subText = `${cycleHint} to manual`;
38824
38841
  break;
38825
- case "yolo" /* YOLO */:
38842
+ case ApprovalMode.YOLO:
38826
38843
  textColor = theme.status.error;
38827
38844
  textContent = "YOLO";
38828
38845
  subText = yoloHint;
38829
38846
  break;
38830
- case "default" /* DEFAULT */:
38847
+ case ApprovalMode.DEFAULT:
38831
38848
  default:
38832
38849
  textColor = theme.text.accent;
38833
38850
  textContent = "";
@@ -38874,7 +38891,7 @@ var useComposerStatus = () => {
38874
38891
  (item) => item.type === "tool_group"
38875
38892
  ).some(
38876
38893
  (item) => item.tools.some(
38877
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
38894
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
38878
38895
  )
38879
38896
  ),
38880
38897
  [uiState.pendingHistoryItems]
@@ -38889,13 +38906,13 @@ var useComposerStatus = () => {
38889
38906
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
38890
38907
  if (hideMinimalModeHintWhileBusy) return null;
38891
38908
  switch (showApprovalModeIndicator) {
38892
- case "yolo" /* YOLO */:
38909
+ case ApprovalMode.YOLO:
38893
38910
  return { text: "YOLO", color: theme.status.error };
38894
- case "plan" /* PLAN */:
38911
+ case ApprovalMode.PLAN:
38895
38912
  return { text: "plan", color: theme.status.success };
38896
- case "autoEdit" /* AUTO_EDIT */:
38913
+ case ApprovalMode.AUTO_EDIT:
38897
38914
  return { text: "auto edit", color: theme.status.warning };
38898
- case "default" /* DEFAULT */:
38915
+ case ApprovalMode.DEFAULT:
38899
38916
  default:
38900
38917
  return null;
38901
38918
  }
@@ -39249,7 +39266,7 @@ var ConfigInitDisplay = ({
39249
39266
  let connected = 0;
39250
39267
  const connecting = [];
39251
39268
  for (const [name, client] of clients.entries()) {
39252
- if (client.getStatus() === "connected" /* CONNECTED */) {
39269
+ if (client.getStatus() === MCPServerStatus.CONNECTED) {
39253
39270
  connected++;
39254
39271
  } else {
39255
39272
  connecting.push(name);
@@ -39271,9 +39288,9 @@ var ConfigInitDisplay = ({
39271
39288
  );
39272
39289
  }
39273
39290
  };
39274
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
39291
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
39275
39292
  return () => {
39276
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
39293
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
39277
39294
  };
39278
39295
  }, [initialMessage]);
39279
39296
  return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Text, { children: [
@@ -39998,7 +40015,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
39998
40015
  callId,
39999
40016
  name: SHELL_COMMAND_NAME,
40000
40017
  description: rawQuery,
40001
- status: "executing" /* Executing */,
40018
+ status: CoreToolCallStatus.Executing,
40002
40019
  isClientInitiated: true,
40003
40020
  resultDisplay: "",
40004
40021
  confirmationDetails: void 0
@@ -40123,7 +40140,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
40123
40140
  mainContent = result.output.trim() || "(Command produced no output)";
40124
40141
  }
40125
40142
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
40126
- let finalStatus = "success" /* Success */;
40143
+ let finalStatus = CoreToolCallStatus.Success;
40127
40144
  const prependToAnsiOutput = (output, text) => {
40128
40145
  const newLines = text.split("\n").map((line) => [
40129
40146
  {
@@ -40142,20 +40159,20 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
40142
40159
  };
40143
40160
  let prefix = "";
40144
40161
  if (result.error) {
40145
- finalStatus = "error" /* Error */;
40162
+ finalStatus = CoreToolCallStatus.Error;
40146
40163
  prefix = result.error.message;
40147
40164
  } else if (result.aborted) {
40148
- finalStatus = "cancelled" /* Cancelled */;
40165
+ finalStatus = CoreToolCallStatus.Cancelled;
40149
40166
  prefix = "Command was cancelled.";
40150
40167
  } else if (result.backgrounded) {
40151
- finalStatus = "success" /* Success */;
40168
+ finalStatus = CoreToolCallStatus.Success;
40152
40169
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
40153
40170
  mainContent = finalOutput;
40154
40171
  } else if (result.signal) {
40155
- finalStatus = "error" /* Error */;
40172
+ finalStatus = CoreToolCallStatus.Error;
40156
40173
  prefix = `Command terminated by signal: ${result.signal}.`;
40157
40174
  } else if (result.exitCode !== 0) {
40158
- finalStatus = "error" /* Error */;
40175
+ finalStatus = CoreToolCallStatus.Error;
40159
40176
  prefix = `Command exited with code ${result.exitCode}.`;
40160
40177
  }
40161
40178
  if (prefix) {
@@ -40181,7 +40198,7 @@ ${mainContent}`;
40181
40198
  status: finalStatus,
40182
40199
  resultDisplay: finalOutput
40183
40200
  };
40184
- if (finalStatus !== "cancelled" /* Cancelled */) {
40201
+ if (finalStatus !== CoreToolCallStatus.Cancelled) {
40185
40202
  addItemToHistory(
40186
40203
  {
40187
40204
  type: "tool_group",
@@ -41162,7 +41179,7 @@ function useQuotaAndFallback({
41162
41179
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
41163
41180
  `/stats model for usage details`,
41164
41181
  `/model to switch models.`,
41165
- contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
41182
+ contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
41166
41183
  ].filter(Boolean);
41167
41184
  message = messageLines.join("\n");
41168
41185
  } else if (error instanceof ModelNotFoundError) {
@@ -41350,7 +41367,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
41350
41367
  );
41351
41368
  setEditorError(null);
41352
41369
  setIsEditorDialogOpen(false);
41353
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
41370
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
41354
41371
  } catch (error) {
41355
41372
  setEditorError(`Failed to set editor preference: ${error}`);
41356
41373
  }
@@ -41359,7 +41376,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
41359
41376
  );
41360
41377
  const exitEditorDialog = (0, import_react101.useCallback)(() => {
41361
41378
  setIsEditorDialogOpen(false);
41362
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
41379
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
41363
41380
  }, []);
41364
41381
  return {
41365
41382
  isEditorDialogOpen,
@@ -41714,7 +41731,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41714
41731
  canonicalPath: resolvedCommandPath
41715
41732
  } = parseSlashCommand(trimmed, commands);
41716
41733
  if (!commandToExecute) {
41717
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
41734
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
41718
41735
  if (isMcpLoading) {
41719
41736
  setIsProcessing(true);
41720
41737
  if (addToHistory) {
@@ -41882,7 +41899,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41882
41899
  onConfirm: async (resolvedOutcome) => {
41883
41900
  resolve3({
41884
41901
  outcome: resolvedOutcome,
41885
- approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
41902
+ approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
41886
41903
  });
41887
41904
  }
41888
41905
  };
@@ -41890,7 +41907,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41890
41907
  callId,
41891
41908
  name: "Expansion",
41892
41909
  description: "Command expansion needs shell access",
41893
- status: "awaiting_approval" /* AwaitingApproval */,
41910
+ status: CoreToolCallStatus.AwaitingApproval,
41894
41911
  isClientInitiated: true,
41895
41912
  resultDisplay: void 0,
41896
41913
  confirmationDetails
@@ -41901,7 +41918,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41901
41918
  });
41902
41919
  });
41903
41920
  setPendingItem(null);
41904
- if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
41921
+ if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
41905
41922
  addItem(
41906
41923
  {
41907
41924
  type: "info" /* INFO */,
@@ -41911,7 +41928,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41911
41928
  );
41912
41929
  return { type: "handled" };
41913
41930
  }
41914
- if (outcome === "proceed_always" /* ProceedAlways */) {
41931
+ if (outcome === ToolConfirmationOutcome.ProceedAlways) {
41915
41932
  setSessionShellAllowlist(
41916
41933
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
41917
41934
  );
@@ -42391,7 +42408,7 @@ function mapToDisplay(toolOrTools, options = {}) {
42391
42408
  let description;
42392
42409
  let renderOutputAsMarkdown = false;
42393
42410
  const displayName = call.tool?.displayName ?? call.request.name;
42394
- if (call.status === "error" /* Error */) {
42411
+ if (call.status === CoreToolCallStatus.Error) {
42395
42412
  description = JSON.stringify(call.request.args);
42396
42413
  } else {
42397
42414
  description = call.invocation.getDescription();
@@ -42414,27 +42431,27 @@ function mapToDisplay(toolOrTools, options = {}) {
42414
42431
  let progress = void 0;
42415
42432
  let progressTotal = void 0;
42416
42433
  switch (call.status) {
42417
- case "success" /* Success */:
42434
+ case CoreToolCallStatus.Success:
42418
42435
  resultDisplay = call.response.resultDisplay;
42419
42436
  outputFile = call.response.outputFile;
42420
42437
  break;
42421
- case "error" /* Error */:
42422
- case "cancelled" /* Cancelled */:
42438
+ case CoreToolCallStatus.Error:
42439
+ case CoreToolCallStatus.Cancelled:
42423
42440
  resultDisplay = call.response.resultDisplay;
42424
42441
  break;
42425
- case "awaiting_approval" /* AwaitingApproval */:
42442
+ case CoreToolCallStatus.AwaitingApproval:
42426
42443
  correlationId = call.correlationId;
42427
42444
  confirmationDetails = call.confirmationDetails;
42428
42445
  break;
42429
- case "executing" /* Executing */:
42446
+ case CoreToolCallStatus.Executing:
42430
42447
  resultDisplay = call.liveOutput;
42431
42448
  ptyId = call.pid;
42432
42449
  progressMessage = call.progressMessage;
42433
42450
  progress = call.progress;
42434
42451
  progressTotal = call.progressTotal;
42435
42452
  break;
42436
- case "scheduled" /* Scheduled */:
42437
- case "validating" /* Validating */:
42453
+ case CoreToolCallStatus.Scheduled:
42454
+ case CoreToolCallStatus.Validating:
42438
42455
  break;
42439
42456
  default: {
42440
42457
  const exhaustiveCheck = call;
@@ -42505,7 +42522,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42505
42522
  const handler = (event) => {
42506
42523
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
42507
42524
  const hasExecuting = event.toolCalls.some(
42508
- (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
42525
+ (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
42509
42526
  );
42510
42527
  if (hasExecuting) {
42511
42528
  setLastToolOutputTime(Date.now());
@@ -42514,7 +42531,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42514
42531
  const prevCalls = prev[event.schedulerId] ?? [];
42515
42532
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
42516
42533
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
42517
- (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
42534
+ (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
42518
42535
  );
42519
42536
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
42520
42537
  return prev;
@@ -42526,9 +42543,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42526
42543
  };
42527
42544
  });
42528
42545
  };
42529
- messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
42546
+ messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
42530
42547
  return () => {
42531
- messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
42548
+ messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
42532
42549
  };
42533
42550
  }, [messageBus, internalAdaptToolCalls]);
42534
42551
  (0, import_react107.useEffect)(() => {
@@ -42550,9 +42567,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42550
42567
  };
42551
42568
  });
42552
42569
  };
42553
- messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
42570
+ messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
42554
42571
  return () => {
42555
- messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
42572
+ messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
42556
42573
  };
42557
42574
  }, [messageBus]);
42558
42575
  const schedule = (0, import_react107.useCallback)(
@@ -42650,8 +42667,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
42650
42667
  const prev = prevMap.get(coreCall.request.callId);
42651
42668
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
42652
42669
  let status = coreCall.status;
42653
- if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
42654
- status = "executing" /* Executing */;
42670
+ if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
42671
+ status = CoreToolCallStatus.Executing;
42655
42672
  }
42656
42673
  return {
42657
42674
  ...coreCall,
@@ -42683,7 +42700,7 @@ function getBackgroundedToolInfo(toolCall) {
42683
42700
  };
42684
42701
  }
42685
42702
  function isBackgroundableExecutingToolCall(toolCall) {
42686
- return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
42703
+ return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
42687
42704
  }
42688
42705
  function showCitations(settings) {
42689
42706
  const enabled = settings.merged.ui.showCitations;
@@ -42693,14 +42710,14 @@ function showCitations(settings) {
42693
42710
  return true;
42694
42711
  }
42695
42712
  function calculateStreamingState(isResponding, toolCalls) {
42696
- if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
42713
+ if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
42697
42714
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
42698
42715
  }
42699
42716
  const isAnyToolActive = toolCalls.some((tc) => {
42700
- if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
42717
+ if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
42701
42718
  return true;
42702
42719
  }
42703
- if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
42720
+ if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
42704
42721
  return !tc.responseSubmittedToGemini;
42705
42722
  }
42706
42723
  return false;
@@ -42748,9 +42765,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
42748
42765
  }
42749
42766
  setRetryStatus(payload);
42750
42767
  };
42751
- coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
42768
+ coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
42752
42769
  return () => {
42753
- coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
42770
+ coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
42754
42771
  };
42755
42772
  }, [isRespondingRef]);
42756
42773
  const [
@@ -42883,12 +42900,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
42883
42900
  const tc = toolCalls[i];
42884
42901
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
42885
42902
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
42886
- const isAgent = tc.tool?.kind === "agent" /* Agent */;
42903
+ const isAgent = tc.tool?.kind === Kind.Agent;
42887
42904
  if (isAgent) {
42888
42905
  let contigAgentsComplete = true;
42889
42906
  for (let j = i + 1; j < toolCalls.length; j++) {
42890
42907
  const nextTc = toolCalls[j];
42891
- if (nextTc.tool?.kind === "agent" /* Agent */) {
42908
+ if (nextTc.tool?.kind === Kind.Agent) {
42892
42909
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
42893
42910
  contigAgentsComplete = false;
42894
42911
  break;
@@ -42914,7 +42931,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
42914
42931
  let currentGroup = [];
42915
42932
  for (const tc of toolsToPush) {
42916
42933
  newPushed.add(tc.request.callId);
42917
- if (tc.tool?.kind === "agent" /* Agent */) {
42934
+ if (tc.tool?.kind === Kind.Agent) {
42918
42935
  currentGroup.push(tc);
42919
42936
  } else {
42920
42937
  if (currentGroup.length > 0) {
@@ -43013,9 +43030,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43013
43030
  const isToolVisible = (tc) => {
43014
43031
  const displayName = tc.tool?.displayName ?? tc.request.name;
43015
43032
  let hasResultDisplay = false;
43016
- if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
43033
+ if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
43017
43034
  hasResultDisplay = !!tc.response?.resultDisplay;
43018
- } else if (tc.status === "executing" /* Executing */) {
43035
+ } else if (tc.status === CoreToolCallStatus.Executing) {
43019
43036
  hasResultDisplay = !!tc.liveOutput;
43020
43037
  }
43021
43038
  if (shouldHideToolCall({
@@ -43077,7 +43094,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43077
43094
  prevActiveShellPtyIdRef.current = activeShellPtyId;
43078
43095
  }, [activeShellPtyId, addItem, setIsResponding]);
43079
43096
  (0, import_react108.useEffect)(() => {
43080
- if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
43097
+ if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
43081
43098
  const lastUserMessageIndex = history.findLastIndex(
43082
43099
  (item) => item.type === "user" /* USER */
43083
43100
  );
@@ -43163,7 +43180,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43163
43180
  if (tool.name === SHELL_COMMAND_NAME) {
43164
43181
  return {
43165
43182
  ...tool,
43166
- status: "cancelled" /* Cancelled */,
43183
+ status: CoreToolCallStatus.Cancelled,
43167
43184
  resultDisplay: tool.resultDisplay
43168
43185
  };
43169
43186
  }
@@ -43219,7 +43236,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43219
43236
  let localQueryToSendToGemini = null;
43220
43237
  if (typeof query === "string") {
43221
43238
  const trimmedQuery = query.trim();
43222
- await logger?.logMessage("user" /* USER */, trimmedQuery);
43239
+ await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
43223
43240
  if (!shellModeActive) {
43224
43241
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
43225
43242
  if (slashCommandResult) {
@@ -43375,7 +43392,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43375
43392
  if (pendingHistoryItemRef.current) {
43376
43393
  if (pendingHistoryItemRef.current.type === "tool_group") {
43377
43394
  const updatedTools = pendingHistoryItemRef.current.tools.map(
43378
- (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
43395
+ (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
43379
43396
  );
43380
43397
  const pendingItem = {
43381
43398
  ...pendingHistoryItemRef.current,
@@ -43621,15 +43638,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43621
43638
  let geminiMessageBuffer = "";
43622
43639
  const toolCallRequests = [];
43623
43640
  for await (const event of stream) {
43624
- if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
43641
+ if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
43625
43642
  setThought(null);
43626
43643
  }
43627
43644
  switch (event.type) {
43628
- case "thought" /* Thought */:
43645
+ case GeminiEventType.Thought:
43629
43646
  setLastGeminiActivityTime(Date.now());
43630
43647
  handleThoughtEvent(event.value, userMessageTimestamp);
43631
43648
  break;
43632
- case "content" /* Content */:
43649
+ case GeminiEventType.Content:
43633
43650
  setLastGeminiActivityTime(Date.now());
43634
43651
  geminiMessageBuffer = handleContentEvent(
43635
43652
  event.value,
@@ -43637,16 +43654,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43637
43654
  userMessageTimestamp
43638
43655
  );
43639
43656
  break;
43640
- case "tool_call_request" /* ToolCallRequest */:
43657
+ case GeminiEventType.ToolCallRequest:
43641
43658
  toolCallRequests.push(event.value);
43642
43659
  break;
43643
- case "user_cancelled" /* UserCancelled */:
43660
+ case GeminiEventType.UserCancelled:
43644
43661
  handleUserCancelledEvent(userMessageTimestamp);
43645
43662
  break;
43646
- case "error" /* Error */:
43663
+ case GeminiEventType.Error:
43647
43664
  handleErrorEvent(event.value, userMessageTimestamp);
43648
43665
  break;
43649
- case "agent_execution_stopped" /* AgentExecutionStopped */:
43666
+ case GeminiEventType.AgentExecutionStopped:
43650
43667
  handleAgentExecutionStoppedEvent(
43651
43668
  event.value.reason,
43652
43669
  userMessageTimestamp,
@@ -43654,7 +43671,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43654
43671
  event.value.contextCleared
43655
43672
  );
43656
43673
  break;
43657
- case "agent_execution_blocked" /* AgentExecutionBlocked */:
43674
+ case GeminiEventType.AgentExecutionBlocked:
43658
43675
  handleAgentExecutionBlockedEvent(
43659
43676
  event.value.reason,
43660
43677
  userMessageTimestamp,
@@ -43662,35 +43679,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43662
43679
  event.value.contextCleared
43663
43680
  );
43664
43681
  break;
43665
- case "chat_compressed" /* ChatCompressed */:
43682
+ case GeminiEventType.ChatCompressed:
43666
43683
  handleChatCompressionEvent(event.value, userMessageTimestamp);
43667
43684
  break;
43668
- case "tool_call_confirmation" /* ToolCallConfirmation */:
43669
- case "tool_call_response" /* ToolCallResponse */:
43685
+ case GeminiEventType.ToolCallConfirmation:
43686
+ case GeminiEventType.ToolCallResponse:
43670
43687
  break;
43671
- case "max_session_turns" /* MaxSessionTurns */:
43688
+ case GeminiEventType.MaxSessionTurns:
43672
43689
  handleMaxSessionTurnsEvent();
43673
43690
  break;
43674
- case "context_window_will_overflow" /* ContextWindowWillOverflow */:
43691
+ case GeminiEventType.ContextWindowWillOverflow:
43675
43692
  handleContextWindowWillOverflowEvent(
43676
43693
  event.value.estimatedRequestTokenCount,
43677
43694
  event.value.remainingTokenCount
43678
43695
  );
43679
43696
  break;
43680
- case "finished" /* Finished */:
43697
+ case GeminiEventType.Finished:
43681
43698
  handleFinishedEvent(event, userMessageTimestamp);
43682
43699
  break;
43683
- case "citation" /* Citation */:
43700
+ case GeminiEventType.Citation:
43684
43701
  handleCitationEvent(event.value, userMessageTimestamp);
43685
43702
  break;
43686
- case "model_info" /* ModelInfo */:
43703
+ case GeminiEventType.ModelInfo:
43687
43704
  handleChatModelEvent(event.value, userMessageTimestamp);
43688
43705
  break;
43689
- case "loop_detected" /* LoopDetected */:
43706
+ case GeminiEventType.LoopDetected:
43690
43707
  loopDetectedRef.current = true;
43691
43708
  break;
43692
- case "retry" /* Retry */:
43693
- case "invalid_stream" /* InvalidStream */:
43709
+ case GeminiEventType.Retry:
43710
+ case GeminiEventType.InvalidStream:
43694
43711
  break;
43695
43712
  default: {
43696
43713
  const unreachable = event;
@@ -43731,7 +43748,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43731
43748
  const submitQuery = (0, import_react108.useCallback)(
43732
43749
  async (query, options, prompt_id) => runInDevTraceSpan(
43733
43750
  {
43734
- operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */
43751
+ operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt
43735
43752
  },
43736
43753
  async ({ metadata: spanMetadata }) => {
43737
43754
  spanMetadata.input = query;
@@ -43891,7 +43908,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43891
43908
  );
43892
43909
  const handleApprovalModeChange = (0, import_react108.useCallback)(
43893
43910
  async (newApprovalMode) => {
43894
- if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
43911
+ if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
43895
43912
  if (geminiClient) {
43896
43913
  try {
43897
43914
  await geminiClient.addHistory({
@@ -43914,11 +43931,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43914
43931
  }
43915
43932
  }
43916
43933
  previousApprovalModeRef.current = newApprovalMode;
43917
- if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
43934
+ if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
43918
43935
  let awaitingApprovalCalls = toolCalls.filter(
43919
43936
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
43920
43937
  );
43921
- if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
43938
+ if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
43922
43939
  awaitingApprovalCalls = awaitingApprovalCalls.filter(
43923
43940
  (call) => EDIT_TOOL_NAMES.has(call.request.name)
43924
43941
  );
@@ -43927,11 +43944,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43927
43944
  if (call.correlationId) {
43928
43945
  try {
43929
43946
  await config.getMessageBus().publish({
43930
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
43947
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
43931
43948
  correlationId: call.correlationId,
43932
43949
  confirmed: true,
43933
43950
  requiresUserConfirmation: false,
43934
- outcome: "proceed_once" /* ProceedOnce */
43951
+ outcome: ToolConfirmationOutcome.ProceedOnce
43935
43952
  });
43936
43953
  } catch (error) {
43937
43954
  debugLogger.warn(
@@ -44009,14 +44026,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44009
44026
  );
44010
44027
  if (isLowErrorVerbosity) {
44011
44028
  suppressedToolErrorCountRef.current += geminiTools.filter(
44012
- (tc) => tc.status === "error" /* Error */
44029
+ (tc) => tc.status === CoreToolCallStatus.Error
44013
44030
  ).length;
44014
44031
  }
44015
44032
  if (geminiTools.length === 0) {
44016
44033
  return;
44017
44034
  }
44018
44035
  const stopExecutionTool = geminiTools.find(
44019
- (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
44036
+ (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
44020
44037
  );
44021
44038
  if (stopExecutionTool && stopExecutionTool.response.error) {
44022
44039
  maybeAddSuppressedToolErrorNote();
@@ -44036,9 +44053,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44036
44053
  (tc) => !isTopicTool2(tc.request.name)
44037
44054
  );
44038
44055
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
44039
- (tc) => tc.status === "cancelled" /* Cancelled */
44056
+ (tc) => tc.status === CoreToolCallStatus.Cancelled
44040
44057
  );
44041
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
44058
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
44042
44059
  if (allDeclinableToolsCancelled || allToolsCancelled) {
44043
44060
  if (!turnCancelledRef.current) {
44044
44061
  addItem({
@@ -44119,7 +44136,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
44119
44136
  return;
44120
44137
  }
44121
44138
  const restorableToolCalls = toolCalls.filter(
44122
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
44139
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
44123
44140
  );
44124
44141
  if (restorableToolCalls.length > 0) {
44125
44142
  if (!gitService) {
@@ -46586,7 +46603,7 @@ function useMessageQueue({
46586
46603
  var import_react115 = __toESM(require_react(), 1);
46587
46604
  function useMcpStatus(config) {
46588
46605
  const [discoveryState, setDiscoveryState] = (0, import_react115.useState)(
46589
- () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
46606
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
46590
46607
  );
46591
46608
  const [mcpServerCount, setMcpServerCount] = (0, import_react115.useState)(
46592
46609
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -46599,12 +46616,12 @@ function useMcpStatus(config) {
46599
46616
  setMcpServerCount(manager.getMcpServerCount());
46600
46617
  }
46601
46618
  };
46602
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
46619
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
46603
46620
  return () => {
46604
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
46621
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
46605
46622
  };
46606
46623
  }, [config]);
46607
- const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
46624
+ const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
46608
46625
  return {
46609
46626
  discoveryState,
46610
46627
  mcpServerCount,
@@ -46631,7 +46648,7 @@ function useApprovalModeIndicator({
46631
46648
  (key) => {
46632
46649
  let nextApprovalMode;
46633
46650
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
46634
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
46651
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
46635
46652
  if (addItem) {
46636
46653
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
46637
46654
  const adminSettings = config.getRemoteAdminSettings();
@@ -46649,21 +46666,21 @@ function useApprovalModeIndicator({
46649
46666
  }
46650
46667
  return;
46651
46668
  }
46652
- nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
46669
+ nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
46653
46670
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
46654
46671
  const currentMode = config.getApprovalMode();
46655
46672
  switch (currentMode) {
46656
- case "default" /* DEFAULT */:
46657
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
46673
+ case ApprovalMode.DEFAULT:
46674
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
46658
46675
  break;
46659
- case "autoEdit" /* AUTO_EDIT */:
46660
- nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
46676
+ case ApprovalMode.AUTO_EDIT:
46677
+ nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
46661
46678
  break;
46662
- case "plan" /* PLAN */:
46663
- nextApprovalMode = "default" /* DEFAULT */;
46679
+ case ApprovalMode.PLAN:
46680
+ nextApprovalMode = ApprovalMode.DEFAULT;
46664
46681
  break;
46665
- case "yolo" /* YOLO */:
46666
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
46682
+ case ApprovalMode.YOLO:
46683
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
46667
46684
  break;
46668
46685
  default:
46669
46686
  }
@@ -47056,11 +47073,11 @@ var useHookDisplayState = () => {
47056
47073
  removeHook();
47057
47074
  }
47058
47075
  };
47059
- coreEvents.on("hook-start" /* HookStart */, handleHookStart);
47060
- coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
47076
+ coreEvents.on(CoreEvent.HookStart, handleHookStart);
47077
+ coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
47061
47078
  return () => {
47062
- coreEvents.off("hook-start" /* HookStart */, handleHookStart);
47063
- coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
47079
+ coreEvents.off(CoreEvent.HookStart, handleHookStart);
47080
+ coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
47064
47081
  activeTimeouts.forEach(clearTimeout);
47065
47082
  activeTimeouts.clear();
47066
47083
  };
@@ -47905,7 +47922,7 @@ var AppContainer = (props) => {
47905
47922
  debugLogger.error("Failed to start memory service:", e);
47906
47923
  });
47907
47924
  }
47908
- const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
47925
+ const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
47909
47926
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
47910
47927
  if (result) {
47911
47928
  if (result.systemMessage) {
@@ -47941,7 +47958,7 @@ var AppContainer = (props) => {
47941
47958
  );
47942
47959
  const ideClient = await IdeClient.getInstance();
47943
47960
  await ideClient.disconnect();
47944
- await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
47961
+ await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
47945
47962
  });
47946
47963
  }, [config, resumedSessionData]);
47947
47964
  (0, import_react129.useEffect)(
@@ -47959,11 +47976,11 @@ var AppContainer = (props) => {
47959
47976
  resetTime: payload.resetTime
47960
47977
  });
47961
47978
  };
47962
- coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
47963
- coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
47979
+ coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
47980
+ coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
47964
47981
  return () => {
47965
- coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
47966
- coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
47982
+ coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
47983
+ coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
47967
47984
  };
47968
47985
  }, [config]);
47969
47986
  (0, import_react129.useEffect)(() => {
@@ -47976,16 +47993,16 @@ var AppContainer = (props) => {
47976
47993
  const handleAgentsDiscovered = (payload) => {
47977
47994
  setNewAgents(payload.agents);
47978
47995
  };
47979
- coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
47980
- coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
47981
- coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
47996
+ coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
47997
+ coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
47998
+ coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
47982
47999
  return () => {
47983
- coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
48000
+ coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
47984
48001
  coreEvents.off(
47985
- "admin-settings-changed" /* AdminSettingsChanged */,
48002
+ CoreEvent.AdminSettingsChanged,
47986
48003
  handleAdminSettingsChanged
47987
48004
  );
47988
- coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
48005
+ coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
47989
48006
  };
47990
48007
  }, [settings]);
47991
48008
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -48051,11 +48068,11 @@ var AppContainer = (props) => {
48051
48068
  exitEditorDialog
48052
48069
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
48053
48070
  (0, import_react129.useEffect)(() => {
48054
- coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
48055
- coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
48071
+ coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
48072
+ coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
48056
48073
  return () => {
48057
- coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
48058
- coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
48074
+ coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
48075
+ coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
48059
48076
  };
48060
48077
  }, [handleEditorClose, openEditorDialog]);
48061
48078
  (0, import_react129.useEffect)(() => {
@@ -48123,7 +48140,7 @@ var AppContainer = (props) => {
48123
48140
  errorVerbosity: settings.merged.ui.errorVerbosity
48124
48141
  });
48125
48142
  const isAuthDialogOpen = authState === "updating" /* Updating */;
48126
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
48143
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
48127
48144
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
48128
48145
  const { loadHistoryForResume, isResuming } = useSessionResume({
48129
48146
  config,
@@ -48151,7 +48168,7 @@ var AppContainer = (props) => {
48151
48168
  async (authType, scope) => {
48152
48169
  if (authType) {
48153
48170
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
48154
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
48171
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
48155
48172
  setAuthContext({ requiresRestart: true });
48156
48173
  } else {
48157
48174
  setAuthContext({});
@@ -48179,7 +48196,7 @@ var AppContainer = (props) => {
48179
48196
  );
48180
48197
  return;
48181
48198
  }
48182
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
48199
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
48183
48200
  writeToStdout(`
48184
48201
  ----------------------------------------------------------------
48185
48202
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -48204,7 +48221,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
48204
48221
  }
48205
48222
  await saveApiKey(apiKey);
48206
48223
  await reloadApiKey();
48207
- await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
48224
+ await config.refreshAuth(AuthType.USE_GEMINI);
48208
48225
  setAuthState("authenticated" /* Authenticated */);
48209
48226
  } catch (e) {
48210
48227
  onAuthError(
@@ -48229,7 +48246,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
48229
48246
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
48230
48247
  );
48231
48248
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
48232
- if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
48249
+ if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
48233
48250
  return;
48234
48251
  }
48235
48252
  const error = validateAuthMethod(
@@ -48348,9 +48365,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
48348
48365
  }
48349
48366
  });
48350
48367
  };
48351
- coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
48368
+ coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
48352
48369
  return () => {
48353
- coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
48370
+ coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
48354
48371
  };
48355
48372
  }, []);
48356
48373
  const performMemoryRefresh = (0, import_react129.useCallback)(async () => {
@@ -49006,7 +49023,7 @@ ${queuedText}` : queuedText;
49006
49023
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
49007
49024
  if (settings.merged.general.devtools) {
49008
49025
  void (async () => {
49009
- const { toggleDevToolsPanel } = await import("./devtoolsService-4VP27OSR.js");
49026
+ const { toggleDevToolsPanel } = await import("./devtoolsService-YE72BGQU.js");
49010
49027
  await toggleDevToolsPanel(
49011
49028
  config,
49012
49029
  showErrorDetails,
@@ -49224,12 +49241,12 @@ ${queuedText}` : queuedText;
49224
49241
  Date.now()
49225
49242
  );
49226
49243
  };
49227
- coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
49228
- coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
49244
+ coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
49245
+ coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
49229
49246
  coreEvents.drainBacklogs();
49230
49247
  return () => {
49231
- coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
49232
- coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
49248
+ coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
49249
+ coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
49233
49250
  };
49234
49251
  }, [historyManager]);
49235
49252
  const nightly = props.version.includes("nightly");
@@ -49331,9 +49348,9 @@ ${queuedText}` : queuedText;
49331
49348
  const handleMemoryChanged = (result) => {
49332
49349
  setGeminiMdFileCount(result.fileCount);
49333
49350
  };
49334
- coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
49351
+ coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
49335
49352
  return () => {
49336
- coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
49353
+ coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
49337
49354
  };
49338
49355
  }, []);
49339
49356
  (0, import_react129.useEffect)(() => {