@google/gemini-cli 0.41.0-preview.1 → 0.42.0-nightly.20260501.gcaa046641

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 (93) hide show
  1. package/bundle/{chunk-36LZQV4W.js → chunk-2HOG45IA.js} +1047 -1240
  2. package/bundle/{chunk-NGB7ZVQL.js → chunk-2WK6K7H4.js} +67 -507
  3. package/bundle/{chunk-DOHALVIP.js → chunk-3Y7ZPPS2.js} +1047 -1240
  4. package/bundle/chunk-4SBF4FWA.js +512 -0
  5. package/bundle/{chunk-XRLFHCHC.js → chunk-533APETE.js} +30 -12
  6. package/bundle/{chunk-T5I4M6M4.js → chunk-747IFMEA.js} +3 -3
  7. package/bundle/chunk-CTSXRP2T.js +512 -0
  8. package/bundle/{chunk-DCHOW6BK.js → chunk-CVJABGPV.js} +2 -2
  9. package/bundle/{chunk-VWYB6GSK.js → chunk-DDX3KSOF.js} +67 -507
  10. package/bundle/{chunk-DAEE6Y5T.js → chunk-EGV36KAI.js} +1047 -1240
  11. package/bundle/chunk-ESRGVL52.js +512 -0
  12. package/bundle/{chunk-SAJ72M2G.js → chunk-FABHOVMY.js} +23 -7
  13. package/bundle/chunk-FNLKMX3W.js +391 -0
  14. package/bundle/chunk-FTIY7CSS.js +391 -0
  15. package/bundle/{chunk-C5CRFFTY.js → chunk-GXIITUGM.js} +1 -1
  16. package/bundle/{chunk-45OGXTFK.js → chunk-HIYYW6PF.js} +3 -3
  17. package/bundle/chunk-IDYSRNE5.js +511 -0
  18. package/bundle/{chunk-QRSHDIRX.js → chunk-IJA7QQHF.js} +1 -1
  19. package/bundle/{chunk-U6WUS35U.js → chunk-ILECTCCH.js} +2 -2
  20. package/bundle/{chunk-R4LSW45D.js → chunk-J44J2AAV.js} +1 -1
  21. package/bundle/{chunk-KCDF3RDO.js → chunk-JPGLBVDA.js} +3 -3
  22. package/bundle/{chunk-VJ6K3S57.js → chunk-K5CA5JX2.js} +2 -2
  23. package/bundle/{chunk-6NFVEILC.js → chunk-L6URBAMF.js} +262 -81
  24. package/bundle/{chunk-5Z2T77EB.js → chunk-NNAHWZGK.js} +66 -507
  25. package/bundle/{chunk-KJ4M7JXR.js → chunk-SFDJ7FIE.js} +2 -2
  26. package/bundle/{chunk-QY23ZEK3.js → chunk-SYZNFSS3.js} +262 -81
  27. package/bundle/chunk-TBIPLAJP.js +391 -0
  28. package/bundle/{chunk-FFVUMIL3.js → chunk-TMQACI5N.js} +1047 -1240
  29. package/bundle/{chunk-XO6NKGWV.js → chunk-UCTXAZT6.js} +262 -81
  30. package/bundle/{chunk-VLSVN2FJ.js → chunk-USFRINC4.js} +1 -1
  31. package/bundle/chunk-VJOUKBFO.js +391 -0
  32. package/bundle/{chunk-EQSLZT5Z.js → chunk-VUMF52YD.js} +271 -81
  33. package/bundle/{chunk-5QI3ZXQB.js → chunk-WGWUS5AF.js} +67 -507
  34. package/bundle/{chunk-TBBDQEFQ.js → chunk-WTLXL6OZ.js} +3 -3
  35. package/bundle/{cleanup-3COTQVPP.js → cleanup-GQXJGC2H.js} +3 -3
  36. package/bundle/{cleanup-FIE6MCAE.js → cleanup-OSSEOJVY.js} +3 -3
  37. package/bundle/{cleanup-PREOBLFK.js → cleanup-TDBASRR5.js} +3 -3
  38. package/bundle/{cleanup-YY2EUT56.js → cleanup-XLWNSNLT.js} +3 -3
  39. package/bundle/{core-GZOFEER4.js → core-JH4LXS4F.js} +8 -2
  40. package/bundle/{devtoolsService-QXOHXSMJ.js → devtoolsService-DFWZ34A5.js} +3 -3
  41. package/bundle/{devtoolsService-DV36S632.js → devtoolsService-KZLK5WRW.js} +3 -3
  42. package/bundle/{devtoolsService-JPBL5I7F.js → devtoolsService-XIWMIEMB.js} +3 -3
  43. package/bundle/{devtoolsService-M4LZEBZD.js → devtoolsService-ZV5MJUBY.js} +3 -3
  44. package/bundle/{dist-HASTHPE3.js → dist-ATBEVH4R.js} +8 -2
  45. package/bundle/{dist-JVRDP7SO.js → dist-BOCIGIGG.js} +8 -2
  46. package/bundle/{dist-NSJ6AA4L.js → dist-TDGPCKNF.js} +8 -2
  47. package/bundle/docs/changelogs/index.md +18 -0
  48. package/bundle/docs/changelogs/latest.md +167 -242
  49. package/bundle/docs/changelogs/preview.md +99 -385
  50. package/bundle/docs/cli/cli-reference.md +1 -0
  51. package/bundle/docs/cli/creating-skills.md +165 -38
  52. package/bundle/docs/cli/custom-commands.md +1 -0
  53. package/bundle/docs/cli/model-routing.md +3 -3
  54. package/bundle/docs/cli/plan-mode.md +2 -1
  55. package/bundle/docs/cli/skills-best-practices.md +78 -0
  56. package/bundle/docs/cli/skills.md +98 -93
  57. package/bundle/docs/cli/tutorials/session-management.md +13 -0
  58. package/bundle/docs/cli/tutorials/skills-getting-started.md +140 -92
  59. package/bundle/docs/cli/using-agent-skills.md +89 -0
  60. package/bundle/docs/core/gemma-setup.md +83 -0
  61. package/bundle/docs/core/index.md +3 -2
  62. package/bundle/docs/core/local-model-routing.md +14 -7
  63. package/bundle/docs/reference/commands.md +14 -4
  64. package/bundle/docs/reference/configuration.md +76 -4
  65. package/bundle/docs/reference/keyboard-shortcuts.md +1 -1
  66. package/bundle/docs/reference/policy-engine.md +14 -3
  67. package/bundle/docs/sidebar.json +24 -2
  68. package/bundle/docs/tools/activate-skill.md +1 -1
  69. package/bundle/{gemini-IGRTXHCM.js → gemini-ETBA6M7V.js} +1067 -850
  70. package/bundle/{gemini-KIM7O55W.js → gemini-FUGMMZB7.js} +1067 -850
  71. package/bundle/{gemini-SFFHSCEY.js → gemini-QDNEMFTK.js} +1067 -850
  72. package/bundle/{gemini-FTUVOUHP.js → gemini-TZ26TZKD.js} +1067 -848
  73. package/bundle/gemini.js +20 -13
  74. package/bundle/{interactiveCli-LTPR447O.js → interactiveCli-74QXEIGP.js} +682 -609
  75. package/bundle/{interactiveCli-K4FIT7TA.js → interactiveCli-IBVICRF7.js} +682 -609
  76. package/bundle/{interactiveCli-7HPLINVC.js → interactiveCli-OKS4NPC7.js} +682 -609
  77. package/bundle/{interactiveCli-JOX7MFFH.js → interactiveCli-ZS4ZQWNV.js} +682 -609
  78. package/bundle/{liteRtServerManager-BENLLSF2.js → liteRtServerManager-I5CSGWRL.js} +5 -4
  79. package/bundle/{liteRtServerManager-KDO6UAQ5.js → liteRtServerManager-IDNLXYHP.js} +5 -4
  80. package/bundle/{liteRtServerManager-MQIQXXZQ.js → liteRtServerManager-J33F7APP.js} +5 -4
  81. package/bundle/{liteRtServerManager-VGYEHFUE.js → liteRtServerManager-RJF74BUI.js} +5 -4
  82. package/bundle/{memoryDiscovery-FN3IAPBT.js → memoryDiscovery-LIJKMASE.js} +1 -1
  83. package/bundle/{memoryDiscovery-R7PAR2NY.js → memoryDiscovery-WVH7QDNJ.js} +1 -1
  84. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  85. package/bundle/{oauth2-provider-JPCBTTS2.js → oauth2-provider-7UM3XCQ4.js} +2 -2
  86. package/bundle/{oauth2-provider-EWMNT6D6.js → oauth2-provider-BFW5HE2U.js} +2 -2
  87. package/bundle/{oauth2-provider-M3WV4GJM.js → oauth2-provider-LONBXYVY.js} +2 -2
  88. package/bundle/{oauth2-provider-UVXCM7G3.js → oauth2-provider-N65VILW5.js} +2 -2
  89. package/bundle/{start-4MSISK2E.js → start-3B4FNGNM.js} +7 -6
  90. package/bundle/{start-ATOE57Z4.js → start-3OM5OXD2.js} +7 -6
  91. package/bundle/{start-AVEON6UU.js → start-N3S3BSEF.js} +7 -6
  92. package/bundle/{start-KBB2UTE5.js → start-PLPHF43U.js} +7 -6
  93. package/package.json +1 -1
@@ -83,12 +83,10 @@ import {
83
83
  getTransformUnderCursor,
84
84
  getUsedStatusColor,
85
85
  handleAtCommand,
86
- handleAutoUpdate,
87
86
  isAtCommand,
88
87
  isAutoExecutableCommand,
89
88
  isBrowser,
90
89
  isContextUsageHigh,
91
- isDevelopment,
92
90
  isInSettingsScope,
93
91
  isNarrowWidth,
94
92
  isNewFile,
@@ -105,14 +103,12 @@ import {
105
103
  parseSlashCommand,
106
104
  persistentState,
107
105
  profiler,
108
- relaunchApp,
109
106
  renderDiffLines,
110
107
  render_default,
111
108
  requestConsentInteractive,
112
109
  require_jsx_runtime,
113
110
  require_semver,
114
111
  saveClipboardImage,
115
- setUpdateHandler,
116
112
  shouldSwitchTheme,
117
113
  startAutoMemoryIfEnabled,
118
114
  styledCharsWidth,
@@ -152,13 +148,13 @@ import {
152
148
  widestLineFromStyledChars,
153
149
  wordBreakStyledChars,
154
150
  wrapStyledChars
155
- } from "./chunk-DOHALVIP.js";
151
+ } from "./chunk-3Y7ZPPS2.js";
156
152
  import {
157
153
  appEvents
158
154
  } from "./chunk-5PS3AYFU.js";
159
155
  import {
160
156
  require_source
161
- } from "./chunk-VLSVN2FJ.js";
157
+ } from "./chunk-GXIITUGM.js";
162
158
  import {
163
159
  ACTIVE_SHELL_MAX_LINES,
164
160
  COMPACT_TOOL_SUBVIEW_MAX_LINES,
@@ -198,26 +194,34 @@ import {
198
194
  getSessionFiles,
199
195
  interpolateColor,
200
196
  isLoadableSettingScope,
201
- isTodoList,
202
197
  isWorkspaceTrusted,
203
198
  loadTrustedFolders,
204
- mapCoreStatusToDisplayStatus,
205
199
  normalizeEscapedNewlines,
206
200
  pickDefaultThemeName,
207
- require_react,
208
201
  require_tinygradient,
209
202
  resolveColor,
210
203
  sanitizeForDisplay,
211
204
  stringWidth,
212
205
  stripUnsafeCharacters,
213
206
  toCodePoints
214
- } from "./chunk-5Z2T77EB.js";
207
+ } from "./chunk-NNAHWZGK.js";
208
+ import {
209
+ handleAutoUpdate,
210
+ isDevelopment,
211
+ relaunchApp,
212
+ setUpdateHandler
213
+ } from "./chunk-FNLKMX3W.js";
214
+ import {
215
+ isTodoList,
216
+ mapCoreStatusToDisplayStatus,
217
+ require_react
218
+ } from "./chunk-IDYSRNE5.js";
215
219
  import {
216
220
  registerCleanup,
217
221
  removeCleanup,
218
222
  runExitCleanup,
219
223
  setupTtyCheck
220
- } from "./chunk-DCHOW6BK.js";
224
+ } from "./chunk-SFDJ7FIE.js";
221
225
  import {
222
226
  ApiKeyUpdatedEvent,
223
227
  AsyncFzf,
@@ -244,6 +248,7 @@ import {
244
248
  OverageOptionSelectedEvent,
245
249
  PolicyIntegrityManager,
246
250
  ProjectIdRequiredError,
251
+ RELEASE_CHANNEL_STABILITY,
247
252
  ROOT_SCHEDULER_ID,
248
253
  Scheduler,
249
254
  ShellExecutionService,
@@ -278,6 +283,7 @@ import {
278
283
  geminiPartsToContentParts,
279
284
  generateSummary,
280
285
  getAdminErrorMessage,
286
+ getChannelFromVersion,
281
287
  getCodeAssistServer,
282
288
  getEditorDisplayName,
283
289
  getG1CreditBalance,
@@ -338,7 +344,7 @@ import {
338
344
  validatePlanContent,
339
345
  validatePlanPath,
340
346
  writeToStdout
341
- } from "./chunk-EQSLZT5Z.js";
347
+ } from "./chunk-VUMF52YD.js";
342
348
  import {
343
349
  ACTIVATE_SKILL_TOOL_NAME,
344
350
  AGENT_TOOL_NAME,
@@ -398,7 +404,7 @@ import {
398
404
  safeJsonToMarkdown,
399
405
  shortenPath,
400
406
  tildeifyPath
401
- } from "./chunk-XRLFHCHC.js";
407
+ } from "./chunk-533APETE.js";
402
408
  import "./chunk-664ZODQF.js";
403
409
  import "./chunk-RJTRUG2J.js";
404
410
  import "./chunk-IUUIT4SU.js";
@@ -5820,7 +5826,8 @@ var ToolInfo = ({
5820
5826
  status: coreStatus,
5821
5827
  emphasis,
5822
5828
  progressMessage: _progressMessage,
5823
- originalRequestName
5829
+ originalRequestName,
5830
+ isExpanded = false
5824
5831
  }) => {
5825
5832
  const status = mapCoreStatusToDisplayStatus(coreStatus);
5826
5833
  const nameColor = import_react16.default.useMemo(() => {
@@ -5838,19 +5845,35 @@ var ToolInfo = ({
5838
5845
  }
5839
5846
  }, [emphasis]);
5840
5847
  const isCompletedAskUser = isCompletedAskUserTool(name, status);
5841
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { overflow: "hidden", height: 1, flexGrow: 1, flexShrink: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { strikethrough: status === "Canceled" /* Canceled */, wrap: "truncate", children: [
5842
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: nameColor, bold: true, children: name }),
5843
- originalRequestName && originalRequestName !== name && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: theme.text.secondary, italic: true, children: [
5844
- " ",
5845
- "(redirection from ",
5846
- originalRequestName,
5847
- ")"
5848
- ] }),
5849
- !isCompletedAskUser && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5850
- " ",
5851
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: theme.text.secondary, children: description })
5852
- ] })
5853
- ] }) });
5848
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5849
+ Box_default,
5850
+ {
5851
+ overflow: "hidden",
5852
+ height: isExpanded ? void 0 : 1,
5853
+ flexGrow: 1,
5854
+ flexShrink: 1,
5855
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5856
+ Text,
5857
+ {
5858
+ strikethrough: status === "Canceled" /* Canceled */,
5859
+ wrap: isExpanded ? "wrap" : "truncate",
5860
+ children: [
5861
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: nameColor, bold: true, children: name }),
5862
+ originalRequestName && originalRequestName !== name && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: theme.text.secondary, italic: true, children: [
5863
+ " ",
5864
+ "(redirection from ",
5865
+ originalRequestName,
5866
+ ")"
5867
+ ] }),
5868
+ !isCompletedAskUser && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5869
+ " ",
5870
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: theme.text.secondary, children: description })
5871
+ ] })
5872
+ ]
5873
+ }
5874
+ )
5875
+ }
5876
+ );
5854
5877
  };
5855
5878
  var McpProgressIndicator = ({
5856
5879
  progress,
@@ -6276,14 +6299,121 @@ var ShellInputPrompt = ({
6276
6299
  return null;
6277
6300
  };
6278
6301
 
6302
+ // packages/cli/src/ui/contexts/ToolActionsContext.tsx
6303
+ var import_react19 = __toESM(require_react(), 1);
6304
+ var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
6305
+ function hasLegacyCallback(details) {
6306
+ return !!details && "onConfirm" in details && typeof details.onConfirm === "function";
6307
+ }
6308
+ var ToolActionsContext = (0, import_react19.createContext)(null);
6309
+ var useToolActions = () => {
6310
+ const context = (0, import_react19.useContext)(ToolActionsContext);
6311
+ if (!context) {
6312
+ throw new Error("useToolActions must be used within a ToolActionsProvider");
6313
+ }
6314
+ return context;
6315
+ };
6316
+ var ToolActionsProvider = (props) => {
6317
+ const {
6318
+ children,
6319
+ config,
6320
+ toolCalls,
6321
+ isExpanded,
6322
+ toggleExpansion,
6323
+ toggleAllExpansion
6324
+ } = props;
6325
+ const [ideClient, setIdeClient] = (0, import_react19.useState)(null);
6326
+ const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react19.useState)(false);
6327
+ (0, import_react19.useEffect)(() => {
6328
+ let isMounted = true;
6329
+ let activeClient = null;
6330
+ const handleStatusChange = () => {
6331
+ if (isMounted && activeClient) {
6332
+ setIsDiffingEnabled(activeClient.isDiffingEnabled());
6333
+ }
6334
+ };
6335
+ if (config.getIdeMode()) {
6336
+ IdeClient.getInstance().then((client) => {
6337
+ if (!isMounted) return;
6338
+ activeClient = client;
6339
+ setIdeClient(client);
6340
+ setIsDiffingEnabled(client.isDiffingEnabled());
6341
+ client.addStatusChangeListener(handleStatusChange);
6342
+ }).catch((error) => {
6343
+ debugLogger.error("Failed to get IdeClient instance:", error);
6344
+ });
6345
+ }
6346
+ return () => {
6347
+ isMounted = false;
6348
+ if (activeClient) {
6349
+ activeClient.removeStatusChangeListener(handleStatusChange);
6350
+ }
6351
+ };
6352
+ }, [config]);
6353
+ const confirm = (0, import_react19.useCallback)(
6354
+ async (callId, outcome, payload) => {
6355
+ const tool = toolCalls.find((t) => t.callId === callId);
6356
+ if (!tool) {
6357
+ debugLogger.warn(`ToolActions: Tool ${callId} not found`);
6358
+ return;
6359
+ }
6360
+ const details = tool.confirmationDetails;
6361
+ if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
6362
+ const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
6363
+ await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
6364
+ }
6365
+ if (tool.correlationId) {
6366
+ await config.getMessageBus().publish({
6367
+ type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
6368
+ correlationId: tool.correlationId,
6369
+ confirmed: outcome !== "cancel" /* Cancel */,
6370
+ requiresUserConfirmation: false,
6371
+ outcome,
6372
+ payload
6373
+ });
6374
+ return;
6375
+ }
6376
+ if (hasLegacyCallback(details)) {
6377
+ await details.onConfirm(outcome, payload);
6378
+ return;
6379
+ }
6380
+ debugLogger.warn(
6381
+ `ToolActions: No correlationId or callback for ${callId}`
6382
+ );
6383
+ },
6384
+ [config, ideClient, toolCalls, isDiffingEnabled]
6385
+ );
6386
+ const cancel = (0, import_react19.useCallback)(
6387
+ async (callId) => {
6388
+ await confirm(callId, "cancel" /* Cancel */);
6389
+ },
6390
+ [confirm]
6391
+ );
6392
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6393
+ ToolActionsContext.Provider,
6394
+ {
6395
+ value: {
6396
+ confirm,
6397
+ cancel,
6398
+ isDiffingEnabled,
6399
+ isExpanded,
6400
+ toggleExpansion,
6401
+ toggleAllExpansion
6402
+ },
6403
+ children
6404
+ }
6405
+ );
6406
+ };
6407
+
6279
6408
  // packages/cli/src/ui/components/messages/ToolMessage.tsx
