@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,197 +0,0 @@
1
- import { Fragment as _Fragment, 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 { Text, Box } from 'ink';
9
- import { Colors } from '../colors.js';
10
- import { colorizeCode } from './CodeColorizer.js';
11
- import { TableRenderer } from './TableRenderer.js';
12
- import { RenderInline } from './InlineMarkdownRenderer.js';
13
- // Constants for Markdown parsing and rendering
14
- const EMPTY_LINE_HEIGHT = 1;
15
- const CODE_BLOCK_PADDING = 1;
16
- const LIST_ITEM_PREFIX_PADDING = 1;
17
- const LIST_ITEM_TEXT_FLEX_GROW = 1;
18
- const MarkdownDisplayInternal = ({ text, isPending, availableTerminalHeight, terminalWidth, }) => {
19
- if (!text)
20
- return _jsx(_Fragment, {});
21
- const lines = text.split('\n');
22
- const headerRegex = /^ *(#{1,4}) +(.*)/;
23
- const codeFenceRegex = /^ *(`{3,}|~{3,}) *(\w*?) *$/;
24
- const ulItemRegex = /^([ \t]*)([-*+]) +(.*)/;
25
- const olItemRegex = /^([ \t]*)(\d+)\. +(.*)/;
26
- const hrRegex = /^ *([-*_] *){3,} *$/;
27
- const tableRowRegex = /^\s*\|(.+)\|\s*$/;
28
- const tableSeparatorRegex = /^\s*\|?\s*(:?-+:?)\s*(\|\s*(:?-+:?)\s*)+\|?\s*$/;
29
- const contentBlocks = [];
30
- let inCodeBlock = false;
31
- let codeBlockContent = [];
32
- let codeBlockLang = null;
33
- let codeBlockFence = '';
34
- let inTable = false;
35
- let tableRows = [];
36
- let tableHeaders = [];
37
- lines.forEach((line, index) => {
38
- const key = `line-${index}`;
39
- if (inCodeBlock) {
40
- const fenceMatch = line.match(codeFenceRegex);
41
- if (fenceMatch &&
42
- fenceMatch[1].startsWith(codeBlockFence[0]) &&
43
- fenceMatch[1].length >= codeBlockFence.length) {
44
- contentBlocks.push(_jsx(RenderCodeBlock, { content: codeBlockContent, lang: codeBlockLang, isPending: isPending, availableTerminalHeight: availableTerminalHeight, terminalWidth: terminalWidth }, key));
45
- inCodeBlock = false;
46
- codeBlockContent = [];
47
- codeBlockLang = null;
48
- codeBlockFence = '';
49
- }
50
- else {
51
- codeBlockContent.push(line);
52
- }
53
- return;
54
- }
55
- const codeFenceMatch = line.match(codeFenceRegex);
56
- const headerMatch = line.match(headerRegex);
57
- const ulMatch = line.match(ulItemRegex);
58
- const olMatch = line.match(olItemRegex);
59
- const hrMatch = line.match(hrRegex);
60
- const tableRowMatch = line.match(tableRowRegex);
61
- const tableSeparatorMatch = line.match(tableSeparatorRegex);
62
- if (codeFenceMatch) {
63
- inCodeBlock = true;
64
- codeBlockFence = codeFenceMatch[1];
65
- codeBlockLang = codeFenceMatch[2] || null;
66
- }
67
- else if (tableRowMatch && !inTable) {
68
- // Potential table start - check if next line is separator
69
- if (index + 1 < lines.length &&
70
- lines[index + 1].match(tableSeparatorRegex)) {
71
- inTable = true;
72
- tableHeaders = tableRowMatch[1].split('|').map((cell) => cell.trim());
73
- tableRows = [];
74
- }
75
- else {
76
- // Not a table, treat as regular text
77
- contentBlocks.push(_jsx(Box, { children: _jsx(Text, { wrap: "wrap", children: _jsx(RenderInline, { text: line }) }) }, key));
78
- }
79
- }
80
- else if (inTable && tableSeparatorMatch) {
81
- // Skip separator line - already handled
82
- }
83
- else if (inTable && tableRowMatch) {
84
- // Add table row
85
- const cells = tableRowMatch[1].split('|').map((cell) => cell.trim());
86
- // Ensure row has same column count as headers
87
- while (cells.length < tableHeaders.length) {
88
- cells.push('');
89
- }
90
- if (cells.length > tableHeaders.length) {
91
- cells.length = tableHeaders.length;
92
- }
93
- tableRows.push(cells);
94
- }
95
- else if (inTable && !tableRowMatch) {
96
- // End of table
97
- if (tableHeaders.length > 0 && tableRows.length > 0) {
98
- contentBlocks.push(_jsx(RenderTable, { headers: tableHeaders, rows: tableRows, terminalWidth: terminalWidth }, `table-${contentBlocks.length}`));
99
- }
100
- inTable = false;
101
- tableRows = [];
102
- tableHeaders = [];
103
- // Process current line as normal
104
- if (line.trim().length > 0) {
105
- contentBlocks.push(_jsx(Box, { children: _jsx(Text, { wrap: "wrap", children: _jsx(RenderInline, { text: line }) }) }, key));
106
- }
107
- }
108
- else if (hrMatch) {
109
- contentBlocks.push(_jsx(Box, { children: _jsx(Text, { dimColor: true, children: "---" }) }, key));
110
- }
111
- else if (headerMatch) {
112
- const level = headerMatch[1].length;
113
- const headerText = headerMatch[2];
114
- let headerNode = null;
115
- switch (level) {
116
- case 1:
117
- headerNode = (_jsx(Text, { bold: true, color: Colors.AccentCyan, children: _jsx(RenderInline, { text: headerText }) }));
118
- break;
119
- case 2:
120
- headerNode = (_jsx(Text, { bold: true, color: Colors.AccentBlue, children: _jsx(RenderInline, { text: headerText }) }));
121
- break;
122
- case 3:
123
- headerNode = (_jsx(Text, { bold: true, children: _jsx(RenderInline, { text: headerText }) }));
124
- break;
125
- case 4:
126
- headerNode = (_jsx(Text, { italic: true, color: Colors.Gray, children: _jsx(RenderInline, { text: headerText }) }));
127
- break;
128
- default:
129
- headerNode = (_jsx(Text, { children: _jsx(RenderInline, { text: headerText }) }));
130
- break;
131
- }
132
- if (headerNode)
133
- contentBlocks.push(_jsx(Box, { children: headerNode }, key));
134
- }
135
- else if (ulMatch) {
136
- const leadingWhitespace = ulMatch[1];
137
- const marker = ulMatch[2];
138
- const itemText = ulMatch[3];
139
- contentBlocks.push(_jsx(RenderListItem, { itemText: itemText, type: "ul", marker: marker, leadingWhitespace: leadingWhitespace }, key));
140
- }
141
- else if (olMatch) {
142
- const leadingWhitespace = olMatch[1];
143
- const marker = olMatch[2];
144
- const itemText = olMatch[3];
145
- contentBlocks.push(_jsx(RenderListItem, { itemText: itemText, type: "ol", marker: marker, leadingWhitespace: leadingWhitespace }, key));
146
- }
147
- else {
148
- if (line.trim().length === 0) {
149
- if (contentBlocks.length > 0 && !inCodeBlock) {
150
- contentBlocks.push(_jsx(Box, { height: EMPTY_LINE_HEIGHT }, key));
151
- }
152
- }
153
- else {
154
- contentBlocks.push(_jsx(Box, { children: _jsx(Text, { wrap: "wrap", children: _jsx(RenderInline, { text: line }) }) }, key));
155
- }
156
- }
157
- });
158
- if (inCodeBlock) {
159
- contentBlocks.push(_jsx(RenderCodeBlock, { content: codeBlockContent, lang: codeBlockLang, isPending: isPending, availableTerminalHeight: availableTerminalHeight, terminalWidth: terminalWidth }, "line-eof"));
160
- }
161
- // Handle table at end of content
162
- if (inTable && tableHeaders.length > 0 && tableRows.length > 0) {
163
- contentBlocks.push(_jsx(RenderTable, { headers: tableHeaders, rows: tableRows, terminalWidth: terminalWidth }, `table-${contentBlocks.length}`));
164
- }
165
- return _jsx(_Fragment, { children: contentBlocks });
166
- };
167
- const RenderCodeBlockInternal = ({ content, lang, isPending, availableTerminalHeight, terminalWidth, }) => {
168
- const MIN_LINES_FOR_MESSAGE = 1; // Minimum lines to show before the "generating more" message
169
- const RESERVED_LINES = 2; // Lines reserved for the message itself and potential padding
170
- if (isPending && availableTerminalHeight !== undefined) {
171
- const MAX_CODE_LINES_WHEN_PENDING = Math.max(0, availableTerminalHeight - CODE_BLOCK_PADDING * 2 - RESERVED_LINES);
172
- if (content.length > MAX_CODE_LINES_WHEN_PENDING) {
173
- if (MAX_CODE_LINES_WHEN_PENDING < MIN_LINES_FOR_MESSAGE) {
174
- // Not enough space to even show the message meaningfully
175
- return (_jsx(Box, { padding: CODE_BLOCK_PADDING, children: _jsx(Text, { color: Colors.Gray, children: "... code is being written ..." }) }));
176
- }
177
- const truncatedContent = content.slice(0, MAX_CODE_LINES_WHEN_PENDING);
178
- const colorizedTruncatedCode = colorizeCode(truncatedContent.join('\n'), lang, availableTerminalHeight, terminalWidth - CODE_BLOCK_PADDING * 2);
179
- return (_jsxs(Box, { flexDirection: "column", padding: CODE_BLOCK_PADDING, children: [colorizedTruncatedCode, _jsx(Text, { color: Colors.Gray, children: "... generating more ..." })] }));
180
- }
181
- }
182
- const fullContent = content.join('\n');
183
- const colorizedCode = colorizeCode(fullContent, lang, availableTerminalHeight, terminalWidth - CODE_BLOCK_PADDING * 2);
184
- return (_jsx(Box, { flexDirection: "column", padding: CODE_BLOCK_PADDING, width: terminalWidth, flexShrink: 0, children: colorizedCode }));
185
- };
186
- const RenderCodeBlock = React.memo(RenderCodeBlockInternal);
187
- const RenderListItemInternal = ({ itemText, type, marker, leadingWhitespace = '', }) => {
188
- const prefix = type === 'ol' ? `${marker}. ` : `${marker} `;
189
- const prefixWidth = prefix.length;
190
- const indentation = leadingWhitespace.length;
191
- return (_jsxs(Box, { paddingLeft: indentation + LIST_ITEM_PREFIX_PADDING, flexDirection: "row", children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { children: prefix }) }), _jsx(Box, { flexGrow: LIST_ITEM_TEXT_FLEX_GROW, children: _jsx(Text, { wrap: "wrap", children: _jsx(RenderInline, { text: itemText }) }) })] }));
192
- };
193
- const RenderListItem = React.memo(RenderListItemInternal);
194
- const RenderTableInternal = ({ headers, rows, terminalWidth, }) => (_jsx(TableRenderer, { headers: headers, rows: rows, terminalWidth: terminalWidth }));
195
- const RenderTable = React.memo(RenderTableInternal);
196
- export const MarkdownDisplay = React.memo(MarkdownDisplayInternal);
197
- //# sourceMappingURL=MarkdownDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MarkdownDisplay.js","sourceRoot":"","sources":["../../../../src/ui/utils/MarkdownDisplay.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAS3D,+CAA+C;AAE/C,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,wBAAwB,GAAG,CAAC,CAAC;AACnC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAEnC,MAAM,uBAAuB,GAAmC,CAAC,EAC/D,IAAI,EACJ,SAAS,EACT,uBAAuB,EACvB,aAAa,GACd,EAAE,EAAE;IACH,IAAI,CAAC,IAAI;QAAE,OAAO,mBAAK,CAAC;IAExB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,WAAW,GAAG,mBAAmB,CAAC;IACxC,MAAM,cAAc,GAAG,6BAA6B,CAAC;IACrD,MAAM,WAAW,GAAG,wBAAwB,CAAC;IAC7C,MAAM,WAAW,GAAG,wBAAwB,CAAC;IAC7C,MAAM,OAAO,GAAG,qBAAqB,CAAC;IACtC,MAAM,aAAa,GAAG,kBAAkB,CAAC;IACzC,MAAM,mBAAmB,GAAG,iDAAiD,CAAC;IA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AG,MAAM,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC;IAC5D,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,MAAM,WAAW,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAE7C,OAAO,CACL,MAAC,GAAG,IACF,WAAW,EAAE,WAAW,GAAG,wBAAwB,EACnD,aAAa,EAAC,KAAK,aAEnB,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,cAAE,MAAM,GAAQ,GACjB,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,wBAAwB,YACrC,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,YACf,KAAC,YAAY,IAAC,IAAI,EAAE,QAAQ,GAAI,GAC3B,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAQ1D,MAAM,mBAAmB,GAA+B,CAAC,EACvD,OAAO,EACP,IAAI,EACJ,aAAa,GACd,EAAE,EAAE,CAAC,CACJ,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,GAAI,CAC9E,CAAC;AAEF,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC"}
@@ -1,17 +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 TableRendererProps {
8
- headers: string[];
9
- rows: string[][];
10
- terminalWidth: number;
11
- }
12
- /**
13
- * Custom table renderer for markdown tables
14
- * We implement our own instead of using ink-table due to module compatibility issues
15
- */
16
- export declare const TableRenderer: React.FC<TableRendererProps>;
17
- export {};
@@ -1,84 +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 { Text, Box } from 'ink';
9
- import { Colors } from '../colors.js';
10
- import { RenderInline, getPlainTextLength } from './InlineMarkdownRenderer.js';
11
- /**
12
- * Custom table renderer for markdown tables
13
- * We implement our own instead of using ink-table due to module compatibility issues
14
- */
15
- export const TableRenderer = ({ headers, rows, terminalWidth, }) => {
16
- // Calculate column widths using actual display width after markdown processing
17
- const columnWidths = headers.map((header, index) => {
18
- const headerWidth = getPlainTextLength(header);
19
- const maxRowWidth = Math.max(...rows.map((row) => getPlainTextLength(row[index] || '')));
20
- return Math.max(headerWidth, maxRowWidth) + 2; // Add padding
21
- });
22
- // Ensure table fits within terminal width
23
- const totalWidth = columnWidths.reduce((sum, width) => sum + width + 1, 1);
24
- const scaleFactor = totalWidth > terminalWidth ? terminalWidth / totalWidth : 1;
25
- const adjustedWidths = columnWidths.map((width) => Math.floor(width * scaleFactor));
26
- // Helper function to render a cell with proper width
27
- const renderCell = (content, width, isHeader = false) => {
28
- const contentWidth = Math.max(0, width - 2);
29
- const displayWidth = getPlainTextLength(content);
30
- let cellContent = content;
31
- if (displayWidth > contentWidth) {
32
- if (contentWidth <= 3) {
33
- // Just truncate by character count
34
- cellContent = content.substring(0, Math.min(content.length, contentWidth));
35
- }
36
- else {
37
- // Truncate preserving markdown formatting using binary search
38
- let left = 0;
39
- let right = content.length;
40
- let bestTruncated = content;
41
- // Binary search to find the optimal truncation point
42
- while (left <= right) {
43
- const mid = Math.floor((left + right) / 2);
44
- const candidate = content.substring(0, mid);
45
- const candidateWidth = getPlainTextLength(candidate);
46
- if (candidateWidth <= contentWidth - 3) {
47
- bestTruncated = candidate;
48
- left = mid + 1;
49
- }
50
- else {
51
- right = mid - 1;
52
- }
53
- }
54
- cellContent = bestTruncated + '...';
55
- }
56
- }
57
- // Calculate exact padding needed
58
- const actualDisplayWidth = getPlainTextLength(cellContent);
59
- const paddingNeeded = Math.max(0, contentWidth - actualDisplayWidth);
60
- return (_jsxs(Text, { children: [isHeader ? (_jsx(Text, { bold: true, color: Colors.AccentCyan, children: _jsx(RenderInline, { text: cellContent }) })) : (_jsx(RenderInline, { text: cellContent })), ' '.repeat(paddingNeeded)] }));
61
- };
62
- // Helper function to render border
63
- const renderBorder = (type) => {
64
- const chars = {
65
- top: { left: '┌', middle: '┬', right: '┐', horizontal: '─' },
66
- middle: { left: '├', middle: '┼', right: '┤', horizontal: '─' },
67
- bottom: { left: '└', middle: '┴', right: '┘', horizontal: '─' },
68
- };
69
- const char = chars[type];
70
- const borderParts = adjustedWidths.map((w) => char.horizontal.repeat(w));
71
- const border = char.left + borderParts.join(char.middle) + char.right;
72
- return _jsx(Text, { children: border });
73
- };
74
- // Helper function to render a table row
75
- const renderRow = (cells, isHeader = false) => {
76
- const renderedCells = cells.map((cell, index) => {
77
- const width = adjustedWidths[index] || 0;
78
- return renderCell(cell || '', width, isHeader);
79
- });
80
- return (_jsxs(Text, { children: ["\u2502", ' ', renderedCells.map((cell, index) => (_jsxs(React.Fragment, { children: [cell, index < renderedCells.length - 1 ? ' │ ' : ''] }, index))), ' ', "\u2502"] }));
81
- };
82
- return (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [renderBorder('top'), renderRow(headers, true), renderBorder('middle'), rows.map((row, index) => (_jsx(React.Fragment, { children: renderRow(row) }, index))), renderBorder('bottom')] }));
83
- };
84
- //# sourceMappingURL=TableRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableRenderer.js","sourceRoot":"","sources":["../../../../src/ui/utils/TableRenderer.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,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S,GAAG,CAAC,KAAe,EAAE,QAAQ,GAAG,KAAK,EAAmB,EAAE;QACvE,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC9C,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzC,OAAO,UAAU,CAAC,IAAI,IAAI,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QAEH,OAAO,CACL,MAAC,IAAI,yBACD,GAAG,EACJ,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAClC,MAAC,KAAK,CAAC,QAAQ,eACZ,IAAI,EACJ,KAAK,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAF3B,KAAK,CAGT,CAClB,CAAC,EAAE,GAAG,cAEF,CACR,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,aAEnC,YAAY,CAAC,KAAK,CAAC,EAGnB,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,EAGxB,YAAY,CAAC,QAAQ,CAAC,EAGtB,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CACxB,KAAC,KAAK,CAAC,QAAQ,cAAc,SAAS,CAAC,GAAG,CAAC,IAAtB,KAAK,CAAmC,CAC9D,CAAC,EAGD,YAAY,CAAC,QAAQ,CAAC,IACnB,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,22 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- /**
7
- * Checks if a query string potentially represents an '@' command.
8
- * It triggers if the query starts with '@' or contains '@' preceded by whitespace
9
- * and followed by a non-whitespace character.
10
- *
11
- * @param query The input query string.
12
- * @returns True if the query looks like an '@' command, false otherwise.
13
- */
14
- export declare const isAtCommand: (query: string) => boolean;
15
- /**
16
- * Checks if a query string potentially represents an '/' command.
17
- * It triggers if the query starts with '/'
18
- *
19
- * @param query The input query string.
20
- * @returns True if the query looks like an '/' command, false otherwise.
21
- */
22
- export declare const isSlashCommand: (query: string) => boolean;
@@ -1,25 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- /**
7
- * Checks if a query string potentially represents an '@' command.
8
- * It triggers if the query starts with '@' or contains '@' preceded by whitespace
9
- * and followed by a non-whitespace character.
10
- *
11
- * @param query The input query string.
12
- * @returns True if the query looks like an '@' command, false otherwise.
13
- */
14
- export const isAtCommand = (query) =>
15
- // Check if starts with @ OR has a space, then @
16
- query.startsWith('@') || /\s@/.test(query);
17
- /**
18
- * Checks if a query string potentially represents an '/' command.
19
- * It triggers if the query starts with '/'
20
- *
21
- * @param query The input query string.
22
- * @returns True if the query looks like an '/' command, false otherwise.
23
- */
24
- export const isSlashCommand = (query) => query.startsWith('/');
25
- //# sourceMappingURL=commandUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commandUtils.js","sourceRoot":"","sources":["../../../../src/ui/utils/commandUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAW,EAAE;AACpD,gDAAgD;AAChD,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { SessionMetrics, ComputedSessionStats, ModelMetrics } from '../contexts/SessionContext.js';
7
- export declare function calculateErrorRate(metrics: ModelMetrics): number;
8
- export declare function calculateAverageLatency(metrics: ModelMetrics): number;
9
- export declare function calculateCacheHitRate(metrics: ModelMetrics): number;
10
- export declare const computeSessionStats: (metrics: SessionMetrics) => ComputedSessionStats;
@@ -1,55 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export function calculateErrorRate(metrics) {
7
- if (metrics.api.totalRequests === 0) {
8
- return 0;
9
- }
10
- return (metrics.api.totalErrors / metrics.api.totalRequests) * 100;
11
- }
12
- export function calculateAverageLatency(metrics) {
13
- if (metrics.api.totalRequests === 0) {
14
- return 0;
15
- }
16
- return metrics.api.totalLatencyMs / metrics.api.totalRequests;
17
- }
18
- export function calculateCacheHitRate(metrics) {
19
- if (metrics.tokens.prompt === 0) {
20
- return 0;
21
- }
22
- return (metrics.tokens.cached / metrics.tokens.prompt) * 100;
23
- }
24
- export const computeSessionStats = (metrics) => {
25
- const { models, tools } = metrics;
26
- const totalApiTime = Object.values(models).reduce((acc, model) => acc + model.api.totalLatencyMs, 0);
27
- const totalToolTime = tools.totalDurationMs;
28
- const agentActiveTime = totalApiTime + totalToolTime;
29
- const apiTimePercent = agentActiveTime > 0 ? (totalApiTime / agentActiveTime) * 100 : 0;
30
- const toolTimePercent = agentActiveTime > 0 ? (totalToolTime / agentActiveTime) * 100 : 0;
31
- const totalCachedTokens = Object.values(models).reduce((acc, model) => acc + model.tokens.cached, 0);
32
- const totalPromptTokens = Object.values(models).reduce((acc, model) => acc + model.tokens.prompt, 0);
33
- const cacheEfficiency = totalPromptTokens > 0 ? (totalCachedTokens / totalPromptTokens) * 100 : 0;
34
- const totalDecisions = tools.totalDecisions.accept +
35
- tools.totalDecisions.reject +
36
- tools.totalDecisions.modify;
37
- const successRate = tools.totalCalls > 0 ? (tools.totalSuccess / tools.totalCalls) * 100 : 0;
38
- const agreementRate = totalDecisions > 0
39
- ? (tools.totalDecisions.accept / totalDecisions) * 100
40
- : 0;
41
- return {
42
- totalApiTime,
43
- totalToolTime,
44
- agentActiveTime,
45
- apiTimePercent,
46
- toolTimePercent,
47
- cacheEfficiency,
48
- totalDecisions,
49
- successRate,
50
- agreementRate,
51
- totalCachedTokens,
52
- totalPromptTokens,
53
- };
54
- };
55
- //# sourceMappingURL=computeStats.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"computeStats.js","sourceRoot":"","sources":["../../../../src/ui/utils/computeStats.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,UAAU,kBAAkB,CAAC,OAAqB;IACtD,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAqB;IAC3D,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAqB;IACzD,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAC/D,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACj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AM;QAC3B,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IAC9B,MAAM,WAAW,GACf,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,MAAM,aAAa,GACjB,cAAc,GAAG,CAAC;QAChB,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,cAAc,CAAC,GAAG,GAAG;QACtD,CAAC,CAAC,CAAC,CAAC;IAER,OAAO;QACL,YAAY;QACZ,aAAa;QACb,eAAe;QACf,cAAc;QACd,eAAe;QACf,eAAe;QACf,cAAc;QACd,WAAW;QACX,aAAa;QACb,iBAAiB;QACjB,iBAAiB;KAClB,CAAC;AACJ,CAAC,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export declare const TOOL_SUCCESS_RATE_HIGH = 95;
7
- export declare const TOOL_SUCCESS_RATE_MEDIUM = 85;
8
- export declare const USER_AGREEMENT_RATE_HIGH = 75;
9
- export declare const USER_AGREEMENT_RATE_MEDIUM = 45;
10
- export declare const CACHE_EFFICIENCY_HIGH = 40;
11
- export declare const CACHE_EFFICIENCY_MEDIUM = 15;
12
- export declare const getStatusColor: (value: number, thresholds: {
13
- green: number;
14
- yellow: number;
15
- }, options?: {
16
- defaultColor?: string;
17
- }) => string;
@@ -1,24 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { Colors } from '../colors.js';
7
- // --- Thresholds ---
8
- export const TOOL_SUCCESS_RATE_HIGH = 95;
9
- export const TOOL_SUCCESS_RATE_MEDIUM = 85;
10
- export const USER_AGREEMENT_RATE_HIGH = 75;
11
- export const USER_AGREEMENT_RATE_MEDIUM = 45;
12
- export const CACHE_EFFICIENCY_HIGH = 40;
13
- export const CACHE_EFFICIENCY_MEDIUM = 15;
14
- // --- Color Logic ---
15
- export const getStatusColor = (value, thresholds, options = {}) => {
16
- if (value >= thresholds.green) {
17
- return Colors.AccentGreen;
18
- }
19
- if (value >= thresholds.yellow) {
20
- return Colors.AccentYellow;
21
- }
22
- return options.defaultColor || Colors.AccentRed;
23
- };
24
- //# sourceMappingURL=displayUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"displayUtils.js","sourceRoot":"","sources":["../../../../src/ui/utils/displayUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,qBAAqB;AACrB,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAC3C,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,sBAAsB;AACtB,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,KAAa,EACb,UAA6C,EAC7C,UAAqC,EAAE,EACvC,EAAE;IACF,IAAI,KAAK,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC,WAAW,CAAC;IAC5B,CAAC;IACD,IAAI,KAAK,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;QAC/B,OAAO,MAAM,CAAC,YAAY,CAAC;IAC7B,CAAC;IACD,OAAO,OAAO,CAAC,YAAY,IAAI,MAAM,CAAC,SAAS,CAAC;AAClD,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { AuthType } from '@google/gemini-cli-core';
7
- export interface ApiError {
8
- error: {
9
- code: number;
10
- message: string;
11
- status: string;
12
- details: unknown[];
13
- };
14
- }
15
- export declare function parseAndFormatApiError(error: unknown, authType?: AuthType): string;
@@ -1,79 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { AuthType } from '@google/gemini-cli-core';
7
- const RATE_LIMIT_ERROR_MESSAGE_GOOGLE = '\nPlease wait and try again later. To increase your limits, upgrade to a plan with higher limits, or use /auth to switch to using a paid API key from AI Studio at https://aistudio.google.com/apikey';
8
- const RATE_LIMIT_ERROR_MESSAGE_USE_GEMINI = '\nPlease wait and try again later. To increase your limits, request a quota increase through AI Studio, or switch to another /auth method';
9
- const RATE_LIMIT_ERROR_MESSAGE_VERTEX = '\nPlease wait and try again later. To increase your limits, request a quota increase through Vertex, or switch to another /auth method';
10
- const RATE_LIMIT_ERROR_MESSAGE_DEFAULT = 'Your request has been rate limited. Please wait and try again later.';
11
- function isApiError(error) {
12
- return (typeof error === 'object' &&
13
- error !== null &&
14
- 'error' in error &&
15
- typeof error.error === 'object' &&
16
- 'message' in error.error);
17
- }
18
- function isStructuredError(error) {
19
- return (typeof error === 'object' &&
20
- error !== null &&
21
- 'message' in error &&
22
- typeof error.message === 'string');
23
- }
24
- function getRateLimitMessage(authType) {
25
- switch (authType) {
26
- case AuthType.LOGIN_WITH_GOOGLE:
27
- return RATE_LIMIT_ERROR_MESSAGE_GOOGLE;
28
- case AuthType.USE_GEMINI:
29
- return RATE_LIMIT_ERROR_MESSAGE_USE_GEMINI;
30
- case AuthType.USE_VERTEX_AI:
31
- return RATE_LIMIT_ERROR_MESSAGE_VERTEX;
32
- default:
33
- return RATE_LIMIT_ERROR_MESSAGE_DEFAULT;
34
- }
35
- }
36
- export function parseAndFormatApiError(error, authType) {
37
- if (isStructuredError(error)) {
38
- let text = `[API Error: ${error.message}]`;
39
- if (error.status === 429) {
40
- text += getRateLimitMessage(authType);
41
- }
42
- return text;
43
- }
44
- // The error message might be a string containing a JSON object.
45
- if (typeof error === 'string') {
46
- const jsonStart = error.indexOf('{');
47
- if (jsonStart === -1) {
48
- return `[API Error: ${error}]`; // Not a JSON error, return as is.
49
- }
50
- const jsonString = error.substring(jsonStart);
51
- try {
52
- const parsedError = JSON.parse(jsonString);
53
- if (isApiError(parsedError)) {
54
- let finalMessage = parsedError.error.message;
55
- try {
56
- // See if the message is a stringified JSON with another error
57
- const nestedError = JSON.parse(finalMessage);
58
- if (isApiError(nestedError)) {
59
- finalMessage = nestedError.error.message;
60
- }
61
- }
62
- catch (_e) {
63
- // It's not a nested JSON error, so we just use the message as is.
64
- }
65
- let text = `[API Error: ${finalMessage} (Status: ${parsedError.error.status})]`;
66
- if (parsedError.error.code === 429) {
67
- text += getRateLimitMessage(authType);
68
- }
69
- return text;
70
- }
71
- }
72
- catch (_e) {
73
- // Not a valid JSON, fall through and return the original message.
74
- }
75
- return `[API Error: ${error}]`;
76
- }
77
- return '[API Error: An unknown error occurred.]';
78
- }
79
- //# sourceMappingURL=errorParsing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorParsing.js","sourceRoot":"","sources":["../../../../src/ui/utils/errorParsing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAmB,MAAM,yBAAyB,CAAC;AAEpE,MAAM,+BAA+B,GACnC,uMAAuM,CAAC;AAC1M,MAAM,mCAAmC,GACvC,2IAA2I,CAAC;AAC9I,MAAM,+BAA+B,GACnC,wIAAwI,CAAC;AAC3I,MAAM,gCAAgC,GACpC,sEAAsE,CAAC;AAWzE,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,OAAO,IAAI,KAAK;QAChB,OAAQ,KAAkB,CAAC,KAAK,KAAK,QAAQ;QAC7C,SAA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U,CAAY,CAAC;YACtD,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC5B,IAAI,YAAY,GAAG,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC;gBAC7C,IAAI,CAAC;oBACH,8DAA8D;oBAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAY,CAAC;oBACxD,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;wBAC5B,YAAY,GAAG,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC;oBAC3C,CAAC;gBACH,CAAC;gBAAC,OAAO,EAAE,EAAE,CAAC;oBACZ,kEAAkE;gBACpE,CAAC;gBACD,IAAI,IAAI,GAAG,eAAe,YAAY,aAAa,WAAW,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;gBAChF,IAAI,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBACnC,IAAI,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC;gBACxC,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,kEAAkE;QACpE,CAAC;QACD,OAAO,eAAe,KAAK,GAAG,CAAC;IACjC,CAAC;IAED,OAAO,yCAAyC,CAAC;AACnD,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export declare const formatMemoryUsage: (bytes: number) => string;
7
- /**
8
- * Formats a duration in milliseconds into a concise, human-readable string (e.g., "1h 5s").
9
- * It omits any time units that are zero.
10
- * @param milliseconds The duration in milliseconds.
11
- * @returns A formatted string representing the duration.
12
- */
13
- export declare const formatDuration: (milliseconds: number) => string;