@qwen-code/qwen-code 0.0.1-dev1 → 0.0.2

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 (424) hide show
  1. package/README.md +219 -41
  2. package/dist/.last_build +0 -0
  3. package/dist/index.d.ts +7 -0
  4. package/dist/index.js +20 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/package.json +79 -0
  7. package/dist/src/config/auth.d.ts +9 -0
  8. package/dist/src/config/auth.js +48 -0
  9. package/dist/src/config/auth.js.map +1 -0
  10. package/dist/src/config/config.d.ts +39 -0
  11. package/dist/src/config/config.js +318 -0
  12. package/dist/src/config/config.js.map +1 -0
  13. package/dist/src/config/extension.d.ts +21 -0
  14. package/dist/src/config/extension.js +109 -0
  15. package/dist/src/config/extension.js.map +1 -0
  16. package/dist/src/config/sandboxConfig.d.ts +13 -0
  17. package/dist/src/config/sandboxConfig.js +75 -0
  18. package/dist/src/config/sandboxConfig.js.map +1 -0
  19. package/dist/src/config/settings.d.ts +95 -0
  20. package/dist/src/config/settings.js +263 -0
  21. package/dist/src/config/settings.js.map +1 -0
  22. package/dist/src/gemini.d.ts +6 -0
  23. package/dist/src/gemini.js +256 -0
  24. package/dist/src/gemini.js.map +1 -0
  25. package/dist/src/generated/git-commit.d.ts +6 -0
  26. package/dist/src/generated/git-commit.js +9 -0
  27. package/dist/src/generated/git-commit.js.map +1 -0
  28. package/dist/src/nonInteractiveCli.d.ts +7 -0
  29. package/dist/src/nonInteractiveCli.js +191 -0
  30. package/dist/src/nonInteractiveCli.js.map +1 -0
  31. package/dist/src/services/CommandService.d.ts +13 -0
  32. package/dist/src/services/CommandService.js +38 -0
  33. package/dist/src/services/CommandService.js.map +1 -0
  34. package/dist/src/ui/App.d.ts +15 -0
  35. package/dist/src/ui/App.js +499 -0
  36. package/dist/src/ui/App.js.map +1 -0
  37. package/dist/src/ui/colors.d.ts +7 -0
  38. package/dist/src/ui/colors.js +48 -0
  39. package/dist/src/ui/colors.js.map +1 -0
  40. package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
  41. package/dist/src/ui/commands/aboutCommand.js +37 -0
  42. package/dist/src/ui/commands/aboutCommand.js.map +1 -0
  43. package/dist/src/ui/commands/authCommand.d.ts +7 -0
  44. package/dist/src/ui/commands/authCommand.js +14 -0
  45. package/dist/src/ui/commands/authCommand.js.map +1 -0
  46. package/dist/src/ui/commands/clearCommand.d.ts +7 -0
  47. package/dist/src/ui/commands/clearCommand.js +16 -0
  48. package/dist/src/ui/commands/clearCommand.js.map +1 -0
  49. package/dist/src/ui/commands/helpCommand.d.ts +7 -0
  50. package/dist/src/ui/commands/helpCommand.js +18 -0
  51. package/dist/src/ui/commands/helpCommand.js.map +1 -0
  52. package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
  53. package/dist/src/ui/commands/memoryCommand.js +81 -0
  54. package/dist/src/ui/commands/memoryCommand.js.map +1 -0
  55. package/dist/src/ui/commands/privacyCommand.d.ts +7 -0
  56. package/dist/src/ui/commands/privacyCommand.js +14 -0
  57. package/dist/src/ui/commands/privacyCommand.js.map +1 -0
  58. package/dist/src/ui/commands/themeCommand.d.ts +7 -0
  59. package/dist/src/ui/commands/themeCommand.js +14 -0
  60. package/dist/src/ui/commands/themeCommand.js.map +1 -0
  61. package/dist/src/ui/commands/types.d.ts +64 -0
  62. package/dist/src/ui/commands/types.js +7 -0
  63. package/dist/src/ui/commands/types.js.map +1 -0
  64. package/dist/src/ui/components/AboutBox.d.ts +16 -0
  65. package/dist/src/ui/components/AboutBox.js +6 -0
  66. package/dist/src/ui/components/AboutBox.js.map +1 -0
  67. package/dist/src/ui/components/AsciiArt.d.ts +7 -0
  68. package/dist/src/ui/components/AsciiArt.js +22 -0
  69. package/dist/src/ui/components/AsciiArt.js.map +1 -0
  70. package/dist/src/ui/components/AuthDialog.d.ts +15 -0
  71. package/dist/src/ui/components/AuthDialog.js +90 -0
  72. package/dist/src/ui/components/AuthDialog.js.map +1 -0
  73. package/dist/src/ui/components/AuthInProgress.d.ts +11 -0
  74. package/dist/src/ui/components/AuthInProgress.js +27 -0
  75. package/dist/src/ui/components/AuthInProgress.js.map +1 -0
  76. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
  77. package/dist/src/ui/components/AutoAcceptIndicator.js +26 -0
  78. package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
  79. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
  80. package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
  81. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
  82. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +15 -0
  83. package/dist/src/ui/components/ContextSummaryDisplay.js +41 -0
  84. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
  85. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +14 -0
  86. package/dist/src/ui/components/DetailedMessagesDisplay.js +34 -0
  87. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
  88. package/dist/src/ui/components/EditorSettingsDialog.d.ts +15 -0
  89. package/dist/src/ui/components/EditorSettingsDialog.js +73 -0
  90. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
  91. package/dist/src/ui/components/Footer.d.ts +21 -0
  92. package/dist/src/ui/components/Footer.js +14 -0
  93. package/dist/src/ui/components/Footer.js.map +1 -0
  94. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +17 -0
  95. package/dist/src/ui/components/GeminiRespondingSpinner.js +16 -0
  96. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
  97. package/dist/src/ui/components/Header.d.ts +14 -0
  98. package/dist/src/ui/components/Header.js +20 -0
  99. package/dist/src/ui/components/Header.js.map +1 -0
  100. package/dist/src/ui/components/Help.d.ts +12 -0
  101. package/dist/src/ui/components/Help.js +10 -0
  102. package/dist/src/ui/components/Help.js.map +1 -0
  103. package/dist/src/ui/components/HistoryItemDisplay.d.ts +18 -0
  104. package/dist/src/ui/components/HistoryItemDisplay.js +17 -0
  105. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
  106. package/dist/src/ui/components/InputPrompt.d.ts +25 -0
  107. package/dist/src/ui/components/InputPrompt.js +338 -0
  108. package/dist/src/ui/components/InputPrompt.js.map +1 -0
  109. package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
  110. package/dist/src/ui/components/LoadingIndicator.js +20 -0
  111. package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
  112. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
  113. package/dist/src/ui/components/MemoryUsageDisplay.js +27 -0
  114. package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
  115. package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
  116. package/dist/src/ui/components/ModelStatsDisplay.js +33 -0
  117. package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
  118. package/dist/src/ui/components/OpenAIKeyPrompt.d.ts +12 -0
  119. package/dist/src/ui/components/OpenAIKeyPrompt.js +118 -0
  120. package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -0
  121. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
  122. package/dist/src/ui/components/SessionSummaryDisplay.js +4 -0
  123. package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
  124. package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
  125. package/dist/src/ui/components/ShellModeIndicator.js +5 -0
  126. package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
  127. package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
  128. package/dist/src/ui/components/ShowMoreLines.js +24 -0
  129. package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
  130. package/dist/src/ui/components/StatsDisplay.d.ts +12 -0
  131. package/dist/src/ui/components/StatsDisplay.js +42 -0
  132. package/dist/src/ui/components/StatsDisplay.js.map +1 -0
  133. package/dist/src/ui/components/SuggestionsDisplay.d.ts +21 -0
  134. package/dist/src/ui/components/SuggestionsDisplay.js +32 -0
  135. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
  136. package/dist/src/ui/components/ThemeDialog.d.ts +19 -0
  137. package/dist/src/ui/components/ThemeDialog.js +127 -0
  138. package/dist/src/ui/components/ThemeDialog.js.map +1 -0
  139. package/dist/src/ui/components/Tips.d.ts +12 -0
  140. package/dist/src/ui/components/Tips.js +8 -0
  141. package/dist/src/ui/components/Tips.js.map +1 -0
  142. package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
  143. package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
  144. package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
  145. package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
  146. package/dist/src/ui/components/UpdateNotification.js +10 -0
  147. package/dist/src/ui/components/UpdateNotification.js.map +1 -0
  148. package/dist/src/ui/components/messages/CompressionMessage.d.ts +11 -0
  149. package/dist/src/ui/components/messages/CompressionMessage.js +16 -0
  150. package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
  151. package/dist/src/ui/components/messages/DiffRenderer.d.ts +15 -0
  152. package/dist/src/ui/components/messages/DiffRenderer.js +212 -0
  153. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
  154. package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
  155. package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
  156. package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
  157. package/dist/src/ui/components/messages/GeminiMessage.d.ts +14 -0
  158. package/dist/src/ui/components/messages/GeminiMessage.js +10 -0
  159. package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
  160. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
  161. package/dist/src/ui/components/messages/GeminiMessageContent.js +15 -0
  162. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
  163. package/dist/src/ui/components/messages/InfoMessage.d.ts +11 -0
  164. package/dist/src/ui/components/messages/InfoMessage.js +9 -0
  165. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
  166. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +15 -0
  167. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +111 -0
  168. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
  169. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +18 -0
  170. package/dist/src/ui/components/messages/ToolGroupMessage.js +53 -0
  171. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
  172. package/dist/src/ui/components/messages/ToolMessage.d.ts +15 -0
  173. package/dist/src/ui/components/messages/ToolMessage.js +61 -0
  174. package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
  175. package/dist/src/ui/components/messages/UserMessage.d.ts +11 -0
  176. package/dist/src/ui/components/messages/UserMessage.js +9 -0
  177. package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
  178. package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
  179. package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
  180. package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
  181. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
  182. package/dist/src/ui/components/shared/MaxSizedBox.js +384 -0
  183. package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
  184. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +44 -0
  185. package/dist/src/ui/components/shared/RadioButtonSelect.js +100 -0
  186. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
  187. package/dist/src/ui/components/shared/text-buffer.d.ts +184 -0
  188. package/dist/src/ui/components/shared/text-buffer.js +1010 -0
  189. package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
  190. package/dist/src/ui/constants.d.ts +8 -0
  191. package/dist/src/ui/constants.js +12 -0
  192. package/dist/src/ui/constants.js.map +1 -0
  193. package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
  194. package/dist/src/ui/contexts/OverflowContext.js +43 -0
  195. package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
  196. package/dist/src/ui/contexts/SessionContext.d.ts +37 -0
  197. package/dist/src/ui/contexts/SessionContext.js +68 -0
  198. package/dist/src/ui/contexts/SessionContext.js.map +1 -0
  199. package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
  200. package/dist/src/ui/contexts/StreamingContext.js +15 -0
  201. package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
  202. package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
  203. package/dist/src/ui/editors/editorSettingsManager.js +54 -0
  204. package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
  205. package/dist/src/ui/hooks/atCommandProcessor.d.ts +31 -0
  206. package/dist/src/ui/hooks/atCommandProcessor.js +310 -0
  207. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
  208. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +16 -0
  209. package/dist/src/ui/hooks/shellCommandProcessor.js +261 -0
  210. package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
  211. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +27 -0
  212. package/dist/src/ui/hooks/slashCommandProcessor.js +1042 -0
  213. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
  214. package/dist/src/ui/hooks/useAuthCommand.d.ts +14 -0
  215. package/dist/src/ui/hooks/useAuthCommand.js +64 -0
  216. package/dist/src/ui/hooks/useAuthCommand.js.map +1 -0
  217. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +10 -0
  218. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +37 -0
  219. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
  220. package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
  221. package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
  222. package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
  223. package/dist/src/ui/hooks/useCompletion.d.ts +21 -0
  224. package/dist/src/ui/hooks/useCompletion.js +375 -0
  225. package/dist/src/ui/hooks/useCompletion.js.map +1 -0
  226. package/dist/src/ui/hooks/useConsoleMessages.d.ts +12 -0
  227. package/dist/src/ui/hooks/useConsoleMessages.js +60 -0
  228. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
  229. package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
  230. package/dist/src/ui/hooks/useEditorSettings.js +43 -0
  231. package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
  232. package/dist/src/ui/hooks/useGeminiStream.d.ts +23 -0
  233. package/dist/src/ui/hooks/useGeminiStream.js +579 -0
  234. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
  235. package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
  236. package/dist/src/ui/hooks/useGitBranchName.js +61 -0
  237. package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
  238. package/dist/src/ui/hooks/useHistoryManager.d.ts +22 -0
  239. package/dist/src/ui/hooks/useHistoryManager.js +72 -0
  240. package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
  241. package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
  242. package/dist/src/ui/hooks/useInputHistory.js +84 -0
  243. package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
  244. package/dist/src/ui/hooks/useKeypress.d.ts +29 -0
  245. package/dist/src/ui/hooks/useKeypress.js +156 -0
  246. package/dist/src/ui/hooks/useKeypress.js.map +1 -0
  247. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +10 -0
  248. package/dist/src/ui/hooks/useLoadingIndicator.js +44 -0
  249. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
  250. package/dist/src/ui/hooks/useLogger.d.ts +10 -0
  251. package/dist/src/ui/hooks/useLogger.js +29 -0
  252. package/dist/src/ui/hooks/useLogger.js.map +1 -0
  253. package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
  254. package/dist/src/ui/hooks/usePhraseCycler.js +189 -0
  255. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
  256. package/dist/src/ui/hooks/usePrivacySettings.d.ts +16 -0
  257. package/dist/src/ui/hooks/usePrivacySettings.js +115 -0
  258. package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -0
  259. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +33 -0
  260. package/dist/src/ui/hooks/useReactToolScheduler.js +186 -0
  261. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
  262. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
  263. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
  264. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
  265. package/dist/src/ui/hooks/useShellHistory.d.ts +11 -0
  266. package/dist/src/ui/hooks/useShellHistory.js +89 -0
  267. package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
  268. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
  269. package/dist/src/ui/hooks/useShowMemoryCommand.js +58 -0
  270. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
  271. package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
  272. package/dist/src/ui/hooks/useStateAndRef.js +26 -0
  273. package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
  274. package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
  275. package/dist/src/ui/hooks/useTerminalSize.js +27 -0
  276. package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
  277. package/dist/src/ui/hooks/useThemeCommand.d.ts +15 -0
  278. package/dist/src/ui/hooks/useThemeCommand.js +78 -0
  279. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
  280. package/dist/src/ui/hooks/useTimer.d.ts +12 -0
  281. package/dist/src/ui/hooks/useTimer.js +58 -0
  282. package/dist/src/ui/hooks/useTimer.js.map +1 -0
  283. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +12 -0
  284. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +40 -0
  285. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -0
  286. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +10 -0
  287. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +17 -0
  288. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -0
  289. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +10 -0
  290. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +17 -0
  291. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -0
  292. package/dist/src/ui/privacy/PrivacyNotice.d.ts +12 -0
  293. package/dist/src/ui/privacy/PrivacyNotice.js +25 -0
  294. package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -0
  295. package/dist/src/ui/themes/ansi-light.d.ts +7 -0
  296. package/dist/src/ui/themes/ansi-light.js +139 -0
  297. package/dist/src/ui/themes/ansi-light.js.map +1 -0
  298. package/dist/src/ui/themes/ansi.d.ts +7 -0
  299. package/dist/src/ui/themes/ansi.js +149 -0
  300. package/dist/src/ui/themes/ansi.js.map +1 -0
  301. package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
  302. package/dist/src/ui/themes/atom-one-dark.js +136 -0
  303. package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
  304. package/dist/src/ui/themes/ayu-light.d.ts +7 -0
  305. package/dist/src/ui/themes/ayu-light.js +128 -0
  306. package/dist/src/ui/themes/ayu-light.js.map +1 -0
  307. package/dist/src/ui/themes/ayu.d.ts +7 -0
  308. package/dist/src/ui/themes/ayu.js +102 -0
  309. package/dist/src/ui/themes/ayu.js.map +1 -0
  310. package/dist/src/ui/themes/default-light.d.ts +7 -0
  311. package/dist/src/ui/themes/default-light.js +100 -0
  312. package/dist/src/ui/themes/default-light.js.map +1 -0
  313. package/dist/src/ui/themes/default.d.ts +7 -0
  314. package/dist/src/ui/themes/default.js +143 -0
  315. package/dist/src/ui/themes/default.js.map +1 -0
  316. package/dist/src/ui/themes/dracula.d.ts +7 -0
  317. package/dist/src/ui/themes/dracula.js +113 -0
  318. package/dist/src/ui/themes/dracula.js.map +1 -0
  319. package/dist/src/ui/themes/github-dark.d.ts +7 -0
  320. package/dist/src/ui/themes/github-dark.js +136 -0
  321. package/dist/src/ui/themes/github-dark.js.map +1 -0
  322. package/dist/src/ui/themes/github-light.d.ts +7 -0
  323. package/dist/src/ui/themes/github-light.js +138 -0
  324. package/dist/src/ui/themes/github-light.js.map +1 -0
  325. package/dist/src/ui/themes/googlecode.d.ts +7 -0
  326. package/dist/src/ui/themes/googlecode.js +135 -0
  327. package/dist/src/ui/themes/googlecode.js.map +1 -0
  328. package/dist/src/ui/themes/no-color.d.ts +7 -0
  329. package/dist/src/ui/themes/no-color.js +84 -0
  330. package/dist/src/ui/themes/no-color.js.map +1 -0
  331. package/dist/src/ui/themes/qwen-dark.d.ts +7 -0
  332. package/dist/src/ui/themes/qwen-dark.js +102 -0
  333. package/dist/src/ui/themes/qwen-dark.js.map +1 -0
  334. package/dist/src/ui/themes/qwen-light.d.ts +7 -0
  335. package/dist/src/ui/themes/qwen-light.js +128 -0
  336. package/dist/src/ui/themes/qwen-light.js.map +1 -0
  337. package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
  338. package/dist/src/ui/themes/shades-of-purple.js +302 -0
  339. package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
  340. package/dist/src/ui/themes/theme-manager.d.ts +33 -0
  341. package/dist/src/ui/themes/theme-manager.js +119 -0
  342. package/dist/src/ui/themes/theme-manager.js.map +1 -0
  343. package/dist/src/ui/themes/theme.d.ts +67 -0
  344. package/dist/src/ui/themes/theme.js +304 -0
  345. package/dist/src/ui/themes/theme.js.map +1 -0
  346. package/dist/src/ui/themes/xcode.d.ts +7 -0
  347. package/dist/src/ui/themes/xcode.js +143 -0
  348. package/dist/src/ui/themes/xcode.js.map +1 -0
  349. package/dist/src/ui/types.d.ts +172 -0
  350. package/dist/src/ui/types.js +43 -0
  351. package/dist/src/ui/types.js.map +1 -0
  352. package/dist/src/ui/utils/CodeColorizer.d.ts +14 -0
  353. package/dist/src/ui/utils/CodeColorizer.js +97 -0
  354. package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
  355. package/dist/src/ui/utils/ConsolePatcher.d.ts +23 -0
  356. package/dist/src/ui/utils/ConsolePatcher.js +42 -0
  357. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
  358. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +16 -0
  359. package/dist/src/ui/utils/InlineMarkdownRenderer.js +104 -0
  360. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
  361. package/dist/src/ui/utils/MarkdownDisplay.d.ts +14 -0
  362. package/dist/src/ui/utils/MarkdownDisplay.js +205 -0
  363. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
  364. package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
  365. package/dist/src/ui/utils/TableRenderer.js +84 -0
  366. package/dist/src/ui/utils/TableRenderer.js.map +1 -0
  367. package/dist/src/ui/utils/clipboardUtils.d.ts +22 -0
  368. package/dist/src/ui/utils/clipboardUtils.js +127 -0
  369. package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
  370. package/dist/src/ui/utils/commandUtils.d.ts +22 -0
  371. package/dist/src/ui/utils/commandUtils.js +25 -0
  372. package/dist/src/ui/utils/commandUtils.js.map +1 -0
  373. package/dist/src/ui/utils/computeStats.d.ts +10 -0
  374. package/dist/src/ui/utils/computeStats.js +55 -0
  375. package/dist/src/ui/utils/computeStats.js.map +1 -0
  376. package/dist/src/ui/utils/displayUtils.d.ts +17 -0
  377. package/dist/src/ui/utils/displayUtils.js +24 -0
  378. package/dist/src/ui/utils/displayUtils.js.map +1 -0
  379. package/dist/src/ui/utils/errorParsing.d.ts +7 -0
  380. package/dist/src/ui/utils/errorParsing.js +90 -0
  381. package/dist/src/ui/utils/errorParsing.js.map +1 -0
  382. package/dist/src/ui/utils/formatters.d.ts +13 -0
  383. package/dist/src/ui/utils/formatters.js +56 -0
  384. package/dist/src/ui/utils/formatters.js.map +1 -0
  385. package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
  386. package/dist/src/ui/utils/markdownUtilities.js +110 -0
  387. package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
  388. package/dist/src/ui/utils/textUtils.d.ts +22 -0
  389. package/dist/src/ui/utils/textUtils.js +58 -0
  390. package/dist/src/ui/utils/textUtils.js.map +1 -0
  391. package/dist/src/ui/utils/updateCheck.d.ts +6 -0
  392. package/dist/src/ui/utils/updateCheck.js +36 -0
  393. package/dist/src/ui/utils/updateCheck.js.map +1 -0
  394. package/dist/src/utils/cleanup.d.ts +8 -0
  395. package/dist/src/utils/cleanup.js +34 -0
  396. package/dist/src/utils/cleanup.js.map +1 -0
  397. package/dist/src/utils/package.d.ts +12 -0
  398. package/dist/src/utils/package.js +24 -0
  399. package/dist/src/utils/package.js.map +1 -0
  400. package/dist/src/utils/readStdin.d.ts +6 -0
  401. package/dist/src/utils/readStdin.js +34 -0
  402. package/dist/src/utils/readStdin.js.map +1 -0
  403. package/dist/src/utils/sandbox.d.ts +7 -0
  404. package/dist/src/utils/sandbox.js +690 -0
  405. package/dist/src/utils/sandbox.js.map +1 -0
  406. package/dist/src/utils/startupWarnings.d.ts +6 -0
  407. package/dist/src/utils/startupWarnings.js +40 -0
  408. package/dist/src/utils/startupWarnings.js.map +1 -0
  409. package/dist/src/utils/userStartupWarnings.d.ts +6 -0
  410. package/dist/src/utils/userStartupWarnings.js +48 -0
  411. package/dist/src/utils/userStartupWarnings.js.map +1 -0
  412. package/dist/src/utils/version.d.ts +6 -0
  413. package/dist/src/utils/version.js +11 -0
  414. package/dist/src/utils/version.js.map +1 -0
  415. package/dist/tsconfig.tsbuildinfo +1 -0
  416. package/package.json +63 -69
  417. package/README.gemini.md +0 -162
  418. package/bundle/gemini.js +0 -291272
  419. /package/{bundle → dist/src/utils}/sandbox-macos-permissive-closed.sb +0 -0
  420. /package/{bundle → dist/src/utils}/sandbox-macos-permissive-open.sb +0 -0
  421. /package/{bundle → dist/src/utils}/sandbox-macos-permissive-proxied.sb +0 -0
  422. /package/{bundle → dist/src/utils}/sandbox-macos-restrictive-closed.sb +0 -0
  423. /package/{bundle → dist/src/utils}/sandbox-macos-restrictive-open.sb +0 -0
  424. /package/{bundle → dist/src/utils}/sandbox-macos-restrictive-proxied.sb +0 -0
