@google/gemini-cli 0.66.0-nightly.20261019.ged96faedf → 0.66.0-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/bundle/{chunk-NU74STQ5.js → chunk-3IDBGHHH.js} +9 -1
  2. package/bundle/{chunk-6P5R6RYB.js → chunk-3RUC6ZA6.js} +1 -1
  3. package/bundle/{chunk-R7UPATQC.js → chunk-5ILL3HFF.js} +2 -2
  4. package/bundle/{chunk-L5EUR3NN.js → chunk-7KFTNUNE.js} +9 -1
  5. package/bundle/{chunk-G3S7WMRG.js → chunk-BAGLLEOA.js} +237 -141
  6. package/bundle/{chunk-J5QPCO3J.js → chunk-D4FKL6WQ.js} +7 -7
  7. package/bundle/{chunk-QCWGLPCO.js → chunk-D6WVFS5S.js} +292 -161
  8. package/bundle/{chunk-NAPT3FAL.js → chunk-EONTJM32.js} +7 -7
  9. package/bundle/{chunk-LPQB7ZQE.js → chunk-EZIYD2G6.js} +58 -71
  10. package/bundle/{chunk-ERBSM2HU.js → chunk-GA6BNFA6.js} +3 -3
  11. package/bundle/{chunk-AWUJQFYP.js → chunk-HH6UGBJR.js} +1 -1
  12. package/bundle/{chunk-ZFQ347ZN.js → chunk-I6Q2CIAC.js} +15211 -8012
  13. package/bundle/{chunk-IDCWFZU3.js → chunk-ITTQBJIT.js} +1 -1
  14. package/bundle/{chunk-464WBVYM.js → chunk-LC5SKSCL.js} +1 -1
  15. package/bundle/{chunk-CTWJ3T77.js → chunk-OCM26AU2.js} +2 -2
  16. package/bundle/{chunk-5P6HIACT.js → chunk-OGLIOKXL.js} +3 -3
  17. package/bundle/{chunk-5VQUE3OF.js → chunk-PWTTZOSA.js} +1 -1
  18. package/bundle/{chunk-V5XDOSXJ.js → chunk-RJ3GGOMU.js} +13 -7
  19. package/bundle/{chunk-O5W3WYI5.js → chunk-SZE3LGYD.js} +1 -1
  20. package/bundle/{chunk-RE4V6I3G.js → chunk-TZZ34RGM.js} +1 -1
  21. package/bundle/{chunk-7UDRNCIH.js → chunk-VDKR3AIQ.js} +3 -3
  22. package/bundle/{chunk-YP27UYI4.js → chunk-VN6QPF5Z.js} +1 -1
  23. package/bundle/{chunk-GCW52DLB.js → chunk-XH7KGX2J.js} +2 -2
  24. package/bundle/{chunk-7K5J3ME2.js → chunk-Z3NAT6YU.js} +8 -9
  25. package/bundle/{cleanup-5DK3CVRM.js → cleanup-5UHD34BY.js} +2 -2
  26. package/bundle/{cleanup-6FAZDCL3.js → cleanup-D3DWTLIR.js} +2 -2
  27. package/bundle/{cleanup-WAU2KYGS.js → cleanup-GF4YFJWT.js} +2 -2
  28. package/bundle/{core-AGGXDQOT.js → core-CEUTCQ3Z.js} +3 -1
  29. package/bundle/{dist-2ELAEESC.js → core-GH3VFZSV.js} +3 -1
  30. package/bundle/{devtoolsService-UO6ZB72B.js → devtoolsService-3EKYJHGL.js} +95 -32
  31. package/bundle/{devtoolsService-FBTSVQ57.js → devtoolsService-KQTX22AU.js} +96 -34
  32. package/bundle/{devtoolsService-AWYBM7VP.js → devtoolsService-YPLYVNTF.js} +95 -32
  33. package/bundle/{dist-4PMK5N6W.js → dist-Q63VF7PG.js} +3 -1
  34. package/bundle/docs/cli/plan-mode.md +1 -1
  35. package/bundle/docs/tools/mcp-server.md +6 -0
  36. package/bundle/{gemini-GK2XZNXB.js → gemini-LRDBGCHF.js} +14 -14
  37. package/bundle/{gemini-OUEDCH4P.js → gemini-VE6EAOCY.js} +198 -214
  38. package/bundle/{gemini-DOXUDJDY.js → gemini-WV55NKMQ.js} +13 -13
  39. package/bundle/gemini.js +7 -7
  40. package/bundle/{interactiveCli-7LIKGDTJ.js → interactiveCli-3XUYDTSL.js} +10 -9
  41. package/bundle/{interactiveCli-TG7PGV4V.js → interactiveCli-S5K6P65K.js} +10 -9
  42. package/bundle/{interactiveCli-GZ4N4JS2.js → interactiveCli-U2CP5B64.js} +301 -319
  43. package/bundle/{liteRtServerManager-KAPXZ3EU.js → liteRtServerManager-HYOFIRWR.js} +4 -4
  44. package/bundle/{liteRtServerManager-KJI7ARTA.js → liteRtServerManager-KF2BIFPA.js} +4 -4
  45. package/bundle/{liteRtServerManager-MSJIWMWP.js → liteRtServerManager-RYZUX64K.js} +4 -4
  46. package/bundle/{oauth2-provider-RMF7U2UN.js → oauth2-provider-LVJMV7QY.js} +1 -1
  47. package/bundle/{oauth2-provider-OISPWSWH.js → oauth2-provider-O2MBVTUX.js} +1 -1
  48. package/bundle/{oauth2-provider-ZM5GWCNX.js → oauth2-provider-XAA7HRXL.js} +79 -41
  49. package/bundle/{start-5GIUIER3.js → start-234HHUMV.js} +6 -6
  50. package/bundle/{start-APIVGXZ3.js → start-JWGPML6R.js} +6 -6
  51. package/bundle/{start-GRIS2RDP.js → start-TRMMLCHR.js} +6 -6
  52. package/package.json +1 -1
  53. package/bundle/chunk-5YXWOKC2.js +0 -402181
  54. package/bundle/chunk-CYBHTFCS.js +0 -154
  55. package/bundle/chunk-HDP6V6JI.js +0 -1956
  56. package/bundle/chunk-RACMC24X.js +0 -118
  57. package/bundle/chunk-VGPHCSAB.js +0 -101859
  58. package/bundle/chunk-VXYA6LA4.js +0 -1571
  59. package/bundle/chunk-W6ALEP4H.js +0 -512
  60. package/bundle/chunk-XY2QSBID.js +0 -17603
  61. package/bundle/cleanup-WTTU6IKS.js +0 -32
  62. package/bundle/devtoolsService-TFBVUD5K.js +0 -4359
  63. package/bundle/dist-F22VU44K.js +0 -2280
  64. package/bundle/gemini-XDNOFFX7.js +0 -17970
  65. package/bundle/interactiveCli-MGIJ7GNE.js +0 -35601
  66. package/bundle/liteRtServerManager-OY2ULYPZ.js +0 -65
  67. package/bundle/oauth2-provider-VT6UHLKR.js +0 -273
  68. package/bundle/start-XQGNK32L.js +0 -18
@@ -171,10 +171,10 @@ import {
171
171
  widestLineFromStyledChars,
172
172
  wordBreakStyledChars,
173
173
  wrapStyledChars
174
- } from "./chunk-LPQB7ZQE.js";
174
+ } from "./chunk-EZIYD2G6.js";
175
175
  import {
176
176
  require_source
177
- } from "./chunk-AWUJQFYP.js";
177
+ } from "./chunk-SZE3LGYD.js";
178
178
  import {
179
179
  appEvents
180
180
  } from "./chunk-5PS3AYFU.js";
@@ -227,38 +227,34 @@ import {
227
227
  stripAnsi,
228
228
  stripUnsafeCharacters,
229
229
  toCodePoints
230
- } from "./chunk-L5EUR3NN.js";
230
+ } from "./chunk-3IDBGHHH.js";
231
231
  import {
232
232
  handleAutoUpdate,
233
233
  isDevelopment,
234
234
  relaunchApp,
235
235
  require_semver,
236
236
  setUpdateHandler
237
- } from "./chunk-GCW52DLB.js";
237
+ } from "./chunk-5ILL3HFF.js";
238
238
  import {
239
239
  isTodoList,
240
240
  mapCoreStatusToDisplayStatus,
241
241
  require_react
242
- } from "./chunk-7K5J3ME2.js";
242
+ } from "./chunk-Z3NAT6YU.js";
243
243
  import {
244
244
  registerCleanup,
245
245
  removeCleanup,
246
246
  runExitCleanup,
247
247
  setupTtyCheck
248
- } from "./chunk-6P5R6RYB.js";
248
+ } from "./chunk-ITTQBJIT.js";
249
249
  import {
250
250
  ACTIVATE_SKILL_TOOL_NAME,
251
251
  AGENT_TOOL_NAME,
252
252
  ApiKeyUpdatedEvent,
253
- ApprovalMode,
254
253
  AsyncFzf,
255
254
  AudioRecorder,
256
255
  AuthType,
257
256
  ChangeAuthRequestedError,
258
- CompressionStatus,
259
257
  ConversationFinishedEvent,
260
- CoreEvent,
261
- CoreToolCallStatus,
262
258
  CreditPurchaseClickEvent,
263
259
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
264
260
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -280,20 +276,13 @@ import {
280
276
  GEMMA_4_31B_IT_MODEL,
281
277
  GLOB_DISPLAY_NAME,
282
278
  GREP_DISPLAY_NAME,
283
- GeminiCliOperation,
284
- GeminiEventType,
285
279
  GitService,
286
280
  IdeClient,
287
- Kind,
288
281
  LS_DISPLAY_NAME,
289
282
  LegacyAgentProtocol,
290
283
  LlmRole,
291
284
  Logger,
292
285
  MAX_TOKENS_EXCEEDED_SUGGESTION,
293
- MCPDiscoveryState,
294
- MCPServerStatus,
295
- MessageBusType,
296
- MessageSenderType,
297
286
  ModelNotFoundError,
298
287
  ModelSlashCommandEvent,
299
288
  OTHER_BLOCKED_MESSAGE,
@@ -306,7 +295,6 @@ import {
306
295
  PREVIEW_GEMINI_MODEL,
307
296
  PolicyIntegrityManager,
308
297
  ProjectIdRequiredError,
309
- QuestionType,
310
298
  READ_FILE_DISPLAY_NAME,
311
299
  READ_MANY_FILES_DISPLAY_NAME,
312
300
  RECITATION_BLOCKED_MESSAGE,
@@ -315,22 +303,16 @@ import {
315
303
  SAFETY_BLOCKED_MESSAGE,
316
304
  SHELL_TOOL_NAME,
317
305
  Scheduler,
318
- SessionEndReason,
319
- SessionStartSource,
320
306
  ShellExecutionService,
321
307
  SlashCommandStatus,
322
308
  Storage,
323
- SubagentState,
324
309
  THINKING_ONLY_COMPRESS_SUGGESTION,
325
310
  TOPIC_PARAM_STRATEGIC_INTENT,
326
311
  TOPIC_PARAM_SUMMARY,
327
312
  TOPIC_PARAM_TITLE,
328
313
  TRUE_EMPTY_RESPONSE_MESSAGE,
329
314
  TerminalQuotaError,
330
- ToolConfirmationOutcome,
331
- ToolErrorType,
332
315
  TranscriptionFactory,
333
- TrustLevel,
334
316
  UPDATE_TOPIC_DISPLAY_NAME,
335
317
  UPDATE_TOPIC_TOOL_NAME,
336
318
  UnauthorizedError,
@@ -343,7 +325,6 @@ import {
343
325
  WEB_FETCH_DISPLAY_NAME,
344
326
  WEB_SEARCH_DISPLAY_NAME,
345
327
  WRITE_FILE_DISPLAY_NAME,
346
- WarningPriority,
347
328
  WhisperModelManager,
348
329
  addMCPStatusChangeListener,
349
330
  allowEditorTypeInSandbox,
@@ -452,7 +433,7 @@ import {
452
433
  validatePlanContent,
453
434
  validatePlanPath,
454
435
  writeToStdout
455
- } from "./chunk-5YXWOKC2.js";
436
+ } from "./chunk-D6WVFS5S.js";
456
437
  import "./chunk-664ZODQF.js";
457
438
  import "./chunk-IUUIT4SU.js";
458
439
  import "./chunk-L6PII3GR.js";
@@ -5079,7 +5060,7 @@ function calculateShellMaxLines(options) {
5079
5060
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5080
5061
  return maxLinesBasedOnHeight;
5081
5062
  }
5082
- const isExecuting = status === CoreToolCallStatus.Executing;
5063
+ const isExecuting = status === "executing" /* Executing */;
5083
5064
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5084
5065
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5085
5066
  }
@@ -5115,13 +5096,13 @@ var formatToolArgs = (args) => {
5115
5096
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5116
5097
  let headerText;
5117
5098
  let headerColor = theme.text.secondary;
5118
- if (progress.state === SubagentState.CANCELLED) {
5099
+ if (progress.state === "cancelled" /* CANCELLED */) {
5119
5100
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5120
5101
  headerColor = theme.status.warning;
5121
- } else if (progress.state === SubagentState.ERROR) {
5102
+ } else if (progress.state === "error" /* ERROR */) {
5122
5103
  headerText = `Subagent ${progress.agentName} failed.`;
5123
5104
  headerColor = theme.status.error;
5124
- } else if (progress.state === SubagentState.COMPLETED) {
5105
+ } else if (progress.state === "completed" /* COMPLETED */) {
5125
5106
  headerText = `Subagent ${progress.agentName} completed.`;
5126
5107
  headerColor = theme.status.success;
5127
5108
  } else {
@@ -5141,7 +5122,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5141
5122
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color, children: item.content }) })
5142
5123
  ] }, item.id);
