@google/gemini-cli 0.62.0-preview.0 → 0.63.0-nightly.20260926.g2fe7c2d3f

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 (69) hide show
  1. package/bundle/{chunk-VNI6B2SC.js → chunk-2AXHER6I.js} +1 -1
  2. package/bundle/{chunk-7P7I4GYC.js → chunk-2HPN5QAH.js} +1 -1
  3. package/bundle/{chunk-67JFSAOI.js → chunk-4PBNRKYJ.js} +8 -5
  4. package/bundle/{chunk-UDX2JG4X.js → chunk-4SQTLFVK.js} +45 -11
  5. package/bundle/chunk-5OA4MZUE.js +17368 -0
  6. package/bundle/{chunk-ZOLMIYBF.js → chunk-A6CY66PY.js} +109 -62
  7. package/bundle/{chunk-IP26BEPK.js → chunk-BMW3TCBN.js} +1 -1
  8. package/bundle/{chunk-X3MDVQ2M.js → chunk-C2KZGMGL.js} +1 -1
  9. package/bundle/{chunk-DSHGGNYE.js → chunk-DQIFLHPX.js} +3 -3
  10. package/bundle/{chunk-QE6MNPCN.js → chunk-EATZTV2L.js} +45 -11
  11. package/bundle/{chunk-UCTTKDYX.js → chunk-EYGY6SJV.js} +1 -1
  12. package/bundle/{chunk-ZNLZV6KB.js → chunk-GCXBFYJK.js} +1 -1
  13. package/bundle/{chunk-4B6A2PDH.js → chunk-JBO7A25S.js} +9 -8
  14. package/bundle/{chunk-FX7H3YXM.js → chunk-JRB2XGR5.js} +1 -1
  15. package/bundle/{chunk-2MIF7TLR.js → chunk-KRI5JA76.js} +680 -165
  16. package/bundle/{chunk-RQBLUWGO.js → chunk-PAIQESPE.js} +3 -3
  17. package/bundle/{chunk-IZ7EEAUQ.js → chunk-QO5HKIZU.js} +2 -2
  18. package/bundle/{chunk-HCJU65X4.js → chunk-QX7M3XMQ.js} +3 -3
  19. package/bundle/{chunk-7LRWECUM.js → chunk-R2KYUMIM.js} +612 -158
  20. package/bundle/{chunk-KYWRBXUN.js → chunk-RCREII42.js} +2 -2
  21. package/bundle/{chunk-4SYYS7FT.js → chunk-RFR5KZGU.js} +1 -1
  22. package/bundle/chunk-SCOXV26L.js +118 -0
  23. package/bundle/{chunk-UVWRONOW.js → chunk-SJFSOFYJ.js} +2 -2
  24. package/bundle/chunk-SZK5XAFL.js +398 -0
  25. package/bundle/chunk-T7LJ6AR4.js +512 -0
  26. package/bundle/{chunk-YHJCOL52.js → chunk-TXWIPUPY.js} +8372 -14832
  27. package/bundle/chunk-UFNI7OME.js +400484 -0
  28. package/bundle/chunk-UGKG4OIB.js +102951 -0
  29. package/bundle/chunk-VAGYZO4R.js +1571 -0
  30. package/bundle/{chunk-LXVOSY26.js → chunk-VNGBTT2C.js} +1 -1
  31. package/bundle/{chunk-ZXPUBJYD.js → chunk-ZAM747AR.js} +1 -1
  32. package/bundle/chunk-ZV5QN465.js +154 -0
  33. package/bundle/{cleanup-FHA2KSXH.js → cleanup-33SXPBZY.js} +2 -2
  34. package/bundle/{cleanup-HY2KJG6D.js → cleanup-6IDD7Q3X.js} +2 -2
  35. package/bundle/{cleanup-UNKT2DM4.js → cleanup-7UL3PRLF.js} +2 -2
  36. package/bundle/cleanup-ZMIILI4I.js +32 -0
  37. package/bundle/{core-FGYHAZ6H.js → core-IIFMZU4H.js} +11 -1
  38. package/bundle/{devtoolsService-WDMSDVS7.js → devtoolsService-3DTEOSCQ.js} +2 -2
  39. package/bundle/{devtoolsService-2RNXWTDT.js → devtoolsService-AK7UU2FI.js} +2 -2
  40. package/bundle/{devtoolsService-FYN3P465.js → devtoolsService-BHWAPOMO.js} +4 -3
  41. package/bundle/devtoolsService-REQSIEPU.js +4359 -0
  42. package/bundle/{dist-42YIZWSU.js → dist-4S434TWJ.js} +11 -1
  43. package/bundle/{core-CYZFUAYU.js → dist-6CWFFN6Z.js} +11 -1
  44. package/bundle/dist-I74UZ4GA.js +2248 -0
  45. package/bundle/docs/changelogs/index.md +16 -0
  46. package/bundle/docs/changelogs/latest.md +34 -55
  47. package/bundle/docs/changelogs/preview.md +65 -29
  48. package/bundle/{gemini-H6C5T6NZ.js → gemini-3326ZSFC.js} +21 -21
  49. package/bundle/{gemini-5VI65FOO.js → gemini-I47O5YI2.js} +221 -205
  50. package/bundle/{gemini-DRDYGTKK.js → gemini-PGIEQLQD.js} +21 -21
  51. package/bundle/gemini-YJG7YFT4.js +17863 -0
  52. package/bundle/gemini.js +7 -7
  53. package/bundle/{interactiveCli-TLTKI2C4.js → interactiveCli-A6SNZNGC.js} +31 -14
  54. package/bundle/{interactiveCli-SOVSAZ32.js → interactiveCli-JF6LE6RN.js} +334 -298
  55. package/bundle/{interactiveCli-KSL5ASTL.js → interactiveCli-JLFFVRVY.js} +31 -14
  56. package/bundle/interactiveCli-MHB4B6S7.js +34907 -0
  57. package/bundle/{liteRtServerManager-KO56TKLF.js → liteRtServerManager-4LVWWKUV.js} +4 -4
  58. package/bundle/{liteRtServerManager-T2GG72NW.js → liteRtServerManager-5LUGQWRF.js} +4 -4
  59. package/bundle/{liteRtServerManager-2CCV35OQ.js → liteRtServerManager-DVDNFJNH.js} +4 -4
  60. package/bundle/liteRtServerManager-FWIPKCGI.js +65 -0
  61. package/bundle/{oauth2-provider-TBQ7JUDB.js → oauth2-provider-IBKEWCFT.js} +1 -1
  62. package/bundle/{oauth2-provider-UY26FDAA.js → oauth2-provider-KPLVYPVA.js} +1 -1
  63. package/bundle/{oauth2-provider-BSRUMVCL.js → oauth2-provider-MTCBHRXI.js} +38 -72
  64. package/bundle/oauth2-provider-TDMWN5ME.js +235 -0
  65. package/bundle/{start-NGSQCGCK.js → start-2A3VVOAH.js} +6 -6
  66. package/bundle/{start-RUS2QGZK.js → start-665BHOTS.js} +6 -6
  67. package/bundle/{start-GCXJMSER.js → start-6PINHVUA.js} +6 -6
  68. package/bundle/start-DXGEU2SK.js +18 -0
  69. package/package.json +1 -1
@@ -171,10 +171,10 @@ import {
171
171
  widestLineFromStyledChars,
172
172
  wordBreakStyledChars,
173
173
  wrapStyledChars
174
- } from "./chunk-ZOLMIYBF.js";
174
+ } from "./chunk-4SQTLFVK.js";
175
175
  import {
176
176
  require_source
177
- } from "./chunk-IP26BEPK.js";
177
+ } from "./chunk-C2KZGMGL.js";
178
178
  import {
179
179
  appEvents
180
180
  } from "./chunk-5PS3AYFU.js";
@@ -227,33 +227,37 @@ import {
227
227
  stripAnsi,
228
228
  stripUnsafeCharacters,
229
229
  toCodePoints
230
- } from "./chunk-4SYYS7FT.js";
230
+ } from "./chunk-4PBNRKYJ.js";
231
231
  import {
232
232
  handleAutoUpdate,
233
233
  isDevelopment,
234
234
  relaunchApp,
235
235
  setUpdateHandler
236
- } from "./chunk-KYWRBXUN.js";
236
+ } from "./chunk-SZK5XAFL.js";
237
237
  import {
238
238
  isTodoList,
239
239
  mapCoreStatusToDisplayStatus,
240
240
  require_react
241
- } from "./chunk-ZXPUBJYD.js";
241
+ } from "./chunk-EYGY6SJV.js";
242
242
  import {
243
243
  registerCleanup,
244
244
  removeCleanup,
245
245
  runExitCleanup,
246
246
  setupTtyCheck
247
- } from "./chunk-VNI6B2SC.js";
247
+ } from "./chunk-2AXHER6I.js";
248
248
  import {
249
249
  ACTIVATE_SKILL_TOOL_NAME,
250
250
  AGENT_TOOL_NAME,
251
251
  ApiKeyUpdatedEvent,
252
+ ApprovalMode,
252
253
  AsyncFzf,
253
254
  AudioRecorder,
254
255
  AuthType,
255
256
  ChangeAuthRequestedError,
257
+ CompressionStatus,
256
258
  ConversationFinishedEvent,
259
+ CoreEvent,
260
+ CoreToolCallStatus,
257
261
  CreditPurchaseClickEvent,
258
262
  DEFAULT_GEMINI_FLASH_LITE_MODEL,
259
263
  DEFAULT_GEMINI_FLASH_MODEL,
@@ -275,13 +279,20 @@ import {
275
279
  GEMMA_4_31B_IT_MODEL,
276
280
  GLOB_DISPLAY_NAME,
277
281
  GREP_DISPLAY_NAME,
282
+ GeminiCliOperation,
283
+ GeminiEventType,
278
284
  GitService,
279
285
  IdeClient,
286
+ Kind,
280
287
  LS_DISPLAY_NAME,
281
288
  LegacyAgentProtocol,
282
289
  LlmRole,
283
290
  Logger,
284
291
  MAX_TOKENS_EXCEEDED_SUGGESTION,
292
+ MCPDiscoveryState,
293
+ MCPServerStatus,
294
+ MessageBusType,
295
+ MessageSenderType,
285
296
  ModelNotFoundError,
286
297
  ModelSlashCommandEvent,
287
298
  OTHER_BLOCKED_MESSAGE,
@@ -294,6 +305,7 @@ import {
294
305
  PREVIEW_GEMINI_MODEL,
295
306
  PolicyIntegrityManager,
296
307
  ProjectIdRequiredError,
308
+ QuestionType,
297
309
  READ_FILE_DISPLAY_NAME,
298
310
  READ_MANY_FILES_DISPLAY_NAME,
299
311
  RECITATION_BLOCKED_MESSAGE,
@@ -302,16 +314,22 @@ import {
302
314
  SAFETY_BLOCKED_MESSAGE,
303
315
  SHELL_TOOL_NAME,
304
316
  Scheduler,
317
+ SessionEndReason,
318
+ SessionStartSource,
305
319
  ShellExecutionService,
306
320
  SlashCommandStatus,
307
321
  Storage,
322
+ SubagentState,
308
323
  THINKING_ONLY_COMPRESS_SUGGESTION,
309
324
  TOPIC_PARAM_STRATEGIC_INTENT,
310
325
  TOPIC_PARAM_SUMMARY,
311
326
  TOPIC_PARAM_TITLE,
312
327
  TRUE_EMPTY_RESPONSE_MESSAGE,
313
328
  TerminalQuotaError,
329
+ ToolConfirmationOutcome,
330
+ ToolErrorType,
314
331
  TranscriptionFactory,
332
+ TrustLevel,
315
333
  UPDATE_TOPIC_DISPLAY_NAME,
316
334
  UPDATE_TOPIC_TOOL_NAME,
317
335
  UnauthorizedError,
@@ -323,6 +341,7 @@ import {
323
341
  WEB_FETCH_DISPLAY_NAME,
324
342
  WEB_SEARCH_DISPLAY_NAME,
325
343
  WRITE_FILE_DISPLAY_NAME,
344
+ WarningPriority,
326
345
  WhisperModelManager,
327
346
  addMCPStatusChangeListener,
328
347
  allowEditorTypeInSandbox,
@@ -430,7 +449,7 @@ import {
430
449
  validatePlanContent,
431
450
  validatePlanPath,
432
451
  writeToStdout
433
- } from "./chunk-2MIF7TLR.js";
452
+ } from "./chunk-TXWIPUPY.js";
434
453
  import "./chunk-664ZODQF.js";
435
454
  import "./chunk-IUUIT4SU.js";
436
455
  import "./chunk-L6PII3GR.js";
@@ -5057,7 +5076,7 @@ function calculateShellMaxLines(options) {
5057
5076
  if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
5058
5077
  return maxLinesBasedOnHeight;
5059
5078
  }
5060
- const isExecuting = status === "executing" /* Executing */;
5079
+ const isExecuting = status === CoreToolCallStatus.Executing;
5061
5080
  const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
5062
5081
  return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
5063
5082
  }
@@ -5093,13 +5112,13 @@ var formatToolArgs = (args) => {
5093
5112
  var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
5094
5113
  let headerText;
5095
5114
  let headerColor = theme.text.secondary;
5096
- if (progress.state === "cancelled" /* CANCELLED */) {
5115
+ if (progress.state === SubagentState.CANCELLED) {
5097
5116
  headerText = `Subagent ${progress.agentName} was cancelled.`;
5098
5117
  headerColor = theme.status.warning;
5099
- } else if (progress.state === "error" /* ERROR */) {
5118
+ } else if (progress.state === SubagentState.ERROR) {
5100
5119
  headerText = `Subagent ${progress.agentName} failed.`;
5101
5120
  headerColor = theme.status.error;
5102
- } else if (progress.state === "completed" /* COMPLETED */) {
5121
+ } else if (progress.state === SubagentState.COMPLETED) {
5103
5122
  headerText = `Subagent ${progress.agentName} completed.`;
5104
5123
  headerColor = theme.status.success;
5105
5124
  } else {
@@ -5119,7 +5138,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5119
5138
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color, children: item.content }) })
5120
5139
  ] }, item.id);