@@ -0,0 +1,191 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { executeToolCall, shutdownTelemetry, isTelemetrySdkInitialized, } from '@qwen-code/qwen-code-core';
7
+ import { parseAndFormatApiError } from './ui/utils/errorParsing.js';
8
+ function getResponseText(response) {
9
+ if (response.candidates && response.candidates.length > 0) {
10
+ const candidate = response.candidates[0];
11
+ if (candidate.content &&
12
+ candidate.content.parts &&
13
+ candidate.content.parts.length > 0) {
14
+ // We are running in headless mode so we don't need to return thoughts to STDOUT.
15
+ const thoughtPart = candidate.content.parts[0];
16
+ if (thoughtPart?.thought) {
17
+ return null;
18
+ }
19
+ return candidate.content.parts
20
+ .filter((part) => part.text)
21
+ .map((part) => part.text)
22
+ .join('');
23
+ }
24
+ }
25
+ return null;
26
+ }
27
+ // Helper function to format tool call arguments for display
28
+ function formatToolArgs(args) {
29
+ if (!args || Object.keys(args).length === 0) {
30
+ return '(no arguments)';
31
+ }
32
+ const formattedArgs = Object.entries(args)
33
+ .map(([key, value]) => {
34
+ if (typeof value === 'string') {
35
+ return `${key}: "${value}"`;
36
+ }
37
+ else if (typeof value === 'object' && value !== null) {
38
+ return `${key}: ${JSON.stringify(value)}`;
39
+ }
40
+ else {
41
+ return `${key}: ${value}`;
42
+ }
43
+ })
44
+ .join(', ');
45
+ return `(${formattedArgs})`;
46
+ }
47
+ // Helper function to display tool call information
48
+ function displayToolCallInfo(toolName, args, status, resultDisplay, errorMessage) {
49
+ const timestamp = new Date().toLocaleTimeString();
50
+ const argsStr = formatToolArgs(args);
51
+ switch (status) {
52
+ case 'start':
53
+ process.stdout.write(`\n[${timestamp}] 🔧 Executing tool: ${toolName} ${argsStr}\n`);
54
+ break;
55
+ case 'success':
56
+ if (resultDisplay) {
57
+ if (typeof resultDisplay === 'string' && resultDisplay.trim()) {
58
+ process.stdout.write(`[${timestamp}] ✅ Tool ${toolName} completed successfully\n`);
59
+ process.stdout.write(`📋 Result:\n${resultDisplay}\n`);
60
+ }
61
+ else if (typeof resultDisplay === 'object' &&
62
+ 'fileDiff' in resultDisplay) {
63
+ process.stdout.write(`[${timestamp}] ✅ Tool ${toolName} completed successfully\n`);
64
+ process.stdout.write(`📋 File: ${resultDisplay.fileName}\n`);
65
+ process.stdout.write(`📋 Diff:\n${resultDisplay.fileDiff}\n`);
66
+ }
67
+ else {
68
+ process.stdout.write(`[${timestamp}] ✅ Tool ${toolName} completed successfully (no output)\n`);
69
+ }
70
+ }
71
+ else {
72
+ process.stdout.write(`[${timestamp}] ✅ Tool ${toolName} completed successfully (no output)\n`);
73
+ }
74
+ break;
75
+ case 'error':
76
+ process.stdout.write(`[${timestamp}] ❌ Tool ${toolName} failed: ${errorMessage}\n`);
77
+ break;
78
+ default:
79
+ process.stdout.write(`[${timestamp}] ⚠️ Tool ${toolName} reported unknown status: ${status}\n`);
80
+ break;
81
+ }
82
+ }
83
+ export async function runNonInteractive(config, input, prompt_id) {
84
+ await config.initialize();
85
+ // Handle EPIPE errors when the output is piped to a command that closes early.
86
+ process.stdout.on('error', (err) => {
87
+ if (err.code === 'EPIPE') {
88
+ // Exit gracefully if the pipe is closed.
89
+ process.exit(0);
90
+ }
91
+ });
92
+ const geminiClient = config.getGeminiClient();
93
+ const toolRegistry = await config.getToolRegistry();
94
+ const chat = await geminiClient.getChat();
95
+ const abortController = new AbortController();
96
+ let currentMessages = [{ role: 'user', parts: [{ text: input }] }];
97
+ let turnCount = 0;
98
+ try {
99
+ while (true) {
100
+ turnCount++;
101
+ if (config.getMaxSessionTurns() > 0 &&
102
+ turnCount > config.getMaxSessionTurns()) {
103
+ console.error('\n Reached max session turns for this session. Increase the number of turns by specifying maxSessionTurns in settings.json.');
104
+ return;
105
+ }
106
+ const functionCalls = [];
107
+ const responseStream = await chat.sendMessageStream({
108
+ message: currentMessages[0]?.parts || [], // Ensure parts are always provided
109
+ config: {
110
+ abortSignal: abortController.signal,
111
+ tools: [
112
+ { functionDeclarations: toolRegistry.getFunctionDeclarations() },
113
+ ],
114
+ },
115
+ }, prompt_id);
116
+ for await (const resp of responseStream) {
117
+ if (abortController.signal.aborted) {
118
+ console.error('Operation cancelled.');
119
+ return;
120
+ }
121
+ const textPart = getResponseText(resp);
122
+ if (textPart) {
123
+ process.stdout.write(textPart);
124
+ }
125
+ if (resp.functionCalls) {
126
+ functionCalls.push(...resp.functionCalls);
127
+ }
128
+ }
129
+ if (functionCalls.length > 0) {
130
+ const toolResponseParts = [];
131
+ for (const fc of functionCalls) {
132
+ const callId = fc.id ?? `${fc.name}-${Date.now()}`;
133
+ const requestInfo = {
134
+ callId,
135
+ name: fc.name,
136
+ args: (fc.args ?? {}),
137
+ isClientInitiated: false,
138
+ prompt_id,
139
+ };
140
+ //Display tool call start information
141
+ displayToolCallInfo(fc.name, fc.args ?? {}, 'start');
142
+ const toolResponse = await executeToolCall(config, requestInfo, toolRegistry, abortController.signal);
143
+ if (toolResponse.error) {
144
+ // Display tool call error information
145
+ const errorMessage = typeof toolResponse.resultDisplay === 'string'
146
+ ? toolResponse.resultDisplay
147
+ : toolResponse.error?.message;
148
+ displayToolCallInfo(fc.name, fc.args ?? {}, 'error', undefined, errorMessage);
149
+ const isToolNotFound = toolResponse.error.message.includes('not found in registry');
150
+ console.error(`Error executing tool ${fc.name}: ${toolResponse.resultDisplay || toolResponse.error.message}`);
151
+ if (!isToolNotFound) {
152
+ process.exit(1);
153
+ }
154
+ }
155
+ else {
156
+ // Display tool call success information
157
+ displayToolCallInfo(fc.name, fc.args ?? {}, 'success', toolResponse.resultDisplay);
158
+ }
159
+ if (toolResponse.responseParts) {
160
+ const parts = Array.isArray(toolResponse.responseParts)
161
+ ? toolResponse.responseParts
162
+ : [toolResponse.responseParts];
163
+ for (const part of parts) {
164
+ if (typeof part === 'string') {
165
+ toolResponseParts.push({ text: part });
166
+ }
167
+ else if (part) {
168
+ toolResponseParts.push(part);
169
+ }
170
+ }
171
+ }
172
+ }
173
+ currentMessages = [{ role: 'user', parts: toolResponseParts }];
174
+ }
175
+ else {
176
+ process.stdout.write('\n'); // Ensure a final newline
177
+ return;
178
+ }
179
+ }
180
+ }
181
+ catch (error) {
182
+ console.error(parseAndFormatApiError(error, config.getContentGeneratorConfig()?.authType));
183
+ process.exit(1);
184
+ }
185
+ finally {
186
+ if (isTelemetrySdkInitialized()) {
187
+ await shutdownTelemetry();
188
+ }
189
+ }
190
+ }
191
+ //# sourceMappingURL=nonInteractiveCli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nonInteractiveCli.js","sourceRoot":"","sources":["../../src/nonInteractiveCli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,eAAe,EAEf,iBAAiB,EACjB,yBAAyB,GAE1B,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,SAAS,eAAe,CAAC,QAAiC;IACxD,IAAI,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1D,MAAM,SAAS,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACzC,IACE,SAAS,CAAC,OAAO;YACjB,SAAS,CAAC,OAAO,CAAC,KAAK;YACvB,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAClC,CAAC;YACD,iFAAiF;YACjF,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC/C,IAAI,WAAW,EAAE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,CAAC,aAAa;4BAC5B,CAAC,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;wBACjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;4BACzB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gCAC7B,iBAAiB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;4BACzC,CAAC;iCAAM,IAAI,IAAI,EAAE,CAAC;gCAChB,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;4BAC/B,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;gBACD,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC,CAAC;YACjE,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,yBAAyB;gBACrD,OAAO;YACT,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CACX,sBAAsB,CACpB,KAAK,EACL,MAAM,CAAC,yBAAyB,EAAE,EAAE,QAAQ,CAC7C,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;YAAS,CAAC;QACT,IAAI,yBAAyB,EAAE,EAAE,CAAC;YAChC,MAAM,iBAAiB,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { SlashCommand } from '../ui/commands/types.js';
7
+ export declare class CommandService {
8
+ private commandLoader;
9
+ private commands;
10
+ constructor(commandLoader?: () => Promise<SlashCommand[]>);
11
+ loadCommands(): Promise<void>;
12
+ getCommands(): SlashCommand[];
13
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { memoryCommand } from '../ui/commands/memoryCommand.js';
7
+ import { helpCommand } from '../ui/commands/helpCommand.js';
8
+ import { clearCommand } from '../ui/commands/clearCommand.js';
9
+ import { authCommand } from '../ui/commands/authCommand.js';
10
+ import { themeCommand } from '../ui/commands/themeCommand.js';
11
+ import { privacyCommand } from '../ui/commands/privacyCommand.js';
12
+ import { aboutCommand } from '../ui/commands/aboutCommand.js';
13
+ const loadBuiltInCommands = async () => [
14
+ aboutCommand,
15
+ authCommand,
16
+ clearCommand,
17
+ helpCommand,
18
+ memoryCommand,
19
+ privacyCommand,
20
+ themeCommand,
21
+ ];
22
+ export class CommandService {
23
+ commandLoader;
24
+ commands = [];
25
+ constructor(commandLoader = loadBuiltInCommands) {
26
+ this.commandLoader = commandLoader;
27
+ // The constructor can be used for dependency injection in the future.
28
+ }
29
+ async loadCommands() {
30
+ // For now, we only load the built-in commands.
31
+ // File-based and remote commands will be added later.
32
+ this.commands = await this.commandLoader();
33
+ }
34
+ getCommands() {
35
+ return this.commands;
36
+ }
37
+ }
38
+ //# sourceMappingURL=CommandService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandService.js","sourceRoot":"","sources":["../../../src/services/CommandService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,mBAAmB,GAAG,KAAK,IAA6B,EAAE,CAAC;IAC/D,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;CACb,CAAC;AAEF,MAAM,OAAO,cAAc;IAIf;IAHF,QAAQ,GAAmB,EAAE,CAAC;IAEtC,YACU,gBAA+C,mBAAmB;QAAlE,kBAAa,GAAb,aAAa,CAAqD;QAE1E,sEAAsE;IACxE,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,+CAA+C;QAC/C,sDAAsD;QACtD,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;IAC7C,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { LoadedSettings } from '../config/settings.js';
7
+ import { type Config } from '@qwen-code/qwen-code-core';
8
+ interface AppProps {
9
+ config: Config;
10
+ settings: LoadedSettings;
11
+ startupWarnings?: string[];
12
+ version: string;
13
+ }
14
+ export declare const AppWrapper: (props: AppProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};