@machina.ai/cell-cli 1.16.0-rc1 → 1.18.4-rc1

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 (406) hide show
  1. package/dist/index.js +8 -6
  2. package/dist/index.js.map +1 -1
  3. package/dist/package.json +8 -7
  4. package/dist/src/commands/extensions/disable.js +2 -0
  5. package/dist/src/commands/extensions/disable.js.map +1 -1
  6. package/dist/src/commands/extensions/disable.test.d.ts +6 -0
  7. package/dist/src/commands/extensions/disable.test.js +169 -0
  8. package/dist/src/commands/extensions/disable.test.js.map +1 -0
  9. package/dist/src/commands/extensions/enable.js +2 -0
  10. package/dist/src/commands/extensions/enable.js.map +1 -1
  11. package/dist/src/commands/extensions/enable.test.d.ts +6 -0
  12. package/dist/src/commands/extensions/enable.test.js +150 -0
  13. package/dist/src/commands/extensions/enable.test.js.map +1 -0
  14. package/dist/src/commands/extensions/examples/mcp-server/example.test.d.ts +6 -0
  15. package/dist/src/commands/extensions/examples/mcp-server/example.test.js +111 -0
  16. package/dist/src/commands/extensions/examples/mcp-server/example.test.js.map +1 -0
  17. package/dist/src/commands/extensions/examples/mcp-server/example.test.ts +143 -0
  18. package/dist/src/commands/extensions/examples/mcp-server/package.json +1 -1
  19. package/dist/src/commands/extensions/install.js +2 -0
  20. package/dist/src/commands/extensions/install.js.map +1 -1
  21. package/dist/src/commands/extensions/install.test.js +3 -0
  22. package/dist/src/commands/extensions/install.test.js.map +1 -1
  23. package/dist/src/commands/extensions/link.js +2 -0
  24. package/dist/src/commands/extensions/link.js.map +1 -1
  25. package/dist/src/commands/extensions/link.test.d.ts +6 -0
  26. package/dist/src/commands/extensions/link.test.js +131 -0
  27. package/dist/src/commands/extensions/link.test.js.map +1 -0
  28. package/dist/src/commands/extensions/list.js +2 -0
  29. package/dist/src/commands/extensions/list.js.map +1 -1
  30. package/dist/src/commands/extensions/list.test.d.ts +6 -0
  31. package/dist/src/commands/extensions/list.test.js +112 -0
  32. package/dist/src/commands/extensions/list.test.js.map +1 -0
  33. package/dist/src/commands/extensions/new.js +2 -0
  34. package/dist/src/commands/extensions/new.js.map +1 -1
  35. package/dist/src/commands/extensions/new.test.js +3 -0
  36. package/dist/src/commands/extensions/new.test.js.map +1 -1
  37. package/dist/src/commands/extensions/uninstall.d.ts +1 -1
  38. package/dist/src/commands/extensions/uninstall.js +26 -9
  39. package/dist/src/commands/extensions/uninstall.js.map +1 -1
  40. package/dist/src/commands/extensions/uninstall.test.js +190 -9
  41. package/dist/src/commands/extensions/uninstall.test.js.map +1 -1
  42. package/dist/src/commands/extensions/update.js +2 -0
  43. package/dist/src/commands/extensions/update.js.map +1 -1
  44. package/dist/src/commands/extensions/update.test.d.ts +6 -0
  45. package/dist/src/commands/extensions/update.test.js +170 -0
  46. package/dist/src/commands/extensions/update.test.js.map +1 -0
  47. package/dist/src/commands/extensions/validate.js +2 -0
  48. package/dist/src/commands/extensions/validate.js.map +1 -1
  49. package/dist/src/commands/extensions/validate.test.js +3 -0
  50. package/dist/src/commands/extensions/validate.test.js.map +1 -1
  51. package/dist/src/commands/extensions.js +2 -0
  52. package/dist/src/commands/extensions.js.map +1 -1
  53. package/dist/src/commands/mcp/add.js +2 -0
  54. package/dist/src/commands/mcp/add.js.map +1 -1
  55. package/dist/src/commands/mcp/add.test.js +11 -3
  56. package/dist/src/commands/mcp/add.test.js.map +1 -1
  57. package/dist/src/commands/mcp/list.js +2 -0
  58. package/dist/src/commands/mcp/list.js.map +1 -1
  59. package/dist/src/commands/mcp/list.test.js +4 -6
  60. package/dist/src/commands/mcp/list.test.js.map +1 -1
  61. package/dist/src/commands/mcp/remove.js +2 -0
  62. package/dist/src/commands/mcp/remove.js.map +1 -1
  63. package/dist/src/commands/mcp/remove.test.js +26 -12
  64. package/dist/src/commands/mcp/remove.test.js.map +1 -1
  65. package/dist/src/commands/mcp.js +2 -0
  66. package/dist/src/commands/mcp.js.map +1 -1
  67. package/dist/src/commands/mcp.test.js +1 -0
  68. package/dist/src/commands/mcp.test.js.map +1 -1
  69. package/dist/src/commands/utils.d.ts +6 -0
  70. package/dist/src/commands/utils.js +11 -0
  71. package/dist/src/commands/utils.js.map +1 -0
  72. package/dist/src/config/config.d.ts +2 -1
  73. package/dist/src/config/config.js +36 -23
  74. package/dist/src/config/config.js.map +1 -1
  75. package/dist/src/config/config.test.js +69 -12
  76. package/dist/src/config/config.test.js.map +1 -1
  77. package/dist/src/config/extension.test.js +131 -125
  78. package/dist/src/config/extension.test.js.map +1 -1
  79. package/dist/src/config/keyBindings.d.ts +1 -1
  80. package/dist/src/config/keyBindings.js +4 -4
  81. package/dist/src/config/keyBindings.js.map +1 -1
  82. package/dist/src/config/settingsSchema.d.ts +12 -3
  83. package/dist/src/config/settingsSchema.js +13 -4
  84. package/dist/src/config/settingsSchema.js.map +1 -1
  85. package/dist/src/config/settingsSchema.test.js +1 -1
  86. package/dist/src/config/settingsSchema.test.js.map +1 -1
  87. package/dist/src/config/trustedFolders.d.ts +1 -1
  88. package/dist/src/config/trustedFolders.js +24 -17
  89. package/dist/src/config/trustedFolders.js.map +1 -1
  90. package/dist/src/gemini.d.ts +2 -1
  91. package/dist/src/gemini.js +73 -15
  92. package/dist/src/gemini.js.map +1 -1
  93. package/dist/src/gemini.test.js +56 -15
  94. package/dist/src/gemini.test.js.map +1 -1
  95. package/dist/src/generated/git-commit.d.ts +2 -2
  96. package/dist/src/generated/git-commit.js +2 -2
  97. package/dist/src/nonInteractiveCli.js +4 -1
  98. package/dist/src/nonInteractiveCli.js.map +1 -1
  99. package/dist/src/nonInteractiveCli.test.js +2 -2
  100. package/dist/src/nonInteractiveCli.test.js.map +1 -1
  101. package/dist/src/services/CommandService.test.js +3 -2
  102. package/dist/src/services/CommandService.test.js.map +1 -1
  103. package/dist/src/services/McpPromptLoader.js +5 -3
  104. package/dist/src/services/McpPromptLoader.js.map +1 -1
  105. package/dist/src/services/McpPromptLoader.test.js +29 -1
  106. package/dist/src/services/McpPromptLoader.test.js.map +1 -1
  107. package/dist/src/test-utils/render.d.ts +26 -2
  108. package/dist/src/test-utils/render.js +76 -3
  109. package/dist/src/test-utils/render.js.map +1 -1
  110. package/dist/src/ui/AppContainer.js +112 -42
  111. package/dist/src/ui/AppContainer.js.map +1 -1
  112. package/dist/src/ui/AppContainer.test.js +181 -103
  113. package/dist/src/ui/AppContainer.test.js.map +1 -1
  114. package/dist/src/ui/auth/AuthDialog.js +17 -10
  115. package/dist/src/ui/auth/AuthDialog.js.map +1 -1
  116. package/dist/src/ui/auth/AuthDialog.test.js +7 -4
  117. package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
  118. package/dist/src/ui/commands/aboutCommand.js +8 -1
  119. package/dist/src/ui/commands/aboutCommand.js.map +1 -1
  120. package/dist/src/ui/commands/aboutCommand.test.js +4 -0
  121. package/dist/src/ui/commands/aboutCommand.test.js.map +1 -1
  122. package/dist/src/ui/commands/clearCommand.js +12 -0
  123. package/dist/src/ui/commands/clearCommand.js.map +1 -1
  124. package/dist/src/ui/commands/clearCommand.test.js +5 -0
  125. package/dist/src/ui/commands/clearCommand.test.js.map +1 -1
  126. package/dist/src/ui/commands/directoryCommand.d.ts +0 -1
  127. package/dist/src/ui/commands/directoryCommand.js +104 -43
  128. package/dist/src/ui/commands/directoryCommand.js.map +1 -1
  129. package/dist/src/ui/commands/directoryCommand.test.js +91 -2
  130. package/dist/src/ui/commands/directoryCommand.test.js.map +1 -1
  131. package/dist/src/ui/commands/memoryCommand.js +1 -0
  132. package/dist/src/ui/commands/memoryCommand.js.map +1 -1
  133. package/dist/src/ui/commands/memoryCommand.test.js +3 -0
  134. package/dist/src/ui/commands/memoryCommand.test.js.map +1 -1
  135. package/dist/src/ui/commands/permissionsCommand.js +62 -5
  136. package/dist/src/ui/commands/permissionsCommand.js.map +1 -1
  137. package/dist/src/ui/commands/permissionsCommand.test.js +60 -4
  138. package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -1
  139. package/dist/src/ui/commands/setupGithubCommand.d.ts +1 -0
  140. package/dist/src/ui/commands/setupGithubCommand.js +82 -45
  141. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
  142. package/dist/src/ui/commands/setupGithubCommand.test.js +35 -5
  143. package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -1
  144. package/dist/src/ui/commands/types.d.ts +7 -1
  145. package/dist/src/ui/commands/types.js.map +1 -1
  146. package/dist/src/ui/components/AboutBox.d.ts +1 -0
  147. package/dist/src/ui/components/AboutBox.js +1 -1
  148. package/dist/src/ui/components/AboutBox.js.map +1 -1
  149. package/dist/src/ui/components/AppHeader.js +3 -22
  150. package/dist/src/ui/components/AppHeader.js.map +1 -1
  151. package/dist/src/ui/components/AppHeader.test.js +10 -4
  152. package/dist/src/ui/components/AppHeader.test.js.map +1 -1
  153. package/dist/src/ui/components/AsciiArt.d.ts +6 -6
  154. package/dist/src/ui/components/AsciiArt.js +16 -15
  155. package/dist/src/ui/components/AsciiArt.js.map +1 -1
  156. package/dist/src/ui/components/Banner.d.ts +4 -2
  157. package/dist/src/ui/components/Banner.js +18 -4
  158. package/dist/src/ui/components/Banner.js.map +1 -1
  159. package/dist/src/ui/components/DebugProfiler.d.ts +1 -0
  160. package/dist/src/ui/components/DebugProfiler.js +23 -34
  161. package/dist/src/ui/components/DebugProfiler.js.map +1 -1
  162. package/dist/src/ui/components/DebugProfiler.test.js +1 -0
  163. package/dist/src/ui/components/DebugProfiler.test.js.map +1 -1
  164. package/dist/src/ui/components/DialogManager.js +7 -2
  165. package/dist/src/ui/components/DialogManager.js.map +1 -1
  166. package/dist/src/ui/components/GradientRegression.test.js +22 -1
  167. package/dist/src/ui/components/GradientRegression.test.js.map +1 -1
  168. package/dist/src/ui/components/Header.test.js +27 -2
  169. package/dist/src/ui/components/Header.test.js.map +1 -1
  170. package/dist/src/ui/components/HistoryItemDisplay.js +2 -1
  171. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
  172. package/dist/src/ui/components/InputPrompt.js +29 -35
  173. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  174. package/dist/src/ui/components/InputPrompt.test.js +104 -24
  175. package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
  176. package/dist/src/ui/components/LoadingIndicator.js +6 -1
  177. package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
  178. package/dist/src/ui/components/ModelDialog.js +2 -2
  179. package/dist/src/ui/components/ModelDialog.js.map +1 -1
  180. package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +23 -0
  181. package/dist/src/ui/components/MultiFolderTrustDialog.js +90 -0
  182. package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -0
  183. package/dist/src/ui/components/MultiFolderTrustDialog.test.d.ts +6 -0
  184. package/dist/src/ui/components/MultiFolderTrustDialog.test.js +161 -0
  185. package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -0
  186. package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +5 -2
  187. package/dist/src/ui/components/PermissionsModifyTrustDialog.js +12 -7
  188. package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -1
  189. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +2 -2
  190. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -1
  191. package/dist/src/ui/components/ProQuotaDialog.js +2 -2
  192. package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
  193. package/dist/src/ui/components/SettingsDialog.d.ts +3 -1
  194. package/dist/src/ui/components/SettingsDialog.js +4 -1
  195. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  196. package/dist/src/ui/components/ThemedGradient.js +2 -1
  197. package/dist/src/ui/components/ThemedGradient.js.map +1 -1
  198. package/dist/src/ui/components/messages/ModelMessage.d.ts +11 -0
  199. package/dist/src/ui/components/messages/ModelMessage.js +5 -0
  200. package/dist/src/ui/components/messages/ModelMessage.js.map +1 -0
  201. package/dist/src/ui/components/messages/ShellToolMessage.d.ts +14 -0
  202. package/dist/src/ui/components/messages/ShellToolMessage.js +76 -0
  203. package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -0
  204. package/dist/src/ui/components/messages/ShellToolMessage.test.d.ts +6 -0
  205. package/dist/src/ui/components/messages/ShellToolMessage.test.js +123 -0
  206. package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -0
  207. package/dist/src/ui/components/messages/ToolGroupMessage.js +19 -1
  208. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  209. package/dist/src/ui/components/messages/ToolMessage.d.ts +6 -4
  210. package/dist/src/ui/components/messages/ToolMessage.js +15 -102
  211. package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
  212. package/dist/src/ui/components/messages/ToolMessage.test.js +13 -5
  213. package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
  214. package/dist/src/ui/components/messages/ToolResultDisplay.d.ts +13 -0
  215. package/dist/src/ui/components/messages/ToolResultDisplay.js +54 -0
  216. package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -0
  217. package/dist/src/ui/components/messages/ToolShared.d.ts +23 -0
  218. package/dist/src/ui/components/messages/ToolShared.js +40 -0
  219. package/dist/src/ui/components/messages/ToolShared.js.map +1 -0
  220. package/dist/src/ui/components/shared/text-buffer.d.ts +1 -0
  221. package/dist/src/ui/components/shared/text-buffer.js +7 -1
  222. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  223. package/dist/src/ui/constants/tips.d.ts +6 -0
  224. package/dist/src/ui/constants/tips.js +168 -0
  225. package/dist/src/ui/constants/tips.js.map +1 -0
  226. package/dist/src/ui/constants/wittyPhrases.d.ts +6 -0
  227. package/dist/src/ui/constants/wittyPhrases.js +137 -0
  228. package/dist/src/ui/constants/wittyPhrases.js.map +1 -0
  229. package/dist/src/ui/constants.d.ts +1 -0
  230. package/dist/src/ui/constants.js +1 -0
  231. package/dist/src/ui/constants.js.map +1 -1
  232. package/dist/src/ui/contexts/KeypressContext.js +21 -11
  233. package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
  234. package/dist/src/ui/contexts/KeypressContext.test.js +29 -10
  235. package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
  236. package/dist/src/ui/contexts/UIActionsContext.d.ts +3 -0
  237. package/dist/src/ui/contexts/UIActionsContext.js +1 -0
  238. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
  239. package/dist/src/ui/contexts/UIStateContext.d.ts +4 -0
  240. package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
  241. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +1 -0
  242. package/dist/src/ui/hooks/shellCommandProcessor.js +11 -5
  243. package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
  244. package/dist/src/ui/hooks/shellCommandProcessor.test.js +4 -3
  245. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
  246. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +5 -3
  247. package/dist/src/ui/hooks/slashCommandProcessor.js +14 -5
  248. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  249. package/dist/src/ui/hooks/slashCommandProcessor.test.js +1 -0
  250. package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
  251. package/dist/src/ui/hooks/useAlternateBuffer.js +1 -1
  252. package/dist/src/ui/hooks/useAlternateBuffer.js.map +1 -1
  253. package/dist/src/ui/hooks/useBanner.d.ts +14 -0
  254. package/dist/src/ui/hooks/useBanner.js +48 -0
  255. package/dist/src/ui/hooks/useBanner.js.map +1 -0
  256. package/dist/src/ui/hooks/useBanner.test.d.ts +6 -0
  257. package/dist/src/ui/hooks/useBanner.test.js +92 -0
  258. package/dist/src/ui/hooks/useBanner.test.js.map +1 -0
  259. package/dist/src/ui/hooks/useBracketedPaste.js +3 -2
  260. package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -1
  261. package/dist/src/ui/hooks/useCommandCompletion.test.js +5 -5
  262. package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -1
  263. package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -1
  264. package/dist/src/ui/hooks/useConsoleMessages.js +26 -1
  265. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
  266. package/dist/src/ui/hooks/useConsoleMessages.test.js +37 -5
  267. package/dist/src/ui/hooks/useConsoleMessages.test.js.map +1 -1
  268. package/dist/src/ui/hooks/useEditorSettings.d.ts +2 -2
  269. package/dist/src/ui/hooks/useEditorSettings.js.map +1 -1
  270. package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -1
  271. package/dist/src/ui/hooks/useFolderTrust.js +11 -1
  272. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
  273. package/dist/src/ui/hooks/useFolderTrust.test.js +22 -0
  274. package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -1
  275. package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -1
  276. package/dist/src/ui/hooks/useGeminiStream.js +69 -12
  277. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  278. package/dist/src/ui/hooks/useGeminiStream.test.js +20 -21
  279. package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
  280. package/dist/src/ui/hooks/useHistoryManager.d.ts +5 -2
  281. package/dist/src/ui/hooks/useHistoryManager.js +39 -3
  282. package/dist/src/ui/hooks/useHistoryManager.js.map +1 -1
  283. package/dist/src/ui/hooks/useInactivityTimer.d.ts +14 -0
  284. package/dist/src/ui/hooks/useInactivityTimer.js +30 -0
  285. package/dist/src/ui/hooks/useInactivityTimer.js.map +1 -0
  286. package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +8 -0
  287. package/dist/src/ui/hooks/useIncludeDirsTrust.js +119 -0
  288. package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -0
  289. package/dist/src/ui/hooks/useIncludeDirsTrust.test.d.ts +6 -0
  290. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +151 -0
  291. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -0
  292. package/dist/src/ui/hooks/useInputHistoryStore.test.js +4 -1
  293. package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -1
  294. package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +0 -1
  295. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +1 -2
  296. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -1
  297. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +1 -1
  298. package/dist/src/ui/hooks/useLoadingIndicator.js +2 -2
  299. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
  300. package/dist/src/ui/hooks/useLoadingIndicator.test.js +21 -9
  301. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
  302. package/dist/src/ui/hooks/useMouseClick.d.ts +12 -0
  303. package/dist/src/ui/hooks/useMouseClick.js +28 -0
  304. package/dist/src/ui/hooks/useMouseClick.js.map +1 -0
  305. package/dist/src/ui/hooks/useMouseClick.test.d.ts +6 -0
  306. package/dist/src/ui/hooks/useMouseClick.test.js +59 -0
  307. package/dist/src/ui/hooks/useMouseClick.test.js.map +1 -0
  308. package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +2 -2
  309. package/dist/src/ui/hooks/usePermissionsModifyTrust.js +44 -7
  310. package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -1
  311. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +191 -89
  312. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -1
  313. package/dist/src/ui/hooks/usePhraseCycler.d.ts +4 -3
  314. package/dist/src/ui/hooks/usePhraseCycler.js +54 -305
  315. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  316. package/dist/src/ui/hooks/usePhraseCycler.test.js +109 -30
  317. package/dist/src/ui/hooks/usePhraseCycler.test.js.map +1 -1
  318. package/dist/src/ui/hooks/useQuotaAndFallback.js +9 -3
  319. package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
  320. package/dist/src/ui/hooks/useQuotaAndFallback.test.js +25 -3
  321. package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -1
  322. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +3 -2
  323. package/dist/src/ui/hooks/useReactToolScheduler.js +4 -8
  324. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
  325. package/dist/src/ui/hooks/useReactToolScheduler.test.js +1 -8
  326. package/dist/src/ui/hooks/useReactToolScheduler.test.js.map +1 -1
  327. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +18 -12
  328. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -1
  329. package/dist/src/ui/hooks/useSessionBrowser.js +13 -4
  330. package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
  331. package/dist/src/ui/hooks/useSessionBrowser.test.js +37 -0
  332. package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -1
  333. package/dist/src/ui/hooks/useSessionResume.js +1 -1
  334. package/dist/src/ui/hooks/useSessionResume.js.map +1 -1
  335. package/dist/src/ui/hooks/useSessionResume.test.js +4 -4
  336. package/dist/src/ui/hooks/useSessionResume.test.js.map +1 -1
  337. package/dist/src/ui/hooks/useThemeCommand.d.ts +2 -2
  338. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
  339. package/dist/src/ui/hooks/useToolScheduler.test.js +2 -2
  340. package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
  341. package/dist/src/ui/keyMatchers.test.js +2 -2
  342. package/dist/src/ui/keyMatchers.test.js.map +1 -1
  343. package/dist/src/ui/layouts/DefaultAppLayout.js +1 -1
  344. package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -1
  345. package/dist/src/ui/noninteractive/nonInteractiveUi.js +1 -0
  346. package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -1
  347. package/dist/src/ui/themes/theme-manager.test.js +2 -1
  348. package/dist/src/ui/themes/theme-manager.test.js.map +1 -1
  349. package/dist/src/ui/types.d.ts +7 -1
  350. package/dist/src/ui/types.js.map +1 -1
  351. package/dist/src/ui/utils/ConsolePatcher.js +6 -9
  352. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
  353. package/dist/src/ui/utils/commandUtils.js +3 -86
  354. package/dist/src/ui/utils/commandUtils.js.map +1 -1
  355. package/dist/src/ui/utils/commandUtils.test.js +21 -273
  356. package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
  357. package/dist/src/ui/utils/directoryUtils.d.ts +6 -0
  358. package/dist/src/ui/utils/directoryUtils.js +21 -0
  359. package/dist/src/ui/utils/directoryUtils.js.map +1 -0
  360. package/dist/src/ui/utils/directoryUtils.test.d.ts +6 -0
  361. package/dist/src/ui/utils/directoryUtils.test.js +52 -0
  362. package/dist/src/ui/utils/directoryUtils.test.js.map +1 -0
  363. package/dist/src/ui/utils/kittyProtocolDetector.d.ts +6 -2
  364. package/dist/src/ui/utils/kittyProtocolDetector.js +47 -43
  365. package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -1
  366. package/dist/src/ui/utils/mouse.d.ts +2 -2
  367. package/dist/src/ui/utils/mouse.js +2 -11
  368. package/dist/src/ui/utils/mouse.js.map +1 -1
  369. package/dist/src/utils/cleanup.d.ts +2 -0
  370. package/dist/src/utils/cleanup.js +16 -0
  371. package/dist/src/utils/cleanup.js.map +1 -1
  372. package/dist/src/utils/errors.js +10 -0
  373. package/dist/src/utils/errors.js.map +1 -1
  374. package/dist/src/utils/events.d.ts +0 -2
  375. package/dist/src/utils/events.js +0 -1
  376. package/dist/src/utils/events.js.map +1 -1
  377. package/dist/src/utils/installationInfo.test.js +8 -9
  378. package/dist/src/utils/installationInfo.test.js.map +1 -1
  379. package/dist/src/utils/persistentState.d.ts +1 -1
  380. package/dist/src/utils/sessionCleanup.test.js +4 -2
  381. package/dist/src/utils/sessionCleanup.test.js.map +1 -1
  382. package/dist/src/utils/sessionUtils.d.ts +5 -0
  383. package/dist/src/utils/sessionUtils.js +6 -1
  384. package/dist/src/utils/sessionUtils.js.map +1 -1
  385. package/dist/src/utils/sessions.test.d.ts +6 -0
  386. package/dist/src/utils/sessions.test.js +516 -0
  387. package/dist/src/utils/sessions.test.js.map +1 -0
  388. package/dist/src/validateNonInterActiveAuth.js +2 -0
  389. package/dist/src/validateNonInterActiveAuth.js.map +1 -1
  390. package/dist/src/zed-integration/acp.d.ts +2 -24
  391. package/dist/src/zed-integration/acp.js +2 -156
  392. package/dist/src/zed-integration/acp.js.map +1 -1
  393. package/dist/src/zed-integration/acp.test.d.ts +6 -0
  394. package/dist/src/zed-integration/acp.test.js +227 -0
  395. package/dist/src/zed-integration/acp.test.js.map +1 -0
  396. package/dist/src/zed-integration/connection.d.ts +28 -0
  397. package/dist/src/zed-integration/connection.js +163 -0
  398. package/dist/src/zed-integration/connection.js.map +1 -0
  399. package/dist/src/zed-integration/schema.d.ts +69 -13
  400. package/dist/src/zed-integration/schema.js +6 -5
  401. package/dist/src/zed-integration/schema.js.map +1 -1
  402. package/dist/src/zed-integration/zedIntegration.d.ts +0 -7
  403. package/dist/src/zed-integration/zedIntegration.js +9 -21
  404. package/dist/src/zed-integration/zedIntegration.js.map +1 -1
  405. package/dist/tsconfig.tsbuildinfo +1 -1
  406. package/package.json +8 -7