6280
- var import_jsx_runtime20 = (
6409
+ var import_jsx_runtime21 = (
6281
6410
  // It is crucial we don't replace this <> with a Box because otherwise the
6282
6411
  // sticky header inside it would be sticky to that box rather than to the
6283
6412
  // parent component of this ToolMessage.
6284
6413
  __toESM(require_jsx_runtime(), 1)
6285
6414
  );
6286
6415
  var ToolMessage = ({
6416
+ callId,
6287
6417
  name,
6288
6418
  description,
6289
6419
  resultDisplay,
@@ -6305,6 +6435,8 @@ var ToolMessage = ({
6305
6435
  progress,
6306
6436
  progressTotal
6307
6437
  }) => {
6438
+ const { isExpanded: isExpandedInContext } = useToolActions();
6439
+ const isExpanded = (isExpandedInContext ? isExpandedInContext(callId) : false) || availableTerminalHeight === void 0;
6308
6440
  const isThisShellFocused2 = isThisShellFocused(
6309
6441
  name,
6310
6442
  status,
@@ -6318,8 +6450,8 @@ var ToolMessage = ({
6318
6450
  isThisShellFocused2,
6319
6451
  resultDisplay
6320
6452
  );
6321
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
6322
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6453
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
6454
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6323
6455
  StickyHeader,
6324
6456
  {
6325
6457
  width: terminalWidth,
@@ -6327,7 +6459,7 @@ var ToolMessage = ({
6327
6459
  borderColor,
6328
6460
  borderDimColor,
6329
6461
  children: [
6330
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6462
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6331
6463
  ToolStatusIndicator,
6332
6464
  {
6333
6465
  status,
@@ -6335,7 +6467,7 @@ var ToolMessage = ({
6335
6467
  isFocused: isThisShellFocused2
6336
6468
  }
6337
6469
  ),
6338
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6470
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6339
6471
  ToolInfo,
6340
6472
  {
6341
6473
  name,
@@ -6343,21 +6475,22 @@ var ToolMessage = ({
6343
6475
  description,
6344
6476
  emphasis,
6345
6477
  progressMessage,
6346
- originalRequestName
6478
+ originalRequestName,
6479
+ isExpanded
6347
6480
  }
6348
6481
  ),
6349
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6482
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6350
6483
  FocusHint,
6351
6484
  {
6352
6485
  shouldShowFocusHint,
6353
6486
  isThisShellFocused: isThisShellFocused2
6354
6487
  }
6355
6488
  ),
6356
- emphasis === "high" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TrailingIndicator, {})
6489
+ emphasis === "high" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TrailingIndicator, {})
6357
6490
  ]
6358
6491
  }
6359
6492
  ),
6360
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6493
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6361
6494
  Box_default,
6362
6495
  {
6363
6496
  width: terminalWidth,
@@ -6371,7 +6504,7 @@ var ToolMessage = ({
6371
6504
  paddingX: 1,
6372
6505
  flexDirection: "column",
6373
6506
  children: [
6374
- status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6507
+ status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6375
6508
  McpProgressIndicator,
6376
6509
  {
6377
6510
  progress,
@@ -6380,7 +6513,7 @@ var ToolMessage = ({
6380
6513
  barWidth: 20
6381
6514
  }
6382
6515
  ),
6383
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6516
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6384
6517
  ToolResultDisplay,
6385
6518
  {
6386
6519
  resultDisplay,
@@ -6392,7 +6525,7 @@ var ToolMessage = ({
6392
6525
  overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
6393
6526
  }
6394
6527
  ),
6395
- isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6528
+ isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6396
6529
  ShellInputPrompt,
6397
6530
  {
6398
6531
  activeShellPtyId: activeShellPtyId ?? null,
@@ -6406,13 +6539,13 @@ var ToolMessage = ({
6406
6539
  };
6407
6540
 
6408
6541
  // packages/cli/src/ui/components/messages/ShellToolMessage.tsx
6409
- var import_react23 = __toESM(require_react(), 1);
6542
+ var import_react24 = __toESM(require_react(), 1);
6410
6543
 
6411
6544
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
6412
- var import_react22 = __toESM(require_react(), 1);
6545
+ var import_react23 = __toESM(require_react(), 1);
6413
6546
 
6414
6547
  // packages/cli/src/ui/IdeIntegrationNudge.tsx
6415
- var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
6548
+ var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
6416
6549
  function IdeIntegrationNudge({
6417
6550
  ide,
6418
6551
  onComplete
@@ -6459,7 +6592,7 @@ function IdeIntegrationNudge({
6459
6592
  }
6460
6593
  ];
6461
6594
  const installText = isExtensionPreInstalled ? `If you select Yes, the CLI will have access to your open files and display diffs directly in ${ideName ?? "your editor"}.` : `If you select Yes, we'll install an extension that allows the CLI to access your open files and display diffs directly in ${ideName ?? "your editor"}.`;
6462
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6595
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
6463
6596
  Box_default,
6464
6597
  {
6465
6598
  flexDirection: "column",
@@ -6469,26 +6602,26 @@ function IdeIntegrationNudge({
6469
6602
  width: "100%",
6470
6603
  marginLeft: 1,
6471
6604
  children: [
6472
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
6473
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { children: [
6474
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.status.warning, children: "> " }),
6605
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
6606
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { children: [
6607
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.status.warning, children: "> " }),
6475
6608
  `Do you want to connect ${ideName ?? "your editor"} to Gemini CLI?`
6476
6609
  ] }),
6477
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: theme.text.secondary, children: installText })
6610
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, children: installText })
6478
6611
  ] }),
6479
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
6612
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
6480
6613
  ]
6481
6614
  }
6482
6615
  );
6483
6616
  }
6484
6617
 
6485
6618
  // packages/cli/src/ui/components/FolderTrustDialog.tsx
6486
- var import_react19 = __toESM(require_react(), 1);
6619
+ var import_react20 = __toESM(require_react(), 1);
6487
6620
  import * as process2 from "node:process";
6488
6621
  import * as path from "node:path";
6489
6622
 
6490
6623
  // packages/cli/src/ui/components/ShowMoreLines.tsx
6491
- var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
6624
+ var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
6492
6625
  var ShowMoreLines = ({
6493
6626
  constrainHeight,
6494
6627
  isOverflowing: isOverflowingProp
@@ -6499,21 +6632,21 @@ var ShowMoreLines = ({
6499
6632
  if (!isOverflowing || !constrainHeight || !(streamingState === "idle" /* Idle */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ || streamingState === "responding" /* Responding */)) {
6500
6633
  return null;
6501
6634
  }
6502
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { paddingX: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.accent, wrap: "truncate", children: "Press Ctrl+O to show more lines" }) });
6635
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { paddingX: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme.text.accent, wrap: "truncate", children: "Press Ctrl+O to show more lines" }) });
6503
6636
  };
6504
6637
 
6505
6638
  // packages/cli/src/ui/components/FolderTrustDialog.tsx
6506
- var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
6639
+ var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
6507
6640
  var FolderTrustDialog = ({
6508
6641
  onSelect,
6509
6642
  isRestarting,
6510
6643
  discoveryResults
6511
6644
  }) => {
6512
- const [exiting, setExiting] = (0, import_react19.useState)(false);
6645
+ const [exiting, setExiting] = (0, import_react20.useState)(false);
6513
6646
  const { terminalHeight, terminalWidth, constrainHeight } = useUIState();
6514
6647
  const isAlternateBuffer = useAlternateBuffer();
6515
6648
  const isExpanded = !constrainHeight;
6516
- (0, import_react19.useEffect)(() => {
6649
+ (0, import_react20.useEffect)(() => {
6517
6650
  let timer;
6518
6651
  if (isRestarting) {
6519
6652
  timer = setTimeout(relaunchApp, 250);
@@ -6522,7 +6655,7 @@ var FolderTrustDialog = ({
6522
6655
  if (timer) clearTimeout(timer);
6523
6656
  };
6524
6657
  }, [isRestarting]);
6525
- const handleExit = (0, import_react19.useCallback)(() => {
6658
+ const handleExit = (0, import_react20.useCallback)(() => {
6526
6659
  setExiting(true);
6527
6660
  setTimeout(async () => {
6528
6661
  await runExitCleanup();
@@ -6573,41 +6706,41 @@ var FolderTrustDialog = ({
6573
6706
  { label: "Agents", items: discoveryResults?.agents ?? [] },
6574
6707
  { label: "Setting overrides", items: discoveryResults?.settings ?? [] }
6575
6708
  ].filter((g) => g.items.length > 0);
6576
- const discoveryContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", children: [
6577
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme.text.primary, children: "Trusting a folder allows Gemini CLI to load its local configurations, including custom commands, hooks, MCP servers, agent skills, and settings. These configurations could execute code on your behalf or change the behavior of the CLI." }) }),
6578
- hasErrors && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
6579
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme.status.error, bold: true, children: "\u274C Discovery Errors:" }),
6580
- discoveryResults.discoveryErrors.map((error, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme.status.error, children: [
6709
+ const discoveryContent = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", children: [
6710
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: "Trusting a folder allows Gemini CLI to load its local configurations, including custom commands, hooks, MCP servers, agent skills, and settings. These configurations could execute code on your behalf or change the behavior of the CLI." }) }),
6711
+ hasErrors && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
6712
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.error, bold: true, children: "\u274C Discovery Errors:" }),
6713
+ discoveryResults.discoveryErrors.map((error, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.status.error, children: [
6581
6714
  "\u2022 ",
6582
6715
  stripAnsi(error)
6583
6716
  ] }) }, i))
6584
6717
  ] }),
6585
- hasWarnings && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
6586
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme.status.warning, bold: true, children: "\u26A0\uFE0F Security Warnings:" }),
6587
- discoveryResults.securityWarnings.map((warning, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme.status.warning, children: [
6718
+ hasWarnings && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
6719
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, bold: true, children: "\u26A0\uFE0F Security Warnings:" }),
6720
+ discoveryResults.securityWarnings.map((warning, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.status.warning, children: [
6588
6721
  "\u2022 ",
6589
6722
  stripAnsi(warning)
6590
6723
  ] }) }, i))
6591
6724
  ] }),
6592
- hasDiscovery && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
6593
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme.text.primary, bold: true, children: "This folder contains:" }),
6594
- groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
6595
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme.text.primary, bold: true, children: [
6725
+ hasDiscovery && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
6726
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, bold: true, children: "This folder contains:" }),
6727
+ groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
6728
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.primary, bold: true, children: [
6596
6729
  "\u2022 ",
6597
6730
  group.label,
6598
6731
  " (",
6599
6732
  group.items.length,
6600
6733
  "):"
6601
6734
  ] }),
6602
- group.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme.text.primary, children: [
6735
+ group.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.primary, children: [
6603
6736
  "- ",
6604
6737
  stripAnsi(item)
6605
6738
  ] }) }, idx))
6606
6739
  ] }, group.label))
6607
6740
  ] })
6608
6741
  ] });
6609
- const title = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { bold: true, color: theme.text.primary, children: "Do you trust the files in this folder?" });
6610
- const selectOptions = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
6742
+ const title = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { bold: true, color: theme.text.primary, children: "Do you trust the files in this folder?" });
6743
+ const selectOptions = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
6611
6744
  RadioButtonSelect,
6612
6745
  {
6613
6746
  items: options,
@@ -6617,8 +6750,8 @@ var FolderTrustDialog = ({
6617
6750
  );
6618
6751
  const renderContent = () => {
6619
6752
  if (isAlternateBuffer) {
6620
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", width: dialogWidth, children: [
6621
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
6753
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", width: dialogWidth, children: [
6754
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
6622
6755
  StickyHeader,
6623
6756
  {
6624
6757
  width: dialogWidth,
@@ -6628,7 +6761,7 @@ var FolderTrustDialog = ({
6628
6761
  children: title
6629
6762
  }
6630
6763
  ),
6631
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
6764
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
6632
6765
  Box_default,
6633
6766
  {
6634
6767
  flexDirection: "column",
@@ -6640,20 +6773,20 @@ var FolderTrustDialog = ({
6640
6773
  borderBottom: false,
6641
6774
  width: dialogWidth,
6642
6775
  children: [
6643
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
6776
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
6644
6777
  Scrollable,
6645
6778
  {
6646
6779
  hasFocus: !isRestarting,
6647
6780
  height: scrollableHeight,
6648
6781
  width: dialogWidth - 2,
6649
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { flexDirection: "column", paddingX: 1, children: discoveryContent })
6782
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { flexDirection: "column", paddingX: 1, children: discoveryContent })
6650
6783
  }
6651
6784
  ),
6652
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { paddingX: 1, marginY: 1, children: selectOptions })
6785
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { paddingX: 1, marginY: 1, children: selectOptions })
6653
6786
  ]
6654
6787
  }
6655
6788
  ),
6656
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
6789
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
6657
6790
  Box_default,
6658
6791
  {
6659
6792
  height: 0,
@@ -6668,7 +6801,7 @@ var FolderTrustDialog = ({
6668
6801
  )
6669
6802
  ] });
6670
6803
  }
6671
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
6804
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
6672
6805
  Box_default,
6673
6806
  {
6674
6807
  flexDirection: "column",
@@ -6677,8 +6810,8 @@ var FolderTrustDialog = ({
6677
6810
  padding: 1,
6678
6811
  width: "100%",
6679
6812
  children: [
6680
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { marginBottom: 1, children: title }),
6681
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
6813
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginBottom: 1, children: title }),
6814
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
6682
6815
  MaxSizedBox,
6683
6816
  {
6684
6817
  maxHeight: isExpanded ? void 0 : Math.max(4, terminalHeight - 12),
@@ -6686,18 +6819,18 @@ var FolderTrustDialog = ({
6686
6819
  children: discoveryContent
6687
6820
  }
6688
6821
  ),
6689
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { marginTop: 1, children: selectOptions })
6822
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginTop: 1, children: selectOptions })
6690
6823
  ]
6691
6824
  }
6692
6825
  );
6693
6826
  };
6694
- const content = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
6695
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { flexDirection: "column", marginLeft: 1, marginRight: 1, children: renderContent() }),
6696
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { paddingX: 2, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ShowMoreLines, { constrainHeight }) }),
6697
- isRestarting && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme.status.warning, children: "Gemini CLI is restarting to apply the trust changes..." }) }),
6698
- exiting && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme.status.warning, children: "A folder trust level must be selected to continue. Exiting since escape was pressed." }) })
6827
+ const content = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
6828
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { flexDirection: "column", marginLeft: 1, marginRight: 1, children: renderContent() }),
6829
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { paddingX: 2, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ShowMoreLines, { constrainHeight }) }),
6830
+ isRestarting && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "Gemini CLI is restarting to apply the trust changes..." }) }),
6831
+ exiting && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "A folder trust level must be selected to continue. Exiting since escape was pressed." }) })
6699
6832
  ] });
6700
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(OverflowProvider, { children: content });
6833
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(OverflowProvider, { children: content });
6701
6834
  };
6702
6835
 
6703
6836
  // packages/cli/src/ui/components/PermissionsModifyTrustDialog.tsx
@@ -6705,7 +6838,7 @@ import * as process4 from "node:process";
6705
6838
  import * as path3 from "node:path";
6706
6839
 
6707
6840
  // packages/cli/src/ui/hooks/usePermissionsModifyTrust.ts
6708
- var import_react20 = __toESM(require_react(), 1);
6841
+ var import_react21 = __toESM(require_react(), 1);
6709
6842
  import * as process3 from "node:process";
6710
6843
  import * as path2 from "node:path";
6711
6844
  function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
@@ -6733,22 +6866,22 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6733
6866
  const settings = useSettings();
6734
6867
  const cwd5 = targetDirectory;
6735
6868
  const isCurrentWorkspace = path2.resolve(targetDirectory).toLowerCase() === path2.resolve(process3.cwd()).toLowerCase();
