mpd-llm-cli 0.1.24 → 0.1.25

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 (468) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +203 -0
  3. package/README.zh-CN.md +206 -0
  4. package/bundle/api.cjs +166773 -0
  5. package/bundle/api.js +166768 -0
  6. package/bundle/gemini.js +281183 -0
  7. package/package.json +79 -66
  8. package/dist/.last_build +0 -0
  9. package/dist/index.d.ts +0 -7
  10. package/dist/index.js +0 -20
  11. package/dist/index.js.map +0 -1
  12. package/dist/package.json +0 -83
  13. package/dist/src/api/index.d.ts +0 -17
  14. package/dist/src/api/index.js +0 -192
  15. package/dist/src/api/index.js.map +0 -1
  16. package/dist/src/api/types.d.ts +0 -32
  17. package/dist/src/api/types.js +0 -2
  18. package/dist/src/api/types.js.map +0 -1
  19. package/dist/src/api/util.d.ts +0 -4
  20. package/dist/src/api/util.js +0 -67
  21. package/dist/src/api/util.js.map +0 -1
  22. package/dist/src/config/auth.d.ts +0 -6
  23. package/dist/src/config/auth.js +0 -42
  24. package/dist/src/config/auth.js.map +0 -1
  25. package/dist/src/config/config.d.ts +0 -13
  26. package/dist/src/config/config.js +0 -248
  27. package/dist/src/config/config.js.map +0 -1
  28. package/dist/src/config/extension.d.ts +0 -21
  29. package/dist/src/config/extension.js +0 -109
  30. package/dist/src/config/extension.js.map +0 -1
  31. package/dist/src/config/mpdaiConfig.d.ts +0 -28
  32. package/dist/src/config/mpdaiConfig.js +0 -84
  33. package/dist/src/config/mpdaiConfig.js.map +0 -1
  34. package/dist/src/config/sandboxConfig.d.ts +0 -13
  35. package/dist/src/config/sandboxConfig.js +0 -75
  36. package/dist/src/config/sandboxConfig.js.map +0 -1
  37. package/dist/src/config/settings.d.ts +0 -72
  38. package/dist/src/config/settings.js +0 -227
  39. package/dist/src/config/settings.js.map +0 -1
  40. package/dist/src/config/startup.d.ts +0 -21
  41. package/dist/src/config/startup.js +0 -118
  42. package/dist/src/config/startup.js.map +0 -1
  43. package/dist/src/gemini.d.ts +0 -6
  44. package/dist/src/gemini.js +0 -300
  45. package/dist/src/gemini.js.map +0 -1
  46. package/dist/src/generated/git-commit.d.ts +0 -6
  47. package/dist/src/generated/git-commit.js +0 -9
  48. package/dist/src/generated/git-commit.js.map +0 -1
  49. package/dist/src/nonInteractiveCli.d.ts +0 -7
  50. package/dist/src/nonInteractiveCli.js +0 -115
  51. package/dist/src/nonInteractiveCli.js.map +0 -1
  52. package/dist/src/services/AuthService.d.ts +0 -110
  53. package/dist/src/services/AuthService.js +0 -258
  54. package/dist/src/services/AuthService.js.map +0 -1
  55. package/dist/src/services/CommandService.d.ts +0 -13
  56. package/dist/src/services/CommandService.js +0 -34
  57. package/dist/src/services/CommandService.js.map +0 -1
  58. package/dist/src/services/EnvConfigManager.d.ts +0 -34
  59. package/dist/src/services/EnvConfigManager.js +0 -141
  60. package/dist/src/services/EnvConfigManager.js.map +0 -1
  61. package/dist/src/services/README.md +0 -114
  62. package/dist/src/services/debug-auth.d.ts +0 -10
  63. package/dist/src/services/debug-auth.js +0 -104
  64. package/dist/src/services/debug-auth.js.map +0 -1
  65. package/dist/src/services/demo.d.ts +0 -10
  66. package/dist/src/services/demo.js +0 -96
  67. package/dist/src/services/demo.js.map +0 -1
  68. package/dist/src/services/test-auth.d.ts +0 -10
  69. package/dist/src/services/test-auth.js +0 -104
  70. package/dist/src/services/test-auth.js.map +0 -1
  71. package/dist/src/services/test-readline.d.ts +0 -6
  72. package/dist/src/services/test-readline.js +0 -32
  73. package/dist/src/services/test-readline.js.map +0 -1
  74. package/dist/src/telemetry/README.md +0 -135
  75. package/dist/src/telemetry/costCalculator.d.ts +0 -401
  76. package/dist/src/telemetry/costCalculator.js +0 -555
  77. package/dist/src/telemetry/costCalculator.js.map +0 -1
  78. package/dist/src/telemetry/dataCollector.d.ts +0 -83
  79. package/dist/src/telemetry/dataCollector.js +0 -392
  80. package/dist/src/telemetry/dataCollector.js.map +0 -1
  81. package/dist/src/telemetry/langfuseClient.d.ts +0 -96
  82. package/dist/src/telemetry/langfuseClient.js +0 -485
  83. package/dist/src/telemetry/langfuseClient.js.map +0 -1
  84. package/dist/src/telemetry/langfuseConfig.d.ts +0 -21
  85. package/dist/src/telemetry/langfuseConfig.js +0 -64
  86. package/dist/src/telemetry/langfuseConfig.js.map +0 -1
  87. package/dist/src/telemetry/langfuseIntegration.d.ts +0 -66
  88. package/dist/src/telemetry/langfuseIntegration.js +0 -238
  89. package/dist/src/telemetry/langfuseIntegration.js.map +0 -1
  90. package/dist/src/telemetry/toolExecutionInterceptor.d.ts +0 -29
  91. package/dist/src/telemetry/toolExecutionInterceptor.js +0 -122
  92. package/dist/src/telemetry/toolExecutionInterceptor.js.map +0 -1
  93. package/dist/src/ui/App.d.ts +0 -14
  94. package/dist/src/ui/App.js +0 -466
  95. package/dist/src/ui/App.js.map +0 -1
  96. package/dist/src/ui/colors.d.ts +0 -7
  97. package/dist/src/ui/colors.js +0 -48
  98. package/dist/src/ui/colors.js.map +0 -1
  99. package/dist/src/ui/commands/clearCommand.d.ts +0 -7
  100. package/dist/src/ui/commands/clearCommand.js +0 -15
  101. package/dist/src/ui/commands/clearCommand.js.map +0 -1
  102. package/dist/src/ui/commands/helpCommand.d.ts +0 -7
  103. package/dist/src/ui/commands/helpCommand.js +0 -18
  104. package/dist/src/ui/commands/helpCommand.js.map +0 -1
  105. package/dist/src/ui/commands/logoutCommand.d.ts +0 -7
  106. package/dist/src/ui/commands/logoutCommand.js +0 -77
  107. package/dist/src/ui/commands/logoutCommand.js.map +0 -1
  108. package/dist/src/ui/commands/memoryCommand.d.ts +0 -7
  109. package/dist/src/ui/commands/memoryCommand.js +0 -81
  110. package/dist/src/ui/commands/memoryCommand.js.map +0 -1
  111. package/dist/src/ui/commands/modelCommand.d.ts +0 -14
  112. package/dist/src/ui/commands/modelCommand.js +0 -58
  113. package/dist/src/ui/commands/modelCommand.js.map +0 -1
  114. package/dist/src/ui/commands/types.d.ts +0 -63
  115. package/dist/src/ui/commands/types.js +0 -7
  116. package/dist/src/ui/commands/types.js.map +0 -1
  117. package/dist/src/ui/components/AboutBox.d.ts +0 -16
  118. package/dist/src/ui/components/AboutBox.js +0 -6
  119. package/dist/src/ui/components/AboutBox.js.map +0 -1
  120. package/dist/src/ui/components/AsciiArt.d.ts +0 -7
  121. package/dist/src/ui/components/AsciiArt.js +0 -25
  122. package/dist/src/ui/components/AsciiArt.js.map +0 -1
  123. package/dist/src/ui/components/AuthDialog.d.ts +0 -15
  124. package/dist/src/ui/components/AuthDialog.js +0 -75
  125. package/dist/src/ui/components/AuthDialog.js.map +0 -1
  126. package/dist/src/ui/components/AuthInProgress.d.ts +0 -11
  127. package/dist/src/ui/components/AuthInProgress.js +0 -27
  128. package/dist/src/ui/components/AuthInProgress.js.map +0 -1
  129. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +0 -12
  130. package/dist/src/ui/components/AutoAcceptIndicator.js +0 -26
  131. package/dist/src/ui/components/AutoAcceptIndicator.js.map +0 -1
  132. package/dist/src/ui/components/ConsolePatcher.d.ts +0 -12
  133. package/dist/src/ui/components/ConsolePatcher.js +0 -38
  134. package/dist/src/ui/components/ConsolePatcher.js.map +0 -1
  135. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +0 -11
  136. package/dist/src/ui/components/ConsoleSummaryDisplay.js +0 -11
  137. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +0 -1
  138. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +0 -15
  139. package/dist/src/ui/components/ContextSummaryDisplay.js +0 -41
  140. package/dist/src/ui/components/ContextSummaryDisplay.js.map +0 -1
  141. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +0 -14
  142. package/dist/src/ui/components/DetailedMessagesDisplay.js +0 -34
  143. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +0 -1
  144. package/dist/src/ui/components/EditorSettingsDialog.d.ts +0 -15
  145. package/dist/src/ui/components/EditorSettingsDialog.js +0 -73
  146. package/dist/src/ui/components/EditorSettingsDialog.js.map +0 -1
  147. package/dist/src/ui/components/Footer.d.ts +0 -20
  148. package/dist/src/ui/components/Footer.js +0 -19
  149. package/dist/src/ui/components/Footer.js.map +0 -1
  150. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +0 -17
  151. package/dist/src/ui/components/GeminiRespondingSpinner.js +0 -16
  152. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +0 -1
  153. package/dist/src/ui/components/Header.d.ts +0 -12
  154. package/dist/src/ui/components/Header.js +0 -20
  155. package/dist/src/ui/components/Header.js.map +0 -1
  156. package/dist/src/ui/components/Help.d.ts +0 -12
  157. package/dist/src/ui/components/Help.js +0 -10
  158. package/dist/src/ui/components/Help.js.map +0 -1
  159. package/dist/src/ui/components/HistoryItemDisplay.d.ts +0 -18
  160. package/dist/src/ui/components/HistoryItemDisplay.js +0 -17
  161. package/dist/src/ui/components/HistoryItemDisplay.js.map +0 -1
  162. package/dist/src/ui/components/InputPrompt.d.ts +0 -25
  163. package/dist/src/ui/components/InputPrompt.js +0 -280
  164. package/dist/src/ui/components/InputPrompt.js.map +0 -1
  165. package/dist/src/ui/components/LoadingIndicator.d.ts +0 -15
  166. package/dist/src/ui/components/LoadingIndicator.js +0 -20
  167. package/dist/src/ui/components/LoadingIndicator.js.map +0 -1
  168. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +0 -7
  169. package/dist/src/ui/components/MemoryUsageDisplay.js +0 -27
  170. package/dist/src/ui/components/MemoryUsageDisplay.js.map +0 -1
  171. package/dist/src/ui/components/ModelDialog.d.ts +0 -14
  172. package/dist/src/ui/components/ModelDialog.js +0 -34
  173. package/dist/src/ui/components/ModelDialog.js.map +0 -1
  174. package/dist/src/ui/components/ModelStatsDisplay.d.ts +0 -7
  175. package/dist/src/ui/components/ModelStatsDisplay.js +0 -33
  176. package/dist/src/ui/components/ModelStatsDisplay.js.map +0 -1
  177. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +0 -11
  178. package/dist/src/ui/components/SessionSummaryDisplay.js +0 -4
  179. package/dist/src/ui/components/SessionSummaryDisplay.js.map +0 -1
  180. package/dist/src/ui/components/ShellModeIndicator.d.ts +0 -7
  181. package/dist/src/ui/components/ShellModeIndicator.js +0 -5
  182. package/dist/src/ui/components/ShellModeIndicator.js.map +0 -1
  183. package/dist/src/ui/components/ShowMoreLines.d.ts +0 -10
  184. package/dist/src/ui/components/ShowMoreLines.js +0 -24
  185. package/dist/src/ui/components/ShowMoreLines.js.map +0 -1
  186. package/dist/src/ui/components/StatsDisplay.d.ts +0 -12
  187. package/dist/src/ui/components/StatsDisplay.js +0 -42
  188. package/dist/src/ui/components/StatsDisplay.js.map +0 -1
  189. package/dist/src/ui/components/SuggestionsDisplay.d.ts +0 -21
  190. package/dist/src/ui/components/SuggestionsDisplay.js +0 -32
  191. package/dist/src/ui/components/SuggestionsDisplay.js.map +0 -1
  192. package/dist/src/ui/components/ThemeDialog.d.ts +0 -19
  193. package/dist/src/ui/components/ThemeDialog.js +0 -126
  194. package/dist/src/ui/components/ThemeDialog.js.map +0 -1
  195. package/dist/src/ui/components/Tips.d.ts +0 -12
  196. package/dist/src/ui/components/Tips.js +0 -8
  197. package/dist/src/ui/components/Tips.js.map +0 -1
  198. package/dist/src/ui/components/ToolStatsDisplay.d.ts +0 -7
  199. package/dist/src/ui/components/ToolStatsDisplay.js +0 -41
  200. package/dist/src/ui/components/ToolStatsDisplay.js.map +0 -1
  201. package/dist/src/ui/components/UpdateNotification.d.ts +0 -10
  202. package/dist/src/ui/components/UpdateNotification.js +0 -10
  203. package/dist/src/ui/components/UpdateNotification.js.map +0 -1
  204. package/dist/src/ui/components/messages/CompressionMessage.d.ts +0 -11
  205. package/dist/src/ui/components/messages/CompressionMessage.js +0 -16
  206. package/dist/src/ui/components/messages/CompressionMessage.js.map +0 -1
  207. package/dist/src/ui/components/messages/DiffRenderer.d.ts +0 -15
  208. package/dist/src/ui/components/messages/DiffRenderer.js +0 -212
  209. package/dist/src/ui/components/messages/DiffRenderer.js.map +0 -1
  210. package/dist/src/ui/components/messages/ErrorMessage.d.ts +0 -11
  211. package/dist/src/ui/components/messages/ErrorMessage.js +0 -9
  212. package/dist/src/ui/components/messages/ErrorMessage.js.map +0 -1
  213. package/dist/src/ui/components/messages/GeminiMessage.d.ts +0 -14
  214. package/dist/src/ui/components/messages/GeminiMessage.js +0 -10
  215. package/dist/src/ui/components/messages/GeminiMessage.js.map +0 -1
  216. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +0 -14
  217. package/dist/src/ui/components/messages/GeminiMessageContent.js +0 -15
  218. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +0 -1
  219. package/dist/src/ui/components/messages/InfoMessage.d.ts +0 -11
  220. package/dist/src/ui/components/messages/InfoMessage.js +0 -9
  221. package/dist/src/ui/components/messages/InfoMessage.js.map +0 -1
  222. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +0 -18
  223. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +0 -307
  224. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +0 -1
  225. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +0 -18
  226. package/dist/src/ui/components/messages/ToolGroupMessage.js +0 -53
  227. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +0 -1
  228. package/dist/src/ui/components/messages/ToolMessage.d.ts +0 -15
  229. package/dist/src/ui/components/messages/ToolMessage.js +0 -61
  230. package/dist/src/ui/components/messages/ToolMessage.js.map +0 -1
  231. package/dist/src/ui/components/messages/UserMessage.d.ts +0 -11
  232. package/dist/src/ui/components/messages/UserMessage.js +0 -9
  233. package/dist/src/ui/components/messages/UserMessage.js.map +0 -1
  234. package/dist/src/ui/components/messages/UserShellMessage.d.ts +0 -11
  235. package/dist/src/ui/components/messages/UserShellMessage.js +0 -9
  236. package/dist/src/ui/components/messages/UserShellMessage.js.map +0 -1
  237. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +0 -61
  238. package/dist/src/ui/components/shared/MaxSizedBox.js +0 -384
  239. package/dist/src/ui/components/shared/MaxSizedBox.js.map +0 -1
  240. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +0 -41
  241. package/dist/src/ui/components/shared/RadioButtonSelect.js +0 -52
  242. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +0 -1
  243. package/dist/src/ui/components/shared/text-buffer.d.ts +0 -184
  244. package/dist/src/ui/components/shared/text-buffer.js +0 -1010
  245. package/dist/src/ui/components/shared/text-buffer.js.map +0 -1
  246. package/dist/src/ui/constants.d.ts +0 -8
  247. package/dist/src/ui/constants.js +0 -12
  248. package/dist/src/ui/constants.js.map +0 -1
  249. package/dist/src/ui/contexts/OverflowContext.d.ts +0 -19
  250. package/dist/src/ui/contexts/OverflowContext.js +0 -43
  251. package/dist/src/ui/contexts/OverflowContext.js.map +0 -1
  252. package/dist/src/ui/contexts/SessionContext.d.ts +0 -33
  253. package/dist/src/ui/contexts/SessionContext.js +0 -49
  254. package/dist/src/ui/contexts/SessionContext.js.map +0 -1
  255. package/dist/src/ui/contexts/StreamingContext.d.ts +0 -9
  256. package/dist/src/ui/contexts/StreamingContext.js +0 -15
  257. package/dist/src/ui/contexts/StreamingContext.js.map +0 -1
  258. package/dist/src/ui/editors/editorSettingsManager.d.ts +0 -19
  259. package/dist/src/ui/editors/editorSettingsManager.js +0 -54
  260. package/dist/src/ui/editors/editorSettingsManager.js.map +0 -1
  261. package/dist/src/ui/hooks/atCommandProcessor.d.ts +0 -31
  262. package/dist/src/ui/hooks/atCommandProcessor.js +0 -310
  263. package/dist/src/ui/hooks/atCommandProcessor.js.map +0 -1
  264. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +0 -16
  265. package/dist/src/ui/hooks/shellCommandProcessor.js +0 -261
  266. package/dist/src/ui/hooks/shellCommandProcessor.js.map +0 -1
  267. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +0 -27
  268. package/dist/src/ui/hooks/slashCommandProcessor.js +0 -1129
  269. package/dist/src/ui/hooks/slashCommandProcessor.js.map +0 -1
  270. package/dist/src/ui/hooks/useAuthCommand.d.ts +0 -14
  271. package/dist/src/ui/hooks/useAuthCommand.js +0 -63
  272. package/dist/src/ui/hooks/useAuthCommand.js.map +0 -1
  273. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +0 -10
  274. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +0 -37
  275. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +0 -1
  276. package/dist/src/ui/hooks/useBracketedPaste.d.ts +0 -12
  277. package/dist/src/ui/hooks/useBracketedPaste.js +0 -32
  278. package/dist/src/ui/hooks/useBracketedPaste.js.map +0 -1
  279. package/dist/src/ui/hooks/useCompletion.d.ts +0 -21
  280. package/dist/src/ui/hooks/useCompletion.js +0 -372
  281. package/dist/src/ui/hooks/useCompletion.js.map +0 -1
  282. package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -12
  283. package/dist/src/ui/hooks/useConsoleMessages.js +0 -60
  284. package/dist/src/ui/hooks/useConsoleMessages.js.map +0 -1
  285. package/dist/src/ui/hooks/useEditorSettings.d.ts +0 -16
  286. package/dist/src/ui/hooks/useEditorSettings.js +0 -43
  287. package/dist/src/ui/hooks/useEditorSettings.js.map +0 -1
  288. package/dist/src/ui/hooks/useGeminiStream.d.ts +0 -23
  289. package/dist/src/ui/hooks/useGeminiStream.js +0 -603
  290. package/dist/src/ui/hooks/useGeminiStream.js.map +0 -1
  291. package/dist/src/ui/hooks/useGitBranchName.d.ts +0 -6
  292. package/dist/src/ui/hooks/useGitBranchName.js +0 -61
  293. package/dist/src/ui/hooks/useGitBranchName.js.map +0 -1
  294. package/dist/src/ui/hooks/useHistoryManager.d.ts +0 -22
  295. package/dist/src/ui/hooks/useHistoryManager.js +0 -72
  296. package/dist/src/ui/hooks/useHistoryManager.js.map +0 -1
  297. package/dist/src/ui/hooks/useInputHistory.d.ts +0 -19
  298. package/dist/src/ui/hooks/useInputHistory.js +0 -84
  299. package/dist/src/ui/hooks/useInputHistory.js.map +0 -1
  300. package/dist/src/ui/hooks/useKeypress.d.ts +0 -29
  301. package/dist/src/ui/hooks/useKeypress.js +0 -86
  302. package/dist/src/ui/hooks/useKeypress.js.map +0 -1
  303. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +0 -10
  304. package/dist/src/ui/hooks/useLoadingIndicator.js +0 -44
  305. package/dist/src/ui/hooks/useLoadingIndicator.js.map +0 -1
  306. package/dist/src/ui/hooks/useLogger.d.ts +0 -10
  307. package/dist/src/ui/hooks/useLogger.js +0 -29
  308. package/dist/src/ui/hooks/useLogger.js.map +0 -1
  309. package/dist/src/ui/hooks/usePhraseCycler.d.ts +0 -14
  310. package/dist/src/ui/hooks/usePhraseCycler.js +0 -189
  311. package/dist/src/ui/hooks/usePhraseCycler.js.map +0 -1
  312. package/dist/src/ui/hooks/usePrivacySettings.d.ts +0 -16
  313. package/dist/src/ui/hooks/usePrivacySettings.js +0 -115
  314. package/dist/src/ui/hooks/usePrivacySettings.js.map +0 -1
  315. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +0 -33
  316. package/dist/src/ui/hooks/useReactToolScheduler.js +0 -186
  317. package/dist/src/ui/hooks/useReactToolScheduler.js.map +0 -1
  318. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +0 -6
  319. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +0 -7
  320. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +0 -1
  321. package/dist/src/ui/hooks/useShellHistory.d.ts +0 -11
  322. package/dist/src/ui/hooks/useShellHistory.js +0 -89
  323. package/dist/src/ui/hooks/useShellHistory.js.map +0 -1
  324. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +0 -9
  325. package/dist/src/ui/hooks/useShowMemoryCommand.js +0 -58
  326. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +0 -1
  327. package/dist/src/ui/hooks/useStateAndRef.d.ts +0 -7
  328. package/dist/src/ui/hooks/useStateAndRef.js +0 -26
  329. package/dist/src/ui/hooks/useStateAndRef.js.map +0 -1
  330. package/dist/src/ui/hooks/useTerminalSize.d.ts +0 -9
  331. package/dist/src/ui/hooks/useTerminalSize.js +0 -27
  332. package/dist/src/ui/hooks/useTerminalSize.js.map +0 -1
  333. package/dist/src/ui/hooks/useThemeCommand.d.ts +0 -15
  334. package/dist/src/ui/hooks/useThemeCommand.js +0 -78
  335. package/dist/src/ui/hooks/useThemeCommand.js.map +0 -1
  336. package/dist/src/ui/hooks/useTimer.d.ts +0 -12
  337. package/dist/src/ui/hooks/useTimer.js +0 -58
  338. package/dist/src/ui/hooks/useTimer.js.map +0 -1
  339. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +0 -12
  340. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +0 -40
  341. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +0 -1
  342. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +0 -10
  343. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +0 -17
  344. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +0 -1
  345. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +0 -10
  346. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +0 -17
  347. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +0 -1
  348. package/dist/src/ui/privacy/PrivacyNotice.d.ts +0 -12
  349. package/dist/src/ui/privacy/PrivacyNotice.js +0 -25
  350. package/dist/src/ui/privacy/PrivacyNotice.js.map +0 -1
  351. package/dist/src/ui/themes/ansi-light.d.ts +0 -7
  352. package/dist/src/ui/themes/ansi-light.js +0 -139
  353. package/dist/src/ui/themes/ansi-light.js.map +0 -1
  354. package/dist/src/ui/themes/ansi.d.ts +0 -7
  355. package/dist/src/ui/themes/ansi.js +0 -149
  356. package/dist/src/ui/themes/ansi.js.map +0 -1
  357. package/dist/src/ui/themes/atom-one-dark.d.ts +0 -7
  358. package/dist/src/ui/themes/atom-one-dark.js +0 -136
  359. package/dist/src/ui/themes/atom-one-dark.js.map +0 -1
  360. package/dist/src/ui/themes/ayu-light.d.ts +0 -7
  361. package/dist/src/ui/themes/ayu-light.js +0 -128
  362. package/dist/src/ui/themes/ayu-light.js.map +0 -1
  363. package/dist/src/ui/themes/ayu.d.ts +0 -7
  364. package/dist/src/ui/themes/ayu.js +0 -102
  365. package/dist/src/ui/themes/ayu.js.map +0 -1
  366. package/dist/src/ui/themes/default-light.d.ts +0 -7
  367. package/dist/src/ui/themes/default-light.js +0 -100
  368. package/dist/src/ui/themes/default-light.js.map +0 -1
  369. package/dist/src/ui/themes/default.d.ts +0 -7
  370. package/dist/src/ui/themes/default.js +0 -143
  371. package/dist/src/ui/themes/default.js.map +0 -1
  372. package/dist/src/ui/themes/dracula.d.ts +0 -7
  373. package/dist/src/ui/themes/dracula.js +0 -113
  374. package/dist/src/ui/themes/dracula.js.map +0 -1
  375. package/dist/src/ui/themes/github-dark.d.ts +0 -7
  376. package/dist/src/ui/themes/github-dark.js +0 -136
  377. package/dist/src/ui/themes/github-dark.js.map +0 -1
  378. package/dist/src/ui/themes/github-light.d.ts +0 -7
  379. package/dist/src/ui/themes/github-light.js +0 -138
  380. package/dist/src/ui/themes/github-light.js.map +0 -1
  381. package/dist/src/ui/themes/googlecode.d.ts +0 -7
  382. package/dist/src/ui/themes/googlecode.js +0 -135
  383. package/dist/src/ui/themes/googlecode.js.map +0 -1
  384. package/dist/src/ui/themes/no-color.d.ts +0 -7
  385. package/dist/src/ui/themes/no-color.js +0 -84
  386. package/dist/src/ui/themes/no-color.js.map +0 -1
  387. package/dist/src/ui/themes/shades-of-purple.d.ts +0 -11
  388. package/dist/src/ui/themes/shades-of-purple.js +0 -302
  389. package/dist/src/ui/themes/shades-of-purple.js.map +0 -1
  390. package/dist/src/ui/themes/theme-manager.d.ts +0 -33
  391. package/dist/src/ui/themes/theme-manager.js +0 -109
  392. package/dist/src/ui/themes/theme-manager.js.map +0 -1
  393. package/dist/src/ui/themes/theme.d.ts +0 -67
  394. package/dist/src/ui/themes/theme.js +0 -304
  395. package/dist/src/ui/themes/theme.js.map +0 -1
  396. package/dist/src/ui/themes/xcode.d.ts +0 -7
  397. package/dist/src/ui/themes/xcode.js +0 -143
  398. package/dist/src/ui/themes/xcode.js.map +0 -1
  399. package/dist/src/ui/types.d.ts +0 -172
  400. package/dist/src/ui/types.js +0 -43
  401. package/dist/src/ui/types.js.map +0 -1
  402. package/dist/src/ui/utils/CodeColorizer.d.ts +0 -14
  403. package/dist/src/ui/utils/CodeColorizer.js +0 -97
  404. package/dist/src/ui/utils/CodeColorizer.js.map +0 -1
  405. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +0 -16
  406. package/dist/src/ui/utils/InlineMarkdownRenderer.js +0 -104
  407. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +0 -1
  408. package/dist/src/ui/utils/MarkdownDisplay.d.ts +0 -14
  409. package/dist/src/ui/utils/MarkdownDisplay.js +0 -197
  410. package/dist/src/ui/utils/MarkdownDisplay.js.map +0 -1
  411. package/dist/src/ui/utils/TableRenderer.d.ts +0 -17
  412. package/dist/src/ui/utils/TableRenderer.js +0 -84
  413. package/dist/src/ui/utils/TableRenderer.js.map +0 -1
  414. package/dist/src/ui/utils/commandUtils.d.ts +0 -22
  415. package/dist/src/ui/utils/commandUtils.js +0 -25
  416. package/dist/src/ui/utils/commandUtils.js.map +0 -1
  417. package/dist/src/ui/utils/computeStats.d.ts +0 -10
  418. package/dist/src/ui/utils/computeStats.js +0 -55
  419. package/dist/src/ui/utils/computeStats.js.map +0 -1
  420. package/dist/src/ui/utils/displayUtils.d.ts +0 -17
  421. package/dist/src/ui/utils/displayUtils.js +0 -24
  422. package/dist/src/ui/utils/displayUtils.js.map +0 -1
  423. package/dist/src/ui/utils/errorParsing.d.ts +0 -15
  424. package/dist/src/ui/utils/errorParsing.js +0 -79
  425. package/dist/src/ui/utils/errorParsing.js.map +0 -1
  426. package/dist/src/ui/utils/formatters.d.ts +0 -13
  427. package/dist/src/ui/utils/formatters.js +0 -56
  428. package/dist/src/ui/utils/formatters.js.map +0 -1
  429. package/dist/src/ui/utils/markdownUtilities.d.ts +0 -6
  430. package/dist/src/ui/utils/markdownUtilities.js +0 -110
  431. package/dist/src/ui/utils/markdownUtilities.js.map +0 -1
  432. package/dist/src/ui/utils/textUtils.d.ts +0 -22
  433. package/dist/src/ui/utils/textUtils.js +0 -58
  434. package/dist/src/ui/utils/textUtils.js.map +0 -1
  435. package/dist/src/ui/utils/updateCheck.d.ts +0 -6
  436. package/dist/src/ui/utils/updateCheck.js +0 -36
  437. package/dist/src/ui/utils/updateCheck.js.map +0 -1
  438. package/dist/src/utils/cleanup.d.ts +0 -6
  439. package/dist/src/utils/cleanup.js +0 -19
  440. package/dist/src/utils/cleanup.js.map +0 -1
  441. package/dist/src/utils/package.d.ts +0 -12
  442. package/dist/src/utils/package.js +0 -24
  443. package/dist/src/utils/package.js.map +0 -1
  444. package/dist/src/utils/readStdin.d.ts +0 -6
  445. package/dist/src/utils/readStdin.js +0 -34
  446. package/dist/src/utils/readStdin.js.map +0 -1
  447. package/dist/src/utils/sandbox.d.ts +0 -7
  448. package/dist/src/utils/sandbox.js +0 -680
  449. package/dist/src/utils/sandbox.js.map +0 -1
  450. package/dist/src/utils/startupWarnings.d.ts +0 -6
  451. package/dist/src/utils/startupWarnings.js +0 -40
  452. package/dist/src/utils/startupWarnings.js.map +0 -1
  453. package/dist/src/utils/userStartupWarnings.d.ts +0 -6
  454. package/dist/src/utils/userStartupWarnings.js +0 -33
  455. package/dist/src/utils/userStartupWarnings.js.map +0 -1
  456. package/dist/src/utils/version.d.ts +0 -6
  457. package/dist/src/utils/version.js +0 -11
  458. package/dist/src/utils/version.js.map +0 -1
  459. package/dist/tsconfig.tsbuildinfo +0 -1
  460. package/dist/vitest.config.d.ts +0 -7
  461. package/dist/vitest.config.js +0 -35
  462. package/dist/vitest.config.js.map +0 -1
  463. /package/{dist/src/utils → bundle}/sandbox-macos-permissive-closed.sb +0 -0
  464. /package/{dist/src/utils → bundle}/sandbox-macos-permissive-open.sb +0 -0
  465. /package/{dist/src/utils → bundle}/sandbox-macos-permissive-proxied.sb +0 -0
  466. /package/{dist/src/utils → bundle}/sandbox-macos-restrictive-closed.sb +0 -0
  467. /package/{dist/src/utils → bundle}/sandbox-macos-restrictive-open.sb +0 -0
  468. /package/{dist/src/utils → bundle}/sandbox-macos-restrictive-proxied.sb +0 -0
