@google/gemini-cli 0.1.9-rc.1 → 0.1.10-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/package.json +4 -8
  2. package/LICENSE +0 -202
  3. package/README.md +0 -142
  4. package/dist/.last_build +0 -0
  5. package/dist/google-gemini-cli-0.1.9-rc.1.tgz +0 -0
  6. package/dist/index.d.ts +0 -7
  7. package/dist/index.js +0 -20
  8. package/dist/index.js.map +0 -1
  9. package/dist/package.json +0 -81
  10. package/dist/src/config/auth.d.ts +0 -6
  11. package/dist/src/config/auth.js +0 -32
  12. package/dist/src/config/auth.js.map +0 -1
  13. package/dist/src/config/config.d.ts +0 -14
  14. package/dist/src/config/config.js +0 -235
  15. package/dist/src/config/config.js.map +0 -1
  16. package/dist/src/config/extension.d.ts +0 -20
  17. package/dist/src/config/extension.js +0 -81
  18. package/dist/src/config/extension.js.map +0 -1
  19. package/dist/src/config/sandboxConfig.d.ts +0 -13
  20. package/dist/src/config/sandboxConfig.js +0 -75
  21. package/dist/src/config/sandboxConfig.js.map +0 -1
  22. package/dist/src/config/settings.d.ts +0 -70
  23. package/dist/src/config/settings.js +0 -165
  24. package/dist/src/config/settings.js.map +0 -1
  25. package/dist/src/gemini.d.ts +0 -6
  26. package/dist/src/gemini.js +0 -217
  27. package/dist/src/gemini.js.map +0 -1
  28. package/dist/src/gemini.test.d.ts +0 -6
  29. package/dist/src/gemini.test.js +0 -122
  30. package/dist/src/gemini.test.js.map +0 -1
  31. package/dist/src/generated/git-commit.d.ts +0 -6
  32. package/dist/src/generated/git-commit.js +0 -9
  33. package/dist/src/generated/git-commit.js.map +0 -1
  34. package/dist/src/nonInteractiveCli.d.ts +0 -7
  35. package/dist/src/nonInteractiveCli.js +0 -115
  36. package/dist/src/nonInteractiveCli.js.map +0 -1
  37. package/dist/src/ui/App.d.ts +0 -14
  38. package/dist/src/ui/App.js +0 -387
  39. package/dist/src/ui/App.js.map +0 -1
  40. package/dist/src/ui/App.test.d.ts +0 -6
  41. package/dist/src/ui/App.test.js +0 -299
  42. package/dist/src/ui/App.test.js.map +0 -1
  43. package/dist/src/ui/colors.d.ts +0 -7
  44. package/dist/src/ui/colors.js +0 -48
  45. package/dist/src/ui/colors.js.map +0 -1
  46. package/dist/src/ui/components/AboutBox.d.ts +0 -16
  47. package/dist/src/ui/components/AboutBox.js +0 -6
  48. package/dist/src/ui/components/AboutBox.js.map +0 -1
  49. package/dist/src/ui/components/AsciiArt.d.ts +0 -7
  50. package/dist/src/ui/components/AsciiArt.js +0 -26
  51. package/dist/src/ui/components/AsciiArt.js.map +0 -1
  52. package/dist/src/ui/components/AuthDialog.d.ts +0 -15
  53. package/dist/src/ui/components/AuthDialog.js +0 -47
  54. package/dist/src/ui/components/AuthDialog.js.map +0 -1
  55. package/dist/src/ui/components/AuthDialog.test.d.ts +0 -6
  56. package/dist/src/ui/components/AuthDialog.test.js +0 -69
  57. package/dist/src/ui/components/AuthDialog.test.js.map +0 -1
  58. package/dist/src/ui/components/AuthInProgress.d.ts +0 -11
  59. package/dist/src/ui/components/AuthInProgress.js +0 -27
  60. package/dist/src/ui/components/AuthInProgress.js.map +0 -1
  61. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +0 -12
  62. package/dist/src/ui/components/AutoAcceptIndicator.js +0 -26
  63. package/dist/src/ui/components/AutoAcceptIndicator.js.map +0 -1
  64. package/dist/src/ui/components/ConsolePatcher.d.ts +0 -12
  65. package/dist/src/ui/components/ConsolePatcher.js +0 -40
  66. package/dist/src/ui/components/ConsolePatcher.js.map +0 -1
  67. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +0 -11
  68. package/dist/src/ui/components/ConsoleSummaryDisplay.js +0 -11
  69. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +0 -1
  70. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +0 -15
  71. package/dist/src/ui/components/ContextSummaryDisplay.js +0 -41
  72. package/dist/src/ui/components/ContextSummaryDisplay.js.map +0 -1
  73. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +0 -14
  74. package/dist/src/ui/components/DetailedMessagesDisplay.js +0 -34
  75. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +0 -1
  76. package/dist/src/ui/components/EditorSettingsDialog.d.ts +0 -15
  77. package/dist/src/ui/components/EditorSettingsDialog.js +0 -73
  78. package/dist/src/ui/components/EditorSettingsDialog.js.map +0 -1
  79. package/dist/src/ui/components/Footer.d.ts +0 -20
  80. package/dist/src/ui/components/Footer.js +0 -13
  81. package/dist/src/ui/components/Footer.js.map +0 -1
  82. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +0 -17
  83. package/dist/src/ui/components/GeminiRespondingSpinner.js +0 -16
  84. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +0 -1
  85. package/dist/src/ui/components/Header.d.ts +0 -12
  86. package/dist/src/ui/components/Header.js +0 -20
  87. package/dist/src/ui/components/Header.js.map +0 -1
  88. package/dist/src/ui/components/Help.d.ts +0 -12
  89. package/dist/src/ui/components/Help.js +0 -9
  90. package/dist/src/ui/components/Help.js.map +0 -1
  91. package/dist/src/ui/components/HistoryItemDisplay.d.ts +0 -18
  92. package/dist/src/ui/components/HistoryItemDisplay.js +0 -17
  93. package/dist/src/ui/components/HistoryItemDisplay.js.map +0 -1
  94. package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
  95. package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -81
  96. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
  97. package/dist/src/ui/components/InputPrompt.d.ts +0 -24
  98. package/dist/src/ui/components/InputPrompt.js +0 -331
  99. package/dist/src/ui/components/InputPrompt.js.map +0 -1
  100. package/dist/src/ui/components/InputPrompt.test.d.ts +0 -6
  101. package/dist/src/ui/components/InputPrompt.test.js +0 -154
  102. package/dist/src/ui/components/InputPrompt.test.js.map +0 -1
  103. package/dist/src/ui/components/LoadingIndicator.d.ts +0 -15
  104. package/dist/src/ui/components/LoadingIndicator.js +0 -19
  105. package/dist/src/ui/components/LoadingIndicator.js.map +0 -1
  106. package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
  107. package/dist/src/ui/components/LoadingIndicator.test.js +0 -141
  108. package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
  109. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +0 -7
  110. package/dist/src/ui/components/MemoryUsageDisplay.js +0 -27
  111. package/dist/src/ui/components/MemoryUsageDisplay.js.map +0 -1
  112. package/dist/src/ui/components/ModelStatsDisplay.d.ts +0 -7
  113. package/dist/src/ui/components/ModelStatsDisplay.js +0 -33
  114. package/dist/src/ui/components/ModelStatsDisplay.js.map +0 -1
  115. package/dist/src/ui/components/ModelStatsDisplay.test.d.ts +0 -6
  116. package/dist/src/ui/components/ModelStatsDisplay.test.js +0 -217
  117. package/dist/src/ui/components/ModelStatsDisplay.test.js.map +0 -1
  118. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +0 -11
  119. package/dist/src/ui/components/SessionSummaryDisplay.js +0 -4
  120. package/dist/src/ui/components/SessionSummaryDisplay.js.map +0 -1
  121. package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +0 -6
  122. package/dist/src/ui/components/SessionSummaryDisplay.test.js +0 -60
  123. package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +0 -1
  124. package/dist/src/ui/components/ShellModeIndicator.d.ts +0 -7
  125. package/dist/src/ui/components/ShellModeIndicator.js +0 -5
  126. package/dist/src/ui/components/ShellModeIndicator.js.map +0 -1
  127. package/dist/src/ui/components/ShowMoreLines.d.ts +0 -10
  128. package/dist/src/ui/components/ShowMoreLines.js +0 -24
  129. package/dist/src/ui/components/ShowMoreLines.js.map +0 -1
  130. package/dist/src/ui/components/StatsDisplay.d.ts +0 -12
  131. package/dist/src/ui/components/StatsDisplay.js +0 -42
  132. package/dist/src/ui/components/StatsDisplay.js.map +0 -1
  133. package/dist/src/ui/components/StatsDisplay.test.d.ts +0 -6
  134. package/dist/src/ui/components/StatsDisplay.test.js +0 -275
  135. package/dist/src/ui/components/StatsDisplay.test.js.map +0 -1
  136. package/dist/src/ui/components/SuggestionsDisplay.d.ts +0 -21
  137. package/dist/src/ui/components/SuggestionsDisplay.js +0 -32
  138. package/dist/src/ui/components/SuggestionsDisplay.js.map +0 -1
  139. package/dist/src/ui/components/ThemeDialog.d.ts +0 -19
  140. package/dist/src/ui/components/ThemeDialog.js +0 -126
  141. package/dist/src/ui/components/ThemeDialog.js.map +0 -1
  142. package/dist/src/ui/components/Tips.d.ts +0 -12
  143. package/dist/src/ui/components/Tips.js +0 -8
  144. package/dist/src/ui/components/Tips.js.map +0 -1
  145. package/dist/src/ui/components/ToolStatsDisplay.d.ts +0 -7
  146. package/dist/src/ui/components/ToolStatsDisplay.js +0 -41
  147. package/dist/src/ui/components/ToolStatsDisplay.js.map +0 -1
  148. package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +0 -6
  149. package/dist/src/ui/components/ToolStatsDisplay.test.js +0 -160
  150. package/dist/src/ui/components/ToolStatsDisplay.test.js.map +0 -1
  151. package/dist/src/ui/components/UpdateNotification.d.ts +0 -10
  152. package/dist/src/ui/components/UpdateNotification.js +0 -10
  153. package/dist/src/ui/components/UpdateNotification.js.map +0 -1
  154. package/dist/src/ui/components/messages/CompressionMessage.d.ts +0 -11
  155. package/dist/src/ui/components/messages/CompressionMessage.js +0 -16
  156. package/dist/src/ui/components/messages/CompressionMessage.js.map +0 -1
  157. package/dist/src/ui/components/messages/DiffRenderer.d.ts +0 -15
  158. package/dist/src/ui/components/messages/DiffRenderer.js +0 -212
  159. package/dist/src/ui/components/messages/DiffRenderer.js.map +0 -1
  160. package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
  161. package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -239
  162. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
  163. package/dist/src/ui/components/messages/ErrorMessage.d.ts +0 -11
  164. package/dist/src/ui/components/messages/ErrorMessage.js +0 -9
  165. package/dist/src/ui/components/messages/ErrorMessage.js.map +0 -1
  166. package/dist/src/ui/components/messages/GeminiMessage.d.ts +0 -14
  167. package/dist/src/ui/components/messages/GeminiMessage.js +0 -10
  168. package/dist/src/ui/components/messages/GeminiMessage.js.map +0 -1
  169. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +0 -14
  170. package/dist/src/ui/components/messages/GeminiMessageContent.js +0 -15
  171. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +0 -1
  172. package/dist/src/ui/components/messages/InfoMessage.d.ts +0 -11
  173. package/dist/src/ui/components/messages/InfoMessage.js +0 -9
  174. package/dist/src/ui/components/messages/InfoMessage.js.map +0 -1
  175. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +0 -15
  176. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +0 -111
  177. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +0 -1
  178. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
  179. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -37
  180. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
  181. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +0 -18
  182. package/dist/src/ui/components/messages/ToolGroupMessage.js +0 -53
  183. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +0 -1
  184. package/dist/src/ui/components/messages/ToolMessage.d.ts +0 -15
  185. package/dist/src/ui/components/messages/ToolMessage.js +0 -61
  186. package/dist/src/ui/components/messages/ToolMessage.js.map +0 -1
  187. package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
  188. package/dist/src/ui/components/messages/ToolMessage.test.js +0 -116
  189. package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
  190. package/dist/src/ui/components/messages/UserMessage.d.ts +0 -11
  191. package/dist/src/ui/components/messages/UserMessage.js +0 -9
  192. package/dist/src/ui/components/messages/UserMessage.js.map +0 -1
  193. package/dist/src/ui/components/messages/UserShellMessage.d.ts +0 -11
  194. package/dist/src/ui/components/messages/UserShellMessage.js +0 -9
  195. package/dist/src/ui/components/messages/UserShellMessage.js.map +0 -1
  196. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +0 -61
  197. package/dist/src/ui/components/shared/MaxSizedBox.js +0 -384
  198. package/dist/src/ui/components/shared/MaxSizedBox.js.map +0 -1
  199. package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
  200. package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -134
  201. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
  202. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +0 -41
  203. package/dist/src/ui/components/shared/RadioButtonSelect.js +0 -52
  204. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +0 -1
  205. package/dist/src/ui/components/shared/text-buffer.d.ts +0 -128
  206. package/dist/src/ui/components/shared/text-buffer.js +0 -1122
  207. package/dist/src/ui/components/shared/text-buffer.js.map +0 -1
  208. package/dist/src/ui/constants.d.ts +0 -8
  209. package/dist/src/ui/constants.js +0 -12
  210. package/dist/src/ui/constants.js.map +0 -1
  211. package/dist/src/ui/contexts/OverflowContext.d.ts +0 -19
  212. package/dist/src/ui/contexts/OverflowContext.js +0 -43
  213. package/dist/src/ui/contexts/OverflowContext.js.map +0 -1
  214. package/dist/src/ui/contexts/SessionContext.d.ts +0 -33
  215. package/dist/src/ui/contexts/SessionContext.js +0 -49
  216. package/dist/src/ui/contexts/SessionContext.js.map +0 -1
  217. package/dist/src/ui/contexts/SessionContext.test.d.ts +0 -6
  218. package/dist/src/ui/contexts/SessionContext.test.js +0 -96
  219. package/dist/src/ui/contexts/SessionContext.test.js.map +0 -1
  220. package/dist/src/ui/contexts/StreamingContext.d.ts +0 -9
  221. package/dist/src/ui/contexts/StreamingContext.js +0 -15
  222. package/dist/src/ui/contexts/StreamingContext.js.map +0 -1
  223. package/dist/src/ui/editors/editorSettingsManager.d.ts +0 -19
  224. package/dist/src/ui/editors/editorSettingsManager.js +0 -54
  225. package/dist/src/ui/editors/editorSettingsManager.js.map +0 -1
  226. package/dist/src/ui/hooks/atCommandProcessor.d.ts +0 -31
  227. package/dist/src/ui/hooks/atCommandProcessor.js +0 -312
  228. package/dist/src/ui/hooks/atCommandProcessor.js.map +0 -1
  229. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +0 -16
  230. package/dist/src/ui/hooks/shellCommandProcessor.js +0 -261
  231. package/dist/src/ui/hooks/shellCommandProcessor.js.map +0 -1
  232. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +0 -31
  233. package/dist/src/ui/hooks/slashCommandProcessor.js +0 -965
  234. package/dist/src/ui/hooks/slashCommandProcessor.js.map +0 -1
  235. package/dist/src/ui/hooks/useAuthCommand.d.ts +0 -14
  236. package/dist/src/ui/hooks/useAuthCommand.js +0 -54
  237. package/dist/src/ui/hooks/useAuthCommand.js.map +0 -1
  238. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +0 -10
  239. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +0 -37
  240. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +0 -1
  241. package/dist/src/ui/hooks/useBracketedPaste.d.ts +0 -12
  242. package/dist/src/ui/hooks/useBracketedPaste.js +0 -32
  243. package/dist/src/ui/hooks/useBracketedPaste.js.map +0 -1
  244. package/dist/src/ui/hooks/useCompletion.d.ts +0 -21
  245. package/dist/src/ui/hooks/useCompletion.js +0 -322
  246. package/dist/src/ui/hooks/useCompletion.js.map +0 -1
  247. package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -12
  248. package/dist/src/ui/hooks/useConsoleMessages.js +0 -60
  249. package/dist/src/ui/hooks/useConsoleMessages.js.map +0 -1
  250. package/dist/src/ui/hooks/useEditorSettings.d.ts +0 -16
  251. package/dist/src/ui/hooks/useEditorSettings.js +0 -43
  252. package/dist/src/ui/hooks/useEditorSettings.js.map +0 -1
  253. package/dist/src/ui/hooks/useGeminiStream.d.ts +0 -23
  254. package/dist/src/ui/hooks/useGeminiStream.js +0 -524
  255. package/dist/src/ui/hooks/useGeminiStream.js.map +0 -1
  256. package/dist/src/ui/hooks/useGeminiStream.test.d.ts +0 -6
  257. package/dist/src/ui/hooks/useGeminiStream.test.js +0 -775
  258. package/dist/src/ui/hooks/useGeminiStream.test.js.map +0 -1
  259. package/dist/src/ui/hooks/useGitBranchName.d.ts +0 -6
  260. package/dist/src/ui/hooks/useGitBranchName.js +0 -61
  261. package/dist/src/ui/hooks/useGitBranchName.js.map +0 -1
  262. package/dist/src/ui/hooks/useHistoryManager.d.ts +0 -22
  263. package/dist/src/ui/hooks/useHistoryManager.js +0 -72
  264. package/dist/src/ui/hooks/useHistoryManager.js.map +0 -1
  265. package/dist/src/ui/hooks/useInputHistory.d.ts +0 -19
  266. package/dist/src/ui/hooks/useInputHistory.js +0 -84
  267. package/dist/src/ui/hooks/useInputHistory.js.map +0 -1
  268. package/dist/src/ui/hooks/useKeypress.d.ts +0 -29
  269. package/dist/src/ui/hooks/useKeypress.js +0 -86
  270. package/dist/src/ui/hooks/useKeypress.js.map +0 -1
  271. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +0 -10
  272. package/dist/src/ui/hooks/useLoadingIndicator.js +0 -44
  273. package/dist/src/ui/hooks/useLoadingIndicator.js.map +0 -1
  274. package/dist/src/ui/hooks/useLogger.d.ts +0 -10
  275. package/dist/src/ui/hooks/useLogger.js +0 -29
  276. package/dist/src/ui/hooks/useLogger.js.map +0 -1
  277. package/dist/src/ui/hooks/usePhraseCycler.d.ts +0 -14
  278. package/dist/src/ui/hooks/usePhraseCycler.js +0 -189
  279. package/dist/src/ui/hooks/usePhraseCycler.js.map +0 -1
  280. package/dist/src/ui/hooks/usePrivacySettings.d.ts +0 -16
  281. package/dist/src/ui/hooks/usePrivacySettings.js +0 -115
  282. package/dist/src/ui/hooks/usePrivacySettings.js.map +0 -1
  283. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +0 -33
  284. package/dist/src/ui/hooks/useReactToolScheduler.js +0 -186
  285. package/dist/src/ui/hooks/useReactToolScheduler.js.map +0 -1
  286. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +0 -6
  287. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +0 -7
  288. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +0 -1
  289. package/dist/src/ui/hooks/useShellHistory.d.ts +0 -11
  290. package/dist/src/ui/hooks/useShellHistory.js +0 -89
  291. package/dist/src/ui/hooks/useShellHistory.js.map +0 -1
  292. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +0 -9
  293. package/dist/src/ui/hooks/useShowMemoryCommand.js +0 -58
  294. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +0 -1
  295. package/dist/src/ui/hooks/useStateAndRef.d.ts +0 -7
  296. package/dist/src/ui/hooks/useStateAndRef.js +0 -26
  297. package/dist/src/ui/hooks/useStateAndRef.js.map +0 -1
  298. package/dist/src/ui/hooks/useTerminalSize.d.ts +0 -9
  299. package/dist/src/ui/hooks/useTerminalSize.js +0 -27
  300. package/dist/src/ui/hooks/useTerminalSize.js.map +0 -1
  301. package/dist/src/ui/hooks/useThemeCommand.d.ts +0 -15
  302. package/dist/src/ui/hooks/useThemeCommand.js +0 -78
  303. package/dist/src/ui/hooks/useThemeCommand.js.map +0 -1
  304. package/dist/src/ui/hooks/useTimer.d.ts +0 -12
  305. package/dist/src/ui/hooks/useTimer.js +0 -58
  306. package/dist/src/ui/hooks/useTimer.js.map +0 -1
  307. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +0 -12
  308. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +0 -40
  309. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +0 -1
  310. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +0 -10
  311. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +0 -17
  312. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +0 -1
  313. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +0 -10
  314. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +0 -17
  315. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +0 -1
  316. package/dist/src/ui/privacy/PrivacyNotice.d.ts +0 -12
  317. package/dist/src/ui/privacy/PrivacyNotice.js +0 -25
  318. package/dist/src/ui/privacy/PrivacyNotice.js.map +0 -1
  319. package/dist/src/ui/themes/ansi-light.d.ts +0 -7
  320. package/dist/src/ui/themes/ansi-light.js +0 -139
  321. package/dist/src/ui/themes/ansi-light.js.map +0 -1
  322. package/dist/src/ui/themes/ansi.d.ts +0 -7
  323. package/dist/src/ui/themes/ansi.js +0 -149
  324. package/dist/src/ui/themes/ansi.js.map +0 -1
  325. package/dist/src/ui/themes/atom-one-dark.d.ts +0 -7
  326. package/dist/src/ui/themes/atom-one-dark.js +0 -136
  327. package/dist/src/ui/themes/atom-one-dark.js.map +0 -1
  328. package/dist/src/ui/themes/ayu-light.d.ts +0 -7
  329. package/dist/src/ui/themes/ayu-light.js +0 -128
  330. package/dist/src/ui/themes/ayu-light.js.map +0 -1
  331. package/dist/src/ui/themes/ayu.d.ts +0 -7
  332. package/dist/src/ui/themes/ayu.js +0 -102
  333. package/dist/src/ui/themes/ayu.js.map +0 -1
  334. package/dist/src/ui/themes/default-light.d.ts +0 -7
  335. package/dist/src/ui/themes/default-light.js +0 -100
  336. package/dist/src/ui/themes/default-light.js.map +0 -1
  337. package/dist/src/ui/themes/default.d.ts +0 -7
  338. package/dist/src/ui/themes/default.js +0 -143
  339. package/dist/src/ui/themes/default.js.map +0 -1
  340. package/dist/src/ui/themes/dracula.d.ts +0 -7
  341. package/dist/src/ui/themes/dracula.js +0 -113
  342. package/dist/src/ui/themes/dracula.js.map +0 -1
  343. package/dist/src/ui/themes/github-dark.d.ts +0 -7
  344. package/dist/src/ui/themes/github-dark.js +0 -136
  345. package/dist/src/ui/themes/github-dark.js.map +0 -1
  346. package/dist/src/ui/themes/github-light.d.ts +0 -7
  347. package/dist/src/ui/themes/github-light.js +0 -138
  348. package/dist/src/ui/themes/github-light.js.map +0 -1
  349. package/dist/src/ui/themes/googlecode.d.ts +0 -7
  350. package/dist/src/ui/themes/googlecode.js +0 -135
  351. package/dist/src/ui/themes/googlecode.js.map +0 -1
  352. package/dist/src/ui/themes/no-color.d.ts +0 -7
  353. package/dist/src/ui/themes/no-color.js +0 -84
  354. package/dist/src/ui/themes/no-color.js.map +0 -1
  355. package/dist/src/ui/themes/shades-of-purple.d.ts +0 -11
  356. package/dist/src/ui/themes/shades-of-purple.js +0 -302
  357. package/dist/src/ui/themes/shades-of-purple.js.map +0 -1
  358. package/dist/src/ui/themes/theme-manager.d.ts +0 -33
  359. package/dist/src/ui/themes/theme-manager.js +0 -109
  360. package/dist/src/ui/themes/theme-manager.js.map +0 -1
  361. package/dist/src/ui/themes/theme.d.ts +0 -67
  362. package/dist/src/ui/themes/theme.js +0 -304
  363. package/dist/src/ui/themes/theme.js.map +0 -1
  364. package/dist/src/ui/themes/xcode.d.ts +0 -7
  365. package/dist/src/ui/themes/xcode.js +0 -143
  366. package/dist/src/ui/themes/xcode.js.map +0 -1
  367. package/dist/src/ui/types.d.ts +0 -162
  368. package/dist/src/ui/types.js +0 -43
  369. package/dist/src/ui/types.js.map +0 -1
  370. package/dist/src/ui/utils/CodeColorizer.d.ts +0 -14
  371. package/dist/src/ui/utils/CodeColorizer.js +0 -97
  372. package/dist/src/ui/utils/CodeColorizer.js.map +0 -1
  373. package/dist/src/ui/utils/MarkdownDisplay.d.ts +0 -14
  374. package/dist/src/ui/utils/MarkdownDisplay.js +0 -276
  375. package/dist/src/ui/utils/MarkdownDisplay.js.map +0 -1
  376. package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
  377. package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -176
  378. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
  379. package/dist/src/ui/utils/TableRenderer.d.ts +0 -17
  380. package/dist/src/ui/utils/TableRenderer.js +0 -66
  381. package/dist/src/ui/utils/TableRenderer.js.map +0 -1
  382. package/dist/src/ui/utils/commandUtils.d.ts +0 -22
  383. package/dist/src/ui/utils/commandUtils.js +0 -25
  384. package/dist/src/ui/utils/commandUtils.js.map +0 -1
  385. package/dist/src/ui/utils/computeStats.d.ts +0 -10
  386. package/dist/src/ui/utils/computeStats.js +0 -55
  387. package/dist/src/ui/utils/computeStats.js.map +0 -1
  388. package/dist/src/ui/utils/displayUtils.d.ts +0 -17
  389. package/dist/src/ui/utils/displayUtils.js +0 -24
  390. package/dist/src/ui/utils/displayUtils.js.map +0 -1
  391. package/dist/src/ui/utils/errorParsing.d.ts +0 -15
  392. package/dist/src/ui/utils/errorParsing.js +0 -79
  393. package/dist/src/ui/utils/errorParsing.js.map +0 -1
  394. package/dist/src/ui/utils/formatters.d.ts +0 -13
  395. package/dist/src/ui/utils/formatters.js +0 -56
  396. package/dist/src/ui/utils/formatters.js.map +0 -1
  397. package/dist/src/ui/utils/markdownUtilities.d.ts +0 -6
  398. package/dist/src/ui/utils/markdownUtilities.js +0 -110
  399. package/dist/src/ui/utils/markdownUtilities.js.map +0 -1
  400. package/dist/src/ui/utils/textUtils.d.ts +0 -22
  401. package/dist/src/ui/utils/textUtils.js +0 -58
  402. package/dist/src/ui/utils/textUtils.js.map +0 -1
  403. package/dist/src/ui/utils/updateCheck.d.ts +0 -6
  404. package/dist/src/ui/utils/updateCheck.js +0 -36
  405. package/dist/src/ui/utils/updateCheck.js.map +0 -1
  406. package/dist/src/utils/cleanup.d.ts +0 -6
  407. package/dist/src/utils/cleanup.js +0 -19
  408. package/dist/src/utils/cleanup.js.map +0 -1
  409. package/dist/src/utils/package.d.ts +0 -12
  410. package/dist/src/utils/package.js +0 -24
  411. package/dist/src/utils/package.js.map +0 -1
  412. package/dist/src/utils/readStdin.d.ts +0 -6
  413. package/dist/src/utils/readStdin.js +0 -34
  414. package/dist/src/utils/readStdin.js.map +0 -1
  415. package/dist/src/utils/sandbox-macos-permissive-closed.sb +0 -26
  416. package/dist/src/utils/sandbox-macos-permissive-open.sb +0 -19
  417. package/dist/src/utils/sandbox-macos-permissive-proxied.sb +0 -31
  418. package/dist/src/utils/sandbox-macos-restrictive-closed.sb +0 -87
  419. package/dist/src/utils/sandbox-macos-restrictive-open.sb +0 -90
  420. package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +0 -92
  421. package/dist/src/utils/sandbox.d.ts +0 -7
  422. package/dist/src/utils/sandbox.js +0 -680
  423. package/dist/src/utils/sandbox.js.map +0 -1
  424. package/dist/src/utils/startupWarnings.d.ts +0 -6
  425. package/dist/src/utils/startupWarnings.js +0 -40
  426. package/dist/src/utils/startupWarnings.js.map +0 -1
  427. package/dist/src/utils/version.d.ts +0 -6
  428. package/dist/src/utils/version.js +0 -11
  429. package/dist/src/utils/version.js.map +0 -1
  430. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,19 +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