6736
- const [initialState5] = (0, import_react20.useState)(
6869
+ const [initialState5] = (0, import_react21.useState)(
6737
6870
  () => getInitialTrustState(settings, cwd5, isCurrentWorkspace)
6738
6871
  );
6739
- const [currentTrustLevel] = (0, import_react20.useState)(
6872
+ const [currentTrustLevel] = (0, import_react21.useState)(
6740
6873
  initialState5.currentTrustLevel
6741
6874
  );
6742
- const [pendingTrustLevel, setPendingTrustLevel] = (0, import_react20.useState)();
6743
- const [isInheritedTrustFromParent] = (0, import_react20.useState)(
6875
+ const [pendingTrustLevel, setPendingTrustLevel] = (0, import_react21.useState)();
6876
+ const [isInheritedTrustFromParent] = (0, import_react21.useState)(
6744
6877
  initialState5.isInheritedTrustFromParent
6745
6878
  );
6746
- const [isInheritedTrustFromIde] = (0, import_react20.useState)(
6879
+ const [isInheritedTrustFromIde] = (0, import_react21.useState)(
6747
6880
  initialState5.isInheritedTrustFromIde
6748
6881
  );
6749
- const [needsRestart, setNeedsRestart] = (0, import_react20.useState)(false);
6882
+ const [needsRestart, setNeedsRestart] = (0, import_react21.useState)(false);
6750
6883
  const isFolderTrustEnabled = settings.merged.security.folderTrust.enabled ?? true;
6751
- const updateTrustLevel = (0, import_react20.useCallback)(
6884
+ const updateTrustLevel = (0, import_react21.useCallback)(
6752
6885
  async (trustLevel) => {
6753
6886
  if (!isCurrentWorkspace) {
6754
6887
  const folders = loadTrustedFolders();
@@ -6798,7 +6931,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6798
6931
  },
6799
6932
  [cwd5, settings.merged, onExit, addItem, isCurrentWorkspace]
6800
6933
  );
6801
- const commitTrustLevelChange = (0, import_react20.useCallback)(async () => {
6934
+ const commitTrustLevelChange = (0, import_react21.useCallback)(async () => {
6802
6935
  if (pendingTrustLevel) {
6803
6936
  const folders = loadTrustedFolders();
6804
6937
  try {
@@ -6829,7 +6962,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
6829
6962
  };
6830
6963
 
6831
6964
  // packages/cli/src/ui/components/PermissionsModifyTrustDialog.tsx
6832
- var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
6965
+ var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
6833
6966
  function PermissionsModifyTrustDialog({
6834
6967
  onExit,
6835
6968
  addItem,
@@ -6889,8 +7022,8 @@ function PermissionsModifyTrustDialog({
6889
7022
  (item) => item.value === currentTrustLevel
6890
7023
  );
6891
7024
  const initialIndex = index === -1 ? 0 : index;
6892
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
6893
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7025
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
7026
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
6894
7027
  Box_default,
6895
7028
  {
6896
7029
  borderStyle: "round",
@@ -6898,24 +7031,24 @@ function PermissionsModifyTrustDialog({
6898
7031
  flexDirection: "column",
6899
7032
  padding: 1,
6900
7033
  children: [
6901
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", paddingBottom: 1, children: [
6902
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { bold: true, children: [
7034
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { flexDirection: "column", paddingBottom: 1, children: [
7035
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { bold: true, children: [
6903
7036
  "> ",
6904
7037
  "Modify Trust Level"
6905
7038
  ] }),
6906
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginTop: 1 }),
6907
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { children: [
7039
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { marginTop: 1 }),
7040
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { children: [
6908
7041
  "Folder: ",
6909
7042
  cwd5
6910
7043
  ] }),
6911
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { children: [
7044
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { children: [
6912
7045
  "Current Level: ",
6913
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { bold: true, children: currentTrustLevel || "Not Set" })
7046
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { bold: true, children: currentTrustLevel || "Not Set" })
6914
7047
  ] }),
6915
- isInheritedTrustFromParent && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.secondary, children: "Note: This folder behaves as a trusted folder because one of the parent folders is trusted. It will remain trusted even if you set a different trust level here. To change this, you need to modify the trust setting in the parent folder." }),
6916
- isInheritedTrustFromIde && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.secondary, children: "Note: This folder behaves as a trusted folder because the connected IDE workspace is trusted. It will remain trusted even if you set a different trust level here." })
7048
+ isInheritedTrustFromParent && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, children: "Note: This folder behaves as a trusted folder because one of the parent folders is trusted. It will remain trusted even if you set a different trust level here. To change this, you need to modify the trust setting in the parent folder." }),
7049
+ isInheritedTrustFromIde && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, children: "Note: This folder behaves as a trusted folder because the connected IDE workspace is trusted. It will remain trusted even if you set a different trust level here." })
6917
7050
  ] }),
6918
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7051
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
6919
7052
  RadioButtonSelect,
6920
7053
  {
6921
7054
  items: TRUST_LEVEL_ITEMS,
@@ -6924,22 +7057,22 @@ function PermissionsModifyTrustDialog({
6924
7057
  initialIndex
6925
7058
  }
6926
7059
  ),
6927
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.secondary, children: "(Use Enter to select, Esc to close)" }) })
7060
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, children: "(Use Enter to select, Esc to close)" }) })
6928
7061
  ]
6929
7062
  }
6930
7063
  ),
6931
- needsRestart && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "To apply the trust changes, Gemini CLI must be restarted. Press 'r' to restart CLI now." }) })
7064
+ needsRestart && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "To apply the trust changes, Gemini CLI must be restarted. Press 'r' to restart CLI now." }) })
6932
7065
  ] });
6933
7066
  }
6934
7067
 
6935
7068
  // packages/cli/src/ui/components/NewAgentsNotification.tsx
6936
- var import_react21 = __toESM(require_react(), 1);
6937
- var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
7069
+ var import_react22 = __toESM(require_react(), 1);
7070
+ var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
6938
7071
  var NewAgentsNotification = ({
6939
7072
  agents,
6940
7073
  onSelect
6941
7074
  }) => {
6942
- const [isProcessing, setIsProcessing] = (0, import_react21.useState)(false);
7075
+ const [isProcessing, setIsProcessing] = (0, import_react22.useState)(false);
6943
7076
  const options = [
6944
7077
  {
6945
7078
  label: "Acknowledge and Enable",
@@ -6963,7 +7096,7 @@ var NewAgentsNotification = ({
6963
7096
  const MAX_DISPLAYED_AGENTS = 5;
6964
7097
  const displayAgents = agents.slice(0, MAX_DISPLAYED_AGENTS);
6965
7098
  const remaining = agents.length - MAX_DISPLAYED_AGENTS;
6966
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { flexDirection: "column", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
7099
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "column", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
6967
7100
  Box_default,
6968
7101
  {
6969
7102
  flexDirection: "column",
@@ -6973,10 +7106,10 @@ var NewAgentsNotification = ({
6973
7106
  marginLeft: 1,
6974
7107
  marginRight: 1,
6975
7108
  children: [
6976
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
6977
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { bold: true, color: theme.text.primary, children: "New Agents Discovered" }),
6978
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "The following agents were found in this project. Please review them:" }),
6979
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
7109
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
7110
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { bold: true, color: theme.text.primary, children: "New Agents Discovered" }),
7111
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.primary, children: "The following agents were found in this project. Please review them:" }),
7112
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
6980
7113
  Box_default,
6981
7114
  {
6982
7115
  flexDirection: "column",
@@ -6987,20 +7120,20 @@ var NewAgentsNotification = ({
6987
7120
  displayAgents.map((agent) => {
6988
7121
  const mcpServers = agent.kind === "local" ? agent.mcpServers : void 0;
6989
7122
  const hasMcpServers = mcpServers && Object.keys(mcpServers).length > 0;
6990
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { flexDirection: "column", children: [
6991
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { children: [
6992
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
7123
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "column", children: [
7124
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { children: [
7125
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
6993
7126
  "- ",
6994
7127
  agent.name,
6995
7128
  ":",
6996
7129
  " "
6997
7130
  ] }) }),
6998
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme.text.secondary, children: [
7131
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.text.secondary, children: [
6999
7132
  " ",
7000
7133
  agent.description
7001
7134
  ] })
7002
7135
  ] }),
7003
- hasMcpServers && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme.text.secondary, children: [
7136
+ hasMcpServers && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.text.secondary, children: [
7004
7137
  "(Includes MCP servers:",
7005
7138
  " ",
7006
7139
  Object.keys(mcpServers).join(", "),
@@ -7008,7 +7141,7 @@ var NewAgentsNotification = ({
7008
7141
  ] }) })
7009
7142
  ] }, agent.name);
7010
7143
  }),
7011
- remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme.text.secondary, children: [
7144
+ remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.text.secondary, children: [
7012
7145
  "... and ",
7013
7146
  remaining,
7014
7147
  " more."
@@ -7017,10 +7150,10 @@ var NewAgentsNotification = ({
7017
7150
  }
7018
7151
  )
7019
7152
  ] }),
7020
- isProcessing ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { children: [
7021
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CliSpinner, {}),
7022
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: " Processing..." })
7023
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7153
+ isProcessing ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { children: [
7154
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CliSpinner, {}),
7155
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.primary, children: " Processing..." })
7156
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7024
7157
  RadioButtonSelect,
