@google/gemini-cli 0.36.0-preview.0 → 0.36.0-preview.2

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 (45) hide show
  1. package/bundle/{chunk-K2M7OTIP.js → chunk-25V3TYNR.js} +9 -10
  2. package/bundle/{chunk-N7MAJ3JD.js → chunk-6F64DR53.js} +6 -6
  3. package/bundle/{chunk-6UAL5KXG.js → chunk-EUXACAGL.js} +9 -12
  4. package/bundle/{chunk-BE2CAP4N.js → chunk-HLML5SVJ.js} +29 -27
  5. package/bundle/{chunk-3HNPGRRW.js → chunk-IOJJTEIC.js} +2 -2
  6. package/bundle/{chunk-S36ET7IB.js → chunk-KGPUJGU6.js} +6 -6
  7. package/bundle/{chunk-3XQWOVPH.js → chunk-MRJRXC63.js} +2 -2
  8. package/bundle/{chunk-HXZPARYO.js → chunk-MXNIJ4RK.js} +2 -2
  9. package/bundle/{chunk-4NIOHPQN.js → chunk-NKTSTYJO.js} +72 -60
  10. package/bundle/chunk-NT4MG3B6.js +93175 -0
  11. package/bundle/chunk-OOZG4FMQ.js +137 -0
  12. package/bundle/{chunk-PVQN7ZVP.js → chunk-PXG3YTLU.js} +42 -27
  13. package/bundle/{chunk-CDXJ3P4V.js → chunk-SV2TJWFU.js} +5596 -10443
  14. package/bundle/chunk-WHT3ZS7S.js +354051 -0
  15. package/bundle/{cleanup-6R6IEU7T.js → cleanup-2WKEMFXG.js} +3 -3
  16. package/bundle/{cleanup-I7KFQ3LC.js → cleanup-B67M5WAO.js} +3 -3
  17. package/bundle/{cleanup-R6KR4XCS.js → cleanup-PJ323T24.js} +3 -3
  18. package/bundle/cleanup-PKVUY3XO.js +29 -0
  19. package/bundle/{core-IZK42CWE.js → core-7GUY3XKQ.js} +2 -2
  20. package/bundle/{devtoolsService-HLM6BC5R.js → devtoolsService-B7OD724C.js} +3 -3
  21. package/bundle/{devtoolsService-GIESJD2E.js → devtoolsService-JGPJ2GN4.js} +5 -4
  22. package/bundle/{devtoolsService-PGDD2J4F.js → devtoolsService-LU3DLIVB.js} +3 -3
  23. package/bundle/devtoolsService-RGAOIVMN.js +854 -0
  24. package/bundle/{core-J3CTNETR.js → dist-DTCLJTHN.js} +2 -2
  25. package/bundle/{dist-6WEZWPRQ.js → dist-X3ESBKEG.js} +2 -2
  26. package/bundle/dist-YQXQRQYA.js +1882 -0
  27. package/bundle/docs/reference/configuration.md +1 -1
  28. package/bundle/{gemini-AI362DTR.js → gemini-7BPDTLSV.js} +7 -7
  29. package/bundle/{gemini-GZFHIDDH.js → gemini-CJ5HU32O.js} +155 -140
  30. package/bundle/{gemini-5ARDVELJ.js → gemini-GA5SXGI6.js} +7 -7
  31. package/bundle/gemini-RFUB3W5S.js +14455 -0
  32. package/bundle/gemini.js +4 -4
  33. package/bundle/{interactiveCli-OYO74BPW.js → interactiveCli-2EVI7UVZ.js} +5 -5
  34. package/bundle/{interactiveCli-LGOLNK44.js → interactiveCli-2OAVBJCC.js} +253 -236
  35. package/bundle/{interactiveCli-PXX77G77.js → interactiveCli-CRDA6GQ7.js} +5 -5
  36. package/bundle/interactiveCli-SHFDAMKC.js +49314 -0
  37. package/bundle/{memoryDiscovery-WPGC7DAZ.js → memoryDiscovery-JXHCZBWK.js} +1 -1
  38. package/bundle/{memoryDiscovery-FNLUOGLO.js → memoryDiscovery-VQKOP6YW.js} +1 -1
  39. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  40. package/bundle/{oauth2-provider-X3F7PSVB.js → oauth2-provider-D6HJJAVX.js} +2 -2
  41. package/bundle/{oauth2-provider-I6AYNUSI.js → oauth2-provider-KEZJCOYM.js} +39 -73
  42. package/bundle/oauth2-provider-TSEQG63I.js +237 -0
  43. package/bundle/{oauth2-provider-G7GIGUQF.js → oauth2-provider-ZT3CIEZO.js} +2 -2
  44. package/bundle/policies/plan.toml +10 -0
  45. package/package.json +1 -1
