@google/gemini-cli 0.30.1 → 0.31.0-preview.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 (727) hide show
  1. package/README.md +1 -1
  2. package/dist/google-gemini-cli-0.31.0-preview.0.tgz +0 -0
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +15 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/package.json +7 -6
  7. package/dist/src/commands/extensions/install.js +72 -4
  8. package/dist/src/commands/extensions/install.js.map +1 -1
  9. package/dist/src/commands/extensions/install.test.js +153 -20
  10. package/dist/src/commands/extensions/install.test.js.map +1 -1
  11. package/dist/src/commands/extensions/utils.js +1 -0
  12. package/dist/src/commands/extensions/utils.js.map +1 -1
  13. package/dist/src/config/config.js +17 -5
  14. package/dist/src/config/config.js.map +1 -1
  15. package/dist/src/config/config.test.js +79 -4
  16. package/dist/src/config/config.test.js.map +1 -1
  17. package/dist/src/config/extension-manager-hydration.test.js +2 -2
  18. package/dist/src/config/extension-manager-hydration.test.js.map +1 -1
  19. package/dist/src/config/extension-manager.js +10 -6
  20. package/dist/src/config/extension-manager.js.map +1 -1
  21. package/dist/src/config/extension.test.js +20 -20
  22. package/dist/src/config/extension.test.js.map +1 -1
  23. package/dist/src/config/extensionRegistryClient.js +3 -2
  24. package/dist/src/config/extensionRegistryClient.js.map +1 -1
  25. package/dist/src/config/extensionRegistryClient.test.js +52 -0
  26. package/dist/src/config/extensionRegistryClient.test.js.map +1 -1
  27. package/dist/src/config/extensions/consent.d.ts +10 -0
  28. package/dist/src/config/extensions/consent.js +10 -3
  29. package/dist/src/config/extensions/consent.js.map +1 -1
  30. package/dist/src/config/extensions/consent.test.js +1 -1
  31. package/dist/src/config/extensions/consent.test.js.map +1 -1
  32. package/dist/src/config/extensions/extensionEnablement.js +1 -0
  33. package/dist/src/config/extensions/extensionEnablement.js.map +1 -1
  34. package/dist/src/config/extensions/extensionSettings.js +20 -3
  35. package/dist/src/config/extensions/extensionSettings.js.map +1 -1
  36. package/dist/src/config/extensions/extensionSettings.test.js +16 -0
  37. package/dist/src/config/extensions/extensionSettings.test.js.map +1 -1
  38. package/dist/src/config/extensions/github.test.js +1 -1
  39. package/dist/src/config/extensions/github.test.js.map +1 -1
  40. package/dist/src/config/extensions/variables.js +3 -1
  41. package/dist/src/config/extensions/variables.js.map +1 -1
  42. package/dist/src/config/keyBindings.js +6 -2
  43. package/dist/src/config/keyBindings.js.map +1 -1
  44. package/dist/src/config/policy-engine.integration.test.js +51 -13
  45. package/dist/src/config/policy-engine.integration.test.js.map +1 -1
  46. package/dist/src/config/policy.d.ts +15 -3
  47. package/dist/src/config/policy.js +49 -4
  48. package/dist/src/config/policy.js.map +1 -1
  49. package/dist/src/config/policy.test.d.ts +6 -0
  50. package/dist/src/config/policy.test.js +152 -0
  51. package/dist/src/config/policy.test.js.map +1 -0
  52. package/dist/src/config/settings-validation.js +1 -1
  53. package/dist/src/config/settings-validation.js.map +1 -1
  54. package/dist/src/config/settings-validation.test.js +2 -3
  55. package/dist/src/config/settings-validation.test.js.map +1 -1
  56. package/dist/src/config/settings.d.ts +2 -0
  57. package/dist/src/config/settings.js +18 -20
  58. package/dist/src/config/settings.js.map +1 -1
  59. package/dist/src/config/settings.test.js +118 -18
  60. package/dist/src/config/settings.test.js.map +1 -1
  61. package/dist/src/config/settingsSchema.d.ts +171 -9
  62. package/dist/src/config/settingsSchema.js +159 -9
  63. package/dist/src/config/settingsSchema.js.map +1 -1
  64. package/dist/src/config/settingsSchema.test.js +26 -0
  65. package/dist/src/config/settingsSchema.test.js.map +1 -1
  66. package/dist/src/config/settings_repro.test.js +0 -1
  67. package/dist/src/config/settings_repro.test.js.map +1 -1
  68. package/dist/src/config/trustedFolders.test.js +3 -1
  69. package/dist/src/config/trustedFolders.test.js.map +1 -1
  70. package/dist/src/config/workspace-policy-cli.test.d.ts +6 -0
  71. package/dist/src/config/workspace-policy-cli.test.js +180 -0
  72. package/dist/src/config/workspace-policy-cli.test.js.map +1 -0
  73. package/dist/src/gemini.d.ts +2 -2
  74. package/dist/src/gemini.js +15 -5
  75. package/dist/src/gemini.js.map +1 -1
  76. package/dist/src/gemini.test.js +18 -2
  77. package/dist/src/gemini.test.js.map +1 -1
  78. package/dist/src/gemini_cleanup.test.js +27 -24
  79. package/dist/src/gemini_cleanup.test.js.map +1 -1
  80. package/dist/src/generated/git-commit.d.ts +2 -2
  81. package/dist/src/generated/git-commit.js +2 -2
  82. package/dist/src/generated/git-commit.js.map +1 -1
  83. package/dist/src/integration-tests/modelSteering.test.d.ts +6 -0
  84. package/dist/src/integration-tests/modelSteering.test.js +65 -0
  85. package/dist/src/integration-tests/modelSteering.test.js.map +1 -0
  86. package/dist/src/nonInteractiveCli.js +2 -3
  87. package/dist/src/nonInteractiveCli.js.map +1 -1
  88. package/dist/src/test-utils/AppRig.d.ts +1 -1
  89. package/dist/src/test-utils/AppRig.js +16 -7
  90. package/dist/src/test-utils/AppRig.js.map +1 -1
  91. package/dist/src/test-utils/AppRig.test.js +37 -2
  92. package/dist/src/test-utils/AppRig.test.js.map +1 -1
  93. package/dist/src/test-utils/async.d.ts +1 -1
  94. package/dist/src/test-utils/async.js +1 -1
  95. package/dist/src/test-utils/async.js.map +1 -1
  96. package/dist/src/test-utils/customMatchers.js +1 -1
  97. package/dist/src/test-utils/customMatchers.js.map +1 -1
  98. package/dist/src/test-utils/mockCommandContext.js +8 -2
  99. package/dist/src/test-utils/mockCommandContext.js.map +1 -1
  100. package/dist/src/test-utils/mockConfig.js +2 -1
  101. package/dist/src/test-utils/mockConfig.js.map +1 -1
  102. package/dist/src/test-utils/render.d.ts +81 -5
  103. package/dist/src/test-utils/render.js +299 -29
  104. package/dist/src/test-utils/render.js.map +1 -1
  105. package/dist/src/test-utils/render.test.js +49 -23
  106. package/dist/src/test-utils/render.test.js.map +1 -1
  107. package/dist/src/test-utils/settings.js +4 -2
  108. package/dist/src/test-utils/settings.js.map +1 -1
  109. package/dist/src/ui/App.test.js +56 -24
  110. package/dist/src/ui/App.test.js.map +1 -1
  111. package/dist/src/ui/AppContainer.d.ts +2 -2
  112. package/dist/src/ui/AppContainer.js +231 -11
  113. package/dist/src/ui/AppContainer.js.map +1 -1
  114. package/dist/src/ui/AppContainer.test.js +561 -7
  115. package/dist/src/ui/AppContainer.test.js.map +1 -1
  116. package/dist/src/ui/IdeIntegrationNudge.test.js +29 -33
  117. package/dist/src/ui/IdeIntegrationNudge.test.js.map +1 -1
  118. package/dist/src/ui/auth/ApiAuthDialog.test.js +19 -9
  119. package/dist/src/ui/auth/ApiAuthDialog.test.js.map +1 -1
  120. package/dist/src/ui/auth/AuthDialog.js +1 -1
  121. package/dist/src/ui/auth/AuthDialog.js.map +1 -1
  122. package/dist/src/ui/auth/AuthDialog.test.js +61 -27
  123. package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
  124. package/dist/src/ui/auth/AuthInProgress.test.js +35 -14
  125. package/dist/src/ui/auth/AuthInProgress.test.js.map +1 -1
  126. package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js +11 -5
  127. package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js.map +1 -1
  128. package/dist/src/ui/colors.js +6 -0
  129. package/dist/src/ui/colors.js.map +1 -1
  130. package/dist/src/ui/commands/clearCommand.js +2 -0
  131. package/dist/src/ui/commands/clearCommand.js.map +1 -1
  132. package/dist/src/ui/commands/clearCommand.test.js +7 -1
  133. package/dist/src/ui/commands/clearCommand.test.js.map +1 -1
  134. package/dist/src/ui/commands/copyCommand.js +2 -1
  135. package/dist/src/ui/commands/copyCommand.js.map +1 -1
  136. package/dist/src/ui/commands/copyCommand.test.js +6 -4
  137. package/dist/src/ui/commands/copyCommand.test.js.map +1 -1
  138. package/dist/src/ui/commands/extensionsCommand.js +18 -0
  139. package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
  140. package/dist/src/ui/commands/extensionsCommand.test.js +4 -4
  141. package/dist/src/ui/commands/extensionsCommand.test.js.map +1 -1
  142. package/dist/src/ui/commands/planCommand.js +1 -1
  143. package/dist/src/ui/commands/planCommand.js.map +1 -1
  144. package/dist/src/ui/commands/planCommand.test.js +1 -1
  145. package/dist/src/ui/commands/planCommand.test.js.map +1 -1
  146. package/dist/src/ui/commands/policiesCommand.js +5 -0
  147. package/dist/src/ui/commands/policiesCommand.js.map +1 -1
  148. package/dist/src/ui/commands/policiesCommand.test.js +38 -1
  149. package/dist/src/ui/commands/policiesCommand.test.js.map +1 -1
  150. package/dist/src/ui/commands/rewindCommand.js +3 -2
  151. package/dist/src/ui/commands/rewindCommand.js.map +1 -1
  152. package/dist/src/ui/components/AboutBox.test.js +16 -8
  153. package/dist/src/ui/components/AboutBox.test.js.map +1 -1
  154. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js +7 -4
  155. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js.map +1 -1
  156. package/dist/src/ui/components/AgentConfigDialog.test.js +41 -19
  157. package/dist/src/ui/components/AgentConfigDialog.test.js.map +1 -1
  158. package/dist/src/ui/components/AlternateBufferQuittingDisplay.js +1 -1
  159. package/dist/src/ui/components/AlternateBufferQuittingDisplay.js.map +1 -1
  160. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +24 -12
  161. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +1 -1
  162. package/dist/src/ui/components/AnsiOutput.test.js +35 -19
  163. package/dist/src/ui/components/AnsiOutput.test.js.map +1 -1
  164. package/dist/src/ui/components/AppHeader.test.js +27 -17
  165. package/dist/src/ui/components/AppHeader.test.js.map +1 -1
  166. package/dist/src/ui/components/ApprovalModeIndicator.test.js +18 -12
  167. package/dist/src/ui/components/ApprovalModeIndicator.test.js.map +1 -1
  168. package/dist/src/ui/components/AskUserDialog.test.js +147 -85
  169. package/dist/src/ui/components/AskUserDialog.test.js.map +1 -1
  170. package/dist/src/ui/components/BackgroundShellDisplay.test.js +50 -48
  171. package/dist/src/ui/components/BackgroundShellDisplay.test.js.map +1 -1
  172. package/dist/src/ui/components/Banner.test.js +8 -4
  173. package/dist/src/ui/components/Banner.test.js.map +1 -1
  174. package/dist/src/ui/components/Checklist.test.js +17 -12
  175. package/dist/src/ui/components/Checklist.test.js.map +1 -1
  176. package/dist/src/ui/components/ChecklistItem.test.js +9 -6
  177. package/dist/src/ui/components/ChecklistItem.test.js.map +1 -1
  178. package/dist/src/ui/components/CliSpinner.test.js +8 -5
  179. package/dist/src/ui/components/CliSpinner.test.js.map +1 -1
  180. package/dist/src/ui/components/Composer.js +5 -5
  181. package/dist/src/ui/components/Composer.js.map +1 -1
  182. package/dist/src/ui/components/Composer.test.js +104 -100
  183. package/dist/src/ui/components/Composer.test.js.map +1 -1
  184. package/dist/src/ui/components/ConfigInitDisplay.test.js +3 -2
  185. package/dist/src/ui/components/ConfigInitDisplay.test.js.map +1 -1
  186. package/dist/src/ui/components/ConsentPrompt.test.js +15 -8
  187. package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -1
  188. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +9 -5
  189. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +1 -1
  190. package/dist/src/ui/components/ContextSummaryDisplay.test.js +16 -14
  191. package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +1 -1
  192. package/dist/src/ui/components/ContextUsageDisplay.test.js +12 -6
  193. package/dist/src/ui/components/ContextUsageDisplay.test.js.map +1 -1
  194. package/dist/src/ui/components/CopyModeWarning.test.js +9 -5
  195. package/dist/src/ui/components/CopyModeWarning.test.js.map +1 -1
  196. package/dist/src/ui/components/DebugProfiler.test.js +17 -14
  197. package/dist/src/ui/components/DebugProfiler.test.js.map +1 -1
  198. package/dist/src/ui/components/DetailedMessagesDisplay.test.js +13 -7
  199. package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +1 -1
  200. package/dist/src/ui/components/DialogManager.js +5 -1
  201. package/dist/src/ui/components/DialogManager.js.map +1 -1
  202. package/dist/src/ui/components/DialogManager.test.js +9 -5
  203. package/dist/src/ui/components/DialogManager.test.js.map +1 -1
  204. package/dist/src/ui/components/EditorSettingsDialog.test.js +16 -8
  205. package/dist/src/ui/components/EditorSettingsDialog.test.js.map +1 -1
  206. package/dist/src/ui/components/ExitPlanModeDialog.js +2 -2
  207. package/dist/src/ui/components/ExitPlanModeDialog.js.map +1 -1
  208. package/dist/src/ui/components/ExitPlanModeDialog.test.js +2 -2
  209. package/dist/src/ui/components/ExitPlanModeDialog.test.js.map +1 -1
  210. package/dist/src/ui/components/ExitWarning.test.js +18 -10
  211. package/dist/src/ui/components/ExitWarning.test.js.map +1 -1
  212. package/dist/src/ui/components/FolderTrustDialog.d.ts +2 -0
  213. package/dist/src/ui/components/FolderTrustDialog.js +49 -3
  214. package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
  215. package/dist/src/ui/components/FolderTrustDialog.test.js +249 -18
  216. package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
  217. package/dist/src/ui/components/Footer.test.js +101 -50
  218. package/dist/src/ui/components/Footer.test.js.map +1 -1
  219. package/dist/src/ui/components/GeminiRespondingSpinner.test.js +23 -13
  220. package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +1 -1
  221. package/dist/src/ui/components/GradientRegression.test.js +20 -10
  222. package/dist/src/ui/components/GradientRegression.test.js.map +1 -1
  223. package/dist/src/ui/components/Header.test.js +2 -0
  224. package/dist/src/ui/components/Header.test.js.map +1 -1
  225. package/dist/src/ui/components/Help.test.js +9 -6
  226. package/dist/src/ui/components/Help.test.js.map +1 -1
  227. package/dist/src/ui/components/HistoryItemDisplay.d.ts +1 -2
  228. package/dist/src/ui/components/HistoryItemDisplay.js +4 -3
  229. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
  230. package/dist/src/ui/components/HistoryItemDisplay.test.js +80 -35
  231. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
  232. package/dist/src/ui/components/HookStatusDisplay.test.js +13 -9
  233. package/dist/src/ui/components/HookStatusDisplay.test.js.map +1 -1
  234. package/dist/src/ui/components/IdeTrustChangeDialog.test.js +36 -16
  235. package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -1
  236. package/dist/src/ui/components/InputPrompt.js +10 -12
  237. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  238. package/dist/src/ui/components/InputPrompt.test.js +127 -13
  239. package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
  240. package/dist/src/ui/components/LoadingIndicator.test.js +97 -47
  241. package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -1
  242. package/dist/src/ui/components/LogoutConfirmationDialog.test.js +25 -9
  243. package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +1 -1
  244. package/dist/src/ui/components/LoopDetectionConfirmation.test.js +9 -5
  245. package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -1
  246. package/dist/src/ui/components/MainContent.js +35 -14
  247. package/dist/src/ui/components/MainContent.js.map +1 -1
  248. package/dist/src/ui/components/MainContent.test.js +224 -10
  249. package/dist/src/ui/components/MainContent.test.js.map +1 -1
  250. package/dist/src/ui/components/MemoryUsageDisplay.test.js +8 -3
  251. package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +1 -1
  252. package/dist/src/ui/components/ModelDialog.js +6 -6
  253. package/dist/src/ui/components/ModelDialog.js.map +1 -1
  254. package/dist/src/ui/components/ModelDialog.test.js +142 -16
  255. package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
  256. package/dist/src/ui/components/ModelStatsDisplay.test.js +38 -24
  257. package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -1
  258. package/dist/src/ui/components/MultiFolderTrustDialog.test.js +32 -9
  259. package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -1
  260. package/dist/src/ui/components/NewAgentsNotification.test.js +6 -4
  261. package/dist/src/ui/components/NewAgentsNotification.test.js.map +1 -1
  262. package/dist/src/ui/components/Notifications.js +50 -4
  263. package/dist/src/ui/components/Notifications.js.map +1 -1
  264. package/dist/src/ui/components/Notifications.test.js +162 -30
  265. package/dist/src/ui/components/Notifications.test.js.map +1 -1
  266. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +36 -10
  267. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -1
  268. package/dist/src/ui/components/PolicyUpdateDialog.d.ts +18 -0
  269. package/dist/src/ui/components/PolicyUpdateDialog.js +59 -0
  270. package/dist/src/ui/components/PolicyUpdateDialog.js.map +1 -0
  271. package/dist/src/ui/components/PolicyUpdateDialog.test.d.ts +6 -0
  272. package/dist/src/ui/components/PolicyUpdateDialog.test.js +93 -0
  273. package/dist/src/ui/components/PolicyUpdateDialog.test.js.map +1 -0
  274. package/dist/src/ui/components/QueuedMessageDisplay.test.js +16 -11
  275. package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -1
  276. package/dist/src/ui/components/QuittingDisplay.test.js +9 -5
  277. package/dist/src/ui/components/QuittingDisplay.test.js.map +1 -1
  278. package/dist/src/ui/components/QuotaDisplay.test.js +40 -22
  279. package/dist/src/ui/components/QuotaDisplay.test.js.map +1 -1
  280. package/dist/src/ui/components/RawMarkdownIndicator.test.js +8 -4
  281. package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +1 -1
  282. package/dist/src/ui/components/RewindConfirmation.test.js +15 -7
  283. package/dist/src/ui/components/RewindConfirmation.test.js.map +1 -1
  284. package/dist/src/ui/components/RewindViewer.js +9 -7
  285. package/dist/src/ui/components/RewindViewer.js.map +1 -1
  286. package/dist/src/ui/components/RewindViewer.test.js +54 -17
  287. package/dist/src/ui/components/RewindViewer.test.js.map +1 -1
  288. package/dist/src/ui/components/SessionBrowser.test.js +24 -11
  289. package/dist/src/ui/components/SessionBrowser.test.js.map +1 -1
  290. package/dist/src/ui/components/SessionRetentionWarningDialog.test.js +12 -7
  291. package/dist/src/ui/components/SessionRetentionWarningDialog.test.js.map +1 -1
  292. package/dist/src/ui/components/SessionSummaryDisplay.js +1 -1
  293. package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
  294. package/dist/src/ui/components/SessionSummaryDisplay.test.js +7 -4
  295. package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -1
  296. package/dist/src/ui/components/SettingsDialog.js +76 -7
  297. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  298. package/dist/src/ui/components/SettingsDialog.test.js +252 -109
  299. package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
  300. package/dist/src/ui/components/ShellInputPrompt.test.js +120 -67
  301. package/dist/src/ui/components/ShellInputPrompt.test.js.map +1 -1
  302. package/dist/src/ui/components/ShellModeIndicator.test.js +4 -2
  303. package/dist/src/ui/components/ShellModeIndicator.test.js.map +1 -1
  304. package/dist/src/ui/components/ShortcutsHelp.js +1 -1
  305. package/dist/src/ui/components/ShortcutsHelp.js.map +1 -1
  306. package/dist/src/ui/components/ShortcutsHelp.test.js +6 -3
  307. package/dist/src/ui/components/ShortcutsHelp.test.js.map +1 -1
  308. package/dist/src/ui/components/ShowMoreLines.d.ts +2 -1
  309. package/dist/src/ui/components/ShowMoreLines.js +10 -5
  310. package/dist/src/ui/components/ShowMoreLines.js.map +1 -1
  311. package/dist/src/ui/components/ShowMoreLines.test.js +47 -7
  312. package/dist/src/ui/components/ShowMoreLines.test.js.map +1 -1
  313. package/dist/src/ui/components/StatsDisplay.d.ts +1 -0
  314. package/dist/src/ui/components/StatsDisplay.js +9 -3
  315. package/dist/src/ui/components/StatsDisplay.js.map +1 -1
  316. package/dist/src/ui/components/StatsDisplay.test.js +51 -34
  317. package/dist/src/ui/components/StatsDisplay.test.js.map +1 -1
  318. package/dist/src/ui/components/StatusDisplay.test.js +30 -17
  319. package/dist/src/ui/components/StatusDisplay.test.js.map +1 -1
  320. package/dist/src/ui/components/StickyHeader.test.js +4 -2
  321. package/dist/src/ui/components/StickyHeader.test.js.map +1 -1
  322. package/dist/src/ui/components/SuggestionsDisplay.test.js +19 -13
  323. package/dist/src/ui/components/SuggestionsDisplay.test.js.map +1 -1
  324. package/dist/src/ui/components/Table.test.js +9 -6
  325. package/dist/src/ui/components/Table.test.js.map +1 -1
  326. package/dist/src/ui/components/ThemeDialog.test.js +42 -19
  327. package/dist/src/ui/components/ThemeDialog.test.js.map +1 -1
  328. package/dist/src/ui/components/ThemedGradient.test.js +4 -2
  329. package/dist/src/ui/components/ThemedGradient.test.js.map +1 -1
  330. package/dist/src/ui/components/Tips.test.js +4 -2
  331. package/dist/src/ui/components/Tips.test.js.map +1 -1
  332. package/dist/src/ui/components/ToastDisplay.js +6 -1
  333. package/dist/src/ui/components/ToastDisplay.js.map +1 -1
  334. package/dist/src/ui/components/ToastDisplay.test.js +48 -17
  335. package/dist/src/ui/components/ToastDisplay.test.js.map +1 -1
  336. package/dist/src/ui/components/ToolConfirmationQueue.js +11 -8
  337. package/dist/src/ui/components/ToolConfirmationQueue.js.map +1 -1
  338. package/dist/src/ui/components/ToolConfirmationQueue.test.js +75 -17
  339. package/dist/src/ui/components/ToolConfirmationQueue.test.js.map +1 -1
  340. package/dist/src/ui/components/ToolStatsDisplay.test.js +19 -12
  341. package/dist/src/ui/components/ToolStatsDisplay.test.js.map +1 -1
  342. package/dist/src/ui/components/UpdateNotification.test.js +4 -2
  343. package/dist/src/ui/components/UpdateNotification.test.js.map +1 -1
  344. package/dist/src/ui/components/UserIdentity.test.js +16 -11
  345. package/dist/src/ui/components/UserIdentity.test.js.map +1 -1
  346. package/dist/src/ui/components/ValidationDialog.test.js +33 -16
  347. package/dist/src/ui/components/ValidationDialog.test.js.map +1 -1
  348. package/dist/src/ui/components/messages/CompressionMessage.test.js +99 -101
  349. package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -1
  350. package/dist/src/ui/components/messages/ErrorMessage.test.js +8 -4
  351. package/dist/src/ui/components/messages/ErrorMessage.test.js.map +1 -1
  352. package/dist/src/ui/components/messages/GeminiMessage.js +5 -1
  353. package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -1
  354. package/dist/src/ui/components/messages/GeminiMessage.test.js +12 -6
  355. package/dist/src/ui/components/messages/GeminiMessage.test.js.map +1 -1
  356. package/dist/src/ui/components/messages/HintMessage.d.ts +11 -0
  357. package/dist/src/ui/components/messages/HintMessage.js +14 -0
  358. package/dist/src/ui/components/messages/HintMessage.js.map +1 -0
  359. package/dist/src/ui/components/messages/InfoMessage.d.ts +1 -0
  360. package/dist/src/ui/components/messages/InfoMessage.js +2 -2
  361. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
  362. package/dist/src/ui/components/messages/InfoMessage.test.js +12 -6
  363. package/dist/src/ui/components/messages/InfoMessage.test.js.map +1 -1
  364. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js +4 -2
  365. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js.map +1 -1
  366. package/dist/src/ui/components/messages/ShellToolMessage.d.ts +1 -2
  367. package/dist/src/ui/components/messages/ShellToolMessage.js +15 -29
  368. package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -1
  369. package/dist/src/ui/components/messages/ShellToolMessage.test.js +91 -22
  370. package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -1
  371. package/dist/src/ui/components/messages/ThinkingMessage.test.js +25 -13
  372. package/dist/src/ui/components/messages/ThinkingMessage.test.js.map +1 -1
  373. package/dist/src/ui/components/messages/Todo.test.js +34 -19
  374. package/dist/src/ui/components/messages/Todo.test.js.map +1 -1
  375. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +128 -13
  376. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  377. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +175 -20
  378. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
  379. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +3 -4
  380. package/dist/src/ui/components/messages/ToolGroupMessage.js +91 -35
  381. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  382. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +286 -63
  383. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
  384. package/dist/src/ui/components/messages/ToolMessage.js +4 -4
  385. package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
  386. package/dist/src/ui/components/messages/ToolMessage.test.js +118 -39
  387. package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
  388. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js +15 -6
  389. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js.map +1 -1
  390. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +4 -2
  391. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +1 -1
  392. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.d.ts +6 -0
  393. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js +79 -0
  394. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js.map +1 -0
  395. package/dist/src/ui/components/messages/ToolResultDisplay.js +25 -14
  396. package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -1
  397. package/dist/src/ui/components/messages/ToolResultDisplay.test.js +81 -31
  398. package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +1 -1
  399. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js +5 -5
  400. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js.map +1 -1
  401. package/dist/src/ui/components/messages/ToolShared.d.ts +8 -0
  402. package/dist/src/ui/components/messages/ToolShared.js +27 -9
  403. package/dist/src/ui/components/messages/ToolShared.js.map +1 -1
  404. package/dist/src/ui/components/messages/ToolShared.test.d.ts +6 -0
  405. package/dist/src/ui/components/messages/ToolShared.test.js +52 -0
  406. package/dist/src/ui/components/messages/ToolShared.test.js.map +1 -0
  407. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +11 -4
  408. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +1 -1
  409. package/dist/src/ui/components/messages/UserMessage.js +1 -2
  410. package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
  411. package/dist/src/ui/components/messages/UserMessage.test.js +16 -8
  412. package/dist/src/ui/components/messages/UserMessage.test.js.map +1 -1
  413. package/dist/src/ui/components/messages/UserShellMessage.js +1 -2
  414. package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -1
  415. package/dist/src/ui/components/messages/WarningMessage.test.js +8 -4
  416. package/dist/src/ui/components/messages/WarningMessage.test.js.map +1 -1
  417. package/dist/src/ui/components/shared/BaseSelectionList.test.js +118 -106
  418. package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -1
  419. package/dist/src/ui/components/shared/BaseSettingsDialog.js +22 -24
  420. package/dist/src/ui/components/shared/BaseSettingsDialog.js.map +1 -1
  421. package/dist/src/ui/components/shared/BaseSettingsDialog.test.js +139 -40
  422. package/dist/src/ui/components/shared/BaseSettingsDialog.test.js.map +1 -1
  423. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +10 -6
  424. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -1
  425. package/dist/src/ui/components/shared/EnumSelector.test.js +42 -20
  426. package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -1
  427. package/dist/src/ui/components/shared/ExpandableText.test.js +21 -14
  428. package/dist/src/ui/components/shared/ExpandableText.test.js.map +1 -1
  429. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js +8 -4
  430. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js.map +1 -1
  431. package/dist/src/ui/components/shared/MaxSizedBox.test.js +41 -30
  432. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -1
  433. package/dist/src/ui/components/shared/Scrollable.js +2 -3
  434. package/dist/src/ui/components/shared/Scrollable.js.map +1 -1
  435. package/dist/src/ui/components/shared/Scrollable.test.js +33 -17
  436. package/dist/src/ui/components/shared/Scrollable.test.js.map +1 -1
  437. package/dist/src/ui/components/shared/ScrollableList.js +1 -1
  438. package/dist/src/ui/components/shared/ScrollableList.js.map +1 -1
  439. package/dist/src/ui/components/shared/ScrollableList.test.js +36 -6
  440. package/dist/src/ui/components/shared/ScrollableList.test.js.map +1 -1
  441. package/dist/src/ui/components/shared/SearchableList.d.ts +46 -14
  442. package/dist/src/ui/components/shared/SearchableList.js +69 -57
  443. package/dist/src/ui/components/shared/SearchableList.js.map +1 -1
  444. package/dist/src/ui/components/shared/SearchableList.test.js +67 -14
  445. package/dist/src/ui/components/shared/SearchableList.test.js.map +1 -1
  446. package/dist/src/ui/components/shared/SectionHeader.d.ts +1 -0
  447. package/dist/src/ui/components/shared/SectionHeader.js +1 -1
  448. package/dist/src/ui/components/shared/SectionHeader.js.map +1 -1
  449. package/dist/src/ui/components/shared/SectionHeader.test.js +9 -2
  450. package/dist/src/ui/components/shared/SectionHeader.test.js.map +1 -1
  451. package/dist/src/ui/components/shared/TabHeader.js +1 -1
  452. package/dist/src/ui/components/shared/TabHeader.js.map +1 -1
  453. package/dist/src/ui/components/shared/TabHeader.test.js +65 -25
  454. package/dist/src/ui/components/shared/TabHeader.test.js.map +1 -1
  455. package/dist/src/ui/components/shared/TextInput.test.js +111 -65
  456. package/dist/src/ui/components/shared/TextInput.test.js.map +1 -1
  457. package/dist/src/ui/components/shared/VirtualizedList.test.js +27 -35
  458. package/dist/src/ui/components/shared/VirtualizedList.test.js.map +1 -1
  459. package/dist/src/ui/components/triage/TriageDuplicates.js +1 -0
  460. package/dist/src/ui/components/triage/TriageDuplicates.js.map +1 -1
  461. package/dist/src/ui/components/triage/TriageIssues.js +1 -0
  462. package/dist/src/ui/components/triage/TriageIssues.js.map +1 -1
  463. package/dist/src/ui/components/views/ChatList.test.js +9 -6
  464. package/dist/src/ui/components/views/ChatList.test.js.map +1 -1
  465. package/dist/src/ui/components/views/ExtensionRegistryView.d.ts +15 -0
  466. package/dist/src/ui/components/views/ExtensionRegistryView.js +60 -0
  467. package/dist/src/ui/components/views/ExtensionRegistryView.js.map +1 -0
  468. package/dist/src/ui/components/views/ExtensionRegistryView.test.d.ts +6 -0
  469. package/dist/src/ui/components/views/ExtensionRegistryView.test.js +168 -0
  470. package/dist/src/ui/components/views/ExtensionRegistryView.test.js.map +1 -0
  471. package/dist/src/ui/components/views/ExtensionsList.test.js +21 -19
  472. package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -1
  473. package/dist/src/ui/components/views/McpStatus.test.js +38 -25
  474. package/dist/src/ui/components/views/McpStatus.test.js.map +1 -1
  475. package/dist/src/ui/components/views/SkillsList.test.js +18 -12
  476. package/dist/src/ui/components/views/SkillsList.test.js.map +1 -1
  477. package/dist/src/ui/components/views/ToolsList.test.js +9 -6
  478. package/dist/src/ui/components/views/ToolsList.test.js.map +1 -1
  479. package/dist/src/ui/constants/tips.js +1 -1
  480. package/dist/src/ui/constants/tips.js.map +1 -1
  481. package/dist/src/ui/constants.d.ts +2 -1
  482. package/dist/src/ui/constants.js +2 -1
  483. package/dist/src/ui/constants.js.map +1 -1
  484. package/dist/src/ui/contexts/AppContext.d.ts +2 -1
  485. package/dist/src/ui/contexts/AppContext.js.map +1 -1
  486. package/dist/src/ui/contexts/KeypressContext.js +37 -8
  487. package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
  488. package/dist/src/ui/contexts/KeypressContext.test.js +68 -0
  489. package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
  490. package/dist/src/ui/contexts/OverflowContext.d.ts +3 -3
  491. package/dist/src/ui/contexts/OverflowContext.js +5 -1
  492. package/dist/src/ui/contexts/OverflowContext.js.map +1 -1
  493. package/dist/src/ui/contexts/TerminalContext.test.js +26 -15
  494. package/dist/src/ui/contexts/TerminalContext.test.js.map +1 -1
  495. package/dist/src/ui/contexts/UIActionsContext.d.ts +6 -1
  496. package/dist/src/ui/contexts/UIActionsContext.js +1 -1
  497. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
  498. package/dist/src/ui/contexts/UIStateContext.d.ts +7 -1
  499. package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
  500. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  501. package/dist/src/ui/hooks/atCommandProcessor.test.js +6 -2
  502. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
  503. package/dist/src/ui/hooks/slashCommandProcessor.js +23 -11
  504. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  505. package/dist/src/ui/hooks/slashCommandProcessor.test.js +30 -14
  506. package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
  507. package/dist/src/ui/hooks/toolMapping.d.ts +2 -0
  508. package/dist/src/ui/hooks/toolMapping.js +13 -1
  509. package/dist/src/ui/hooks/toolMapping.js.map +1 -1
  510. package/dist/src/ui/hooks/toolMapping.test.js +42 -0
  511. package/dist/src/ui/hooks/toolMapping.test.js.map +1 -1
  512. package/dist/src/ui/hooks/useAnimatedScrollbar.js +13 -3
  513. package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -1
  514. package/dist/src/ui/hooks/useAtCompletion.js +74 -22
  515. package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
  516. package/dist/src/ui/hooks/useAtCompletion.test.js +88 -0
  517. package/dist/src/ui/hooks/useAtCompletion.test.js.map +1 -1
  518. package/dist/src/ui/hooks/useCommandCompletion.js +2 -3
  519. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
  520. package/dist/src/ui/hooks/useCommandCompletion.test.js +0 -4
  521. package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -1
  522. package/dist/src/ui/hooks/useConfirmingTool.d.ts +2 -6
  523. package/dist/src/ui/hooks/useConfirmingTool.js +2 -23
  524. package/dist/src/ui/hooks/useConfirmingTool.js.map +1 -1
  525. package/dist/src/ui/hooks/useConsoleMessages.js +18 -6
  526. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
  527. package/dist/src/ui/hooks/useConsoleMessages.test.js +4 -4
  528. package/dist/src/ui/hooks/useExtensionRegistry.d.ts +13 -0
  529. package/dist/src/ui/hooks/useExtensionRegistry.js +70 -0
  530. package/dist/src/ui/hooks/useExtensionRegistry.js.map +1 -0
  531. package/dist/src/ui/hooks/useFocus.d.ts +4 -1
  532. package/dist/src/ui/hooks/useFocus.js +7 -1
  533. package/dist/src/ui/hooks/useFocus.js.map +1 -1
  534. package/dist/src/ui/hooks/useFocus.test.js +20 -11
  535. package/dist/src/ui/hooks/useFocus.test.js.map +1 -1
  536. package/dist/src/ui/hooks/useFolderTrust.d.ts +2 -0
  537. package/dist/src/ui/hooks/useFolderTrust.js +15 -3
  538. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
  539. package/dist/src/ui/hooks/useFolderTrust.test.js +3 -0
  540. package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -1
  541. package/dist/src/ui/hooks/useGeminiStream.d.ts +1 -1
  542. package/dist/src/ui/hooks/useGeminiStream.js +86 -20
  543. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  544. package/dist/src/ui/hooks/useGeminiStream.test.js +150 -1
  545. package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
  546. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +3 -1
  547. package/dist/src/ui/hooks/useLoadingIndicator.js +2 -2
  548. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
  549. package/dist/src/ui/hooks/useLoadingIndicator.test.js +9 -4
  550. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
  551. package/dist/src/ui/hooks/useMouseClick.test.js +15 -7
  552. package/dist/src/ui/hooks/useMouseClick.test.js.map +1 -1
  553. package/dist/src/ui/hooks/usePhraseCycler.d.ts +4 -2
  554. package/dist/src/ui/hooks/usePhraseCycler.js +38 -26
  555. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  556. package/dist/src/ui/hooks/usePhraseCycler.test.js +123 -73
  557. package/dist/src/ui/hooks/usePhraseCycler.test.js.map +1 -1
  558. package/dist/src/ui/hooks/usePromptCompletion.d.ts +1 -2
  559. package/dist/src/ui/hooks/usePromptCompletion.js +2 -2
  560. package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
  561. package/dist/src/ui/hooks/useRegistrySearch.d.ts +19 -0
  562. package/dist/src/ui/hooks/useRegistrySearch.js +35 -0
  563. package/dist/src/ui/hooks/useRegistrySearch.js.map +1 -0
  564. package/dist/src/ui/hooks/useRunEventNotifications.d.ts +22 -0
  565. package/dist/src/ui/hooks/useRunEventNotifications.js +93 -0
  566. package/dist/src/ui/hooks/useRunEventNotifications.js.map +1 -0
  567. package/dist/src/ui/hooks/useSearchBuffer.d.ts +11 -0
  568. package/dist/src/ui/hooks/useSearchBuffer.js +24 -0
  569. package/dist/src/ui/hooks/useSearchBuffer.js.map +1 -0
  570. package/dist/src/ui/hooks/useSelectionList.test.js +111 -45
  571. package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -1
  572. package/dist/src/ui/hooks/useSessionBrowser.js +3 -2
  573. package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
  574. package/dist/src/ui/hooks/useSessionBrowser.test.js +15 -12
  575. package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -1
  576. package/dist/src/ui/hooks/useSessionResume.js +2 -2
  577. package/dist/src/ui/hooks/useSessionResume.js.map +1 -1
  578. package/dist/src/ui/hooks/useSlashCompletion.js +1 -0
  579. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
  580. package/dist/src/ui/hooks/useStateAndRef.js +1 -0
  581. package/dist/src/ui/hooks/useStateAndRef.js.map +1 -1
  582. package/dist/src/ui/hooks/useTerminalTheme.test.js +29 -18
  583. package/dist/src/ui/hooks/useTerminalTheme.test.js.map +1 -1
  584. package/dist/src/ui/hooks/useToolScheduler.js +19 -2
  585. package/dist/src/ui/hooks/useToolScheduler.js.map +1 -1
  586. package/dist/src/ui/hooks/useToolScheduler.test.js +44 -0
  587. package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
  588. package/dist/src/ui/keyMatchers.test.js +1 -0
  589. package/dist/src/ui/keyMatchers.test.js.map +1 -1
  590. package/dist/src/ui/layouts/DefaultAppLayout.test.js +12 -6
  591. package/dist/src/ui/layouts/DefaultAppLayout.test.js.map +1 -1
  592. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +24 -8
  593. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +1 -1
  594. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +16 -5
  595. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +1 -1
  596. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +16 -5
  597. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +1 -1
  598. package/dist/src/ui/privacy/PrivacyNotice.test.js +4 -2
  599. package/dist/src/ui/privacy/PrivacyNotice.test.js.map +1 -1
  600. package/dist/src/ui/themes/no-color.js +4 -0
  601. package/dist/src/ui/themes/no-color.js.map +1 -1
  602. package/dist/src/ui/themes/semantic-tokens.d.ts +2 -0
  603. package/dist/src/ui/themes/semantic-tokens.js +6 -2
  604. package/dist/src/ui/themes/semantic-tokens.js.map +1 -1
  605. package/dist/src/ui/themes/solarized-dark.js +2 -0
  606. package/dist/src/ui/themes/solarized-dark.js.map +1 -1
  607. package/dist/src/ui/themes/solarized-light.js +2 -0
  608. package/dist/src/ui/themes/solarized-light.js.map +1 -1
  609. package/dist/src/ui/themes/theme-manager.js +9 -4
  610. package/dist/src/ui/themes/theme-manager.js.map +1 -1
  611. package/dist/src/ui/themes/theme.d.ts +2 -0
  612. package/dist/src/ui/themes/theme.js +20 -7
  613. package/dist/src/ui/themes/theme.js.map +1 -1
  614. package/dist/src/ui/themes/theme.test.js +7 -7
  615. package/dist/src/ui/themes/theme.test.js.map +1 -1
  616. package/dist/src/ui/types.d.ts +14 -2
  617. package/dist/src/ui/types.js +1 -0
  618. package/dist/src/ui/types.js.map +1 -1
  619. package/dist/src/ui/utils/CodeColorizer.js +3 -5
  620. package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
  621. package/dist/src/ui/utils/CodeColorizer.test.js +4 -2
  622. package/dist/src/ui/utils/CodeColorizer.test.js.map +1 -1
  623. package/dist/src/ui/utils/InlineMarkdownRenderer.js +3 -1
  624. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
  625. package/dist/src/ui/utils/MarkdownDisplay.js +1 -1
  626. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
  627. package/dist/src/ui/utils/MarkdownDisplay.test.js +65 -33
  628. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
  629. package/dist/src/ui/utils/TableRenderer.js +7 -3
  630. package/dist/src/ui/utils/TableRenderer.js.map +1 -1
  631. package/dist/src/ui/utils/TableRenderer.test.js +43 -22
  632. package/dist/src/ui/utils/TableRenderer.test.js.map +1 -1
  633. package/dist/src/ui/utils/borderStyles.d.ts +18 -0
  634. package/dist/src/ui/utils/borderStyles.js +78 -0
  635. package/dist/src/ui/utils/borderStyles.js.map +1 -0
  636. package/dist/src/ui/utils/commandUtils.d.ts +2 -1
  637. package/dist/src/ui/utils/commandUtils.js +8 -3
  638. package/dist/src/ui/utils/commandUtils.js.map +1 -1
  639. package/dist/src/ui/utils/commandUtils.test.js +18 -0
  640. package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
  641. package/dist/src/ui/utils/confirmingTool.d.ts +15 -0
  642. package/dist/src/ui/utils/confirmingTool.js +27 -0
  643. package/dist/src/ui/utils/confirmingTool.js.map +1 -0
  644. package/dist/src/ui/utils/pendingAttentionNotification.d.ts +12 -0
  645. package/dist/src/ui/utils/pendingAttentionNotification.js +101 -0
  646. package/dist/src/ui/utils/pendingAttentionNotification.js.map +1 -0
  647. package/dist/src/ui/utils/pendingAttentionNotification.test.d.ts +6 -0
  648. package/dist/src/ui/utils/pendingAttentionNotification.test.js +79 -0
  649. package/dist/src/ui/utils/pendingAttentionNotification.test.js.map +1 -0
  650. package/dist/src/ui/utils/terminalCapabilityManager.d.ts +2 -0
  651. package/dist/src/ui/utils/terminalCapabilityManager.js +18 -0
  652. package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -1
  653. package/dist/src/ui/utils/terminalCapabilityManager.test.js +68 -0
  654. package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +1 -1
  655. package/dist/src/ui/utils/terminalSetup.d.ts +24 -0
  656. package/dist/src/ui/utils/terminalSetup.js +130 -34
  657. package/dist/src/ui/utils/terminalSetup.js.map +1 -1
  658. package/dist/src/ui/utils/terminalSetup.test.js +35 -1
  659. package/dist/src/ui/utils/terminalSetup.test.js.map +1 -1
  660. package/dist/src/ui/utils/textUtils.d.ts +4 -0
  661. package/dist/src/ui/utils/textUtils.js +10 -1
  662. package/dist/src/ui/utils/textUtils.js.map +1 -1
  663. package/dist/src/ui/utils/textUtils.test.js +25 -2
  664. package/dist/src/ui/utils/textUtils.test.js.map +1 -1
  665. package/dist/src/ui/utils/toolLayoutUtils.d.ts +44 -0
  666. package/dist/src/ui/utils/toolLayoutUtils.js +73 -0
  667. package/dist/src/ui/utils/toolLayoutUtils.js.map +1 -0
  668. package/dist/src/ui/utils/urlSecurityUtils.d.ts +32 -0
  669. package/dist/src/ui/utils/urlSecurityUtils.js +71 -0
  670. package/dist/src/ui/utils/urlSecurityUtils.js.map +1 -0
  671. package/dist/src/ui/utils/urlSecurityUtils.test.d.ts +6 -0
  672. package/dist/src/ui/utils/urlSecurityUtils.test.js +49 -0
  673. package/dist/src/ui/utils/urlSecurityUtils.test.js.map +1 -0
  674. package/dist/src/utils/activityLogger.js +95 -24
  675. package/dist/src/utils/activityLogger.js.map +1 -1
  676. package/dist/src/utils/devtoolsService.js +1 -2
  677. package/dist/src/utils/devtoolsService.js.map +1 -1
  678. package/dist/src/utils/devtoolsService.test.js +1 -1
  679. package/dist/src/utils/devtoolsService.test.js.map +1 -1
  680. package/dist/src/utils/envVarResolver.js +4 -1
  681. package/dist/src/utils/envVarResolver.js.map +1 -1
  682. package/dist/src/utils/gitUtils.js +2 -0
  683. package/dist/src/utils/gitUtils.js.map +1 -1
  684. package/dist/src/utils/jsonoutput.js +2 -0
  685. package/dist/src/utils/jsonoutput.js.map +1 -1
  686. package/dist/src/utils/persistentState.d.ts +2 -0
  687. package/dist/src/utils/persistentState.js +1 -0
  688. package/dist/src/utils/persistentState.js.map +1 -1
  689. package/dist/src/utils/readStdin.js +1 -0
  690. package/dist/src/utils/readStdin.js.map +1 -1
  691. package/dist/src/utils/sessionUtils.d.ts +1 -6
  692. package/dist/src/utils/sessionUtils.js +8 -101
  693. package/dist/src/utils/sessionUtils.js.map +1 -1
  694. package/dist/src/utils/sessionUtils.test.js +47 -0
  695. package/dist/src/utils/sessionUtils.test.js.map +1 -1
  696. package/dist/src/utils/settingsUtils.js +2 -0
  697. package/dist/src/utils/settingsUtils.js.map +1 -1
  698. package/dist/src/utils/skillUtils.test.js +7 -5
  699. package/dist/src/utils/skillUtils.test.js.map +1 -1
  700. package/dist/src/utils/terminalNotifications.d.ts +25 -0
  701. package/dist/src/utils/terminalNotifications.js +77 -0
  702. package/dist/src/utils/terminalNotifications.js.map +1 -0
  703. package/dist/src/utils/terminalNotifications.test.d.ts +6 -0
  704. package/dist/src/utils/terminalNotifications.test.js +123 -0
  705. package/dist/src/utils/terminalNotifications.test.js.map +1 -0
  706. package/dist/src/utils/userStartupWarnings.d.ts +4 -1
  707. package/dist/src/utils/userStartupWarnings.js +22 -4
  708. package/dist/src/utils/userStartupWarnings.js.map +1 -1
  709. package/dist/src/utils/userStartupWarnings.test.js +53 -11
  710. package/dist/src/utils/userStartupWarnings.test.js.map +1 -1
  711. package/dist/src/zed-integration/acpErrors.js +2 -0
  712. package/dist/src/zed-integration/acpErrors.js.map +1 -1
  713. package/dist/src/zed-integration/acpResume.test.js +53 -3
  714. package/dist/src/zed-integration/acpResume.test.js.map +1 -1
  715. package/dist/src/zed-integration/fileSystemService.js +2 -0
  716. package/dist/src/zed-integration/fileSystemService.js.map +1 -1
  717. package/dist/src/zed-integration/zedIntegration.d.ts +2 -0
  718. package/dist/src/zed-integration/zedIntegration.js +77 -6
  719. package/dist/src/zed-integration/zedIntegration.js.map +1 -1
  720. package/dist/src/zed-integration/zedIntegration.test.js +176 -2
  721. package/dist/src/zed-integration/zedIntegration.test.js.map +1 -1
  722. package/dist/tsconfig.tsbuildinfo +1 -1
  723. package/package.json +8 -7
  724. package/dist/google-gemini-cli-0.30.0.tgz +0 -0
  725. package/dist/src/ui/hooks/useFuzzyList.d.ts +0 -25
  726. package/dist/src/ui/hooks/useFuzzyList.js +0 -100
  727. package/dist/src/ui/hooks/useFuzzyList.js.map +0 -1