7025
7158
  {
7026
7159
  items: options,
@@ -7034,9 +7167,9 @@ var NewAgentsNotification = ({
7034
7167
  };
7035
7168
 
7036
7169
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
7037
- var UIActionsContext = (0, import_react22.createContext)(null);
7170
+ var UIActionsContext = (0, import_react23.createContext)(null);
7038
7171
  var useUIActions = () => {
7039
- const context = (0, import_react22.useContext)(UIActionsContext);
7172
+ const context = (0, import_react23.useContext)(UIActionsContext);
7040
7173
  if (!context) {
7041
7174
  throw new Error("useUIActions must be used within a UIActionsProvider");
7042
7175
  }
@@ -7044,8 +7177,9 @@ var useUIActions = () => {
7044
7177
  };
7045
7178
 
7046
7179
  // packages/cli/src/ui/components/messages/ShellToolMessage.tsx
7047
- var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
7180
+ var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
7048
7181
  var ShellToolMessage = ({
7182
+ callId,
7049
7183
  name,
7050
7184
  description,
7051
7185
  resultDisplay,
@@ -7062,6 +7196,8 @@ var ShellToolMessage = ({
7062
7196
  isExpandable,
7063
7197
  originalRequestName
7064
7198
  }) => {
7199
+ const { isExpanded: isExpandedInContext } = useToolActions();
7200
+ const isExpanded = (isExpandedInContext ? isExpandedInContext(callId) : false) || availableTerminalHeight === void 0;
7065
7201
  const {
7066
7202
  activePtyId: activeShellPtyId,
7067
7203
  embeddedShellFocused,
@@ -7088,7 +7224,7 @@ var ShellToolMessage = ({
7088
7224
  isAlternateBuffer,
7089
7225
  maxLinesLimit: maxLines
7090
7226
  });
7091
- import_react23.default.useEffect(() => {
7227
+ import_react24.default.useEffect(() => {
7092
7228
  const isExecuting = status === "executing" /* Executing */;
7093
7229
  if (isExecuting && ptyId) {
7094
7230
  try {
@@ -7107,8 +7243,8 @@ var ShellToolMessage = ({
7107
7243
  }
7108
7244
  }, [ptyId, status, terminalWidth, availableHeight]);
7109
7245
  const { setEmbeddedShellFocused } = useUIActions();
7110
- const wasFocusedRef = import_react23.default.useRef(false);
7111
- import_react23.default.useEffect(() => {
7246
+ const wasFocusedRef = import_react24.default.useRef(false);
7247
+ import_react24.default.useEffect(() => {
7112
7248
  if (isThisShellFocused2) {
7113
7249
  wasFocusedRef.current = true;
7114
7250
  } else if (wasFocusedRef.current) {
@@ -7118,8 +7254,8 @@ var ShellToolMessage = ({
7118
7254
  wasFocusedRef.current = false;
7119
7255
  }
7120
7256
  }, [isThisShellFocused2, embeddedShellFocused, setEmbeddedShellFocused]);
7121
- const headerRef = import_react23.default.useRef(null);
7122
- const contentRef = import_react23.default.useRef(null);
7257
+ const headerRef = import_react24.default.useRef(null);
7258
+ const contentRef = import_react24.default.useRef(null);
7123
7259
  const isThisShellFocusable2 = isThisShellFocusable(name, status, config);
7124
7260
  const handleFocus = () => {
7125
7261
  if (isThisShellFocusable2) {
@@ -7133,8 +7269,8 @@ var ShellToolMessage = ({
7133
7269
  isThisShellFocused2,
7134
7270
  resultDisplay
7135
7271
  );
7136
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
7137
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7272
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
7273
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7138
7274
  StickyHeader,
7139
7275
  {
7140
7276
  width: terminalWidth,
@@ -7143,7 +7279,7 @@ var ShellToolMessage = ({
7143
7279
  borderDimColor,
7144
7280
  containerRef: headerRef,
7145
7281
  children: [
7146
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7282
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7147
7283
  ToolStatusIndicator,
7148
7284
  {
7149
7285
  status,
@@ -7151,28 +7287,29 @@ var ShellToolMessage = ({
7151
7287
  isFocused: isThisShellFocused2
7152
7288
  }
7153
7289
  ),
7154
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7290
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7155
7291
  ToolInfo,
7156
7292
  {
7157
7293
  name,
7158
7294
  status,
7159
7295
  description,
7160
7296
  emphasis,
7161
- originalRequestName
7297
+ originalRequestName,
7298
+ isExpanded
7162
7299
  }
7163
7300
  ),
7164
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7301
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7165
7302
  FocusHint,
7166
7303
  {
7167
7304
  shouldShowFocusHint,
7168
7305
  isThisShellFocused: isThisShellFocused2
7169
7306
  }
7170
7307
  ),
7171
- emphasis === "high" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TrailingIndicator, {})
7308
+ emphasis === "high" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TrailingIndicator, {})
7172
7309
  ]
7173
7310
  }
7174
7311
  ),
7175
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7312
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7176
7313
  Box_default,
7177
7314
  {
7178
7315
  ref: contentRef,
@@ -7187,7 +7324,7 @@ var ShellToolMessage = ({
7187
7324
  paddingX: 1,
7188
7325
  flexDirection: "column",
7189
7326
  children: [
7190
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7327
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7191
7328
  ToolResultDisplay,
7192
7329
  {
7193
7330
  resultDisplay,
@@ -7198,7 +7335,7 @@ var ShellToolMessage = ({
7198
7335
  maxLines
7199
7336
  }
7200
7337
  ),
7201
- isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7338
+ isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7202
7339
  ShellInputPrompt,
7203
7340
  {
7204
7341
  activeShellPtyId: activeShellPtyId ?? null,
@@ -7214,114 +7351,6 @@ var ShellToolMessage = ({
7214
7351
 
7215
7352
  // packages/cli/src/ui/components/messages/TopicMessage.tsx
7216
7353
  var import_react25 = __toESM(require_react(), 1);
7217
-
7218
- // packages/cli/src/ui/contexts/ToolActionsContext.tsx
7219
- var import_react24 = __toESM(require_react(), 1);
7220
- var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
7221
- function hasLegacyCallback(details) {
7222
- return !!details && "onConfirm" in details && typeof details.onConfirm === "function";
7223
- }
7224
- var ToolActionsContext = (0, import_react24.createContext)(null);
7225
- var useToolActions = () => {
7226
- const context = (0, import_react24.useContext)(ToolActionsContext);
7227
- if (!context) {
7228
- throw new Error("useToolActions must be used within a ToolActionsProvider");
7229
- }
7230
- return context;
7231
- };
7232
- var ToolActionsProvider = (props) => {
7233
- const {
7234
- children,
7235
- config,
7236
- toolCalls,
7237
- isExpanded,
7238
- toggleExpansion,
7239
- toggleAllExpansion
7240
- } = props;
7241
- const [ideClient, setIdeClient] = (0, import_react24.useState)(null);
7242
- const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react24.useState)(false);
7243
- (0, import_react24.useEffect)(() => {
7244
- let isMounted = true;
7245
- let activeClient = null;
7246
- const handleStatusChange = () => {
7247
- if (isMounted && activeClient) {
7248
- setIsDiffingEnabled(activeClient.isDiffingEnabled());
7249
- }
7250
- };
7251
- if (config.getIdeMode()) {
7252
- IdeClient.getInstance().then((client) => {
7253
- if (!isMounted) return;
7254
- activeClient = client;
7255
- setIdeClient(client);
7256
- setIsDiffingEnabled(client.isDiffingEnabled());
7257
- client.addStatusChangeListener(handleStatusChange);
7258
- }).catch((error) => {
7259
- debugLogger.error("Failed to get IdeClient instance:", error);
7260
- });
7261
- }
7262
- return () => {
7263
- isMounted = false;
7264
- if (activeClient) {
7265
- activeClient.removeStatusChangeListener(handleStatusChange);
7266
- }
7267
- };
7268
- }, [config]);
7269
- const confirm = (0, import_react24.useCallback)(
7270
- async (callId, outcome, payload) => {
7271
- const tool = toolCalls.find((t) => t.callId === callId);
7272
- if (!tool) {
7273
- debugLogger.warn(`ToolActions: Tool ${callId} not found`);
7274
- return;
7275
- }
7276
- const details = tool.confirmationDetails;
7277
- if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
7278
- const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
7279
- await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
7280
- }
7281
- if (tool.correlationId) {
7282
- await config.getMessageBus().publish({
7283
- type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
7284
- correlationId: tool.correlationId,
7285
- confirmed: outcome !== "cancel" /* Cancel */,
7286
- requiresUserConfirmation: false,
7287
- outcome,
7288
- payload
7289
- });
7290
- return;
7291
- }
7292
- if (hasLegacyCallback(details)) {
7293
- await details.onConfirm(outcome, payload);
7294
- return;
7295
- }
7296
- debugLogger.warn(
7297
- `ToolActions: No correlationId or callback for ${callId}`
7298
- );
7299
- },
7300
- [config, ideClient, toolCalls, isDiffingEnabled]
7301
- );
7302
- const cancel = (0, import_react24.useCallback)(
7303
- async (callId) => {
7304
- await confirm(callId, "cancel" /* Cancel */);
7305
- },
7306
- [confirm]
7307
- );
7308
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7309
- ToolActionsContext.Provider,
7310
- {
7311
- value: {
7312
- confirm,
7313
- cancel,
7314
- isDiffingEnabled,
7315
- isExpanded,
7316
- toggleExpansion,
7317
- toggleAllExpansion
7318
- },
7319
- children
7320
- }
7321
- );
7322
- };
7323
-
7324
- // packages/cli/src/ui/components/messages/TopicMessage.tsx
7325
7354
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
7326
7355
  var isTopicTool = (name) => name === UPDATE_TOPIC_TOOL_NAME || name === UPDATE_TOPIC_DISPLAY_NAME;
7327
7356
  var TopicMessage = ({
@@ -15127,7 +15156,8 @@ function AuthDialog({
15127
15156
  return;
15128
15157
  }
15129
15158
  if (authType) {
15130
- if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
15159
+ const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
15160
+ if (needsRestart) {
15131
15161
  setAuthContext({ requiresRestart: true });
15132
15162
  } else {
15133
15163
  setAuthContext({});
@@ -17956,8 +17986,55 @@ var PolicyUpdateDialog = ({
17956
17986
  ) });
17957
17987
  };
17958
17988
 
17959
- // packages/cli/src/ui/components/DialogManager.tsx
17989
+ // packages/cli/src/ui/auth/LoginRestartDialog.tsx
17960
17990
  var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
17991
+ var LoginRestartDialog = ({
17992
+ onDismiss,
17993
+ config,
17994
+ message
17995
+ }) => {
17996
+ useKeypress(
17997
+ (key) => {
17998
+ if (key.name === "escape") {
17999
+ onDismiss();
18000
+ return true;
18001
+ } else if (key.name === "r" || key.name === "R") {
18002
+ setTimeout(async () => {
18003
+ if (process.send) {
18004
+ const remoteSettings = config.getRemoteAdminSettings();
18005
+ if (remoteSettings) {
18006
+ process.send({
18007
+ type: "admin-settings-update",
18008
+ settings: remoteSettings
18009
+ });
18010
+ }
18011
+ }
18012
+ await relaunchApp();
18013
+ }, 100);
18014
+ return true;
18015
+ }
18016
+ return false;
18017
+ },
18018
+ { isActive: true }
18019
+ );
18020
+ const displayMessage = message ?? "You've successfully signed in with Google. Gemini CLI needs to be restarted.";
18021
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
18022
+ Box_default,
18023
+ {
18024
+ borderStyle: "round",
18025
+ borderColor: theme.status.warning,
18026
+ paddingX: 1,
18027
+ flexDirection: "column",
18028
+ children: [
18029
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Text, { color: theme.status.warning, children: displayMessage }),
18030
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Text, { color: theme.status.warning, children: "Press R to restart, or Esc to choose a different authentication method." })
18031
+ ]
18032
+ }
18033
+ );
18034
+ };
18035
+
18036
+ // packages/cli/src/ui/components/DialogManager.tsx
18037
+ var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
17961
18038
  var DialogManager = ({
17962
18039
  addItem,
17963
18040
  terminalWidth
@@ -17974,13 +18051,13 @@ var DialogManager = ({
17974
18051
  terminalWidth: uiTerminalWidth
17975
18052
  } = uiState;
17976
18053
  if (uiState.adminSettingsChanged) {
17977
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(AdminSettingsChangedDialog, {});
18054
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(AdminSettingsChangedDialog, {});
17978
18055
  }
17979
18056
  if (uiState.showIdeRestartPrompt) {
17980
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(IdeTrustChangeDialog, { reason: uiState.ideTrustRestartReason });
18057
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(IdeTrustChangeDialog, { reason: uiState.ideTrustRestartReason });
17981
18058
  }
17982
18059
  if (uiState.newAgents) {
17983
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18060
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
17984
18061
  NewAgentsNotification,
17985
18062
  {
17986
18063
  agents: uiState.newAgents,
@@ -17989,7 +18066,7 @@ var DialogManager = ({
17989
18066
  );
17990
18067
  }
17991
18068
  if (quotaState.proQuotaRequest) {
17992
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18069
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
17993
18070
  ProQuotaDialog,
17994
18071
  {
17995
18072
  failedModel: quotaState.proQuotaRequest.failedModel,
@@ -18004,7 +18081,7 @@ var DialogManager = ({
18004
18081
  );
18005
18082
  }
18006
18083
  if (quotaState.validationRequest) {
18007
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18084
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18008
18085
  ValidationDialog,
18009
18086
  {
18010
18087
  validationLink: quotaState.validationRequest.validationLink,
@@ -18015,7 +18092,7 @@ var DialogManager = ({
18015
18092
  );
18016
18093
  }
18017
18094
  if (quotaState.overageMenuRequest) {
18018
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18095
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18019
18096
  OverageMenuDialog,
18020
18097
  {
18021
18098
  failedModel: quotaState.overageMenuRequest.failedModel,
@@ -18027,7 +18104,7 @@ var DialogManager = ({
18027
18104
  );
18028
18105
  }
18029
18106
  if (quotaState.emptyWalletRequest) {
18030
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18107
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18031
18108
  EmptyWalletDialog,
18032
18109
  {
18033
18110
  failedModel: quotaState.emptyWalletRequest.failedModel,
@@ -18039,7 +18116,7 @@ var DialogManager = ({
18039
18116
  );
18040
18117
  }
18041
18118
  if (uiState.shouldShowIdePrompt) {
18042
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18119
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18043
18120
  IdeIntegrationNudge,
18044
18121
  {
18045
18122
  ide: uiState.currentIDE,
@@ -18048,7 +18125,7 @@ var DialogManager = ({
18048
18125
  );
18049
18126
  }
18050
18127
  if (uiState.isFolderTrustDialogOpen) {
18051
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18128
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18052
18129
  FolderTrustDialog,
18053
18130
  {
18054
18131
  onSelect: uiActions.handleFolderTrustSelect,
@@ -18058,7 +18135,7 @@ var DialogManager = ({
18058
18135
  );
18059
18136
  }
18060
18137
  if (uiState.isPolicyUpdateDialogOpen) {
18061
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18138
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18062
18139
  PolicyUpdateDialog,
18063
18140
  {
18064
18141
  config,
@@ -18068,7 +18145,7 @@ var DialogManager = ({
18068
18145
  );
18069
18146
  }
18070
18147
  if (uiState.loopDetectionConfirmationRequest) {
18071
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18148
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18072
18149
  LoopDetectionConfirmation,
18073
18150
  {
18074
18151
  onComplete: uiState.loopDetectionConfirmationRequest.onComplete
@@ -18078,7 +18155,7 @@ var DialogManager = ({
18078
18155
  if (uiState.permissionConfirmationRequest) {
18079
18156
  const files = uiState.permissionConfirmationRequest.files;
18080
18157
  const filesList = files.map((f) => `- ${f}`).join("\n");
18081
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18158
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18082
18159
  ConsentPrompt,
18083
18160
  {
18084
18161
  prompt: `The following files are outside your workspace:
@@ -18094,7 +18171,7 @@ Do you want to allow this read?`,
18094
18171
  );
18095
18172
  }
18096
18173
  if (uiState.commandConfirmationRequest) {
18097
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18174
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18098
18175
  ConsentPrompt,
18099
18176
  {
18100
18177
  prompt: uiState.commandConfirmationRequest.prompt,
@@ -18104,7 +18181,7 @@ Do you want to allow this read?`,
18104
18181
  );
18105
18182
  }
18106
18183
  if (uiState.authConsentRequest) {
18107
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18184
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18108
18185
  ConsentPrompt,
18109
18186
  {
18110
18187
  prompt: uiState.authConsentRequest.prompt,
@@ -18115,7 +18192,7 @@ Do you want to allow this read?`,
18115
18192
  }
18116
18193
  if (uiState.confirmUpdateExtensionRequests.length > 0) {
18117
18194
  const request = uiState.confirmUpdateExtensionRequests[0];
18118
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18195
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18119
18196
  ConsentPrompt,
18120
18197
  {
18121
18198
  prompt: request.prompt,
@@ -18125,9 +18202,9 @@ Do you want to allow this read?`,
18125
18202
  );
18126
18203
  }
18127
18204
  if (uiState.isThemeDialogOpen) {
18128
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(Box_default, { flexDirection: "column", children: [
18129
- uiState.themeError && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Text, { color: theme.status.error, children: uiState.themeError }) }),
18130
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18205
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { flexDirection: "column", children: [
18206
+ uiState.themeError && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.status.error, children: uiState.themeError }) }),
18207
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18131
18208
  ThemeDialog,
18132
18209
  {
18133
18210
  onSelect: uiActions.handleThemeSelect,
@@ -18141,7 +18218,7 @@ Do you want to allow this read?`,
18141
18218
  ] });
18142
18219
  }
18143
18220
  if (uiState.isSettingsDialogOpen) {
18144
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18221
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18145
18222
  SettingsDialog,
18146
18223
  {
18147
18224
  onSelect: () => uiActions.closeSettingsDialog(),
@@ -18151,13 +18228,13 @@ Do you want to allow this read?`,
18151
18228
  ) });
18152
18229
  }
18153
18230
  if (uiState.isModelDialogOpen) {
18154
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ModelDialog, { onClose: uiActions.closeModelDialog });
18231
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ModelDialog, { onClose: uiActions.closeModelDialog });
18155
18232
  }
18156
18233
  if (uiState.isVoiceModelDialogOpen) {
18157
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(VoiceModelDialog, { onClose: uiActions.closeVoiceModelDialog });
18234
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(VoiceModelDialog, { onClose: uiActions.closeVoiceModelDialog });
18158
18235
  }
18159
18236
  if (uiState.isAgentConfigDialogOpen && uiState.selectedAgentName && uiState.selectedAgentDisplayName && uiState.selectedAgentDefinition) {
18160
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18237
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18161
18238
  AgentConfigDialog,
18162
18239
  {
18163
18240
  agentName: uiState.selectedAgentName,
@@ -18176,7 +18253,7 @@ Do you want to allow this read?`,
18176
18253
  ) });
18177
18254
  }
18178
18255
  if (uiState.accountSuspensionInfo) {
18179
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18256
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18180
18257
  BannedAccountDialog,
18181
18258
  {
18182
18259
  accountSuspensionInfo: uiState.accountSuspensionInfo,
@@ -18190,7 +18267,7 @@ Do you want to allow this read?`,
18190
18267
  ) });
18191
18268
  }
18192
18269
  if (uiState.isAuthenticating) {
18193
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18270
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18194
18271
  AuthInProgress,
18195
18272
  {
18196
18273
  onTimeout: () => {
@@ -18200,7 +18277,7 @@ Do you want to allow this read?`,
18200
18277
  );
18201
18278
  }
18202
18279
  if (uiState.isAwaitingApiKeyInput) {
18203
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18280
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18204
18281
  ApiAuthDialog,
18205
18282
  {
18206
18283
  onSubmit: uiActions.handleApiKeySubmit,
@@ -18211,8 +18288,18 @@ Do you want to allow this read?`,
18211
18288
  uiState.apiKeyDefaultValue
18212
18289
  ) });
18213
18290
  }
18291
+ if (uiState.isAwaitingLoginRestart) {
18292
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18293
+ LoginRestartDialog,
18294
+ {
18295
+ onDismiss: uiActions.dismissLoginRestart,
18296
+ config,
18297
+ message: uiState.loginRestartMessage
18298
+ }
18299
+ ) });
18300
+ }
18214
18301
  if (uiState.isAuthDialogOpen) {
18215
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18302
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18216
18303
  AuthDialog,
18217
18304
  {
18218
18305
  config,
@@ -18225,9 +18312,9 @@ Do you want to allow this read?`,
18225
18312
  ) });
18226
18313
  }
18227
18314
  if (uiState.isEditorDialogOpen) {
18228
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(Box_default, { flexDirection: "column", children: [
18229
- uiState.editorError && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Text, { color: theme.status.error, children: uiState.editorError }) }),
18230
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18315
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { flexDirection: "column", children: [
18316
+ uiState.editorError && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.status.error, children: uiState.editorError }) }),
18317
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18231
18318
  EditorSettingsDialog,
18232
18319
  {
18233
18320
  onSelect: uiActions.handleEditorSelect,
@@ -18238,7 +18325,7 @@ Do you want to allow this read?`,
18238
18325
  ] });
18239
18326
  }
18240
18327
  if (uiState.showPrivacyNotice) {
18241
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18328
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18242
18329
  PrivacyNotice,
18243
18330
  {
18244
18331
  onExit: () => uiActions.exitPrivacyNotice(),
@@ -18247,7 +18334,7 @@ Do you want to allow this read?`,
18247
18334
  );
18248
18335
  }
18249
18336
  if (uiState.isSessionBrowserOpen) {
18250
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18337
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18251
18338
  SessionBrowser,
18252
18339
  {
18253
18340
  config,
@@ -18258,7 +18345,7 @@ Do you want to allow this read?`,
18258
18345
  );
18259
18346
  }
18260
18347
  if (uiState.isPermissionsDialogOpen) {
18261
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
18348
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
18262
18349
  PermissionsModifyTrustDialog,
18263
18350
  {
18264
18351
  onExit: uiActions.closePermissionsDialog,
@@ -18274,7 +18361,7 @@ Do you want to allow this read?`,
18274
18361
  var import_react89 = __toESM(require_react(), 1);
18275
18362
 
18276
18363
  // packages/cli/src/ui/components/ToastDisplay.tsx
18277
- var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
18364
+ var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
18278
18365
  function shouldShowToast(uiState, inputState) {
18279
18366
  return uiState.ctrlCPressedOnce || Boolean(uiState.transientMessage) || uiState.ctrlDPressedOnce || inputState.showEscapePrompt && (inputState.buffer.text.length > 0 || uiState.history.length > 0) || Boolean(uiState.queueErrorMessage) || uiState.showIsExpandableHint;
18280
18367
  }
@@ -18282,13 +18369,13 @@ var ToastDisplay = () => {
18282
18369
  const uiState = useUIState();
18283
18370
  const inputState = useInputState();
18284
18371
  if (uiState.ctrlCPressedOnce) {
18285
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+C again to exit." });
18372
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+C again to exit." });
18286
18373
  }
18287
18374
  if (uiState.transientMessage?.type === "warning" /* Warning */ && uiState.transientMessage.text) {
18288
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.status.warning, children: uiState.transientMessage.text });
18375
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.status.warning, children: uiState.transientMessage.text });
18289
18376
  }
18290
18377
  if (uiState.ctrlDPressedOnce) {
18291
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+D again to exit." });
18378
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+D again to exit." });
18292
18379
  }
18293
18380
  if (inputState.showEscapePrompt) {
18294
18381
  const isPromptEmpty = inputState.buffer.text.length === 0;
@@ -18296,21 +18383,21 @@ var ToastDisplay = () => {
18296
18383
  if (isPromptEmpty && !hasHistory) {
18297
18384
  return null;
18298
18385
  }
18299
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text, { color: theme.text.secondary, children: [
18386
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text, { color: theme.text.secondary, children: [
18300
18387
  "Press Esc again to ",
18301
18388
  isPromptEmpty ? "rewind" : "clear prompt",
18302
18389
  "."
18303
18390
  ] });
18304
18391
  }
18305
18392
  if (uiState.transientMessage?.type === "hint" /* Hint */ && uiState.transientMessage.text) {
18306
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.text.secondary, children: uiState.transientMessage.text });
18393
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.text.secondary, children: uiState.transientMessage.text });
18307
18394
  }
18308
18395
  if (uiState.queueErrorMessage) {
18309
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.status.error, children: uiState.queueErrorMessage });
18396
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.status.error, children: uiState.queueErrorMessage });
18310
18397
  }
18311
18398
  if (uiState.showIsExpandableHint) {
18312
18399
  const action = uiState.constrainHeight ? "show more" : "collapse";
18313
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text, { color: theme.text.secondary, children: [
18400
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text, { color: theme.text.secondary, children: [
18314
18401
  "Press Ctrl+O to ",
18315
18402
  action,
18316
18403
  " lines of the last response"
@@ -18422,7 +18509,7 @@ function useErrorCount() {
18422
18509
  }
18423
18510
 
18424
18511
  // packages/cli/src/ui/components/DetailedMessagesDisplay.tsx
18425
- var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
18512
+ var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
18426
18513
  var iconBoxWidth = 3;
18427
18514
  var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
18428
18515
  const scrollableListRef = (0, import_react67.useRef)(null);
@@ -18453,7 +18540,7 @@ var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
18453
18540
  if (messages.length === 0) {
18454
18541
  return null;
18455
18542
  }
18456
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
18543
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
18457
18544
  Box_default,
18458
18545
  {
18459
18546
  flexDirection: "column",
@@ -18467,11 +18554,11 @@ var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
18467
18554
  flexGrow: 0,
18468
18555
  overflow: "hidden",
18469
18556
  children: [
18470
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
18557
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
18471
18558
  "Debug Console ",
18472
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.text.secondary, children: "(F12 to close)" })
18559
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { color: theme.text.secondary, children: "(F12 to close)" })
18473
18560
  ] }) }),
18474
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Box_default, { height: maxHeight, width: width - borderAndPadding, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
18561
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Box_default, { height: maxHeight, width: width - borderAndPadding, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
18475
18562
  ScrollableListWithForwardRef,
18476
18563
  {
18477
18564
  ref: scrollableListRef,
@@ -18496,11 +18583,11 @@ var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
18496
18583
  default:
18497
18584
  break;
18498
18585
  }
18499
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { flexDirection: "row", children: [
18500
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Box_default, { minWidth: iconBoxWidth, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: textColor, children: icon }) }),
18501
- /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text, { color: textColor, wrap: "wrap", children: [
18586
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { flexDirection: "row", children: [
18587
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Box_default, { minWidth: iconBoxWidth, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { color: textColor, children: icon }) }),
18588
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Text, { color: textColor, wrap: "wrap", children: [
18502
18589
  msg.content,
18503
- msg.count && msg.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text, { color: theme.text.secondary, children: [
18590
+ msg.count && msg.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Text, { color: theme.text.secondary, children: [
18504
18591
  " (x",
18505
18592
  msg.count,
18506
18593
  ")"
@@ -18520,12 +18607,12 @@ var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
18520
18607
  };
18521
18608
 
18522
18609
  // packages/cli/src/ui/components/shared/SectionHeader.tsx
18523
- var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
18610
+ var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
18524
18611
  var SectionHeader = ({
18525
18612
  title,
18526
18613
  subtitle
18527
- }) => /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { width: "100%", flexDirection: "column", overflow: "hidden", children: [
18528
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
18614
+ }) => /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Box_default, { width: "100%", flexDirection: "column", overflow: "hidden", children: [
18615
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
18529
18616
  Box_default,
18530
18617
  {
18531
18618
  width: "100%",
@@ -18537,14 +18624,14 @@ var SectionHeader = ({
18537
18624
  borderColor: theme.text.secondary
18538
18625
  }
18539
18626
  ),
18540
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { flexDirection: "row", children: [
18541
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { color: theme.text.primary, bold: true, wrap: "truncate-end", children: title }),
18542
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: subtitle })
18627
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Box_default, { flexDirection: "row", children: [
18628
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { color: theme.text.primary, bold: true, wrap: "truncate-end", children: title }),
18629
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: subtitle })
18543
18630
  ] })
18544
18631
  ] });
18545
18632
 
18546
18633
  // packages/cli/src/ui/components/ShortcutsHelp.tsx
18547
- var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
18634
+ var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
18548
18635
  var buildShortcutItems = () => [
18549
18636
  { key: "!", description: "shell mode" },
18550
18637
  { key: "@", description: "select file or folder" },
@@ -18572,9 +18659,9 @@ var buildShortcutItems = () => [
18572
18659
  description: "open external editor"
18573
18660
  }
18574
18661
  ];
18575
- var Shortcut = ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Box_default, { flexDirection: "row", children: [
18576
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { color: theme.text.accent, children: item.key }) }),
18577
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { color: theme.text.primary, children: item.description }) })
18662
+ var Shortcut = ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Box_default, { flexDirection: "row", children: [
18663
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: theme.text.accent, children: item.key }) }),
18664
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: theme.text.primary, children: item.description }) })
18578
18665
  ] });
18579
18666
  var ShortcutsHelp = () => {
18580
18667
  const { terminalWidth } = useUIState();
@@ -18593,14 +18680,14 @@ var ShortcutsHelp = () => {
18593
18680
  items[9],
18594
18681
  items[3]
18595
18682
  ];
18596
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
18597
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SectionHeader, { title: " Shortcuts", subtitle: " See /help for more" }),
18598
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Box_default, { flexDirection: "row", flexWrap: "wrap", paddingLeft: 1, paddingRight: 2, children: itemsForDisplay.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
18683
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
18684
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SectionHeader, { title: " Shortcuts", subtitle: " See /help for more" }),
18685
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Box_default, { flexDirection: "row", flexWrap: "wrap", paddingLeft: 1, paddingRight: 2, children: itemsForDisplay.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
18599
18686
  Box_default,
18600
18687
  {
18601
18688
  width: isNarrow ? "100%" : "33%",
18602
18689
  paddingRight: isNarrow ? 0 : 2,
18603
- children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Shortcut, { item })
18690
+ children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Shortcut, { item })
18604
18691
  },
18605
18692
  `${item.key}-${index}`
18606
18693
  )) })
@@ -18611,7 +18698,7 @@ var ShortcutsHelp = () => {
18611
18698
  var import_react81 = __toESM(require_react(), 1);
18612
18699
 
18613
18700
  // packages/cli/src/ui/components/SuggestionsDisplay.tsx
18614
- var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
18701
+ var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
18615
18702
  var MAX_SUGGESTIONS_TO_SHOW = 8;
18616
18703
  function SuggestionsDisplay({
18617
18704
  suggestions,
@@ -18624,7 +18711,7 @@ function SuggestionsDisplay({
18624
18711
  expandedIndex
18625
18712
  }) {
18626
18713
  if (isLoading) {
18627
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Box_default, { paddingX: 1, width, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: "gray", children: "Loading suggestions..." }) });
18714
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { paddingX: 1, width, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: "gray", children: "Loading suggestions..." }) });
18628
18715
  }
18629
18716
  if (suggestions.length === 0) {
18630
18717
  return null;
@@ -18644,8 +18731,8 @@ function SuggestionsDisplay({
18644
18731
  ...suggestions.map((s) => getFullLabel(s).length)
18645
18732
  );
18646
18733
  const commandColumnWidth = mode === "slash" ? Math.min(maxLabelLength, Math.floor(width * 0.5)) : 0;
18647
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, width, children: [
18648
- scrollOffset > 0 && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: theme.text.primary, children: "\u25B2" }),
18734
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, width, children: [
18735
+ scrollOffset > 0 && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: theme.text.primary, children: "\u25B2" }),
18649
18736
  visibleSuggestions.map((suggestion, index) => {
18650
18737
  const originalIndex = startIndex + index;
18651
18738
  const isActive = originalIndex === activeIndex;
@@ -18654,7 +18741,7 @@ function SuggestionsDisplay({
18654
18741
  const isLong = suggestion.value.length >= MAX_WIDTH;
18655
18742
  const previousSectionTitle = suggestions[originalIndex - 1]?.sectionTitle;
18656
18743
  const shouldRenderSectionHeader = mode === "slash" && !!suggestion.sectionTitle && suggestion.sectionTitle !== previousSectionTitle;
18657
- const labelElement = /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
18744
+ const labelElement = /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
18658
18745
  ExpandableText,
18659
18746
  {
18660
18747
  label: suggestion.value,
@@ -18664,34 +18751,34 @@ function SuggestionsDisplay({
18664
18751
  isExpanded
18665
18752
  }
18666
18753
  );
18667
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
18754
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
18668
18755
  Box_default,
18669
18756
  {
18670
18757
  flexDirection: "column",
18671
18758
  children: [
18672
- shouldRenderSectionHeader && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Text, { color: theme.text.secondary, children: [
18759
+ shouldRenderSectionHeader && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Text, { color: theme.text.secondary, children: [
18673
18760
  "-- ",
18674
18761
  suggestion.sectionTitle,
18675
18762
  " --"
18676
18763
  ] }),
18677
- /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
18764
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
18678
18765
  Box_default,
18679
18766
  {
18680
18767
  flexDirection: "row",
18681
18768
  backgroundColor: isActive ? theme.background.focus : void 0,
18682
18769
  children: [
18683
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
18770
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
18684
18771
  Box_default,
18685
18772
  {
18686
18773
  ...mode === "slash" ? { width: commandColumnWidth, flexShrink: 0 } : { flexShrink: 1 },
18687
- children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Box_default, { children: [
18774
+ children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Box_default, { children: [
18688
18775
  labelElement,
18689
- suggestion.commandKind && COMMAND_KIND_SUFFIX[suggestion.commandKind] && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: textColor, children: COMMAND_KIND_SUFFIX[suggestion.commandKind] })
18776
+ suggestion.commandKind && COMMAND_KIND_SUFFIX[suggestion.commandKind] && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: textColor, children: COMMAND_KIND_SUFFIX[suggestion.commandKind] })
18690
18777
  ] })
18691
18778
  }
18692
18779
  ),
18693
- suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Box_default, { flexGrow: 1, paddingLeft: 3, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: textColor, wrap: "truncate", children: sanitizeForDisplay(suggestion.description, 100) }) }),
18694
- isActive && isLong && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Box_default, { width: 3, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: Colors.Gray, children: isExpanded ? " \u2190 " : " \u2192 " }) })
18780
+ suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { flexGrow: 1, paddingLeft: 3, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: textColor, wrap: "truncate", children: sanitizeForDisplay(suggestion.description, 100) }) }),
18781
+ isActive && isLong && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { width: 3, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: Colors.Gray, children: isExpanded ? " \u2190 " : " \u2192 " }) })
18695
18782
  ]
18696
18783
  }
18697
18784
  )
@@ -18700,8 +18787,8 @@ function SuggestionsDisplay({
18700
18787
  `${suggestion.value}-${originalIndex}`
18701
18788
  );
18702
18789
  }),
18703
- endIndex < suggestions.length && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: "gray", children: "\u25BC" }),
18704
- suggestions.length > MAX_SUGGESTIONS_TO_SHOW && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Text, { color: "gray", children: [
18790
+ endIndex < suggestions.length && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: "gray", children: "\u25BC" }),
18791
+ suggestions.length > MAX_SUGGESTIONS_TO_SHOW && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Text, { color: "gray", children: [
18705
18792
  "(",
18706
18793
  activeIndex + 1,
18707
18794
  "/",
@@ -21338,7 +21425,7 @@ function useRepeatedKeyPress(options) {
21338
21425
  }
21339
21426
 
21340
21427
  // packages/cli/src/ui/components/InputPrompt.tsx
21341
- var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
21428
+ var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
21342
21429
  function isTerminalPasteTrusted(kittyProtocolSupported) {
21343
21430
  return kittyProtocolSupported;
21344
21431
  }
@@ -21530,6 +21617,15 @@ var InputPrompt = ({
21530
21617
  setForceShowShellSuggestions,
21531
21618
  isShellSuggestionsVisible
21532
21619
  } = completion;
21620
+ const effectivePlaceholder = (0, import_react81.useMemo)(() => {
21621
+ if (!isVoiceModeEnabled) return placeholder;
21622
+ const voiceAction = (settings.experimental.voice?.activationMode ?? "push-to-talk") === "push-to-talk" ? "hold space to talk" : "space to talk";
21623
+ return ` Type your message or ${voiceAction} (Esc to exit)`;
21624
+ }, [
21625
+ isVoiceModeEnabled,
21626
+ placeholder,
21627
+ settings.experimental.voice?.activationMode
21628
+ ]);
21533
21629
  const showCursor = focus && isShellFocused && !isEmbeddedShellFocused && !copyModeEnabled;
21534
21630
  (0, import_react81.useEffect)(() => {
21535
21631
  appEvents.emit("scroll-to-bottom" /* ScrollToBottom */);
@@ -22385,14 +22481,14 @@ var InputPrompt = ({
22385
22481
  ({ item }) => {
22386
22482
  if (item.type === "ghostLine") {
22387
22483
  const padding = Math.max(0, inputWidth - stringWidth(item.ghostLine));
22388
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { height: 1, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Text, { color: theme.text.secondary, children: [
22484
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Box_default, { height: 1, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(Text, { color: theme.text.secondary, children: [
22389
22485
  item.ghostLine,
22390
22486
  " ".repeat(padding)
22391
22487
  ] }) });
22392
22488
  }
22393
22489
  const { lineText, absoluteVisualIdx } = item;
22394
22490
  const mapEntry = buffer.visualToLogicalMap[absoluteVisualIdx];
22395
- if (!mapEntry) return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { children: " " });
22491
+ if (!mapEntry) return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { children: " " });
22396
22492
  const isOnCursorLine = focus && absoluteVisualIdx === cursorVisualRowAbsolute;
22397
22493
  const renderedLine = [];
22398
22494
  const [logicalLineIdx] = mapEntry;
@@ -22434,17 +22530,17 @@ var InputPrompt = ({
22434
22530
  }
22435
22531
  const color = seg.type === "command" || seg.type === "file" || seg.type === "paste" ? theme.text.accent : theme.text.primary;
22436
22532
  renderedLine.push(
22437
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color, children: display }, `token-${segIdx}`)
22533
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color, children: display }, `token-${segIdx}`)
22438
22534
  );
22439
22535
  });
22440
22536
  const currentLineGhost = isOnCursorLine ? inlineGhost : "";
22441
22537
  if (isOnCursorLine && cursorVisualColAbsolute === cpLen(lineText) && !currentLineGhost) {
22442
22538
  renderedLine.push(
22443
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { children: showCursor ? import_chalk3.default.inverse(" ") : " " }, `cursor-end-${cursorVisualColAbsolute}`)
22539
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { children: showCursor ? import_chalk3.default.inverse(" ") : " " }, `cursor-end-${cursorVisualColAbsolute}`)
22444
22540
  );
22445
22541
  }
22446
22542
  const showCursorBeforeGhost = focus && isOnCursorLine && cursorVisualColAbsolute === cpLen(lineText) && currentLineGhost;
22447
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { height: 1, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
22543
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Box_default, { height: 1, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
22448
22544
  Text,
22449
22545
  {
22450
22546
  terminalCursorFocus: showCursor && isOnCursorLine,
@@ -22455,7 +22551,7 @@ var InputPrompt = ({
22455
22551
  children: [
22456
22552
  renderedLine,
22457
22553
  showCursorBeforeGhost && (showCursor ? import_chalk3.default.inverse(" ") : " "),
22458
- currentLineGhost && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: theme.text.secondary, children: currentLineGhost })
22554
+ currentLineGhost && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.secondary, children: currentLineGhost })
22459
22555
  ]
22460
22556
  }
22461
22557
  ) });