@@ -1,307 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * @license
4
- * Copyright 2025 Google LLC
5
- * SPDX-License-Identifier: Apache-2.0
6
- */
7
- import { useRef } from 'react';
8
- import { Box, Text, useInput } from 'ink';
9
- import { DiffRenderer } from './DiffRenderer.js';
10
- import { Colors } from '../../colors.js';
11
- import { ToolConfirmationOutcome, } from '@google/gemini-cli-core';
12
- import { RadioButtonSelect, } from '../shared/RadioButtonSelect.js';
13
- import { MaxSizedBox } from '../shared/MaxSizedBox.js';
14
- import { DataCollector } from '../../../telemetry/dataCollector.js';
15
- export const ToolConfirmationMessage = ({ confirmationDetails, callId, toolName, toolDescription, isFocused = true, availableTerminalHeight, terminalWidth, config, }) => {
16
- const { onConfirm } = confirmationDetails;
17
- const childWidth = terminalWidth - 2; // 2 for padding
18
- const dataCollector = useRef(new DataCollector());
19
- const confirmationStartTime = useRef(Date.now());
20
- // 获取选择原因函数 - 移到组件内部
21
- const getChoiceReason = (choice, details) => {
22
- try {
23
- switch (choice) {
24
- case ToolConfirmationOutcome.ProceedOnce:
25
- return 'User chose to allow this operation once';
26
- case ToolConfirmationOutcome.ProceedAlways:
27
- return 'User chose to always allow this operation';
28
- case ToolConfirmationOutcome.ProceedAlwaysServer:
29
- return 'User chose to always allow all tools from this server';
30
- case ToolConfirmationOutcome.ProceedAlwaysTool:
31
- return 'User chose to always allow this specific tool';
32
- case ToolConfirmationOutcome.ModifyWithEditor:
33
- return 'User chose to modify with external editor';
34
- case ToolConfirmationOutcome.Cancel:
35
- return 'User cancelled the operation';
36
- default:
37
- return 'Unknown choice';
38
- }
39
- }
40
- catch (error) {
41
- console.warn('Error getting choice reason:', error);
42
- return 'Unknown choice';
43
- }
44
- };
45
- useInput((_, key) => {
46
- if (!isFocused)
47
- return;
48
- if (key.escape) {
49
- onConfirm(ToolConfirmationOutcome.Cancel);
50
- }
51
- });
52
- const handleSelect = async (item) => {
53
- const choiceDuration = Date.now() - confirmationStartTime.current;
54
- try {
55
- // 准备确认数据 - 添加错误处理和默认值
56
- const confirmationData = {
57
- sessionId: (() => {
58
- try {
59
- return config?.getSessionId?.() || 'unknown';
60
- }
61
- catch (error) {
62
- console.warn('Error getting session ID:', error);
63
- return 'unknown';
64
- }
65
- })(),
66
- callId: (() => {
67
- try {
68
- return callId || confirmationDetails?.callId || 'unknown';
69
- }
70
- catch (error) {
71
- console.warn('Error getting call ID:', error);
72
- return 'unknown';
73
- }
74
- })(),
75
- toolName: (() => {
76
- try {
77
- // Use passed toolName prop first, then fallback to confirmationDetails
78
- if (toolName) {
79
- return toolName;
80
- }
81
- // For MCP tools, use toolName property, for other tools try tool_name
82
- if (confirmationDetails?.type === 'mcp') {
83
- return confirmationDetails?.toolName || 'unknown';
84
- }
85
- // For exec tools, use rootCommand as tool name
86
- if (confirmationDetails?.type === 'exec') {
87
- return confirmationDetails?.rootCommand || 'unknown';
88
- }
89
- // For other tools, try various property names
90
- return confirmationDetails?.tool_name ||
91
- confirmationDetails?.toolName ||
92
- confirmationDetails?.name ||
93
- 'unknown';
94
- }
95
- catch (error) {
96
- console.warn('Error getting tool name:', error);
97
- return 'unknown';
98
- }
99
- })(),
100
- toolType: (() => {
101
- try {
102
- return confirmationDetails?.type || 'unknown';
103
- }
104
- catch (error) {
105
- console.warn('Error getting tool type:', error);
106
- return 'unknown';
107
- }
108
- })(),
109
- toolDescription: (() => {
110
- try {
111
- // Use passed toolDescription prop first
112
- if (toolDescription) {
113
- return toolDescription;
114
- }
115
- // For MCP tools, try toolDisplayName or description
116
- if (confirmationDetails?.type === 'mcp') {
117
- const mcpDetails = confirmationDetails;
118
- return mcpDetails?.toolDisplayName || mcpDetails?.title || '';
119
- }
120
- // For exec tools, use command as description
121
- if (confirmationDetails?.type === 'exec') {
122
- const execDetails = confirmationDetails;
123
- return execDetails?.command || execDetails?.title || '';
124
- }
125
- // For edit tools, use fileName as description
126
- if (confirmationDetails?.type === 'edit') {
127
- const editDetails = confirmationDetails;
128
- return `Edit file: ${editDetails?.fileName || 'unknown'}`;
129
- }
130
- // For info tools, use prompt as description
131
- if (confirmationDetails?.type === 'info') {
132
- const infoDetails = confirmationDetails;
133
- return infoDetails?.prompt || infoDetails?.title || '';
134
- }
135
- // Fallback to various property names
136
- return confirmationDetails?.tool_description ||
137
- confirmationDetails?.description ||
138
- confirmationDetails?.title ||
139
- '';
140
- }
141
- catch (error) {
142
- console.warn('Error getting tool description:', error);
143
- return '';
144
- }
145
- })(),
146
- userChoice: item,
147
- choiceDurationMs: choiceDuration,
148
- choiceReason: getChoiceReason(item, confirmationDetails),
149
- projectPath: (() => {
150
- try {
151
- return process.cwd();
152
- }
153
- catch (error) {
154
- console.warn('Error getting project path:', error);
155
- return '';
156
- }
157
- })(),
158
- workingDirectory: (() => {
159
- try {
160
- return process.cwd();
161
- }
162
- catch (error) {
163
- console.warn('Error getting working directory:', error);
164
- return '';
165
- }
166
- })(),
167
- terminalWidth: terminalWidth || 0,
168
- terminalHeight: availableTerminalHeight || 0,
169
- availableHeight: availableTerminalHeight || 0,
170
- };
171
- // 调试信息
172
- if (process.env.DEBUG === '1') {
173
- console.log('🔧 ToolConfirmationMessage - confirmationData being sent to DataCollector:', JSON.stringify(confirmationData, null, 2));
174
- }
175
- // 收集数据到Langfuse
176
- const result = await dataCollector.current.collectConfirmationData(confirmationData);
177
- // 只在DEBUG模式下显示详细结果
178
- if (process.env.DEBUG === '1') {
179
- if (result.success) {
180
- console.log(`Data collected to Langfuse with trace ID: ${result.traceId}`);
181
- }
182
- else {
183
- console.warn('Failed to collect data to Langfuse:', result.reason || result.error);
184
- }
185
- }
186
- // 如果用户选择"总是允许",记录这个选择以便后续自动收集
187
- if (item === ToolConfirmationOutcome.ProceedAlways ||
188
- item === ToolConfirmationOutcome.ProceedAlwaysTool ||
189
- item === ToolConfirmationOutcome.ProceedAlwaysServer) {
190
- try {
191
- // 存储用户选择,用于后续自动收集
192
- if (typeof window !== 'undefined' && window.localStorage) {
193
- localStorage.setItem('mpd_llm_auto_approve', JSON.stringify({
194
- tool_name: confirmationData.toolName,
195
- tool_type: confirmationData.toolType,
196
- user_choice: item,
197
- timestamp: new Date().toISOString(),
198
- session_id: confirmationData.sessionId,
199
- }));
200
- }
201
- }
202
- catch (error) {
203
- console.warn('Failed to store auto-approve preference:', error);
204
- }
205
- }
206
- // 调用原始确认回调
207
- onConfirm(item);
208
- }
209
- catch (error) {
210
- console.error('Error in confirmation handling:', error);
211
- // 即使数据收集失败,也要继续执行确认
212
- onConfirm(item);
213
- }
214
- };
215
- let bodyContent = null; // Removed contextDisplay here
216
- let question;
217
- const options = new Array();
218
- // Body content is now the DiffRenderer, passing filename to it
219
- // The bordered box is removed from here and handled within DiffRenderer
220
- function availableBodyContentHeight() {
221
- if (options.length === 0) {
222
- // This should not happen in practice as options are always added before this is called.
223
- throw new Error('Options not provided for confirmation message');
224
- }
225
- if (availableTerminalHeight === undefined) {
226
- return undefined;
227
- }
228
- // Calculate the vertical space (in lines) consumed by UI elements
229
- // surrounding the main body content.
230
- const PADDING_OUTER_Y = 2; // Main container has `padding={1}` (top & bottom).
231
- const MARGIN_BODY_BOTTOM = 1; // margin on the body container.
232
- const HEIGHT_QUESTION = 1; // The question text is one line.
233
- const MARGIN_QUESTION_BOTTOM = 1; // Margin on the question container.
234
- const HEIGHT_OPTIONS = options.length; // Each option in the radio select takes one line.
235
- const surroundingElementsHeight = PADDING_OUTER_Y +
236
- MARGIN_BODY_BOTTOM +
237
- HEIGHT_QUESTION +
238
- MARGIN_QUESTION_BOTTOM +
239
- HEIGHT_OPTIONS;
240
- return Math.max(availableTerminalHeight - surroundingElementsHeight, 1);
241
- }
242
- if (confirmationDetails.type === 'edit') {
243
- if (confirmationDetails.isModifying) {
244
- return (_jsxs(Box, { minWidth: "90%", borderStyle: "round", borderColor: Colors.Gray, justifyContent: "space-around", padding: 1, overflow: "hidden", children: [_jsx(Text, { children: "Modify in progress: " }), _jsx(Text, { color: Colors.AccentGreen, children: "Save and close external editor to continue" })] }));
245
- }
246
- question = `Apply this change?`;
247
- options.push({
248
- label: 'Yes, allow once',
249
- value: ToolConfirmationOutcome.ProceedOnce,
250
- }, {
251
- label: 'Yes, allow always',
252
- value: ToolConfirmationOutcome.ProceedAlways,
253
- }, {
254
- label: 'Modify with external editor',
255
- value: ToolConfirmationOutcome.ModifyWithEditor,
256
- }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
257
- bodyContent = (_jsx(DiffRenderer, { diffContent: confirmationDetails.fileDiff, filename: confirmationDetails.fileName, availableTerminalHeight: availableBodyContentHeight(), terminalWidth: childWidth }));
258
- }
259
- else if (confirmationDetails.type === 'exec') {
260
- const executionProps = confirmationDetails;
261
- question = `Allow execution?`;
262
- options.push({
263
- label: 'Yes, allow once',
264
- value: ToolConfirmationOutcome.ProceedOnce,
265
- }, {
266
- label: `Yes, allow always "${executionProps.rootCommand} ..."`,
267
- value: ToolConfirmationOutcome.ProceedAlways,
268
- }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
269
- let bodyContentHeight = availableBodyContentHeight();
270
- if (bodyContentHeight !== undefined) {
271
- bodyContentHeight -= 2; // Account for padding;
272
- }
273
- bodyContent = (_jsx(Box, { flexDirection: "column", children: _jsx(Box, { paddingX: 1, marginLeft: 1, children: _jsx(MaxSizedBox, { maxHeight: bodyContentHeight, maxWidth: Math.max(childWidth - 4, 1), children: _jsx(Box, { children: _jsx(Text, { color: Colors.AccentCyan, children: executionProps.command }) }) }) }) }));
274
- }
275
- else if (confirmationDetails.type === 'info') {
276
- const infoProps = confirmationDetails;
277
- const displayUrls = infoProps.urls &&
278
- !(infoProps.urls.length === 1 && infoProps.urls[0] === infoProps.prompt);
279
- question = `Do you want to proceed?`;
280
- options.push({
281
- label: 'Yes, allow once',
282
- value: ToolConfirmationOutcome.ProceedOnce,
283
- }, {
284
- label: 'Yes, allow always',
285
- value: ToolConfirmationOutcome.ProceedAlways,
286
- }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
287
- bodyContent = (_jsxs(Box, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [_jsx(Text, { color: Colors.AccentCyan, children: infoProps.prompt }), displayUrls && infoProps.urls && infoProps.urls.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { children: "URLs to fetch:" }), infoProps.urls.map((url) => (_jsxs(Text, { children: [" - ", url] }, url)))] }))] }));
288
- }
289
- else {
290
- // mcp tool confirmation
291
- const mcpProps = confirmationDetails;
292
- bodyContent = (_jsxs(Box, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [_jsxs(Text, { color: Colors.AccentCyan, children: ["MCP Server: ", mcpProps.serverName] }), _jsxs(Text, { color: Colors.AccentCyan, children: ["Tool: ", mcpProps.toolName] }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: Colors.Foreground, children: "Parameters:" }), _jsx(Box, { marginLeft: 1, children: _jsx(Text, { color: Colors.Gray, children: mcpProps.args ? JSON.stringify(mcpProps.args, null, 2) : 'No parameters' }) })] })] }));
293
- question = `Allow execution of MCP tool "${mcpProps.toolName}" from server "${mcpProps.serverName}"?`;
294
- options.push({
295
- label: 'Yes, allow once',
296
- value: ToolConfirmationOutcome.ProceedOnce,
297
- }, {
298
- label: `Yes, always allow tool "${mcpProps.toolName}" from server "${mcpProps.serverName}"`,
299
- value: ToolConfirmationOutcome.ProceedAlwaysTool, // Cast until types are updated
300
- }, {
301
- label: `Yes, always allow all tools from server "${mcpProps.serverName}"`,
302
- value: ToolConfirmationOutcome.ProceedAlwaysServer,
303
- }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
304
- }
305
- return (_jsxs(Box, { flexDirection: "column", padding: 1, width: childWidth, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", marginBottom: 1, children: bodyContent }), _jsx(Box, { marginBottom: 1, flexShrink: 0, children: _jsx(Text, { wrap: "truncate", children: question }) }), _jsx(Box, { flexShrink: 0, children: _jsx(RadioButtonSelect, { items: options, onSelect: handleSelect, isFocused: isFocused }) })] }));
306
- };
307
- //# sourceMappingURL=ToolConfirmationMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToolConfirmationMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ToolConfirmationMessage.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAa,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAEL,uBAAuB,GAMxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,GAElB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAcpE,MAAM,CAAC,MAAM,uBAAuB,GAEhC,CAAC,EACH,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,eAAe,EACf,SAAS,GAAG,IAAI,EAChB,uBAAuB,EACvB,aAAa,EACb,MAAM,GACP,EAAE,EAAE;IACH,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,CAAC;IAC1C,MAAM,UAAU,GAAG,aAAa,GAAG,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LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- import { IndividualToolCallDisplay } from '../../types.js';
8
- import { Config } from '@google/gemini-cli-core';
9
- interface ToolGroupMessageProps {
10
- groupId: number;
11
- toolCalls: IndividualToolCallDisplay[];
12
- availableTerminalHeight?: number;
13
- terminalWidth: number;
14
- config?: Config;
15
- isFocused?: boolean;
16
- }
17
- export declare const ToolGroupMessage: React.FC<ToolGroupMessageProps>;
18
- export {};
@@ -1,53 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * @license
4
- * Copyright 2025 Google LLC
5
- * SPDX-License-Identifier: Apache-2.0
6
- */
7
- import { useMemo } from 'react';
8
- import { Box } from 'ink';
9
- import { ToolCallStatus } from '../../types.js';
10
- import { ToolMessage } from './ToolMessage.js';
11
- import { ToolConfirmationMessage } from './ToolConfirmationMessage.js';
12
- import { Colors } from '../../colors.js';
13
- // Main component renders the border and maps the tools using ToolMessage
14
- export const ToolGroupMessage = ({ toolCalls, availableTerminalHeight, terminalWidth, config, isFocused = true, }) => {
15
- const hasPending = !toolCalls.every((t) => t.status === ToolCallStatus.Success);
16
- const borderColor = hasPending ? Colors.AccentYellow : Colors.Gray;
17
- const staticHeight = /* border */ 2 + /* marginBottom */ 1;
18
- // This is a bit of a magic number, but it accounts for the border and
19
- // marginLeft.
20
- const innerWidth = terminalWidth - 4;
21
- // only prompt for tool approval on the first 'confirming' tool in the list
22
- // note, after the CTA, this automatically moves over to the next 'confirming' tool
23
- const toolAwaitingApproval = useMemo(() => toolCalls.find((tc) => tc.status === ToolCallStatus.Confirming), [toolCalls]);
24
- let countToolCallsWithResults = 0;
25
- for (const tool of toolCalls) {
26
- if (tool.resultDisplay !== undefined && tool.resultDisplay !== '') {
27
- countToolCallsWithResults++;
28
- }
29
- }
30
- const countOneLineToolCalls = toolCalls.length - countToolCallsWithResults;
31
- const availableTerminalHeightPerToolMessage = availableTerminalHeight
32
- ? Math.max(Math.floor((availableTerminalHeight - staticHeight - countOneLineToolCalls) /
33
- Math.max(1, countToolCallsWithResults)), 1)
34
- : undefined;
35
- return (_jsx(Box, { flexDirection: "column", borderStyle: "round",
36
- /*
37
- This width constraint is highly important and protects us from an Ink rendering bug.
38
- Since the ToolGroup can typically change rendering states frequently, it can cause
39
- Ink to render the border of the box incorrectly and span multiple lines and even
40
- cause tearing.
41
- */
42
- width: "100%", marginLeft: 1, borderDimColor: hasPending, borderColor: borderColor, children: toolCalls.map((tool) => {
43
- const isConfirming = toolAwaitingApproval?.callId === tool.callId;
44
- return (_jsxs(Box, { flexDirection: "column", minHeight: 1, children: [_jsx(Box, { flexDirection: "row", alignItems: "center", children: _jsx(ToolMessage, { callId: tool.callId, name: tool.name, description: tool.description, resultDisplay: tool.resultDisplay, status: tool.status, confirmationDetails: tool.confirmationDetails, availableTerminalHeight: availableTerminalHeightPerToolMessage, terminalWidth: innerWidth, emphasis: isConfirming
45
- ? 'high'
46
- : toolAwaitingApproval
47
- ? 'low'
48
- : 'medium', renderOutputAsMarkdown: tool.renderOutputAsMarkdown }) }), tool.status === ToolCallStatus.Confirming &&
49
- isConfirming &&
50
- tool.confirmationDetails && (_jsx(ToolConfirmationMessage, { confirmationDetails: tool.confirmationDetails, callId: tool.callId, toolName: tool.name, toolDescription: tool.description, config: config, isFocused: isFocused, availableTerminalHeight: availableTerminalHeightPerToolMessage, terminalWidth: innerWidth }))] }, tool.callId));
51
- }) }));
52
- };
53
- //# sourceMappingURL=ToolGroupMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToolGroupMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ToolGroupMessage.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAA6B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3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AAY;wBACZ,IAAI,CAAC,mBAAmB,IAAI,CAC1B,KAAC,uBAAuB,IACtB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,IAAI,EACnB,eAAe,EAAE,IAAI,CAAC,WAAW,EACjC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,uBAAuB,EACrB,qCAAqC,EAEvC,aAAa,EAAE,UAAU,GACzB,CACH,KApCK,IAAI,CAAC,MAAM,CAqCf,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- import { IndividualToolCallDisplay } from '../../types.js';
8
- export type TextEmphasis = 'high' | 'medium' | 'low';
9
- export interface ToolMessageProps extends IndividualToolCallDisplay {
10
- availableTerminalHeight?: number;
11
- terminalWidth: number;
12
- emphasis?: TextEmphasis;
13
- renderOutputAsMarkdown?: boolean;
14
- }
15
- export declare const ToolMessage: React.FC<ToolMessageProps>;
@@ -1,61 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * @license
4
- * Copyright 2025 Google LLC
5
- * SPDX-License-Identifier: Apache-2.0
6
- */
7
- import React from 'react';
8
- import { Box, Text } from 'ink';
9
- import { ToolCallStatus } from '../../types.js';
10
- import { DiffRenderer } from './DiffRenderer.js';
11
- import { Colors } from '../../colors.js';
12
- import { MarkdownDisplay } from '../../utils/MarkdownDisplay.js';
13
- import { GeminiRespondingSpinner } from '../GeminiRespondingSpinner.js';
14
- import { MaxSizedBox } from '../shared/MaxSizedBox.js';
15
- const STATIC_HEIGHT = 1;
16
- const RESERVED_LINE_COUNT = 5; // for tool name, status, padding etc.
17
- const STATUS_INDICATOR_WIDTH = 3;
18
- const MIN_LINES_SHOWN = 2; // show at least this many lines
19
- // Large threshold to ensure we don't cause performance issues for very large
20
- // outputs that will get truncated further MaxSizedBox anyway.
21
- const MAXIMUM_RESULT_DISPLAY_CHARACTERS = 1000000;
22
- export const ToolMessage = ({ name, description, resultDisplay, status, availableTerminalHeight, terminalWidth, emphasis = 'medium', renderOutputAsMarkdown = true, }) => {
23
- const availableHeight = availableTerminalHeight
24
- ? Math.max(availableTerminalHeight - STATIC_HEIGHT - RESERVED_LINE_COUNT, MIN_LINES_SHOWN + 1)
25
- : undefined;
26
- // Long tool call response in MarkdownDisplay doesn't respect availableTerminalHeight properly,
27
- // we're forcing it to not render as markdown when the response is too long, it will fallback
28
- // to render as plain text, which is contained within the terminal using MaxSizedBox
29
- if (availableHeight) {
30
- renderOutputAsMarkdown = false;
31
- }
32
- const childWidth = terminalWidth - 3; // account for padding.
33
- if (typeof resultDisplay === 'string') {
34
- if (resultDisplay.length > MAXIMUM_RESULT_DISPLAY_CHARACTERS) {
35
- // Truncate the result display to fit within the available width.
36
- resultDisplay =
37
- '...' + resultDisplay.slice(-MAXIMUM_RESULT_DISPLAY_CHARACTERS);
38
- }
39
- }
40
- return (_jsxs(Box, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [_jsxs(Box, { minHeight: 1, children: [_jsx(ToolStatusIndicator, { status: status }), _jsx(ToolInfo, { name: name, status: status, description: description, emphasis: emphasis }), emphasis === 'high' && _jsx(TrailingIndicator, {})] }), resultDisplay && (_jsx(Box, { paddingLeft: STATUS_INDICATOR_WIDTH, width: "100%", marginTop: 1, children: _jsxs(Box, { flexDirection: "column", children: [typeof resultDisplay === 'string' && renderOutputAsMarkdown && (_jsx(Box, { flexDirection: "column", children: _jsx(MarkdownDisplay, { text: resultDisplay, isPending: false, availableTerminalHeight: availableHeight, terminalWidth: childWidth }) })), typeof resultDisplay === 'string' && !renderOutputAsMarkdown && (_jsx(MaxSizedBox, { maxHeight: availableHeight, maxWidth: childWidth, children: _jsx(Box, { children: _jsx(Text, { wrap: "wrap", children: resultDisplay }) }) })), typeof resultDisplay !== 'string' && (_jsx(DiffRenderer, { diffContent: resultDisplay.fileDiff, filename: resultDisplay.fileName, availableTerminalHeight: availableHeight, terminalWidth: childWidth }))] }) }))] }));
41
- };
42
- const ToolStatusIndicator = ({ status, }) => (_jsxs(Box, { minWidth: STATUS_INDICATOR_WIDTH, children: [status === ToolCallStatus.Pending && (_jsx(Text, { color: Colors.AccentGreen, children: "o" })), status === ToolCallStatus.Executing && (_jsx(GeminiRespondingSpinner, { spinnerType: "toggle", nonRespondingDisplay: '⊷' })), status === ToolCallStatus.Success && (_jsx(Text, { color: Colors.AccentGreen, children: "\u2714" })), status === ToolCallStatus.Confirming && (_jsx(Text, { color: Colors.AccentYellow, children: "?" })), status === ToolCallStatus.Canceled && (_jsx(Text, { color: Colors.AccentYellow, bold: true, children: "-" })), status === ToolCallStatus.Error && (_jsx(Text, { color: Colors.AccentRed, bold: true, children: "x" }))] }));
43
- const ToolInfo = ({ name, description, status, emphasis, }) => {
44
- const nameColor = React.useMemo(() => {
45
- switch (emphasis) {
46
- case 'high':
47
- return Colors.Foreground;
48
- case 'medium':
49
- return Colors.Foreground;
50
- case 'low':
51
- return Colors.Gray;
52
- default: {
53
- const exhaustiveCheck = emphasis;
54
- return exhaustiveCheck;
55
- }
56
- }
57
- }, [emphasis]);
58
- return (_jsx(Box, { children: _jsxs(Text, { wrap: "truncate-end", strikethrough: status === ToolCallStatus.Canceled, children: [_jsx(Text, { color: nameColor, bold: true, children: name }), ' ', _jsx(Text, { color: Colors.Gray, children: description })] }) }));
59
- };
60
- const TrailingIndicator = () => (_jsxs(Text, { color: Colors.Foreground, wrap: "truncate", children: [' ', "\u2190"] }));
61
- //# sourceMappingURL=ToolMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToolMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ToolMessage.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OA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,KAAK,QAAQ;gBACX,OAAO,MAAM,CAAC,UAAU,CAAC;YAC3B,KAAK,KAAK;gBACR,OAAO,MAAM,CAAC,IAAI,CAAC;YACrB,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,eAAe,GAAU,QAAQ,CAAC;gBACxC,OAAO,eAAe,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACf,OAAO,CACL,KAAC,GAAG,cACF,MAAC,IAAI,IACH,IAAI,EAAC,cAAc,EACnB,aAAa,EAAE,MAAM,KAAK,cAAc,CAAC,QAAQ,aAEjD,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,EAAE,IAAI,kBACzB,IAAI,GACA,EAAC,GAAG,EACX,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,WAAW,GAAQ,IACzC,GACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAa,GAAG,EAAE,CAAC,CACxC,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAC,UAAU,aAC5C,GAAG,cAEC,CACR,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- interface UserMessageProps {
8
- text: string;
9
- }
10
- export declare const UserMessage: React.FC<UserMessageProps>;
11
- export {};
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Text, Box } from 'ink';
3
- import { Colors } from '../../colors.js';
4
- export const UserMessage = ({ text }) => {
5
- const prefix = '> ';
6
- const prefixWidth = prefix.length;
7
- return (_jsxs(Box, { borderStyle: "round", borderColor: Colors.Gray, flexDirection: "row", paddingX: 2, paddingY: 0, marginY: 1, alignSelf: "flex-start", children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { color: Colors.Gray, children: prefix }) }), _jsx(Box, { flexGrow: 1, children: _jsx(Text, { wrap: "wrap", color: Colors.Gray, children: text }) })] }));
8
- };
9
- //# sourceMappingURL=UserMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/UserMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAClE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAElC,OAAO,CACL,MAAC,GAAG,IACF,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,MAAM,CAAC,IAAI,EACxB,aAAa,EAAC,KAAK,EACnB,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,CAAC,EACV,SAAS,EAAC,YAAY,aAEtB,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,MAAM,GAAQ,GACrC,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YACjC,IAAI,GACA,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- interface UserShellMessageProps {
8
- text: string;
9
- }
10
- export declare const UserShellMessage: React.FC<UserShellMessageProps>;
11
- export {};
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Text } from 'ink';
3
- import { Colors } from '../../colors.js';
4
- export const UserShellMessage = ({ text }) => {
5
- // Remove leading '!' if present, as App.tsx adds it for the processor.
6
- const commandToDisplay = text.startsWith('!') ? text.substring(1) : text;
7
- return (_jsxs(Box, { children: [_jsx(Text, { color: Colors.AccentCyan, children: "$ " }), _jsx(Text, { children: commandToDisplay })] }));
8
- };
9
- //# sourceMappingURL=UserShellMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserShellMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/UserShellMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5E,uEAAuE;IACvE,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEzE,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,mBAAW,EACzC,KAAC,IAAI,cAAE,gBAAgB,GAAQ,IAC3B,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,61 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import React from 'react';
7
- /**
8
- * Minimum height for the MaxSizedBox component.
9
- * This ensures there is room for at least one line of content as well as the
10
- * message that content was truncated.
11
- */
12
- export declare const MINIMUM_MAX_HEIGHT = 2;
13
- export declare function setMaxSizedBoxDebugging(value: boolean): void;
14
- interface MaxSizedBoxProps {
15
- children?: React.ReactNode;
16
- maxWidth?: number;
17
- maxHeight: number | undefined;
18
- overflowDirection?: 'top' | 'bottom';
19
- additionalHiddenLinesCount?: number;
20
- }
21
- /**
22
- * A React component that constrains the size of its children and provides
23
- * content-aware truncation when the content exceeds the specified `maxHeight`.
24
- *
25
- * `MaxSizedBox` requires a specific structure for its children to correctly
26
- * measure and render the content:
27
- *
28
- * 1. **Direct children must be `<Box>` elements.** Each `<Box>` represents a
29
- * single row of content.
30
- * 2. **Row `<Box>` elements must contain only `<Text>` elements.** These
31
- * `<Text>` elements can be nested and there are no restrictions to Text
32
- * element styling other than that non-wrapping text elements must be
33
- * before wrapping text elements.
34
- *
35
- * **Constraints:**
36
- * - **Box Properties:** Custom properties on the child `<Box>` elements are
37
- * ignored. In debug mode, runtime checks will report errors for any
38
- * unsupported properties.
39
- * - **Text Wrapping:** Within a single row, `<Text>` elements with no wrapping
40
- * (e.g., headers, labels) must appear before any `<Text>` elements that wrap.
41
- * - **Element Types:** Runtime checks will warn if unsupported element types
42
- * are used as children.
43
- *
44
- * @example
45
- * <MaxSizedBox maxWidth={80} maxHeight={10}>
46
- * <Box>
47
- * <Text>This is the first line.</Text>
48
- * </Box>
49
- * <Box>
50
- * <Text color="cyan" wrap="truncate">Non-wrapping Header: </Text>
51
- * <Text>This is the rest of the line which will wrap if it's too long.</Text>
52
- * </Box>
53
- * <Box>
54
- * <Text>
55
- * Line 3 with <Text color="yellow">nested styled text</Text> inside of it.
56
- * </Text>
57
- * </Box>
58
- * </MaxSizedBox>
59
- */
60
- export declare const MaxSizedBox: React.FC<MaxSizedBoxProps>;
61
- export {};