@google/gemini-cli 0.1.0-development.2 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +16 -38
  3. package/bundle/gemini.js +257368 -0
  4. package/{dist/src/utils → bundle}/sandbox-macos-permissive-proxied.sb +1 -1
  5. package/{dist/src/utils → bundle}/sandbox-macos-restrictive-proxied.sb +1 -1
  6. package/bundle/shell.json +18 -0
  7. package/bundle/shell.md +16 -0
  8. package/package.json +72 -67
  9. package/dist/.last_build +0 -0
  10. package/dist/index.d.ts +0 -7
  11. package/dist/index.js +0 -20
  12. package/dist/index.js.map +0 -1
  13. package/dist/package.json +0 -80
  14. package/dist/src/config/auth.d.ts +0 -6
  15. package/dist/src/config/auth.js +0 -33
  16. package/dist/src/config/auth.js.map +0 -1
  17. package/dist/src/config/config.d.ts +0 -13
  18. package/dist/src/config/config.js +0 -211
  19. package/dist/src/config/config.js.map +0 -1
  20. package/dist/src/config/extension.d.ts +0 -20
  21. package/dist/src/config/extension.js +0 -81
  22. package/dist/src/config/extension.js.map +0 -1
  23. package/dist/src/config/sandboxConfig.d.ts +0 -13
  24. package/dist/src/config/sandboxConfig.js +0 -75
  25. package/dist/src/config/sandboxConfig.js.map +0 -1
  26. package/dist/src/config/settings.d.ts +0 -72
  27. package/dist/src/config/settings.js +0 -227
  28. package/dist/src/config/settings.js.map +0 -1
  29. package/dist/src/gemini.d.ts +0 -6
  30. package/dist/src/gemini.js +0 -216
  31. package/dist/src/gemini.js.map +0 -1
  32. package/dist/src/generated/git-commit.d.ts +0 -6
  33. package/dist/src/generated/git-commit.js +0 -9
  34. package/dist/src/generated/git-commit.js.map +0 -1
  35. package/dist/src/nonInteractiveCli.d.ts +0 -7
  36. package/dist/src/nonInteractiveCli.js +0 -115
  37. package/dist/src/nonInteractiveCli.js.map +0 -1
  38. package/dist/src/services/CommandService.d.ts +0 -13
  39. package/dist/src/services/CommandService.js +0 -30
  40. package/dist/src/services/CommandService.js.map +0 -1
  41. package/dist/src/ui/App.d.ts +0 -14
  42. package/dist/src/ui/App.js +0 -391
  43. package/dist/src/ui/App.js.map +0 -1
  44. package/dist/src/ui/colors.d.ts +0 -7
  45. package/dist/src/ui/colors.js +0 -48
  46. package/dist/src/ui/colors.js.map +0 -1
  47. package/dist/src/ui/commands/clearCommand.d.ts +0 -7
  48. package/dist/src/ui/commands/clearCommand.js +0 -15
  49. package/dist/src/ui/commands/clearCommand.js.map +0 -1
  50. package/dist/src/ui/commands/helpCommand.d.ts +0 -7
  51. package/dist/src/ui/commands/helpCommand.js +0 -18
  52. package/dist/src/ui/commands/helpCommand.js.map +0 -1
  53. package/dist/src/ui/commands/memoryCommand.d.ts +0 -7
  54. package/dist/src/ui/commands/memoryCommand.js +0 -81
  55. package/dist/src/ui/commands/memoryCommand.js.map +0 -1
  56. package/dist/src/ui/commands/types.d.ts +0 -63
  57. package/dist/src/ui/commands/types.js +0 -7
  58. package/dist/src/ui/commands/types.js.map +0 -1
  59. package/dist/src/ui/components/AboutBox.d.ts +0 -16
  60. package/dist/src/ui/components/AboutBox.js +0 -6
  61. package/dist/src/ui/components/AboutBox.js.map +0 -1
  62. package/dist/src/ui/components/AsciiArt.d.ts +0 -7
  63. package/dist/src/ui/components/AsciiArt.js +0 -26
  64. package/dist/src/ui/components/AsciiArt.js.map +0 -1
  65. package/dist/src/ui/components/AuthDialog.d.ts +0 -15
  66. package/dist/src/ui/components/AuthDialog.js +0 -66
  67. package/dist/src/ui/components/AuthDialog.js.map +0 -1
  68. package/dist/src/ui/components/AuthInProgress.d.ts +0 -11
  69. package/dist/src/ui/components/AuthInProgress.js +0 -27
  70. package/dist/src/ui/components/AuthInProgress.js.map +0 -1
  71. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +0 -12
  72. package/dist/src/ui/components/AutoAcceptIndicator.js +0 -26
  73. package/dist/src/ui/components/AutoAcceptIndicator.js.map +0 -1
  74. package/dist/src/ui/components/ConsolePatcher.d.ts +0 -12
  75. package/dist/src/ui/components/ConsolePatcher.js +0 -40
  76. package/dist/src/ui/components/ConsolePatcher.js.map +0 -1
  77. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +0 -11
  78. package/dist/src/ui/components/ConsoleSummaryDisplay.js +0 -11
  79. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +0 -1
  80. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +0 -15
  81. package/dist/src/ui/components/ContextSummaryDisplay.js +0 -41
  82. package/dist/src/ui/components/ContextSummaryDisplay.js.map +0 -1
  83. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +0 -14
  84. package/dist/src/ui/components/DetailedMessagesDisplay.js +0 -34
  85. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +0 -1
  86. package/dist/src/ui/components/EditorSettingsDialog.d.ts +0 -15
  87. package/dist/src/ui/components/EditorSettingsDialog.js +0 -73
  88. package/dist/src/ui/components/EditorSettingsDialog.js.map +0 -1
  89. package/dist/src/ui/components/Footer.d.ts +0 -20
  90. package/dist/src/ui/components/Footer.js +0 -13
  91. package/dist/src/ui/components/Footer.js.map +0 -1
  92. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +0 -17
  93. package/dist/src/ui/components/GeminiRespondingSpinner.js +0 -16
  94. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +0 -1
  95. package/dist/src/ui/components/Header.d.ts +0 -12
  96. package/dist/src/ui/components/Header.js +0 -20
  97. package/dist/src/ui/components/Header.js.map +0 -1
  98. package/dist/src/ui/components/Help.d.ts +0 -12
  99. package/dist/src/ui/components/Help.js +0 -10
  100. package/dist/src/ui/components/Help.js.map +0 -1
  101. package/dist/src/ui/components/HistoryItemDisplay.d.ts +0 -18
  102. package/dist/src/ui/components/HistoryItemDisplay.js +0 -17
  103. package/dist/src/ui/components/HistoryItemDisplay.js.map +0 -1
  104. package/dist/src/ui/components/InputPrompt.d.ts +0 -25
  105. package/dist/src/ui/components/InputPrompt.js +0 -280
  106. package/dist/src/ui/components/InputPrompt.js.map +0 -1
  107. package/dist/src/ui/components/LoadingIndicator.d.ts +0 -15
  108. package/dist/src/ui/components/LoadingIndicator.js +0 -19
  109. package/dist/src/ui/components/LoadingIndicator.js.map +0 -1
  110. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +0 -7
  111. package/dist/src/ui/components/MemoryUsageDisplay.js +0 -27
  112. package/dist/src/ui/components/MemoryUsageDisplay.js.map +0 -1
  113. package/dist/src/ui/components/ModelStatsDisplay.d.ts +0 -7
  114. package/dist/src/ui/components/ModelStatsDisplay.js +0 -33
  115. package/dist/src/ui/components/ModelStatsDisplay.js.map +0 -1
  116. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +0 -11
  117. package/dist/src/ui/components/SessionSummaryDisplay.js +0 -4
  118. package/dist/src/ui/components/SessionSummaryDisplay.js.map +0 -1
  119. package/dist/src/ui/components/ShellModeIndicator.d.ts +0 -7
  120. package/dist/src/ui/components/ShellModeIndicator.js +0 -5
  121. package/dist/src/ui/components/ShellModeIndicator.js.map +0 -1
  122. package/dist/src/ui/components/ShowMoreLines.d.ts +0 -10
  123. package/dist/src/ui/components/ShowMoreLines.js +0 -24
  124. package/dist/src/ui/components/ShowMoreLines.js.map +0 -1
  125. package/dist/src/ui/components/StatsDisplay.d.ts +0 -12
  126. package/dist/src/ui/components/StatsDisplay.js +0 -42
  127. package/dist/src/ui/components/StatsDisplay.js.map +0 -1
  128. package/dist/src/ui/components/SuggestionsDisplay.d.ts +0 -21
  129. package/dist/src/ui/components/SuggestionsDisplay.js +0 -32
  130. package/dist/src/ui/components/SuggestionsDisplay.js.map +0 -1
  131. package/dist/src/ui/components/ThemeDialog.d.ts +0 -19
  132. package/dist/src/ui/components/ThemeDialog.js +0 -126
  133. package/dist/src/ui/components/ThemeDialog.js.map +0 -1
  134. package/dist/src/ui/components/Tips.d.ts +0 -12
  135. package/dist/src/ui/components/Tips.js +0 -8
  136. package/dist/src/ui/components/Tips.js.map +0 -1
  137. package/dist/src/ui/components/ToolStatsDisplay.d.ts +0 -7
  138. package/dist/src/ui/components/ToolStatsDisplay.js +0 -41
  139. package/dist/src/ui/components/ToolStatsDisplay.js.map +0 -1
  140. package/dist/src/ui/components/UpdateNotification.d.ts +0 -10
  141. package/dist/src/ui/components/UpdateNotification.js +0 -10
  142. package/dist/src/ui/components/UpdateNotification.js.map +0 -1
  143. package/dist/src/ui/components/messages/CompressionMessage.d.ts +0 -11
  144. package/dist/src/ui/components/messages/CompressionMessage.js +0 -16
  145. package/dist/src/ui/components/messages/CompressionMessage.js.map +0 -1
  146. package/dist/src/ui/components/messages/DiffRenderer.d.ts +0 -15
  147. package/dist/src/ui/components/messages/DiffRenderer.js +0 -212
  148. package/dist/src/ui/components/messages/DiffRenderer.js.map +0 -1
  149. package/dist/src/ui/components/messages/ErrorMessage.d.ts +0 -11
  150. package/dist/src/ui/components/messages/ErrorMessage.js +0 -9
  151. package/dist/src/ui/components/messages/ErrorMessage.js.map +0 -1
  152. package/dist/src/ui/components/messages/GeminiMessage.d.ts +0 -14
  153. package/dist/src/ui/components/messages/GeminiMessage.js +0 -10
  154. package/dist/src/ui/components/messages/GeminiMessage.js.map +0 -1
  155. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +0 -14
  156. package/dist/src/ui/components/messages/GeminiMessageContent.js +0 -15
  157. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +0 -1
  158. package/dist/src/ui/components/messages/InfoMessage.d.ts +0 -11
  159. package/dist/src/ui/components/messages/InfoMessage.js +0 -9
  160. package/dist/src/ui/components/messages/InfoMessage.js.map +0 -1
  161. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +0 -15
  162. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +0 -111
  163. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +0 -1
  164. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +0 -18
  165. package/dist/src/ui/components/messages/ToolGroupMessage.js +0 -53
  166. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +0 -1
  167. package/dist/src/ui/components/messages/ToolMessage.d.ts +0 -15
  168. package/dist/src/ui/components/messages/ToolMessage.js +0 -61
  169. package/dist/src/ui/components/messages/ToolMessage.js.map +0 -1
  170. package/dist/src/ui/components/messages/UserMessage.d.ts +0 -11
  171. package/dist/src/ui/components/messages/UserMessage.js +0 -9
  172. package/dist/src/ui/components/messages/UserMessage.js.map +0 -1
  173. package/dist/src/ui/components/messages/UserShellMessage.d.ts +0 -11
  174. package/dist/src/ui/components/messages/UserShellMessage.js +0 -9
  175. package/dist/src/ui/components/messages/UserShellMessage.js.map +0 -1
  176. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +0 -61
  177. package/dist/src/ui/components/shared/MaxSizedBox.js +0 -384
  178. package/dist/src/ui/components/shared/MaxSizedBox.js.map +0 -1
  179. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +0 -41
  180. package/dist/src/ui/components/shared/RadioButtonSelect.js +0 -52
  181. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +0 -1
  182. package/dist/src/ui/components/shared/text-buffer.d.ts +0 -184
  183. package/dist/src/ui/components/shared/text-buffer.js +0 -1010
  184. package/dist/src/ui/components/shared/text-buffer.js.map +0 -1
  185. package/dist/src/ui/constants.d.ts +0 -8
  186. package/dist/src/ui/constants.js +0 -12
  187. package/dist/src/ui/constants.js.map +0 -1
  188. package/dist/src/ui/contexts/OverflowContext.d.ts +0 -19
  189. package/dist/src/ui/contexts/OverflowContext.js +0 -43
  190. package/dist/src/ui/contexts/OverflowContext.js.map +0 -1
  191. package/dist/src/ui/contexts/SessionContext.d.ts +0 -33
  192. package/dist/src/ui/contexts/SessionContext.js +0 -49
  193. package/dist/src/ui/contexts/SessionContext.js.map +0 -1
  194. package/dist/src/ui/contexts/StreamingContext.d.ts +0 -9
  195. package/dist/src/ui/contexts/StreamingContext.js +0 -15
  196. package/dist/src/ui/contexts/StreamingContext.js.map +0 -1
  197. package/dist/src/ui/editors/editorSettingsManager.d.ts +0 -19
  198. package/dist/src/ui/editors/editorSettingsManager.js +0 -54
  199. package/dist/src/ui/editors/editorSettingsManager.js.map +0 -1
  200. package/dist/src/ui/hooks/atCommandProcessor.d.ts +0 -31
  201. package/dist/src/ui/hooks/atCommandProcessor.js +0 -310
  202. package/dist/src/ui/hooks/atCommandProcessor.js.map +0 -1
  203. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +0 -16
  204. package/dist/src/ui/hooks/shellCommandProcessor.js +0 -261
  205. package/dist/src/ui/hooks/shellCommandProcessor.js.map +0 -1
  206. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +0 -27
  207. package/dist/src/ui/hooks/slashCommandProcessor.js +0 -1050
  208. package/dist/src/ui/hooks/slashCommandProcessor.js.map +0 -1
  209. package/dist/src/ui/hooks/useAuthCommand.d.ts +0 -14
  210. package/dist/src/ui/hooks/useAuthCommand.js +0 -54
  211. package/dist/src/ui/hooks/useAuthCommand.js.map +0 -1
  212. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +0 -10
  213. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +0 -37
  214. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +0 -1
  215. package/dist/src/ui/hooks/useBracketedPaste.d.ts +0 -12
  216. package/dist/src/ui/hooks/useBracketedPaste.js +0 -32
  217. package/dist/src/ui/hooks/useBracketedPaste.js.map +0 -1
  218. package/dist/src/ui/hooks/useCompletion.d.ts +0 -21
  219. package/dist/src/ui/hooks/useCompletion.js +0 -372
  220. package/dist/src/ui/hooks/useCompletion.js.map +0 -1
  221. package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -12
  222. package/dist/src/ui/hooks/useConsoleMessages.js +0 -60
  223. package/dist/src/ui/hooks/useConsoleMessages.js.map +0 -1
  224. package/dist/src/ui/hooks/useEditorSettings.d.ts +0 -16
  225. package/dist/src/ui/hooks/useEditorSettings.js +0 -43
  226. package/dist/src/ui/hooks/useEditorSettings.js.map +0 -1
  227. package/dist/src/ui/hooks/useGeminiStream.d.ts +0 -23
  228. package/dist/src/ui/hooks/useGeminiStream.js +0 -518
  229. package/dist/src/ui/hooks/useGeminiStream.js.map +0 -1
  230. package/dist/src/ui/hooks/useGitBranchName.d.ts +0 -6
  231. package/dist/src/ui/hooks/useGitBranchName.js +0 -61
  232. package/dist/src/ui/hooks/useGitBranchName.js.map +0 -1
  233. package/dist/src/ui/hooks/useHistoryManager.d.ts +0 -22
  234. package/dist/src/ui/hooks/useHistoryManager.js +0 -72
  235. package/dist/src/ui/hooks/useHistoryManager.js.map +0 -1
  236. package/dist/src/ui/hooks/useInputHistory.d.ts +0 -19
  237. package/dist/src/ui/hooks/useInputHistory.js +0 -84
  238. package/dist/src/ui/hooks/useInputHistory.js.map +0 -1
  239. package/dist/src/ui/hooks/useKeypress.d.ts +0 -29
  240. package/dist/src/ui/hooks/useKeypress.js +0 -86
  241. package/dist/src/ui/hooks/useKeypress.js.map +0 -1
  242. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +0 -10
  243. package/dist/src/ui/hooks/useLoadingIndicator.js +0 -44
  244. package/dist/src/ui/hooks/useLoadingIndicator.js.map +0 -1
  245. package/dist/src/ui/hooks/useLogger.d.ts +0 -10
  246. package/dist/src/ui/hooks/useLogger.js +0 -29
  247. package/dist/src/ui/hooks/useLogger.js.map +0 -1
  248. package/dist/src/ui/hooks/usePhraseCycler.d.ts +0 -14
  249. package/dist/src/ui/hooks/usePhraseCycler.js +0 -189
  250. package/dist/src/ui/hooks/usePhraseCycler.js.map +0 -1
  251. package/dist/src/ui/hooks/usePrivacySettings.d.ts +0 -16
  252. package/dist/src/ui/hooks/usePrivacySettings.js +0 -115
  253. package/dist/src/ui/hooks/usePrivacySettings.js.map +0 -1
  254. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +0 -33
  255. package/dist/src/ui/hooks/useReactToolScheduler.js +0 -186
  256. package/dist/src/ui/hooks/useReactToolScheduler.js.map +0 -1
  257. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +0 -6
  258. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +0 -7
  259. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +0 -1
  260. package/dist/src/ui/hooks/useShellHistory.d.ts +0 -11
  261. package/dist/src/ui/hooks/useShellHistory.js +0 -89
  262. package/dist/src/ui/hooks/useShellHistory.js.map +0 -1
  263. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +0 -9
  264. package/dist/src/ui/hooks/useShowMemoryCommand.js +0 -58
  265. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +0 -1
  266. package/dist/src/ui/hooks/useStateAndRef.d.ts +0 -7
  267. package/dist/src/ui/hooks/useStateAndRef.js +0 -26
  268. package/dist/src/ui/hooks/useStateAndRef.js.map +0 -1
  269. package/dist/src/ui/hooks/useTerminalSize.d.ts +0 -9
  270. package/dist/src/ui/hooks/useTerminalSize.js +0 -27
  271. package/dist/src/ui/hooks/useTerminalSize.js.map +0 -1
  272. package/dist/src/ui/hooks/useThemeCommand.d.ts +0 -15
  273. package/dist/src/ui/hooks/useThemeCommand.js +0 -78
  274. package/dist/src/ui/hooks/useThemeCommand.js.map +0 -1
  275. package/dist/src/ui/hooks/useTimer.d.ts +0 -12
  276. package/dist/src/ui/hooks/useTimer.js +0 -58
  277. package/dist/src/ui/hooks/useTimer.js.map +0 -1
  278. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +0 -12
  279. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +0 -40
  280. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +0 -1
  281. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +0 -10
  282. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +0 -17
  283. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +0 -1
  284. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +0 -10
  285. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +0 -17
  286. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +0 -1
  287. package/dist/src/ui/privacy/PrivacyNotice.d.ts +0 -12
  288. package/dist/src/ui/privacy/PrivacyNotice.js +0 -25
  289. package/dist/src/ui/privacy/PrivacyNotice.js.map +0 -1
  290. package/dist/src/ui/themes/ansi-light.d.ts +0 -7
  291. package/dist/src/ui/themes/ansi-light.js +0 -139
  292. package/dist/src/ui/themes/ansi-light.js.map +0 -1
  293. package/dist/src/ui/themes/ansi.d.ts +0 -7
  294. package/dist/src/ui/themes/ansi.js +0 -149
  295. package/dist/src/ui/themes/ansi.js.map +0 -1
  296. package/dist/src/ui/themes/atom-one-dark.d.ts +0 -7
  297. package/dist/src/ui/themes/atom-one-dark.js +0 -136
  298. package/dist/src/ui/themes/atom-one-dark.js.map +0 -1
  299. package/dist/src/ui/themes/ayu-light.d.ts +0 -7
  300. package/dist/src/ui/themes/ayu-light.js +0 -128
  301. package/dist/src/ui/themes/ayu-light.js.map +0 -1
  302. package/dist/src/ui/themes/ayu.d.ts +0 -7
  303. package/dist/src/ui/themes/ayu.js +0 -102
  304. package/dist/src/ui/themes/ayu.js.map +0 -1
  305. package/dist/src/ui/themes/default-light.d.ts +0 -7
  306. package/dist/src/ui/themes/default-light.js +0 -100
  307. package/dist/src/ui/themes/default-light.js.map +0 -1
  308. package/dist/src/ui/themes/default.d.ts +0 -7
  309. package/dist/src/ui/themes/default.js +0 -143
  310. package/dist/src/ui/themes/default.js.map +0 -1
  311. package/dist/src/ui/themes/dracula.d.ts +0 -7
  312. package/dist/src/ui/themes/dracula.js +0 -113
  313. package/dist/src/ui/themes/dracula.js.map +0 -1
  314. package/dist/src/ui/themes/github-dark.d.ts +0 -7
  315. package/dist/src/ui/themes/github-dark.js +0 -136
  316. package/dist/src/ui/themes/github-dark.js.map +0 -1
  317. package/dist/src/ui/themes/github-light.d.ts +0 -7
  318. package/dist/src/ui/themes/github-light.js +0 -138
  319. package/dist/src/ui/themes/github-light.js.map +0 -1
  320. package/dist/src/ui/themes/googlecode.d.ts +0 -7
  321. package/dist/src/ui/themes/googlecode.js +0 -135
  322. package/dist/src/ui/themes/googlecode.js.map +0 -1
  323. package/dist/src/ui/themes/no-color.d.ts +0 -7
  324. package/dist/src/ui/themes/no-color.js +0 -84
  325. package/dist/src/ui/themes/no-color.js.map +0 -1
  326. package/dist/src/ui/themes/shades-of-purple.d.ts +0 -11
  327. package/dist/src/ui/themes/shades-of-purple.js +0 -302
  328. package/dist/src/ui/themes/shades-of-purple.js.map +0 -1
  329. package/dist/src/ui/themes/theme-manager.d.ts +0 -33
  330. package/dist/src/ui/themes/theme-manager.js +0 -109
  331. package/dist/src/ui/themes/theme-manager.js.map +0 -1
  332. package/dist/src/ui/themes/theme.d.ts +0 -67
  333. package/dist/src/ui/themes/theme.js +0 -304
  334. package/dist/src/ui/themes/theme.js.map +0 -1
  335. package/dist/src/ui/themes/xcode.d.ts +0 -7
  336. package/dist/src/ui/themes/xcode.js +0 -143
  337. package/dist/src/ui/themes/xcode.js.map +0 -1
  338. package/dist/src/ui/types.d.ts +0 -172
  339. package/dist/src/ui/types.js +0 -43
  340. package/dist/src/ui/types.js.map +0 -1
  341. package/dist/src/ui/utils/CodeColorizer.d.ts +0 -14
  342. package/dist/src/ui/utils/CodeColorizer.js +0 -97
  343. package/dist/src/ui/utils/CodeColorizer.js.map +0 -1
  344. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +0 -16
  345. package/dist/src/ui/utils/InlineMarkdownRenderer.js +0 -104
  346. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +0 -1
  347. package/dist/src/ui/utils/MarkdownDisplay.d.ts +0 -14
  348. package/dist/src/ui/utils/MarkdownDisplay.js +0 -197
  349. package/dist/src/ui/utils/MarkdownDisplay.js.map +0 -1
  350. package/dist/src/ui/utils/TableRenderer.d.ts +0 -17
  351. package/dist/src/ui/utils/TableRenderer.js +0 -84
  352. package/dist/src/ui/utils/TableRenderer.js.map +0 -1
  353. package/dist/src/ui/utils/commandUtils.d.ts +0 -22
  354. package/dist/src/ui/utils/commandUtils.js +0 -25
  355. package/dist/src/ui/utils/commandUtils.js.map +0 -1
  356. package/dist/src/ui/utils/computeStats.d.ts +0 -10
  357. package/dist/src/ui/utils/computeStats.js +0 -55
  358. package/dist/src/ui/utils/computeStats.js.map +0 -1
  359. package/dist/src/ui/utils/displayUtils.d.ts +0 -17
  360. package/dist/src/ui/utils/displayUtils.js +0 -24
  361. package/dist/src/ui/utils/displayUtils.js.map +0 -1
  362. package/dist/src/ui/utils/errorParsing.d.ts +0 -15
  363. package/dist/src/ui/utils/errorParsing.js +0 -79
  364. package/dist/src/ui/utils/errorParsing.js.map +0 -1
  365. package/dist/src/ui/utils/formatters.d.ts +0 -13
  366. package/dist/src/ui/utils/formatters.js +0 -56
  367. package/dist/src/ui/utils/formatters.js.map +0 -1
  368. package/dist/src/ui/utils/markdownUtilities.d.ts +0 -6
  369. package/dist/src/ui/utils/markdownUtilities.js +0 -110
  370. package/dist/src/ui/utils/markdownUtilities.js.map +0 -1
  371. package/dist/src/ui/utils/textUtils.d.ts +0 -22
  372. package/dist/src/ui/utils/textUtils.js +0 -58
  373. package/dist/src/ui/utils/textUtils.js.map +0 -1
  374. package/dist/src/ui/utils/updateCheck.d.ts +0 -6
  375. package/dist/src/ui/utils/updateCheck.js +0 -36
  376. package/dist/src/ui/utils/updateCheck.js.map +0 -1
  377. package/dist/src/utils/cleanup.d.ts +0 -6
  378. package/dist/src/utils/cleanup.js +0 -19
  379. package/dist/src/utils/cleanup.js.map +0 -1
  380. package/dist/src/utils/package.d.ts +0 -12
  381. package/dist/src/utils/package.js +0 -24
  382. package/dist/src/utils/package.js.map +0 -1
  383. package/dist/src/utils/readStdin.d.ts +0 -6
  384. package/dist/src/utils/readStdin.js +0 -34
  385. package/dist/src/utils/readStdin.js.map +0 -1
  386. package/dist/src/utils/sandbox.d.ts +0 -7
  387. package/dist/src/utils/sandbox.js +0 -680
  388. package/dist/src/utils/sandbox.js.map +0 -1
  389. package/dist/src/utils/startupWarnings.d.ts +0 -6
  390. package/dist/src/utils/startupWarnings.js +0 -40
  391. package/dist/src/utils/startupWarnings.js.map +0 -1
  392. package/dist/src/utils/userStartupWarnings.d.ts +0 -6
  393. package/dist/src/utils/userStartupWarnings.js +0 -33
  394. package/dist/src/utils/userStartupWarnings.js.map +0 -1
  395. package/dist/src/utils/version.d.ts +0 -6
  396. package/dist/src/utils/version.js +0 -11
  397. package/dist/src/utils/version.js.map +0 -1
  398. package/dist/tsconfig.tsbuildinfo +0 -1
  399. /package/{dist/src/utils → bundle}/sandbox-macos-permissive-closed.sb +0 -0
  400. /package/{dist/src/utils → bundle}/sandbox-macos-permissive-open.sb +0 -0
  401. /package/{dist/src/utils → bundle}/sandbox-macos-restrictive-closed.sb +0 -0
  402. /package/{dist/src/utils → bundle}/sandbox-macos-restrictive-open.sb +0 -0
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Text, Box } from 'ink';
3
- import { Colors } from '../../colors.js';
4
- export const ErrorMessage = ({ text }) => {
5
- const prefix = '✕ ';
6
- const prefixWidth = prefix.length;
7
- return (_jsxs(Box, { flexDirection: "row", marginBottom: 1, children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { color: Colors.AccentRed, children: prefix }) }), _jsx(Box, { flexGrow: 1, children: _jsx(Text, { wrap: "wrap", color: Colors.AccentRed, children: text }) })] }));
8
- };
9
- //# sourceMappingURL=ErrorMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ErrorMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACpE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAElC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,YAAY,EAAE,CAAC,aACtC,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YAAG,MAAM,GAAQ,GAC1C,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YACtC,IAAI,GACA,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- interface GeminiMessageProps {
8
- text: string;
9
- isPending: boolean;
10
- availableTerminalHeight?: number;
11
- terminalWidth: number;
12
- }
13
- export declare const GeminiMessage: React.FC<GeminiMessageProps>;
14
- export {};
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Text, Box } from 'ink';
3
- import { MarkdownDisplay } from '../../utils/MarkdownDisplay.js';
4
- import { Colors } from '../../colors.js';
5
- export const GeminiMessage = ({ text, isPending, availableTerminalHeight, terminalWidth, }) => {
6
- const prefix = '✦ ';
7
- const prefixWidth = prefix.length;
8
- return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { color: Colors.AccentPurple, children: prefix }) }), _jsx(Box, { flexGrow: 1, flexDirection: "column", children: _jsx(MarkdownDisplay, { text: text, isPending: isPending, availableTerminalHeight: availableTerminalHeight, terminalWidth: terminalWidth }) })] }));
9
- };
10
- //# sourceMappingURL=GeminiMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GeminiMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/GeminiMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AASzC,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,IAAI,EACJ,SAAS,EACT,uBAAuB,EACvB,aAAa,GACd,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAElC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,aACtB,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,YAAG,MAAM,GAAQ,GAC7C,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,aAAa,EAAC,QAAQ,YACtC,KAAC,eAAe,IACd,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,uBAAuB,EAAE,uBAAuB,EAChD,aAAa,EAAE,aAAa,GAC5B,GACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- interface GeminiMessageContentProps {
8
- text: string;
9
- isPending: boolean;
10
- availableTerminalHeight?: number;
11
- terminalWidth: number;
12
- }
13
- export declare const GeminiMessageContent: React.FC<GeminiMessageContentProps>;
14
- export {};
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Box } from 'ink';
3
- import { MarkdownDisplay } from '../../utils/MarkdownDisplay.js';
4
- /*
5
- * Gemini message content is a semi-hacked component. The intention is to represent a partial
6
- * of GeminiMessage and is only used when a response gets too long. In that instance messages
7
- * are split into multiple GeminiMessageContent's to enable the root <Static> component in
8
- * App.tsx to be as performant as humanly possible.
9
- */
10
- export const GeminiMessageContent = ({ text, isPending, availableTerminalHeight, terminalWidth, }) => {
11
- const originalPrefix = '✦ ';
12
- const prefixWidth = originalPrefix.length;
13
- return (_jsx(Box, { flexDirection: "column", paddingLeft: prefixWidth, children: _jsx(MarkdownDisplay, { text: text, isPending: isPending, availableTerminalHeight: availableTerminalHeight, terminalWidth: terminalWidth }) }));
14
- };
15
- //# sourceMappingURL=GeminiMessageContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GeminiMessageContent.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/GeminiMessageContent.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AASjE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwC,CAAC,EACxE,IAAI,EACJ,SAAS,EACT,uBAAuB,EACvB,aAAa,GACd,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,IAAI,CAAC;IAC5B,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC;IAE1C,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,WAAW,EAAE,WAAW,YAClD,KAAC,eAAe,IACd,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,uBAAuB,EAAE,uBAAuB,EAChD,aAAa,EAAE,aAAa,GAC5B,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- interface InfoMessageProps {
8
- text: string;
9
- }
10
- export declare const InfoMessage: React.FC<InfoMessageProps>;
11
- export {};
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Text, Box } from 'ink';
3
- import { Colors } from '../../colors.js';
4
- export const InfoMessage = ({ text }) => {
5
- const prefix = 'ℹ ';
6
- const prefixWidth = prefix.length;
7
- return (_jsxs(Box, { flexDirection: "row", marginTop: 1, children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { color: Colors.AccentYellow, children: prefix }) }), _jsx(Box, { flexGrow: 1, children: _jsx(Text, { wrap: "wrap", color: Colors.AccentYellow, children: text }) })] }));
8
- };
9
- //# sourceMappingURL=InfoMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InfoMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/InfoMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAClE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAElC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,SAAS,EAAE,CAAC,aACnC,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,YAAG,MAAM,GAAQ,GAC7C,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,MAAM,CAAC,YAAY,YACzC,IAAI,GACA,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- import { ToolCallConfirmationDetails, Config } from '@google/gemini-cli-core';
8
- export interface ToolConfirmationMessageProps {
9
- confirmationDetails: ToolCallConfirmationDetails;
10
- config?: Config;
11
- isFocused?: boolean;
12
- availableTerminalHeight?: number;
13
- terminalWidth: number;
14
- }
15
- export declare const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps>;
@@ -1,111 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Text, useInput } from 'ink';
3
- import { DiffRenderer } from './DiffRenderer.js';
4
- import { Colors } from '../../colors.js';
5
- import { ToolConfirmationOutcome, } from '@google/gemini-cli-core';
6
- import { RadioButtonSelect, } from '../shared/RadioButtonSelect.js';
7
- import { MaxSizedBox } from '../shared/MaxSizedBox.js';
8
- export const ToolConfirmationMessage = ({ confirmationDetails, isFocused = true, availableTerminalHeight, terminalWidth, }) => {
9
- const { onConfirm } = confirmationDetails;
10
- const childWidth = terminalWidth - 2; // 2 for padding
11
- useInput((_, key) => {
12
- if (!isFocused)
13
- return;
14
- if (key.escape) {
15
- onConfirm(ToolConfirmationOutcome.Cancel);
16
- }
17
- });
18
- const handleSelect = (item) => onConfirm(item);
19
- let bodyContent = null; // Removed contextDisplay here
20
- let question;
21
- const options = new Array();
22
- // Body content is now the DiffRenderer, passing filename to it
23
- // The bordered box is removed from here and handled within DiffRenderer
24
- function availableBodyContentHeight() {
25
- if (options.length === 0) {
26
- // This should not happen in practice as options are always added before this is called.
27
- throw new Error('Options not provided for confirmation message');
28
- }
29
- if (availableTerminalHeight === undefined) {
30
- return undefined;
31
- }
32
- // Calculate the vertical space (in lines) consumed by UI elements
33
- // surrounding the main body content.
34
- const PADDING_OUTER_Y = 2; // Main container has `padding={1}` (top & bottom).
35
- const MARGIN_BODY_BOTTOM = 1; // margin on the body container.
36
- const HEIGHT_QUESTION = 1; // The question text is one line.
37
- const MARGIN_QUESTION_BOTTOM = 1; // Margin on the question container.
38
- const HEIGHT_OPTIONS = options.length; // Each option in the radio select takes one line.
39
- const surroundingElementsHeight = PADDING_OUTER_Y +
40
- MARGIN_BODY_BOTTOM +
41
- HEIGHT_QUESTION +
42
- MARGIN_QUESTION_BOTTOM +
43
- HEIGHT_OPTIONS;
44
- return Math.max(availableTerminalHeight - surroundingElementsHeight, 1);
45
- }
46
- if (confirmationDetails.type === 'edit') {
47
- if (confirmationDetails.isModifying) {
48
- return (_jsxs(Box, { minWidth: "90%", borderStyle: "round", borderColor: Colors.Gray, justifyContent: "space-around", padding: 1, overflow: "hidden", children: [_jsx(Text, { children: "Modify in progress: " }), _jsx(Text, { color: Colors.AccentGreen, children: "Save and close external editor to continue" })] }));
49
- }
50
- question = `Apply this change?`;
51
- options.push({
52
- label: 'Yes, allow once',
53
- value: ToolConfirmationOutcome.ProceedOnce,
54
- }, {
55
- label: 'Yes, allow always',
56
- value: ToolConfirmationOutcome.ProceedAlways,
57
- }, {
58
- label: 'Modify with external editor',
59
- value: ToolConfirmationOutcome.ModifyWithEditor,
60
- }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
61
- bodyContent = (_jsx(DiffRenderer, { diffContent: confirmationDetails.fileDiff, filename: confirmationDetails.fileName, availableTerminalHeight: availableBodyContentHeight(), terminalWidth: childWidth }));
62
- }
63
- else if (confirmationDetails.type === 'exec') {
64
- const executionProps = confirmationDetails;
65
- question = `Allow execution?`;
66
- options.push({
67
- label: 'Yes, allow once',
68
- value: ToolConfirmationOutcome.ProceedOnce,
69
- }, {
70
- label: `Yes, allow always "${executionProps.rootCommand} ..."`,
71
- value: ToolConfirmationOutcome.ProceedAlways,
72
- }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
73
- let bodyContentHeight = availableBodyContentHeight();
74
- if (bodyContentHeight !== undefined) {
75
- bodyContentHeight -= 2; // Account for padding;
76
- }
77
- bodyContent = (_jsx(Box, { flexDirection: "column", children: _jsx(Box, { paddingX: 1, marginLeft: 1, children: _jsx(MaxSizedBox, { maxHeight: bodyContentHeight, maxWidth: Math.max(childWidth - 4, 1), children: _jsx(Box, { children: _jsx(Text, { color: Colors.AccentCyan, children: executionProps.command }) }) }) }) }));
78
- }
79
- else if (confirmationDetails.type === 'info') {
80
- const infoProps = confirmationDetails;
81
- const displayUrls = infoProps.urls &&
82
- !(infoProps.urls.length === 1 && infoProps.urls[0] === infoProps.prompt);
83
- question = `Do you want to proceed?`;
84
- options.push({
85
- label: 'Yes, allow once',
86
- value: ToolConfirmationOutcome.ProceedOnce,
87
- }, {
88
- label: 'Yes, allow always',
89
- value: ToolConfirmationOutcome.ProceedAlways,
90
- }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
91
- bodyContent = (_jsxs(Box, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [_jsx(Text, { color: Colors.AccentCyan, children: infoProps.prompt }), displayUrls && infoProps.urls && infoProps.urls.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { children: "URLs to fetch:" }), infoProps.urls.map((url) => (_jsxs(Text, { children: [" - ", url] }, url)))] }))] }));
92
- }
93
- else {
94
- // mcp tool confirmation
95
- const mcpProps = confirmationDetails;
96
- bodyContent = (_jsxs(Box, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [_jsxs(Text, { color: Colors.AccentCyan, children: ["MCP Server: ", mcpProps.serverName] }), _jsxs(Text, { color: Colors.AccentCyan, children: ["Tool: ", mcpProps.toolName] })] }));
97
- question = `Allow execution of MCP tool "${mcpProps.toolName}" from server "${mcpProps.serverName}"?`;
98
- options.push({
99
- label: 'Yes, allow once',
100
- value: ToolConfirmationOutcome.ProceedOnce,
101
- }, {
102
- label: `Yes, always allow tool "${mcpProps.toolName}" from server "${mcpProps.serverName}"`,
103
- value: ToolConfirmationOutcome.ProceedAlwaysTool, // Cast until types are updated
104
- }, {
105
- label: `Yes, always allow all tools from server "${mcpProps.serverName}"`,
106
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
107
- }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
108
- }
109
- return (_jsxs(Box, { flexDirection: "column", padding: 1, width: childWidth, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", marginBottom: 1, children: bodyContent }), _jsx(Box, { marginBottom: 1, flexShrink: 0, children: _jsx(Text, { wrap: "truncate", children: question }) }), _jsx(Box, { flexShrink: 0, children: _jsx(RadioButtonSelect, { items: options, onSelect: handleSelect, isFocused: isFocused }) })] }));
110
- };
111
- //# sourceMappingURL=ToolConfirmationMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToolConfirmationMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ToolConfirmationMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAEL,uBAAuB,GAIxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,GAElB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAUvD,MAAM,CAAC,MAAM,uBAAuB,GAEhC,CAAC,EACH,mBAAmB,EACnB,SAAS,GAAG,IAAI,EAChB,uBAAuB,EACvB,aAAa,GACd,EAAE,EAAE;IACH,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,CAAC;IAC1C,MAAM,UAAU,GAAG,aAAa,GAAG,CAAC,CAAC,CAAC,gBAAgB;IAEtD,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;QAClB,IAAI,CAAC,SAAS;YAAE,OAAO;QACvB,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,SAAS,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAC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E,uBAAuB,CAAC,MAAM,EAAE,CAC7D,CAAC;IACJ,CAAC;IAED,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,aAGvD,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,YAC/D,WAAW,GACR,EAGN,KAAC,GAAG,IAAC,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,YACjC,KAAC,IAAI,IAAC,IAAI,EAAC,UAAU,YAAE,QAAQ,GAAQ,GACnC,EAGN,KAAC,GAAG,IAAC,UAAU,EAAE,CAAC,YAChB,KAAC,iBAAiB,IAChB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,SAAS,GACpB,GACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- import { IndividualToolCallDisplay } from '../../types.js';
8
- import { Config } from '@google/gemini-cli-core';
9
- interface ToolGroupMessageProps {
10
- groupId: number;
11
- toolCalls: IndividualToolCallDisplay[];
12
- availableTerminalHeight?: number;
13
- terminalWidth: number;
14
- config?: Config;
15
- isFocused?: boolean;
16
- }
17
- export declare const ToolGroupMessage: React.FC<ToolGroupMessageProps>;
18
- export {};
@@ -1,53 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * @license
4
- * Copyright 2025 Google LLC
5
- * SPDX-License-Identifier: Apache-2.0
6
- */
7
- import { useMemo } from 'react';
8
- import { Box } from 'ink';
9
- import { ToolCallStatus } from '../../types.js';
10
- import { ToolMessage } from './ToolMessage.js';
11
- import { ToolConfirmationMessage } from './ToolConfirmationMessage.js';
12
- import { Colors } from '../../colors.js';
13
- // Main component renders the border and maps the tools using ToolMessage
14
- export const ToolGroupMessage = ({ toolCalls, availableTerminalHeight, terminalWidth, config, isFocused = true, }) => {
15
- const hasPending = !toolCalls.every((t) => t.status === ToolCallStatus.Success);
16
- const borderColor = hasPending ? Colors.AccentYellow : Colors.Gray;
17
- const staticHeight = /* border */ 2 + /* marginBottom */ 1;
18
- // This is a bit of a magic number, but it accounts for the border and
19
- // marginLeft.
20
- const innerWidth = terminalWidth - 4;
21
- // only prompt for tool approval on the first 'confirming' tool in the list
22
- // note, after the CTA, this automatically moves over to the next 'confirming' tool
23
- const toolAwaitingApproval = useMemo(() => toolCalls.find((tc) => tc.status === ToolCallStatus.Confirming), [toolCalls]);
24
- let countToolCallsWithResults = 0;
25
- for (const tool of toolCalls) {
26
- if (tool.resultDisplay !== undefined && tool.resultDisplay !== '') {
27
- countToolCallsWithResults++;
28
- }
29
- }
30
- const countOneLineToolCalls = toolCalls.length - countToolCallsWithResults;
31
- const availableTerminalHeightPerToolMessage = availableTerminalHeight
32
- ? Math.max(Math.floor((availableTerminalHeight - staticHeight - countOneLineToolCalls) /
33
- Math.max(1, countToolCallsWithResults)), 1)
34
- : undefined;
35
- return (_jsx(Box, { flexDirection: "column", borderStyle: "round",
36
- /*
37
- This width constraint is highly important and protects us from an Ink rendering bug.
38
- Since the ToolGroup can typically change rendering states frequently, it can cause
39
- Ink to render the border of the box incorrectly and span multiple lines and even
40
- cause tearing.
41
- */
42
- width: "100%", marginLeft: 1, borderDimColor: hasPending, borderColor: borderColor, children: toolCalls.map((tool) => {
43
- const isConfirming = toolAwaitingApproval?.callId === tool.callId;
44
- return (_jsxs(Box, { flexDirection: "column", minHeight: 1, children: [_jsx(Box, { flexDirection: "row", alignItems: "center", children: _jsx(ToolMessage, { callId: tool.callId, name: tool.name, description: tool.description, resultDisplay: tool.resultDisplay, status: tool.status, confirmationDetails: tool.confirmationDetails, availableTerminalHeight: availableTerminalHeightPerToolMessage, terminalWidth: innerWidth, emphasis: isConfirming
45
- ? 'high'
46
- : toolAwaitingApproval
47
- ? 'low'
48
- : 'medium', renderOutputAsMarkdown: tool.renderOutputAsMarkdown }) }), tool.status === ToolCallStatus.Confirming &&
49
- isConfirming &&
50
- tool.confirmationDetails && (_jsx(ToolConfirmationMessage, { confirmationDetails: tool.confirmationDetails, config: config, isFocused: isFocused, availableTerminalHeight: availableTerminalHeightPerToolMessage, terminalWidth: innerWidth }))] }, tool.callId));
51
- }) }));
52
- };
53
- //# sourceMappingURL=ToolGroupMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToolGroupMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ToolGroupMessage.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAA6B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAYzC,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,SAAS,EACT,uBAAuB,EACvB,aAAa,EACb,MAAM,EACN,SAAS,GAAG,IAAI,GACjB,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,CAAC,SAAS,CAAC,KAAK,CACjC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,OAAO,CAC3C,CAAC;IACF,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;IAEnE,MAAM,YAAY,GAAG,YAAY,CAAC,CAAC,GAAG,kBAAkB,C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AAQ,EAAC,SAAS,EAAE,CAAC,aACxD,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,YAC1C,KAAC,WAAW,IACV,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,uBAAuB,EAAE,qCAAqC,EAC9D,aAAa,EAAE,UAAU,EACzB,QAAQ,EACN,YAAY;gCACV,CAAC,CAAC,MAAM;gCACR,CAAC,CAAC,oBAAoB;oCACpB,CAAC,CAAC,KAAK;oCACP,CAAC,CAAC,QAAQ,EAEhB,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GACnD,GACE,EACL,IAAI,CAAC,MAAM,KAAK,cAAc,CAAC,UAAU;wBACxC,YAAY;wBACZ,IAAI,CAAC,mBAAmB,IAAI,CAC1B,KAAC,uBAAuB,IACtB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,uBAAuB,EACrB,qCAAqC,EAEvC,aAAa,EAAE,UAAU,GACzB,CACH,KAjCK,IAAI,CAAC,MAAM,CAkCf,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- import { IndividualToolCallDisplay } from '../../types.js';
8
- export type TextEmphasis = 'high' | 'medium' | 'low';
9
- export interface ToolMessageProps extends IndividualToolCallDisplay {
10
- availableTerminalHeight?: number;
11
- terminalWidth: number;
12
- emphasis?: TextEmphasis;
13
- renderOutputAsMarkdown?: boolean;
14
- }
15
- export declare const ToolMessage: React.FC<ToolMessageProps>;
@@ -1,61 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * @license
4
- * Copyright 2025 Google LLC
5
- * SPDX-License-Identifier: Apache-2.0
6
- */
7
- import React from 'react';
8
- import { Box, Text } from 'ink';
9
- import { ToolCallStatus } from '../../types.js';
10
- import { DiffRenderer } from './DiffRenderer.js';
11
- import { Colors } from '../../colors.js';
12
- import { MarkdownDisplay } from '../../utils/MarkdownDisplay.js';
13
- import { GeminiRespondingSpinner } from '../GeminiRespondingSpinner.js';
14
- import { MaxSizedBox } from '../shared/MaxSizedBox.js';
15
- const STATIC_HEIGHT = 1;
16
- const RESERVED_LINE_COUNT = 5; // for tool name, status, padding etc.
17
- const STATUS_INDICATOR_WIDTH = 3;
18
- const MIN_LINES_SHOWN = 2; // show at least this many lines
19
- // Large threshold to ensure we don't cause performance issues for very large
20
- // outputs that will get truncated further MaxSizedBox anyway.
21
- const MAXIMUM_RESULT_DISPLAY_CHARACTERS = 1000000;
22
- export const ToolMessage = ({ name, description, resultDisplay, status, availableTerminalHeight, terminalWidth, emphasis = 'medium', renderOutputAsMarkdown = true, }) => {
23
- const availableHeight = availableTerminalHeight
24
- ? Math.max(availableTerminalHeight - STATIC_HEIGHT - RESERVED_LINE_COUNT, MIN_LINES_SHOWN + 1)
25
- : undefined;
26
- // Long tool call response in MarkdownDisplay doesn't respect availableTerminalHeight properly,
27
- // we're forcing it to not render as markdown when the response is too long, it will fallback
28
- // to render as plain text, which is contained within the terminal using MaxSizedBox
29
- if (availableHeight) {
30
- renderOutputAsMarkdown = false;
31
- }
32
- const childWidth = terminalWidth - 3; // account for padding.
33
- if (typeof resultDisplay === 'string') {
34
- if (resultDisplay.length > MAXIMUM_RESULT_DISPLAY_CHARACTERS) {
35
- // Truncate the result display to fit within the available width.
36
- resultDisplay =
37
- '...' + resultDisplay.slice(-MAXIMUM_RESULT_DISPLAY_CHARACTERS);
38
- }
39
- }
40
- return (_jsxs(Box, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [_jsxs(Box, { minHeight: 1, children: [_jsx(ToolStatusIndicator, { status: status }), _jsx(ToolInfo, { name: name, status: status, description: description, emphasis: emphasis }), emphasis === 'high' && _jsx(TrailingIndicator, {})] }), resultDisplay && (_jsx(Box, { paddingLeft: STATUS_INDICATOR_WIDTH, width: "100%", marginTop: 1, children: _jsxs(Box, { flexDirection: "column", children: [typeof resultDisplay === 'string' && renderOutputAsMarkdown && (_jsx(Box, { flexDirection: "column", children: _jsx(MarkdownDisplay, { text: resultDisplay, isPending: false, availableTerminalHeight: availableHeight, terminalWidth: childWidth }) })), typeof resultDisplay === 'string' && !renderOutputAsMarkdown && (_jsx(MaxSizedBox, { maxHeight: availableHeight, maxWidth: childWidth, children: _jsx(Box, { children: _jsx(Text, { wrap: "wrap", children: resultDisplay }) }) })), typeof resultDisplay !== 'string' && (_jsx(DiffRenderer, { diffContent: resultDisplay.fileDiff, filename: resultDisplay.fileName, availableTerminalHeight: availableHeight, terminalWidth: childWidth }))] }) }))] }));
41
- };
42
- const ToolStatusIndicator = ({ status, }) => (_jsxs(Box, { minWidth: STATUS_INDICATOR_WIDTH, children: [status === ToolCallStatus.Pending && (_jsx(Text, { color: Colors.AccentGreen, children: "o" })), status === ToolCallStatus.Executing && (_jsx(GeminiRespondingSpinner, { spinnerType: "toggle", nonRespondingDisplay: '⊷' })), status === ToolCallStatus.Success && (_jsx(Text, { color: Colors.AccentGreen, children: "\u2714" })), status === ToolCallStatus.Confirming && (_jsx(Text, { color: Colors.AccentYellow, children: "?" })), status === ToolCallStatus.Canceled && (_jsx(Text, { color: Colors.AccentYellow, bold: true, children: "-" })), status === ToolCallStatus.Error && (_jsx(Text, { color: Colors.AccentRed, bold: true, children: "x" }))] }));
43
- const ToolInfo = ({ name, description, status, emphasis, }) => {
44
- const nameColor = React.useMemo(() => {
45
- switch (emphasis) {
46
- case 'high':
47
- return Colors.Foreground;
48
- case 'medium':
49
- return Colors.Foreground;
50
- case 'low':
51
- return Colors.Gray;
52
- default: {
53
- const exhaustiveCheck = emphasis;
54
- return exhaustiveCheck;
55
- }
56
- }
57
- }, [emphasis]);
58
- return (_jsx(Box, { children: _jsxs(Text, { wrap: "truncate-end", strikethrough: status === ToolCallStatus.Canceled, children: [_jsx(Text, { color: nameColor, bold: true, children: name }), ' ', _jsx(Text, { color: Colors.Gray, children: description })] }) }));
59
- };
60
- const TrailingIndicator = () => (_jsxs(Text, { color: Colors.Foreground, wrap: "truncate", children: [' ', "\u2190"] }));
61
- //# sourceMappingURL=ToolMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToolMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ToolMessage.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAA6B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,mBAAmB,GAAG,CAAC,CAAC,CAAC,sCAAsC;AACrE,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,eAAe,GAAG,CAAC,CAAC,CAAC,gCAAgC;AAE3D,6EAA6E;AAC7E,8DAA8D;AAC9D,MAAM,iCAAiC,GAAG,OAAO,CAAC;AAUlD,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EACtD,IAAI,EACJ,WAAW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AAG,cAEC,CACR,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- interface UserMessageProps {
8
- text: string;
9
- }
10
- export declare const UserMessage: React.FC<UserMessageProps>;
11
- export {};
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Text, Box } from 'ink';
3
- import { Colors } from '../../colors.js';
4
- export const UserMessage = ({ text }) => {
5
- const prefix = '> ';
6
- const prefixWidth = prefix.length;
7
- return (_jsxs(Box, { borderStyle: "round", borderColor: Colors.Gray, flexDirection: "row", paddingX: 2, paddingY: 0, marginY: 1, alignSelf: "flex-start", children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { color: Colors.Gray, children: prefix }) }), _jsx(Box, { flexGrow: 1, children: _jsx(Text, { wrap: "wrap", color: Colors.Gray, children: text }) })] }));
8
- };
9
- //# sourceMappingURL=UserMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/UserMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAClE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAElC,OAAO,CACL,MAAC,GAAG,IACF,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,MAAM,CAAC,IAAI,EACxB,aAAa,EAAC,KAAK,EACnB,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,CAAC,EACV,SAAS,EAAC,YAAY,aAEtB,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,MAAM,GAAQ,GACrC,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YACjC,IAAI,GACA,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- interface UserShellMessageProps {
8
- text: string;
9
- }
10
- export declare const UserShellMessage: React.FC<UserShellMessageProps>;
11
- export {};
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Text } from 'ink';
3
- import { Colors } from '../../colors.js';
4
- export const UserShellMessage = ({ text }) => {
5
- // Remove leading '!' if present, as App.tsx adds it for the processor.
6
- const commandToDisplay = text.startsWith('!') ? text.substring(1) : text;
7
- return (_jsxs(Box, { children: [_jsx(Text, { color: Colors.AccentCyan, children: "$ " }), _jsx(Text, { children: commandToDisplay })] }));
8
- };
9
- //# sourceMappingURL=UserShellMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserShellMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/UserShellMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5E,uEAAuE;IACvE,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEzE,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,mBAAW,EACzC,KAAC,IAAI,cAAE,gBAAgB,GAAQ,IAC3B,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,61 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- /**
8
- * Minimum height for the MaxSizedBox component.
9
- * This ensures there is room for at least one line of content as well as the
10
- * message that content was truncated.
11
- */
12
- export declare const MINIMUM_MAX_HEIGHT = 2;
13
- export declare function setMaxSizedBoxDebugging(value: boolean): void;
14
- interface MaxSizedBoxProps {
15
- children?: React.ReactNode;
16
- maxWidth?: number;
17
- maxHeight: number | undefined;
18
- overflowDirection?: 'top' | 'bottom';
19
- additionalHiddenLinesCount?: number;
20
- }
21
- /**
22
- * A React component that constrains the size of its children and provides
23
- * content-aware truncation when the content exceeds the specified `maxHeight`.
24
- *
25
- * `MaxSizedBox` requires a specific structure for its children to correctly
26
- * measure and render the content:
27
- *
28
- * 1. **Direct children must be `<Box>` elements.** Each `<Box>` represents a
29
- * single row of content.
30
- * 2. **Row `<Box>` elements must contain only `<Text>` elements.** These
31
- * `<Text>` elements can be nested and there are no restrictions to Text
32
- * element styling other than that non-wrapping text elements must be
33
- * before wrapping text elements.
34
- *
35
- * **Constraints:**
36
- * - **Box Properties:** Custom properties on the child `<Box>` elements are
37
- * ignored. In debug mode, runtime checks will report errors for any
38
- * unsupported properties.
39
- * - **Text Wrapping:** Within a single row, `<Text>` elements with no wrapping
40
- * (e.g., headers, labels) must appear before any `<Text>` elements that wrap.
41
- * - **Element Types:** Runtime checks will warn if unsupported element types
42
- * are used as children.
43
- *
44
- * @example
45
- * <MaxSizedBox maxWidth={80} maxHeight={10}>
46
- * <Box>
47
- * <Text>This is the first line.</Text>
48
- * </Box>
49
- * <Box>
50
- * <Text color="cyan" wrap="truncate">Non-wrapping Header: </Text>
51
- * <Text>This is the rest of the line which will wrap if it's too long.</Text>
52
- * </Box>
53
- * <Box>
54
- * <Text>
55
- * Line 3 with <Text color="yellow">nested styled text</Text> inside of it.
56
- * </Text>
57
- * </Box>
58
- * </MaxSizedBox>
59
- */
60
- export declare const MaxSizedBox: React.FC<MaxSizedBoxProps>;
61
- export {};