@@ -22523,7 +22619,7 @@ var InputPrompt = ({
22523
22619
  statusColor = theme.status.warning;
22524
22620
  statusText = "Accepting edits";
22525
22621
  }
22526
- const suggestionsNode = shouldShowSuggestions ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { paddingRight: 2, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
22622
+ const suggestionsNode = shouldShowSuggestions ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Box_default, { paddingRight: 2, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
22527
22623
  SuggestionsDisplay,
22528
22624
  {
22529
22625
  suggestions: activeCompletion.suggestions,
@@ -22537,9 +22633,9 @@ var InputPrompt = ({
22537
22633
  }
22538
22634
  ) }) : null;
22539
22635
  const borderColor = isShellFocused && !isEmbeddedShellFocused ? statusColor ?? theme.ui.focus : theme.border.default;
22540
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_jsx_runtime111.Fragment, { children: [
22636
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
22541
22637
  suggestionsPosition === "above" && suggestionsNode,
22542
- useLineFallback || !useBackgroundColor ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
22638
+ useLineFallback || !useBackgroundColor ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
22543
22639
  Box_default,
22544
22640
  {
22545
22641
  borderStyle: "round",
@@ -22554,20 +22650,21 @@ var InputPrompt = ({
22554
22650
  height: 0
22555
22651
  }
22556
22652
  ) : null,
22557
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
22653
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
22558
22654
  HalfLinePaddedBox,
22559
22655
  {
22560
22656
  backgroundBaseColor: theme.background.input,
22561
22657
  backgroundOpacity: 1,
22562
22658
  useBackgroundColor,
22563
- children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Box_default, { flexGrow: 1, flexDirection: "row", paddingX: 1, children: [
22564
- /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
22659
+ children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(Box_default, { flexGrow: 1, flexDirection: "row", paddingX: 1, children: [
22660
+ isVoiceModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.accent, children: "\u{1F3A4} " }),
22661
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
22565
22662
  Text,
22566
22663
  {
22567
22664
  color: statusColor ?? theme.text.accent,
22568
22665
  "aria-label": statusText || void 0,
22569
22666
  children: [
22570
- shellModeActive ? reverseSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
22667
+ shellModeActive ? reverseSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
22571
22668
  Text,
22572
22669
  {
22573
22670
  color: theme.text.link,
@@ -22577,37 +22674,30 @@ var InputPrompt = ({
22577
22674
  " "
22578
22675
  ]
22579
22676
  }
22580
- ) : "!" : commandSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: theme.text.accent, children: "(r:) " }) : showYoloStyling ? "*" : ">",
22677
+ ) : "!" : commandSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.accent, children: "(r:) " }) : showYoloStyling ? "*" : ">",
22581
22678
  " "
22582
22679
  ]
22583
22680
  }
22584
22681
  ),
22585
- /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", ref: innerBoxRef, children: [
22586
- isRecording && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { flexDirection: "row", marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: theme.status.success, children: "\u{1F399}\uFE0F Listening..." }) }),
22587
- isVoiceModeEnabled && !isRecording && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { flexDirection: "row", marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Text, { color: theme.text.secondary, children: [
22588
- "> Voice mode:",
22589
- " ",
22590
- (settings.experimental.voice?.activationMode ?? "push-to-talk") === "push-to-talk" ? "Hold Space to record" : "Space to start/stop recording",
22591
- " ",
22592
- "(Esc to exit)"
22593
- ] }) }),
22594
- buffer.text.length === 0 && !isRecording ? !isVoiceModeEnabled && placeholder ? showCursor ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
22682
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", ref: innerBoxRef, children: [
22683
+ isRecording && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Box_default, { flexDirection: "row", marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.status.success, children: "Listening..." }) }),
22684
+ buffer.text.length === 0 && !isRecording ? effectivePlaceholder ? showCursor ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
22595
22685
  Text,
22596
22686
  {
22597
22687
  terminalCursorFocus: showCursor,
22598
22688
  terminalCursorPosition: 0,
22599
22689
  children: [
22600
- import_chalk3.default.inverse(placeholder.slice(0, 1)),
22601
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: theme.text.secondary, children: placeholder.slice(1) })
22690
+ import_chalk3.default.inverse(effectivePlaceholder.slice(0, 1)),
22691
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.secondary, children: effectivePlaceholder.slice(1) })
22602
22692
  ]
22603
22693
  }
22604
- ) : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: theme.text.secondary, children: placeholder }) : null : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
22694
+ ) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.secondary, children: effectivePlaceholder }) : null : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
22605
22695
  Box_default,
22606
22696
  {
22607
22697
  flexDirection: "column",
22608
22698
  height: Math.min(buffer.viewportHeight, scrollableData.length),
22609
22699
  width: "100%",
22610
- children: config.getUseTerminalBuffer() ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
22700
+ children: config.getUseTerminalBuffer() ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
22611
22701
  ScrollableListWithForwardRef,
22612
22702
  {
22613
22703
  ref: listRef,
@@ -22630,7 +22720,7 @@ var InputPrompt = ({
22630
22720
  ).map((item, index) => {
22631
22721
  const actualIndex = buffer.visualScrollRow + index;
22632
22722
  const key = item.type === "visualLine" ? `line-${item.absoluteVisualIdx}` : `ghost-${item.index}`;
22633
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_react81.Fragment, { children: renderItem({ item, index: actualIndex }) }, key);
22723
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_react81.Fragment, { children: renderItem({ item, index: actualIndex }) }, key);
22634
22724
  })
22635
22725
  }
22636
22726
  )
@@ -22638,7 +22728,7 @@ var InputPrompt = ({
22638
22728
  ] })
22639
22729
  }
22640
22730
  ),
22641
- useLineFallback || !useBackgroundColor ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
22731
+ useLineFallback || !useBackgroundColor ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
22642
22732
  Box_default,
22643
22733
  {
22644
22734
  borderStyle: "round",
@@ -23069,7 +23159,7 @@ var usePhraseCycler = (isActive, isWaiting, shouldShowFocusHint, showTips = true
23069
23159
  // packages/cli/src/ui/components/GeminiSpinner.tsx
23070
23160
  var import_react83 = __toESM(require_react(), 1);
23071
23161
  var import_tinygradient = __toESM(require_tinygradient(), 1);
23072
- var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
23162
+ var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
23073
23163
  var COLOR_CYCLE_DURATION_MS = 4e3;
23074
23164
  var GeminiSpinner = ({
23075
23165
  spinnerType = "dots",
@@ -23099,11 +23189,11 @@ var GeminiSpinner = ({
23099
23189
  }, [isScreenReaderEnabled]);
23100
23190
  const progress = time % COLOR_CYCLE_DURATION_MS / COLOR_CYCLE_DURATION_MS;
23101
23191
  const currentColor = googleGradient.rgbAt(progress).toHexString();
23102
- return isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { children: altText }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: currentColor, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(CliSpinner, { type: spinnerType }) });
23192
+ return isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Text, { children: altText }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Text, { color: currentColor, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(CliSpinner, { type: spinnerType }) });
23103
23193
  };
23104
23194
 
23105
23195
  // packages/cli/src/ui/components/GeminiRespondingSpinner.tsx
23106
- var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
23196
+ var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
23107
23197
  var GeminiRespondingSpinner = ({
23108
23198
  nonRespondingDisplay,
23109
23199
  spinnerType = "dots",
@@ -23113,7 +23203,7 @@ var GeminiRespondingSpinner = ({
23113
23203
  const streamingState = useStreamingContext();
23114
23204
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
23115
23205
  if (streamingState === "responding" /* Responding */ && !isHookActive) {
23116
- return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
23206
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
23117
23207
  GeminiSpinner,
23118
23208
  {
23119
23209
  spinnerType,
@@ -23122,13 +23212,13 @@ var GeminiRespondingSpinner = ({
23122
23212
  );
23123
23213
  }
23124
23214
  if (nonRespondingDisplay) {
23125
- return isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Text, { children: SCREEN_READER_LOADING }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Text, { color: color ?? theme.text.primary, children: nonRespondingDisplay });
23215
+ return isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { children: SCREEN_READER_LOADING }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { color: color ?? theme.text.primary, children: nonRespondingDisplay });
23126
23216
  }
23127
23217
  return null;
23128
23218
  };
23129
23219
 
23130
23220
  // packages/cli/src/ui/components/LoadingIndicator.tsx
23131
- var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
23221
+ var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
23132
23222
  var LoadingIndicator = ({
23133
23223
  currentLoadingPhrase,
23134
23224
  wittyPhrase,
@@ -23151,72 +23241,72 @@ var LoadingIndicator = ({
23151
23241
  }
23152
23242
  const primaryText = currentLoadingPhrase === INTERACTIVE_SHELL_WAITING_PHRASE ? currentLoadingPhrase : thought?.subject ? thoughtLabel ?? thought.subject : currentLoadingPhrase || (streamingState === "responding" /* Responding */ ? "Thinking..." : void 0);
23153
23243
  const cancelAndTimerContent = showCancelAndTimer && streamingState === "responding" /* Responding */ ? `(esc to cancel, ${elapsedTime < 60 ? `${elapsedTime}s` : formatDuration(elapsedTime * 1e3)})` : null;
23154
- const wittyPhraseNode = !forceRealStatusOnly && showWit && wittyPhrase && primaryText === "Thinking..." ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { color: theme.text.secondary, dimColor: true, italic: true, children: wittyPhrase }) }) : null;
23244
+ const wittyPhraseNode = !forceRealStatusOnly && showWit && wittyPhrase && primaryText === "Thinking..." ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, dimColor: true, italic: true, children: wittyPhrase }) }) : null;
23155
23245
  if (inline) {
23156
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Box_default, { children: [
23157
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
23246
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { children: [
23247
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
23158
23248
  GeminiRespondingSpinner,
23159
23249
  {
23160
23250
  nonRespondingDisplay: spinnerIcon ?? (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ ? "\u280F" : ""),
23161
23251
  isHookActive
23162
23252
  }
23163
23253
  ) }),
23164
- primaryText && /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Box_default, { flexShrink: 1, children: [
23165
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { color: theme.text.primary, italic: true, wrap: "truncate-end", children: primaryText }),
23166
- primaryText === INTERACTIVE_SHELL_WAITING_PHRASE && /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Text, { color: theme.ui.active, italic: true, children: [
23254
+ primaryText && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { flexShrink: 1, children: [
23255
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.primary, italic: true, wrap: "truncate-end", children: primaryText }),
23256
+ primaryText === INTERACTIVE_SHELL_WAITING_PHRASE && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Text, { color: theme.ui.active, italic: true, children: [
23167
23257
  " ",
23168
23258
  "(press tab to focus)"
23169
23259
  ] })
23170
23260
  ] }),
23171
- cancelAndTimerContent && /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_jsx_runtime114.Fragment, { children: [
23172
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Box_default, { flexShrink: 0, width: 1 }),
23173
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { color: theme.text.secondary, children: cancelAndTimerContent })
23261
+ cancelAndTimerContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_jsx_runtime115.Fragment, { children: [
23262
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { flexShrink: 0, width: 1 }),
23263
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, children: cancelAndTimerContent })
23174
23264
  ] }),