5121
5140
  } else if (item.type === "tool_call") {
5122
- 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 });
5141
+ 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 });
5123
5142
  const formattedArgs = item.description || formatToolArgs(item.args);
5124
5143
  const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
5125
5144
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -5130,7 +5149,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5130
5149
  {
5131
5150
  bold: true,
5132
5151
  color: theme.text.primary,
5133
- strikethrough: item.status === "cancelled" /* CANCELLED */,
5152
+ strikethrough: item.status === SubagentState.CANCELLED,
5134
5153
  children: item.displayName || item.content
5135
5154
  }
5136
5155
  ),
@@ -5139,7 +5158,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5139
5158
  {
5140
5159
  color: theme.text.secondary,
5141
5160
  wrap: "truncate",
5142
- strikethrough: item.status === "cancelled" /* CANCELLED */,
5161
+ strikethrough: item.status === SubagentState.CANCELLED,
5143
5162
  children: displayArgs
5144
5163
  }
5145
5164
  ) })
@@ -5159,7 +5178,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
5159
5178
  MarkdownDisplay,
5160
5179
  {
5161
5180
  text: safeJsonToMarkdown(progress.result),
5162
- isPending: progress.state !== "completed" /* COMPLETED */,
5181
+ isPending: progress.state !== SubagentState.COMPLETED,
5163
5182
  terminalWidth
5164
5183
  }
5165
5184
  )
@@ -5514,14 +5533,14 @@ var ToolActionsProvider = (props) => {
5514
5533
  }
5515
5534
  const details = tool.confirmationDetails;
5516
5535
  if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
5517
- const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
5536
+ const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
5518
5537
  await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
5519
5538
  }