@@ -178,17 +178,19 @@ import {
178
178
  widestLineFromStyledChars,
179
179
  wordBreakStyledChars,
180
180
  wrapStyledChars
181
- } from "./chunk-S36ET7IB.js";
181
+ } from "./chunk-NKTSTYJO.js";
182
182
  import {
183
183
  registerCleanup,
184
184
  runExitCleanup,
185
185
  setupTtyCheck
186
- } from "./chunk-HXZPARYO.js";
186
+ } from "./chunk-MRJRXC63.js";
187
187
  import {
188
188
  ApiKeyUpdatedEvent,
189
189
  AsyncFzf,
190
190
  AuthType,
191
+ CompressionStatus,
191
192
  ConversationFinishedEvent,
193
+ CoreToolCallStatus,
192
194
  CreditPurchaseClickEvent,
193
195
  EDITOR_DISPLAY_NAMES,
194
196
  EmptyWalletMenuShownEvent,
@@ -197,10 +199,15 @@ import {
197
199
  FileSearchFactory,
198
200
  FolderTrustDiscoveryService,
199
201
  G1_UTM_CAMPAIGNS,
202
+ GeminiCliOperation,
203
+ GeminiEventType,
200
204
  GitService,
201
205
  IdeClient,
202
206
  LlmRole,
203
207
  Logger,
208
+ MCPDiscoveryState,
209
+ MCPServerStatus,
210
+ MessageSenderType,
204
211
  ModelNotFoundError,
205
212
  ModelSlashCommandEvent,
206
213
  OverageMenuShownEvent,
@@ -209,6 +216,8 @@ import {
209
216
  ProjectIdRequiredError,
210
217
  ROOT_SCHEDULER_ID,
211
218
  Scheduler,
219
+ SessionEndReason,
220
+ SessionStartSource,
212
221
  ShellExecutionService,
213
222
  SlashCommandStatus,
214
223
  TerminalQuotaError,
@@ -216,6 +225,7 @@ import {
216
225
  UserPromptEvent,
217
226
  UserTierId,
218
227
  ValidationRequiredError,
228
+ WarningPriority,
219
229
  addMCPStatusChangeListener,
220
230
  allowEditorTypeInSandbox,
221
231
  buildG1Url,
@@ -292,11 +302,13 @@ import {
292
302
  validatePlanContent,
293
303
  validatePlanPath,
294
304
  writeToStdout
295
- } from "./chunk-CDXJ3P4V.js";
305
+ } from "./chunk-EUXACAGL.js";
296
306
  import {
297
307
  ACTIVATE_SKILL_TOOL_NAME,
298
308
  ASK_USER_TOOL_NAME,
309
+ ApprovalMode,
299
310
  ChangeAuthRequestedError,
311
+ CoreEvent,
300
312
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
301
313
  DEFAULT_GEMINI_FLASH_MODEL,
302
314
  DEFAULT_GEMINI_MODEL,
@@ -304,14 +316,19 @@ import {
304
316
  EDIT_TOOL_NAMES,
305
317
  FinishReason,
306
318
  GEMINI_DIR,
319
+ Kind,
320
+ MessageBusType,
307
321
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
308
322
  PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
309
323
  PREVIEW_GEMINI_3_1_MODEL,
310
324
  PREVIEW_GEMINI_FLASH_MODEL,
311
325
  PREVIEW_GEMINI_MODEL,
312
326
  PREVIEW_GEMINI_MODEL_AUTO,
327
+ QuestionType,
313
328
  SHELL_TOOL_NAME,
314
329
  Storage,
330
+ ToolConfirmationOutcome,
331
+ ToolErrorType,
315
332
  UnauthorizedError,
316
333
  VALID_GEMINI_MODELS,
317
334
  coreEvents,
@@ -331,7 +348,7 @@ import {
331
348
  safeJsonToMarkdown,
332
349
  shortenPath,
333
350
  tildeifyPath
334
- } from "./chunk-PVQN7ZVP.js";
351
+ } from "./chunk-HLML5SVJ.js";
335
352
  import "./chunk-664ZODQF.js";
336
353
  import "./chunk-RJTRUG2J.js";
337
354
  import "./chunk-IUUIT4SU.js";
@@ -22259,7 +22276,7 @@ function calculateShellMaxLines(options) {
22259
22276
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
22260
22277
  return maxLinesBasedOnHeight;
22261
22278
  }
22262
- const isExecuting = status === "executing" /* Executing */;
22279
+ const isExecuting = status === CoreToolCallStatus.Executing;
22263
22280
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
22264
22281
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
22265
22282
  }
@@ -22292,10 +22309,10 @@ function isShellTool(name) {
22292
22309
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
22293
22310
  }
22294
22311
  function isThisShellFocusable(name, status, config) {
22295
- return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
22312
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
22296
22313
  }
22297
22314
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
22298
- return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
22315
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
22299
22316
  }
22300
22317
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
22301
22318
  const [userHasFocused, setUserHasFocused] = (0, import_react21.useState)(false);
@@ -22838,7 +22855,7 @@ var ToolMessage = ({
22838
22855
  paddingX: 1,
22839
22856
  flexDirection: "column",
22840
22857
  children: [
22841
- status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
22858
+ status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
22842
22859
  McpProgressIndicator,
22843
22860
  {
22844
22861
  progress,
@@ -22855,8 +22872,8 @@ var ToolMessage = ({
22855
22872
  terminalWidth,
22856
22873
  renderOutputAsMarkdown,
22857
22874
  hasFocus: isThisShellFocused2,
22858
- maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
22859
- overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
22875
+ maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
22876
+ overflowDirection: kind === Kind.Agent ? "bottom" : "top"
22860
22877
  }
22861
22878
  ),
22862
22879
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
@@ -23581,7 +23598,7 @@ var ShellToolMessage = ({
23581
23598
  maxLinesLimit: maxLines
23582
23599
  });
23583
23600
  import_react29.default.useEffect(() => {
23584
- const isExecuting = status === "executing" /* Executing */;
23601
+ const isExecuting = status === CoreToolCallStatus.Executing;
23585
23602
  if (isExecuting && ptyId) {
23586
23603
  try {
23587
23604
  const childWidth = terminalWidth - 4;
@@ -23914,14 +23931,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
23914
23931
  if (isTrackedToolCall(t)) {
23915
23932
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
23916
23933
  } else {
23917
- return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
23934
+ return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
23918
23935
  }
23919
23936
  });
23920
23937
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
23921
23938
  if (isTrackedToolCall(t)) {
23922
23939
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
23923
23940
  } else {
23924
- return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
23941
+ return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
23925
23942
  }
23926
23943
  });
23927
23944
  const isShellCommand = toolsToInspect.some((t) => {
@@ -23956,7 +23973,7 @@ var ToolGroupMessage = ({
23956
23973
  const isLowErrorVerbosity = settings.merged.ui?.errorVerbosity !== "full";
23957
23974
  const toolCalls = (0, import_react31.useMemo)(
23958
23975
  () => allToolCalls.filter((t) => {
23959
- if (isLowErrorVerbosity && t.status === "error" /* Error */ && !t.isClientInitiated) {
23976
+ if (isLowErrorVerbosity && t.status === CoreToolCallStatus.Error && !t.isClientInitiated) {
23960
23977
  return false;
23961
23978
  }
23962
23979
  return !shouldHideToolCall({
@@ -24005,15 +24022,15 @@ var ToolGroupMessage = ({
24005
24022
  );
24006
24023
  let countToolCallsWithResults = 0;
24007
24024
  for (const tool of visibleToolCalls) {
24008
- if (tool.kind !== "agent" /* Agent */ && tool.resultDisplay !== void 0 && tool.resultDisplay !== "") {
24025
+ if (tool.kind !== Kind.Agent && tool.resultDisplay !== void 0 && tool.resultDisplay !== "") {
24009
24026
  countToolCallsWithResults++;
24010
24027
  }
24011
24028
  }
24012
- const countOneLineToolCalls = visibleToolCalls.filter((t) => t.kind !== "agent" /* Agent */).length - countToolCallsWithResults;
24029
+ const countOneLineToolCalls = visibleToolCalls.filter((t) => t.kind !== Kind.Agent).length - countToolCallsWithResults;
24013
24030
  const groupedTools = (0, import_react31.useMemo)(() => {
24014
24031
  const groups = [];
24015
24032
  for (const tool of visibleToolCalls) {
24016
- if (tool.kind === "agent" /* Agent */) {
24033
+ if (tool.kind === Kind.Agent) {
24017
24034
  const lastGroup = groups[groups.length - 1];
24018
24035
  if (Array.isArray(lastGroup)) {
24019
24036
  lastGroup.push(tool);
@@ -24166,18 +24183,18 @@ function CompressionMessage({
24166
24183
  return "Compressing chat history";
24167
24184
  }
24168
24185
  switch (compressionStatus) {
24169
- case 1 /* COMPRESSED */:
24186
+ case CompressionStatus.COMPRESSED:
24170
24187
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
24171
- case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
24188
+ case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
24172
24189
  if (originalTokens < 5e4) {
24173
24190
  return "Compression was not beneficial for this history size.";
24174
24191
  }
24175
24192
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
24176
- case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
24193
+ case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
24177
24194
  return "Could not compress chat history due to a token counting error.";
24178
- case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
24195
+ case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
24179
24196
  return "Chat history compression failed: the model returned an empty summary.";
24180
- case 5 /* NOOP */:
24197
+ case CompressionStatus.NOOP:
24181
24198
  return "Nothing to compress.";
24182
24199
  default:
24183
24200
  return "";
@@ -24915,7 +24932,7 @@ var StatsDisplay = ({
24915
24932
  const settings = useSettings();
24916
24933
  const config = useConfig();
24917
24934
  const useGemini3_1 = config.getGemini31LaunchedSync?.() ?? false;
24918
- const useCustomToolModel = useGemini3_1 && config.getContentGeneratorConfig().authType === "gemini-api-key" /* USE_GEMINI */;
24935
+ const useCustomToolModel = useGemini3_1 && config.getContentGeneratorConfig().authType === AuthType.USE_GEMINI;
24919
24936
  const pooledRemaining = quotaStats?.remaining;
24920
24937
  const pooledLimit = quotaStats?.limit;
24921
24938
  const pooledResetTime = quotaStats?.resetTime;
@@ -25144,8 +25161,8 @@ var ModelStatsDisplay = ({
25144
25161
  return validRoles.includes(role);
25145
25162
  }).sort((a, b) => {
25146
25163
  if (a === b) return 0;
25147
- if (a === "main" /* MAIN */) return -1;
25148
- if (b === "main" /* MAIN */) return 1;
25164
+ if (a === LlmRole.MAIN) return -1;
25165
+ if (b === LlmRole.MAIN) return 1;
25149
25166
  return a.localeCompare(b);
25150
25167
  });
25151
25168
  const createRow = (metric, getValue, options = {}) => {
@@ -25929,7 +25946,7 @@ var McpStatus = ({
25929
25946
  );
25930
25947
  const originalStatus = serverStatus(serverName);
25931
25948
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
25932
- const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
25949
+ const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
25933
25950
  let statusIndicator = "";
25934
25951
  let statusText = "";
25935
25952
  let statusColor = theme.text.primary;
@@ -25941,17 +25958,17 @@ var McpStatus = ({
25941
25958
  statusColor = theme.text.secondary;
25942
25959
  } else {
25943
25960
  switch (status) {
25944
- case "connected" /* CONNECTED */:
25961
+ case MCPServerStatus.CONNECTED:
25945
25962
  statusIndicator = "\u{1F7E2}";
25946
25963
  statusText = "Ready";
25947
25964
  statusColor = theme.status.success;
25948
25965
  break;
25949
- case "connecting" /* CONNECTING */:
25966
+ case MCPServerStatus.CONNECTING:
25950
25967
  statusIndicator = "\u{1F504}";
25951
25968
  statusText = "Starting... (first startup may take longer)";
25952
25969
  statusColor = theme.status.warning;
25953
25970
  break;
25954
- case "disconnected" /* DISCONNECTED */:
25971
+ case MCPServerStatus.DISCONNECTED:
25955
25972
  default:
25956
25973
  statusIndicator = "\u{1F534}";
25957
25974
  statusText = "Disconnected";
@@ -25999,12 +26016,12 @@ var McpStatus = ({
25999
26016
  /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Text, { children: [
26000
26017
  " - ",
26001
26018
  statusText,
26002
- status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
26019
+ status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
26003
26020
  ] }),
26004
26021
  authStatusNode
26005
26022
  ] }),
26006
- status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
26007
- status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Text, { children: [
26023
+ status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
26024
+ status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Text, { children: [
26008
26025
  " (",
26009
26026
  toolCount,
26010
26027
  " tools cached)"
@@ -26482,7 +26499,7 @@ var Notifications = () => {
26482
26499
  if (dismissed) return [];
26483
26500
  const counts = persistentState.get("startupWarningCounts") || {};
26484
26501
  return startupWarnings.filter((w) => {
26485
- if (w.priority === "low" /* Low */) {
26502
+ if (w.priority === WarningPriority.Low) {
26486
26503
  const count = counts[w.id] || 0;
26487
26504
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
26488
26505
  }
@@ -26495,7 +26512,7 @@ var Notifications = () => {
26495
26512
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
26496
26513
  let changed = false;
26497
26514
  visibleWarnings.forEach((w) => {
26498
- if (w.priority === "low" /* Low */) {
26515
+ if (w.priority === WarningPriority.Low) {
26499
26516
  counts[w.id] = (counts[w.id] || 0) + 1;
26500
26517
  changed = true;
26501
26518
  }
@@ -26600,7 +26617,7 @@ var UserIdentity = ({ config }) => {
26600
26617
  }
26601
26618
  return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { flexDirection: "column", children: [
26602
26619
  /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { children: [
26603
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { children: [
26620
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { children: [
26604
26621
  /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { bold: true, children: [
26605
26622
  "Signed in with Google",
26606
26623
  email ? ":" : ""
@@ -26827,7 +26844,7 @@ function isToolExecuting(pendingHistoryItems) {
26827
26844
  return pendingHistoryItems.some((item) => {
26828
26845
  if (item && item.type === "tool_group") {
26829
26846
  return item.tools.some(
26830
- (tool) => "executing" /* Executing */ === tool.status
26847
+ (tool) => CoreToolCallStatus.Executing === tool.status
26831
26848
  );
26832
26849
  }
26833
26850
  return false;
@@ -26836,7 +26853,7 @@ function isToolExecuting(pendingHistoryItems) {
26836
26853
  function isToolAwaitingConfirmation(pendingHistoryItems) {
26837
26854
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
26838
26855
  (item) => item.tools.some(
26839
- (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
26856
+ (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
26840
26857
  )
26841
26858
  );
26842
26859
  }
@@ -26848,7 +26865,7 @@ function getAllToolCalls(historyItems) {
26848
26865
  function getConfirmingToolState(pendingHistoryItems) {
26849
26866
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
26850
26867
  const confirmingTools = allPendingTools.filter(
26851
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
26868
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
26852
26869
  );
26853
26870
  if (confirmingTools.length === 0) {
26854
26871
  return null;
@@ -26927,14 +26944,14 @@ var ToolActionsProvider = (props) => {
26927
26944
  }
26928
26945
  const details = tool.confirmationDetails;
26929
26946
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
26930
- const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
26947
+ const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
26931
26948
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
26932
26949
  }
26933
26950
  if (tool.correlationId) {
26934
26951
  await config.getMessageBus().publish({
26935
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
26952
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
26936
26953
  correlationId: tool.correlationId,
26937
- confirmed: outcome !== "cancel" /* Cancel */,
26954
+ confirmed: outcome !== ToolConfirmationOutcome.Cancel,
26938
26955
  requiresUserConfirmation: false,
26939
26956
  outcome,
26940
26957
  payload
@@ -26953,7 +26970,7 @@ var ToolActionsProvider = (props) => {
26953
26970
  );
26954
26971
  const cancel = (0, import_react43.useCallback)(
26955
26972
  async (callId) => {
26956
- await confirm(callId, "cancel" /* Cancel */);
26973
+ await confirm(callId, ToolConfirmationOutcome.Cancel);
26957
26974
  },
26958
26975
  [confirm]
26959
26976
  );
@@ -28226,7 +28243,7 @@ var ExitPlanModeDialog = ({
28226
28243
  {
28227
28244
  questions: [
28228
28245
  {
28229
- type: "choice" /* CHOICE */,
28246
+ type: QuestionType.CHOICE,
28230
28247
  header: "Approval",
28231
28248
  question: planContent,
28232
28249
  options: [
@@ -28247,9 +28264,9 @@ var ExitPlanModeDialog = ({
28247
28264
  onSubmit: (answers) => {
28248
28265
  const answer = answers["0"];
28249
28266
  if (answer === "Yes, automatically accept edits" /* Auto */) {
28250
- onApprove("autoEdit" /* AUTO_EDIT */);
28267
+ onApprove(ApprovalMode.AUTO_EDIT);
28251
28268
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
28252
- onApprove("default" /* DEFAULT */);
28269
+ onApprove(ApprovalMode.DEFAULT);
28253
28270
  } else if (answer) {
28254
28271
  onFeedback(answer);
28255
28272
  }
@@ -28455,7 +28472,7 @@ ${deceptiveUrlWarnings.map(
28455
28472
  );
28456
28473
  (0, import_react48.useEffect)(() => {
28457
28474
  if (isCancelling) {
28458
- handleConfirm("cancel" /* Cancel */);
28475
+ handleConfirm(ToolConfirmationOutcome.Cancel);
28459
28476
  }
28460
28477
  }, [isCancelling, handleConfirm]);
28461
28478
  const handleSelect = (0, import_react48.useCallback)(
@@ -28468,19 +28485,19 @@ ${deceptiveUrlWarnings.map(
28468
28485
  if (!confirmationDetails.isModifying) {
28469
28486
  options2.push({
28470
28487
  label: "Allow once",
28471
- value: "proceed_once" /* ProceedOnce */,
28488
+ value: ToolConfirmationOutcome.ProceedOnce,
28472
28489
  key: "Allow once"
28473
28490
  });
28474
28491
  if (isTrustedFolder) {
28475
28492
  options2.push({
28476
28493
  label: "Allow for this session",
28477
- value: "proceed_always" /* ProceedAlways */,
28494
+ value: ToolConfirmationOutcome.ProceedAlways,
28478
28495
  key: "Allow for this session"
28479
28496
  });
28480
28497
  if (allowPermanentApproval) {
28481
28498
  options2.push({
28482
28499
  label: "Allow for this file in all future sessions",
28483
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28500
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28484
28501
  key: "Allow for this file in all future sessions"
28485
28502
  });
28486
28503
  }
@@ -28488,119 +28505,119 @@ ${deceptiveUrlWarnings.map(
28488
28505
  if (!config.getIdeMode() || !isDiffingEnabled) {
28489
28506
  options2.push({
28490
28507
  label: "Modify with external editor",
28491
- value: "modify_with_editor" /* ModifyWithEditor */,
28508
+ value: ToolConfirmationOutcome.ModifyWithEditor,
28492
28509
  key: "Modify with external editor"
28493
28510
  });
28494
28511
  }
28495
28512
  options2.push({
28496
28513
  label: "No, suggest changes (esc)",
28497
- value: "cancel" /* Cancel */,
28514
+ value: ToolConfirmationOutcome.Cancel,
28498
28515
  key: "No, suggest changes (esc)"
28499
28516
  });
28500
28517
  }
28501
28518
  } else if (confirmationDetails.type === "sandbox_expansion") {
28502
28519
  options2.push({
28503
28520
  label: "Allow once",
28504
- value: "proceed_once" /* ProceedOnce */,
28521
+ value: ToolConfirmationOutcome.ProceedOnce,
28505
28522
  key: "Allow once"
28506
28523
  });
28507
28524
  if (isTrustedFolder) {
28508
28525
  options2.push({
28509
28526
  label: "Allow for this session",
28510
- value: "proceed_always" /* ProceedAlways */,
28527
+ value: ToolConfirmationOutcome.ProceedAlways,
28511
28528
  key: "Allow for this session"
28512
28529
  });
28513
28530
  if (allowPermanentApproval) {
28514
28531
  options2.push({
28515
28532
  label: "Allow for all future sessions",
28516
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28533
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28517
28534
  key: "Allow for all future sessions"
28518
28535
  });
28519
28536
  }
28520
28537
  }
28521
28538
  options2.push({
28522
28539
  label: "No, suggest changes (esc)",
28523
- value: "cancel" /* Cancel */,
28540
+ value: ToolConfirmationOutcome.Cancel,
28524
28541
  key: "No, suggest changes (esc)"
28525
28542
  });
28526
28543
  } else if (confirmationDetails.type === "exec") {
28527
28544
  options2.push({
28528
28545
  label: "Allow once",
28529
- value: "proceed_once" /* ProceedOnce */,
28546
+ value: ToolConfirmationOutcome.ProceedOnce,
28530
28547
  key: "Allow once"
28531
28548
  });
28532
28549
  if (isTrustedFolder) {
28533
28550
  options2.push({
28534
28551
  label: `Allow for this session`,
28535
- value: "proceed_always" /* ProceedAlways */,
28552
+ value: ToolConfirmationOutcome.ProceedAlways,
28536
28553
  key: `Allow for this session`
28537
28554
  });
28538
28555
  if (allowPermanentApproval) {
28539
28556
  options2.push({
28540
28557
  label: `Allow this command for all future sessions`,
28541
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28558
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28542
28559
  key: `Allow for all future sessions`
28543
28560
  });
28544
28561
  }
28545
28562
  }
28546
28563
  options2.push({
28547
28564
  label: "No, suggest changes (esc)",
28548
- value: "cancel" /* Cancel */,
28565
+ value: ToolConfirmationOutcome.Cancel,
28549
28566
  key: "No, suggest changes (esc)"
28550
28567
  });
28551
28568
  } else if (confirmationDetails.type === "info") {
28552
28569
  options2.push({
28553
28570
  label: "Allow once",
28554
- value: "proceed_once" /* ProceedOnce */,
28571
+ value: ToolConfirmationOutcome.ProceedOnce,
28555
28572
  key: "Allow once"
28556
28573
  });
28557
28574
  if (isTrustedFolder) {
28558
28575
  options2.push({
28559
28576
  label: "Allow for this session",
28560
- value: "proceed_always" /* ProceedAlways */,
28577
+ value: ToolConfirmationOutcome.ProceedAlways,
28561
28578
  key: "Allow for this session"
28562
28579
  });
28563
28580
  if (allowPermanentApproval) {
28564
28581
  options2.push({
28565
28582
  label: "Allow for all future sessions",
28566
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28583
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28567
28584
  key: "Allow for all future sessions"
28568
28585
  });
28569
28586
  }
28570
28587
  }
28571
28588
  options2.push({
28572
28589
  label: "No, suggest changes (esc)",
28573
- value: "cancel" /* Cancel */,
28590
+ value: ToolConfirmationOutcome.Cancel,
28574
28591
  key: "No, suggest changes (esc)"
28575
28592
  });
28576
28593
  } else if (confirmationDetails.type === "mcp") {
28577
28594
  options2.push({
28578
28595
  label: "Allow once",
28579
- value: "proceed_once" /* ProceedOnce */,
28596
+ value: ToolConfirmationOutcome.ProceedOnce,
28580
28597
  key: "Allow once"
28581
28598
  });
28582
28599
  if (isTrustedFolder) {
28583
28600
  options2.push({
28584
28601
  label: "Allow tool for this session",
28585
- value: "proceed_always_tool" /* ProceedAlwaysTool */,
28602
+ value: ToolConfirmationOutcome.ProceedAlwaysTool,
28586
28603
  key: "Allow tool for this session"
28587
28604
  });
28588
28605
  options2.push({
28589
28606
  label: "Allow all server tools for this session",
28590
- value: "proceed_always_server" /* ProceedAlwaysServer */,
28607
+ value: ToolConfirmationOutcome.ProceedAlwaysServer,
28591
28608
  key: "Allow all server tools for this session"
28592
28609
  });
28593
28610
  if (allowPermanentApproval) {
28594
28611
  options2.push({
28595
28612
  label: "Allow tool for all future sessions",
28596
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
28613
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
28597
28614
  key: "Allow tool for all future sessions"
28598
28615
  });
28599
28616
  }
28600
28617
  }
28601
28618
  options2.push({
28602
28619
  label: "No, suggest changes (esc)",
28603
- value: "cancel" /* Cancel */,
28620
+ value: ToolConfirmationOutcome.Cancel,
28604
28621
  key: "No, suggest changes (esc)"
28605
28622
  });
28606
28623
  }
@@ -28645,7 +28662,7 @@ ${deceptiveUrlWarnings.map(
28645
28662
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
28646
28663
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
28647
28664
  const alwaysAndSaveIndex = options2.findIndex(
28648
- (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
28665
+ (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
28649
28666
  );
28650
28667
  if (alwaysAndSaveIndex !== -1) {
28651
28668
  initialIndex2 = alwaysAndSaveIndex;
@@ -28661,10 +28678,10 @@ ${deceptiveUrlWarnings.map(
28661
28678
  {
28662
28679
  questions: confirmationDetails.questions,
28663
28680
  onSubmit: (answers) => {
28664
- handleConfirm("proceed_once" /* ProceedOnce */, { answers });
28681
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
28665
28682
  },
28666
28683
  onCancel: () => {
28667
- handleConfirm("cancel" /* Cancel */);
28684
+ handleConfirm(ToolConfirmationOutcome.Cancel);
28668
28685
  },
28669
28686
  width: terminalWidth,
28670
28687
  availableHeight: availableBodyContentHeight()
@@ -28685,19 +28702,19 @@ ${deceptiveUrlWarnings.map(
28685
28702
  planPath: confirmationDetails.planPath,
28686
28703
  getPreferredEditor,
28687
28704
  onApprove: (approvalMode) => {
28688
- handleConfirm("proceed_once" /* ProceedOnce */, {
28705
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
28689
28706
  approved: true,
28690
28707
  approvalMode
28691
28708
  });
28692
28709
  },
28693
28710
  onFeedback: (feedback) => {
28694
- handleConfirm("proceed_once" /* ProceedOnce */, {
28711
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
28695
28712
  approved: false,
28696
28713
  feedback
28697
28714
  });
28698
28715
  },
28699
28716
  onCancel: () => {
28700
- handleConfirm("cancel" /* Cancel */);
28717
+ handleConfirm(ToolConfirmationOutcome.Cancel);
28701
28718
  },
28702
28719
  width: terminalWidth,
28703
28720
  availableHeight: availableBodyContentHeight()
@@ -28774,7 +28791,7 @@ ${deceptiveUrlWarnings.map(
28774
28791
  );
28775
28792
  let bodyContentHeight = availableBodyContentHeight();
28776
28793
  let warnings = null;
28777
- const isAutoEdit = config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
28794
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
28778
28795
  if (containsRedirection && !isAutoEdit) {
28779
28796
  const safeWidth = Math.max(terminalWidth, 1);
28780
28797
  const noteLength = REDIRECTION_WARNING_NOTE_LABEL.length + REDIRECTION_WARNING_NOTE_TEXT.length;
@@ -30954,7 +30971,7 @@ function validateAuthMethodWithSettings(authType, settings) {
30954
30971
  if (settings.merged.security.auth.useExternal) {
30955
30972
  return null;
30956
30973
  }
30957
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
30974
+ if (authType === AuthType.USE_GEMINI) {
30958
30975
  return null;
30959
30976
  }
30960
30977
  return validateAuthMethod(authType);
@@ -31006,7 +31023,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
31006
31023
  }
31007
31024
  return;
31008
31025
  }
31009
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
31026
+ if (authType === AuthType.USE_GEMINI) {
31010
31027
  const key = await reloadApiKey();
31011
31028
  if (!key) {
31012
31029
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -31081,31 +31098,31 @@ function AuthDialog({
31081
31098
  let items = [
31082
31099
  {
31083
31100
  label: "Sign in with Google",
31084
- value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
31085
- key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
31101
+ value: AuthType.LOGIN_WITH_GOOGLE,
31102
+ key: AuthType.LOGIN_WITH_GOOGLE
31086
31103
  },
31087
31104
  ...process.env["CLOUD_SHELL"] === "true" ? [
31088
31105
  {
31089
31106
  label: "Use Cloud Shell user credentials",
31090
- value: "compute-default-credentials" /* COMPUTE_ADC */,
31091
- key: "compute-default-credentials" /* COMPUTE_ADC */
31107
+ value: AuthType.COMPUTE_ADC,
31108
+ key: AuthType.COMPUTE_ADC
31092
31109
  }
31093
31110
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
31094
31111
  {
31095
31112
  label: "Use metadata server application default credentials",
31096
- value: "compute-default-credentials" /* COMPUTE_ADC */,
31097
- key: "compute-default-credentials" /* COMPUTE_ADC */
31113
+ value: AuthType.COMPUTE_ADC,
31114
+ key: AuthType.COMPUTE_ADC
31098
31115
  }
31099
31116
  ] : [],
31100
31117
  {
31101
31118
  label: "Use Gemini API Key",
31102
- value: "gemini-api-key" /* USE_GEMINI */,
31103
- key: "gemini-api-key" /* USE_GEMINI */
31119
+ value: AuthType.USE_GEMINI,
31120
+ key: AuthType.USE_GEMINI
31104
31121
  },
31105
31122
  {
31106
31123
  label: "Vertex AI",
31107
- value: "vertex-ai" /* USE_VERTEX_AI */,
31108
- key: "vertex-ai" /* USE_VERTEX_AI */
31124
+ value: AuthType.USE_VERTEX_AI,
31125
+ key: AuthType.USE_VERTEX_AI
31109
31126
  }
31110
31127
  ];
31111
31128
  if (settings.merged.security.auth.enforcedType) {
@@ -31127,9 +31144,9 @@ function AuthDialog({
31127
31144
  return item.value === defaultAuthType;
31128
31145
  }
31129
31146
  if (process.env["GEMINI_API_KEY"]) {
31130
- return item.value === "gemini-api-key" /* USE_GEMINI */;
31147
+ return item.value === AuthType.USE_GEMINI;
31131
31148
  }
31132
- return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
31149
+ return item.value === AuthType.LOGIN_WITH_GOOGLE;
31133
31150
  });
31134
31151
  if (settings.merged.security.auth.enforcedType) {
31135
31152
  initialAuthIndex = 0;
@@ -31140,19 +31157,19 @@ function AuthDialog({
31140
31157
  return;
31141
31158
  }
31142
31159
  if (authType) {
31143
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
31160
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
31144
31161
  setAuthContext({ requiresRestart: true });
31145
31162
  } else {
31146
31163
  setAuthContext({});
31147
31164
  }
31148
31165
  await clearCachedCredentialFile();
31149
31166
  settings.setValue(scope, "security.auth.selectedType", authType);
31150
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
31167
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
31151
31168
  setExiting(true);
31152
31169
  setTimeout(relaunchApp, 100);
31153
31170
  return;
31154
31171
  }
31155
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
31172
+ if (authType === AuthType.USE_GEMINI) {
31156
31173
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
31157
31174
  return;
31158
31175
  }
@@ -31902,11 +31919,11 @@ var PrivacyNoticeText = ({
31902
31919
  }) => {
31903
31920
  const authType = config.getContentGeneratorConfig()?.authType;
31904
31921
  switch (authType) {
31905
- case "gemini-api-key" /* USE_GEMINI */:
31922
+ case AuthType.USE_GEMINI:
31906
31923
  return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(GeminiPrivacyNotice, { onExit });
31907
- case "vertex-ai" /* USE_VERTEX_AI */:
31924
+ case AuthType.USE_VERTEX_AI:
31908
31925
  return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CloudPaidPrivacyNotice, { onExit });
31909
- case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
31926
+ case AuthType.LOGIN_WITH_GOOGLE:
31910
31927
  default:
31911
31928
  return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CloudFreePrivacyNotice, { config, onExit });
31912
31929
  }
@@ -31947,7 +31964,7 @@ function ProQuotaDialog({
31947
31964
  value: "retry_always",
31948
31965
  key: "retry_always"
31949
31966
  },
31950
- ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
31967
+ ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
31951
31968
  {
31952
31969
  label: "Upgrade for higher limits",
31953
31970
  value: "upgrade",
@@ -32950,7 +32967,7 @@ function ModelDialog({ onClose }) {
32950
32967
  const shouldShowPreviewModels = config?.getHasAccessToPreviewModel();
32951
32968
  const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
32952
32969
  const selectedAuthType = settings.merged.security.auth.selectedType;
32953
- const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
32970
+ const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
32954
32971
  const manualModelSelected = (0, import_react65.useMemo)(() => {
32955
32972
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.modelConfigService) {
32956
32973
  const def = config.modelConfigService.getModelDefinition(preferredModel);
@@ -34679,22 +34696,22 @@ var ApprovalModeIndicator = ({
34679
34696
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
34680
34697
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
34681
34698
  switch (approvalMode) {
34682
- case "autoEdit" /* AUTO_EDIT */:
34699
+ case ApprovalMode.AUTO_EDIT:
34683
34700
  textColor = theme.status.warning;
34684
34701
  textContent = "auto-accept edits";
34685
34702
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
34686
34703
  break;
34687
- case "plan" /* PLAN */:
34704
+ case ApprovalMode.PLAN:
34688
34705
  textColor = theme.status.success;
34689
34706
  textContent = "plan";
34690
34707
  subText = `${cycleHint} to manual`;
34691
34708
  break;
34692
- case "yolo" /* YOLO */:
34709
+ case ApprovalMode.YOLO:
34693
34710
  textColor = theme.status.error;
34694
34711
  textContent = "YOLO";
34695
34712
  subText = yoloHint;
34696
34713
  break;
34697
- case "default" /* DEFAULT */:
34714
+ case ApprovalMode.DEFAULT:
34698
34715
  default:
34699
34716
  textColor = theme.text.accent;
34700
34717
  textContent = "";
@@ -34801,11 +34818,11 @@ function useConsoleMessages() {
34801
34818
  }
34802
34819
  handleNewMessage({ type: "log", content, count: 1 });
34803
34820
  };
34804
- coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
34805
- coreEvents.on("output" /* Output */, handleOutput);
34821
+ coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
34822
+ coreEvents.on(CoreEvent.Output, handleOutput);
34806
34823
  return () => {
34807
- coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
34808
- coreEvents.off("output" /* Output */, handleOutput);
34824
+ coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
34825
+ coreEvents.off(CoreEvent.Output, handleOutput);
34809
34826
  };
34810
34827
  }, [handleNewMessage]);
34811
34828
  const clearConsoleMessages = (0, import_react70.useCallback)(() => {
@@ -34851,9 +34868,9 @@ function useErrorCount() {
34851
34868
  });
34852
34869
  }
34853
34870
  };
34854
- coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
34871
+ coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
34855
34872
  return () => {
34856
- coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
34873
+ coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
34857
34874
  };
34858
34875
  }, []);
34859
34876
  const clearErrorCount = (0, import_react70.useCallback)(() => {
@@ -36902,7 +36919,7 @@ function usePromptCompletion({
36902
36919
  { model: "prompt-completion" },
36903
36920
  contents,
36904
36921
  signal,
36905
- "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
36922
+ LlmRole.UTILITY_AUTOCOMPLETE
36906
36923
  );
36907
36924
  if (signal.aborted) {
36908
36925
  return;
@@ -38456,9 +38473,9 @@ var InputPrompt = ({
38456
38473
  onSuggestionsVisibilityChange(shouldShowSuggestions);
38457
38474
  }
38458
38475
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
38459
- const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
38460
- const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
38461
- const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
38476
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
38477
+ const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
38478
+ const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
38462
38479
  let statusColor;
38463
38480
  let statusText = "";
38464
38481
  if (shellModeActive) {
@@ -38718,7 +38735,7 @@ var ConfigInitDisplay = ({
38718
38735
  let connected = 0;
38719
38736
  const connecting = [];
38720
38737
  for (const [name, client] of clients.entries()) {
38721
- if (client.getStatus() === "connected" /* CONNECTED */) {
38738
+ if (client.getStatus() === MCPServerStatus.CONNECTED) {
38722
38739
  connected++;
38723
38740
  } else {
38724
38741
  connecting.push(name);
@@ -38740,9 +38757,9 @@ var ConfigInitDisplay = ({
38740
38757
  );
38741
38758
  }
38742
38759
  };
38743
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
38760
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
38744
38761
  return () => {
38745
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
38762
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
38746
38763
  };
38747
38764
  }, [initialMessage]);
38748
38765
  return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(Text, { children: [
@@ -38961,7 +38978,7 @@ var Composer = ({ isFocused = true }) => {
38961
38978
  (item) => item.type === "tool_group"
38962
38979
  ).some(
38963
38980
  (item) => item.tools.some(
38964
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
38981
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
38965
38982
  )
38966
38983
  ),
38967
38984
  [uiState.pendingHistoryItems]
@@ -38990,16 +39007,16 @@ var Composer = ({ isFocused = true }) => {
38990
39007
  const showRawMarkdownIndicator = !uiState.renderMarkdown;
38991
39008
  let modeBleedThrough = null;
38992
39009
  switch (showApprovalModeIndicator) {
38993
- case "yolo" /* YOLO */:
39010
+ case ApprovalMode.YOLO:
38994
39011
  modeBleedThrough = { text: "YOLO", color: theme.status.error };
38995
39012
  break;
38996
- case "plan" /* PLAN */:
39013
+ case ApprovalMode.PLAN:
38997
39014
  modeBleedThrough = { text: "plan", color: theme.status.success };
38998
39015
  break;
38999
- case "autoEdit" /* AUTO_EDIT */:
39016
+ case ApprovalMode.AUTO_EDIT:
39000
39017
  modeBleedThrough = { text: "auto edit", color: theme.status.warning };
39001
39018
  break;
39002
- case "default" /* DEFAULT */:
39019
+ case ApprovalMode.DEFAULT:
39003
39020
  modeBleedThrough = null;
39004
39021
  break;
39005
39022
  default:
@@ -39646,7 +39663,7 @@ var useShellCommandProcessor = (addItemToHistory, setPendingHistoryItem, onExec,
39646
39663
  callId,
39647
39664
  name: SHELL_COMMAND_NAME,
39648
39665
  description: rawQuery,
39649
- status: "executing" /* Executing */,
39666
+ status: CoreToolCallStatus.Executing,
39650
39667
  isClientInitiated: true,
39651
39668
  resultDisplay: "",
39652
39669
  confirmationDetails: void 0
@@ -39766,24 +39783,24 @@ var useShellCommandProcessor = (addItemToHistory, setPendingHistoryItem, onExec,
39766
39783
  mainContent = result.output.trim() || "(Command produced no output)";
39767
39784
  }
39768
39785
  let finalOutput = mainContent;
39769
- let finalStatus = "success" /* Success */;
39786
+ let finalStatus = CoreToolCallStatus.Success;
39770
39787
  if (result.error) {
39771
- finalStatus = "error" /* Error */;
39788
+ finalStatus = CoreToolCallStatus.Error;
39772
39789
  finalOutput = `${result.error.message}
39773
39790
  ${finalOutput}`;
39774
39791
  } else if (result.aborted) {
39775
- finalStatus = "cancelled" /* Cancelled */;
39792
+ finalStatus = CoreToolCallStatus.Cancelled;
39776
39793
  finalOutput = `Command was cancelled.
39777
39794
  ${finalOutput}`;
39778
39795
  } else if (result.backgrounded) {
39779
- finalStatus = "success" /* Success */;
39796
+ finalStatus = CoreToolCallStatus.Success;
39780
39797
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
39781
39798
  } else if (result.signal) {
39782
- finalStatus = "error" /* Error */;
39799
+ finalStatus = CoreToolCallStatus.Error;
39783
39800
  finalOutput = `Command terminated by signal: ${result.signal}.
39784
39801
  ${finalOutput}`;
39785
39802
  } else if (result.exitCode !== 0) {
39786
- finalStatus = "error" /* Error */;
39803
+ finalStatus = CoreToolCallStatus.Error;
39787
39804
  finalOutput = `Command exited with code ${result.exitCode}.
39788
39805
  ${finalOutput}`;
39789
39806
  }
@@ -39801,7 +39818,7 @@ ${finalOutput}`;
39801
39818
  status: finalStatus,
39802
39819
  resultDisplay: finalOutput
39803
39820
  };
39804
- if (finalStatus !== "cancelled" /* Cancelled */) {
39821
+ if (finalStatus !== CoreToolCallStatus.Cancelled) {
39805
39822
  addItemToHistory(
39806
39823
  {
39807
39824
  type: "tool_group",
@@ -40780,7 +40797,7 @@ function useQuotaAndFallback({
40780
40797
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
40781
40798
  `/stats model for usage details`,
40782
40799
  `/model to switch models.`,
40783
- contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
40800
+ contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
40784
40801
  ].filter(Boolean);
40785
40802
  message = messageLines.join("\n");
40786
40803
  } else if (error instanceof ModelNotFoundError) {
@@ -40968,7 +40985,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
40968
40985
  );
40969
40986
  setEditorError(null);
40970
40987
  setIsEditorDialogOpen(false);
40971
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
40988
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
40972
40989
  } catch (error) {
40973
40990
  setEditorError(`Failed to set editor preference: ${error}`);
40974
40991
  }
@@ -40977,7 +40994,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
40977
40994
  );
40978
40995
  const exitEditorDialog = (0, import_react96.useCallback)(() => {
40979
40996
  setIsEditorDialogOpen(false);
40980
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
40997
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
40981
40998
  }, []);
40982
40999
  return {
40983
41000
  isEditorDialogOpen,
@@ -41332,7 +41349,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41332
41349
  canonicalPath: resolvedCommandPath
41333
41350
  } = parseSlashCommand(trimmed, commands);
41334
41351
  if (!commandToExecute) {
41335
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
41352
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
41336
41353
  if (isMcpLoading) {
41337
41354
  setIsProcessing(true);
41338
41355
  if (addToHistory) {
@@ -41500,7 +41517,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41500
41517
  onConfirm: async (resolvedOutcome) => {
41501
41518
  resolve3({
41502
41519
  outcome: resolvedOutcome,
41503
- approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
41520
+ approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
41504
41521
  });
41505
41522
  }
41506
41523
  };
@@ -41508,7 +41525,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41508
41525
  callId,
41509
41526
  name: "Expansion",
41510
41527
  description: "Command expansion needs shell access",
41511
- status: "awaiting_approval" /* AwaitingApproval */,
41528
+ status: CoreToolCallStatus.AwaitingApproval,
41512
41529
  isClientInitiated: true,
41513
41530
  resultDisplay: void 0,
41514
41531
  confirmationDetails
@@ -41519,7 +41536,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41519
41536
  });
41520
41537
  });
41521
41538
  setPendingItem(null);
41522
- if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
41539
+ if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
41523
41540
  addItem(
41524
41541
  {
41525
41542
  type: "info" /* INFO */,
@@ -41529,7 +41546,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
41529
41546
  );
41530
41547
  return { type: "handled" };
41531
41548
  }
41532
- if (outcome === "proceed_always" /* ProceedAlways */) {
41549
+ if (outcome === ToolConfirmationOutcome.ProceedAlways) {
41533
41550
  setSessionShellAllowlist(
41534
41551
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
41535
41552
  );
@@ -42006,7 +42023,7 @@ function mapToDisplay(toolOrTools, options = {}) {
42006
42023
  let description;
42007
42024
  let renderOutputAsMarkdown = false;
42008
42025
  const displayName = call.tool?.displayName ?? call.request.name;
42009
- if (call.status === "error" /* Error */) {
42026
+ if (call.status === CoreToolCallStatus.Error) {
42010
42027
  description = JSON.stringify(call.request.args);
42011
42028
  } else {
42012
42029
  description = call.invocation.getDescription();
@@ -42028,27 +42045,27 @@ function mapToDisplay(toolOrTools, options = {}) {
42028
42045
  let progress = void 0;
42029
42046
  let progressTotal = void 0;
42030
42047
  switch (call.status) {
42031
- case "success" /* Success */:
42048
+ case CoreToolCallStatus.Success:
42032
42049
  resultDisplay = call.response.resultDisplay;
42033
42050
  outputFile = call.response.outputFile;
42034
42051
  break;
42035
- case "error" /* Error */:
42036
- case "cancelled" /* Cancelled */:
42052
+ case CoreToolCallStatus.Error:
42053
+ case CoreToolCallStatus.Cancelled:
42037
42054
  resultDisplay = call.response.resultDisplay;
42038
42055
  break;
42039
- case "awaiting_approval" /* AwaitingApproval */:
42056
+ case CoreToolCallStatus.AwaitingApproval:
42040
42057
  correlationId = call.correlationId;
42041
42058
  confirmationDetails = call.confirmationDetails;
42042
42059
  break;
42043
- case "executing" /* Executing */:
42060
+ case CoreToolCallStatus.Executing:
42044
42061
  resultDisplay = call.liveOutput;
42045
42062
  ptyId = call.pid;
42046
42063
  progressMessage = call.progressMessage;
42047
42064
  progress = call.progress;
42048
42065
  progressTotal = call.progressTotal;
42049
42066
  break;
42050
- case "scheduled" /* Scheduled */:
42051
- case "validating" /* Validating */:
42067
+ case CoreToolCallStatus.Scheduled:
42068
+ case CoreToolCallStatus.Validating:
42052
42069
  break;
42053
42070
  default: {
42054
42071
  const exhaustiveCheck = call;
@@ -42117,7 +42134,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42117
42134
  const handler = (event) => {
42118
42135
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
42119
42136
  const hasExecuting = event.toolCalls.some(
42120
- (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
42137
+ (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
42121
42138
  );
42122
42139
  if (hasExecuting) {
42123
42140
  setLastToolOutputTime(Date.now());
@@ -42126,7 +42143,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42126
42143
  const prevCalls = prev[event.schedulerId] ?? [];
42127
42144
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
42128
42145
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
42129
- (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
42146
+ (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
42130
42147
  );
42131
42148
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
42132
42149
  return prev;
@@ -42138,9 +42155,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
42138
42155
  };
42139
42156
  });
42140
42157
  };
42141
- messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
42158
+ messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
42142
42159
  return () => {
42143
- messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
42160
+ messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
42144
42161
  };
42145
42162
  }, [messageBus, internalAdaptToolCalls]);
42146
42163
  const schedule = (0, import_react102.useCallback)(
@@ -42212,8 +42229,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
42212
42229
  const prev = prevMap.get(coreCall.request.callId);
42213
42230
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
42214
42231
  let status = coreCall.status;
42215
- if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
42216
- status = "executing" /* Executing */;
42232
+ if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
42233
+ status = CoreToolCallStatus.Executing;
42217
42234
  }
42218
42235
  return {
42219
42236
  ...coreCall,
@@ -42244,7 +42261,7 @@ function getBackgroundedToolInfo(toolCall) {
42244
42261
  };
42245
42262
  }
42246
42263
  function isBackgroundableExecutingToolCall(toolCall) {
42247
- return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
42264
+ return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
42248
42265
  }
42249
42266
  function showCitations(settings) {
42250
42267
  const enabled = settings.merged.ui.showCitations;
@@ -42254,14 +42271,14 @@ function showCitations(settings) {
42254
42271
  return true;
42255
42272
  }
42256
42273
  function calculateStreamingState(isResponding, toolCalls) {
42257
- if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
42274
+ if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
42258
42275
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
42259
42276
  }
42260
42277
  const isAnyToolActive = toolCalls.some((tc) => {
42261
- if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
42278
+ if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
42262
42279
  return true;
42263
42280
  }
42264
- if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
42281
+ if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
42265
42282
  return !tc.responseSubmittedToGemini;
42266
42283
  }
42267
42284
  return false;
@@ -42314,9 +42331,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
42314
42331
  const handleRetryAttempt = (payload) => {
42315
42332
  setRetryStatus(payload);
42316
42333
  };
42317
- coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
42334
+ coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
42318
42335
  return () => {
42319
- coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
42336
+ coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
42320
42337
  };
42321
42338
  }, []);
42322
42339
  const [
@@ -42433,12 +42450,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
42433
42450
  const tc = toolCalls[i];
42434
42451
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
42435
42452
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
42436
- const isAgent = tc.tool?.kind === "agent" /* Agent */;
42453
+ const isAgent = tc.tool?.kind === Kind.Agent;
42437
42454
  if (isAgent) {
42438
42455
  let contigAgentsComplete = true;
42439
42456
  for (let j = i + 1; j < toolCalls.length; j++) {
42440
42457
  const nextTc = toolCalls[j];
42441
- if (nextTc.tool?.kind === "agent" /* Agent */) {
42458
+ if (nextTc.tool?.kind === Kind.Agent) {
42442
42459
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
42443
42460
  contigAgentsComplete = false;
42444
42461
  break;
@@ -42556,7 +42573,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
42556
42573
  prevActiveShellPtyIdRef.current = activeShellPtyId;
42557
42574
  }, [activeShellPtyId, addItem, setIsResponding]);
42558
42575
  (0, import_react103.useEffect)(() => {
42559
- if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
42576
+ if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
42560
42577
  const lastUserMessageIndex = history.findLastIndex(
42561
42578
  (item) => item.type === "user" /* USER */
42562
42579
  );
@@ -42641,7 +42658,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
42641
42658
  if (tool.name === SHELL_COMMAND_NAME) {
42642
42659
  return {
42643
42660
  ...tool,
42644
- status: "cancelled" /* Cancelled */,
42661
+ status: CoreToolCallStatus.Cancelled,
42645
42662
  resultDisplay: tool.resultDisplay
42646
42663
  };
42647
42664
  }
@@ -42697,7 +42714,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
42697
42714
  let localQueryToSendToGemini = null;
42698
42715
  if (typeof query === "string") {
42699
42716
  const trimmedQuery = query.trim();
42700
- await logger?.logMessage("user" /* USER */, trimmedQuery);
42717
+ await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
42701
42718
  if (!shellModeActive) {
42702
42719
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
42703
42720
  if (slashCommandResult) {
@@ -42853,7 +42870,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
42853
42870
  if (pendingHistoryItemRef.current) {
42854
42871
  if (pendingHistoryItemRef.current.type === "tool_group") {
42855
42872
  const updatedTools = pendingHistoryItemRef.current.tools.map(
42856
- (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
42873
+ (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
42857
42874
  );
42858
42875
  const pendingItem = {
42859
42876
  ...pendingHistoryItemRef.current,
@@ -43099,15 +43116,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43099
43116
  let geminiMessageBuffer = "";
43100
43117
  const toolCallRequests = [];
43101
43118
  for await (const event of stream) {
43102
- if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
43119
+ if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
43103
43120
  setThought(null);
43104
43121
  }
43105
43122
  switch (event.type) {
43106
- case "thought" /* Thought */:
43123
+ case GeminiEventType.Thought:
43107
43124
  setLastGeminiActivityTime(Date.now());
43108
43125
  handleThoughtEvent(event.value, userMessageTimestamp);
43109
43126
  break;
43110
- case "content" /* Content */:
43127
+ case GeminiEventType.Content:
43111
43128
  setLastGeminiActivityTime(Date.now());
43112
43129
  geminiMessageBuffer = handleContentEvent(
43113
43130
  event.value,
@@ -43115,16 +43132,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43115
43132
  userMessageTimestamp
43116
43133
  );
43117
43134
  break;
43118
- case "tool_call_request" /* ToolCallRequest */:
43135
+ case GeminiEventType.ToolCallRequest:
43119
43136
  toolCallRequests.push(event.value);
43120
43137
  break;
43121
- case "user_cancelled" /* UserCancelled */:
43138
+ case GeminiEventType.UserCancelled:
43122
43139
  handleUserCancelledEvent(userMessageTimestamp);
43123
43140
  break;
43124
- case "error" /* Error */:
43141
+ case GeminiEventType.Error:
43125
43142
  handleErrorEvent(event.value, userMessageTimestamp);
43126
43143
  break;
43127
- case "agent_execution_stopped" /* AgentExecutionStopped */:
43144
+ case GeminiEventType.AgentExecutionStopped:
43128
43145
  handleAgentExecutionStoppedEvent(
43129
43146
  event.value.reason,
43130
43147
  userMessageTimestamp,
@@ -43132,7 +43149,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43132
43149
  event.value.contextCleared
43133
43150
  );
43134
43151
  break;
43135
- case "agent_execution_blocked" /* AgentExecutionBlocked */:
43152
+ case GeminiEventType.AgentExecutionBlocked:
43136
43153
  handleAgentExecutionBlockedEvent(
43137
43154
  event.value.reason,
43138
43155
  userMessageTimestamp,
@@ -43140,35 +43157,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43140
43157
  event.value.contextCleared
43141
43158
  );
43142
43159
  break;
43143
- case "chat_compressed" /* ChatCompressed */:
43160
+ case GeminiEventType.ChatCompressed:
43144
43161
  handleChatCompressionEvent(event.value, userMessageTimestamp);
43145
43162
  break;
43146
- case "tool_call_confirmation" /* ToolCallConfirmation */:
43147
- case "tool_call_response" /* ToolCallResponse */:
43163
+ case GeminiEventType.ToolCallConfirmation:
43164
+ case GeminiEventType.ToolCallResponse:
43148
43165
  break;
43149
- case "max_session_turns" /* MaxSessionTurns */:
43166
+ case GeminiEventType.MaxSessionTurns:
43150
43167
  handleMaxSessionTurnsEvent();
43151
43168
  break;
43152
- case "context_window_will_overflow" /* ContextWindowWillOverflow */:
43169
+ case GeminiEventType.ContextWindowWillOverflow:
43153
43170
  handleContextWindowWillOverflowEvent(
43154
43171
  event.value.estimatedRequestTokenCount,
43155
43172
  event.value.remainingTokenCount
43156
43173
  );
43157
43174
  break;
43158
- case "finished" /* Finished */:
43175
+ case GeminiEventType.Finished:
43159
43176
  handleFinishedEvent(event, userMessageTimestamp);
43160
43177
  break;
43161
- case "citation" /* Citation */:
43178
+ case GeminiEventType.Citation:
43162
43179
  handleCitationEvent(event.value, userMessageTimestamp);
43163
43180
  break;
43164
- case "model_info" /* ModelInfo */:
43181
+ case GeminiEventType.ModelInfo:
43165
43182
  handleChatModelEvent(event.value, userMessageTimestamp);
43166
43183
  break;
43167
- case "loop_detected" /* LoopDetected */:
43184
+ case GeminiEventType.LoopDetected:
43168
43185
  loopDetectedRef.current = true;
43169
43186
  break;
43170
- case "retry" /* Retry */:
43171
- case "invalid_stream" /* InvalidStream */:
43187
+ case GeminiEventType.Retry:
43188
+ case GeminiEventType.InvalidStream:
43172
43189
  break;
43173
43190
  default: {
43174
43191
  const unreachable = event;
@@ -43209,7 +43226,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43209
43226
  const submitQuery = (0, import_react103.useCallback)(
43210
43227
  async (query, options, prompt_id) => runInDevTraceSpan(
43211
43228
  {
43212
- operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */
43229
+ operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt
43213
43230
  },
43214
43231
  async ({ metadata: spanMetadata }) => {
43215
43232
  spanMetadata.input = query;
@@ -43368,7 +43385,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43368
43385
  );
43369
43386
  const handleApprovalModeChange = (0, import_react103.useCallback)(
43370
43387
  async (newApprovalMode) => {
43371
- if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
43388
+ if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
43372
43389
  if (geminiClient) {
43373
43390
  try {
43374
43391
  await geminiClient.addHistory({
@@ -43391,11 +43408,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43391
43408
  }
43392
43409
  }
43393
43410
  previousApprovalModeRef.current = newApprovalMode;
43394
- if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
43411
+ if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
43395
43412
  let awaitingApprovalCalls = toolCalls.filter(
43396
43413
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
43397
43414
  );
43398
- if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
43415
+ if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
43399
43416
  awaitingApprovalCalls = awaitingApprovalCalls.filter(
43400
43417
  (call) => EDIT_TOOL_NAMES.has(call.request.name)
43401
43418
  );
@@ -43404,11 +43421,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43404
43421
  if (call.correlationId) {
43405
43422
  try {
43406
43423
  await config.getMessageBus().publish({
43407
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
43424
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
43408
43425
  correlationId: call.correlationId,
43409
43426
  confirmed: true,
43410
43427
  requiresUserConfirmation: false,
43411
- outcome: "proceed_once" /* ProceedOnce */
43428
+ outcome: ToolConfirmationOutcome.ProceedOnce
43412
43429
  });
43413
43430
  } catch (error) {
43414
43431
  debugLogger.warn(
@@ -43486,14 +43503,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43486
43503
  );
43487
43504
  if (isLowErrorVerbosity) {
43488
43505
  suppressedToolErrorCountRef.current += geminiTools.filter(
43489
- (tc) => tc.status === "error" /* Error */
43506
+ (tc) => tc.status === CoreToolCallStatus.Error
43490
43507
  ).length;
43491
43508
  }
43492
43509
  if (geminiTools.length === 0) {
43493
43510
  return;
43494
43511
  }
43495
43512
  const stopExecutionTool = geminiTools.find(
43496
- (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
43513
+ (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
43497
43514
  );
43498
43515
  if (stopExecutionTool && stopExecutionTool.response.error) {
43499
43516
  maybeAddSuppressedToolErrorNote();
@@ -43510,7 +43527,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43510
43527
  return;
43511
43528
  }
43512
43529
  const allToolsCancelled = geminiTools.every(
43513
- (tc) => tc.status === "cancelled" /* Cancelled */
43530
+ (tc) => tc.status === CoreToolCallStatus.Cancelled
43514
43531
  );
43515
43532
  if (allToolsCancelled) {
43516
43533
  if (!turnCancelledRef.current) {
@@ -43592,7 +43609,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
43592
43609
  return;
43593
43610
  }
43594
43611
  const restorableToolCalls = toolCalls.filter(
43595
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
43612
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
43596
43613
  );
43597
43614
  if (restorableToolCalls.length > 0) {
43598
43615
  if (!gitService) {
@@ -46059,7 +46076,7 @@ function useMessageQueue({
46059
46076
  var import_react110 = __toESM(require_react(), 1);
46060
46077
  function useMcpStatus(config) {
46061
46078
  const [discoveryState, setDiscoveryState] = (0, import_react110.useState)(
46062
- () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
46079
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
46063
46080
  );
46064
46081
  const [mcpServerCount, setMcpServerCount] = (0, import_react110.useState)(
46065
46082
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -46072,12 +46089,12 @@ function useMcpStatus(config) {
46072
46089
  setMcpServerCount(manager.getMcpServerCount());
46073
46090
  }
46074
46091
  };
46075
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
46092
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
46076
46093
  return () => {
46077
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
46094
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
46078
46095
  };
46079
46096
  }, [config]);
46080
- const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
46097
+ const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
46081
46098
  return {
46082
46099
  discoveryState,
46083
46100
  mcpServerCount,
@@ -46104,7 +46121,7 @@ function useApprovalModeIndicator({
46104
46121
  (key) => {
46105
46122
  let nextApprovalMode;
46106
46123
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
46107
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
46124
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
46108
46125
  if (addItem) {
46109
46126
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
46110
46127
  const adminSettings = config.getRemoteAdminSettings();
@@ -46122,21 +46139,21 @@ function useApprovalModeIndicator({
46122
46139
  }
46123
46140
  return;
46124
46141
  }
46125
- nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
46142
+ nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
46126
46143
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
46127
46144
  const currentMode = config.getApprovalMode();
46128
46145
  switch (currentMode) {
46129
- case "default" /* DEFAULT */:
46130
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
46146
+ case ApprovalMode.DEFAULT:
46147
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
46131
46148
  break;
46132
- case "autoEdit" /* AUTO_EDIT */:
46133
- nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
46149
+ case ApprovalMode.AUTO_EDIT:
46150
+ nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
46134
46151
  break;
46135
- case "plan" /* PLAN */:
46136
- nextApprovalMode = "default" /* DEFAULT */;
46152
+ case ApprovalMode.PLAN:
46153
+ nextApprovalMode = ApprovalMode.DEFAULT;
46137
46154
  break;
46138
- case "yolo" /* YOLO */:
46139
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
46155
+ case ApprovalMode.YOLO:
46156
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
46140
46157
  break;
46141
46158
  default:
46142
46159
  }
@@ -46529,11 +46546,11 @@ var useHookDisplayState = () => {
46529
46546
  removeHook();
46530
46547
  }
46531
46548
  };
46532
- coreEvents.on("hook-start" /* HookStart */, handleHookStart);
46533
- coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
46549
+ coreEvents.on(CoreEvent.HookStart, handleHookStart);
46550
+ coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
46534
46551
  return () => {
46535
- coreEvents.off("hook-start" /* HookStart */, handleHookStart);
46536
- coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
46552
+ coreEvents.off(CoreEvent.HookStart, handleHookStart);
46553
+ coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
46537
46554
  activeTimeouts.forEach(clearTimeout);
46538
46555
  activeTimeouts.clear();
46539
46556
  };
@@ -47331,7 +47348,7 @@ var AppContainer = (props) => {
47331
47348
  }
47332
47349
  setConfigInitialized(true);
47333
47350
  startupProfiler.flush(config);
47334
- const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
47351
+ const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
47335
47352
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
47336
47353
  if (result) {
47337
47354
  if (result.systemMessage) {
@@ -47367,7 +47384,7 @@ var AppContainer = (props) => {
47367
47384
  );
47368
47385
  const ideClient = await IdeClient.getInstance();
47369
47386
  await ideClient.disconnect();
47370
- await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
47387
+ await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
47371
47388
  });
47372
47389
  }, [config, resumedSessionData]);
47373
47390
  (0, import_react124.useEffect)(
@@ -47385,11 +47402,11 @@ var AppContainer = (props) => {
47385
47402
  resetTime: payload.resetTime
47386
47403
  });
47387
47404
  };
47388
- coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
47389
- coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
47405
+ coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
47406
+ coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
47390
47407
  return () => {
47391
- coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
47392
- coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
47408
+ coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
47409
+ coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
47393
47410
  };
47394
47411
  }, [config]);
47395
47412
  (0, import_react124.useEffect)(() => {
@@ -47402,16 +47419,16 @@ var AppContainer = (props) => {
47402
47419
  const handleAgentsDiscovered = (payload) => {
47403
47420
  setNewAgents(payload.agents);
47404
47421
  };
47405
- coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
47406
- coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
47407
- coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
47422
+ coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
47423
+ coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
47424
+ coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
47408
47425
  return () => {
47409
- coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
47426
+ coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
47410
47427
  coreEvents.off(
47411
- "admin-settings-changed" /* AdminSettingsChanged */,
47428
+ CoreEvent.AdminSettingsChanged,
47412
47429
  handleAdminSettingsChanged
47413
47430
  );
47414
- coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
47431
+ coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
47415
47432
  };
47416
47433
  }, [settings]);
47417
47434
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -47477,11 +47494,11 @@ var AppContainer = (props) => {
47477
47494
  exitEditorDialog
47478
47495
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
47479
47496
  (0, import_react124.useEffect)(() => {
47480
- coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
47481
- coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
47497
+ coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
47498
+ coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
47482
47499
  return () => {
47483
- coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
47484
- coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
47500
+ coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
47501
+ coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
47485
47502
  };
47486
47503
  }, [handleEditorClose, openEditorDialog]);
47487
47504
  (0, import_react124.useEffect)(() => {
@@ -47549,7 +47566,7 @@ var AppContainer = (props) => {
47549
47566
  errorVerbosity: settings.merged.ui.errorVerbosity
47550
47567
  });
47551
47568
  const isAuthDialogOpen = authState === "updating" /* Updating */;
47552
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
47569
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
47553
47570
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
47554
47571
  const { loadHistoryForResume, isResuming } = useSessionResume({
47555
47572
  config,
@@ -47577,7 +47594,7 @@ var AppContainer = (props) => {
47577
47594
  async (authType, scope) => {
47578
47595
  if (authType) {
47579
47596
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
47580
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
47597
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
47581
47598
  setAuthContext({ requiresRestart: true });
47582
47599
  } else {
47583
47600
  setAuthContext({});
@@ -47605,7 +47622,7 @@ var AppContainer = (props) => {
47605
47622
  );
47606
47623
  return;
47607
47624
  }
47608
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
47625
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
47609
47626
  writeToStdout(`
47610
47627
  ----------------------------------------------------------------
47611
47628
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -47630,7 +47647,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
47630
47647
  }
47631
47648
  await saveApiKey(apiKey);
47632
47649
  await reloadApiKey();
47633
- await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
47650
+ await config.refreshAuth(AuthType.USE_GEMINI);
47634
47651
  setAuthState("authenticated" /* Authenticated */);
47635
47652
  } catch (e) {
47636
47653
  onAuthError(
@@ -47655,7 +47672,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
47655
47672
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
47656
47673
  );
47657
47674
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
47658
- if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
47675
+ if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
47659
47676
  return;
47660
47677
  }
47661
47678
  const error = validateAuthMethod(
@@ -47774,9 +47791,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
47774
47791
  }
47775
47792
  });
47776
47793
  };
47777
- coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
47794
+ coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
47778
47795
  return () => {
47779
- coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
47796
+ coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
47780
47797
  };
47781
47798
  }, []);
47782
47799
  const performMemoryRefresh = (0, import_react124.useCallback)(async () => {
@@ -48368,7 +48385,7 @@ ${queuedText}` : queuedText;
48368
48385
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
48369
48386
  if (settings.merged.general.devtools) {
48370
48387
  void (async () => {
48371
- const { toggleDevToolsPanel } = await import("./devtoolsService-GIESJD2E.js");
48388
+ const { toggleDevToolsPanel } = await import("./devtoolsService-B7OD724C.js");
48372
48389
  await toggleDevToolsPanel(
48373
48390
  config,
48374
48391
  showErrorDetails,
@@ -48569,10 +48586,10 @@ ${queuedText}` : queuedText;
48569
48586
  );
48570
48587
  }
48571
48588
  };
48572
- coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
48589
+ coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
48573
48590
  coreEvents.drainBacklogs();
48574
48591
  return () => {
48575
- coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
48592
+ coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
48576
48593
  };
48577
48594
  }, [historyManager]);
48578
48595
  const nightly = props.version.includes("nightly");
@@ -48670,9 +48687,9 @@ ${queuedText}` : queuedText;
48670
48687
  const handleMemoryChanged = (result) => {
48671
48688
  setGeminiMdFileCount(result.fileCount);
48672
48689
  };
48673
- coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
48690
+ coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
48674
48691
  return () => {
48675
- coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
48692
+ coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
48676
48693
  };
48677
48694
  }, []);
48678
48695
  (0, import_react124.useEffect)(() => {