23175
23265
  wittyPhraseNode
23176
23266
  ] });
23177
23267
  }
23178
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Box_default, { paddingLeft: 0, flexDirection: "column", children: [
23179
- /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
23268
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { paddingLeft: 0, flexDirection: "column", children: [
23269
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
23180
23270
  Box_default,
23181
23271
  {
23182
23272
  width: "100%",
23183
23273
  flexDirection: isNarrow ? "column" : "row",
23184
23274
  alignItems: isNarrow ? "flex-start" : "center",
23185
23275
  children: [
23186
- /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Box_default, { children: [
23187
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
23276
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { children: [
23277
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
23188
23278
  GeminiRespondingSpinner,
23189
23279
  {
23190
23280
  nonRespondingDisplay: spinnerIcon ?? (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ ? "\u280F" : ""),
23191
23281
  isHookActive
23192
23282
  }
23193
23283
  ) }),
23194
- primaryText && /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Box_default, { flexShrink: 1, children: [
23195
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { color: theme.text.primary, italic: true, wrap: "truncate-end", children: primaryText }),
23196
- primaryText === INTERACTIVE_SHELL_WAITING_PHRASE && /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Text, { color: theme.ui.active, italic: true, children: [
23284
+ primaryText && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { flexShrink: 1, children: [
23285
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.primary, italic: true, wrap: "truncate-end", children: primaryText }),
23286
+ primaryText === INTERACTIVE_SHELL_WAITING_PHRASE && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Text, { color: theme.ui.active, italic: true, children: [
23197
23287
  " ",
23198
23288
  "(press tab to focus)"
23199
23289
  ] })
23200
23290
  ] }),
23201
- !isNarrow && cancelAndTimerContent && /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_jsx_runtime114.Fragment, { children: [
23202
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Box_default, { flexShrink: 0, width: 1 }),
23203
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { color: theme.text.secondary, children: cancelAndTimerContent })
23291
+ !isNarrow && cancelAndTimerContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_jsx_runtime115.Fragment, { children: [
23292
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { flexShrink: 0, width: 1 }),
23293
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, children: cancelAndTimerContent })
23204
23294
  ] }),
23205
23295
  !isNarrow && wittyPhraseNode
23206
23296
  ] }),
23207
- !isNarrow && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Box_default, { flexGrow: 1 }),
23208
- !isNarrow && rightContent && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Box_default, { children: rightContent })
23297
+ !isNarrow && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { flexGrow: 1 }),
23298
+ !isNarrow && rightContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { children: rightContent })
23209
23299
  ]
23210
23300
  }
23211
23301
  ),
23212
- isNarrow && cancelAndTimerContent && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { color: theme.text.secondary, children: cancelAndTimerContent }) }),
23302
+ isNarrow && cancelAndTimerContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, children: cancelAndTimerContent }) }),
23213
23303
  isNarrow && wittyPhraseNode,
23214
- isNarrow && rightContent && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Box_default, { children: rightContent })
23304
+ isNarrow && rightContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { children: rightContent })
23215
23305
  ] });
23216
23306
  };
23217
23307
 
23218
23308
  // packages/cli/src/ui/components/ContextSummaryDisplay.tsx
23219
- var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
23309
+ var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
23220
23310
  var ContextSummaryDisplay = ({
23221
23311
  geminiMdFileCount,
23222
23312
  contextFileNames,
@@ -23284,14 +23374,14 @@ var ContextSummaryDisplay = ({
23284
23374
  skillText,
23285
23375
  backgroundText
23286
23376
  ].filter(Boolean);
23287
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { paddingX: 1, flexDirection: "row", flexWrap: "wrap", children: summaryParts.map((part, index) => /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { flexDirection: "row", children: [
23288
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, children: " \xB7 " }),
23289
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, children: part })
23377
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Box_default, { paddingX: 1, flexDirection: "row", flexWrap: "wrap", children: summaryParts.map((part, index) => /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Box_default, { flexDirection: "row", children: [
23378
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: " \xB7 " }),
23379
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: part })
23290
23380
  ] }, index)) });
23291
23381
  };
23292
23382
 
23293
23383
  // packages/cli/src/ui/components/StatusDisplay.tsx
23294
- var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
23384
+ var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
23295
23385
  var StatusDisplay = ({
23296
23386
  hideContextSummary
23297
23387
  }) => {
@@ -23299,10 +23389,10 @@ var StatusDisplay = ({
23299
23389
  const settings = useSettings();
23300
23390
  const config = useConfig();
23301
23391
  if (process.env["GEMINI_SYSTEM_MD"]) {
23302
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.status.error, children: "|\u2310\u25A0_\u25A0|" });
23392
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Text, { color: theme.status.error, children: "|\u2310\u25A0_\u25A0|" });
23303
23393
  }
23304
23394
  if (!settings.merged.ui.hideContextSummary && !hideContextSummary) {
23305
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
23395
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
23306
23396
  ContextSummaryDisplay,
23307
23397
  {
23308
23398
  ideContext: uiState.ideContextState,
@@ -23319,11 +23409,11 @@ var StatusDisplay = ({
23319
23409
  };
23320
23410
 
23321
23411
  // packages/cli/src/ui/components/shared/HorizontalLine.tsx
23322
- var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
23412
+ var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
23323
23413
  var HorizontalLine = ({
23324
23414
  color = theme.border.default,
23325
23415
  dim = false
23326
- }) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
23416
+ }) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
23327
23417
  Box_default,
23328
23418
  {
23329
23419
  width: "100%",
@@ -23338,7 +23428,7 @@ var HorizontalLine = ({
23338
23428
  );
23339
23429
 
23340
23430
  // packages/cli/src/ui/components/ApprovalModeIndicator.tsx
23341
- var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
23431
+ var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
23342
23432
  var ApprovalModeIndicator = ({
23343
23433
  approvalMode,
23344
23434
  allowPlanMode
@@ -23371,9 +23461,9 @@ var ApprovalModeIndicator = ({
23371
23461
  subText = `${cycleHint} to accept edits`;
23372
23462
  break;
23373
23463
  }
23374
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(Text, { color: textColor, children: [
23464
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(Text, { color: textColor, children: [
23375
23465
  textContent ? textContent : null,
23376
- subText ? /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(Text, { color: theme.text.secondary, children: [
23466
+ subText ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(Text, { color: theme.text.secondary, children: [
23377
23467
  textContent ? " " : "",
23378
23468
  subText
23379
23469
  ] }) : null
@@ -23381,19 +23471,19 @@ var ApprovalModeIndicator = ({
23381
23471
  };
23382
23472
 
23383
23473
  // packages/cli/src/ui/components/ShellModeIndicator.tsx
23384
- var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
23385
- var ShellModeIndicator = () => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(Text, { color: theme.ui.symbol, children: [
23474
+ var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
23475
+ var ShellModeIndicator = () => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(Text, { color: theme.ui.symbol, children: [
23386
23476
  "shell mode enabled",
23387
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Text, { color: theme.text.secondary, children: " (esc to disable)" })
23477
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Text, { color: theme.text.secondary, children: " (esc to disable)" })
23388
23478
  ] }) });
23389
23479
 
23390
23480
  // packages/cli/src/ui/components/RawMarkdownIndicator.tsx
23391
- var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
23481
+ var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
23392
23482
  var RawMarkdownIndicator = () => {
23393
23483
  const modKey = formatCommand("app.toggleMarkdown" /* TOGGLE_MARKDOWN */);
23394
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(Text, { children: [
23484
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Text, { children: [
23395
23485
  "raw markdown mode",
23396
- /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(Text, { color: theme.text.secondary, children: [
23486
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Text, { color: theme.text.secondary, children: [
23397
23487
  " (",
23398
23488
  modKey,
23399
23489
  " to toggle) "
@@ -23465,7 +23555,7 @@ var useComposerStatus = () => {
23465
23555
  };
23466
23556
 
23467
23557
  // packages/cli/src/ui/components/StatusRow.tsx
23468
- var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
23558
+ var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
23469
23559
  var LAYOUT = {
23470
23560
  STATUS_MIN_HEIGHT: 1,
23471
23561
  TIP_LEFT_MARGIN: 2,
@@ -23537,7 +23627,7 @@ var StatusNode = ({
23537
23627
  } else {
23538
23628
  currentThought = thought ? { ...thought, subject: stripAnsi(thought.subject) } : null;
23539
23629
  }
23540
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { ref: onRefChange, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
23630
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { ref: onRefChange, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
23541
23631
  LoadingIndicator,
23542
23632
  {
23543
23633
  inline: true,
@@ -23619,7 +23709,7 @@ var StatusRow = ({
23619
23709
  const onStatusResize = (0, import_react85.useCallback)((width) => {
23620
23710
  if (width > 0) setStatusWidth(width);
23621
23711
  }, []);
23622
- const statusNode = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
23712
+ const statusNode = /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
23623
23713
  StatusNode,
23624
23714
  {
23625
23715
  showTips,
@@ -23637,7 +23727,7 @@ var StatusRow = ({
23637
23727
  if (!tipContentStr) return null;
23638
23728
  const isShortcutHint = tipContentStr === "? for shortcuts" || tipContentStr === "press tab twice for more";
23639
23729
  const color = isShortcutHint && uiState.shortcutsHelpVisible ? theme.text.accent : theme.text.secondary;
23640
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { flexDirection: "row", justifyContent: "flex-end", ref: onTipRefChange, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
23730
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { flexDirection: "row", justifyContent: "flex-end", ref: onTipRefChange, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
23641
23731
  Text,
23642
23732
  {
23643
23733
  color,
@@ -23648,10 +23738,10 @@ var StatusRow = ({
23648
23738
  ) });
23649
23739
  };
23650
23740
  if (!showUiDetails && !showRow1Minimal && !showRow2Minimal) {
23651
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { height: LAYOUT.STATUS_MIN_HEIGHT });
23741
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { height: LAYOUT.STATUS_MIN_HEIGHT });
23652
23742
  }
23653
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
23654
- showRow1 && /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
23743
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
23744
+ showRow1 && /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
23655
23745
  Box_default,
23656
23746
  {
23657
23747
  width: "100%",
@@ -23660,13 +23750,13 @@ var StatusRow = ({
23660
23750
  justifyContent: "space-between",
23661
23751
  minHeight: LAYOUT.STATUS_MIN_HEIGHT,
23662
23752
  children: [
23663
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { flexDirection: "row", flexGrow: 1, flexShrink: 1, children: !showUiDetails && showRow1Minimal ? /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Box_default, { flexDirection: "row", columnGap: 1, children: [
23753
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { flexDirection: "row", flexGrow: 1, flexShrink: 1, children: !showUiDetails && showRow1Minimal ? /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Box_default, { flexDirection: "row", columnGap: 1, children: [
23664
23754
  statusNode,
23665
- !showUiDetails && showRow2Minimal && modeContentObj && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Text, { color: modeContentObj.color, children: [
23755
+ !showUiDetails && showRow2Minimal && modeContentObj && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { color: modeContentObj.color, children: [
23666
23756
  "\u25CF ",
23667
23757
  modeContentObj.text
23668
23758
  ] }) })
23669
- ] }) : isInteractiveShellWaiting ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { width: "100%", marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Text, { color: theme.status.warning, children: INTERACTIVE_SHELL_WAITING_PHRASE }) }) : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
23759
+ ] }) : isInteractiveShellWaiting ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { width: "100%", marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Text, { color: theme.status.warning, children: INTERACTIVE_SHELL_WAITING_PHRASE }) }) : /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
23670
23760
  Box_default,
23671
23761
  {
23672
23762
  flexDirection: "row",
@@ -23677,7 +23767,7 @@ var StatusRow = ({
23677
23767
  children: statusNode
23678
23768
  }
23679
23769
  ) }),
23680
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
23770
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
23681
23771
  Box_default,
23682
23772
  {
23683
23773
  flexShrink: 0,
@@ -23691,8 +23781,8 @@ var StatusRow = ({
23691
23781
  ]
23692
23782
  }
23693
23783
  ),
23694
- showRow1 && showRow2 && (showUiDetails || showRow1Minimal && showRow2Minimal) && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(HorizontalLine, { dim: true }) }),
23695
- showRow2 && /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
23784
+ showRow1 && showRow2 && (showUiDetails || showRow1Minimal && showRow2Minimal) && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(HorizontalLine, { dim: true }) }),
23785
+ showRow2 && /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
23696
23786
  Box_default,
23697
23787
  {
23698
23788
  width: "100%",
@@ -23700,29 +23790,29 @@ var StatusRow = ({
23700
23790
  alignItems: isNarrow ? "flex-start" : "center",
23701
23791
  justifyContent: "space-between",
23702
23792
  children: [
23703
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
23793
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
23704
23794
  Box_default,
23705
23795
  {
23706
23796
  flexDirection: "row",
23707
23797
  alignItems: "center",
23708
23798
  marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN,
23709
- children: showUiDetails ? /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_jsx_runtime121.Fragment, { children: [
23710
- !hideUiDetailsForSuggestions && !inputState.shellModeActive && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
23799
+ children: showUiDetails ? /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, { children: [
23800
+ !hideUiDetailsForSuggestions && !inputState.shellModeActive && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
23711
23801
  ApprovalModeIndicator,
23712
23802
  {
23713
23803
  approvalMode: uiState.showApprovalModeIndicator,
23714
23804
  allowPlanMode: uiState.allowPlanMode
23715
23805
  }
23716
23806
  ),
23717
- inputState.shellModeActive && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ShellModeIndicator, {}) }),
23718
- !uiState.renderMarkdown && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(RawMarkdownIndicator, {}) })
23719
- ] }) : showRow2Minimal && modeContentObj && /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Text, { color: modeContentObj.color, children: [
23807
+ inputState.shellModeActive && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ShellModeIndicator, {}) }),
23808
+ !uiState.renderMarkdown && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RawMarkdownIndicator, {}) })
23809
+ ] }) : showRow2Minimal && modeContentObj && /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { color: modeContentObj.color, children: [
23720
23810
  "\u25CF ",
23721
23811
  modeContentObj.text
23722
23812
  ] })
23723
23813
  }
23724
23814
  ),
23725
- /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
23815
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
23726
23816
  Box_default,
23727
23817
  {
23728
23818
  marginTop: isNarrow ? LAYOUT.CONTEXT_DISPLAY_TOP_MARGIN_NARROW : 0,
@@ -23730,8 +23820,8 @@ var StatusRow = ({
23730
23820
  alignItems: "center",
23731
23821
  marginLeft: isNarrow ? LAYOUT.CONTEXT_DISPLAY_LEFT_MARGIN_NARROW : LAYOUT.CONTEXT_DISPLAY_LEFT_MARGIN_WIDE,
23732
23822
  children: [
23733
- (showUiDetails || showMinimalContext) && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(StatusDisplay, { hideContextSummary }),
23734
- showMinimalContext && !showUiDetails && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
23823
+ (showUiDetails || showMinimalContext) && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(StatusDisplay, { hideContextSummary }),
23824
+ showMinimalContext && !showUiDetails && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
23735
23825
  ContextUsageDisplay,
23736
23826
  {
23737
23827
  promptTokenCount: uiState.sessionStats.lastPromptTokenCount,
@@ -23749,7 +23839,7 @@ var StatusRow = ({
23749
23839
  };
23750
23840
 
23751
23841
  // packages/cli/src/ui/components/QueuedMessageDisplay.tsx
23752
- var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
23842
+ var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
23753
23843
  var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
23754
23844
  var QueuedMessageDisplay = ({
23755
23845
  messageQueue: messageQueue2
@@ -23757,13 +23847,13 @@ var QueuedMessageDisplay = ({
23757
23847
  if (messageQueue2.length === 0) {
23758
23848
  return null;
23759
23849
  }
23760
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
23761
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Text, { dimColor: true, children: "Queued (press \u2191 to edit):" }) }),
23850
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
23851
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Text, { dimColor: true, children: "Queued (press \u2191 to edit):" }) }),
23762
23852
  messageQueue2.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
23763
23853
  const preview = message.replace(/\s+/g, " ");
23764
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { paddingLeft: 4, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Text, { dimColor: true, wrap: "truncate", children: preview }) }, index);
23854
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { paddingLeft: 4, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Text, { dimColor: true, wrap: "truncate", children: preview }) }, index);
23765
23855
  }),
23766
- messageQueue2.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { paddingLeft: 4, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { dimColor: true, children: [
23856
+ messageQueue2.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { paddingLeft: 4, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { dimColor: true, children: [
23767
23857
  "... (+",
23768
23858
  messageQueue2.length - MAX_DISPLAYED_QUEUED_MESSAGES,
23769
23859
  " more)"
@@ -23773,7 +23863,7 @@ var QueuedMessageDisplay = ({
23773
23863
 
23774
23864
  // packages/cli/src/ui/components/ConfigInitDisplay.tsx
23775
23865
  var import_react86 = __toESM(require_react(), 1);
23776
- var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
23866
+ var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
23777
23867
  var ConfigInitDisplay = ({
23778
23868
  message: initialMessage = "Working..."
23779
23869
  }) => {
@@ -23814,10 +23904,10 @@ var ConfigInitDisplay = ({
23814
23904
  coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
23815
23905
  };
23816
23906
  }, [initialMessage]);
23817
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
23818
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(GeminiSpinner, {}),
23907
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(Text, { children: [
23908
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(GeminiSpinner, {}),
23819
23909
  " ",
23820
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Text, { color: theme.text.primary, children: message })
23910
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Text, { color: theme.text.primary, children: message })
23821
23911
  ] }) });
23822
23912
  };
23823
23913
 
@@ -23828,21 +23918,21 @@ var import_react88 = __toESM(require_react(), 1);
23828
23918
  var import_react87 = __toESM(require_react(), 1);
23829
23919
 
23830
23920
  // packages/cli/src/ui/components/ChecklistItem.tsx
23831
- var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
23921
+ var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
23832
23922
  var ChecklistStatusDisplay = ({
23833
23923
  status
23834
23924
  }) => {
23835
23925
  switch (status) {
23836
23926
  case "completed":
23837
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Text, { color: theme.status.success, "aria-label": "Completed", children: "\u2713" });
23927
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.status.success, "aria-label": "Completed", children: "\u2713" });
23838
23928
  case "in_progress":
23839
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Text, { color: theme.text.accent, "aria-label": "In Progress", children: "\xBB" });
23929
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.text.accent, "aria-label": "In Progress", children: "\xBB" });
23840
23930
  case "pending":
23841
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Text, { color: theme.text.secondary, "aria-label": "Pending", children: "\u2610" });
23931
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.text.secondary, "aria-label": "Pending", children: "\u2610" });
23842
23932
  case "cancelled":
23843
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Text, { color: theme.status.error, "aria-label": "Cancelled", children: "\u2717" });
23933
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.status.error, "aria-label": "Cancelled", children: "\u2717" });
23844
23934
  case "blocked":
23845
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Text, { color: theme.status.warning, "aria-label": "Blocked", children: "\u26D4" });
23935
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.status.warning, "aria-label": "Blocked", children: "\u26D4" });
23846
23936
  default:
23847
23937
  checkExhaustive(status);
23848
23938
  }
@@ -23867,14 +23957,14 @@ var ChecklistItem = ({
23867
23957
  }
23868
23958
  })();
23869
23959
  const strikethrough = item.status === "cancelled";
23870
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(Box_default, { flexDirection: "row", columnGap: 1, "aria-role": ariaRole, children: [
23871
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ChecklistStatusDisplay, { status: item.status }),
23872
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Box_default, { flexShrink: 1, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Text, { color: textColor, wrap, strikethrough, children: item.label }) })
23960
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Box_default, { flexDirection: "row", columnGap: 1, "aria-role": ariaRole, children: [
23961
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ChecklistStatusDisplay, { status: item.status }),
23962
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { flexShrink: 1, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: textColor, wrap, strikethrough, children: item.label }) })
23873
23963
  ] });