- import { useStreamingContext } from '../contexts/StreamingContext.js';
5
- import { StreamingState } from '../types.js';
6
- import { GeminiRespondingSpinner } from './GeminiRespondingSpinner.js';
7
- export const LoadingIndicator = ({ currentLoadingPhrase, elapsedTime, rightContent, thought, }) => {
8
- const streamingState = useStreamingContext();
9
- if (streamingState === StreamingState.Idle) {
10
- return null;
11
- }
12
- const primaryText = thought?.subject || currentLoadingPhrase;
13
- return (_jsx(Box, { marginTop: 1, paddingLeft: 0, flexDirection: "column", children: _jsxs(Box, { children: [_jsx(Box, { marginRight: 1, children: _jsx(GeminiRespondingSpinner, { nonRespondingDisplay: streamingState === StreamingState.WaitingForConfirmation
14
- ? '⠏'
15
- : '' }) }), primaryText && _jsx(Text, { color: Colors.AccentPurple, children: primaryText }), _jsx(Text, { color: Colors.Gray, children: streamingState === StreamingState.WaitingForConfirmation
16
- ? ''
17
- : ` (esc to cancel, ${elapsedTime}s)` }), _jsx(Box, { flexGrow: 1 }), rightContent && _jsx(Box, { children: rightContent })] }) }));
18
- };
19
- //# sourceMappingURL=LoadingIndicator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoadingIndicator.js","sourceRoot":"","sources":["../../../../src/ui/components/LoadingIndicator.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AASvE,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,OAAO,GACR,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,mBAAmB,EAAE,CAAC;IAE7C,IAAI,cAAc,KAAK,cAAc,CAAC,IAAI,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,EAAE,OAAO,IAAI,oBAAoB,CAAC;IAE7D,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,aAAa,EAAC,QAAQ,YAEvD,MAAC,GAAG,eACF,KAAC,GAAG,IAAC,WAAW,EAAE,CAAC,YACjB,KAAC,uBAAuB,IACtB,oBAAoB,EAClB,cAAc,KAAK,cAAc,CAAC,sBAAsB;4BACtD,CAAC,CAAC,GAAG;4BACL,CAAC,CAAC,EAAE,GAER,GACE,EACL,WAAW,IAAI,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,YAAG,WAAW,GAAQ,EACtE,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YACrB,cAAc,KAAK,cAAc,CAAC,sBAAsB;wBACvD,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,oBAAoB,WAAW,IAAI,GAClC,EACP,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,GAAsB,EACrC,YAAY,IAAI,KAAC,GAAG,cAAE,YAAY,GAAO,IACtC,GACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export {};
@@ -1,141 +0,0 @@
1
- import { jsx as _jsx } 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 { render } from 'ink-testing-library';
9
- import { Text } from 'ink';
10
- import { LoadingIndicator } from './LoadingIndicator.js';
11
- import { StreamingContext } from '../contexts/StreamingContext.js';
12
- import { StreamingState } from '../types.js';
13
- import { vi } from 'vitest';
14
- // Mock GeminiRespondingSpinner
15
- vi.mock('./GeminiRespondingSpinner.js', () => ({
16
- GeminiRespondingSpinner: ({ nonRespondingDisplay, }) => {
17
- const streamingState = React.useContext(StreamingContext);
18
- if (streamingState === StreamingState.Responding) {
19
- return _jsx(Text, { children: "MockRespondingSpinner" });
20
- }
21
- else if (nonRespondingDisplay) {
22
- return _jsx(Text, { children: nonRespondingDisplay });
23
- }
24
- return null;
25
- },
26
- }));
27
- const renderWithContext = (ui, streamingStateValue) => {
28
- const contextValue = streamingStateValue;
29
- return render(_jsx(StreamingContext.Provider, { value: contextValue, children: ui }));
30
- };
31
- describe('<LoadingIndicator />', () => {
32
- const defaultProps = {
33
- currentLoadingPhrase: 'Loading...',
34
- elapsedTime: 5,
35
- };
36
- it('should not render when streamingState is Idle', () => {
37
- const { lastFrame } = renderWithContext(_jsx(LoadingIndicator, { ...defaultProps }), StreamingState.Idle);
38
- expect(lastFrame()).toBe('');
39
- });
40
- it('should render spinner, phrase, and time when streamingState is Responding', () => {
41
- const { lastFrame } = renderWithContext(_jsx(LoadingIndicator, { ...defaultProps }), StreamingState.Responding);
42
- const output = lastFrame();
43
- expect(output).toContain('MockRespondingSpinner');
44
- expect(output).toContain('Loading...');
45
- expect(output).toContain('(esc to cancel, 5s)');
46
- });
47
- it('should render spinner (static), phrase but no time/cancel when streamingState is WaitingForConfirmation', () => {
48
- const props = {
49
- currentLoadingPhrase: 'Confirm action',
50
- elapsedTime: 10,
51
- };
52
- const { lastFrame } = renderWithContext(_jsx(LoadingIndicator, { ...props }), StreamingState.WaitingForConfirmation);
53
- const output = lastFrame();
54
- expect(output).toContain('⠏'); // Static char for WaitingForConfirmation
55
- expect(output).toContain('Confirm action');
56
- expect(output).not.toContain('(esc to cancel)');
57
- expect(output).not.toContain(', 10s');
58
- });
59
- it('should display the currentLoadingPhrase correctly', () => {
60
- const props = {
61
- currentLoadingPhrase: 'Processing data...',
62
- elapsedTime: 3,
63
- };
64
- const { lastFrame } = renderWithContext(_jsx(LoadingIndicator, { ...props }), StreamingState.Responding);
65
- expect(lastFrame()).toContain('Processing data...');
66
- });
67
- it('should display the elapsedTime correctly when Responding', () => {
68
- const props = {
69
- currentLoadingPhrase: 'Working...',
70
- elapsedTime: 8,
71
- };
72
- const { lastFrame } = renderWithContext(_jsx(LoadingIndicator, { ...props }), StreamingState.Responding);
73
- expect(lastFrame()).toContain('(esc to cancel, 8s)');
74
- });
75
- it('should render rightContent when provided', () => {
76
- const rightContent = _jsx(Text, { children: "Extra Info" });
77
- const { lastFrame } = renderWithContext(_jsx(LoadingIndicator, { ...defaultProps, rightContent: rightContent }), StreamingState.Responding);
78
- expect(lastFrame()).toContain('Extra Info');
79
- });
80
- it('should transition correctly between states using rerender', () => {
81
- const { lastFrame, rerender } = renderWithContext(_jsx(LoadingIndicator, { ...defaultProps }), StreamingState.Idle);
82
- expect(lastFrame()).toBe(''); // Initial: Idle
83
- // Transition to Responding
84
- rerender(_jsx(StreamingContext.Provider, { value: StreamingState.Responding, children: _jsx(LoadingIndicator, { currentLoadingPhrase: "Now Responding", elapsedTime: 2 }) }));
85
- let output = lastFrame();
86
- expect(output).toContain('MockRespondingSpinner');
87
- expect(output).toContain('Now Responding');
88
- expect(output).toContain('(esc to cancel, 2s)');
89
- // Transition to WaitingForConfirmation
90
- rerender(_jsx(StreamingContext.Provider, { value: StreamingState.WaitingForConfirmation, children: _jsx(LoadingIndicator, { currentLoadingPhrase: "Please Confirm", elapsedTime: 15 }) }));
91
- output = lastFrame();
92
- expect(output).toContain('⠏');
93
- expect(output).toContain('Please Confirm');
94
- expect(output).not.toContain('(esc to cancel)');
95
- expect(output).not.toContain(', 15s');
96
- // Transition back to Idle
97
- rerender(_jsx(StreamingContext.Provider, { value: StreamingState.Idle, children: _jsx(LoadingIndicator, { ...defaultProps }) }));
98
- expect(lastFrame()).toBe('');
99
- });
100
- it('should display fallback phrase if thought is empty', () => {
101
- const props = {
102
- thought: null,
103
- currentLoadingPhrase: 'Loading...',
104
- elapsedTime: 5,
105
- };
106
- const { lastFrame } = renderWithContext(_jsx(LoadingIndicator, { ...props }), StreamingState.Responding);
107
- const output = lastFrame();
108
- expect(output).toContain('Loading...');
109
- });
110
- it('should display the subject of a thought', () => {
111
- const props = {
112
- thought: {
113
- subject: 'Thinking about something...',
114
- description: 'and other stuff.',
115
- },
116
- elapsedTime: 5,
117
- };
118
- const { lastFrame } = renderWithContext(_jsx(LoadingIndicator, { ...props }), StreamingState.Responding);
119
- const output = lastFrame();
120
- expect(output).toBeDefined();
121
- if (output) {
122
- expect(output).toContain('Thinking about something...');
123
- expect(output).not.toContain('and other stuff.');
124
- }
125
- });
126
- it('should prioritize thought.subject over currentLoadingPhrase', () => {
127
- const props = {
128
- thought: {
129
- subject: 'This should be displayed',
130
- description: 'A description',
131
- },
132
- currentLoadingPhrase: 'This should not be displayed',
133
- elapsedTime: 5,
134
- };
135
- const { lastFrame } = renderWithContext(_jsx(LoadingIndicator, { ...props }), StreamingState.Responding);
136
- const output = lastFrame();
137
- expect(output).toContain('This should be displayed');
138
- expect(output).not.toContain('This should not be displayed');
139
- });
140
- });
141
- //# sourceMappingURL=LoadingIndicator.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoadingIndicator.test.js","sourceRoot":"","sources":["../../../../src/ui/components/LoadingIndicator.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE5B,+BAA+B;AAC/B,EAAE,CAAC,IAAI,CAAC,8BAA8B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7C,uBAAuB,EAAE,CAAC,EACxB,oBAAoB,GAGrB,EAAE,EAAE;QACH,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAE,CAAC;QAC3D,IAAI,cAAc,KAAK,cAAc,CAAC,UAAU,EAAE,CAAC;YACjD,OAAO,KAAC,IAAI,wCAA6B,CAAC;QAC5C,CAAC;aAAM,IAAI,oBAAoB,EAAE,CAAC;YAChC,OAAO,KAAC,IAAI,cAAE,oBAAoB,GAAQ,CAAC;QAC7C,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,iBAAiB,GAAG,CACxB,EAAsB,EACtB,mBAAmC,EACnC,EAAE;IACF,MAAM,YAAY,GAAmB,mBAAmB,CAAC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EAAE,CAAC;YACX,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC;YACxD,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACrE,MAAM,KAAK,GAAG;YACZ,OAAO,EAAE;gBACP,OAAO,EAAE,0BAA0B;gBACnC,WAAW,EAAE,eAAe;aAC7B;YACD,oBAAoB,EAAE,8BAA8B;YACpD,WAAW,EAAE,CAAC;SACf,CAAC;QACF,MAAM,EAAE,SAAS,EAAE,GAAG,iBAAiB,CACrC,KAAC,gBAAgB,OAAK,KAAK,GAAI,EAC/B,cAAc,CAAC,UAAU,CAC1B,CAAC;QACF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC;QACrD,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- export declare const MemoryUsageDisplay: React.FC;
@@ -1,27 +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 { useEffect, useState } from 'react';
8
- import { Box, Text } from 'ink';
9
- import { Colors } from '../colors.js';
10
- import process from 'node:process';
11
- import { formatMemoryUsage } from '../utils/formatters.js';
12
- export const MemoryUsageDisplay = () => {
13
- const [memoryUsage, setMemoryUsage] = useState('');
14
- const [memoryUsageColor, setMemoryUsageColor] = useState(Colors.Gray);
15
- useEffect(() => {
16
- const updateMemory = () => {
17
- const usage = process.memoryUsage().rss;
18
- setMemoryUsage(formatMemoryUsage(usage));
19
- setMemoryUsageColor(usage >= 2 * 1024 * 1024 * 1024 ? Colors.AccentRed : Colors.Gray);
20
- };
21
- const intervalId = setInterval(updateMemory, 2000);
22
- updateMemory(); // Initial update
23
- return () => clearInterval(intervalId);
24
- }, []);
25
- return (_jsxs(Box, { children: [_jsx(Text, { color: Colors.Gray, children: "| " }), _jsx(Text, { color: memoryUsageColor, children: memoryUsage })] }));
26
- };
27
- //# sourceMappingURL=MemoryUsageDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MemoryUsageDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/MemoryUsageDisplay.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,CAAC,MAAM,kBAAkB,GAAa,GAAG,EAAE;IAC/C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAS,MAAM,CAAC,IAAI,CAAC,CAAC;IAE9E,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,GAAG,EAAE;YACxB,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC;YACxC,cAAc,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;YACzC,mBAAmB,CACjB,KAAK,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CACjE,CAAC;QACJ,CAAC,CAAC;QACF,MAAM,UAAU,GAAG,WAAW,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QACnD,YAAY,EAAE,CAAC,CAAC,iBAAiB;QACjC,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,mBAAW,EACnC,KAAC,IAAI,IAAC,KAAK,EAAE,gBAAgB,YAAG,WAAW,GAAQ,IAC/C,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- export declare const ModelStatsDisplay: React.FC;
@@ -1,33 +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
- import { formatDuration } from '../utils/formatters.js';
5
- import { calculateAverageLatency, calculateCacheHitRate, calculateErrorRate, } from '../utils/computeStats.js';
6
- import { useSessionStats } from '../contexts/SessionContext.js';
7
- const METRIC_COL_WIDTH = 28;
8
- const MODEL_COL_WIDTH = 22;
9
- const StatRow = ({ title, values, isSubtle = false, isSection = false, }) => (_jsxs(Box, { children: [_jsx(Box, { width: METRIC_COL_WIDTH, children: _jsx(Text, { bold: isSection, color: isSection ? undefined : Colors.LightBlue, children: isSubtle ? ` ↳ ${title}` : title }) }), values.map((value, index) => (_jsx(Box, { width: MODEL_COL_WIDTH, children: _jsx(Text, { children: value }) }, index)))] }));
10
- export const ModelStatsDisplay = () => {
11
- const { stats } = useSessionStats();
12
- const { models } = stats.metrics;
13
- const activeModels = Object.entries(models).filter(([, metrics]) => metrics.api.totalRequests > 0);
14
- if (activeModels.length === 0) {
15
- return (_jsx(Box, { borderStyle: "round", borderColor: Colors.Gray, paddingY: 1, paddingX: 2, children: _jsx(Text, { children: "No API calls have been made in this session." }) }));
16
- }
17
- const modelNames = activeModels.map(([name]) => name);
18
- const getModelValues = (getter) => activeModels.map(([, metrics]) => getter(metrics));
19
- const hasThoughts = activeModels.some(([, metrics]) => metrics.tokens.thoughts > 0);
20
- const hasTool = activeModels.some(([, metrics]) => metrics.tokens.tool > 0);
21
- const hasCached = activeModels.some(([, metrics]) => metrics.tokens.cached > 0);
22
- return (_jsxs(Box, { borderStyle: "round", borderColor: Colors.Gray, flexDirection: "column", paddingY: 1, paddingX: 2, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Model Stats For Nerds" }), _jsx(Box, { height: 1 }), _jsxs(Box, { children: [_jsx(Box, { width: METRIC_COL_WIDTH, children: _jsx(Text, { bold: true, children: "Metric" }) }), modelNames.map((name) => (_jsx(Box, { width: MODEL_COL_WIDTH, children: _jsx(Text, { bold: true, children: name }) }, name)))] }), _jsx(Box, { borderStyle: "single", borderBottom: true, borderTop: false, borderLeft: false, borderRight: false }), _jsx(StatRow, { title: "API", values: [], isSection: true }), _jsx(StatRow, { title: "Requests", values: getModelValues((m) => m.api.totalRequests.toLocaleString()) }), _jsx(StatRow, { title: "Errors", values: getModelValues((m) => {
23
- const errorRate = calculateErrorRate(m);
24
- return (_jsxs(Text, { color: m.api.totalErrors > 0 ? Colors.AccentRed : Colors.Foreground, children: [m.api.totalErrors.toLocaleString(), " (", errorRate.toFixed(1), "%)"] }));
25
- }) }), _jsx(StatRow, { title: "Avg Latency", values: getModelValues((m) => {
26
- const avgLatency = calculateAverageLatency(m);
27
- return formatDuration(avgLatency);
28
- }) }), _jsx(Box, { height: 1 }), _jsx(StatRow, { title: "Tokens", values: [], isSection: true }), _jsx(StatRow, { title: "Total", values: getModelValues((m) => (_jsx(Text, { color: Colors.AccentYellow, children: m.tokens.total.toLocaleString() }))) }), _jsx(StatRow, { title: "Prompt", isSubtle: true, values: getModelValues((m) => m.tokens.prompt.toLocaleString()) }), hasCached && (_jsx(StatRow, { title: "Cached", isSubtle: true, values: getModelValues((m) => {
29
- const cacheHitRate = calculateCacheHitRate(m);
30
- return (_jsxs(Text, { color: Colors.AccentGreen, children: [m.tokens.cached.toLocaleString(), " (", cacheHitRate.toFixed(1), "%)"] }));
31
- }) })), hasThoughts && (_jsx(StatRow, { title: "Thoughts", isSubtle: true, values: getModelValues((m) => m.tokens.thoughts.toLocaleString()) })), hasTool && (_jsx(StatRow, { title: "Tool", isSubtle: true, values: getModelValues((m) => m.tokens.tool.toLocaleString()) })), _jsx(StatRow, { title: "Output", isSubtle: true, values: getModelValues((m) => m.tokens.candidates.toLocaleString()) })] }));
32
- };
33
- //# sourceMappingURL=ModelStatsDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModelStatsDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/ModelStatsDisplay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAgB,MAAM,+BAA+B,CAAC;AAE9E,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,eAAe,GAAG,EAAE,CAAC;AAS3B,MAAM,OAAO,GAA2B,CAAC,EACvC,KAAK,EACL,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,KAAK,GAClB,EAAE,EAAE,CAAC,CACJ,MAAC,GAAG,eACF,KAAC,G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,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export {};
@@ -1,217 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license
4
- * Copyright 2025 Google LLC
5
- * SPDX-License-Identifier: Apache-2.0
6
- */
7
- import { render } from 'ink-testing-library';
8
- import { describe, it, expect, vi } from 'vitest';
9
- import { ModelStatsDisplay } from './ModelStatsDisplay.js';
10
- import * as SessionContext from '../contexts/SessionContext.js';
11
- // Mock the context to provide controlled data for testing
12
- vi.mock('../contexts/SessionContext.js', async (importOriginal) => {
13
- const actual = await importOriginal();
14
- return {
15
- ...actual,
16
- useSessionStats: vi.fn(),
17
- };
18
- });
19
- const useSessionStatsMock = vi.mocked(SessionContext.useSessionStats);
20
- const renderWithMockedStats = (metrics) => {
21
- useSessionStatsMock.mockReturnValue({
22
- stats: {
23
- sessionStartTime: new Date(),
24
- metrics,
25
- lastPromptTokenCount: 0,
26
- },
27
- });
28
- return render(_jsx(ModelStatsDisplay, {}));
29
- };
30
- describe('<ModelStatsDisplay />', () => {
31
- it('should render "no API calls" message when there are no active models', () => {
32
- const { lastFrame } = renderWithMockedStats({
33
- models: {},
34
- tools: {
35
- totalCalls: 0,
36
- totalSuccess: 0,
37
- totalFail: 0,
38
- totalDurationMs: 0,
39
- totalDecisions: { accept: 0, reject: 0, modify: 0 },
40
- byName: {},
41
- },
42
- });
43
- expect(lastFrame()).toContain('No API calls have been made in this session.');
44
- expect(lastFrame()).toMatchSnapshot();
45
- });
46
- it('should not display conditional rows if no model has data for them', () => {
47
- const { lastFrame } = renderWithMockedStats({
48
- models: {
49
- 'gemini-2.5-pro': {
50
- api: { totalRequests: 1, totalErrors: 0, totalLatencyMs: 100 },
51
- tokens: {
52
- prompt: 10,
53
- candidates: 20,
54
- total: 30,
55
- cached: 0,
56
- thoughts: 0,
57
- tool: 0,
58
- },
59
- },
60
- },
61
- tools: {
62
- totalCalls: 0,
63
- totalSuccess: 0,
64
- totalFail: 0,
65
- totalDurationMs: 0,
66
- totalDecisions: { accept: 0, reject: 0, modify: 0 },
67
- byName: {},
68
- },
69
- });
70
- const output = lastFrame();
71
- expect(output).not.toContain('Cached');
72
- expect(output).not.toContain('Thoughts');
73
- expect(output).not.toContain('Tool');
74
- expect(output).toMatchSnapshot();
75
- });
76
- it('should display conditional rows if at least one model has data', () => {
77
- const { lastFrame } = renderWithMockedStats({
78
- models: {
79
- 'gemini-2.5-pro': {
80
- api: { totalRequests: 1, totalErrors: 0, totalLatencyMs: 100 },
81
- tokens: {
82
- prompt: 10,
83
- candidates: 20,
84
- total: 30,
85
- cached: 5,
86
- thoughts: 2,
87
- tool: 0,
88
- },
89
- },
90
- 'gemini-2.5-flash': {
91
- api: { totalRequests: 1, totalErrors: 0, totalLatencyMs: 50 },
92
- tokens: {
93
- prompt: 5,
94
- candidates: 10,
95
- total: 15,
96
- cached: 0,
97
- thoughts: 0,
98
- tool: 3,
99
- },
100
- },
101
- },
102
- tools: {
103
- totalCalls: 0,
104
- totalSuccess: 0,
105
- totalFail: 0,
106
- totalDurationMs: 0,
107
- totalDecisions: { accept: 0, reject: 0, modify: 0 },
108
- byName: {},
109
- },
110
- });
111
- const output = lastFrame();
112
- expect(output).toContain('Cached');
113
- expect(output).toContain('Thoughts');
114
- expect(output).toContain('Tool');
115
- expect(output).toMatchSnapshot();
116
- });
117
- it('should display stats for multiple models correctly', () => {
118
- const { lastFrame } = renderWithMockedStats({
119
- models: {
120
- 'gemini-2.5-pro': {
121
- api: { totalRequests: 10, totalErrors: 1, totalLatencyMs: 1000 },
122
- tokens: {
123
- prompt: 100,
124
- candidates: 200,
125
- total: 300,
126
- cached: 50,
127
- thoughts: 10,
128
- tool: 5,
129
- },
130
- },
131
- 'gemini-2.5-flash': {
132
- api: { totalRequests: 20, totalErrors: 2, totalLatencyMs: 500 },
133
- tokens: {
134
- prompt: 200,
135
- candidates: 400,
136
- total: 600,
137
- cached: 100,
138
- thoughts: 20,
139
- tool: 10,
140
- },
141
- },
142
- },
143
- tools: {
144
- totalCalls: 0,
145
- totalSuccess: 0,
146
- totalFail: 0,
147
- totalDurationMs: 0,
148
- totalDecisions: { accept: 0, reject: 0, modify: 0 },
149
- byName: {},
150
- },
151
- });
152
- const output = lastFrame();
153
- expect(output).toContain('gemini-2.5-pro');
154
- expect(output).toContain('gemini-2.5-flash');
155
- expect(output).toMatchSnapshot();
156
- });
157
- it('should handle large values without wrapping or overlapping', () => {
158
- const { lastFrame } = renderWithMockedStats({
159
- models: {
160
- 'gemini-2.5-pro': {
161
- api: {
162
- totalRequests: 999999999,
163
- totalErrors: 123456789,
164
- totalLatencyMs: 9876,
165
- },
166
- tokens: {
167
- prompt: 987654321,
168
- candidates: 123456789,
169
- total: 999999999,
170
- cached: 123456789,
171
- thoughts: 111111111,
172
- tool: 222222222,
173
- },
174
- },
175
- },
176
- tools: {
177
- totalCalls: 0,
178
- totalSuccess: 0,
179
- totalFail: 0,
180
- totalDurationMs: 0,
181
- totalDecisions: { accept: 0, reject: 0, modify: 0 },
182
- byName: {},
183
- },
184
- });
185
- expect(lastFrame()).toMatchSnapshot();
186
- });
187
- it('should display a single model correctly', () => {
188
- const { lastFrame } = renderWithMockedStats({
189
- models: {
190
- 'gemini-2.5-pro': {
191
- api: { totalRequests: 1, totalErrors: 0, totalLatencyMs: 100 },
192
- tokens: {
193
- prompt: 10,
194
- candidates: 20,
195
- total: 30,
196
- cached: 5,
197
- thoughts: 2,
198
- tool: 1,
199
- },
200
- },
201
- },
202
- tools: {
203
- totalCalls: 0,
204
- totalSuccess: 0,
205
- totalFail: 0,
206
- totalDurationMs: 0,
207
- totalDecisions: { accept: 0, reject: 0, modify: 0 },
208
- byName: {},
209
- },
210
- });
211
- const output = lastFrame();
212
- expect(output).toContain('gemini-2.5-pro');
213
- expect(output).not.toContain('gemini-2.5-flash');
214
- expect(output).toMatchSnapshot();
215
- });
216
- });
217
- //# sourceMappingURL=ModelStatsDisplay.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModelStatsDisplay.test.js","sourceRoot":"","sources":["../../../../src/ui/components/ModelStatsDisplay.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAC;AAGhE,0DAA0D;AAC1D,EAAE,CAAC,IAAI,CAAC,+BAA+B,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,cAAc,EAAyB,CAAC;IAC7D,OAAO;QACL,GAAG,MAAM;QACT,eAAe,EAAE,EAAE,CAAC,EAAE,EAAE;KACzB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;AAEtE,MAAM,qBAAqB,GAAG,CAAC,OAAuB,EAAE,EAAE;IACxD,mBAAmB,CAAC,eAAe,CAAC;QAClC,KAAK,EAAE;YACL,gBAAgB,EAAE,IAAI,IAAI,EAAE;YAC5B,OAAO;YACP,oBAAoB,EAAE,CAAC;SACxB;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,KAAC,iBAAiB,KAAG,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,MAAM,EAAE,SAAS,EAAE,GAAG,qBAAqB,CAAC;YAC1C,MAAM,EAAE,EAAE;YACV,KAAK,EAAE;gBACL,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,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,EAAE;wBACN,MAAM,EAAE,EAAE;wBACV,UAAU,EAAE,EAAE;wBACd,KAAK,EAAE,EAAE;wBACT,MAAM,EAAE,CAAC;wBACT,QAAQ,EAAE,CAAC;wBACX,IAAI,EAAE,CAAC;qBACR;iBACF;aACF;YACD,KAAK,EAAE;gBACL,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,CAAC;gBACf,SAAS,EAAE,CAAC;gBACZ,eAAe,EAAE,CAAC;gBAClB,cAAc,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;gBACnD,MAAM,EAAE,EAAE;aACX;SACF,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QAC3C,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACjD,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,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 SessionSummaryDisplayProps {
8
- duration: string;
9
- }
10
- export declare const SessionSummaryDisplay: React.FC<SessionSummaryDisplayProps>;
11
- export {};
@@ -1,4 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { StatsDisplay } from './StatsDisplay.js';
3
- export const SessionSummaryDisplay = ({ duration, }) => (_jsx(StatsDisplay, { title: "Agent powering down. Goodbye!", duration: duration }));
4
- //# sourceMappingURL=SessionSummaryDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SessionSummaryDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/SessionSummaryDisplay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,MAAM,CAAC,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,QAAQ,GACT,EAAE,EAAE,CAAC,CACJ,KAAC,YAAY,IAAC,KAAK,EAAC,+BAA+B,EAAC,QAAQ,EAAE,QAAQ,GAAI,CAC3E,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export {};
@@ -1,60 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license
4
- * Copyright 2025 Google LLC
5
- * SPDX-License-Identifier: Apache-2.0
6
- */
7
- import { render } from 'ink-testing-library';
8
- import { describe, it, expect, vi } from 'vitest';
9
- import { SessionSummaryDisplay } from './SessionSummaryDisplay.js';
10
- import * as SessionContext from '../contexts/SessionContext.js';
11
- vi.mock('../contexts/SessionContext.js', async (importOriginal) => {
12
- const actual = await importOriginal();
13
- return {
14
- ...actual,
15
- useSessionStats: vi.fn(),
16
- };
17
- });
18
- const useSessionStatsMock = vi.mocked(SessionContext.useSessionStats);
19
- const renderWithMockedStats = (metrics) => {
20
- useSessionStatsMock.mockReturnValue({
21
- stats: {
22
- sessionStartTime: new Date(),
23
- metrics,
24
- lastPromptTokenCount: 0,
25
- },
26
- });
27
- return render(_jsx(SessionSummaryDisplay, { duration: "1h 23m 45s" }));
28
- };
29
- describe('<SessionSummaryDisplay />', () => {
30
- it('renders the summary display with a title', () => {
31
- const metrics = {
32
- models: {
33
- 'gemini-2.5-pro': {
34
- api: { totalRequests: 10, totalErrors: 1, totalLatencyMs: 50234 },
35
- tokens: {
36
- prompt: 1000,
37
- candidates: 2000,
38
- total: 3500,
39
- cached: 500,
40
- thoughts: 300,
41
- tool: 200,
42
- },
43
- },
44
- },
45
- tools: {
46
- totalCalls: 0,
47
- totalSuccess: 0,
48
- totalFail: 0,
49
- totalDurationMs: 0,
50
- totalDecisions: { accept: 0, reject: 0, modify: 0 },
51
- byName: {},
52
- },
53
- };
54
- const { lastFrame } = renderWithMockedStats(metrics);
55
- const output = lastFrame();
56
- expect(output).toContain('Agent powering down. Goodbye!');
57
- expect(output).toMatchSnapshot();
58
- });
59
- });
60
- //# sourceMappingURL=SessionSummaryDisplay.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SessionSummaryDisplay.test.js","sourceRoot":"","sources":["../../../../src/ui/components/SessionSummaryDisplay.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAC;AAGhE,EAAE,CAAC,IAAI,CAAC,+BAA+B,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,cAAc,EAAyB,CAAC;IAC7D,OAAO;QACL,GAAG,MAAM;QACT,eAAe,EAAE,EAAE,CAAC,EAAE,EAAE;KACzB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;AAEtE,MAAM,qBAAqB,GAAG,CAAC,OAAuB,EAAE,EAAE;IACxD,mBAAmB,CAAC,eAAe,CAAC;QAClC,KAAK,EAAE;YACL,gBAAgB,EAAE,IAAI,IAAI,EAAE;YAC5B,OAAO;YACP,oBAAoB,EAAE,CAAC;SACxB;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,KAAC,qBAAqB,IAAC,QAAQ,EAAC,YAAY,GAAG,CAAC,CAAC;AACjE,CAAC,CAAC;AAEF,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAClD,MAAM,OAAO,GAAmB;YAC9B,MAAM,EAAE;gBACN,gBAAgB,EAAE;oBAChB,GAAG,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE;oBACjE,MAAM,EAAE;wBACN,MAAM,EAAE,IAAI;wBACZ,UAAU,EAAE,IAAI;wBAChB,KAAK,EAAE,IAAI;wBACX,MAAM,EAAE,GAAG;wBACX,QAAQ,EAAE,GAAG;wBACb,IAAI,EAAE,GAAG;qBACV;iBACF;aACF;YACD,KAAK,EAAE;gBACL,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,CAAC;gBACf,SAAS,EAAE,CAAC;gBACZ,eAAe,EAAE,CAAC;gBAClB,cAAc,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;gBACnD,MAAM,EAAE,EAAE;aACX;SACF,CAAC;QAEF,MAAM,EAAE,SAAS,EAAE,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAE3B,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC;QAC1D,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- export declare const ShellModeIndicator: React.FC;
@@ -1,5 +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 ShellModeIndicator = () => (_jsx(Box, { children: _jsxs(Text, { color: Colors.AccentYellow, children: ["shell mode enabled", _jsx(Text, { color: Colors.Gray, children: " (esc to disable)" })] }) }));
5
- //# sourceMappingURL=ShellModeIndicator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ShellModeIndicator.js","sourceRoot":"","sources":["../../../../src/ui/components/ShellModeIndicator.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,kBAAkB,GAAa,GAAG,EAAE,CAAC,CAChD,KAAC,GAAG,cACF,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,mCAE9B,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,kCAA0B,IAC7C,GACH,CACP,CAAC"}