@@ -5,14 +5,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  import { describe, it, expect, vi, beforeEach, afterEach, } from 'vitest';
8
- import { render, persistentStateMock } from '../test-utils/render.js';
8
+ import { render, cleanup, persistentStateMock } from '../test-utils/render.js';
9
9
  import { waitFor } from '../test-utils/async.js';
10
- import { cleanup } from 'ink-testing-library';
11
10
  import { act, useContext } from 'react';
12
11
  import { AppContainer } from './AppContainer.js';
13
12
  import { SettingsContext } from './contexts/SettingsContext.js';
14
13
  import {} from './hooks/useToolScheduler.js';
15
- import { makeFakeConfig, CoreEvent, AuthType, CoreToolCallStatus, } from '@google/gemini-cli-core';
14
+ import { makeFakeConfig, CoreEvent, WarningPriority, AuthType, CoreToolCallStatus, } from '@google/gemini-cli-core';
16
15
  // Mock coreEvents
17
16
  const mockCoreEvents = vi.hoisted(() => ({
18
17
  on: vi.fn(),
@@ -28,6 +27,15 @@ const mockIdeClient = vi.hoisted(() => ({
28
27
  const mocks = vi.hoisted(() => ({
29
28
  mockStdout: { write: vi.fn() },
30
29
  }));
30
+ const terminalNotificationsMocks = vi.hoisted(() => ({
31
+ notifyViaTerminal: vi.fn().mockResolvedValue(true),
32
+ isNotificationsEnabled: vi.fn(() => true),
33
+ buildRunEventNotificationContent: vi.fn((event) => ({
34
+ title: 'Mock Notification',
35
+ subtitle: 'Mock Subtitle',
36
+ body: JSON.stringify(event),
37
+ })),
38
+ }));
31
39
  vi.mock('@google/gemini-cli-core', async (importOriginal) => {
32
40
  const actual = await importOriginal();
33
41
  return {
@@ -60,6 +68,8 @@ import { StreamingState } from './types.js';
60
68
  import { UIStateContext } from './contexts/UIStateContext.js';
61
69
  import { UIActionsContext, } from './contexts/UIActionsContext.js';
62
70
  import { KeypressProvider } from './contexts/KeypressContext.js';
71
+ import { OverflowProvider } from './contexts/OverflowContext.js';
72
+ import { useOverflowActions, } from './contexts/OverflowContext.js';
63
73
  // Mock useStdout to capture terminal title writes
64
74
  vi.mock('ink', async (importOriginal) => {
65
75
  const actual = await importOriginal();
@@ -73,9 +83,11 @@ vi.mock('ink', async (importOriginal) => {
73
83
  // so we can assert against them in our tests.
74
84
  let capturedUIState;
75
85
  let capturedUIActions;
86
+ let capturedOverflowActions;
76
87
  function TestContextConsumer() {
77
88
  capturedUIState = useContext(UIStateContext);
78
89
  capturedUIActions = useContext(UIActionsContext);
90
+ capturedOverflowActions = useOverflowActions();
79
91
  return null;
80
92
  }
81
93
  vi.mock('./App.js', () => ({
@@ -124,12 +136,18 @@ vi.mock('./hooks/useShellInactivityStatus.js', () => ({
124
136
  inactivityStatus: 'none',
125
137
  })),
126
138
  }));
139
+ vi.mock('../utils/terminalNotifications.js', () => ({
140
+ notifyViaTerminal: terminalNotificationsMocks.notifyViaTerminal,
141
+ isNotificationsEnabled: terminalNotificationsMocks.isNotificationsEnabled,
142
+ buildRunEventNotificationContent: terminalNotificationsMocks.buildRunEventNotificationContent,
143
+ }));
127
144
  vi.mock('./hooks/useTerminalTheme.js', () => ({
128
145
  useTerminalTheme: vi.fn(),
129
146
  }));
130
147
  import { useHookDisplayState } from './hooks/useHookDisplayState.js';
131
148
  import { useTerminalTheme } from './hooks/useTerminalTheme.js';
132
149
  import { useShellInactivityStatus } from './hooks/useShellInactivityStatus.js';
150
+ import { useFocus } from './hooks/useFocus.js';
133
151
  // Mock external utilities
134
152
  vi.mock('../utils/events.js');
135
153
  vi.mock('../utils/handleAutoUpdate.js');
@@ -163,14 +181,14 @@ import { measureElement } from 'ink';
163
181
  import { useTerminalSize } from './hooks/useTerminalSize.js';
164
182
  import { ShellExecutionService, writeToStdout, enableMouseEvents, disableMouseEvents, } from '@google/gemini-cli-core';
165
183
  import {} from '../config/extension-manager.js';
166
- import { WARNING_PROMPT_DURATION_MS } from './constants.js';
184
+ import { WARNING_PROMPT_DURATION_MS, EXPAND_HINT_DURATION_MS, } from './constants.js';
167
185
  describe('AppContainer State Management', () => {
168
186
  let mockConfig;
169
187
  let mockSettings;
170
188
  let mockInitResult;
171
189
  let mockExtensionManager;
172
190
  // Helper to generate the AppContainer JSX for render and rerender
173
- const getAppContainer = ({ settings = mockSettings, config = mockConfig, version = '1.0.0', initResult = mockInitResult, startupWarnings, resumedSessionData, } = {}) => (_jsx(SettingsContext.Provider, { value: settings, children: _jsx(KeypressProvider, { config: config, children: _jsx(AppContainer, { config: config, version: version, initializationResult: initResult, startupWarnings: startupWarnings, resumedSessionData: resumedSessionData }) }) }));
191
+ const getAppContainer = ({ settings = mockSettings, config = mockConfig, version = '1.0.0', initResult = mockInitResult, startupWarnings, resumedSessionData, } = {}) => (_jsx(SettingsContext.Provider, { value: settings, children: _jsx(KeypressProvider, { config: config, children: _jsx(OverflowProvider, { children: _jsx(AppContainer, { config: config, version: version, initializationResult: initResult, startupWarnings: startupWarnings, resumedSessionData: resumedSessionData }) }) }) }));
174
192
  // Helper to render the AppContainer
175
193
  const renderAppContainer = (props) => render(getAppContainer(props));
176
194
  // Create typed mocks for all hooks
@@ -200,6 +218,7 @@ describe('AppContainer State Management', () => {
200
218
  const mockedUseHookDisplayState = useHookDisplayState;
201
219
  const mockedUseTerminalTheme = useTerminalTheme;
202
220
  const mockedUseShellInactivityStatus = useShellInactivityStatus;
221
+ const mockedUseFocusState = useFocus;
203
222
  const DEFAULT_GEMINI_STREAM_MOCK = {
204
223
  streamingState: 'idle',
205
224
  submitQuery: vi.fn(),
@@ -330,6 +349,10 @@ describe('AppContainer State Management', () => {
330
349
  shouldShowFocusHint: false,
331
350
  inactivityStatus: 'none',
332
351
  });
352
+ mockedUseFocusState.mockReturnValue({
353
+ isFocused: true,
354
+ hasReceivedFocusEvent: true,
355
+ });
333
356
  // Mock Config
334
357
  mockConfig = makeFakeConfig();
335
358
  // Mock config's getTargetDir to return consistent workspace directory
@@ -384,7 +407,18 @@ describe('AppContainer State Management', () => {
384
407
  unmount();
385
408
  });
386
409
  it('renders with startup warnings', async () => {
387
- const startupWarnings = ['Warning 1', 'Warning 2'];
410
+ const startupWarnings = [
411
+ {
412
+ id: 'w1',
413
+ message: 'Warning 1',
414
+ priority: WarningPriority.High,
415
+ },
416
+ {
417
+ id: 'w2',
418
+ message: 'Warning 2',
419
+ priority: WarningPriority.High,
420
+ },
421
+ ];
388
422
  let unmount;
389
423
  await act(async () => {
390
424
  const result = renderAppContainer({ startupWarnings });
@@ -421,6 +455,286 @@ describe('AppContainer State Management', () => {
421
455
  });
422
456
  });
423
457
  describe('State Initialization', () => {
458
+ it('sends a macOS notification when confirmation is pending and terminal is unfocused', async () => {
459
+ mockedUseFocusState.mockReturnValue({
460
+ isFocused: false,
461
+ hasReceivedFocusEvent: true,
462
+ });
463
+ mockedUseGeminiStream.mockReturnValue({
464
+ ...DEFAULT_GEMINI_STREAM_MOCK,
465
+ pendingHistoryItems: [
466
+ {
467
+ type: 'tool_group',
468
+ tools: [
469
+ {
470
+ callId: 'call-1',
471
+ name: 'run_shell_command',
472
+ description: 'Run command',
473
+ resultDisplay: undefined,
474
+ status: CoreToolCallStatus.AwaitingApproval,
475
+ confirmationDetails: {
476
+ type: 'exec',
477
+ title: 'Run shell command',
478
+ command: 'ls',
479
+ rootCommand: 'ls',
480
+ rootCommands: ['ls'],
481
+ },
482
+ },
483
+ ],
484
+ },
485
+ ],
486
+ });
487
+ let unmount;
488
+ await act(async () => {
489
+ const rendered = renderAppContainer();
490
+ unmount = rendered.unmount;
491
+ });
492
+ await waitFor(() => expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalled());
493
+ expect(terminalNotificationsMocks.buildRunEventNotificationContent).toHaveBeenCalledWith(expect.objectContaining({
494
+ type: 'attention',
495
+ }));
496
+ await act(async () => {
497
+ unmount?.();
498
+ });
499
+ });
500
+ it('does not send attention notification when terminal is focused', async () => {
501
+ mockedUseFocusState.mockReturnValue({
502
+ isFocused: true,
503
+ hasReceivedFocusEvent: true,
504
+ });
505
+ mockedUseGeminiStream.mockReturnValue({
506
+ ...DEFAULT_GEMINI_STREAM_MOCK,
507
+ pendingHistoryItems: [
508
+ {
509
+ type: 'tool_group',
510
+ tools: [
511
+ {
512
+ callId: 'call-2',
513
+ name: 'run_shell_command',
514
+ description: 'Run command',
515
+ resultDisplay: undefined,
516
+ status: CoreToolCallStatus.AwaitingApproval,
517
+ confirmationDetails: {
518
+ type: 'exec',
519
+ title: 'Run shell command',
520
+ command: 'ls',
521
+ rootCommand: 'ls',
522
+ rootCommands: ['ls'],
523
+ },
524
+ },
525
+ ],
526
+ },
527
+ ],
528
+ });
529
+ let unmount;
530
+ await act(async () => {
531
+ const rendered = renderAppContainer();
532
+ unmount = rendered.unmount;
533
+ });
534
+ expect(terminalNotificationsMocks.notifyViaTerminal).not.toHaveBeenCalled();
535
+ await act(async () => {
536
+ unmount?.();
537
+ });
538
+ });
539
+ it('sends attention notification when focus reporting is unavailable', async () => {
540
+ mockedUseFocusState.mockReturnValue({
541
+ isFocused: true,
542
+ hasReceivedFocusEvent: false,
543
+ });
544
+ mockedUseGeminiStream.mockReturnValue({
545
+ ...DEFAULT_GEMINI_STREAM_MOCK,
546
+ pendingHistoryItems: [
547
+ {
548
+ type: 'tool_group',
549
+ tools: [
550
+ {
551
+ callId: 'call-focus-unknown',
552
+ name: 'run_shell_command',
553
+ description: 'Run command',
554
+ resultDisplay: undefined,
555
+ status: CoreToolCallStatus.AwaitingApproval,
556
+ confirmationDetails: {
557
+ type: 'exec',
558
+ title: 'Run shell command',
559
+ command: 'ls',
560
+ rootCommand: 'ls',
561
+ rootCommands: ['ls'],
562
+ },
563
+ },
564
+ ],
565
+ },
566
+ ],
567
+ });
568
+ let unmount;
569
+ await act(async () => {
570
+ const rendered = renderAppContainer();
571
+ unmount = rendered.unmount;
572
+ });
573
+ await waitFor(() => expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalled());
574
+ await act(async () => {
575
+ unmount?.();
576
+ });
577
+ });
578
+ it('sends a macOS notification when a response completes while unfocused', async () => {
579
+ mockedUseFocusState.mockReturnValue({
580
+ isFocused: false,
581
+ hasReceivedFocusEvent: true,
582
+ });
583
+ let currentStreamingState = 'responding';
584
+ mockedUseGeminiStream.mockImplementation(() => ({
585
+ ...DEFAULT_GEMINI_STREAM_MOCK,
586
+ streamingState: currentStreamingState,
587
+ }));
588
+ let unmount;
589
+ let rerender;
590
+ await act(async () => {
591
+ const rendered = renderAppContainer();
592
+ unmount = rendered.unmount;
593
+ rerender = rendered.rerender;
594
+ });
595
+ currentStreamingState = 'idle';
596
+ await act(async () => {
597
+ rerender?.(getAppContainer());
598
+ });
599
+ await waitFor(() => expect(terminalNotificationsMocks.buildRunEventNotificationContent).toHaveBeenCalledWith(expect.objectContaining({
600
+ type: 'session_complete',
601
+ detail: 'Gemini CLI finished responding.',
602
+ })));
603
+ expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalled();
604
+ await act(async () => {
605
+ unmount?.();
606
+ });
607
+ });
608
+ it('sends completion notification when focus reporting is unavailable', async () => {
609
+ mockedUseFocusState.mockReturnValue({
610
+ isFocused: true,
611
+ hasReceivedFocusEvent: false,
612
+ });
613
+ let currentStreamingState = 'responding';
614
+ mockedUseGeminiStream.mockImplementation(() => ({
615
+ ...DEFAULT_GEMINI_STREAM_MOCK,
616
+ streamingState: currentStreamingState,
617
+ }));
618
+ let unmount;
619
+ let rerender;
620
+ await act(async () => {
621
+ const rendered = renderAppContainer();
622
+ unmount = rendered.unmount;
623
+ rerender = rendered.rerender;
624
+ });
625
+ currentStreamingState = 'idle';
626
+ await act(async () => {
627
+ rerender?.(getAppContainer());
628
+ });
629
+ await waitFor(() => expect(terminalNotificationsMocks.buildRunEventNotificationContent).toHaveBeenCalledWith(expect.objectContaining({
630
+ type: 'session_complete',
631
+ detail: 'Gemini CLI finished responding.',
632
+ })));
633
+ await act(async () => {
634
+ unmount?.();
635
+ });
636
+ });
637
+ it('does not send completion notification when another action-required dialog is pending', async () => {
638
+ mockedUseFocusState.mockReturnValue({
639
+ isFocused: false,
640
+ hasReceivedFocusEvent: true,
641
+ });
642
+ mockedUseQuotaAndFallback.mockReturnValue({
643
+ proQuotaRequest: { kind: 'upgrade' },
644
+ handleProQuotaChoice: vi.fn(),
645
+ });
646
+ let currentStreamingState = 'responding';
647
+ mockedUseGeminiStream.mockImplementation(() => ({
648
+ ...DEFAULT_GEMINI_STREAM_MOCK,
649
+ streamingState: currentStreamingState,
650
+ }));
651
+ let unmount;
652
+ let rerender;
653
+ await act(async () => {
654
+ const rendered = renderAppContainer();
655
+ unmount = rendered.unmount;
656
+ rerender = rendered.rerender;
657
+ });
658
+ currentStreamingState = 'idle';
659
+ await act(async () => {
660
+ rerender?.(getAppContainer());
661
+ });
662
+ expect(terminalNotificationsMocks.notifyViaTerminal).not.toHaveBeenCalled();
663
+ await act(async () => {
664
+ unmount?.();
665
+ });
666
+ });
667
+ it('can send repeated attention notifications for the same key after pending state clears', async () => {
668
+ mockedUseFocusState.mockReturnValue({
669
+ isFocused: false,
670
+ hasReceivedFocusEvent: true,
671
+ });
672
+ let pendingHistoryItems = [
673
+ {
674
+ type: 'tool_group',
675
+ tools: [
676
+ {
677
+ callId: 'repeat-key-call',
678
+ name: 'run_shell_command',
679
+ description: 'Run command',
680
+ resultDisplay: undefined,
681
+ status: CoreToolCallStatus.AwaitingApproval,
682
+ confirmationDetails: {
683
+ type: 'exec',
684
+ title: 'Run shell command',
685
+ command: 'ls',
686
+ rootCommand: 'ls',
687
+ rootCommands: ['ls'],
688
+ },
689
+ },
690
+ ],
691
+ },
692
+ ];
693
+ mockedUseGeminiStream.mockImplementation(() => ({
694
+ ...DEFAULT_GEMINI_STREAM_MOCK,
695
+ pendingHistoryItems,
696
+ }));
697
+ let unmount;
698
+ let rerender;
699
+ await act(async () => {
700
+ const rendered = renderAppContainer();
701
+ unmount = rendered.unmount;
702
+ rerender = rendered.rerender;
703
+ });
704
+ await waitFor(() => expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalledTimes(1));
705
+ pendingHistoryItems = [];
706
+ await act(async () => {
707
+ rerender?.(getAppContainer());
708
+ });
709
+ pendingHistoryItems = [
710
+ {
711
+ type: 'tool_group',
712
+ tools: [
713
+ {
714
+ callId: 'repeat-key-call',
715
+ name: 'run_shell_command',
716
+ description: 'Run command',
717
+ resultDisplay: undefined,
718
+ status: CoreToolCallStatus.AwaitingApproval,
719
+ confirmationDetails: {
720
+ type: 'exec',
721
+ title: 'Run shell command',
722
+ command: 'ls',
723
+ rootCommand: 'ls',
724
+ rootCommands: ['ls'],
725
+ },
726
+ },
727
+ ],
728
+ },
729
+ ];
730
+ await act(async () => {
731
+ rerender?.(getAppContainer());
732
+ });
733
+ await waitFor(() => expect(terminalNotificationsMocks.notifyViaTerminal).toHaveBeenCalledTimes(2));
734
+ await act(async () => {
735
+ unmount?.();
736
+ });
737
+ });
424
738
  it('initializes with theme error from initialization result', async () => {
425
739
  const initResultWithError = {
426
740
  ...mockInitResult,
@@ -1853,7 +2167,7 @@ describe('AppContainer State Management', () => {
1853
2167
  });
1854
2168
  return null;
1855
2169
  }
1856
- const getTree = (settings) => (_jsx(SettingsContext.Provider, { value: settings, children: _jsxs(KeypressProvider, { config: mockConfig, children: [_jsx(AppContainer, { config: mockConfig, version: "1.0.0", initializationResult: mockInitResult }), _jsx(TestChild, {})] }) }));
2170
+ const getTree = (settings) => (_jsx(SettingsContext.Provider, { value: settings, children: _jsx(KeypressProvider, { config: mockConfig, children: _jsxs(OverflowProvider, { children: [_jsx(AppContainer, { config: mockConfig, version: "1.0.0", initializationResult: mockInitResult }), _jsx(TestChild, {})] }) }) }));
1857
2171
  const renderResult = render(getTree(testSettings));
1858
2172
  stdin = renderResult.stdin;
1859
2173
  await act(async () => {
@@ -2323,6 +2637,246 @@ describe('AppContainer State Management', () => {
2323
2637
  compUnmount();
2324
2638
  });
2325
2639
  });
2640
+ describe('Submission Handling', () => {
2641
+ it('resets expansion state on submission when not in alternate buffer', async () => {
2642
+ const { checkPermissions } = await import('./hooks/atCommandProcessor.js');
2643
+ vi.mocked(checkPermissions).mockResolvedValue([]);
2644
+ let unmount;
2645
+ await act(async () => {
2646
+ unmount = renderAppContainer({
2647
+ settings: {
2648
+ ...mockSettings,
2649
+ merged: {
2650
+ ...mockSettings.merged,
2651
+ ui: { ...mockSettings.merged.ui, useAlternateBuffer: false },
2652
+ },
2653
+ },
2654
+ }).unmount;
2655
+ });
2656
+ await waitFor(() => expect(capturedUIActions).toBeTruthy());
2657
+ // Expand first
2658
+ act(() => capturedUIActions.setConstrainHeight(false));
2659
+ expect(capturedUIState.constrainHeight).toBe(false);
2660
+ // Reset mock stdout to clear any initial writes
2661
+ mocks.mockStdout.write.mockClear();
2662
+ // Submit
2663
+ await act(async () => capturedUIActions.handleFinalSubmit('test prompt'));
2664
+ // Should be reset
2665
+ expect(capturedUIState.constrainHeight).toBe(true);
2666
+ // Should refresh static (which clears terminal in non-alternate buffer)
2667
+ expect(mocks.mockStdout.write).toHaveBeenCalledWith(ansiEscapes.clearTerminal);
2668
+ unmount();
2669
+ });
2670
+ it('resets expansion state on submission when in alternate buffer without clearing terminal', async () => {
2671
+ const { checkPermissions } = await import('./hooks/atCommandProcessor.js');
2672
+ vi.mocked(checkPermissions).mockResolvedValue([]);
2673
+ let unmount;
2674
+ await act(async () => {
2675
+ unmount = renderAppContainer({
2676
+ settings: {
2677
+ ...mockSettings,
2678
+ merged: {
2679
+ ...mockSettings.merged,
2680
+ ui: { ...mockSettings.merged.ui, useAlternateBuffer: true },
2681
+ },
2682
+ },
2683
+ }).unmount;
2684
+ });
2685
+ await waitFor(() => expect(capturedUIActions).toBeTruthy());
2686
+ // Expand first
2687
+ act(() => capturedUIActions.setConstrainHeight(false));
2688
+ expect(capturedUIState.constrainHeight).toBe(false);
2689
+ // Reset mock stdout
2690
+ mocks.mockStdout.write.mockClear();
2691
+ // Submit
2692
+ await act(async () => capturedUIActions.handleFinalSubmit('test prompt'));
2693
+ // Should be reset
2694
+ expect(capturedUIState.constrainHeight).toBe(true);
2695
+ // Should NOT refresh static's clearTerminal in alternate buffer
2696
+ expect(mocks.mockStdout.write).not.toHaveBeenCalledWith(ansiEscapes.clearTerminal);
2697
+ unmount();
2698
+ });
2699
+ });
2700
+ describe('Overflow Hint Handling', () => {
2701
+ beforeEach(() => {
2702
+ vi.useFakeTimers();
2703
+ });
2704
+ afterEach(() => {
2705
+ vi.useRealTimers();
2706
+ });
2707
+ it('sets showIsExpandableHint when overflow occurs in Standard Mode and hides after 10s', async () => {
2708
+ let unmount;
2709
+ await act(async () => {
2710
+ const result = renderAppContainer();
2711
+ unmount = result.unmount;
2712
+ });
2713
+ await waitFor(() => expect(capturedUIState).toBeTruthy());
2714
+ // Trigger overflow
2715
+ act(() => {
2716
+ capturedOverflowActions.addOverflowingId('test-id');
2717
+ });
2718
+ await waitFor(() => {
2719
+ // Should show hint because we are in Standard Mode (default settings) and have overflow
2720
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2721
+ });
2722
+ // Advance just before the timeout
2723
+ act(() => {
2724
+ vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS - 100);
2725
+ });
2726
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2727
+ // Advance to hit the timeout mark
2728
+ act(() => {
2729
+ vi.advanceTimersByTime(100);
2730
+ });
2731
+ await waitFor(() => {
2732
+ expect(capturedUIState.showIsExpandableHint).toBe(false);
2733
+ });
2734
+ unmount();
2735
+ });
2736
+ it('toggles expansion state and resets the hint timer when Ctrl+O is pressed in Standard Mode', async () => {
2737
+ let unmount;
2738
+ let stdin;
2739
+ await act(async () => {
2740
+ const result = renderAppContainer();
2741
+ unmount = result.unmount;
2742
+ stdin = result.stdin;
2743
+ });
2744
+ await waitFor(() => expect(capturedUIState).toBeTruthy());
2745
+ // Initial state is constrainHeight = true
2746
+ expect(capturedUIState.constrainHeight).toBe(true);
2747
+ // Trigger overflow so the hint starts showing
2748
+ act(() => {
2749
+ capturedOverflowActions.addOverflowingId('test-id');
2750
+ });
2751
+ await waitFor(() => {
2752
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2753
+ });
2754
+ // Advance half the duration
2755
+ act(() => {
2756
+ vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS / 2);
2757
+ });
2758
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2759
+ // Simulate Ctrl+O
2760
+ act(() => {
2761
+ stdin.write('\x0f'); // \x0f is Ctrl+O
2762
+ });
2763
+ await waitFor(() => {
2764
+ // constrainHeight should toggle
2765
+ expect(capturedUIState.constrainHeight).toBe(false);
2766
+ });
2767
+ // Advance enough that the original timer would have expired if it hadn't reset
2768
+ act(() => {
2769
+ vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS / 2 + 1000);
2770
+ });
2771
+ // We expect it to still be true because Ctrl+O should have reset the timer
2772
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2773
+ // Advance remaining time to reach the new timeout
2774
+ act(() => {
2775
+ vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS / 2 - 1000);
2776
+ });
2777
+ await waitFor(() => {
2778
+ expect(capturedUIState.showIsExpandableHint).toBe(false);
2779
+ });
2780
+ unmount();
2781
+ });
2782
+ it('toggles Ctrl+O multiple times and verifies the hint disappears exactly after the last toggle', async () => {
2783
+ let unmount;
2784
+ let stdin;
2785
+ await act(async () => {
2786
+ const result = renderAppContainer();
2787
+ unmount = result.unmount;
2788
+ stdin = result.stdin;
2789
+ });
2790
+ await waitFor(() => expect(capturedUIState).toBeTruthy());
2791
+ // Initial state is constrainHeight = true
2792
+ expect(capturedUIState.constrainHeight).toBe(true);
2793
+ // Trigger overflow so the hint starts showing
2794
+ act(() => {
2795
+ capturedOverflowActions.addOverflowingId('test-id');
2796
+ });
2797
+ await waitFor(() => {
2798
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2799
+ });
2800
+ // Advance half the duration
2801
+ act(() => {
2802
+ vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS / 2);
2803
+ });
2804
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2805
+ // First toggle 'on' (expanded)
2806
+ act(() => {
2807
+ stdin.write('\x0f'); // Ctrl+O
2808
+ });
2809
+ await waitFor(() => {
2810
+ expect(capturedUIState.constrainHeight).toBe(false);
2811
+ });
2812
+ // Wait 1 second
2813
+ act(() => {
2814
+ vi.advanceTimersByTime(1000);
2815
+ });
2816
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2817
+ // Second toggle 'off' (collapsed)
2818
+ act(() => {
2819
+ stdin.write('\x0f'); // Ctrl+O
2820
+ });
2821
+ await waitFor(() => {
2822
+ expect(capturedUIState.constrainHeight).toBe(true);
2823
+ });
2824
+ // Wait 1 second
2825
+ act(() => {
2826
+ vi.advanceTimersByTime(1000);
2827
+ });
2828
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2829
+ // Third toggle 'on' (expanded)
2830
+ act(() => {
2831
+ stdin.write('\x0f'); // Ctrl+O
2832
+ });
2833
+ await waitFor(() => {
2834
+ expect(capturedUIState.constrainHeight).toBe(false);
2835
+ });
2836
+ // Now we wait just before the timeout from the LAST toggle.
2837
+ // It should still be true.
2838
+ act(() => {
2839
+ vi.advanceTimersByTime(EXPAND_HINT_DURATION_MS - 100);
2840
+ });
2841
+ expect(capturedUIState.showIsExpandableHint).toBe(true);
2842
+ // Wait 0.1s more to hit exactly the timeout since the last toggle.
2843
+ // It should hide now.
2844
+ act(() => {
2845
+ vi.advanceTimersByTime(100);
2846
+ });
2847
+ await waitFor(() => {
2848
+ expect(capturedUIState.showIsExpandableHint).toBe(false);
2849
+ });
2850
+ unmount();
2851
+ });
2852
+ it('does NOT set showIsExpandableHint when overflow occurs in Alternate Buffer Mode', async () => {
2853
+ const alternateSettings = mergeSettings({}, {}, {}, {}, true);
2854
+ const settingsWithAlternateBuffer = {
2855
+ merged: {
2856
+ ...alternateSettings,
2857
+ ui: {
2858
+ ...alternateSettings.ui,
2859
+ useAlternateBuffer: true,
2860
+ },
2861
+ },
2862
+ };
2863
+ let unmount;
2864
+ await act(async () => {
2865
+ const result = renderAppContainer({
2866
+ settings: settingsWithAlternateBuffer,
2867
+ });
2868
+ unmount = result.unmount;
2869
+ });
2870
+ await waitFor(() => expect(capturedUIState).toBeTruthy());
2871
+ // Trigger overflow
2872
+ act(() => {
2873
+ capturedOverflowActions.addOverflowingId('test-id');
2874
+ });
2875
+ // Should NOT show hint because we are in Alternate Buffer Mode
2876
+ expect(capturedUIState.showIsExpandableHint).toBe(false);
2877
+ unmount();
2878
+ });
2879
+ });
2326
2880
  describe('Permission Handling', () => {
2327
2881
  it('shows permission dialog when checkPermissions returns paths', async () => {
2328
2882
  const { checkPermissions } = await import('./hooks/atCommandProcessor.js');