5143
5124
  } else if (item.type === "tool_call") {
5144
- const statusSymbol = item.status === SubagentState.RUNNING ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(build_default, { type: "dots" }) : item.status === SubagentState.COMPLETED ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === SubagentState.CANCELLED ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5125
+ const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
5145
5126
  const formattedArgs = item.description || formatToolArgs(item.args);
5146
5127
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5147
5128
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5152,7 +5133,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5152
5133
  {
5153
5134
  bold: true,
5154
5135
  color: theme.text.primary,
5155
- strikethrough: item.status === SubagentState.CANCELLED,
5136
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5156
5137
  children: item.displayName || item.content
5157
5138
  }
5158
5139
  ),
@@ -5161,7 +5142,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5161
5142
  {
5162
5143
  color: theme.text.secondary,
5163
5144
  wrap: "truncate",
5164
- strikethrough: item.status === SubagentState.CANCELLED,
5145
+ strikethrough: item.status === "cancelled" /* CANCELLED */,
5165
5146
  children: displayArgs
5166
5147
  }
5167
5148
  ) })
@@ -5181,7 +5162,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5181
5162
  MarkdownDisplay,
5182
5163
  {
5183
5164
  text: safeJsonToMarkdown(progress.result),
5184
- isPending: progress.state !== SubagentState.COMPLETED,
5165
+ isPending: progress.state !== "completed" /* COMPLETED */,
5185
5166
  terminalWidth
5186
5167
  }
5187
5168
  )
@@ -5542,7 +5523,7 @@ var ToolActionsProvider = (props) => {
5542
5523
  }
5543
5524
  const details = tool.confirmationDetails;