@@ -16,6 +16,7 @@ import { useShellHistory } from '../hooks/useShellHistory.js';
16
16
  import { useCommandCompletion } from '../hooks/useCommandCompletion.js';
17
17
  import { useInputHistory } from '../hooks/useInputHistory.js';
18
18
  import { useReverseSearchCompletion } from '../hooks/useReverseSearchCompletion.js';
19
+ import clipboardy from 'clipboardy';
19
20
  import * as clipboardUtils from '../utils/clipboardUtils.js';
20
21
  import { useKittyKeyboardProtocol } from '../hooks/useKittyKeyboardProtocol.js';
21
22
  import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
@@ -26,6 +27,7 @@ vi.mock('../hooks/useShellHistory.js');
26
27
  vi.mock('../hooks/useCommandCompletion.js');
27
28
  vi.mock('../hooks/useInputHistory.js');
28
29
  vi.mock('../hooks/useReverseSearchCompletion.js');
30
+ vi.mock('clipboardy');
29
31
  vi.mock('../utils/clipboardUtils.js');
30
32
  vi.mock('../hooks/useKittyKeyboardProtocol.js');
31
33
  const mockSlashCommands = [
@@ -88,6 +90,10 @@ describe('InputPrompt', () => {
88
90
  const mockedUseInputHistory = vi.mocked(useInputHistory);
89
91
  const mockedUseReverseSearchCompletion = vi.mocked(useReverseSearchCompletion);
90
92
  const mockedUseKittyKeyboardProtocol = vi.mocked(useKittyKeyboardProtocol);
93
+ const mockSetEmbeddedShellFocused = vi.fn();
94
+ const uiActions = {
95
+ setEmbeddedShellFocused: mockSetEmbeddedShellFocused,
96
+ };
91
97
  beforeEach(() => {
92
98
  vi.resetAllMocks();
93
99
  mockCommandContext = createMockCommandContext();
@@ -129,6 +135,7 @@ describe('InputPrompt', () => {
129
135
  deleteWordLeft: vi.fn(),
130
136
  deleteWordRight: vi.fn(),
131
137
  visualToLogicalMap: [[0, 0]],
138
+ getOffset: vi.fn().mockReturnValue(0),
132
139
  };
133
140
  mockShellHistory = {
134
141
  history: [],
@@ -180,7 +187,6 @@ describe('InputPrompt', () => {
180
187
  };
181
188
  mockedUseReverseSearchCompletion.mockReturnValue(mockReverseSearchCompletion);
182
189
  mockedUseKittyKeyboardProtocol.mockReturnValue({
183
- supported: false,
184
190
  enabled: false,
185
191
  checking: false,
186
192
  });
@@ -212,7 +218,9 @@ describe('InputPrompt', () => {
212
218
  });
213
219
  it('should call shellHistory.getPreviousCommand on up arrow in shell mode', async () => {
214
220
  props.shellModeActive = true;
215
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
221
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
222
+ uiActions,
223
+ });
216
224
  await act(async () => {
217
225
  stdin.write('\u001B[A');
218
226
  });
@@ -221,7 +229,9 @@ describe('InputPrompt', () => {
221
229
  });
222
230
  it('should call shellHistory.getNextCommand on down arrow in shell mode', async () => {
223
231
  props.shellModeActive = true;
224
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
232
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
233
+ uiActions,
234
+ });
225
235
  await act(async () => {
226
236
  stdin.write('\u001B[B');
227
237
  await waitFor(() => expect(mockShellHistory.getNextCommand).toHaveBeenCalled());
@@ -231,7 +241,9 @@ describe('InputPrompt', () => {
231
241
  it('should set the buffer text when a shell history command is retrieved', async () => {
232
242
  props.shellModeActive = true;
233
243
  vi.mocked(mockShellHistory.getPreviousCommand).mockReturnValue('previous command');
234
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
244
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
245
+ uiActions,
246
+ });
235
247
  await act(async () => {
236
248
  stdin.write('\u001B[A');
237
249
  });
@@ -244,7 +256,9 @@ describe('InputPrompt', () => {
244
256
  it('should call shellHistory.addCommandToHistory on submit in shell mode', async () => {
245
257
  props.shellModeActive = true;
246
258
  props.buffer.setText('ls -l');
247
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
259
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
260
+ uiActions,
261
+ });
248
262
  await act(async () => {
249
263
  stdin.write('\r');
250
264
  });
@@ -256,7 +270,9 @@ describe('InputPrompt', () => {
256
270
  });
257
271
  it('should NOT call shell history methods when not in shell mode', async () => {
258
272
  props.buffer.setText('some text');
259
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
273
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
274
+ uiActions,
275
+ });
260
276
  await act(async () => {
261
277
  stdin.write('\u001B[A'); // Up arrow
262
278
  });
@@ -284,7 +300,9 @@ describe('InputPrompt', () => {
284
300
  ],
285
301
  });
286
302
  props.buffer.setText('/mem');
287
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
303
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
304
+ uiActions,
305
+ });
288
306
  // Test up arrow
289
307
  await act(async () => {
290
308
  stdin.write('\u001B[A'); // Up arrow
@@ -307,7 +325,9 @@ describe('InputPrompt', () => {
307
325
  ],
308
326
  });
309
327
  props.buffer.setText('/mem');
310
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
328
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
329
+ uiActions,
330
+ });
311
331
  // Test down arrow
312
332
  await act(async () => {
313
333
  stdin.write('\u001B[B'); // Down arrow
@@ -326,7 +346,9 @@ describe('InputPrompt', () => {
326
346
  showSuggestions: false,
327
347
  });
328
348
  props.buffer.setText('some text');
329
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
349
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
350
+ uiActions,
351
+ });
330
352
  await act(async () => {
331
353
  stdin.write('\u001B[A'); // Up arrow
332
354
  });
@@ -402,6 +424,7 @@ describe('InputPrompt', () => {
402
424
  // Set initial text and cursor position
403
425
  mockBuffer.text = 'Hello world';
404
426
  mockBuffer.cursor = [0, 5]; // Cursor after "Hello"
427
+ vi.mocked(mockBuffer.getOffset).mockReturnValue(5);
405
428
  mockBuffer.lines = ['Hello world'];
406
429
  mockBuffer.replaceRangeByOffset = vi.fn();
407
430
  const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
@@ -437,6 +460,22 @@ describe('InputPrompt', () => {
437
460
  unmount();
438
461
  });
439
462
  });
463
+ describe('clipboard text paste', () => {
464
+ it('should insert text from clipboard on Ctrl+V', async () => {
465
+ vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(false);
466
+ vi.mocked(clipboardy.read).mockResolvedValue('pasted text');
467
+ vi.mocked(mockBuffer.replaceRangeByOffset).mockClear();
468
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
469
+ await act(async () => {
470
+ stdin.write('\x16'); // Ctrl+V
471
+ });
472
+ await waitFor(() => {
473
+ expect(clipboardy.read).toHaveBeenCalled();
474
+ expect(mockBuffer.replaceRangeByOffset).toHaveBeenCalledWith(expect.any(Number), expect.any(Number), 'pasted text');
475
+ });
476
+ unmount();
477
+ });
478
+ });
440
479
  it.each([
441
480
  {
442
481
  name: 'should complete a partial parent command',
@@ -476,7 +515,9 @@ describe('InputPrompt', () => {
476
515
  activeSuggestionIndex: activeIndex,
477
516
  });
478
517
  props.buffer.setText(bufferText);
479
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
518
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
519
+ uiActions,
520
+ });
480
521
  await act(async () => stdin.write('\t'));
481
522
  await waitFor(() => expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(activeIndex));
482
523
  unmount();
@@ -489,7 +530,9 @@ describe('InputPrompt', () => {
489
530
  activeSuggestionIndex: 0,
490
531
  });
491
532
  props.buffer.setText('/mem');
492
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
533
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
534
+ uiActions,
535
+ });
493
536
  await act(async () => {
494
537
  stdin.write('\r');
495
538
  });
@@ -516,7 +559,9 @@ describe('InputPrompt', () => {
516
559
  activeSuggestionIndex: 0,
517
560
  });
518
561
  props.buffer.setText('/?');
519
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
562
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
563
+ uiActions,
564
+ });
520
565
  await act(async () => {
521
566
  stdin.write('\t'); // Press Tab for autocomplete
522
567
  });
@@ -525,7 +570,9 @@ describe('InputPrompt', () => {
525
570
  });
526
571
  it('should not submit on Enter when the buffer is empty or only contains whitespace', async () => {
527
572
  props.buffer.setText(' '); // Set buffer to whitespace
528
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
573
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
574
+ uiActions,
575
+ });
529
576
  await act(async () => {
530
577
  stdin.write('\r'); // Press Enter
531
578
  });
@@ -541,7 +588,9 @@ describe('InputPrompt', () => {
541
588
  isPerfectMatch: true,
542
589
  });
543
590
  props.buffer.setText('/clear');
544
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
591
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
592
+ uiActions,
593
+ });
545
594
  await act(async () => {
546
595
  stdin.write('\r');
547
596
  });
@@ -555,7 +604,9 @@ describe('InputPrompt', () => {
555
604
  isPerfectMatch: false, // Added explicit isPerfectMatch false
556
605
  });
557
606
  props.buffer.setText('/clear');
558
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
607
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
608
+ uiActions,
609
+ });
559
610
  await act(async () => {
560
611
  stdin.write('\r');
561
612
  });
@@ -570,7 +621,9 @@ describe('InputPrompt', () => {
570
621
  activeSuggestionIndex: 0,
571
622
  });
572
623
  props.buffer.setText('@src/components/');
573
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
624
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
625
+ uiActions,
626
+ });
574
627
  await act(async () => {
575
628
  stdin.write('\r');
576
629
  });
@@ -583,7 +636,9 @@ describe('InputPrompt', () => {
583
636
  mockBuffer.text = 'first line\\';
584
637
  mockBuffer.cursor = [0, 11];
585
638
  mockBuffer.lines = ['first line\\'];
586
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
639
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
640
+ uiActions,
641
+ });
587
642
  await act(async () => {
588
643
  stdin.write('\r');
589
644
  });
@@ -598,7 +653,9 @@ describe('InputPrompt', () => {
598
653
  await act(async () => {
599
654
  props.buffer.setText('some text to clear');
600
655
  });
601
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
656
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
657
+ uiActions,
658
+ });
602
659
  await act(async () => {
603
660
  stdin.write('\x03'); // Ctrl+C character
604
661
  });
@@ -611,7 +668,9 @@ describe('InputPrompt', () => {
611
668
  });
612
669
  it('should NOT clear the buffer on Ctrl+C if it is empty', async () => {
613
670
  props.buffer.text = '';
614
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
671
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
672
+ uiActions,
673
+ });
615
674
  await act(async () => {
616
675
  stdin.write('\x03'); // Ctrl+C character
617
676
  });
@@ -621,7 +680,9 @@ describe('InputPrompt', () => {
621
680
  unmount();
622
681
  });
623
682
  it('should call setBannerVisible(false) when clear screen key is pressed', async () => {
624
- const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
683
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
684
+ uiActions,
685
+ });
625
686
  await act(async () => {
626
687
  stdin.write('\x0C'); // Ctrl+L
627
688
  });
@@ -721,7 +782,9 @@ describe('InputPrompt', () => {
721
782
  ? [{ label: 'suggestion', value: 'suggestion' }]
722
783
  : [],
723
784
  });
724
- const { unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
785
+ const { unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
786
+ uiActions,
787
+ });
725
788
  await waitFor(() => {
726
789
  expect(mockedUseCommandCompletion).toHaveBeenCalledWith(mockBuffer, ['/test/project/src'], path.join('test', 'project', 'src'), mockSlashCommands, mockCommandContext, false, false, expect.any(Object));
727
790
  });
@@ -982,7 +1045,6 @@ describe('InputPrompt', () => {
982
1045
  beforeEach(() => {
983
1046
  vi.useFakeTimers();
984
1047
  mockedUseKittyKeyboardProtocol.mockReturnValue({
985
- supported: false,
986
1048
  enabled: false,
987
1049
  checking: false,
988
1050
  });
@@ -1047,7 +1109,6 @@ describe('InputPrompt', () => {
1047
1109
  {
1048
1110
  name: 'kitty',
1049
1111
  setup: () => mockedUseKittyKeyboardProtocol.mockReturnValue({
1050
- supported: true,
1051
1112
  enabled: true,
1052
1113
  checking: false,
1053
1114
  }),
@@ -1540,7 +1601,7 @@ describe('InputPrompt', () => {
1540
1601
  ];
1541
1602
  props.buffer.visualCursor = [0, 11];
1542
1603
  props.buffer.visualScrollRow = 0;
1543
- const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true });
1604
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true, uiActions });
1544
1605
  // Wait for initial render
1545
1606
  await waitFor(() => {
1546
1607
  expect(stdout.lastFrame()).toContain('hello world');
@@ -1555,6 +1616,25 @@ describe('InputPrompt', () => {
1555
1616
  });
1556
1617
  unmount();
1557
1618
  });
1619
+ it('should unfocus embedded shell on click', async () => {
1620
+ props.buffer.text = 'hello';
1621
+ props.buffer.lines = ['hello'];
1622
+ props.buffer.viewportVisualLines = ['hello'];
1623
+ props.buffer.visualToLogicalMap = [[0, 0]];
1624
+ props.isEmbeddedShellFocused = true;
1625
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true, uiActions });
1626
+ await waitFor(() => {
1627
+ expect(stdout.lastFrame()).toContain('hello');
1628
+ });
1629
+ await act(async () => {
1630
+ // Click somewhere in the prompt
1631
+ stdin.write(`\x1b[<0;5;2M`);
1632
+ });
1633
+ await waitFor(() => {
1634
+ expect(mockSetEmbeddedShellFocused).toHaveBeenCalledWith(false);
1635
+ });
1636
+ unmount();
1637
+ });
1558
1638
  });
1559
1639
  describe('queued message editing', () => {
1560
1640
  it('should load all queued messages when up arrow is pressed with empty input', async () => {