23874
23964
  };
23875
23965
 
23876
23966
  // packages/cli/src/ui/components/Checklist.tsx
23877
- var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
23967
+ var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
23878
23968
  var ChecklistTitleDisplay = ({ title, items, toggleHint }) => {
23879
23969
  const score = (0, import_react87.useMemo)(() => {
23880
23970
  let total = 0;
@@ -23889,9 +23979,9 @@ var ChecklistTitleDisplay = ({ title, items, toggleHint }) => {
23889
23979
  }
23890
23980
  return `${completed}/${total} completed`;
23891
23981
  }, [items]);
23892
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Box_default, { flexDirection: "row", columnGap: 2, height: 1, children: [
23893
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.text.primary, bold: true, "aria-label": `${title} list`, children: title }),
23894
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Text, { color: theme.text.secondary, children: [
23982
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Box_default, { flexDirection: "row", columnGap: 2, height: 1, children: [
23983
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Text, { color: theme.text.primary, bold: true, "aria-label": `${title} list`, children: title }),
23984
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Text, { color: theme.text.secondary, children: [
23895
23985
  score,
23896
23986
  toggleHint ? ` (${toggleHint})` : ""
23897
23987
  ] })
@@ -23899,7 +23989,7 @@ var ChecklistTitleDisplay = ({ title, items, toggleHint }) => {
23899
23989
  };
23900
23990
  var ChecklistListDisplay = ({
23901
23991
  items
23902
- }) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { flexDirection: "column", "aria-role": "list", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
23992
+ }) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Box_default, { flexDirection: "column", "aria-role": "list", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23903
23993
  ChecklistItem,
23904
23994
  {
23905
23995
  item,
@@ -23926,7 +24016,7 @@ var Checklist = ({
23926
24016
  if (items.length === 0 || !isExpanded && !hasActiveItems) {
23927
24017
  return null;
23928
24018
  }
23929
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
24019
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23930
24020
  Box_default,
23931
24021
  {
23932
24022
  borderStyle: "single",
@@ -23936,8 +24026,8 @@ var Checklist = ({
23936
24026
  borderColor: theme.border.default,
23937
24027
  paddingLeft: 1,
23938
24028
  paddingRight: 1,
23939
- children: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Box_default, { flexDirection: "column", rowGap: 1, children: [
23940
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
24029
+ children: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Box_default, { flexDirection: "column", rowGap: 1, children: [
24030
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23941
24031
  ChecklistTitleDisplay,
23942
24032
  {
23943
24033
  title,
@@ -23945,9 +24035,9 @@ var Checklist = ({
23945
24035
  toggleHint
23946
24036
  }
23947
24037
  ),
23948
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ChecklistListDisplay, { items })
23949
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Box_default, { flexDirection: "row", columnGap: 1, height: 1, children: [
23950
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
24038
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ChecklistListDisplay, { items })
24039
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Box_default, { flexDirection: "row", columnGap: 1, height: 1, children: [
24040
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Box_default, { flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23951
24041
  ChecklistTitleDisplay,
23952
24042
  {
23953
24043
  title,
@@ -23955,14 +24045,14 @@ var Checklist = ({
23955
24045
  toggleHint
23956
24046
  }
23957
24047
  ) }),
23958
- inProgress && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { flexShrink: 1, flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ChecklistItem, { item: inProgress, wrap: "truncate" }) })
24048
+ inProgress && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Box_default, { flexShrink: 1, flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ChecklistItem, { item: inProgress, wrap: "truncate" }) })
23959
24049
  ] })
23960
24050
  }
23961
24051
  );
23962
24052
  };
23963
24053
 
23964
24054
  // packages/cli/src/ui/components/messages/Todo.tsx
23965
- var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
24055
+ var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
23966
24056
  var TodoTray = () => {
23967
24057
  const uiState = useUIState();
23968
24058
  const todos = (0, import_react88.useMemo)(() => {
@@ -23993,7 +24083,7 @@ var TodoTray = () => {
23993
24083
  if (!todos || !todos.todos) {
23994
24084
  return null;
23995
24085
  }
23996
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
24086
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
23997
24087
  Checklist,
23998
24088
  {
23999
24089
  title: "Todo",
@@ -24005,7 +24095,7 @@ var TodoTray = () => {
24005
24095
  };
24006
24096
 
24007
24097
  // packages/cli/src/ui/components/Composer.tsx
24008
- var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
24098
+ var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
24009
24099
  var Composer = ({ isFocused = true }) => {
24010
24100
  const uiState = useUIState();
24011
24101
  const inputState = useInputState();
@@ -24046,7 +24136,7 @@ var Composer = ({ isFocused = true }) => {
24046
24136
  const showToast = shouldShowToast(uiState, inputState);
24047
24137
  const hideUiDetailsForSuggestions = suggestionsVisible && suggestionsPosition === "above";
24048
24138
  const showMinimalToast = showToast;
24049
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
24139
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
24050
24140
  Box_default,
24051
24141
  {
24052
24142
  flexDirection: "column",
@@ -24054,12 +24144,12 @@ var Composer = ({ isFocused = true }) => {
24054
24144
  flexGrow: 0,
24055
24145
  flexShrink: 0,
24056
24146
  children: [
24057
- uiState.isResuming && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ConfigInitDisplay, { message: "Resuming session..." }),
24058
- showUiDetails && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(QueuedMessageDisplay, { messageQueue: uiState.messageQueue }),
24059
- showUiDetails && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(TodoTray, {}),
24060
- showShortcutsHelp && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ShortcutsHelp, {}),
24061
- (showUiDetails || showMinimalToast) && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Box_default, { minHeight: 1, marginLeft: isNarrow ? 0 : 1, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ToastDisplay, {}) }),
24062
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Box_default, { width: "100%", flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
24147
+ uiState.isResuming && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ConfigInitDisplay, { message: "Resuming session..." }),
24148
+ showUiDetails && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(QueuedMessageDisplay, { messageQueue: uiState.messageQueue }),
24149
+ showUiDetails && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(TodoTray, {}),
24150
+ showShortcutsHelp && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ShortcutsHelp, {}),
24151
+ (showUiDetails || showMinimalToast) && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Box_default, { minHeight: 1, marginLeft: isNarrow ? 0 : 1, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ToastDisplay, {}) }),
24152
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Box_default, { width: "100%", flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
24063
24153
  StatusRow,
24064
24154
  {
24065
24155
  showUiDetails,
@@ -24070,8 +24160,8 @@ var Composer = ({ isFocused = true }) => {
24070
24160
  hasPendingActionRequired
24071
24161
  }
24072
24162
  ) }),
24073
- showUiDetails && uiState.showErrorDetails && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(OverflowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(Box_default, { flexDirection: "column", children: [
24074
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
24163
+ showUiDetails && uiState.showErrorDetails && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(OverflowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Box_default, { flexDirection: "column", children: [
24164
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
24075
24165
  DetailedMessagesDisplay,
24076
24166
  {
24077
24167
  maxHeight: uiState.constrainHeight ? debugConsoleMaxHeight : void 0,
@@ -24079,9 +24169,9 @@ var Composer = ({ isFocused = true }) => {
24079
24169
  hasFocus: uiState.showErrorDetails
24080
24170
  }
24081
24171
  ),
24082
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ShowMoreLines, { constrainHeight: uiState.constrainHeight })
24172
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ShowMoreLines, { constrainHeight: uiState.constrainHeight })
24083
24173
  ] }) }),
24084
- uiState.isInputActive && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
24174
+ uiState.isInputActive && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
24085
24175
  InputPrompt,
24086
24176
  {
24087
24177
  onSubmit: uiActions.handleFinalSubmit,
@@ -24105,19 +24195,19 @@ var Composer = ({ isFocused = true }) => {
24105
24195
  onSuggestionsVisibilityChange: setSuggestionsVisible
24106
24196
  }
24107
24197
  ),
24108
- showUiDetails && !settings.merged.ui.hideFooter && !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Footer, {})
24198
+ showUiDetails && !settings.merged.ui.hideFooter && !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Footer, {})
24109
24199
  ]
24110
24200
  }
24111
24201
  );
24112
24202
  };
24113
24203
 
24114
24204
  // packages/cli/src/ui/components/ExitWarning.tsx
24115
- var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
24205
+ var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
24116
24206
  var ExitWarning = () => {
24117
24207
  const uiState = useUIState();
24118
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
24119
- uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+C again to exit." }) }),
24120
- uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+D again to exit." }) })
24208
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
24209
+ uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+C again to exit." }) }),
24210
+ uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+D again to exit." }) })
24121
24211
  ] });
24122
24212
  };
24123
24213
 
@@ -24141,12 +24231,12 @@ function useFlickerDetector(rootUiRef, terminalHeight) {
24141
24231
  }
24142
24232
 
24143
24233
  // packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx
24144
- var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
24234
+ var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
24145
24235
  var ScreenReaderAppLayout = () => {
24146
24236
  const uiState = useUIState();
24147
24237
  const { rootUiRef, terminalHeight } = uiState;
24148
24238
  useFlickerDetector(rootUiRef, terminalHeight);
24149
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
24239
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
24150
24240
  Box_default,
24151
24241
  {
24152
24242
  flexDirection: "column",
@@ -24154,27 +24244,27 @@ var ScreenReaderAppLayout = () => {
24154
24244
  height: "100%",
24155
24245
  ref: uiState.rootUiRef,
24156
24246
  children: [
24157
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Notifications, {}),
24158
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Footer, {}),
24159
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(MainContent, {}) }),
24160
- uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
24247
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Notifications, {}),
24248
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Footer, {}),
24249
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(MainContent, {}) }),
24250
+ uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
24161
24251
  DialogManager,
24162
24252
  {
24163
24253
  terminalWidth: uiState.terminalWidth,
24164
24254
  addItem: uiState.historyManager.addItem
24165
24255
  }
24166
- ) : /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Composer, {}),
24167
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ExitWarning, {})
24256
+ ) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Composer, {}),
24257
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ExitWarning, {})
24168
24258
  ]
24169
24259
  }
24170
24260
  );
24171
24261
  };
24172
24262
 
24173
24263
  // packages/cli/src/ui/components/CopyModeWarning.tsx
24174
- var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
24264
+ var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
24175
24265
  var CopyModeWarning = () => {
24176
24266
  const { copyModeEnabled } = useInputState();
24177
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Box_default, { height: 1, children: copyModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Text, { color: theme.status.warning, children: "In Copy Mode. Use Page Up/Down to scroll. Press Ctrl+S or any other key to exit." }) });
24267
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Box_default, { height: 1, children: copyModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text, { color: theme.status.warning, children: "In Copy Mode. Use Page Up/Down to scroll. Press Ctrl+S or any other key to exit." }) });
24178
24268
  };
24179
24269
 
24180
24270
  // packages/cli/src/ui/components/BackgroundTaskDisplay.tsx