5544
5525
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5545
- const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5526
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5546
5527
  if (ideClient) {
5547
5528
  void ideClient.resolveDiffFromCli(details.filePath, cliOutcome)?.catch((error) => {
5548
5529
  debugLogger.error(
@@ -5554,9 +5535,9 @@ var ToolActionsProvider = (props) => {
5554
5535
  }
5555
5536
  if (tool.correlationId) {
5556
5537
  await config.getMessageBus().publish({
5557
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5538
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5558
5539
  correlationId: tool.correlationId,
5559
- confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5540
+ confirmed: outcome !== "cancel" /* Cancel */,
5560
5541
  requiresUserConfirmation: false,
5561
5542
  outcome,
5562
5543
  payload
@@ -5575,7 +5556,7 @@ var ToolActionsProvider = (props) => {
5575
5556
  );
5576
5557
  const cancel = (0, import_react10.useCallback)(
5577
5558
  async (callId) => {
5578
- await confirm(callId, ToolConfirmationOutcome.Cancel);
5559
+ await confirm(callId, "cancel" /* Cancel */);
5579
5560
  },
5580
5561
  [confirm]
5581
5562
  );
@@ -5696,7 +5677,7 @@ var ToolMessage = ({
5696
5677
  paddingX: 1,
5697
5678
  flexDirection: "column",
5698
5679
  children: [
5699
- status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5680
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5700
5681
  McpProgressIndicator,
5701
5682
  {
5702
5683
  progress,
@@ -5713,8 +5694,8 @@ var ToolMessage = ({
5713
5694
  terminalWidth: safeTerminalWidth,
5714
5695
  renderOutputAsMarkdown,
5715
5696
  hasFocus: isThisShellFocused2,
5716
- maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5717
- overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5697
+ maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5698
+ overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5718
5699
  }
5719
5700
  ),
5720
5701
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -6030,7 +6011,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
6030
6011
  settings.merged,
6031
6012
  process3.cwd()
6032
6013
  );
6033
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
6014
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6034
6015
  return {
6035
6016
  currentTrustLevel: explicitTrustLevel,
6036
6017
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6075,7 +6056,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6075
6056
  process3.cwd(),
6076
6057
  newConfig
6077
6058
  );
6078
- if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6059
+ if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6079
6060
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6080
6061
  if (source === "file") {
6081
6062
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6149,18 +6130,18 @@ function PermissionsModifyTrustDialog({
6149
6130
  const TRUST_LEVEL_ITEMS = [
6150
6131
  {
6151
6132
  label: `Trust this folder (${dirName})`,
6152
- value: TrustLevel.TRUST_FOLDER,
6153
- key: TrustLevel.TRUST_FOLDER
6133
+ value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6134
+ key: "TRUST_FOLDER" /* TRUST_FOLDER */
6154
6135
  },
6155
6136
  {
6156
6137
  label: `Trust parent folder (${parentFolder})`,
6157
- value: TrustLevel.TRUST_PARENT,
6158
- key: TrustLevel.TRUST_PARENT
6138
+ value: "TRUST_PARENT" /* TRUST_PARENT */,
6139
+ key: "TRUST_PARENT" /* TRUST_PARENT */
6159
6140
  },
6160
6141
  {
6161
6142
  label: "Don't trust",
6162
- value: TrustLevel.DO_NOT_TRUST,
6163
- key: TrustLevel.DO_NOT_TRUST
6143
+ value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6144
+ key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6164
6145
  }
6165
6146
  ];
6166
6147
  const {
@@ -6401,7 +6382,7 @@ var ShellToolMessage = ({
6401
6382
  maxLinesLimit: maxLines
6402
6383
  });
6403
6384
  import_react15.default.useEffect(() => {
6404
- const isExecuting = status === CoreToolCallStatus.Executing;
6385
+ const isExecuting = status === "executing" /* Executing */;
6405
6386
  if (isExecuting && ptyId) {
6406
6387
  try {
6407
6388
  const childWidth = safeTerminalWidth - 4;
@@ -6615,13 +6596,13 @@ var SubagentGroupDisplay = ({
6615
6596
  const singleAgent = toolCalls[0].resultDisplay;
6616
6597
  if (isSubagentProgress(singleAgent)) {
6617
6598
  switch (singleAgent.state) {
6618
- case SubagentState.COMPLETED:
6599
+ case "completed" /* COMPLETED */:
6619
6600
  headerText = "Agent Completed";
6620
6601
  break;
6621
- case SubagentState.CANCELLED:
6602
+ case "cancelled" /* CANCELLED */:
6622
6603
  headerText = "Agent Cancelled";
6623
6604
  break;
6624
- case SubagentState.ERROR:
6605
+ case "error" /* ERROR */:
6625
6606
  headerText = "Agent Error";
6626
6607
  break;
6627
6608
  default:
@@ -6637,8 +6618,8 @@ var SubagentGroupDisplay = ({
6637
6618
  for (const tc of toolCalls) {
6638
6619
  const progress = tc.resultDisplay;
6639
6620
  if (isSubagentProgress(progress)) {
6640
- if (progress.state === SubagentState.COMPLETED) completedCount++;
6641
- else if (progress.state === SubagentState.RUNNING) runningCount++;
6621
+ if (progress.state === "completed" /* COMPLETED */) completedCount++;
6622
+ else if (progress.state === "running" /* RUNNING */) runningCount++;
6642
6623
  } else {
6643
6624
  runningCount++;
6644
6625
  }
@@ -6717,7 +6698,7 @@ var SubagentGroupDisplay = ({
6717
6698
  if (!isExpanded) {
6718
6699
  let content = "Starting...";
6719
6700
  let formattedArgs;
6720
- if (progress.state === SubagentState.COMPLETED) {
6701
+ if (progress.state === "completed" /* COMPLETED */) {
6721
6702
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6722
6703
  content = `Finished Early (${progress.terminateReason})`;
6723
6704
  } else {
@@ -6731,17 +6712,17 @@ var SubagentGroupDisplay = ({
6731
6712
  formattedArgs = formatToolArgs(lastActivity.args);
6732
6713
  }
6733
6714
  }
6734
- const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6715
+ const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6735
6716
  const renderStatusIcon = () => {
6736
- const state = progress.state ?? SubagentState.RUNNING;
6717
+ const state = progress.state ?? "running" /* RUNNING */;
6737
6718
  switch (state) {
6738
- case SubagentState.RUNNING:
6719
+ case "running" /* RUNNING */:
6739
6720
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: "!" });
6740
- case SubagentState.COMPLETED:
6721
+ case "completed" /* COMPLETED */:
6741
6722
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6742
- case SubagentState.CANCELLED:
6723
+ case "cancelled" /* CANCELLED */:
6743
6724
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6744
- case SubagentState.ERROR:
6725
+ case "error" /* ERROR */:
6745
6726
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6746
6727
  default:
6747
6728
  return checkExhaustive(state);
@@ -6794,22 +6775,22 @@ var hasPayload = (res) => {
6794
6775
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6795
6776
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6796
6777
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6797
- const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6778
+ const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6798
6779
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6799
6780
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6800
6781
  const showDiffStat = !!diff.diffStat;
6801
6782
  const description = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
6802
6783
  let resultSummary = "";
6803
6784
  let resultColor = theme.text.secondary;
6804
- if (status === CoreToolCallStatus.AwaitingApproval) {
6785
+ if (status === "awaiting_approval" /* AwaitingApproval */) {
6805
6786
  resultSummary = "Confirming";
6806
- } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6787
+ } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6807
6788
  resultSummary = "Accepted";
6808
6789
  resultColor = theme.text.accent;
6809
- } else if (status === CoreToolCallStatus.Cancelled) {
6790
+ } else if (status === "cancelled" /* Cancelled */) {
6810
6791
  resultSummary = "Rejected";
6811
6792
  resultColor = theme.status.error;
6812
- } else if (status === CoreToolCallStatus.Error) {
6793
+ } else if (status === "error" /* Error */) {
6813
6794
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6814
6795
  resultColor = theme.status.error;
6815
6796
  }
@@ -6840,7 +6821,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6840
6821
  filename: diff.fileName,
6841
6822
  terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
6842
6823
  availableTerminalHeight,
6843
- disableColor: status === CoreToolCallStatus.Cancelled
6824
+ disableColor: status === "cancelled" /* Cancelled */
6844
6825
  }
6845
6826
  );
6846
6827
  return { description, summary, payload };
@@ -6971,10 +6952,10 @@ var DenseToolMessage = (props) => {
6971
6952
  if (isGrepResult(resultDisplay)) {
6972
6953
  return getGenericSuccessData(resultDisplay, originalDescription);
6973
6954
  }
6974
- if (status === CoreToolCallStatus.Success && resultDisplay) {
6955
+ if (status === "success" /* Success */ && resultDisplay) {
6975
6956
  return getGenericSuccessData(resultDisplay, originalDescription);
6976
6957
  }
6977
- if (status === CoreToolCallStatus.Error) {
6958
+ if (status === "error" /* Error */) {
6978
6959
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
6979
6960
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
6980
6961
  "\u2192 ",
@@ -7026,7 +7007,7 @@ var DenseToolMessage = (props) => {
7026
7007
  language: fileExtension,
7027
7008
  maxWidth: safeContentWidth,
7028
7009
  settings,
7029
- disableColor: status === CoreToolCallStatus.Cancelled,
7010
+ disableColor: status === "cancelled" /* Cancelled */,
7030
7011
  returnLines: true
7031
7012
  });
7032
7013
  } else {
@@ -7034,7 +7015,7 @@ var DenseToolMessage = (props) => {
7034
7015
  parsedLines,
7035
7016
  filename: diff.fileName,
7036
7017
  terminalWidth: safeContentWidth,
7037
- disableColor: status === CoreToolCallStatus.Cancelled
7018
+ disableColor: status === "cancelled" /* Cancelled */
7038
7019
  });
7039
7020
  }
7040
7021
  }, [diff, isExpanded, isAlternateBuffer, safeContentWidth, settings, status]);
@@ -7166,7 +7147,7 @@ function isToolExecuting(pendingHistoryItems) {
7166
7147
  return pendingHistoryItems.some((item) => {
7167
7148
  if (item && item.type === "tool_group") {
7168
7149
  return item.tools.some(
7169
- (tool) => CoreToolCallStatus.Executing === tool.status
7150
+ (tool) => "executing" /* Executing */ === tool.status
7170
7151
  );
7171
7152
  }
7172
7153
  return false;
@@ -7175,7 +7156,7 @@ function isToolExecuting(pendingHistoryItems) {
7175
7156
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7176
7157
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7177
7158
  (item) => item.tools.some(
7178
- (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7159
+ (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7179
7160
  )
7180
7161
  );
7181
7162
  }
@@ -7263,7 +7244,7 @@ var ToolGroupMessage = ({
7263
7244
  const groupedTools = (0, import_react19.useMemo)(() => {
7264
7245
  const groups = [];
7265
7246
  for (const tool of visibleToolCalls) {
7266
- if (tool.kind === Kind.Agent) {
7247
+ if (tool.kind === "agent" /* Agent */) {
7267
7248
  const lastGroup = groups[groups.length - 1];
7268
7249
  if (Array.isArray(lastGroup)) {
7269
7250
  lastGroup.push(tool);
@@ -7318,7 +7299,7 @@ var ToolGroupMessage = ({
7318
7299
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7319
7300
  let countToolCallsWithResults = 0;
7320
7301
  for (const tool of visibleToolCalls) {
7321
- if (tool.kind !== Kind.Agent) {
7302
+ if (tool.kind !== "agent" /* Agent */) {
7322
7303
  if (isCompactTool(tool, isCompactModeEnabled)) {
7323
7304
  if (hasDensePayload(tool)) {
7324
7305
  countToolCallsWithResults++;
@@ -7509,7 +7490,7 @@ var ToolGroupDisplay = ({
7509
7490
  }
7510
7491
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7511
7492
  const visibleTools = tools.filter(
7512
- (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7493
+ (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7513
7494
  );
7514
7495
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7515
7496
  const otherTools = visibleTools.filter(
@@ -7711,18 +7692,18 @@ function CompressionMessage({
7711
7692
  return "Compressing chat history";
7712
7693
  }
7713
7694
  switch (compressionStatus) {
7714
- case CompressionStatus.COMPRESSED:
7695
+ case 1 /* COMPRESSED */:
7715
7696
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7716
- case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7697
+ case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7717
7698
  if (originalTokens < 5e4) {
7718
7699
  return "Compression was not beneficial for this history size.";
7719
7700
  }
7720
7701
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7721
- case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7702
+ case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7722
7703
  return "Could not compress chat history due to a token counting error.";
7723
- case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7704
+ case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7724
7705
  return "Chat history compression failed: the model returned an empty summary.";
7725
- case CompressionStatus.NOOP:
7706
+ case 5 /* NOOP */:
7726
7707
  return "Nothing to compress.";
7727
7708
  default:
7728
7709
  return "";
@@ -8160,8 +8141,8 @@ var ModelUsageTable = ({ models }) => {
8160
8141
  );
8161
8142
  roleEntries.sort(([a], [b]) => {
8162
8143
  if (a === b) return 0;
8163
- if (a === LlmRole.MAIN) return -1;
8164
- if (b === LlmRole.MAIN) return 1;
8144
+ if (a === "main" /* MAIN */) return -1;
8145
+ if (b === "main" /* MAIN */) return 1;
8165
8146
  return a.localeCompare(b);
8166
8147
  });
8167
8148
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8492,8 +8473,8 @@ var ModelStatsDisplay = ({
8492
8473
  return validRoles.includes(role);
8493
8474
  }).sort((a, b) => {
8494
8475
  if (a === b) return 0;
8495
- if (a === LlmRole.MAIN) return -1;
8496
- if (b === LlmRole.MAIN) return 1;
8476
+ if (a === "main" /* MAIN */) return -1;
8477
+ if (b === "main" /* MAIN */) return 1;
8497
8478
  return a.localeCompare(b);
8498
8479
  });
8499
8480
  const createRow = (metric, getValue, options = {}) => {
@@ -9284,7 +9265,7 @@ var McpStatus = ({
9284
9265
  );
9285
9266
  const originalStatus = serverStatus(serverName);
9286
9267
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9287
- const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9268
+ const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9288
9269
  let statusIndicator = "";
9289
9270
  let statusText = "";
9290
9271
  let statusColor = theme.text.primary;
@@ -9296,17 +9277,17 @@ var McpStatus = ({
9296
9277
  statusColor = theme.text.secondary;
9297
9278
  } else {
9298
9279
  switch (status) {
9299
- case MCPServerStatus.CONNECTED:
9280
+ case "connected" /* CONNECTED */:
9300
9281
  statusIndicator = "\u{1F7E2}";
9301
9282
  statusText = "Ready";
9302
9283
  statusColor = theme.status.success;
9303
9284
  break;
9304
- case MCPServerStatus.CONNECTING:
9285
+ case "connecting" /* CONNECTING */:
9305
9286
  statusIndicator = "\u{1F504}";
9306
9287
  statusText = "Starting... (first startup may take longer)";
9307
9288
  statusColor = theme.status.warning;
9308
9289
  break;
9309
- case MCPServerStatus.DISCONNECTED:
9290
+ case "disconnected" /* DISCONNECTED */:
9310
9291
  default:
9311
9292
  statusIndicator = "\u{1F534}";
9312
9293
  statusText = "Disconnected";
@@ -9354,12 +9335,12 @@ var McpStatus = ({
9354
9335
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
9355
9336
  " - ",
9356
9337
  statusText,
9357
- status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9338
+ status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9358
9339
  ] }),
9359
9340
  authStatusNode
9360
9341
  ] }),
9361
- status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9362
- status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
9342
+ status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9343
+ status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
9363
9344
  " (",
9364
9345
  toolCount,
9365
9346
  " tools cached)"
@@ -9921,7 +9902,7 @@ var Notifications = () => {
9921
9902
  if (dismissed) return [];
9922
9903
  const counts = persistentState.get("startupWarningCounts") || {};
9923
9904
  return startupWarnings.filter((w) => {
9924
- if (w.priority === WarningPriority.Low) {
9905
+ if (w.priority === "low" /* Low */) {
9925
9906
  const count = counts[w.id] || 0;
9926
9907
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
9927
9908
  }
@@ -9934,7 +9915,7 @@ var Notifications = () => {
9934
9915
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
9935
9916
  let changed = false;
9936
9917
  visibleWarnings.forEach((w) => {
9937
- if (w.priority === WarningPriority.Low) {
9918
+ if (w.priority === "low" /* Low */) {
9938
9919
  counts[w.id] = (counts[w.id] || 0) + 1;
9939
9920
  changed = true;
9940
9921
  }
@@ -10041,7 +10022,7 @@ var UserIdentity = ({ config }) => {
10041
10022
  }
10042
10023
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { flexDirection: "column", children: [
10043
10024
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { children: [
10044
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { children: [
10025
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { children: [
10045
10026
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { bold: true, children: [
10046
10027
  "Signed in with Google",
10047
10028
  email ? ":" : ""
@@ -10284,7 +10265,7 @@ var import_react30 = __toESM(require_react(), 1);
10284
10265
  function getConfirmingToolState(pendingHistoryItems) {
10285
10266
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10286
10267
  const confirmingTools = allPendingTools.filter(
10287
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10268
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10288
10269
  );
10289
10270
  if (confirmingTools.length === 0) {
10290
10271
  return null;
@@ -11594,7 +11575,7 @@ var ExitPlanModeDialog = ({
11594
11575
  {
11595
11576
  questions: [
11596
11577
  {
11597
- type: QuestionType.CHOICE,
11578
+ type: "choice" /* CHOICE */,
11598
11579
  header: "Approval",
11599
11580
  question: planContent,
11600
11581
  options: [
@@ -11615,9 +11596,9 @@ var ExitPlanModeDialog = ({
11615
11596
  onSubmit: (answers) => {
11616
11597
  const answer = answers["0"];
11617
11598
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11618
- onApprove(ApprovalMode.AUTO_EDIT);
11599
+ onApprove("autoEdit" /* AUTO_EDIT */);
11619
11600
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11620
- onApprove(ApprovalMode.DEFAULT);
11601
+ onApprove("default" /* DEFAULT */);
11621
11602
  } else if (answer) {
11622
11603
  onFeedback(answer);
11623
11604
  }
@@ -11829,7 +11810,7 @@ ${deceptiveUrlWarnings.map(
11829
11810
  );
11830
11811
  (0, import_react35.useEffect)(() => {
11831
11812
  if (isCancelling) {
11832
- handleConfirm(ToolConfirmationOutcome.Cancel);
11813
+ handleConfirm("cancel" /* Cancel */);
11833
11814
  }
11834
11815
  }, [isCancelling, handleConfirm]);
11835
11816
  const handleSelect = (0, import_react35.useCallback)(
@@ -11842,19 +11823,19 @@ ${deceptiveUrlWarnings.map(
11842
11823
  if (!confirmationDetails.isModifying) {
11843
11824
  options2.push({
11844
11825
  label: "Allow once",
11845
- value: ToolConfirmationOutcome.ProceedOnce,
11826
+ value: "proceed_once" /* ProceedOnce */,
11846
11827
  key: "Allow once"
11847
11828
  });
11848
11829
  if (isTrustedFolder && !confirmationDetails.isBuildFile) {
11849
11830
  options2.push({
11850
11831
  label: "Allow for this session",
11851
- value: ToolConfirmationOutcome.ProceedAlways,
11832
+ value: "proceed_always" /* ProceedAlways */,
11852
11833
  key: "Allow for this session"
11853
11834
  });
11854
11835
  if (allowPermanentApproval) {
11855
11836
  options2.push({
11856
11837
  label: "Allow for this file in all future sessions",
11857
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11838
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11858
11839
  key: "Allow for this file in all future sessions"
11859
11840
  });
11860
11841
  }
@@ -11862,45 +11843,45 @@ ${deceptiveUrlWarnings.map(
11862
11843
  if (!config.getIdeMode() || !isDiffingEnabled) {
11863
11844
  options2.push({
11864
11845
  label: "Modify with external editor",
11865
- value: ToolConfirmationOutcome.ModifyWithEditor,
11846
+ value: "modify_with_editor" /* ModifyWithEditor */,
11866
11847
  key: "Modify with external editor"
11867
11848
  });
11868
11849
  }
11869
11850
  options2.push({
11870
11851
  label: "No, suggest changes (esc)",
11871
- value: ToolConfirmationOutcome.Cancel,
11852
+ value: "cancel" /* Cancel */,
11872
11853
  key: "No, suggest changes (esc)"
11873
11854
  });
11874
11855
  }
11875
11856
  } else if (confirmationDetails.type === "sandbox_expansion") {
11876
11857
  options2.push({
11877
11858
  label: "Allow once",
11878
- value: ToolConfirmationOutcome.ProceedOnce,
11859
+ value: "proceed_once" /* ProceedOnce */,
11879
11860
  key: "Allow once"
11880
11861
  });
11881
11862
  if (isTrustedFolder) {
11882
11863
  options2.push({
11883
11864
  label: "Allow for this session",
11884
- value: ToolConfirmationOutcome.ProceedAlways,
11865
+ value: "proceed_always" /* ProceedAlways */,
11885
11866
  key: "Allow for this session"
11886
11867
  });
11887
11868
  if (allowPermanentApproval) {
11888
11869
  options2.push({
11889
11870
  label: "Allow for all future sessions",
11890
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11871
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11891
11872
  key: "Allow for all future sessions"
11892
11873
  });
11893
11874
  }
11894
11875
  }
11895
11876
  options2.push({
11896
11877
  label: "No, suggest changes (esc)",
11897
- value: ToolConfirmationOutcome.Cancel,
11878
+ value: "cancel" /* Cancel */,
11898
11879
  key: "No, suggest changes (esc)"
11899
11880
  });
11900
11881
  } else if (confirmationDetails.type === "exec") {
11901
11882
  options2.push({
11902
11883
  label: "Allow once",
11903
- value: ToolConfirmationOutcome.ProceedOnce,
11884
+ value: "proceed_once" /* ProceedOnce */,
11904
11885
  key: "Allow once"
11905
11886
  });
11906
11887
  const hasUntrustedFlags = confirmationDetails.untrustedFlags && confirmationDetails.untrustedFlags.length > 0;
@@ -11908,75 +11889,75 @@ ${deceptiveUrlWarnings.map(
11908
11889
  if (isTrustedFolder && !hasUntrustedFlags && !hasModifiedBuildFiles) {
11909
11890
  options2.push({
11910
11891
  label: `Allow for this session`,
11911
- value: ToolConfirmationOutcome.ProceedAlways,
11892
+ value: "proceed_always" /* ProceedAlways */,
11912
11893
  key: `Allow for this session`
11913
11894
  });
11914
11895
  if (allowPermanentApproval) {
11915
11896
  options2.push({
11916
11897
  label: `Allow this command for all future sessions`,
11917
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11898
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11918
11899
  key: `Allow for all future sessions`
11919
11900
  });
11920
11901
  }
11921
11902
  }
11922
11903
  options2.push({
11923
11904
  label: "No, suggest changes (esc)",
11924
- value: ToolConfirmationOutcome.Cancel,
11905
+ value: "cancel" /* Cancel */,
11925
11906
  key: "No, suggest changes (esc)"
11926
11907
  });
11927
11908
  } else if (confirmationDetails.type === "info") {
11928
11909
  options2.push({
11929
11910
  label: "Allow once",
11930
- value: ToolConfirmationOutcome.ProceedOnce,
11911
+ value: "proceed_once" /* ProceedOnce */,
11931
11912
  key: "Allow once"
11932
11913
  });
11933
11914
  if (isTrustedFolder) {
11934
11915
  options2.push({
11935
11916
  label: "Allow for this session",
11936
- value: ToolConfirmationOutcome.ProceedAlways,
11917
+ value: "proceed_always" /* ProceedAlways */,
11937
11918
  key: "Allow for this session"
11938
11919
  });
11939
11920
  if (allowPermanentApproval) {
11940
11921
  options2.push({
11941
11922
  label: "Allow for all future sessions",
11942
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11923
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11943
11924
  key: "Allow for all future sessions"
11944
11925
  });
11945
11926
  }
11946
11927
  }
11947
11928
  options2.push({
11948
11929
  label: "No, suggest changes (esc)",
11949
- value: ToolConfirmationOutcome.Cancel,
11930
+ value: "cancel" /* Cancel */,
11950
11931
  key: "No, suggest changes (esc)"
11951
11932
  });
11952
11933
  } else if (confirmationDetails.type === "mcp") {
11953
11934
  options2.push({
11954
11935
  label: "Allow once",
11955
- value: ToolConfirmationOutcome.ProceedOnce,
11936
+ value: "proceed_once" /* ProceedOnce */,
11956
11937
  key: "Allow once"
11957
11938
  });
11958
11939
  if (isTrustedFolder) {
11959
11940
  options2.push({
11960
11941
  label: "Allow tool for this session",
11961
- value: ToolConfirmationOutcome.ProceedAlwaysTool,
11942
+ value: "proceed_always_tool" /* ProceedAlwaysTool */,
11962
11943
  key: "Allow tool for this session"
11963
11944
  });
11964
11945
  options2.push({
11965
11946
  label: "Allow all server tools for this session",
11966
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
11947
+ value: "proceed_always_server" /* ProceedAlwaysServer */,
11967
11948
  key: "Allow all server tools for this session"
11968
11949
  });
11969
11950
  if (allowPermanentApproval) {
11970
11951
  options2.push({
11971
11952
  label: "Allow tool for all future sessions",
11972
- value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11953
+ value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11973
11954
  key: "Allow tool for all future sessions"
11974
11955
  });
11975
11956
  }
11976
11957
  }
11977
11958
  options2.push({
11978
11959
  label: "No, suggest changes (esc)",
11979
- value: ToolConfirmationOutcome.Cancel,
11960
+ value: "cancel" /* Cancel */,
11980
11961
  key: "No, suggest changes (esc)"
11981
11962
  });
11982
11963
  }
@@ -12017,7 +11998,7 @@ ${deceptiveUrlWarnings.map(
12017
11998
  const containsRedirection = commandsToDisplay.some(
12018
11999
  (cmd) => hasRedirection(cmd)
12019
12000
  );
12020
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12001
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12021
12002
  if (containsRedirection && !isAutoEdit) {
12022
12003
  extraInfoLines = 1;
12023
12004
  }
@@ -12044,7 +12025,7 @@ ${deceptiveUrlWarnings.map(
12044
12025
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
12045
12026
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12046
12027
  const alwaysAndSaveIndex = options2.findIndex(
12047
- (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12028
+ (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12048
12029
  );
12049
12030
  if (alwaysAndSaveIndex !== -1) {
12050
12031
  initialIndex2 = alwaysAndSaveIndex;
@@ -12093,10 +12074,10 @@ Ensure you trust all modifications made to build files before approving executio
12093
12074
  {
12094
12075
  questions: confirmationDetails.questions,
12095
12076
  onSubmit: (answers) => {
12096
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12077
+ handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12097
12078
  },
12098
12079
  onCancel: () => {
12099
- handleConfirm(ToolConfirmationOutcome.Cancel);
12080
+ handleConfirm("cancel" /* Cancel */);
12100
12081
  },
12101
12082
  width: safeTerminalWidth,
12102
12083
  availableHeight: bodyHeight
@@ -12117,19 +12098,19 @@ Ensure you trust all modifications made to build files before approving executio
12117
12098
  planPath: confirmationDetails.planPath,
12118
12099
  getPreferredEditor,
12119
12100
  onApprove: (approvalMode) => {
12120
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12101
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12121
12102
  approved: true,
12122
12103
  approvalMode
12123
12104
  });
12124
12105
  },
12125
12106
  onFeedback: (feedback) => {
12126
- handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12107
+ handleConfirm("proceed_once" /* ProceedOnce */, {
12127
12108
  approved: false,
12128
12109
  feedback
12129
12110
  });
12130
12111
  },
12131
12112
  onCancel: () => {
12132
- handleConfirm(ToolConfirmationOutcome.Cancel);
12113
+ handleConfirm("cancel" /* Cancel */);
12133
12114
  },
12134
12115
  width: safeTerminalWidth,
12135
12116
  availableHeight: bodyHeight
@@ -12239,7 +12220,7 @@ Ensure you trust all modifications made to build files before approving executio
12239
12220
  const containsRedirection = commandsToDisplay.some(
12240
12221
  (cmd) => hasRedirection(cmd)
12241
12222
  );
12242
- const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12223
+ const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12243
12224
  let warnings = null;
12244
12225
  if (containsRedirection && !isAutoEdit) {
12245
12226
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12398,7 +12379,7 @@ Ensure you trust all modifications made to build files before approving executio
12398
12379
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12399
12380
  const renderRadioItem = (0, import_react35.useCallback)(
12400
12381
  (item, { titleColor }) => {
12401
- if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12382
+ if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12402
12383
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12403
12384
  item.label,
12404
12385
  " ",
@@ -12810,7 +12791,7 @@ var MainContent = () => {
12810
12791
  const hasConfirmationQueue = Boolean(
12811
12792
  showConfirmationQueue && confirmingTool
12812
12793
  );
12813
- const isVisiblePendingItem = (item) => item.type !== "tool_group" || item.tools.some((t) => t.status !== CoreToolCallStatus.AwaitingApproval);
12794
+ const isVisiblePendingItem = (item) => item.type !== "tool_group" || item.tools.some((t) => t.status !== "awaiting_approval" /* AwaitingApproval */);
12814
12795
  const visiblePendingCount = pendingHistoryItems.filter(isVisiblePendingItem).length;
12815
12796
  const shouldPartitionHeight = !isAlternateBufferOrTerminalBuffer && hasConfirmationQueue && visiblePendingCount > 0;
12816
12797
  const pendingCount = Math.max(1, visiblePendingCount);
@@ -14534,7 +14515,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14534
14515
  if (settings.merged.security.auth.useExternal) {
14535
14516
  return null;
14536
14517
  }
14537
- if (authType === AuthType.USE_GEMINI) {
14518
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14538
14519
  return null;
14539
14520
  }
14540
14521
  return validateAuthMethod(authType);
@@ -14586,7 +14567,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14586
14567
  }
14587
14568
  return;
14588
14569
  }
14589
- if (authType === AuthType.USE_GEMINI) {
14570
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14590
14571
  const key = await reloadApiKey();
14591
14572
  if (!key) {
14592
14573
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14669,31 +14650,31 @@ function AuthDialog({
14669
14650
  let items = [
14670
14651
  {
14671
14652
  label: "Sign in with Google",
14672
- value: AuthType.LOGIN_WITH_GOOGLE,
14673
- key: AuthType.LOGIN_WITH_GOOGLE
14653
+ value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14654
+ key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14674
14655
  },
14675
14656
  ...process.env["CLOUD_SHELL"] === "true" ? [
14676
14657
  {
14677
14658
  label: "Use Cloud Shell user credentials",
14678
- value: AuthType.COMPUTE_ADC,
14679
- key: AuthType.COMPUTE_ADC
14659
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14660
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14680
14661
  }
14681
14662
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14682
14663
  {
14683
14664
  label: "Use metadata server application default credentials",
14684
- value: AuthType.COMPUTE_ADC,
14685
- key: AuthType.COMPUTE_ADC
14665
+ value: "compute-default-credentials" /* COMPUTE_ADC */,
14666
+ key: "compute-default-credentials" /* COMPUTE_ADC */
14686
14667
  }
14687
14668
  ] : [],
14688
14669
  {
14689
14670
  label: "Use Gemini API Key",
14690
- value: AuthType.USE_GEMINI,
14691
- key: AuthType.USE_GEMINI
14671
+ value: "gemini-api-key" /* USE_GEMINI */,
14672
+ key: "gemini-api-key" /* USE_GEMINI */
14692
14673
  },
14693
14674
  {
14694
14675
  label: "Vertex AI",
14695
- value: AuthType.USE_VERTEX_AI,
14696
- key: AuthType.USE_VERTEX_AI
14676
+ value: "vertex-ai" /* USE_VERTEX_AI */,
14677
+ key: "vertex-ai" /* USE_VERTEX_AI */
14697
14678
  }
14698
14679
  ];
14699
14680
  if (settings.merged.security.auth.enforcedType) {
@@ -14715,9 +14696,9 @@ function AuthDialog({
14715
14696
  return item.value === defaultAuthType;
14716
14697
  }
14717
14698
  if (process.env["GEMINI_API_KEY"]) {
14718
- return item.value === AuthType.USE_GEMINI;
14699
+ return item.value === "gemini-api-key" /* USE_GEMINI */;
14719
14700
  }
14720
- return item.value === AuthType.LOGIN_WITH_GOOGLE;
14701
+ return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14721
14702
  });
14722
14703
  if (settings.merged.security.auth.enforcedType) {
14723
14704
  initialAuthIndex = 0;
@@ -14728,14 +14709,14 @@ function AuthDialog({
14728
14709
  return;
14729
14710
  }
14730
14711
  if (authType) {
14731
- const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14712
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14732
14713
  if (needsRestart) {
14733
14714
  setAuthContext({ requiresRestart: true });
14734
14715
  } else {
14735
14716
  setAuthContext({});
14736
14717
  }
14737
14718
  const currentAuthType = settings.merged.security?.auth?.selectedType;
14738
- if (authType === AuthType.LOGIN_WITH_GOOGLE || currentAuthType === AuthType.LOGIN_WITH_GOOGLE) {
14719
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || currentAuthType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
14739
14720
  try {
14740
14721
  await clearCachedCredentialFile();
14741
14722
  } catch (error) {
@@ -14743,13 +14724,13 @@ function AuthDialog({
14743
14724
  onAuthError(
14744
14725
  "Failed to clear cached credentials: " + (error instanceof Error ? error.message : String(error))
14745
14726
  );
14746
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
14727
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
14747
14728
  return;
14748
14729
  }
14749
14730
  }
14750
14731
  }
14751
14732
  settings.setValue(scope, "security.auth.selectedType", authType);
14752
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14733
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14753
14734
  setExiting(true);
14754
14735
  setTimeout(() => {
14755
14736
  void relaunchApp({ overrideAuthType: authType }).catch((err) => {
@@ -14759,7 +14740,7 @@ function AuthDialog({
14759
14740
  }, 100);
14760
14741
  return;
14761
14742
  }
14762
- if (authType === AuthType.USE_GEMINI) {
14743
+ if (authType === "gemini-api-key" /* USE_GEMINI */) {
14763
14744
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14764
14745
  return;
14765
14746
  }
@@ -15571,11 +15552,11 @@ var PrivacyNoticeText = ({
15571
15552
  }) => {
15572
15553
  const authType = config.getContentGeneratorConfig()?.authType;
15573
15554
  switch (authType) {
15574
- case AuthType.USE_GEMINI:
15555
+ case "gemini-api-key" /* USE_GEMINI */:
15575
15556
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GeminiPrivacyNotice, { onExit });
15576
- case AuthType.USE_VERTEX_AI:
15557
+ case "vertex-ai" /* USE_VERTEX_AI */:
15577
15558
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudPaidPrivacyNotice, { onExit });
15578
- case AuthType.LOGIN_WITH_GOOGLE:
15559
+ case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15579
15560
  default:
15580
15561
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudFreePrivacyNotice, { config, onExit });
15581
15562
  }
@@ -15635,7 +15616,7 @@ function ProQuotaDialog({
15635
15616
  value: "retry_always",
15636
15617
  key: "retry_always"
15637
15618
  },
15638
- ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15619
+ ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15639
15620
  {
15640
15621
  label: "Upgrade for higher limits",
15641
15622
  value: "upgrade",
@@ -16808,7 +16789,7 @@ function ModelDialog({ onClose }) {
16808
16789
  const useLatestFlash = config?.hasLatestFlashGAAccess?.() ?? false;
16809
16790
  const useLatestFlashLite = config?.hasLatestFlashLiteGAAccess?.() ?? false;
16810
16791
  const selectedAuthType = settings.merged.security.auth.selectedType;
16811
- const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16792
+ const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16812
16793
  const manualModelSelected = (0, import_react53.useMemo)(() => {
16813
16794
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16814
16795
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -18136,10 +18117,10 @@ function initializeConsoleStore() {
18136
18117
  globalConsoleMessages = [];
18137
18118
  globalErrorCount = 0;
18138
18119
  notifyListeners();
18139
- coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
18140
- coreEvents.off(CoreEvent.Output, handleOutput);
18141
- coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
18142
- coreEvents.on(CoreEvent.Output, handleOutput);
18120
+ coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
18121
+ coreEvents.off("output" /* Output */, handleOutput);
18122
+ coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
18123
+ coreEvents.on("output" /* Output */, handleOutput);
18143
18124
  }
18144
18125
  function notifyListeners() {
18145
18126
  for (const listener of listeners) {
@@ -20283,7 +20264,7 @@ function usePromptCompletion({
20283
20264
  { model: "prompt-completion" },
20284
20265
  contents,
20285
20266
  signal,
20286
- LlmRole.UTILITY_AUTOCOMPLETE
20267
+ "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20287
20268
  );
20288
20269
  if (signal.aborted) {
20289
20270
  return;
@@ -22362,9 +22343,9 @@ var InputPrompt = ({
22362
22343
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22363
22344
  }
22364
22345
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22365
- const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22366
- const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22367
- const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22346
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22347
+ const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22348
+ const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22368
22349
  let statusColor;
22369
22350
  let statusText = "";
22370
22351
  if (shellModeActive) {
@@ -23212,22 +23193,22 @@ var ApprovalModeIndicator = ({
23212
23193
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23213
23194
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23214
23195
  switch (approvalMode) {
23215
- case ApprovalMode.AUTO_EDIT:
23196
+ case "autoEdit" /* AUTO_EDIT */:
23216
23197
  textColor = theme.status.warning;
23217
23198
  textContent = "auto-accept edits";
23218
23199
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23219
23200
  break;
23220
- case ApprovalMode.PLAN:
23201
+ case "plan" /* PLAN */:
23221
23202
  textColor = theme.status.success;
23222
23203
  textContent = "plan";
23223
23204
  subText = `${cycleHint} to manual`;
23224
23205
  break;
23225
- case ApprovalMode.YOLO:
23206
+ case "yolo" /* YOLO */:
23226
23207
  textColor = theme.status.error;
23227
23208
  textContent = "YOLO";
23228
23209
  subText = yoloHint;
23229
23210
  break;
23230
- case ApprovalMode.DEFAULT:
23211
+ case "default" /* DEFAULT */:
23231
23212
  default:
23232
23213
  textColor = theme.text.accent;
23233
23214
  textContent = "";
@@ -23275,7 +23256,7 @@ var useComposerStatus = () => {
23275
23256
  (item) => item.type === "tool_group"
23276
23257
  ).some(
23277
23258
  (item) => item.tools.some(
23278
- (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23259
+ (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23279
23260
  )
23280
23261
  ),
23281
23262
  [uiState.pendingHistoryItems]
@@ -23290,13 +23271,13 @@ var useComposerStatus = () => {
23290
23271
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23291
23272
  if (hideMinimalModeHintWhileBusy) return null;
23292
23273
  switch (showApprovalModeIndicator) {
23293
- case ApprovalMode.YOLO:
23274
+ case "yolo" /* YOLO */:
23294
23275
  return { text: "YOLO", color: theme.status.error };
23295
- case ApprovalMode.PLAN:
23276
+ case "plan" /* PLAN */:
23296
23277
  return { text: "plan", color: theme.status.success };
23297
- case ApprovalMode.AUTO_EDIT:
23278
+ case "autoEdit" /* AUTO_EDIT */:
23298
23279
  return { text: "auto edit", color: theme.status.warning };
23299
- case ApprovalMode.DEFAULT:
23280
+ case "default" /* DEFAULT */:
23300
23281
  default:
23301
23282
  return null;
23302
23283
  }
@@ -23666,7 +23647,7 @@ var ConfigInitDisplay = ({
23666
23647
  let connected = 0;
23667
23648
  const connecting = [];
23668
23649
  for (const [name, client] of clients.entries()) {
23669
- if (client.getStatus() === MCPServerStatus.CONNECTED) {
23650
+ if (client.getStatus() === "connected" /* CONNECTED */) {
23670
23651
  connected++;
23671
23652
  } else {
23672
23653
  connecting.push(name);
@@ -23688,9 +23669,9 @@ var ConfigInitDisplay = ({
23688
23669
  );
23689
23670
  }
23690
23671
  };
23691
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23672
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23692
23673
  return () => {
23693
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23674
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23694
23675
  };
23695
23676
  }, [initialMessage]);
23696
23677
  return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { children: [
@@ -24411,7 +24392,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24411
24392
  callId,
24412
24393
  name: SHELL_COMMAND_NAME,
24413
24394
  description: rawQuery,
24414
- status: CoreToolCallStatus.Executing,
24395
+ status: "executing" /* Executing */,
24415
24396
  isClientInitiated: true,
24416
24397
  resultDisplay: "",
24417
24398
  confirmationDetails: void 0
@@ -24552,7 +24533,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24552
24533
  mainContent = result.output.trim() || "(Command produced no output)";
24553
24534
  }
24554
24535
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24555
- let finalStatus = CoreToolCallStatus.Success;
24536
+ let finalStatus = "success" /* Success */;
24556
24537
  const prependToAnsiOutput = (output, text) => {
24557
24538
  const newLines = text.split("\n").map((line) => [
24558
24539
  {
@@ -24571,20 +24552,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24571
24552
  };
24572
24553
  let prefix = "";
24573
24554
  if (result.error) {
24574
- finalStatus = CoreToolCallStatus.Error;
24555
+ finalStatus = "error" /* Error */;
24575
24556
  prefix = result.error.message;
24576
24557
  } else if (result.aborted) {
24577
- finalStatus = CoreToolCallStatus.Cancelled;
24558
+ finalStatus = "cancelled" /* Cancelled */;
24578
24559
  prefix = "Command was cancelled.";
24579
24560
  } else if (result.backgrounded) {
24580
- finalStatus = CoreToolCallStatus.Success;
24561
+ finalStatus = "success" /* Success */;
24581
24562
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24582
24563
  mainContent = finalOutput;
24583
24564
  } else if (result.signal) {
24584
- finalStatus = CoreToolCallStatus.Error;
24565
+ finalStatus = "error" /* Error */;
24585
24566
  prefix = `Command terminated by signal: ${result.signal}.`;
24586
24567
  } else if (result.exitCode !== 0) {
24587
- finalStatus = CoreToolCallStatus.Error;
24568
+ finalStatus = "error" /* Error */;
24588
24569
  prefix = `Command exited with code ${result.exitCode}.`;
24589
24570
  }
24590
24571
  if (prefix) {
@@ -24610,7 +24591,7 @@ ${mainContent}`;
24610
24591
  status: finalStatus,
24611
24592
  resultDisplay: finalOutput
24612
24593
  };
24613
- if (finalStatus !== CoreToolCallStatus.Cancelled) {
24594
+ if (finalStatus !== "cancelled" /* Cancelled */) {
24614
24595
  addItemToHistory(
24615
24596
  {
24616
24597
  type: "tool_group",
@@ -25620,13 +25601,13 @@ function useQuotaAndFallback({
25620
25601
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25621
25602
  `/stats model for usage details`,
25622
25603
  `/model to switch models.`,
25623
- contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25604
+ contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25624
25605
  ].filter(Boolean);
25625
25606
  message = messageLines.join("\n");
25626
25607
  }
25627
25608
  } else if (error instanceof ModelNotFoundError) {
25628
25609
  isModelNotFoundError = true;
25629
- if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
25610
+ if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
25630
25611
  const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
25631
25612
  const messageLines = [
25632
25613
  `Model "${failedModel}" is not available in region "${location}".`,
@@ -25820,7 +25801,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25820
25801
  );
25821
25802
  setEditorError(null);
25822
25803
  setIsEditorDialogOpen(false);
25823
- coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25804
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25824
25805
  } catch (error) {
25825
25806
  setEditorError(`Failed to set editor preference: ${error}`);
25826
25807
  }
@@ -25829,7 +25810,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25829
25810
  );
25830
25811
  const exitEditorDialog = (0, import_react91.useCallback)(() => {
25831
25812
  setIsEditorDialogOpen(false);
25832
- coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25813
+ coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25833
25814
  }, []);
25834
25815
  return {
25835
25816
  isEditorDialogOpen,
@@ -26206,7 +26187,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26206
26187
  canonicalPath: resolvedCommandPath
26207
26188
  } = parseSlashCommand(trimmed, commands);
26208
26189
  if (!commandToExecute) {
26209
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
26190
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
26210
26191
  if (isMcpLoading) {
26211
26192
  setIsProcessing(true);
26212
26193
  if (addToHistory) {
@@ -26386,7 +26367,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26386
26367
  onConfirm: async (resolvedOutcome) => {
26387
26368
  resolve3({
26388
26369
  outcome: resolvedOutcome,
26389
- approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26370
+ approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26390
26371
  });
26391
26372
  }
26392
26373
  };
@@ -26394,7 +26375,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26394
26375
  callId,
26395
26376
  name: "Expansion",
26396
26377
  description: "Command expansion needs shell access",
26397
- status: CoreToolCallStatus.AwaitingApproval,
26378
+ status: "awaiting_approval" /* AwaitingApproval */,
26398
26379
  isClientInitiated: true,
26399
26380
  resultDisplay: void 0,
26400
26381
  confirmationDetails
@@ -26405,7 +26386,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26405
26386
  });
26406
26387
  });
26407
26388
  setPendingItem(null);
26408
- if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26389
+ if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26409
26390
  addItem(
26410
26391
  {
26411
26392
  type: "info" /* INFO */,
@@ -26415,7 +26396,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26415
26396
  );
26416
26397
  return { type: "handled" };
26417
26398
  }
26418
- if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26399
+ if (outcome === "proceed_always" /* ProceedAlways */) {
26419
26400
  setSessionShellAllowlist(
26420
26401
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26421
26402
  );
@@ -26891,7 +26872,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26891
26872
  let description;
26892
26873
  let renderOutputAsMarkdown = false;
26893
26874
  const displayName = call.tool?.displayName ?? call.request.name;
26894
- if (call.status === CoreToolCallStatus.Error) {
26875
+ if (call.status === "error" /* Error */) {
26895
26876
  description = JSON.stringify(call.request.args);
26896
26877
  } else {
26897
26878
  description = call.invocation.getDescription();
@@ -26914,27 +26895,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26914
26895
  let progress = void 0;
26915
26896
  let progressTotal = void 0;
26916
26897
  switch (call.status) {
26917
- case CoreToolCallStatus.Success:
26898
+ case "success" /* Success */:
26918
26899
  resultDisplay = call.response.resultDisplay;
26919
26900
  outputFile = call.response.outputFile;
26920
26901
  break;
26921
- case CoreToolCallStatus.Error:
26922
- case CoreToolCallStatus.Cancelled:
26902
+ case "error" /* Error */:
26903
+ case "cancelled" /* Cancelled */:
26923
26904
  resultDisplay = call.response.resultDisplay;
26924
26905
  break;
26925
- case CoreToolCallStatus.AwaitingApproval:
26906
+ case "awaiting_approval" /* AwaitingApproval */:
26926
26907
  correlationId = call.correlationId;
26927
26908
  confirmationDetails = call.confirmationDetails;
26928
26909
  break;
26929
- case CoreToolCallStatus.Executing:
26910
+ case "executing" /* Executing */:
26930
26911
  resultDisplay = call.liveOutput;
26931
26912
  ptyId = call.pid;
26932
26913
  progressMessage = call.progressMessage;
26933
26914
  progress = call.progress;
26934
26915
  progressTotal = call.progressTotal;
26935
26916
  break;
26936
- case CoreToolCallStatus.Scheduled:
26937
- case CoreToolCallStatus.Validating:
26917
+ case "scheduled" /* Scheduled */:
26918
+ case "validating" /* Validating */:
26938
26919
  break;
26939
26920
  default: {
26940
26921
  const exhaustiveCheck = call;
@@ -27005,7 +26986,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
27005
26986
  const handler = (event) => {
27006
26987
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
27007
26988
  const hasExecuting = event.toolCalls.some(
27008
- (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26989
+ (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
27009
26990
  );
27010
26991
  if (hasExecuting) {
27011
26992
  setLastToolOutputTime(Date.now());
@@ -27014,7 +26995,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
27014
26995
  const prevCalls = prev[event.schedulerId] ?? [];
27015
26996
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
27016
26997
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
27017
- (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26998
+ (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
27018
26999
  );
27019
27000
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
27020
27001
  return prev;
@@ -27026,9 +27007,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
27026
27007
  };
27027
27008
  });
27028
27009
  };
27029
- messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
27010
+ messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
27030
27011
  return () => {
27031
- messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
27012
+ messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
27032
27013
  };
27033
27014
  }, [messageBus, internalAdaptToolCalls]);
27034
27015
  (0, import_react98.useEffect)(() => {
@@ -27050,9 +27031,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
27050
27031
  };
27051
27032
  });
27052
27033
  };
27053
- messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
27034
+ messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
27054
27035
  return () => {
27055
- messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
27036
+ messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
27056
27037
  };
27057
27038
  }, [messageBus]);
27058
27039
  const schedule = (0, import_react98.useCallback)(
@@ -27151,8 +27132,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
27151
27132
  const prev = prevMap.get(coreCall.request.callId);
27152
27133
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
27153
27134
  let status = coreCall.status;
27154
- if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
27155
- status = CoreToolCallStatus.Executing;
27135
+ if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
27136
+ status = "executing" /* Executing */;
27156
27137
  }
27157
27138
  return {
27158
27139
  ...coreCall,
@@ -27209,7 +27190,7 @@ var CANCELLED_TOOL_ERROR_MESSAGE = "[Operation Cancelled] Reason: User cancelled
27209
27190
  function createCancelledToolCall(request, tool, invocation) {
27210
27191
  const fallbackToolName = request.name.trim() || "generic_tool";
27211
27192
  return {
27212
- status: CoreToolCallStatus.Cancelled,
27193
+ status: "cancelled" /* Cancelled */,
27213
27194
  request,
27214
27195
  // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
27215
27196
  tool: tool ?? {
@@ -27235,7 +27216,7 @@ function createCancelledToolCall(request, tool, invocation) {
27235
27216
  ],
27236
27217
  resultDisplay: void 0,
27237
27218
  error: new Error(CANCELLED_TOOL_ERROR_MESSAGE),
27238
- errorType: ToolErrorType.UNHANDLED_EXCEPTION
27219
+ errorType: "unhandled_exception" /* UNHANDLED_EXCEPTION */
27239
27220
  }
27240
27221
  };
27241
27222
  }
@@ -27338,10 +27319,10 @@ var useAgentStream = ({
27338
27319
  if (unpushedTools.length > 0) {
27339
27320
  setTrackedTools(
27340
27321
  (prev) => prev.map((tc) => {
27341
- if (!pushedToolCallIdsRef.current.has(tc.callId) && tc.status !== CoreToolCallStatus.Success && tc.status !== CoreToolCallStatus.Error && tc.status !== CoreToolCallStatus.Cancelled) {
27322
+ if (!pushedToolCallIdsRef.current.has(tc.callId) && tc.status !== "success" /* Success */ && tc.status !== "error" /* Error */ && tc.status !== "cancelled" /* Cancelled */) {
27342
27323
  return {
27343
27324
  ...tc,
27344
- status: CoreToolCallStatus.Cancelled
27325
+ status: "cancelled" /* Cancelled */
27345
27326
  };
27346
27327
  }
27347
27328
  return tc;
@@ -27486,14 +27467,14 @@ var useAgentStream = ({
27486
27467
  const displayName = legacyState?.displayName ?? event.name;
27487
27468
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
27488
27469
  const desc = legacyState?.description ?? "";
27489
- const fallbackKind = Kind.Other;
27470
+ const fallbackKind = "other" /* Other */;
27490
27471
  const newCall = {
27491
27472
  callId: event.requestId,
27492
27473
  name: displayName,
27493
27474
  originalRequestName: event.name,
27494
27475
  description: desc,
27495
27476
  display: event.display,
27496
- status: CoreToolCallStatus.Scheduled,
27477
+ status: "scheduled" /* Scheduled */,
27497
27478
  isClientInitiated: false,
27498
27479
  renderOutputAsMarkdown: isOutputMarkdown,
27499
27480
  kind: legacyState?.kind ?? fallbackKind,
@@ -27511,10 +27492,10 @@ var useAgentStream = ({
27511
27492
  const evtStatus = legacyState?.status;
27512
27493
  let status = tc.status;
27513
27494
  if (evtStatus === "executing")
27514
- status = CoreToolCallStatus.Executing;
27515
- else if (evtStatus === "error") status = CoreToolCallStatus.Error;
27495
+ status = "executing" /* Executing */;
27496
+ else if (evtStatus === "error") status = "error" /* Error */;
27516
27497
  else if (evtStatus === "success")
27517
- status = CoreToolCallStatus.Success;
27498
+ status = "success" /* Success */;
27518
27499
  const display = event.display?.result;
27519
27500
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
27520
27501
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -27547,7 +27528,7 @@ var useAgentStream = ({
27547
27528
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
27548
27529
  return {
27549
27530
  ...tc,
27550
- status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
27531
+ status: event.isError ? "error" /* Error */ : "success" /* Success */,
27551
27532
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
27552
27533
  resultDisplay,
27553
27534
  outputFile
@@ -27614,7 +27595,7 @@ var useAgentStream = ({
27614
27595
  toolRequestArgsRef.current.clear();
27615
27596
  if (typeof query === "string") {
27616
27597
  addItem({ type: "user" /* USER */, text: query }, timestamp);
27617
- void logger?.logMessage(MessageSenderType.USER, query);
27598
+ void logger?.logMessage("user" /* USER */, query);
27618
27599
  }
27619
27600
  startNewPrompt();
27620
27601
  }
@@ -27816,7 +27797,7 @@ function getBackgroundedToolInfo(toolCall) {
27816
27797
  };
27817
27798
  }
27818
27799
  function isBackgroundableExecutingToolCall(toolCall) {
27819
- return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
27800
+ return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
27820
27801
  }
27821
27802
  function showCitations(settings) {
27822
27803
  const enabled = settings.merged.ui.showCitations;
@@ -27826,14 +27807,14 @@ function showCitations(settings) {
27826
27807
  return true;
27827
27808
  }
27828
27809
  function calculateStreamingState(isResponding, toolCalls) {
27829
- if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
27810
+ if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
27830
27811
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
27831
27812
  }
27832
27813
  const isAnyToolActive = toolCalls.some((tc) => {
27833
- if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
27814
+ if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
27834
27815
  return true;
27835
27816
  }
27836
- if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
27817
+ if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
27837
27818
  return !tc.responseSubmittedToGemini;
27838
27819
  }
27839
27820
  return false;
@@ -27885,9 +27866,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27885
27866
  }
27886
27867
  setRetryStatus(payload);
27887
27868
  };
27888
- coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
27869
+ coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27889
27870
  return () => {
27890
- coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
27871
+ coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27891
27872
  };
27892
27873
  }, [isRespondingRef]);
27893
27874
  const [
@@ -27938,7 +27919,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27938
27919
  const currentModel = client?.getCurrentSequenceModel?.() ?? config.getModel();
27939
27920
  const normalizedCompletedCalls = completedToolCallsFromScheduler.map(
27940
27921
  (tc) => {
27941
- if (tc.status === CoreToolCallStatus.Cancelled && (!tc.response?.responseParts || tc.response.responseParts.length === 0)) {
27922
+ if (tc.status === "cancelled" /* Cancelled */ && (!tc.response?.responseParts || tc.response.responseParts.length === 0)) {
27942
27923
  return {
27943
27924
  ...tc,
27944
27925
  response: createCancelledToolCall(
@@ -28198,7 +28179,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28198
28179
  prevActiveShellPtyIdRef.current = activeShellPtyId;
28199
28180
  }, [activeShellPtyId, addItem, setIsResponding]);
28200
28181
  (0, import_react101.useEffect)(() => {
28201
- if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
28182
+ if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
28202
28183
  const lastUserMessageIndex = history.findLastIndex(
28203
28184
  (item) => item.type === "user" /* USER */
28204
28185
  );
@@ -28275,7 +28256,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28275
28256
  return;
28276
28257
  }
28277
28258
  const hasActiveTools = pendingToolCallRequestsRef.current.length > 0 || toolCalls.some(
28278
- (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating || tc.status === CoreToolCallStatus.AwaitingApproval
28259
+ (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */ || tc.status === "awaiting_approval" /* AwaitingApproval */
28279
28260
  );
28280
28261
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
28281
28262
  if (clearBuffer) {
@@ -28303,13 +28284,13 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28303
28284
  if (tc.request.isClientInitiated) {
28304
28285
  continue;
28305
28286
  }
28306
- const isAlreadySubmitted = (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) && tc.responseSubmittedToGemini;
28287
+ const isAlreadySubmitted = (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) && tc.responseSubmittedToGemini;
28307
28288
  if (isAlreadySubmitted) {
28308
28289
  seenCallIds.add(tc.request.callId);
28309
28290
  continue;
28310
28291
  }
28311
28292
  seenCallIds.add(tc.request.callId);
28312
- if ((tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) && (tc.response?.responseParts?.length ?? 0) > 0) {
28293
+ if ((tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) && (tc.response?.responseParts?.length ?? 0) > 0) {
28313
28294
  synthesizedCalls.push(tc);
28314
28295
  } else {
28315
28296
  synthesizedCalls.push(
@@ -28370,7 +28351,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28370
28351
  if (tool.name === SHELL_COMMAND_NAME) {
28371
28352
  return {
28372
28353
  ...tool,
28373
- status: CoreToolCallStatus.Cancelled,
28354
+ status: "cancelled" /* Cancelled */,
28374
28355
  resultDisplay: tool.resultDisplay
28375
28356
  };
28376
28357
  }
@@ -28466,7 +28447,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28466
28447
  let localQueryToSendToGemini = null;
28467
28448
  if (typeof query === "string") {
28468
28449
  const trimmedQuery = query.trim();
28469
- await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
28450
+ await logger?.logMessage("user" /* USER */, trimmedQuery);
28470
28451
  if (!shellModeActive) {
28471
28452
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
28472
28453
  if (slashCommandResult) {
@@ -28622,7 +28603,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28622
28603
  if (pendingHistoryItemRef.current) {
28623
28604
  if (pendingHistoryItemRef.current.type === "tool_group") {
28624
28605
  const updatedTools = pendingHistoryItemRef.current.tools.map(
28625
- (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
28606
+ (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
28626
28607
  );
28627
28608
  const pendingItem = {
28628
28609
  ...pendingHistoryItemRef.current,
@@ -28914,15 +28895,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28914
28895
  let geminiMessageBuffer = "";
28915
28896
  const toolCallRequests = [];
28916
28897
  for await (const event of stream) {
28917
- if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
28898
+ if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
28918
28899
  setThought(null);
28919
28900
  }
28920
28901
  switch (event.type) {
28921
- case GeminiEventType.Thought:
28902
+ case "thought" /* Thought */:
28922
28903
  setLastGeminiActivityTime(Date.now());
28923
28904
  handleThoughtEvent(event.value, userMessageTimestamp);
28924
28905
  break;
28925
- case GeminiEventType.Content:
28906
+ case "content" /* Content */:
28926
28907
  setLastGeminiActivityTime(Date.now());
28927
28908
  geminiMessageBuffer = handleContentEvent(
28928
28909
  event.value,
@@ -28930,17 +28911,17 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28930
28911
  userMessageTimestamp
28931
28912
  );
28932
28913
  break;
28933
- case GeminiEventType.ToolCallRequest:
28914
+ case "tool_call_request" /* ToolCallRequest */:
28934
28915
  toolCallRequests.push(event.value);
28935
28916
  pendingToolCallRequestsRef.current.push(event.value);
28936
28917
  break;
28937
- case GeminiEventType.UserCancelled:
28918
+ case "user_cancelled" /* UserCancelled */:
28938
28919
  handleUserCancelledEvent(userMessageTimestamp);
28939
28920
  break;
28940
- case GeminiEventType.Error:
28921
+ case "error" /* Error */:
28941
28922
  handleErrorEvent(event.value, userMessageTimestamp);
28942
28923
  break;
28943
- case GeminiEventType.AgentExecutionStopped:
28924
+ case "agent_execution_stopped" /* AgentExecutionStopped */:
28944
28925
  handleAgentExecutionStoppedEvent(
28945
28926
  event.value.reason,
28946
28927
  userMessageTimestamp,
@@ -28948,7 +28929,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28948
28929
  event.value.contextCleared
28949
28930
  );
28950
28931
  break;
28951
- case GeminiEventType.AgentExecutionBlocked:
28932
+ case "agent_execution_blocked" /* AgentExecutionBlocked */:
28952
28933
  handleAgentExecutionBlockedEvent(
28953
28934
  event.value.reason,
28954
28935
  userMessageTimestamp,
@@ -28956,36 +28937,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28956
28937
  event.value.contextCleared
28957
28938
  );
28958
28939
  break;
28959
- case GeminiEventType.ChatCompressed:
28940
+ case "chat_compressed" /* ChatCompressed */:
28960
28941
  handleChatCompressionEvent(event.value, userMessageTimestamp);
28961
28942
  break;
28962
- case GeminiEventType.ToolCallConfirmation:
28963
- case GeminiEventType.ToolCallResponse:
28943
+ case "tool_call_confirmation" /* ToolCallConfirmation */:
28944
+ case "tool_call_response" /* ToolCallResponse */:
28964
28945
  break;
28965
- case GeminiEventType.MaxSessionTurns:
28946
+ case "max_session_turns" /* MaxSessionTurns */:
28966
28947
  handleMaxSessionTurnsEvent();
28967
28948
  break;
28968
- case GeminiEventType.ContextWindowWillOverflow:
28949
+ case "context_window_will_overflow" /* ContextWindowWillOverflow */:
28969
28950
  handleContextWindowWillOverflowEvent(
28970
28951
  event.value.estimatedRequestTokenCount,
28971
28952
  event.value.remainingTokenCount
28972
28953
  );
28973
28954
  break;
28974
- case GeminiEventType.Finished:
28955
+ case "finished" /* Finished */:
28975
28956
  handleFinishedEvent(event, userMessageTimestamp);
28976
28957
  break;
28977
- case GeminiEventType.Citation:
28958
+ case "citation" /* Citation */:
28978
28959
  handleCitationEvent(event.value, userMessageTimestamp);
28979
28960
  break;
28980
- case GeminiEventType.ModelInfo:
28961
+ case "model_info" /* ModelInfo */:
28981
28962
  handleChatModelEvent(event.value, userMessageTimestamp);
28982
28963
  break;
28983
- case GeminiEventType.LoopDetected:
28964
+ case "loop_detected" /* LoopDetected */:
28984
28965
  loopDetectedRef.current = true;
28985
28966
  break;
28986
- case GeminiEventType.Retry:
28967
+ case "retry" /* Retry */:
28987
28968
  break;
28988
- case GeminiEventType.InvalidStream:
28969
+ case "invalid_stream" /* InvalidStream */:
28989
28970
  handleInvalidStreamEvent(event.value, userMessageTimestamp);
28990
28971
  break;
28991
28972
  default: {
@@ -29050,7 +29031,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29050
29031
  const submitQuery = (0, import_react101.useCallback)(
29051
29032
  async (query, options, prompt_id) => runInDevTraceSpan(
29052
29033
  {
29053
- operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
29034
+ operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
29054
29035
  sessionId: config.getSessionId()
29055
29036
  },
29056
29037
  async ({ metadata: spanMetadata }) => {
@@ -29215,7 +29196,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29215
29196
  submitQueryRef.current = submitQuery;
29216
29197
  const handleApprovalModeChange = (0, import_react101.useCallback)(
29217
29198
  async (newApprovalMode) => {
29218
- if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
29199
+ if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
29219
29200
  if (geminiClient) {
29220
29201
  try {
29221
29202
  await geminiClient.addHistory({
@@ -29238,11 +29219,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29238
29219
  }
29239
29220
  }
29240
29221
  previousApprovalModeRef.current = newApprovalMode;
29241
- if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
29222
+ if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
29242
29223
  let awaitingApprovalCalls = toolCalls.filter(
29243
29224
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
29244
29225
  );
29245
- if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
29226
+ if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
29246
29227
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
29247
29228
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
29248
29229
  return true;
@@ -29258,11 +29239,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29258
29239
  if (call.correlationId) {
29259
29240
  try {
29260
29241
  await config.getMessageBus().publish({
29261
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
29242
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
29262
29243
  correlationId: call.correlationId,
29263
29244
  confirmed: true,
29264
29245
  requiresUserConfirmation: false,
29265
- outcome: ToolConfirmationOutcome.ProceedOnce
29246
+ outcome: "proceed_once" /* ProceedOnce */
29266
29247
  });
29267
29248
  } catch (error) {
29268
29249
  debugLogger.warn(
@@ -29353,14 +29334,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29353
29334
  );
29354
29335
  if (isLowErrorVerbosity) {
29355
29336
  suppressedToolErrorCountRef.current += geminiTools.filter(
29356
- (tc) => tc.status === CoreToolCallStatus.Error
29337
+ (tc) => tc.status === "error" /* Error */
29357
29338
  ).length;
29358
29339
  }
29359
29340
  if (geminiTools.length === 0) {
29360
29341
  return;
29361
29342
  }
29362
29343
  const stopExecutionTool = geminiTools.find(
29363
- (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
29344
+ (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
29364
29345
  );
29365
29346
  if (stopExecutionTool && stopExecutionTool.response.error) {
29366
29347
  maybeAddSuppressedToolErrorNote();
@@ -29380,9 +29361,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29380
29361
  (tc) => !isTopicTool2(tc.request.name)
29381
29362
  );
29382
29363
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
29383
- (tc) => tc.status === CoreToolCallStatus.Cancelled
29364
+ (tc) => tc.status === "cancelled" /* Cancelled */
29384
29365
  );
29385
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
29366
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
29386
29367
  if (allDeclinableToolsCancelled || allToolsCancelled) {
29387
29368
  if (!turnCancelledRef.current) {
29388
29369
  addItem({
@@ -29461,7 +29442,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
29461
29442
  return;
29462
29443
  }
29463
29444
  const restorableToolCalls = toolCalls.filter(
29464
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
29445
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
29465
29446
  );
29466
29447
  if (restorableToolCalls.length > 0) {
29467
29448
  if (!gitService) {
@@ -30874,9 +30855,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30874
30855
  const handleFolderTrustSelect = (0, import_react105.useCallback)(
30875
30856
  async (choice) => {
30876
30857
  const trustLevelMap = {
30877
- ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30878
- ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30879
- ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30858
+ ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30859
+ ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30860
+ ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30880
30861
  };
30881
30862
  const trustLevel = trustLevelMap[choice];
30882
30863
  if (!trustLevel) return;
@@ -30895,7 +30876,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30895
30876
  }, 100);
30896
30877
  return;
30897
30878
  }
30898
- const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30879
+ const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30899
30880
  onTrustChangeRef.current(currentIsTrusted);
30900
30881
  setIsTrusted(currentIsTrusted);
30901
30882
  const wasTrusted = isTrusted ?? false;
@@ -31903,7 +31884,7 @@ function useMessageQueue({
31903
31884
  var import_react107 = __toESM(require_react(), 1);
31904
31885
  function useMcpStatus(config) {
31905
31886
  const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
31906
- () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31887
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31907
31888
  );
31908
31889
  const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
31909
31890
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31916,12 +31897,12 @@ function useMcpStatus(config) {
31916
31897
  setMcpServerCount(manager.getMcpServerCount());
31917
31898
  }
31918
31899
  };
31919
- coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31900
+ coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31920
31901
  return () => {
31921
- coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31902
+ coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31922
31903
  };
31923
31904
  }, [config]);
31924
- const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31905
+ const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31925
31906
  return {
31926
31907
  discoveryState,
31927
31908
  mcpServerCount,
@@ -31948,7 +31929,7 @@ function useApprovalModeIndicator({
31948
31929
  (key) => {
31949
31930
  let nextApprovalMode;
31950
31931
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31951
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31932
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31952
31933
  if (addItem) {
31953
31934
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31954
31935
  const adminSettings = config.getRemoteAdminSettings();
@@ -31966,21 +31947,21 @@ function useApprovalModeIndicator({
31966
31947
  }
31967
31948
  return;
31968
31949
  }
31969
- nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31950
+ nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31970
31951
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31971
31952
  const currentMode = config.getApprovalMode();
31972
31953
  switch (currentMode) {
31973
- case ApprovalMode.DEFAULT:
31974
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31954
+ case "default" /* DEFAULT */:
31955
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31975
31956
  break;
31976
- case ApprovalMode.AUTO_EDIT:
31977
- nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31957
+ case "autoEdit" /* AUTO_EDIT */:
31958
+ nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31978
31959
  break;
31979
- case ApprovalMode.PLAN:
31980
- nextApprovalMode = ApprovalMode.DEFAULT;
31960
+ case "plan" /* PLAN */:
31961
+ nextApprovalMode = "default" /* DEFAULT */;
31981
31962
  break;
31982
- case ApprovalMode.YOLO:
31983
- nextApprovalMode = ApprovalMode.AUTO_EDIT;
31963
+ case "yolo" /* YOLO */:
31964
+ nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31984
31965
  break;
31985
31966
  default:
31986
31967
  }
@@ -32390,11 +32371,11 @@ var useHookDisplayState = () => {
32390
32371
  removeHook();
32391
32372
  }
32392
32373
  };
32393
- coreEvents.on(CoreEvent.HookStart, handleHookStart);
32394
- coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
32374
+ coreEvents.on("hook-start" /* HookStart */, handleHookStart);
32375
+ coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
32395
32376
  return () => {
32396
- coreEvents.off(CoreEvent.HookStart, handleHookStart);
32397
- coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
32377
+ coreEvents.off("hook-start" /* HookStart */, handleHookStart);
32378
+ coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
32398
32379
  activeTimeouts.forEach(clearTimeout);
32399
32380
  activeTimeouts.clear();
32400
32381
  };
@@ -33039,6 +33020,7 @@ var SHELL_WIDTH_FRACTION = 0.89;
33039
33020
  var SHELL_HEIGHT_PADDING = 10;
33040
33021
  var ENTER_SYNCHRONIZED_OUTPUT = "\x1B[?2026h";
33041
33022
  var EXIT_SYNCHRONIZED_OUTPUT = "\x1B[?2026l";
33023
+ var CLEAR_VIEWPORT = base_exports.eraseScreen + base_exports.cursorTo(0, 0);
33042
33024
  var RESIZE_DEBOUNCE_MS = 100;
33043
33025
  var RESIZE_CORK_SAFETY_TIMEOUT_MS = 1e3;
33044
33026
  function discardCorkedStdoutBuffer(stream) {
@@ -33278,7 +33260,7 @@ var AppContainer = (props) => {
33278
33260
  setConfigInitialized(true);
33279
33261
  startupProfiler.flush(config);
33280
33262
  startAutoMemoryIfEnabled(config);
33281
- const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
33263
+ const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
33282
33264
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
33283
33265
  if (result) {
33284
33266
  const additionalContext = result.getAdditionalContext();
@@ -33305,7 +33287,7 @@ var AppContainer = (props) => {
33305
33287
  );
33306
33288
  const ideClient = await IdeClient.getInstance();
33307
33289
  await ideClient.disconnect();
33308
- await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
33290
+ await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
33309
33291
  };
33310
33292
  registerCleanup(cleanupFn);
33311
33293
  return () => {
@@ -33330,11 +33312,11 @@ var AppContainer = (props) => {
33330
33312
  resetTime: payload.resetTime
33331
33313
  });
33332
33314
  };
33333
- coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
33334
- coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
33315
+ coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
33316
+ coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
33335
33317
  return () => {
33336
- coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
33337
- coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
33318
+ coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
33319
+ coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
33338
33320
  };
33339
33321
  }, [config]);
33340
33322
  (0, import_react121.useEffect)(() => {
@@ -33347,16 +33329,16 @@ var AppContainer = (props) => {
33347
33329
  const handleAgentsDiscovered = (payload) => {
33348
33330
  setNewAgents(payload.agents);
33349
33331
  };
33350
- coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
33351
- coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
33352
- coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
33332
+ coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
33333
+ coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
33334
+ coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
33353
33335
  return () => {
33354
- coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
33336
+ coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
33355
33337
  coreEvents.off(
33356
- CoreEvent.AdminSettingsChanged,
33338
+ "admin-settings-changed" /* AdminSettingsChanged */,
33357
33339
  handleAdminSettingsChanged
33358
33340
  );
33359
- coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
33341
+ coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
33360
33342
  };
33361
33343
  }, [settings]);
33362
33344
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -33449,7 +33431,7 @@ var AppContainer = (props) => {
33449
33431
  isRefreshingStaticRef.current = true;
33450
33432
  stdout.write(ENTER_SYNCHRONIZED_OUTPUT);
33451
33433
  }
33452
- stdout.write(base_exports.clearTerminal);
33434
+ stdout.write(CLEAR_VIEWPORT);
33453
33435
  }
33454
33436
  if (!isAlternateBuffer || config.getUseTerminalBuffer()) {
33455
33437
  setHistoryRemountKey((prev) => prev + 1);
@@ -33502,11 +33484,11 @@ var AppContainer = (props) => {
33502
33484
  exitEditorDialog
33503
33485
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
33504
33486
  (0, import_react121.useEffect)(() => {
33505
- coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
33506
- coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
33487
+ coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
33488
+ coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
33507
33489
  return () => {
33508
- coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
33509
- coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
33490
+ coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
33491
+ coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
33510
33492
  };
33511
33493
  }, [handleEditorClose, openEditorDialog]);
33512
33494
  (0, import_react121.useEffect)(() => {
@@ -33577,7 +33559,7 @@ var AppContainer = (props) => {
33577
33559
  errorVerbosity: settings.merged.ui.errorVerbosity
33578
33560
  });
33579
33561
  const isAuthDialogOpen = authState === "updating" /* Updating */;
33580
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
33562
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
33581
33563
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
33582
33564
  const { loadHistoryForResume, isResuming } = useSessionResume({
33583
33565
  config,
@@ -33605,7 +33587,7 @@ var AppContainer = (props) => {
33605
33587
  async (authType, scope) => {
33606
33588
  if (authType) {
33607
33589
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
33608
- if (authType === AuthType.LOGIN_WITH_GOOGLE) {
33590
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
33609
33591
  setAuthContext({ requiresRestart: true });
33610
33592
  } else {
33611
33593
  setAuthContext({});
@@ -33633,7 +33615,7 @@ var AppContainer = (props) => {
33633
33615
  );
33634
33616
  return;
33635
33617
  }
33636
- if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
33618
+ if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
33637
33619
  writeToStdout(`
33638
33620
  ----------------------------------------------------------------
33639
33621
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -33656,7 +33638,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
33656
33638
  }
33657
33639
  await saveApiKey(apiKey);
33658
33640
  await reloadApiKey();
33659
- await config.refreshAuth(AuthType.USE_GEMINI);
33641
+ await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
33660
33642
  setAuthState("authenticated" /* Authenticated */);
33661
33643
  } catch (e) {
33662
33644
  onAuthError(
@@ -33681,7 +33663,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
33681
33663
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
33682
33664
  );
33683
33665
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
33684
- if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
33666
+ if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
33685
33667
  return;
33686
33668
  }
33687
33669
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33841,9 +33823,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33841
33823
  }
33842
33824
  });
33843
33825
  };
33844
- coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33826
+ coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33845
33827
  return () => {
33846
- coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33828
+ coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33847
33829
  };
33848
33830
  }, []);
33849
33831
  const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
@@ -34475,7 +34457,7 @@ ${queuedText}` : queuedText;
34475
34457
  [handleSlashCommand, settings]
34476
34458
  );
34477
34459
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
34478
- const loginRestartMessage = settings.merged.security.auth.selectedType === AuthType.USE_VERTEX_AI ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
34460
+ const loginRestartMessage = settings.merged.security.auth.selectedType === "vertex-ai" /* USE_VERTEX_AI */ ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
34479
34461
  const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
34480
34462
  const handleGlobalKeypress = (0, import_react121.useCallback)(
34481
34463
  (key) => {
@@ -34568,7 +34550,7 @@ ${queuedText}` : queuedText;
34568
34550
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
34569
34551
  if (settings.merged.general.devtools) {
34570
34552
  void (async () => {
34571
- const { toggleDevToolsPanel } = await import("./devtoolsService-TFBVUD5K.js");
34553
+ const { toggleDevToolsPanel } = await import("./devtoolsService-KQTX22AU.js");
34572
34554
  await toggleDevToolsPanel(
34573
34555
  config,
34574
34556
  showErrorDetails,
@@ -34789,12 +34771,12 @@ ${queuedText}` : queuedText;
34789
34771
  Date.now()
34790
34772
  );
34791
34773
  };
34792
- coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
34793
- coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
34774
+ coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
34775
+ coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34794
34776
  coreEvents.drainBacklogs();
34795
34777
  return () => {
34796
- coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
34797
- coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
34778
+ coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
34779
+ coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34798
34780
  };
34799
34781
  }, [historyManager]);
34800
34782
  const nightly = props.version.includes("nightly");
@@ -34903,9 +34885,9 @@ ${queuedText}` : queuedText;
34903
34885
  const handleMemoryChanged = (result) => {
34904
34886
  setGeminiMdFileCount(result.fileCount);
34905
34887
  };
34906
- coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34888
+ coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34907
34889
  return () => {
34908
- coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34890
+ coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34909
34891
  };
34910
34892
  }, []);
34911
34893
  (0, import_react121.useEffect)(() => {