5520
5539
  if (tool.correlationId) {
5521
5540
  await config.getMessageBus().publish({
5522
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
5541
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
5523
5542
  correlationId: tool.correlationId,
5524
- confirmed: outcome !== "cancel" /* Cancel */,
5543
+ confirmed: outcome !== ToolConfirmationOutcome.Cancel,
5525
5544
  requiresUserConfirmation: false,
5526
5545
  outcome,
5527
5546
  payload
@@ -5540,7 +5559,7 @@ var ToolActionsProvider = (props) => {
5540
5559
  );
5541
5560
  const cancel = (0, import_react10.useCallback)(
5542
5561
  async (callId) => {
5543
- await confirm(callId, "cancel" /* Cancel */);
5562
+ await confirm(callId, ToolConfirmationOutcome.Cancel);
5544
5563
  },
5545
5564
  [confirm]
5546
5565
  );
@@ -5661,7 +5680,7 @@ var ToolMessage = ({
5661
5680
  paddingX: 1,
5662
5681
  flexDirection: "column",
5663
5682
  children: [
5664
- status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5683
+ status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5665
5684
  McpProgressIndicator,
5666
5685
  {
5667
5686
  progress,
@@ -5678,8 +5697,8 @@ var ToolMessage = ({
5678
5697
  terminalWidth: safeTerminalWidth,
5679
5698
  renderOutputAsMarkdown,
5680
5699
  hasFocus: isThisShellFocused2,
5681
- maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5682
- overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
5700
+ maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
5701
+ overflowDirection: kind === Kind.Agent ? "bottom" : "top"
5683
5702
  }
5684
5703
  ),
5685
5704
  isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -5995,7 +6014,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
5995
6014
  settings.merged,
5996
6015
  process3.cwd()
5997
6016
  );
5998
- const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
6017
+ const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
5999
6018
  return {
6000
6019
  currentTrustLevel: explicitTrustLevel,
6001
6020
  isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
@@ -6040,7 +6059,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6040
6059
  process3.cwd(),
6041
6060
  newConfig
6042
6061
  );
6043
- if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
6062
+ if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
6044
6063
  let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
6045
6064
  if (source === "file") {
6046
6065
  message = "Note: This folder is still trusted because a parent folder is trusted.";
@@ -6114,18 +6133,18 @@ function PermissionsModifyTrustDialog({
6114
6133
  const TRUST_LEVEL_ITEMS = [
6115
6134
  {
6116
6135
  label: `Trust this folder (${dirName})`,
6117
- value: "TRUST_FOLDER" /* TRUST_FOLDER */,
6118
- key: "TRUST_FOLDER" /* TRUST_FOLDER */
6136
+ value: TrustLevel.TRUST_FOLDER,
6137
+ key: TrustLevel.TRUST_FOLDER
6119
6138
  },
6120
6139
  {
6121
6140
  label: `Trust parent folder (${parentFolder})`,
6122
- value: "TRUST_PARENT" /* TRUST_PARENT */,
6123
- key: "TRUST_PARENT" /* TRUST_PARENT */
6141
+ value: TrustLevel.TRUST_PARENT,
6142
+ key: TrustLevel.TRUST_PARENT
6124
6143
  },
6125
6144
  {
6126
6145
  label: "Don't trust",
6127
- value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
6128
- key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
6146
+ value: TrustLevel.DO_NOT_TRUST,
6147
+ key: TrustLevel.DO_NOT_TRUST
6129
6148
  }
6130
6149
  ];
6131
6150
  const {
@@ -6366,7 +6385,7 @@ var ShellToolMessage = ({
6366
6385
  maxLinesLimit: maxLines
6367
6386
  });
6368
6387
  import_react15.default.useEffect(() => {
6369
- const isExecuting = status === "executing" /* Executing */;
6388
+ const isExecuting = status === CoreToolCallStatus.Executing;
6370
6389
  if (isExecuting && ptyId) {
6371
6390
  try {
6372
6391
  const childWidth = safeTerminalWidth - 4;
@@ -6580,13 +6599,13 @@ var SubagentGroupDisplay = ({
6580
6599
  const singleAgent = toolCalls[0].resultDisplay;
6581
6600
  if (isSubagentProgress(singleAgent)) {
6582
6601
  switch (singleAgent.state) {
6583
- case "completed" /* COMPLETED */:
6602
+ case SubagentState.COMPLETED:
6584
6603
  headerText = "Agent Completed";
6585
6604
  break;
6586
- case "cancelled" /* CANCELLED */:
6605
+ case SubagentState.CANCELLED:
6587
6606
  headerText = "Agent Cancelled";
6588
6607
  break;
6589
- case "error" /* ERROR */:
6608
+ case SubagentState.ERROR:
6590
6609
  headerText = "Agent Error";
6591
6610
  break;
6592
6611
  default:
@@ -6602,8 +6621,8 @@ var SubagentGroupDisplay = ({
6602
6621
  for (const tc of toolCalls) {
6603
6622
  const progress = tc.resultDisplay;
6604
6623
  if (isSubagentProgress(progress)) {
6605
- if (progress.state === "completed" /* COMPLETED */) completedCount++;
6606
- else if (progress.state === "running" /* RUNNING */) runningCount++;
6624
+ if (progress.state === SubagentState.COMPLETED) completedCount++;
6625
+ else if (progress.state === SubagentState.RUNNING) runningCount++;
6607
6626
  } else {
6608
6627
  runningCount++;
6609
6628
  }
@@ -6682,7 +6701,7 @@ var SubagentGroupDisplay = ({
6682
6701
  if (!isExpanded) {
6683
6702
  let content = "Starting...";
6684
6703
  let formattedArgs;
6685
- if (progress.state === "completed" /* COMPLETED */) {
6704
+ if (progress.state === SubagentState.COMPLETED) {
6686
6705
  if (progress.terminateReason && progress.terminateReason !== "GOAL") {
6687
6706
  content = `Finished Early (${progress.terminateReason})`;
6688
6707
  } else {
@@ -6696,17 +6715,17 @@ var SubagentGroupDisplay = ({
6696
6715
  formattedArgs = formatToolArgs(lastActivity.args);
6697
6716
  }
6698
6717
  }
6699
- const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
6718
+ const displayArgs = progress.state === SubagentState.COMPLETED ? "" : formattedArgs;
6700
6719
  const renderStatusIcon = () => {
6701
- const state = progress.state ?? "running" /* RUNNING */;
6720
+ const state = progress.state ?? SubagentState.RUNNING;
6702
6721
  switch (state) {
6703
- case "running" /* RUNNING */:
6722
+ case SubagentState.RUNNING:
6704
6723
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: "!" });
6705
- case "completed" /* COMPLETED */:
6724
+ case SubagentState.COMPLETED:
6706
6725
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.success, children: "\u2713" });
6707
- case "cancelled" /* CANCELLED */:
6726
+ case SubagentState.CANCELLED:
6708
6727
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
6709
- case "error" /* ERROR */:
6728
+ case SubagentState.ERROR:
6710
6729
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.error, children: "\u2717" });
6711
6730
  default:
6712
6731
  return checkExhaustive(state);
@@ -6759,22 +6778,22 @@ var hasPayload = (res) => {
6759
6778
  function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
6760
6779
  const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
6761
6780
  const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
6762
- const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
6781
+ const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
6763
6782
  const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
6764
6783
  const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
6765
6784
  const showDiffStat = !!diff.diffStat;
6766
6785
  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 }) });
6767
6786
  let resultSummary = "";
6768
6787
  let resultColor = theme.text.secondary;
6769
- if (status === "awaiting_approval" /* AwaitingApproval */) {
6788
+ if (status === CoreToolCallStatus.AwaitingApproval) {
6770
6789
  resultSummary = "Confirming";
6771
- } else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
6790
+ } else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
6772
6791
  resultSummary = "Accepted";
6773
6792
  resultColor = theme.text.accent;
6774
- } else if (status === "cancelled" /* Cancelled */) {
6793
+ } else if (status === CoreToolCallStatus.Cancelled) {
6775
6794
  resultSummary = "Rejected";
6776
6795
  resultColor = theme.status.error;
6777
- } else if (status === "error" /* Error */) {
6796
+ } else if (status === CoreToolCallStatus.Error) {
6778
6797
  resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
6779
6798
  resultColor = theme.status.error;
6780
6799
  }
@@ -6805,7 +6824,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
6805
6824
  filename: diff.fileName,
6806
6825
  terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
6807
6826
  availableTerminalHeight,
6808
- disableColor: status === "cancelled" /* Cancelled */
6827
+ disableColor: status === CoreToolCallStatus.Cancelled
6809
6828
  }
6810
6829
  );
6811
6830
  return { description, summary, payload };
@@ -6933,10 +6952,10 @@ var DenseToolMessage = (props) => {
6933
6952
  if (isGrepResult(resultDisplay)) {
6934
6953
  return getGenericSuccessData(resultDisplay, originalDescription);
6935
6954
  }
6936
- if (status === "success" /* Success */ && resultDisplay) {
6955
+ if (status === CoreToolCallStatus.Success && resultDisplay) {
6937
6956
  return getGenericSuccessData(resultDisplay, originalDescription);
6938
6957
  }
6939
- if (status === "error" /* Error */) {
6958
+ if (status === CoreToolCallStatus.Error) {
6940
6959
  const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
6941
6960
  const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
6942
6961
  "\u2192 ",
@@ -6977,7 +6996,7 @@ var DenseToolMessage = (props) => {
6977
6996
  language: fileExtension,
6978
6997
  maxWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
6979
6998
  settings,
6980
- disableColor: status === "cancelled" /* Cancelled */,
6999
+ disableColor: status === CoreToolCallStatus.Cancelled,
6981
7000
  returnLines: true
6982
7001
  });
6983
7002
  } else {
@@ -6985,7 +7004,7 @@ var DenseToolMessage = (props) => {
6985
7004
  parsedLines,
6986
7005
  filename: diff.fileName,
6987
7006
  terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
6988
- disableColor: status === "cancelled" /* Cancelled */
7007
+ disableColor: status === CoreToolCallStatus.Cancelled
6989
7008
  });
6990
7009
  }
6991
7010
  }, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
@@ -7122,7 +7141,7 @@ function isToolExecuting(pendingHistoryItems) {
7122
7141
  return pendingHistoryItems.some((item) => {
7123
7142
  if (item && item.type === "tool_group") {
7124
7143
  return item.tools.some(
7125
- (tool) => "executing" /* Executing */ === tool.status
7144
+ (tool) => CoreToolCallStatus.Executing === tool.status
7126
7145
  );
7127
7146
  }
7128
7147
  return false;
@@ -7131,7 +7150,7 @@ function isToolExecuting(pendingHistoryItems) {
7131
7150
  function isToolAwaitingConfirmation(pendingHistoryItems) {
7132
7151
  return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
7133
7152
  (item) => item.tools.some(
7134
- (tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
7153
+ (tool) => CoreToolCallStatus.AwaitingApproval === tool.status
7135
7154
  )
7136
7155
  );
7137
7156
  }
@@ -7219,7 +7238,7 @@ var ToolGroupMessage = ({
7219
7238
  const groupedTools = (0, import_react19.useMemo)(() => {
7220
7239
  const groups = [];
7221
7240
  for (const tool of visibleToolCalls) {
7222
- if (tool.kind === "agent" /* Agent */) {
7241
+ if (tool.kind === Kind.Agent) {
7223
7242
  const lastGroup = groups[groups.length - 1];
7224
7243
  if (Array.isArray(lastGroup)) {
7225
7244
  lastGroup.push(tool);
@@ -7274,7 +7293,7 @@ var ToolGroupMessage = ({
7274
7293
  }, [groupedTools, isCompactModeEnabled, borderTopOverride]);
7275
7294
  let countToolCallsWithResults = 0;
7276
7295
  for (const tool of visibleToolCalls) {
7277
- if (tool.kind !== "agent" /* Agent */) {
7296
+ if (tool.kind !== Kind.Agent) {
7278
7297
  if (isCompactTool(tool, isCompactModeEnabled)) {
7279
7298
  if (hasDensePayload(tool)) {
7280
7299
  countToolCallsWithResults++;
@@ -7465,7 +7484,7 @@ var ToolGroupDisplay = ({
7465
7484
  }
7466
7485
  const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
7467
7486
  const visibleTools = tools.filter(
7468
- (t) => t.status !== "awaiting_approval" /* AwaitingApproval */
7487
+ (t) => t.status !== CoreToolCallStatus.AwaitingApproval
7469
7488
  );
7470
7489
  const noticeTools = visibleTools.filter((t) => t.format === "notice");
7471
7490
  const otherTools = visibleTools.filter(
@@ -7667,18 +7686,18 @@ function CompressionMessage({
7667
7686
  return "Compressing chat history";
7668
7687
  }
7669
7688
  switch (compressionStatus) {
7670
- case 1 /* COMPRESSED */:
7689
+ case CompressionStatus.COMPRESSED:
7671
7690
  return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
7672
- case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
7691
+ case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
7673
7692
  if (originalTokens < 5e4) {
7674
7693
  return "Compression was not beneficial for this history size.";
7675
7694
  }
7676
7695
  return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
7677
- case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
7696
+ case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
7678
7697
  return "Could not compress chat history due to a token counting error.";
7679
- case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
7698
+ case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
7680
7699
  return "Chat history compression failed: the model returned an empty summary.";
7681
- case 5 /* NOOP */:
7700
+ case CompressionStatus.NOOP:
7682
7701
  return "Nothing to compress.";
7683
7702
  default:
7684
7703
  return "";
@@ -8116,8 +8135,8 @@ var ModelUsageTable = ({ models }) => {
8116
8135
  );
8117
8136
  roleEntries.sort(([a], [b]) => {
8118
8137
  if (a === b) return 0;
8119
- if (a === "main" /* MAIN */) return -1;
8120
- if (b === "main" /* MAIN */) return 1;
8138
+ if (a === LlmRole.MAIN) return -1;
8139
+ if (b === LlmRole.MAIN) return 1;
8121
8140
  return a.localeCompare(b);
8122
8141
  });
8123
8142
  roleEntries.forEach(([role, roleMetrics]) => {
@@ -8448,8 +8467,8 @@ var ModelStatsDisplay = ({
8448
8467
  return validRoles.includes(role);
8449
8468
  }).sort((a, b) => {
8450
8469
  if (a === b) return 0;
8451
- if (a === "main" /* MAIN */) return -1;
8452
- if (b === "main" /* MAIN */) return 1;
8470
+ if (a === LlmRole.MAIN) return -1;
8471
+ if (b === LlmRole.MAIN) return 1;
8453
8472
  return a.localeCompare(b);
8454
8473
  });
8455
8474
  const createRow = (metric, getValue, options = {}) => {
@@ -9240,7 +9259,7 @@ var McpStatus = ({
9240
9259
  );
9241
9260
  const originalStatus = serverStatus(serverName);
9242
9261
  const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
9243
- const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
9262
+ const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
9244
9263
  let statusIndicator = "";
9245
9264
  let statusText = "";
9246
9265
  let statusColor = theme.text.primary;
@@ -9252,17 +9271,17 @@ var McpStatus = ({
9252
9271
  statusColor = theme.text.secondary;
9253
9272
  } else {
9254
9273
  switch (status) {
9255
- case "connected" /* CONNECTED */:
9274
+ case MCPServerStatus.CONNECTED:
9256
9275
  statusIndicator = "\u{1F7E2}";
9257
9276
  statusText = "Ready";
9258
9277
  statusColor = theme.status.success;
9259
9278
  break;
9260
- case "connecting" /* CONNECTING */:
9279
+ case MCPServerStatus.CONNECTING:
9261
9280
  statusIndicator = "\u{1F504}";
9262
9281
  statusText = "Starting... (first startup may take longer)";
9263
9282
  statusColor = theme.status.warning;
9264
9283
  break;
9265
- case "disconnected" /* DISCONNECTED */:
9284
+ case MCPServerStatus.DISCONNECTED:
9266
9285
  default:
9267
9286
  statusIndicator = "\u{1F534}";
9268
9287
  statusText = "Disconnected";
@@ -9310,12 +9329,12 @@ var McpStatus = ({
9310
9329
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
9311
9330
  " - ",
9312
9331
  statusText,
9313
- status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
9332
+ status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
9314
9333
  ] }),
9315
9334
  authStatusNode
9316
9335
  ] }),
9317
- status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9318
- status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
9336
+ status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
9337
+ status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
9319
9338
  " (",
9320
9339
  toolCount,
9321
9340
  " tools cached)"
@@ -9876,7 +9895,7 @@ var Notifications = () => {
9876
9895
  if (dismissed) return [];
9877
9896
  const counts = persistentState.get("startupWarningCounts") || {};
9878
9897
  return startupWarnings.filter((w) => {
9879
- if (w.priority === "low" /* Low */) {
9898
+ if (w.priority === WarningPriority.Low) {
9880
9899
  const count = counts[w.id] || 0;
9881
9900
  return count < MAX_STARTUP_WARNING_SHOW_COUNT;
9882
9901
  }
@@ -9889,7 +9908,7 @@ var Notifications = () => {
9889
9908
  const counts = { ...persistentState.get("startupWarningCounts") || {} };
9890
9909
  let changed = false;
9891
9910
  visibleWarnings.forEach((w) => {
9892
- if (w.priority === "low" /* Low */) {
9911
+ if (w.priority === WarningPriority.Low) {
9893
9912
  counts[w.id] = (counts[w.id] || 0) + 1;
9894
9913
  changed = true;
9895
9914
  }
@@ -9996,7 +10015,7 @@ var UserIdentity = ({ config }) => {
9996
10015
  }
9997
10016
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { flexDirection: "column", children: [
9998
10017
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { children: [
9999
- /* @__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: [
10018
+ /* @__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: [
10000
10019
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { bold: true, children: [
10001
10020
  "Signed in with Google",
10002
10021
  email ? ":" : ""
@@ -10239,7 +10258,7 @@ var import_react30 = __toESM(require_react(), 1);
10239
10258
  function getConfirmingToolState(pendingHistoryItems) {
10240
10259
  const allPendingTools = getAllToolCalls(pendingHistoryItems);
10241
10260
  const confirmingTools = allPendingTools.filter(
10242
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
10261
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
10243
10262
  );
10244
10263
  if (confirmingTools.length === 0) {
10245
10264
  return null;
@@ -11548,7 +11567,7 @@ var ExitPlanModeDialog = ({
11548
11567
  {
11549
11568
  questions: [
11550
11569
  {
11551
- type: "choice" /* CHOICE */,
11570
+ type: QuestionType.CHOICE,
11552
11571
  header: "Approval",
11553
11572
  question: planContent,
11554
11573
  options: [
@@ -11569,9 +11588,9 @@ var ExitPlanModeDialog = ({
11569
11588
  onSubmit: (answers) => {
11570
11589
  const answer = answers["0"];
11571
11590
  if (answer === "Yes, automatically accept edits" /* Auto */) {
11572
- onApprove("autoEdit" /* AUTO_EDIT */);
11591
+ onApprove(ApprovalMode.AUTO_EDIT);
11573
11592
  } else if (answer === "Yes, manually accept edits" /* Manual */) {
11574
- onApprove("default" /* DEFAULT */);
11593
+ onApprove(ApprovalMode.DEFAULT);
11575
11594
  } else if (answer) {
11576
11595
  onFeedback(answer);
11577
11596
  }
@@ -11783,7 +11802,7 @@ ${deceptiveUrlWarnings.map(
11783
11802
  );
11784
11803
  (0, import_react35.useEffect)(() => {
11785
11804
  if (isCancelling) {
11786
- handleConfirm("cancel" /* Cancel */);
11805
+ handleConfirm(ToolConfirmationOutcome.Cancel);
11787
11806
  }
11788
11807
  }, [isCancelling, handleConfirm]);
11789
11808
  const handleSelect = (0, import_react35.useCallback)(
@@ -11796,19 +11815,19 @@ ${deceptiveUrlWarnings.map(
11796
11815
  if (!confirmationDetails.isModifying) {
11797
11816
  options2.push({
11798
11817
  label: "Allow once",
11799
- value: "proceed_once" /* ProceedOnce */,
11818
+ value: ToolConfirmationOutcome.ProceedOnce,
11800
11819
  key: "Allow once"
11801
11820
  });
11802
11821
  if (isTrustedFolder && !confirmationDetails.isBuildFile) {
11803
11822
  options2.push({
11804
11823
  label: "Allow for this session",
11805
- value: "proceed_always" /* ProceedAlways */,
11824
+ value: ToolConfirmationOutcome.ProceedAlways,
11806
11825
  key: "Allow for this session"
11807
11826
  });
11808
11827
  if (allowPermanentApproval) {
11809
11828
  options2.push({
11810
11829
  label: "Allow for this file in all future sessions",
11811
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11830
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11812
11831
  key: "Allow for this file in all future sessions"
11813
11832
  });
11814
11833
  }
@@ -11816,45 +11835,45 @@ ${deceptiveUrlWarnings.map(
11816
11835
  if (!config.getIdeMode() || !isDiffingEnabled) {
11817
11836
  options2.push({
11818
11837
  label: "Modify with external editor",
11819
- value: "modify_with_editor" /* ModifyWithEditor */,
11838
+ value: ToolConfirmationOutcome.ModifyWithEditor,
11820
11839
  key: "Modify with external editor"
11821
11840
  });
11822
11841
  }
11823
11842
  options2.push({
11824
11843
  label: "No, suggest changes (esc)",
11825
- value: "cancel" /* Cancel */,
11844
+ value: ToolConfirmationOutcome.Cancel,
11826
11845
  key: "No, suggest changes (esc)"
11827
11846
  });
11828
11847
  }
11829
11848
  } else if (confirmationDetails.type === "sandbox_expansion") {
11830
11849
  options2.push({
11831
11850
  label: "Allow once",
11832
- value: "proceed_once" /* ProceedOnce */,
11851
+ value: ToolConfirmationOutcome.ProceedOnce,
11833
11852
  key: "Allow once"
11834
11853
  });
11835
11854
  if (isTrustedFolder) {
11836
11855
  options2.push({
11837
11856
  label: "Allow for this session",
11838
- value: "proceed_always" /* ProceedAlways */,
11857
+ value: ToolConfirmationOutcome.ProceedAlways,
11839
11858
  key: "Allow for this session"
11840
11859
  });
11841
11860
  if (allowPermanentApproval) {
11842
11861
  options2.push({
11843
11862
  label: "Allow for all future sessions",
11844
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11863
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11845
11864
  key: "Allow for all future sessions"
11846
11865
  });
11847
11866
  }
11848
11867
  }
11849
11868
  options2.push({
11850
11869
  label: "No, suggest changes (esc)",
11851
- value: "cancel" /* Cancel */,
11870
+ value: ToolConfirmationOutcome.Cancel,
11852
11871
  key: "No, suggest changes (esc)"
11853
11872
  });
11854
11873
  } else if (confirmationDetails.type === "exec") {
11855
11874
  options2.push({
11856
11875
  label: "Allow once",
11857
- value: "proceed_once" /* ProceedOnce */,
11876
+ value: ToolConfirmationOutcome.ProceedOnce,
11858
11877
  key: "Allow once"
11859
11878
  });
11860
11879
  const hasUntrustedFlags = confirmationDetails.untrustedFlags && confirmationDetails.untrustedFlags.length > 0;
@@ -11862,75 +11881,75 @@ ${deceptiveUrlWarnings.map(
11862
11881
  if (isTrustedFolder && !hasUntrustedFlags && !hasModifiedBuildFiles) {
11863
11882
  options2.push({
11864
11883
  label: `Allow for this session`,
11865
- value: "proceed_always" /* ProceedAlways */,
11884
+ value: ToolConfirmationOutcome.ProceedAlways,
11866
11885
  key: `Allow for this session`
11867
11886
  });
11868
11887
  if (allowPermanentApproval) {
11869
11888
  options2.push({
11870
11889
  label: `Allow this command for all future sessions`,
11871
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11890
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11872
11891
  key: `Allow for all future sessions`
11873
11892
  });
11874
11893
  }
11875
11894
  }
11876
11895
  options2.push({
11877
11896
  label: "No, suggest changes (esc)",
11878
- value: "cancel" /* Cancel */,
11897
+ value: ToolConfirmationOutcome.Cancel,
11879
11898
  key: "No, suggest changes (esc)"
11880
11899
  });
11881
11900
  } else if (confirmationDetails.type === "info") {
11882
11901
  options2.push({
11883
11902
  label: "Allow once",
11884
- value: "proceed_once" /* ProceedOnce */,
11903
+ value: ToolConfirmationOutcome.ProceedOnce,
11885
11904
  key: "Allow once"
11886
11905
  });
11887
11906
  if (isTrustedFolder) {
11888
11907
  options2.push({
11889
11908
  label: "Allow for this session",
11890
- value: "proceed_always" /* ProceedAlways */,
11909
+ value: ToolConfirmationOutcome.ProceedAlways,
11891
11910
  key: "Allow for this session"
11892
11911
  });
11893
11912
  if (allowPermanentApproval) {
11894
11913
  options2.push({
11895
11914
  label: "Allow for all future sessions",
11896
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11915
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11897
11916
  key: "Allow for all future sessions"
11898
11917
  });
11899
11918
  }
11900
11919
  }
11901
11920
  options2.push({
11902
11921
  label: "No, suggest changes (esc)",
11903
- value: "cancel" /* Cancel */,
11922
+ value: ToolConfirmationOutcome.Cancel,
11904
11923
  key: "No, suggest changes (esc)"
11905
11924
  });
11906
11925
  } else if (confirmationDetails.type === "mcp") {
11907
11926
  options2.push({
11908
11927
  label: "Allow once",
11909
- value: "proceed_once" /* ProceedOnce */,
11928
+ value: ToolConfirmationOutcome.ProceedOnce,
11910
11929
  key: "Allow once"
11911
11930
  });
11912
11931
  if (isTrustedFolder) {
11913
11932
  options2.push({
11914
11933
  label: "Allow tool for this session",
11915
- value: "proceed_always_tool" /* ProceedAlwaysTool */,
11934
+ value: ToolConfirmationOutcome.ProceedAlwaysTool,
11916
11935
  key: "Allow tool for this session"
11917
11936
  });
11918
11937
  options2.push({
11919
11938
  label: "Allow all server tools for this session",
11920
- value: "proceed_always_server" /* ProceedAlwaysServer */,
11939
+ value: ToolConfirmationOutcome.ProceedAlwaysServer,
11921
11940
  key: "Allow all server tools for this session"
11922
11941
  });
11923
11942
  if (allowPermanentApproval) {
11924
11943
  options2.push({
11925
11944
  label: "Allow tool for all future sessions",
11926
- value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
11945
+ value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
11927
11946
  key: "Allow tool for all future sessions"
11928
11947
  });
11929
11948
  }
11930
11949
  }
11931
11950
  options2.push({
11932
11951
  label: "No, suggest changes (esc)",
11933
- value: "cancel" /* Cancel */,
11952
+ value: ToolConfirmationOutcome.Cancel,
11934
11953
  key: "No, suggest changes (esc)"
11935
11954
  });
11936
11955
  }
@@ -11971,7 +11990,7 @@ ${deceptiveUrlWarnings.map(
11971
11990
  const containsRedirection = commandsToDisplay.some(
11972
11991
  (cmd) => hasRedirection(cmd)
11973
11992
  );
11974
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
11993
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
11975
11994
  if (containsRedirection && !isAutoEdit) {
11976
11995
  extraInfoLines = 1;
11977
11996
  }
@@ -11998,7 +12017,7 @@ ${deceptiveUrlWarnings.map(
11998
12017
  const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
11999
12018
  if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
12000
12019
  const alwaysAndSaveIndex = options2.findIndex(
12001
- (o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
12020
+ (o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
12002
12021
  );
12003
12022
  if (alwaysAndSaveIndex !== -1) {
12004
12023
  initialIndex2 = alwaysAndSaveIndex;
@@ -12047,10 +12066,10 @@ Ensure you trust all modifications made to build files before approving executio
12047
12066
  {
12048
12067
  questions: confirmationDetails.questions,
12049
12068
  onSubmit: (answers) => {
12050
- handleConfirm("proceed_once" /* ProceedOnce */, { answers });
12069
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
12051
12070
  },
12052
12071
  onCancel: () => {
12053
- handleConfirm("cancel" /* Cancel */);
12072
+ handleConfirm(ToolConfirmationOutcome.Cancel);
12054
12073
  },
12055
12074
  width: safeTerminalWidth,
12056
12075
  availableHeight: bodyHeight
@@ -12071,19 +12090,19 @@ Ensure you trust all modifications made to build files before approving executio
12071
12090
  planPath: confirmationDetails.planPath,
12072
12091
  getPreferredEditor,
12073
12092
  onApprove: (approvalMode) => {
12074
- handleConfirm("proceed_once" /* ProceedOnce */, {
12093
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12075
12094
  approved: true,
12076
12095
  approvalMode
12077
12096
  });
12078
12097
  },
12079
12098
  onFeedback: (feedback) => {
12080
- handleConfirm("proceed_once" /* ProceedOnce */, {
12099
+ handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
12081
12100
  approved: false,
12082
12101
  feedback
12083
12102
  });
12084
12103
  },
12085
12104
  onCancel: () => {
12086
- handleConfirm("cancel" /* Cancel */);
12105
+ handleConfirm(ToolConfirmationOutcome.Cancel);
12087
12106
  },
12088
12107
  width: safeTerminalWidth,
12089
12108
  availableHeight: bodyHeight
@@ -12193,7 +12212,7 @@ Ensure you trust all modifications made to build files before approving executio
12193
12212
  const containsRedirection = commandsToDisplay.some(
12194
12213
  (cmd) => hasRedirection(cmd)
12195
12214
  );
12196
- const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
12215
+ const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
12197
12216
  let warnings = null;
12198
12217
  if (containsRedirection && !isAutoEdit) {
12199
12218
  const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
@@ -12352,7 +12371,7 @@ Ensure you trust all modifications made to build files before approving executio
12352
12371
  const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
12353
12372
  const renderRadioItem = (0, import_react35.useCallback)(
12354
12373
  (item, { titleColor }) => {
12355
- if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
12374
+ if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
12356
12375
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
12357
12376
  item.label,
12358
12377
  " ",
@@ -14397,7 +14416,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
14397
14416
  if (settings.merged.security.auth.useExternal) {
14398
14417
  return null;
14399
14418
  }
14400
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14419
+ if (authType === AuthType.USE_GEMINI) {
14401
14420
  return null;
14402
14421
  }
14403
14422
  return validateAuthMethod(authType);
@@ -14449,7 +14468,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
14449
14468
  }
14450
14469
  return;
14451
14470
  }
14452
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14471
+ if (authType === AuthType.USE_GEMINI) {
14453
14472
  const key = await reloadApiKey();
14454
14473
  if (!key) {
14455
14474
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
@@ -14527,31 +14546,31 @@ function AuthDialog({
14527
14546
  let items = [
14528
14547
  {
14529
14548
  label: "Sign in with Google",
14530
- value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
14531
- key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
14549
+ value: AuthType.LOGIN_WITH_GOOGLE,
14550
+ key: AuthType.LOGIN_WITH_GOOGLE
14532
14551
  },
14533
14552
  ...process.env["CLOUD_SHELL"] === "true" ? [
14534
14553
  {
14535
14554
  label: "Use Cloud Shell user credentials",
14536
- value: "compute-default-credentials" /* COMPUTE_ADC */,
14537
- key: "compute-default-credentials" /* COMPUTE_ADC */
14555
+ value: AuthType.COMPUTE_ADC,
14556
+ key: AuthType.COMPUTE_ADC
14538
14557
  }
14539
14558
  ] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
14540
14559
  {
14541
14560
  label: "Use metadata server application default credentials",
14542
- value: "compute-default-credentials" /* COMPUTE_ADC */,
14543
- key: "compute-default-credentials" /* COMPUTE_ADC */
14561
+ value: AuthType.COMPUTE_ADC,
14562
+ key: AuthType.COMPUTE_ADC
14544
14563
  }
14545
14564
  ] : [],
14546
14565
  {
14547
14566
  label: "Use Gemini API Key",
14548
- value: "gemini-api-key" /* USE_GEMINI */,
14549
- key: "gemini-api-key" /* USE_GEMINI */
14567
+ value: AuthType.USE_GEMINI,
14568
+ key: AuthType.USE_GEMINI
14550
14569
  },
14551
14570
  {
14552
14571
  label: "Vertex AI",
14553
- value: "vertex-ai" /* USE_VERTEX_AI */,
14554
- key: "vertex-ai" /* USE_VERTEX_AI */
14572
+ value: AuthType.USE_VERTEX_AI,
14573
+ key: AuthType.USE_VERTEX_AI
14555
14574
  }
14556
14575
  ];
14557
14576
  if (settings.merged.security.auth.enforcedType) {
@@ -14573,9 +14592,9 @@ function AuthDialog({
14573
14592
  return item.value === defaultAuthType;
14574
14593
  }
14575
14594
  if (process.env["GEMINI_API_KEY"]) {
14576
- return item.value === "gemini-api-key" /* USE_GEMINI */;
14595
+ return item.value === AuthType.USE_GEMINI;
14577
14596
  }
14578
- return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
14597
+ return item.value === AuthType.LOGIN_WITH_GOOGLE;
14579
14598
  });
14580
14599
  if (settings.merged.security.auth.enforcedType) {
14581
14600
  initialAuthIndex = 0;
@@ -14586,7 +14605,7 @@ function AuthDialog({
14586
14605
  return;
14587
14606
  }
14588
14607
  if (authType) {
14589
- const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
14608
+ const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
14590
14609
  if (needsRestart) {
14591
14610
  setAuthContext({ requiresRestart: true });
14592
14611
  } else {
@@ -14594,12 +14613,12 @@ function AuthDialog({
14594
14613
  }
14595
14614
  await clearCachedCredentialFile();
14596
14615
  settings.setValue(scope, "security.auth.selectedType", authType);
14597
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
14616
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
14598
14617
  setExiting(true);
14599
14618
  setTimeout(relaunchApp, 100);
14600
14619
  return;
14601
14620
  }
14602
- if (authType === "gemini-api-key" /* USE_GEMINI */) {
14621
+ if (authType === AuthType.USE_GEMINI) {
14603
14622
  setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
14604
14623
  return;
14605
14624
  }
@@ -15406,11 +15425,11 @@ var PrivacyNoticeText = ({
15406
15425
  }) => {
15407
15426
  const authType = config.getContentGeneratorConfig()?.authType;
15408
15427
  switch (authType) {
15409
- case "gemini-api-key" /* USE_GEMINI */:
15428
+ case AuthType.USE_GEMINI:
15410
15429
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GeminiPrivacyNotice, { onExit });
15411
- case "vertex-ai" /* USE_VERTEX_AI */:
15430
+ case AuthType.USE_VERTEX_AI:
15412
15431
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudPaidPrivacyNotice, { onExit });
15413
- case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
15432
+ case AuthType.LOGIN_WITH_GOOGLE:
15414
15433
  default:
15415
15434
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudFreePrivacyNotice, { config, onExit });
15416
15435
  }
@@ -15470,7 +15489,7 @@ function ProQuotaDialog({
15470
15489
  value: "retry_always",
15471
15490
  key: "retry_always"
15472
15491
  },
15473
- ...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
15492
+ ...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
15474
15493
  {
15475
15494
  label: "Upgrade for higher limits",
15476
15495
  value: "upgrade",
@@ -16637,7 +16656,7 @@ function ModelDialog({ onClose }) {
16637
16656
  const useLatestFlash = config?.hasLatestFlashGAAccess?.() ?? false;
16638
16657
  const useLatestFlashLite = config?.hasLatestFlashLiteGAAccess?.() ?? false;
16639
16658
  const selectedAuthType = settings.merged.security.auth.selectedType;
16640
- const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
16659
+ const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
16641
16660
  const manualModelSelected = (0, import_react53.useMemo)(() => {
16642
16661
  if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
16643
16662
  const def = config.getModelConfigService().getModelDefinition(preferredModel);
@@ -17965,10 +17984,10 @@ function initializeConsoleStore() {
17965
17984
  globalConsoleMessages = [];
17966
17985
  globalErrorCount = 0;
17967
17986
  notifyListeners();
17968
- coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
17969
- coreEvents.off("output" /* Output */, handleOutput);
17970
- coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
17971
- coreEvents.on("output" /* Output */, handleOutput);
17987
+ coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
17988
+ coreEvents.off(CoreEvent.Output, handleOutput);
17989
+ coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
17990
+ coreEvents.on(CoreEvent.Output, handleOutput);
17972
17991
  }
17973
17992
  function notifyListeners() {
17974
17993
  for (const listener of listeners) {
@@ -20105,7 +20124,7 @@ function usePromptCompletion({
20105
20124
  { model: "prompt-completion" },
20106
20125
  contents,
20107
20126
  signal,
20108
- "utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
20127
+ LlmRole.UTILITY_AUTOCOMPLETE
20109
20128
  );
20110
20129
  if (signal.aborted) {
20111
20130
  return;
@@ -22177,9 +22196,9 @@ var InputPrompt = ({
22177
22196
  onSuggestionsVisibilityChange(shouldShowSuggestions);
22178
22197
  }
22179
22198
  }, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
22180
- const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
22181
- const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
22182
- const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
22199
+ const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
22200
+ const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
22201
+ const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
22183
22202
  let statusColor;
22184
22203
  let statusText = "";
22185
22204
  if (shellModeActive) {
@@ -22794,6 +22813,7 @@ var GeminiRespondingSpinner = ({
22794
22813
  var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
22795
22814
  var LoadingIndicator = ({
22796
22815
  currentLoadingPhrase,
22816
+ statusPhrase,
22797
22817
  wittyPhrase,
22798
22818
  showWit = false,
22799
22819
  elapsedTime,
@@ -22809,10 +22829,10 @@ var LoadingIndicator = ({
22809
22829
  const streamingState = useStreamingContext();
22810
22830
  const { columns: terminalWidth } = useTerminalSize();
22811
22831
  const isNarrow = isNarrowWidth(terminalWidth);
22812
- if (streamingState === "idle" /* Idle */ && !currentLoadingPhrase && !thought) {
22832
+ if (streamingState === "idle" /* Idle */ && !currentLoadingPhrase && !statusPhrase && !thought) {
22813
22833
  return null;
22814
22834
  }
22815
- const primaryText = currentLoadingPhrase === INTERACTIVE_SHELL_WAITING_PHRASE ? currentLoadingPhrase : thought?.subject ? thoughtLabel ?? thought.subject : currentLoadingPhrase || (streamingState === "responding" /* Responding */ ? "Thinking..." : void 0);
22835
+ const primaryText = statusPhrase ?? (currentLoadingPhrase === INTERACTIVE_SHELL_WAITING_PHRASE ? currentLoadingPhrase : thought?.subject ? thoughtLabel ?? thought.subject : currentLoadingPhrase || (streamingState === "responding" /* Responding */ ? "Thinking..." : void 0));
22816
22836
  const cancelAndTimerContent = showCancelAndTimer && streamingState === "responding" /* Responding */ ? `(esc to cancel, ${elapsedTime < 60 ? `${elapsedTime}s` : formatDuration(elapsedTime * 1e3)})` : null;
22817
22837
  const wittyPhraseNode = !forceRealStatusOnly && showWit && wittyPhrase && primaryText === "Thinking..." ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Text, { color: theme.text.secondary, dimColor: true, italic: true, children: wittyPhrase }) }) : null;
22818
22838
  if (inline) {
@@ -23012,22 +23032,22 @@ var ApprovalModeIndicator = ({
23012
23032
  const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
23013
23033
  const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
23014
23034
  switch (approvalMode) {
23015
- case "autoEdit" /* AUTO_EDIT */:
23035
+ case ApprovalMode.AUTO_EDIT:
23016
23036
  textColor = theme.status.warning;
23017
23037
  textContent = "auto-accept edits";
23018
23038
  subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
23019
23039
  break;
23020
- case "plan" /* PLAN */:
23040
+ case ApprovalMode.PLAN:
23021
23041
  textColor = theme.status.success;
23022
23042
  textContent = "plan";
23023
23043
  subText = `${cycleHint} to manual`;
23024
23044
  break;
23025
- case "yolo" /* YOLO */:
23045
+ case ApprovalMode.YOLO:
23026
23046
  textColor = theme.status.error;
23027
23047
  textContent = "YOLO";
23028
23048
  subText = yoloHint;
23029
23049
  break;
23030
- case "default" /* DEFAULT */:
23050
+ case ApprovalMode.DEFAULT:
23031
23051
  default:
23032
23052
  textColor = theme.text.accent;
23033
23053
  textContent = "";
@@ -23075,7 +23095,7 @@ var useComposerStatus = () => {
23075
23095
  (item) => item.type === "tool_group"
23076
23096
  ).some(
23077
23097
  (item) => item.tools.some(
23078
- (tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
23098
+ (tool) => tool.status === CoreToolCallStatus.AwaitingApproval
23079
23099
  )
23080
23100
  ),
23081
23101
  [uiState.pendingHistoryItems]
@@ -23090,13 +23110,13 @@ var useComposerStatus = () => {
23090
23110
  const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
23091
23111
  if (hideMinimalModeHintWhileBusy) return null;
23092
23112
  switch (showApprovalModeIndicator) {
23093
- case "yolo" /* YOLO */:
23113
+ case ApprovalMode.YOLO:
23094
23114
  return { text: "YOLO", color: theme.status.error };
23095
- case "plan" /* PLAN */:
23115
+ case ApprovalMode.PLAN:
23096
23116
  return { text: "plan", color: theme.status.success };
23097
- case "autoEdit" /* AUTO_EDIT */:
23117
+ case ApprovalMode.AUTO_EDIT:
23098
23118
  return { text: "auto edit", color: theme.status.warning };
23099
- case "default" /* DEFAULT */:
23119
+ case ApprovalMode.DEFAULT:
23100
23120
  default:
23101
23121
  return null;
23102
23122
  }
@@ -23149,6 +23169,7 @@ var StatusNode = ({
23149
23169
  activeHooks,
23150
23170
  showLoadingIndicator,
23151
23171
  errorVerbosity,
23172
+ statusPhrase,
23152
23173
  onResize
23153
23174
  }) => {
23154
23175
  const observerRef = (0, import_react77.useRef)(null);
@@ -23177,7 +23198,9 @@ var StatusNode = ({
23177
23198
  },
23178
23199
  [onResize]
23179
23200
  );
23180
- if (activeHooks.length === 0 && !showLoadingIndicator) return null;
23201
+ if (activeHooks.length === 0 && !showLoadingIndicator && !statusPhrase) {
23202
+ return null;
23203
+ }
23181
23204
  let currentLoadingPhrase = void 0;
23182
23205
  let currentThought = null;
23183
23206
  if (activeHooks.length > 0) {
@@ -23209,6 +23232,7 @@ var StatusNode = ({
23209
23232
  errorVerbosity,
23210
23233
  thought: currentThought,
23211
23234
  currentLoadingPhrase,
23235
+ statusPhrase,
23212
23236
  elapsedTime,
23213
23237
  forceRealStatusOnly: false,
23214
23238
  wittyPhrase: currentWittyPhrase
@@ -23221,9 +23245,11 @@ var StatusRow = ({
23221
23245
  terminalWidth,
23222
23246
  hideContextSummary,
23223
23247
  hideUiDetailsForSuggestions,
23224
- hasPendingActionRequired
23248
+ hasPendingActionRequired,
23249
+ statusPhrase: propStatusPhrase
23225
23250
  }) => {
23226
23251
  const uiState = useUIState();
23252
+ const statusPhrase = propStatusPhrase ?? uiState.statusPhrase;
23227
23253
  const inputState = useInputState();
23228
23254
  const settings = useSettings();
23229
23255
  const {
@@ -23275,7 +23301,7 @@ var StatusRow = ({
23275
23301
  const showTipLine = Boolean(
23276
23302
  !hasPendingActionRequired && tipContentStr && !willCollideTip && !isNarrow
23277
23303
  );
23278
- const showRow1Minimal = showLoadingIndicator || uiState.activeHooks.length > 0 || showTipLine;
23304
+ const showRow1Minimal = showLoadingIndicator || uiState.activeHooks.length > 0 || showTipLine || Boolean(statusPhrase);
23279
23305
  const showRow2Minimal = Boolean(modeContentObj) && !hideUiDetailsForSuggestions || showMinimalContext;
23280
23306
  const showRow1 = showUiDetails || showRow1Minimal;
23281
23307
  const showRow2 = showUiDetails || showRow2Minimal;
@@ -23293,6 +23319,7 @@ var StatusRow = ({
23293
23319
  activeHooks: uiState.activeHooks,
23294
23320
  showLoadingIndicator,
23295
23321
  errorVerbosity: settings.merged.ui.errorVerbosity,
23322
+ statusPhrase,
23296
23323
  onResize: onStatusResize
23297
23324
  }
23298
23325
  );
@@ -23450,7 +23477,7 @@ var ConfigInitDisplay = ({
23450
23477
  let connected = 0;
23451
23478
  const connecting = [];
23452
23479
  for (const [name, client] of clients.entries()) {
23453
- if (client.getStatus() === "connected" /* CONNECTED */) {
23480
+ if (client.getStatus() === MCPServerStatus.CONNECTED) {
23454
23481
  connected++;
23455
23482
  } else {
23456
23483
  connecting.push(name);
@@ -23472,9 +23499,9 @@ var ConfigInitDisplay = ({
23472
23499
  );
23473
23500
  }
23474
23501
  };
23475
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
23502
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
23476
23503
  return () => {
23477
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23504
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
23478
23505
  };
23479
23506
  }, [initialMessage]);
23480
23507
  return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { children: [
@@ -24191,7 +24218,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
24191
24218
  callId,
24192
24219
  name: SHELL_COMMAND_NAME,
24193
24220
  description: rawQuery,
24194
- status: "executing" /* Executing */,
24221
+ status: CoreToolCallStatus.Executing,
24195
24222
  isClientInitiated: true,
24196
24223
  resultDisplay: "",
24197
24224
  confirmationDetails: void 0
@@ -24332,7 +24359,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24332
24359
  mainContent = result.output.trim() || "(Command produced no output)";
24333
24360
  }
24334
24361
  let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
24335
- let finalStatus = "success" /* Success */;
24362
+ let finalStatus = CoreToolCallStatus.Success;
24336
24363
  const prependToAnsiOutput = (output, text) => {
24337
24364
  const newLines = text.split("\n").map((line) => [
24338
24365
  {
@@ -24351,20 +24378,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
24351
24378
  };
24352
24379
  let prefix = "";
24353
24380
  if (result.error) {
24354
- finalStatus = "error" /* Error */;
24381
+ finalStatus = CoreToolCallStatus.Error;
24355
24382
  prefix = result.error.message;
24356
24383
  } else if (result.aborted) {
24357
- finalStatus = "cancelled" /* Cancelled */;
24384
+ finalStatus = CoreToolCallStatus.Cancelled;
24358
24385
  prefix = "Command was cancelled.";
24359
24386
  } else if (result.backgrounded) {
24360
- finalStatus = "success" /* Success */;
24387
+ finalStatus = CoreToolCallStatus.Success;
24361
24388
  finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
24362
24389
  mainContent = finalOutput;
24363
24390
  } else if (result.signal) {
24364
- finalStatus = "error" /* Error */;
24391
+ finalStatus = CoreToolCallStatus.Error;
24365
24392
  prefix = `Command terminated by signal: ${result.signal}.`;
24366
24393
  } else if (result.exitCode !== 0) {
24367
- finalStatus = "error" /* Error */;
24394
+ finalStatus = CoreToolCallStatus.Error;
24368
24395
  prefix = `Command exited with code ${result.exitCode}.`;
24369
24396
  }
24370
24397
  if (prefix) {
@@ -24390,7 +24417,7 @@ ${mainContent}`;
24390
24417
  status: finalStatus,
24391
24418
  resultDisplay: finalOutput
24392
24419
  };
24393
- if (finalStatus !== "cancelled" /* Cancelled */) {
24420
+ if (finalStatus !== CoreToolCallStatus.Cancelled) {
24394
24421
  addItemToHistory(
24395
24422
  {
24396
24423
  type: "tool_group",
@@ -25400,13 +25427,13 @@ function useQuotaAndFallback({
25400
25427
  error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
25401
25428
  `/stats model for usage details`,
25402
25429
  `/model to switch models.`,
25403
- contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
25430
+ contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
25404
25431
  ].filter(Boolean);
25405
25432
  message = messageLines.join("\n");
25406
25433
  }
25407
25434
  } else if (error instanceof ModelNotFoundError) {
25408
25435
  isModelNotFoundError = true;
25409
- if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
25436
+ if (contentGeneratorConfig?.authType === AuthType.USE_VERTEX_AI && VALID_GEMINI_MODELS.has(failedModel)) {
25410
25437
  const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
25411
25438
  const messageLines = [
25412
25439
  `Model "${failedModel}" is not available in region "${location}".`,
@@ -25600,7 +25627,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25600
25627
  );
25601
25628
  setEditorError(null);
25602
25629
  setIsEditorDialogOpen(false);
25603
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
25630
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
25604
25631
  } catch (error) {
25605
25632
  setEditorError(`Failed to set editor preference: ${error}`);
25606
25633
  }
@@ -25609,7 +25636,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
25609
25636
  );
25610
25637
  const exitEditorDialog = (0, import_react89.useCallback)(() => {
25611
25638
  setIsEditorDialogOpen(false);
25612
- coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
25639
+ coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
25613
25640
  }, []);
25614
25641
  return {
25615
25642
  isEditorDialogOpen,
@@ -25986,7 +26013,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
25986
26013
  canonicalPath: resolvedCommandPath
25987
26014
  } = parseSlashCommand(trimmed, commands);
25988
26015
  if (!commandToExecute) {
25989
- const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
26016
+ const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
25990
26017
  if (isMcpLoading) {
25991
26018
  setIsProcessing(true);
25992
26019
  if (addToHistory) {
@@ -26166,7 +26193,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26166
26193
  onConfirm: async (resolvedOutcome) => {
26167
26194
  resolve3({
26168
26195
  outcome: resolvedOutcome,
26169
- approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
26196
+ approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
26170
26197
  });
26171
26198
  }
26172
26199
  };
@@ -26174,7 +26201,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26174
26201
  callId,
26175
26202
  name: "Expansion",
26176
26203
  description: "Command expansion needs shell access",
26177
- status: "awaiting_approval" /* AwaitingApproval */,
26204
+ status: CoreToolCallStatus.AwaitingApproval,
26178
26205
  isClientInitiated: true,
26179
26206
  resultDisplay: void 0,
26180
26207
  confirmationDetails
@@ -26185,7 +26212,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26185
26212
  });
26186
26213
  });
26187
26214
  setPendingItem(null);
26188
- if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
26215
+ if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
26189
26216
  addItem(
26190
26217
  {
26191
26218
  type: "info" /* INFO */,
@@ -26195,7 +26222,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26195
26222
  );
26196
26223
  return { type: "handled" };
26197
26224
  }
26198
- if (outcome === "proceed_always" /* ProceedAlways */) {
26225
+ if (outcome === ToolConfirmationOutcome.ProceedAlways) {
26199
26226
  setSessionShellAllowlist(
26200
26227
  (prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
26201
26228
  );
@@ -26671,7 +26698,7 @@ function mapToDisplay(toolOrTools, options = {}) {
26671
26698
  let description;
26672
26699
  let renderOutputAsMarkdown = false;
26673
26700
  const displayName = call.tool?.displayName ?? call.request.name;
26674
- if (call.status === "error" /* Error */) {
26701
+ if (call.status === CoreToolCallStatus.Error) {
26675
26702
  description = JSON.stringify(call.request.args);
26676
26703
  } else {
26677
26704
  description = call.invocation.getDescription();
@@ -26694,27 +26721,27 @@ function mapToDisplay(toolOrTools, options = {}) {
26694
26721
  let progress = void 0;
26695
26722
  let progressTotal = void 0;
26696
26723
  switch (call.status) {
26697
- case "success" /* Success */:
26724
+ case CoreToolCallStatus.Success:
26698
26725
  resultDisplay = call.response.resultDisplay;
26699
26726
  outputFile = call.response.outputFile;
26700
26727
  break;
26701
- case "error" /* Error */:
26702
- case "cancelled" /* Cancelled */:
26728
+ case CoreToolCallStatus.Error:
26729
+ case CoreToolCallStatus.Cancelled:
26703
26730
  resultDisplay = call.response.resultDisplay;
26704
26731
  break;
26705
- case "awaiting_approval" /* AwaitingApproval */:
26732
+ case CoreToolCallStatus.AwaitingApproval:
26706
26733
  correlationId = call.correlationId;
26707
26734
  confirmationDetails = call.confirmationDetails;
26708
26735
  break;
26709
- case "executing" /* Executing */:
26736
+ case CoreToolCallStatus.Executing:
26710
26737
  resultDisplay = call.liveOutput;
26711
26738
  ptyId = call.pid;
26712
26739
  progressMessage = call.progressMessage;
26713
26740
  progress = call.progress;
26714
26741
  progressTotal = call.progressTotal;
26715
26742
  break;
26716
- case "scheduled" /* Scheduled */:
26717
- case "validating" /* Validating */:
26743
+ case CoreToolCallStatus.Scheduled:
26744
+ case CoreToolCallStatus.Validating:
26718
26745
  break;
26719
26746
  default: {
26720
26747
  const exhaustiveCheck = call;
@@ -26785,7 +26812,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26785
26812
  const handler = (event) => {
26786
26813
  const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
26787
26814
  const hasExecuting = event.toolCalls.some(
26788
- (tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26815
+ (tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
26789
26816
  );
26790
26817
  if (hasExecuting) {
26791
26818
  setLastToolOutputTime(Date.now());
@@ -26794,7 +26821,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26794
26821
  const prevCalls = prev[event.schedulerId] ?? [];
26795
26822
  const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
26796
26823
  const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
26797
- (tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
26824
+ (tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
26798
26825
  );
26799
26826
  if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
26800
26827
  return prev;
@@ -26806,9 +26833,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26806
26833
  };
26807
26834
  });
26808
26835
  };
26809
- messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26836
+ messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26810
26837
  return () => {
26811
- messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
26838
+ messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
26812
26839
  };
26813
26840
  }, [messageBus, internalAdaptToolCalls]);
26814
26841
  (0, import_react96.useEffect)(() => {
@@ -26830,9 +26857,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
26830
26857
  };
26831
26858
  });
26832
26859
  };
26833
- messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26860
+ messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26834
26861
  return () => {
26835
- messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
26862
+ messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
26836
26863
  };
26837
26864
  }, [messageBus]);
26838
26865
  const schedule = (0, import_react96.useCallback)(
@@ -26931,8 +26958,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
26931
26958
  const prev = prevMap.get(coreCall.request.callId);
26932
26959
  const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
26933
26960
  let status = coreCall.status;
26934
- if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26935
- status = "executing" /* Executing */;
26961
+ if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
26962
+ status = CoreToolCallStatus.Executing;
26936
26963
  }
26937
26964
  return {
26938
26965
  ...coreCall,
@@ -26964,7 +26991,7 @@ function getBackgroundedToolInfo(toolCall) {
26964
26991
  };
26965
26992
  }
26966
26993
  function isBackgroundableExecutingToolCall(toolCall) {
26967
- return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
26994
+ return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
26968
26995
  }
26969
26996
  function showCitations(settings) {
26970
26997
  const enabled = settings.merged.ui.showCitations;
@@ -26974,14 +27001,14 @@ function showCitations(settings) {
26974
27001
  return true;
26975
27002
  }
26976
27003
  function calculateStreamingState(isResponding, toolCalls) {
26977
- if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
27004
+ if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
26978
27005
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
26979
27006
  }
26980
27007
  const isAnyToolActive = toolCalls.some((tc) => {
26981
- if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
27008
+ if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
26982
27009
  return true;
26983
27010
  }
26984
- if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
27011
+ if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
26985
27012
  return !tc.responseSubmittedToGemini;
26986
27013
  }
26987
27014
  return false;
@@ -27028,9 +27055,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27028
27055
  }
27029
27056
  setRetryStatus(payload);
27030
27057
  };
27031
- coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27058
+ coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
27032
27059
  return () => {
27033
- coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
27060
+ coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
27034
27061
  };
27035
27062
  }, [isRespondingRef]);
27036
27063
  const [
@@ -27163,12 +27190,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27163
27190
  const tc = toolCalls[i];
27164
27191
  if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
27165
27192
  if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
27166
- const isAgent = tc.tool?.kind === "agent" /* Agent */;
27193
+ const isAgent = tc.tool?.kind === Kind.Agent;
27167
27194
  if (isAgent) {
27168
27195
  let contigAgentsComplete = true;
27169
27196
  for (let j = i + 1; j < toolCalls.length; j++) {
27170
27197
  const nextTc = toolCalls[j];
27171
- if (nextTc.tool?.kind === "agent" /* Agent */) {
27198
+ if (nextTc.tool?.kind === Kind.Agent) {
27172
27199
  if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
27173
27200
  contigAgentsComplete = false;
27174
27201
  break;
@@ -27194,7 +27221,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27194
27221
  let currentGroup = [];
27195
27222
  for (const tc of toolsToPush) {
27196
27223
  newPushed.add(tc.request.callId);
27197
- if (tc.tool?.kind === "agent" /* Agent */) {
27224
+ if (tc.tool?.kind === Kind.Agent) {
27198
27225
  currentGroup.push(tc);
27199
27226
  } else {
27200
27227
  if (currentGroup.length > 0) {
@@ -27347,7 +27374,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27347
27374
  prevActiveShellPtyIdRef.current = activeShellPtyId;
27348
27375
  }, [activeShellPtyId, addItem, setIsResponding]);
27349
27376
  (0, import_react97.useEffect)(() => {
27350
- if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
27377
+ if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
27351
27378
  const lastUserMessageIndex = history.findLastIndex(
27352
27379
  (item) => item.type === "user" /* USER */
27353
27380
  );
@@ -27415,7 +27442,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27415
27442
  return;
27416
27443
  }
27417
27444
  const hasActiveTools = toolCalls.some(
27418
- (tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
27445
+ (tc) => tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating
27419
27446
  );
27420
27447
  if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
27421
27448
  if (clearBuffer) {
@@ -27442,7 +27469,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27442
27469
  if (tool.name === SHELL_COMMAND_NAME) {
27443
27470
  return {
27444
27471
  ...tool,
27445
- status: "cancelled" /* Cancelled */,
27472
+ status: CoreToolCallStatus.Cancelled,
27446
27473
  resultDisplay: tool.resultDisplay
27447
27474
  };
27448
27475
  }
@@ -27507,7 +27534,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27507
27534
  let localQueryToSendToGemini = null;
27508
27535
  if (typeof query === "string") {
27509
27536
  const trimmedQuery = query.trim();
27510
- await logger?.logMessage("user" /* USER */, trimmedQuery);
27537
+ await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
27511
27538
  if (!shellModeActive) {
27512
27539
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
27513
27540
  if (slashCommandResult) {
@@ -27663,7 +27690,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27663
27690
  if (pendingHistoryItemRef.current) {
27664
27691
  if (pendingHistoryItemRef.current.type === "tool_group") {
27665
27692
  const updatedTools = pendingHistoryItemRef.current.tools.map(
27666
- (tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
27693
+ (tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
27667
27694
  );
27668
27695
  const pendingItem = {
27669
27696
  ...pendingHistoryItemRef.current,
@@ -27955,15 +27982,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27955
27982
  let geminiMessageBuffer = "";
27956
27983
  const toolCallRequests = [];
27957
27984
  for await (const event of stream) {
27958
- if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
27985
+ if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
27959
27986
  setThought(null);
27960
27987
  }
27961
27988
  switch (event.type) {
27962
- case "thought" /* Thought */:
27989
+ case GeminiEventType.Thought:
27963
27990
  setLastGeminiActivityTime(Date.now());
27964
27991
  handleThoughtEvent(event.value, userMessageTimestamp);
27965
27992
  break;
27966
- case "content" /* Content */:
27993
+ case GeminiEventType.Content:
27967
27994
  setLastGeminiActivityTime(Date.now());
27968
27995
  geminiMessageBuffer = handleContentEvent(
27969
27996
  event.value,
@@ -27971,16 +27998,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27971
27998
  userMessageTimestamp
27972
27999
  );
27973
28000
  break;
27974
- case "tool_call_request" /* ToolCallRequest */:
28001
+ case GeminiEventType.ToolCallRequest:
27975
28002
  toolCallRequests.push(event.value);
27976
28003
  break;
27977
- case "user_cancelled" /* UserCancelled */:
28004
+ case GeminiEventType.UserCancelled:
27978
28005
  handleUserCancelledEvent(userMessageTimestamp);
27979
28006
  break;
27980
- case "error" /* Error */:
28007
+ case GeminiEventType.Error:
27981
28008
  handleErrorEvent(event.value, userMessageTimestamp);
27982
28009
  break;
27983
- case "agent_execution_stopped" /* AgentExecutionStopped */:
28010
+ case GeminiEventType.AgentExecutionStopped:
27984
28011
  handleAgentExecutionStoppedEvent(
27985
28012
  event.value.reason,
27986
28013
  userMessageTimestamp,
@@ -27988,7 +28015,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27988
28015
  event.value.contextCleared
27989
28016
  );
27990
28017
  break;
27991
- case "agent_execution_blocked" /* AgentExecutionBlocked */:
28018
+ case GeminiEventType.AgentExecutionBlocked:
27992
28019
  handleAgentExecutionBlockedEvent(
27993
28020
  event.value.reason,
27994
28021
  userMessageTimestamp,
@@ -27996,36 +28023,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
27996
28023
  event.value.contextCleared
27997
28024
  );
27998
28025
  break;
27999
- case "chat_compressed" /* ChatCompressed */:
28026
+ case GeminiEventType.ChatCompressed:
28000
28027
  handleChatCompressionEvent(event.value, userMessageTimestamp);
28001
28028
  break;
28002
- case "tool_call_confirmation" /* ToolCallConfirmation */:
28003
- case "tool_call_response" /* ToolCallResponse */:
28029
+ case GeminiEventType.ToolCallConfirmation:
28030
+ case GeminiEventType.ToolCallResponse:
28004
28031
  break;
28005
- case "max_session_turns" /* MaxSessionTurns */:
28032
+ case GeminiEventType.MaxSessionTurns:
28006
28033
  handleMaxSessionTurnsEvent();
28007
28034
  break;
28008
- case "context_window_will_overflow" /* ContextWindowWillOverflow */:
28035
+ case GeminiEventType.ContextWindowWillOverflow:
28009
28036
  handleContextWindowWillOverflowEvent(
28010
28037
  event.value.estimatedRequestTokenCount,
28011
28038
  event.value.remainingTokenCount
28012
28039
  );
28013
28040
  break;
28014
- case "finished" /* Finished */:
28041
+ case GeminiEventType.Finished:
28015
28042
  handleFinishedEvent(event, userMessageTimestamp);
28016
28043
  break;
28017
- case "citation" /* Citation */:
28044
+ case GeminiEventType.Citation:
28018
28045
  handleCitationEvent(event.value, userMessageTimestamp);
28019
28046
  break;
28020
- case "model_info" /* ModelInfo */:
28047
+ case GeminiEventType.ModelInfo:
28021
28048
  handleChatModelEvent(event.value, userMessageTimestamp);
28022
28049
  break;
28023
- case "loop_detected" /* LoopDetected */:
28050
+ case GeminiEventType.LoopDetected:
28024
28051
  loopDetectedRef.current = true;
28025
28052
  break;
28026
- case "retry" /* Retry */:
28053
+ case GeminiEventType.Retry:
28027
28054
  break;
28028
- case "invalid_stream" /* InvalidStream */:
28055
+ case GeminiEventType.InvalidStream:
28029
28056
  handleInvalidStreamEvent(event.value, userMessageTimestamp);
28030
28057
  break;
28031
28058
  default: {
@@ -28079,7 +28106,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28079
28106
  const submitQuery = (0, import_react97.useCallback)(
28080
28107
  async (query, options, prompt_id) => runInDevTraceSpan(
28081
28108
  {
28082
- operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
28109
+ operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
28083
28110
  sessionId: config.getSessionId()
28084
28111
  },
28085
28112
  async ({ metadata: spanMetadata }) => {
@@ -28246,7 +28273,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28246
28273
  submitQueryRef.current = submitQuery;
28247
28274
  const handleApprovalModeChange = (0, import_react97.useCallback)(
28248
28275
  async (newApprovalMode) => {
28249
- if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
28276
+ if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
28250
28277
  if (geminiClient) {
28251
28278
  try {
28252
28279
  await geminiClient.addHistory({
@@ -28269,11 +28296,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28269
28296
  }
28270
28297
  }
28271
28298
  previousApprovalModeRef.current = newApprovalMode;
28272
- if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28299
+ if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
28273
28300
  let awaitingApprovalCalls = toolCalls.filter(
28274
28301
  (call) => call.status === "awaiting_approval" && !call.request.forcedAsk
28275
28302
  );
28276
- if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
28303
+ if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
28277
28304
  awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
28278
28305
  if (EDIT_TOOL_NAMES.has(call.request.name)) {
28279
28306
  return true;
@@ -28289,11 +28316,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28289
28316
  if (call.correlationId) {
28290
28317
  try {
28291
28318
  await config.getMessageBus().publish({
28292
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
28319
+ type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
28293
28320
  correlationId: call.correlationId,
28294
28321
  confirmed: true,
28295
28322
  requiresUserConfirmation: false,
28296
- outcome: "proceed_once" /* ProceedOnce */
28323
+ outcome: ToolConfirmationOutcome.ProceedOnce
28297
28324
  });
28298
28325
  } catch (error) {
28299
28326
  debugLogger.warn(
@@ -28384,14 +28411,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28384
28411
  );
28385
28412
  if (isLowErrorVerbosity) {
28386
28413
  suppressedToolErrorCountRef.current += geminiTools.filter(
28387
- (tc) => tc.status === "error" /* Error */
28414
+ (tc) => tc.status === CoreToolCallStatus.Error
28388
28415
  ).length;
28389
28416
  }
28390
28417
  if (geminiTools.length === 0) {
28391
28418
  return;
28392
28419
  }
28393
28420
  const stopExecutionTool = geminiTools.find(
28394
- (tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
28421
+ (tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
28395
28422
  );
28396
28423
  if (stopExecutionTool && stopExecutionTool.response.error) {
28397
28424
  maybeAddSuppressedToolErrorNote();
@@ -28411,9 +28438,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28411
28438
  (tc) => !isTopicTool2(tc.request.name)
28412
28439
  );
28413
28440
  const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
28414
- (tc) => tc.status === "cancelled" /* Cancelled */
28441
+ (tc) => tc.status === CoreToolCallStatus.Cancelled
28415
28442
  );
28416
- const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
28443
+ const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
28417
28444
  if (allDeclinableToolsCancelled || allToolsCancelled) {
28418
28445
  if (!turnCancelledRef.current) {
28419
28446
  addItem({
@@ -28499,7 +28526,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
28499
28526
  return;
28500
28527
  }
28501
28528
  const restorableToolCalls = toolCalls.filter(
28502
- (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
28529
+ (toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
28503
28530
  );
28504
28531
  if (restorableToolCalls.length > 0) {
28505
28532
  if (!gitService) {
@@ -28722,14 +28749,14 @@ var useAgentStream = ({
28722
28749
  const displayName = legacyState?.displayName ?? event.name;
28723
28750
  const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
28724
28751
  const desc = legacyState?.description ?? "";
28725
- const fallbackKind = "other" /* Other */;
28752
+ const fallbackKind = Kind.Other;
28726
28753
  const newCall = {
28727
28754
  callId: event.requestId,
28728
28755
  name: displayName,
28729
28756
  originalRequestName: event.name,
28730
28757
  description: desc,
28731
28758
  display: event.display,
28732
- status: "scheduled" /* Scheduled */,
28759
+ status: CoreToolCallStatus.Scheduled,
28733
28760
  isClientInitiated: false,
28734
28761
  renderOutputAsMarkdown: isOutputMarkdown,
28735
28762
  kind: legacyState?.kind ?? fallbackKind,
@@ -28747,10 +28774,10 @@ var useAgentStream = ({
28747
28774
  const evtStatus = legacyState?.status;
28748
28775
  let status = tc.status;
28749
28776
  if (evtStatus === "executing")
28750
- status = "executing" /* Executing */;
28751
- else if (evtStatus === "error") status = "error" /* Error */;
28777
+ status = CoreToolCallStatus.Executing;
28778
+ else if (evtStatus === "error") status = CoreToolCallStatus.Error;
28752
28779
  else if (evtStatus === "success")
28753
- status = "success" /* Success */;
28780
+ status = CoreToolCallStatus.Success;
28754
28781
  const display = event.display?.result;
28755
28782
  const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
28756
28783
  const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
@@ -28783,7 +28810,7 @@ var useAgentStream = ({
28783
28810
  const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
28784
28811
  return {
28785
28812
  ...tc,
28786
- status: event.isError ? "error" /* Error */ : "success" /* Success */,
28813
+ status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
28787
28814
  display: event.display ? { ...tc.display, ...event.display } : tc.display,
28788
28815
  resultDisplay,
28789
28816
  outputFile
@@ -28849,7 +28876,7 @@ var useAgentStream = ({
28849
28876
  if (!options?.isContinuation) {
28850
28877
  if (typeof query === "string") {
28851
28878
  addItem({ type: "user" /* USER */, text: query }, timestamp);
28852
- void logger?.logMessage("user" /* USER */, query);
28879
+ void logger?.logMessage(MessageSenderType.USER, query);
28853
28880
  }
28854
28881
  startNewPrompt();
28855
28882
  }
@@ -30275,6 +30302,7 @@ var useLoadingIndicator = ({
30275
30302
  return {
30276
30303
  elapsedTime: streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ ? retainedElapsedTime : elapsedTimeFromTimer,
30277
30304
  currentLoadingPhrase: retryPhrase || currentTip || currentWittyPhrase,
30305
+ statusPhrase: retryPhrase ?? void 0,
30278
30306
  currentTip,
30279
30307
  currentWittyPhrase
30280
30308
  };
@@ -30376,9 +30404,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30376
30404
  const handleFolderTrustSelect = (0, import_react103.useCallback)(
30377
30405
  async (choice) => {
30378
30406
  const trustLevelMap = {
30379
- ["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
30380
- ["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
30381
- ["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
30407
+ ["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
30408
+ ["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
30409
+ ["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
30382
30410
  };
30383
30411
  const trustLevel = trustLevelMap[choice];
30384
30412
  if (!trustLevel) return;
@@ -30397,7 +30425,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
30397
30425
  }, 100);
30398
30426
  return;
30399
30427
  }
30400
- const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
30428
+ const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
30401
30429
  onTrustChange(currentIsTrusted);
30402
30430
  setIsTrusted(currentIsTrusted);
30403
30431
  const wasTrusted = isTrusted ?? false;
@@ -31405,7 +31433,7 @@ function useMessageQueue({
31405
31433
  var import_react105 = __toESM(require_react(), 1);
31406
31434
  function useMcpStatus(config) {
31407
31435
  const [discoveryState, setDiscoveryState] = (0, import_react105.useState)(
31408
- () => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
31436
+ () => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
31409
31437
  );
31410
31438
  const [mcpServerCount, setMcpServerCount] = (0, import_react105.useState)(
31411
31439
  () => config.getMcpClientManager()?.getMcpServerCount() ?? 0
@@ -31418,12 +31446,12 @@ function useMcpStatus(config) {
31418
31446
  setMcpServerCount(manager.getMcpServerCount());
31419
31447
  }
31420
31448
  };
31421
- coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
31449
+ coreEvents.on(CoreEvent.McpClientUpdate, onChange);
31422
31450
  return () => {
31423
- coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
31451
+ coreEvents.off(CoreEvent.McpClientUpdate, onChange);
31424
31452
  };
31425
31453
  }, [config]);
31426
- const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
31454
+ const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
31427
31455
  return {
31428
31456
  discoveryState,
31429
31457
  mcpServerCount,
@@ -31450,7 +31478,7 @@ function useApprovalModeIndicator({
31450
31478
  (key) => {
31451
31479
  let nextApprovalMode;
31452
31480
  if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
31453
- if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
31481
+ if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
31454
31482
  if (addItem) {
31455
31483
  let text = "You cannot enter YOLO mode since it is disabled in your settings.";
31456
31484
  const adminSettings = config.getRemoteAdminSettings();
@@ -31468,21 +31496,21 @@ function useApprovalModeIndicator({
31468
31496
  }
31469
31497
  return;
31470
31498
  }
31471
- nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
31499
+ nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
31472
31500
  } else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
31473
31501
  const currentMode = config.getApprovalMode();
31474
31502
  switch (currentMode) {
31475
- case "default" /* DEFAULT */:
31476
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31503
+ case ApprovalMode.DEFAULT:
31504
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31477
31505
  break;
31478
- case "autoEdit" /* AUTO_EDIT */:
31479
- nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
31506
+ case ApprovalMode.AUTO_EDIT:
31507
+ nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
31480
31508
  break;
31481
- case "plan" /* PLAN */:
31482
- nextApprovalMode = "default" /* DEFAULT */;
31509
+ case ApprovalMode.PLAN:
31510
+ nextApprovalMode = ApprovalMode.DEFAULT;
31483
31511
  break;
31484
- case "yolo" /* YOLO */:
31485
- nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
31512
+ case ApprovalMode.YOLO:
31513
+ nextApprovalMode = ApprovalMode.AUTO_EDIT;
31486
31514
  break;
31487
31515
  default:
31488
31516
  }
@@ -31892,11 +31920,11 @@ var useHookDisplayState = () => {
31892
31920
  removeHook();
31893
31921
  }
31894
31922
  };
31895
- coreEvents.on("hook-start" /* HookStart */, handleHookStart);
31896
- coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
31923
+ coreEvents.on(CoreEvent.HookStart, handleHookStart);
31924
+ coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
31897
31925
  return () => {
31898
- coreEvents.off("hook-start" /* HookStart */, handleHookStart);
31899
- coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
31926
+ coreEvents.off(CoreEvent.HookStart, handleHookStart);
31927
+ coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
31900
31928
  activeTimeouts.forEach(clearTimeout);
31901
31929
  activeTimeouts.clear();
31902
31930
  };
@@ -32735,7 +32763,7 @@ var AppContainer = (props) => {
32735
32763
  setConfigInitialized(true);
32736
32764
  startupProfiler.flush(config);
32737
32765
  startAutoMemoryIfEnabled(config);
32738
- const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
32766
+ const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
32739
32767
  const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
32740
32768
  if (result) {
32741
32769
  const additionalContext = result.getAdditionalContext();
@@ -32762,7 +32790,7 @@ var AppContainer = (props) => {
32762
32790
  );
32763
32791
  const ideClient = await IdeClient.getInstance();
32764
32792
  await ideClient.disconnect();
32765
- await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
32793
+ await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
32766
32794
  };
32767
32795
  registerCleanup(cleanupFn);
32768
32796
  return () => {
@@ -32787,11 +32815,11 @@ var AppContainer = (props) => {
32787
32815
  resetTime: payload.resetTime
32788
32816
  });
32789
32817
  };
32790
- coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
32791
- coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32818
+ coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
32819
+ coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
32792
32820
  return () => {
32793
- coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
32794
- coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
32821
+ coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
32822
+ coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
32795
32823
  };
32796
32824
  }, [config]);
32797
32825
  (0, import_react119.useEffect)(() => {
@@ -32804,16 +32832,16 @@ var AppContainer = (props) => {
32804
32832
  const handleAgentsDiscovered = (payload) => {
32805
32833
  setNewAgents(payload.agents);
32806
32834
  };
32807
- coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32808
- coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
32809
- coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32835
+ coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
32836
+ coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
32837
+ coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32810
32838
  return () => {
32811
- coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
32839
+ coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
32812
32840
  coreEvents.off(
32813
- "admin-settings-changed" /* AdminSettingsChanged */,
32841
+ CoreEvent.AdminSettingsChanged,
32814
32842
  handleAdminSettingsChanged
32815
32843
  );
32816
- coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
32844
+ coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
32817
32845
  };
32818
32846
  }, [settings]);
32819
32847
  const { errorCount, clearErrorCount } = useErrorCount();
@@ -32880,11 +32908,11 @@ var AppContainer = (props) => {
32880
32908
  exitEditorDialog
32881
32909
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
32882
32910
  (0, import_react119.useEffect)(() => {
32883
- coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32884
- coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32911
+ coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
32912
+ coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
32885
32913
  return () => {
32886
- coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
32887
- coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
32914
+ coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
32915
+ coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
32888
32916
  };
32889
32917
  }, [handleEditorClose, openEditorDialog]);
32890
32918
  (0, import_react119.useEffect)(() => {
@@ -32952,7 +32980,7 @@ var AppContainer = (props) => {
32952
32980
  errorVerbosity: settings.merged.ui.errorVerbosity
32953
32981
  });
32954
32982
  const isAuthDialogOpen = authState === "updating" /* Updating */;
32955
- const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
32983
+ const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
32956
32984
  const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
32957
32985
  const { loadHistoryForResume, isResuming } = useSessionResume({
32958
32986
  config,
@@ -32980,7 +33008,7 @@ var AppContainer = (props) => {
32980
33008
  async (authType, scope) => {
32981
33009
  if (authType) {
32982
33010
  const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
32983
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
33011
+ if (authType === AuthType.LOGIN_WITH_GOOGLE) {
32984
33012
  setAuthContext({ requiresRestart: true });
32985
33013
  } else {
32986
33014
  setAuthContext({});
@@ -33008,7 +33036,7 @@ var AppContainer = (props) => {
33008
33036
  );
33009
33037
  return;
33010
33038
  }
33011
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
33039
+ if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
33012
33040
  writeToStdout(`
33013
33041
  ----------------------------------------------------------------
33014
33042
  Logging in with Google... Restarting Gemini CLI to continue.
@@ -33031,7 +33059,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
33031
33059
  }
33032
33060
  await saveApiKey(apiKey);
33033
33061
  await reloadApiKey();
33034
- await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
33062
+ await config.refreshAuth(AuthType.USE_GEMINI);
33035
33063
  setAuthState("authenticated" /* Authenticated */);
33036
33064
  } catch (e) {
33037
33065
  onAuthError(
@@ -33056,7 +33084,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
33056
33084
  `Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
33057
33085
  );
33058
33086
  } else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
33059
- if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
33087
+ if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
33060
33088
  return;
33061
33089
  }
33062
33090
  const authMethod = settings.merged.security.auth.selectedType;
@@ -33192,9 +33220,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
33192
33220
  }
33193
33221
  });
33194
33222
  };
33195
- coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
33223
+ coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
33196
33224
  return () => {
33197
- coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
33225
+ coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
33198
33226
  };
33199
33227
  }, []);
33200
33228
  const performMemoryRefresh = (0, import_react119.useCallback)(async () => {
@@ -33852,7 +33880,7 @@ ${queuedText}` : queuedText;
33852
33880
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
33853
33881
  if (settings.merged.general.devtools) {
33854
33882
  void (async () => {
33855
- const { toggleDevToolsPanel } = await import("./devtoolsService-FYN3P465.js");
33883
+ const { toggleDevToolsPanel } = await import("./devtoolsService-REQSIEPU.js");
33856
33884
  await toggleDevToolsPanel(
33857
33885
  config,
33858
33886
  showErrorDetails,
@@ -34070,17 +34098,17 @@ ${queuedText}` : queuedText;
34070
34098
  Date.now()
34071
34099
  );
34072
34100
  };
34073
- coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
34074
- coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34101
+ coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
34102
+ coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
34075
34103
  coreEvents.drainBacklogs();
34076
34104
  return () => {
34077
- coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
34078
- coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
34105
+ coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
34106
+ coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
34079
34107
  };
34080
34108
  }, [historyManager]);
34081
34109
  const nightly = props.version.includes("nightly");
34082
34110
  const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
34083
- 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;
34111
+ 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;
34084
34112
  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;
34085
34113
  const hasPendingToolConfirmation = (0, import_react119.useMemo)(
34086
34114
  () => isToolAwaitingConfirmation(pendingHistoryItems),
@@ -34107,7 +34135,13 @@ ${queuedText}` : queuedText;
34107
34135
  estimatedStatusLength = 35;
34108
34136
  }
34109
34137
  const maxLength = terminalWidth - estimatedStatusLength - 5;
34110
- const { elapsedTime, currentLoadingPhrase, currentTip, currentWittyPhrase } = useLoadingIndicator({
34138
+ const {
34139
+ elapsedTime,
34140
+ currentLoadingPhrase,
34141
+ statusPhrase,
34142
+ currentTip,
34143
+ currentWittyPhrase
34144
+ } = useLoadingIndicator({
34111
34145
  streamingState,
34112
34146
  shouldShowFocusHint,
34113
34147
  retryStatus,
@@ -34180,9 +34214,9 @@ ${queuedText}` : queuedText;
34180
34214
  const handleMemoryChanged = (result) => {
34181
34215
  setGeminiMdFileCount(result.fileCount);
34182
34216
  };
34183
- coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34217
+ coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
34184
34218
  return () => {
34185
- coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
34219
+ coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
34186
34220
  };
34187
34221
  }, []);
34188
34222
  (0, import_react119.useEffect)(() => {
@@ -34308,6 +34342,7 @@ ${queuedText}` : queuedText;
34308
34342
  isFocused,
34309
34343
  elapsedTime,
34310
34344
  currentLoadingPhrase,
34345
+ statusPhrase,
34311
34346
  currentTip,
34312
34347
  currentWittyPhrase,
34313
34348
  historyRemountKey,
@@ -34419,6 +34454,7 @@ ${queuedText}` : queuedText;
34419
34454
  isFocused,
34420
34455
  elapsedTime,
34421
34456
  currentLoadingPhrase,
34457
+ statusPhrase,
34422
34458
  currentTip,
34423
34459
  currentWittyPhrase,
34424
34460
  historyRemountKey,