@@ -24799,7 +24889,7 @@ ${mainContent}`;
24799
24889
  };
24800
24890
 
24801
24891
  // packages/cli/src/ui/components/BackgroundTaskDisplay.tsx
24802
- var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
24892
+ var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
24803
24893
  var CONTENT_PADDING_X = 1;
24804
24894
  var BORDER_WIDTH = 2;
24805
24895
  var MAIN_BORDER_HEIGHT = 2;
@@ -24932,11 +25022,11 @@ var BackgroundTaskDisplay = ({
24932
25022
  { label: "List", command: "background.toggleList" /* TOGGLE_BACKGROUND_SHELL_LIST */ }
24933
25023
  ];
24934
25024
  const helpTextStr = helpTextParts.map((p) => `${p.label} (${formatCommand(p.command)})`).join(" | ");
24935
- const renderHelpText = () => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text, { children: helpTextParts.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Text, { children: [
25025
+ const renderHelpText = () => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { children: helpTextParts.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text, { children: [
24936
25026
  i > 0 ? " | " : "",
24937
25027
  p.label,
24938
25028
  " (",
24939
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text, { color: theme.text.accent, children: formatCommand(p.command) }),
25029
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { color: theme.text.accent, children: formatCommand(p.command) }),
24940
25030
  ")"
24941
25031
  ] }, p.label)) });
24942
25032
  const renderTabs = () => {
@@ -24967,7 +25057,7 @@ var BackgroundTaskDisplay = ({
24967
25057
  }
24968
25058
  const isActive = shell.pid === activePid;
24969
25059
  tabs.push(
24970
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
25060
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
24971
25061
  Text,
24972
25062
  {
24973
25063
  color: isActive ? theme.text.primary : theme.text.secondary,
@@ -24985,7 +25075,7 @@ var BackgroundTaskDisplay = ({
24985
25075
  const shouldShowOverflow = tabs.length > 1 || availableWidth - currentWidth >= overflowWidth;
24986
25076
  if (shouldShowOverflow) {
24987
25077
  tabs.push(
24988
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text, { color: theme.status.warning, bold: true, children: overflowLabel }, "overflow")
25078
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { color: theme.status.warning, bold: true, children: overflowLabel }, "overflow")
24989
25079
  );
24990
25080
  }
24991
25081
  }
@@ -25014,9 +25104,9 @@ var BackgroundTaskDisplay = ({
25014
25104
  };
25015
25105
  });
25016
25106
  const initialIndex = items.findIndex((item) => item.value === activePid);
25017
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Box_default, { flexDirection: "column", height: "100%", width: "100%", children: [
25018
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Box_default, { flexShrink: 0, marginBottom: 1, paddingTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text, { bold: true, children: `Select Process (${formatCommand("background.select" /* BACKGROUND_SHELL_SELECT */)} to select, ${formatCommand("background.kill" /* KILL_BACKGROUND_SHELL */)} to kill, ${formatCommand("background.escape" /* BACKGROUND_SHELL_ESCAPE */)} to cancel):` }) }),
25019
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Box_default, { flexGrow: 1, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
25107
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Box_default, { flexDirection: "column", height: "100%", width: "100%", children: [
25108
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { flexShrink: 0, marginBottom: 1, paddingTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { bold: true, children: `Select Process (${formatCommand("background.select" /* BACKGROUND_SHELL_SELECT */)} to select, ${formatCommand("background.kill" /* KILL_BACKGROUND_SHELL */)} to kill, ${formatCommand("background.escape" /* BACKGROUND_SHELL_ESCAPE */)} to cancel):` }) }),
25109
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { flexGrow: 1, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
25020
25110
  RadioButtonSelect,
25021
25111
  {
25022
25112
  items,
@@ -25033,17 +25123,17 @@ var BackgroundTaskDisplay = ({
25033
25123
  ),
25034
25124
  renderItem: (item, { isSelected: _isSelected, titleColor: _titleColor }) => {
25035
25125
  const shell = shells.get(item.value);
25036
- if (!shell) return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text, { children: item.label });
25126
+ if (!shell) return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { children: item.label });
25037
25127
  const truncatedCommand = formatShellCommandForDisplay(
25038
25128
  shell.command,
25039
25129
  maxCommandLength
25040
25130
  );
25041
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Text, { children: [
25131
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text, { children: [
25042
25132
  truncatedCommand,
25043
25133
  " (PID: ",
25044
25134
  shell.pid,
25045
25135
  ")",
25046
- shell.status === "exited" ? /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
25136
+ shell.status === "exited" ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
25047
25137
  Text,
25048
25138
  {
25049
25139
  color: shell.exitCode === 0 ? theme.status.success : theme.status.error,
@@ -25069,23 +25159,23 @@ var BackgroundTaskDisplay = ({
25069
25159
  tildeifyPath(logPath),
25070
25160
  width - LOG_PATH_OVERHEAD
25071
25161
  );
25072
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Text, { color: theme.text.secondary, children: [
25162
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text, { color: theme.text.secondary, children: [
25073
25163
  "Log: ",
25074
25164
  displayPath
25075
25165
  ] }) });
25076
25166
  };
25077
25167
  const renderOutput = () => {
25078
25168
  const lines = typeof output === "string" ? output.split("\n") : output;
25079
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
25169
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
25080
25170
  ScrollableListWithForwardRef,
25081
25171
  {
25082
25172
  ref: outputRef,
25083
25173
  data: lines,
25084
25174
  renderItem: ({ item: line, index }) => {
25085
25175
  if (typeof line === "string") {
25086
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text, { children: line }, index);
25176
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { children: line }, index);
25087
25177
  }
25088
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text, { wrap: "truncate", children: line.length > 0 ? line.map((token, tokenIndex) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
25178
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { wrap: "truncate", children: line.length > 0 ? line.map((token, tokenIndex) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
25089
25179
  Text,
25090
25180
  {
25091
25181
  color: token.fg,
@@ -25107,7 +25197,7 @@ var BackgroundTaskDisplay = ({
25107
25197
  }
25108
25198
  );
25109
25199
  };
25110
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
25200
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
25111
25201
  Box_default,
25112
25202
  {
25113
25203
  flexDirection: "column",
@@ -25116,7 +25206,7 @@ var BackgroundTaskDisplay = ({
25116
25206
  borderStyle: "single",
25117
25207
  borderColor: isFocused ? theme.ui.focus : void 0,
25118
25208
  children: [
25119
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
25209
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
25120
25210
  Box_default,
25121
25211
  {
25122
25212
  flexDirection: "row",
@@ -25129,9 +25219,9 @@ var BackgroundTaskDisplay = ({
25129
25219
  paddingX: 1,
25130
25220
  borderColor: isFocused ? theme.ui.focus : void 0,
25131
25221
  children: [
25132
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Box_default, { flexDirection: "row", children: [
25222
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Box_default, { flexDirection: "row", children: [
25133
25223
  renderTabs(),
25134
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Text, { bold: true, children: [
25224
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text, { bold: true, children: [
25135
25225
  " ",
25136
25226
  "(PID: ",
25137
25227
  activeShell?.pid,
@@ -25143,7 +25233,7 @@ var BackgroundTaskDisplay = ({
25143
25233
  ]
25144
25234
  }
25145
25235
  ),
25146
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", paddingX: CONTENT_PADDING_X, children: isListOpenProp ? renderProcessList() : renderOutput() }),
25236
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", paddingX: CONTENT_PADDING_X, children: isListOpenProp ? renderProcessList() : renderOutput() }),
25147
25237
  renderFooter()
25148
25238
  ]
25149
25239
  }
@@ -25151,14 +25241,14 @@ var BackgroundTaskDisplay = ({
25151
25241
  };
25152
25242
 
25153
25243
  // packages/cli/src/ui/layouts/DefaultAppLayout.tsx
25154
- var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
25244
+ var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
25155
25245
  var DefaultAppLayout = () => {
25156
25246
  const uiState = useUIState();
25157
25247
  const { copyModeEnabled } = useInputState();
25158
25248
  const isAlternateBuffer = useAlternateBuffer();
25159
25249
  const { rootUiRef, terminalHeight } = uiState;
25160
25250
  useFlickerDetector(rootUiRef, terminalHeight);
25161
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
25251
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
25162
25252
  Box_default,
25163
25253
  {
25164
25254
  flexDirection: "column",
@@ -25169,8 +25259,8 @@ var DefaultAppLayout = () => {
25169
25259
  flexGrow: 0,
25170
25260
  ref: uiState.rootUiRef,
25171
25261
  children: [
25172
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MainContent, {}),
25173
- uiState.isBackgroundTaskVisible && uiState.backgroundTasks.size > 0 && uiState.activeBackgroundTaskPid && uiState.backgroundTaskHeight > 0 && uiState.streamingState !== "waiting_for_confirmation" /* WaitingForConfirmation */ && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { height: uiState.backgroundTaskHeight, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
25262
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(MainContent, {}),
25263
+ uiState.isBackgroundTaskVisible && uiState.backgroundTasks.size > 0 && uiState.activeBackgroundTaskPid && uiState.backgroundTaskHeight > 0 && uiState.streamingState !== "waiting_for_confirmation" /* WaitingForConfirmation */ && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Box_default, { height: uiState.backgroundTaskHeight, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
25174
25264
  BackgroundTaskDisplay,
25175
25265
  {
25176
25266
  shells: uiState.backgroundTasks,
@@ -25181,7 +25271,7 @@ var DefaultAppLayout = () => {
25181
25271
  isListOpenProp: uiState.isBackgroundTaskListOpen
25182
25272
  }
25183
25273
  ) }),
25184
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
25274
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
25185
25275
  Box_default,
25186
25276
  {
25187
25277
  flexDirection: "column",
@@ -25191,16 +25281,16 @@ var DefaultAppLayout = () => {
25191
25281
  width: uiState.terminalWidth,
25192
25282
  height: copyModeEnabled ? uiState.stableControlsHeight : void 0,
25193
25283
  children: [
25194
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Notifications, {}),
25195
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CopyModeWarning, {}),
25196
- uiState.customDialog ? uiState.customDialog : uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
25284
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Notifications, {}),
25285
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(CopyModeWarning, {}),
25286
+ uiState.customDialog ? uiState.customDialog : uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
25197
25287
  DialogManager,
25198
25288
  {
25199
25289
  terminalWidth: uiState.terminalWidth,
25200
25290
  addItem: uiState.historyManager.addItem
25201
25291
  }
25202
- ) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Composer, { isFocused: true }),
25203
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ExitWarning, {})
25292
+ ) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Composer, { isFocused: true }),
25293
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ExitWarning, {})
25204
25294
  ]
25205
25295
  }
25206
25296
  )
@@ -25210,13 +25300,13 @@ var DefaultAppLayout = () => {
25210
25300
  };
25211
25301
 
25212
25302
  // packages/cli/src/ui/components/AlternateBufferQuittingDisplay.tsx
25213
- var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
25303
+ var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
25214
25304
  var AlternateBufferQuittingDisplay = () => {
25215
25305
  const { version } = useAppContext();
25216
25306
  const uiState = useUIState();
25217
25307
  const confirmingTool = useConfirmingTool();
25218
25308
  const showPromptedTool = confirmingTool !== null;
25219
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
25309
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
25220
25310
  Box_default,
25221
25311
  {
25222
25312
  flexDirection: "column",
@@ -25224,8 +25314,8 @@ var AlternateBufferQuittingDisplay = () => {
25224
25314
  flexGrow: 0,
25225
25315
  width: uiState.terminalWidth,
25226
25316
  children: [
25227
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(AppHeader, { version }, "app-header"),
25228
- uiState.history.map((h) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
25317
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(AppHeader, { version }, "app-header"),
25318
+ uiState.history.map((h) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
25229
25319
  HistoryItemDisplay,
25230
25320
  {
25231
25321
  terminalWidth: uiState.mainAreaWidth,
@@ -25237,7 +25327,7 @@ var AlternateBufferQuittingDisplay = () => {
25237
25327
  },
25238
25328
  h.id
25239
25329
  )),
25240
- uiState.pendingHistoryItems.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
25330
+ uiState.pendingHistoryItems.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
25241
25331
  HistoryItemDisplay,
25242
25332
  {
25243
25333
  availableTerminalHeight: void 0,
@@ -25247,17 +25337,17 @@ var AlternateBufferQuittingDisplay = () => {
25247
25337
  },
25248
25338
  i
25249
25339
  )),
25250
- showPromptedTool && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [
25251
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Text, { color: theme.status.warning, bold: true, children: "Action Required (was prompted):" }),
25252
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(Box_default, { marginTop: 1, children: [
25253
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
25340
+ showPromptedTool && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [
25341
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Text, { color: theme.status.warning, bold: true, children: "Action Required (was prompted):" }),
25342
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Box_default, { marginTop: 1, children: [
25343
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
25254
25344
  ToolStatusIndicator,
25255
25345
  {
25256
25346
  status: confirmingTool.tool.status,
25257
25347
  name: confirmingTool.tool.name
25258
25348
  }
25259
25349
  ),
25260
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
25350
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
25261
25351
  ToolInfo,
25262
25352
  {
25263
25353
  name: confirmingTool.tool.name,
@@ -25268,26 +25358,26 @@ var AlternateBufferQuittingDisplay = () => {
25268
25358
  )
25269
25359
  ] })
25270
25360
  ] }),
25271
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(QuittingDisplay, {})
25361
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(QuittingDisplay, {})
25272
25362
  ]
25273
25363
  }
25274
25364
  );
25275
25365
  };
25276
25366
 
25277
25367
  // packages/cli/src/ui/App.tsx
25278
- var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
25368
+ var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
25279
25369
  var App = () => {
25280
25370
  const uiState = useUIState();
25281
25371
  const isAlternateBuffer = useAlternateBuffer();
25282
25372
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
25283
25373
  if (uiState.quittingMessages) {
25284
25374
  if (isAlternateBuffer) {
25285
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(AlternateBufferQuittingDisplay, {}) });
25375
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(AlternateBufferQuittingDisplay, {}) });
25286
25376
  } else {
25287
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(QuittingDisplay, {});
25377
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(QuittingDisplay, {});
25288
25378
  }
25289
25379
  }
25290
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ScreenReaderAppLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DefaultAppLayout, {}) });
25380
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ScreenReaderAppLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DefaultAppLayout, {}) });
25291
25381
  };
25292
25382
 
25293
25383
  // packages/cli/src/ui/AppContainer.tsx
@@ -25323,7 +25413,7 @@ import process7 from "node:process";
25323
25413
 
25324
25414
  // packages/cli/src/ui/contexts/TerminalContext.tsx
25325
25415
  var import_react94 = __toESM(require_react(), 1);
25326
- var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
25416
+ var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
25327
25417
  var TerminalContext = (0, import_react94.createContext)(
25328
25418
  void 0
25329
25419
  );
@@ -25393,7 +25483,7 @@ function TerminalProvider({ children }) {
25393
25483
  stdin.removeListener("data", handleData);
25394
25484
  };
25395
25485
  }, [stdin, subscribers]);
25396
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
25486
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
25397
25487
  TerminalContext.Provider,
25398
25488
  {
25399
25489
  value: { subscribe: subscribe2, unsubscribe, queryTerminalBackground },
@@ -26018,7 +26108,7 @@ var SkillCommandLoader = class {
26018
26108
  };
26019
26109
 
26020
26110
  // packages/cli/src/ui/components/LogoutConfirmationDialog.tsx
26021
- var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
26111
+ var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
26022
26112
  var LogoutConfirmationDialog = ({ onSelect }) => {
26023
26113
  useKeypress(
26024
26114
  (key) => {
@@ -26042,7 +26132,7 @@ var LogoutConfirmationDialog = ({ onSelect }) => {
26042
26132
  key: "exit"
26043
26133
  }
26044
26134
  ];
26045
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Box_default, { flexDirection: "row", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
26135
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Box_default, { flexDirection: "row", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
26046
26136
  Box_default,
26047
26137
  {
26048
26138
  flexDirection: "column",
@@ -26053,12 +26143,12 @@ var LogoutConfirmationDialog = ({ onSelect }) => {
26053
26143
  marginLeft: 1,
26054
26144
  marginRight: 1,
26055
26145
  children: [
26056
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
26057
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text, { bold: true, color: theme.text.primary, children: "You are now signed out" }),
26058
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text, { color: theme.text.secondary, children: "Sign in again to continue using Gemini CLI, or exit the application." })
26146
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
26147
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text, { bold: true, color: theme.text.primary, children: "You are now signed out" }),
26148
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text, { color: theme.text.secondary, children: "Sign in again to continue using Gemini CLI, or exit the application." })
26059
26149
  ] }),
26060
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(RadioButtonSelect, { items: options, onSelect, isFocused: true }),
26061
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Text, { color: theme.text.secondary, children: "(Use Enter to select, Esc to close)" }) })
26150
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(RadioButtonSelect, { items: options, onSelect, isFocused: true }),
26151
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text, { color: theme.text.secondary, children: "(Use Enter to select, Esc to close)" }) })
26062
26152
  ]
26063
26153
  }
26064
26154
  ) });
@@ -26440,6 +26530,15 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
26440
26530
  return { type: "handled" };
26441
26531
  }
26442
26532
  case "quit":
26533
+ if (result.deleteSession) {
26534
+ try {
26535
+ const chatRecordingService = config?.getGeminiClient()?.getChatRecordingService();
26536
+ if (chatRecordingService) {
26537
+ await chatRecordingService.deleteCurrentSessionAsync();
26538
+ }
26539
+ } catch {
26540
+ }
26541
+ }
26443
26542
  actions.quit(result.messages);
26444
26543
  return { type: "handled" };
26445
26544
  case "submit_prompt":
@@ -28970,12 +29069,14 @@ var useAgentStream = ({
28970
29069
  );
28971
29070
  break;
28972
29071
  }
28973
- case "error":
29072
+ case "error": {
29073
+ const message = event._meta?.["code"] === "AGENT_EXECUTION_BLOCKED" ? `Agent execution blocked: ${event.message}` : event.message;
28974
29074
  addItem(
28975
- { type: "error" /* ERROR */, text: event.message },
29075
+ { type: "error" /* ERROR */, text: message },
28976
29076
  userMessageTimestampRef.current
28977
29077
  );
28978
29078
  break;
29079
+ }
28979
29080
  case "initialize":
28980
29081
  case "session_update":
28981
29082
  case "elicitation_request":
@@ -31434,6 +31535,7 @@ async function checkForUpdates(settings) {
31434
31535
  return null;
31435
31536
  }
31436
31537
  const { name, version: currentVersion } = packageJson2;
31538
+ const currentChannel = getChannelFromVersion(currentVersion);
31437
31539
  const isNightly = currentVersion.includes("nightly");
31438
31540
  if (isNightly) {
31439
31541
  const [nightlyUpdate, latestUpdate] = await Promise.all([
@@ -31456,7 +31558,14 @@ async function checkForUpdates(settings) {
31456
31558
  }
31457
31559
  } else {
31458
31560
  const latestUpdate = await latestVersion(name);
31459
- if (latestUpdate && import_semver2.default.gt(latestUpdate, currentVersion)) {
31561
+ if (!latestUpdate) {
31562
+ return null;
31563
+ }
31564
+ const targetChannel = getChannelFromVersion(latestUpdate);
31565
+ if (RELEASE_CHANNEL_STABILITY[targetChannel] < RELEASE_CHANNEL_STABILITY[currentChannel]) {
31566
+ return null;
31567
+ }
31568
+ if (import_semver2.default.gt(latestUpdate, currentVersion)) {
31460
31569
  const message = `Gemini CLI update available! ${currentVersion} \u2192 ${latestUpdate}`;
31461
31570
  const type = import_semver2.default.diff(latestUpdate, currentVersion) || void 0;
31462
31571
  return {
@@ -31766,7 +31875,7 @@ function useSessionResume({
31766
31875
 
31767
31876
  // packages/cli/src/ui/hooks/useIncludeDirsTrust.tsx
31768
31877
  var import_react117 = __toESM(require_react(), 1);
31769
- var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
31878
+ var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
31770
31879
  async function finishAddingDirectories(config, addItem, added, errors) {
31771
31880
  if (!config) {
31772
31881
  addItem({
@@ -31853,7 +31962,7 @@ Please use the permissions command to modify their trust level.`
31853
31962
  undefinedTrustDirs
31854
31963
  );
31855
31964
  setCustomDialog(
31856
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
31965
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
31857
31966
  MultiFolderTrustDialog,
31858
31967
  {
31859
31968
  folders: undefinedTrustDirs,
@@ -32074,43 +32183,6 @@ function useBackgroundTaskManager({
32074
32183
  };
32075
32184
  }
32076
32185
 
32077
- // packages/cli/src/ui/auth/LoginWithGoogleRestartDialog.tsx
32078
- var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
32079
- var LoginWithGoogleRestartDialog = ({
32080
- onDismiss,
32081
- config
32082
- }) => {
32083
- useKeypress(
32084
- (key) => {
32085
- if (key.name === "escape") {
32086
- onDismiss();
32087
- return true;
32088
- } else if (key.name === "r" || key.name === "R") {
32089
- setTimeout(async () => {
32090
- if (process.send) {
32091
- const remoteSettings = config.getRemoteAdminSettings();
32092
- if (remoteSettings) {
32093
- process.send({
32094
- type: "admin-settings-update",
32095
- settings: remoteSettings
32096
- });
32097
- }
32098
- }
32099
- await relaunchApp();
32100
- }, 100);
32101
- return true;
32102
- }
32103
- return false;
32104
- },
32105
- { isActive: true }
32106
- );
32107
- const message = "You've successfully signed in with Google. Gemini CLI needs to be restarted.";
32108
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Box_default, { borderStyle: "round", borderColor: theme.status.warning, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(Text, { color: theme.status.warning, children: [
32109
- message,
32110
- " Press R to restart, or Esc to choose a different authentication method."
32111
- ] }) });
32112
- };
32113
-
32114
32186
  // packages/cli/src/ui/hooks/useTerminalTheme.ts
32115
32187
  var import_react121 = __toESM(require_react(), 1);
32116
32188
  function useTerminalTheme(handleThemeSelect, config, refreshStatic) {
@@ -33097,7 +33169,7 @@ var AppContainer = (props) => {
33097
33169
  );
33098
33170
  (0, import_react127.useEffect)(() => {
33099
33171
  if (authState === "authenticated" /* Authenticated */ && authContext.requiresRestart) {
33100
- setAuthState("awaiting_google_login_restart" /* AwaitingGoogleLoginRestart */);
33172
+ setAuthState("awaiting_login_restart" /* AwaitingLoginRestart */);
33101
33173
  setAuthContext({});
33102
33174
  }
33103
33175
  }, [authState, authContext, setAuthState]);
@@ -33195,10 +33267,8 @@ Logging in with Google... Restarting Gemini CLI to continue.
33195
33267
  async (apiKey) => {
33196
33268
  try {
33197
33269
  onAuthError(null);
33198
- if (!apiKey.trim() && apiKey.length > 1) {
33199
- onAuthError(
33200
- "API key cannot be empty string with length greater than 1."
33201
- );
33270
+ if (!apiKey.trim()) {
33271
+ onAuthError("API key cannot be empty or whitespace only.");
33202
33272
  return;
33203
33273
  }
33204
33274
  await saveApiKey(apiKey);
@@ -34032,7 +34102,7 @@ ${queuedText}` : queuedText;
34032
34102
  if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
34033
34103
  if (settings.merged.general.devtools) {
34034
34104
  void (async () => {
34035
- const { toggleDevToolsPanel } = await import("./devtoolsService-QXOHXSMJ.js");
34105
+ const { toggleDevToolsPanel } = await import("./devtoolsService-DFWZ34A5.js");
34036
34106
  await toggleDevToolsPanel(
34037
34107
  config,
34038
34108
  showErrorDetails,
@@ -34259,7 +34329,9 @@ ${queuedText}` : queuedText;
34259
34329
  };
34260
34330
  }, [historyManager]);
34261
34331
  const nightly = props.version.includes("nightly");
34262
- const dialogsVisible = shouldShowIdePrompt || 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 */ || !!newAgents;
34332
+ const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
34333
+ 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;
34334
+ 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;
34263
34335
  const hasPendingToolConfirmation = (0, import_react127.useMemo)(
34264
34336
  () => isToolAwaitingConfirmation(pendingHistoryItems),
34265
34337
  [pendingHistoryItems]
@@ -34432,6 +34504,8 @@ ${queuedText}` : queuedText;
34432
34504
  accountSuspensionInfo,
34433
34505
  isAuthDialogOpen,
34434
34506
  isAwaitingApiKeyInput: authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */,
34507
+ isAwaitingLoginRestart,
34508
+ loginRestartMessage,
34435
34509
  apiKeyDefaultValue,
34436
34510
  editorError,
34437
34511
  isEditorDialogOpen,
@@ -34635,6 +34709,8 @@ ${queuedText}` : queuedText;
34635
34709
  customDialog,
34636
34710
  apiKeyDefaultValue,
34637
34711
  authState,
34712
+ isAwaitingLoginRestart,
34713
+ loginRestartMessage,
34638
34714
  transientMessage,
34639
34715
  bannerData,
34640
34716
  bannerVisible,
@@ -34707,6 +34783,10 @@ ${queuedText}` : queuedText;
34707
34783
  setActiveBackgroundTaskPid,
34708
34784
  setIsBackgroundTaskListOpen,
34709
34785
  setAuthContext,
34786
+ dismissLoginRestart: () => {
34787
+ setAuthContext({});
34788
+ setAuthState("updating" /* Updating */);
34789
+ },
34710
34790
  onHintInput: () => {
34711
34791
  },
34712
34792
  onHintBackspace: () => {
@@ -34816,18 +34896,6 @@ ${queuedText}` : queuedText;
34816
34896
  setVoiceModeEnabled
34817
34897
  ]
34818
34898
  );
34819
- if (authState === "awaiting_google_login_restart" /* AwaitingGoogleLoginRestart */) {
34820
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
34821
- LoginWithGoogleRestartDialog,
34822
- {
34823
- onDismiss: () => {
34824
- setAuthContext({});
34825
- setAuthState("updating" /* Updating */);
34826
- },
34827
- config
34828
- }
34829
- );
34830
- }
34831
34899
  return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(QuotaContext.Provider, { value: quotaState, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(InputContext.Provider, { value: inputState, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
34832
34900
  AppContext.Provider,
34833
34901
  {
@@ -34927,7 +34995,12 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
34927
34995
  registerCleanup(cleanupLineWrapping);
34928
34996
  }
34929
34997
  checkForUpdates(settings).then((info) => {
34930
- handleAutoUpdate(info, settings, config.getProjectRoot());
34998
+ handleAutoUpdate(
34999
+ info,
35000
+ settings,
35001
+ config.getProjectRoot(),
35002
+ config.getSandboxEnabled()
35003
+ );
34931
35004
  }).catch((err) => {
34932
35005
  if (config.getDebugMode()) {
34933
35006
  debugLogger.warn("Update check failed:", err);