@qwen-code/qwen-code 0.0.1 → 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 -291384
  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
package/README.md CHANGED
@@ -1,113 +1,287 @@
1
1
  # Qwen Code
2
2
 
3
+ <div align="center">
4
+
3
5
  ![Qwen Code Screenshot](./docs/assets/qwen-screenshot.png)
4
6
 
5
- Qwen Code is a command-line AI workflow tool adapted from [**Gemini CLI**](https://github.com/google-gemini/gemini-cli)(Please refer to [this document](./README.gemini.md) for more details), optimized for Qwen-Coder models with enhanced parser support & tool support.
7
+ [![npm version](https://img.shields.io/npm/v/@qwen-code/qwen-code.svg)](https://www.npmjs.com/package/@qwen-code/qwen-code)
8
+ [![License](https://img.shields.io/github/license/QwenLM/qwen-code.svg)](./LICENSE)
9
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)](https://nodejs.org/)
10
+ [![Downloads](https://img.shields.io/npm/dm/@qwen-code/qwen-code.svg)](https://www.npmjs.com/package/@qwen-code/qwen-code)
11
+
12
+ **AI-powered command-line workflow tool for developers**
13
+
14
+ [Installation](#installation) • [Quick Start](#quick-start) • [Features](#key-features) • [Documentation](./docs/) • [Contributing](./CONTRIBUTING.md)
15
+
16
+ </div>
17
+
18
+ Qwen Code is a powerful command-line AI workflow tool adapted from [**Gemini CLI**](https://github.com/google-gemini/gemini-cli) ([details](./README.gemini.md)), specifically optimized for [Qwen3-Coder](https://github.com/QwenLM/Qwen3-Coder) models. It enhances your development workflow with advanced code understanding, automated tasks, and intelligent assistance.
19
+
20
+ > [!WARNING]
21
+ > **Token Usage Notice**: Qwen Code may issue multiple API calls per cycle, resulting in higher token usage (similar to Claude Code). We're actively optimizing API efficiency.
22
+ >
23
+ > 💡 **Free Option**: ModelScope provides **2,000 free API calls per day** for users in mainland China. OpenRouter offers up to **1,000 free API calls per day** worldwide. For setup instructions, see [API Configuration](#api-configuration).
6
24
 
7
25
  ## Key Features
8
26
 
9
27
  - **Code Understanding & Editing** - Query and edit large codebases beyond traditional context window limits
10
- - **Multimodal Capabilities** - Generate new apps from PDFs or sketches with image understanding
11
28
  - **Workflow Automation** - Automate operational tasks like handling pull requests and complex rebases
12
- - **Tool Integration** - Connect new capabilities through MCP servers
13
29
  - **Enhanced Parser** - Adapted parser specifically optimized for Qwen-Coder models
14
30
 
15
- ## Main Changes
31
+ ## Installation
16
32
 
17
- Compared to the original Gemini CLI, key adaptations include:
33
+ ### Prerequisites
18
34
 
19
- - Modified parser to work seamlessly with Qwen-Coder model responses
20
- - Optimized model interaction logic for Qwen series models
35
+ Ensure you have [Node.js version 20](https://nodejs.org/en/download) or higher installed.
21
36
 
22
- ## Quick Start
37
+ ```bash
38
+ curl -qL https://www.npmjs.com/install.sh | sh
39
+ ```
23
40
 
24
- ### Prerequisites
41
+ ### Install from npm
25
42
 
26
- Ensure you have [Node.js version 20](https://nodejs.org/en/download) or higher installed.
43
+ ```bash
44
+ npm install -g @qwen-code/qwen-code@latest
45
+ qwen --version
46
+ ```
27
47
 
28
- ### Installation
48
+ ### Install from source
29
49
 
30
50
  ```bash
31
- npm install -g @qwen-code/qwen-code
51
+ git clone https://github.com/QwenLM/qwen-code.git
52
+ cd qwen-code
53
+ npm install
54
+ npm install -g .
32
55
  ```
33
56
 
34
- Then run from anywhere:
57
+ ## Quick Start
35
58
 
36
59
  ```bash
60
+ # Start Qwen Code
37
61
  qwen
62
+
63
+ # Example commands
64
+ > Explain this codebase structure
65
+ > Help me refactor this function
66
+ > Generate unit tests for this module
67
+ ```
68
+
69
+ ### Session Management
70
+
71
+ Control your token usage with configurable session limits to optimize costs and performance.
72
+
73
+ #### Configure Session Token Limit
74
+
75
+ Create or edit `.qwen/settings.json` in your home directory:
76
+
77
+ ```json
78
+ {
79
+ "sessionTokenLimit": 32000
80
+ }
38
81
  ```
39
82
 
83
+ #### Session Commands
84
+
85
+ - **`/compress`** - Compress conversation history to continue within token limits
86
+ - **`/clear`** - Clear all conversation history and start fresh
87
+ - **`/status`** - Check current token usage and limits
88
+
89
+ > 📝 **Note**: Session token limit applies to a single conversation, not cumulative API calls.
90
+
40
91
  ### API Configuration
41
92
 
42
- Set your Qwen API key (In Qwen Code project, you can also set your API key in `.env` file):
93
+ Qwen Code supports multiple API providers. You can configure your API key through environment variables or a `.env` file in your project root.
94
+
95
+ #### Configuration Methods
96
+
97
+ 1. **Environment Variables**
98
+
99
+ ```bash
100
+ export OPENAI_API_KEY="your_api_key_here"
101
+ export OPENAI_BASE_URL="your_api_endpoint"
102
+ export OPENAI_MODEL="your_model_choice"
103
+ ```
104
+
105
+ 2. **Project `.env` File**
106
+ Create a `.env` file in your project root:
107
+ ```env
108
+ OPENAI_API_KEY=your_api_key_here
109
+ OPENAI_BASE_URL=your_api_endpoint
110
+ OPENAI_MODEL=your_model_choice
111
+ ```
112
+
113
+ #### API Provider Options
114
+
115
+ > ⚠️ **Regional Notice:**
116
+ >
117
+ > - **Mainland China**: Use Alibaba Cloud Bailian or ModelScope
118
+ > - **International**: Use Alibaba Cloud ModelStudio or OpenRouter
119
+
120
+ <details>
121
+ <summary><b>🇨🇳 For Users in Mainland China</b></summary>
122
+
123
+ **Option 1: Alibaba Cloud Bailian** ([Apply for API Key](https://bailian.console.aliyun.com/))
124
+
125
+ ```bash
126
+ export OPENAI_API_KEY="your_api_key_here"
127
+ export OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
128
+ export OPENAI_MODEL="qwen3-coder-plus"
129
+ ```
130
+
131
+ **Option 2: ModelScope (Free Tier)** ([Apply for API Key](https://modelscope.cn/docs/model-service/API-Inference/intro))
132
+
133
+ - ✅ **2,000 free API calls per day**
134
+ - ⚠️ Connect your Aliyun account to avoid authentication errors
135
+
136
+ ```bash
137
+ export OPENAI_API_KEY="your_api_key_here"
138
+ export OPENAI_BASE_URL="https://api-inference.modelscope.cn/v1"
139
+ export OPENAI_MODEL="Qwen/Qwen3-Coder-480B-A35B-Instruct"
140
+ ```
141
+
142
+ </details>
143
+
144
+ <details>
145
+ <summary><b>🌍 For International Users</b></summary>
146
+
147
+ **Option 1: Alibaba Cloud ModelStudio** ([Apply for API Key](https://modelstudio.console.alibabacloud.com/))
43
148
 
44
149
  ```bash
45
150
  export OPENAI_API_KEY="your_api_key_here"
46
- export OPENAI_BASE_URL="your_api_base_url_here"
47
- export OPENAI_MODEL="your_api_model_here"
151
+ export OPENAI_BASE_URL="https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
152
+ export OPENAI_MODEL="qwen3-coder-plus"
48
153
  ```
49
154
 
155
+ **Option 2: OpenRouter (Free Tier Available)** ([Apply for API Key](https://openrouter.ai/))
156
+
157
+ ```bash
158
+ export OPENAI_API_KEY="your_api_key_here"
159
+ export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
160
+ export OPENAI_MODEL="qwen/qwen3-coder:free"
161
+ ```
162
+
163
+ </details>
164
+
50
165
  ## Usage Examples
51
166
 
52
- ### Explore Codebases
167
+ ### 🔍 Explore Codebases
53
168
 
54
- ```sh
169
+ ```bash
55
170
  cd your-project/
56
171
  qwen
172
+
173
+ # Architecture analysis
57
174
  > Describe the main pieces of this system's architecture
175
+ > What are the key dependencies and how do they interact?
176
+ > Find all API endpoints and their authentication methods
58
177
  ```
59
178
 
60
- ### Code Development
179
+ ### 💻 Code Development
61
180
 
62
- ```sh
181
+ ```bash
182
+ # Refactoring
63
183
  > Refactor this function to improve readability and performance
184
+ > Convert this class to use dependency injection
185
+ > Split this large module into smaller, focused components
186
+
187
+ # Code generation
188
+ > Create a REST API endpoint for user management
189
+ > Generate unit tests for the authentication module
190
+ > Add error handling to all database operations
64
191
  ```
65
192
 
66
- ### Automate Workflows
193
+ ### 🔄 Automate Workflows
67
194
 
68
- ```sh
69
- > Analyze git commits from the last 7 days, grouped by feature and team member
70
- ```
195
+ ```bash
196
+ # Git automation
197
+ > Analyze git commits from the last 7 days, grouped by feature
198
+ > Create a changelog from recent commits
199
+ > Find all TODO comments and create GitHub issues
71
200
 
72
- ```sh
201
+ # File operations
73
202
  > Convert all images in this directory to PNG format
203
+ > Rename all test files to follow the *.test.ts pattern
204
+ > Find and remove all console.log statements
205
+ ```
206
+
207
+ ### 🐛 Debugging & Analysis
208
+
209
+ ```bash
210
+ # Performance analysis
211
+ > Identify performance bottlenecks in this React component
212
+ > Find all N+1 query problems in the codebase
213
+
214
+ # Security audit
215
+ > Check for potential SQL injection vulnerabilities
216
+ > Find all hardcoded credentials or API keys
74
217
  ```
75
218
 
76
219
  ## Popular Tasks
77
220
 
78
- ### Understand New Codebases
221
+ ### 📚 Understand New Codebases
79
222
 
80
223
  ```text
81
224
  > What are the core business logic components?
82
225
  > What security mechanisms are in place?
83
- > How does the data flow work?
226
+ > How does the data flow through the system?
227
+ > What are the main design patterns used?
228
+ > Generate a dependency graph for this module
84
229
  ```
85
230
 
86
- ### Code Refactoring & Optimization
231
+ ### 🔨 Code Refactoring & Optimization
87
232
 
88
233
  ```text
89
234
  > What parts of this module can be optimized?
90
- > Help me refactor this class to follow better design patterns
235
+ > Help me refactor this class to follow SOLID principles
91
236
  > Add proper error handling and logging
237
+ > Convert callbacks to async/await pattern
238
+ > Implement caching for expensive operations
92
239
  ```
93
240
 
94
- ### Documentation & Testing
241
+ ### 📝 Documentation & Testing
95
242
 
96
243
  ```text
97
- > Generate comprehensive JSDoc comments for this function
98
- > Write unit tests for this component
99
- > Create API documentation
244
+ > Generate comprehensive JSDoc comments for all public APIs
245
+ > Write unit tests with edge cases for this component
246
+ > Create API documentation in OpenAPI format
247
+ > Add inline comments explaining complex algorithms
248
+ > Generate a README for this module
100
249
  ```
101
250
 
102
- ## Project Structure
251
+ ### 🚀 Development Acceleration
103
252
 
253
+ ```text
254
+ > Set up a new Express server with authentication
255
+ > Create a React component with TypeScript and tests
256
+ > Implement a rate limiter middleware
257
+ > Add database migrations for new schema
258
+ > Configure CI/CD pipeline for this project
104
259
  ```
105
- qwen-code/
106
- ├── packages/ # Core packages
107
- ├── docs/ # Documentation
108
- ├── examples/ # Example code
109
- └── tests/ # Test files
110
- ```
260
+
261
+ ## Commands & Shortcuts
262
+
263
+ ### Session Commands
264
+
265
+ - `/help` - Display available commands
266
+ - `/clear` - Clear conversation history
267
+ - `/compress` - Compress history to save tokens
268
+ - `/status` - Show current session information
269
+ - `/exit` or `/quit` - Exit Qwen Code
270
+
271
+ ### Keyboard Shortcuts
272
+
273
+ - `Ctrl+C` - Cancel current operation
274
+ - `Ctrl+D` - Exit (on empty line)
275
+ - `Up/Down` - Navigate command history
276
+
277
+ ## Benchmark Results
278
+
279
+ ### Terminal-Bench Performance
280
+
281
+ | Agent | Model | Accuracy |
282
+ | --------- | ------------------ | -------- |
283
+ | Qwen Code | Qwen3-Coder-480A35 | 37.5% |
284
+ | Qwen Code | Qwen3-Coder-30BA3B | 31.3% |
111
285
 
112
286
  ## Development & Contributing
113
287
 
@@ -119,8 +293,12 @@ If you encounter issues, check the [troubleshooting guide](docs/troubleshooting.
119
293
 
120
294
  ## Acknowledgments
121
295
 
122
- This project is based on [Google Gemini CLI](https://github.com/google-gemini/gemini-cli). We acknowledge and appreciate the excellent work of the original team. Our main contribution focuses on parser-level adaptations to better support Qwen-Coder models.
296
+ This project is based on [Google Gemini CLI](https://github.com/google-gemini/gemini-cli). We acknowledge and appreciate the excellent work of the Gemini CLI team. Our main contribution focuses on parser-level adaptations to better support Qwen-Coder models.
123
297
 
124
298
  ## License
125
299
 
126
300
  [LICENSE](./LICENSE)
301
+
302
+ ## Star History
303
+
304
+ [![Star History Chart](https://api.star-history.com/svg?repos=QwenLM/qwen-code&type=Date)](https://www.star-history.com/#QwenLM/qwen-code&Date)
File without changes
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @license
4
+ * Copyright 2025 Google LLC
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ import './src/gemini.js';
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @license
4
+ * Copyright 2025 Google LLC
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ import './src/gemini.js';
8
+ import { main } from './src/gemini.js';
9
+ // --- Global Entry Point ---
10
+ main().catch((error) => {
11
+ console.error('An unexpected critical error occurred:');
12
+ if (error instanceof Error) {
13
+ console.error(error.stack);
14
+ }
15
+ else {
16
+ console.error(String(error));
17
+ }
18
+ process.exit(1);
19
+ });
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,6BAA6B;AAC7B,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;IACxD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@qwen-code/qwen-code",
3
+ "version": "0.0.2",
4
+ "description": "Qwen Code",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/QwenLM/qwen-code.git"
8
+ },
9
+ "type": "module",
10
+ "main": "dist/index.js",
11
+ "bin": {
12
+ "qwen": "dist/index.js"
13
+ },
14
+ "scripts": {
15
+ "build": "node ../../scripts/build_package.js",
16
+ "start": "node dist/index.js",
17
+ "debug": "node --inspect-brk dist/index.js",
18
+ "lint": "eslint . --ext .ts,.tsx",
19
+ "format": "prettier --write .",
20
+ "test": "vitest run",
21
+ "test:ci": "vitest run --coverage",
22
+ "typecheck": "tsc --noEmit"
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "config": {
28
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.2"
29
+ },
30
+ "dependencies": {
31
+ "@qwen-code/qwen-code-core": "file:../core",
32
+ "@types/update-notifier": "^6.0.8",
33
+ "command-exists": "^1.2.9",
34
+ "diff": "^7.0.0",
35
+ "dotenv": "^17.1.0",
36
+ "gaxios": "^7.1.1",
37
+ "glob": "^10.4.1",
38
+ "highlight.js": "^11.11.1",
39
+ "ink": "^6.0.1",
40
+ "ink-big-text": "^2.0.0",
41
+ "ink-gradient": "^3.0.0",
42
+ "ink-link": "^4.1.0",
43
+ "ink-select-input": "^6.2.0",
44
+ "ink-spinner": "^5.0.0",
45
+ "lowlight": "^3.3.0",
46
+ "mime-types": "^3.0.1",
47
+ "open": "^10.1.2",
48
+ "react": "^19.1.0",
49
+ "read-package-up": "^11.0.0",
50
+ "shell-quote": "^1.8.3",
51
+ "string-width": "^7.1.0",
52
+ "strip-ansi": "^7.1.0",
53
+ "strip-json-comments": "^3.1.1",
54
+ "update-notifier": "^7.3.1",
55
+ "yargs": "^18.0.0"
56
+ },
57
+ "devDependencies": {
58
+ "@babel/runtime": "^7.27.6",
59
+ "@testing-library/react": "^16.3.0",
60
+ "@types/command-exists": "^1.2.3",
61
+ "@types/diff": "^7.0.2",
62
+ "@types/dotenv": "^6.1.1",
63
+ "@types/node": "^20.11.24",
64
+ "@types/react": "^19.1.8",
65
+ "@types/react-dom": "^19.1.6",
66
+ "@types/semver": "^7.7.0",
67
+ "@types/shell-quote": "^1.7.5",
68
+ "@types/yargs": "^17.0.32",
69
+ "ink-testing-library": "^4.0.0",
70
+ "jsdom": "^26.1.0",
71
+ "pretty-format": "^30.0.2",
72
+ "react-dom": "^19.1.0",
73
+ "typescript": "^5.3.3",
74
+ "vitest": "^3.1.1"
75
+ },
76
+ "engines": {
77
+ "node": ">=20"
78
+ }
79
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare const validateAuthMethod: (authMethod: string) => string | null;
7
+ export declare const setOpenAIApiKey: (apiKey: string) => void;
8
+ export declare const setOpenAIBaseUrl: (baseUrl: string) => void;
9
+ export declare const setOpenAIModel: (model: string) => void;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { AuthType } from '@qwen-code/qwen-code-core';
7
+ import { loadEnvironment } from './settings.js';
8
+ export const validateAuthMethod = (authMethod) => {
9
+ loadEnvironment();
10
+ if (authMethod === AuthType.LOGIN_WITH_GOOGLE ||
11
+ authMethod === AuthType.CLOUD_SHELL) {
12
+ return null;
13
+ }
14
+ if (authMethod === AuthType.USE_GEMINI) {
15
+ if (!process.env.GEMINI_API_KEY) {
16
+ return 'GEMINI_API_KEY environment variable not found. Add that to your environment and try again (no reload needed if using .env)!';
17
+ }
18
+ return null;
19
+ }
20
+ if (authMethod === AuthType.USE_VERTEX_AI) {
21
+ const hasVertexProjectLocationConfig = !!process.env.GOOGLE_CLOUD_PROJECT && !!process.env.GOOGLE_CLOUD_LOCATION;
22
+ const hasGoogleApiKey = !!process.env.GOOGLE_API_KEY;
23
+ if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
24
+ return ('When using Vertex AI, you must specify either:\n' +
25
+ '• GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION environment variables.\n' +
26
+ '• GOOGLE_API_KEY environment variable (if using express mode).\n' +
27
+ 'Update your environment and try again (no reload needed if using .env)!');
28
+ }
29
+ return null;
30
+ }
31
+ if (authMethod === AuthType.USE_OPENAI) {
32
+ if (!process.env.OPENAI_API_KEY) {
33
+ return 'OPENAI_API_KEY environment variable not found. You can enter it interactively or add it to your .env file.';
34
+ }
35
+ return null;
36
+ }
37
+ return 'Invalid auth method selected.';
38
+ };
39
+ export const setOpenAIApiKey = (apiKey) => {
40
+ process.env.OPENAI_API_KEY = apiKey;
41
+ };
42
+ export const setOpenAIBaseUrl = (baseUrl) => {
43
+ process.env.OPENAI_BASE_URL = baseUrl;
44
+ };
45
+ export const setOpenAIModel = (model) => {
46
+ process.env.OPENAI_MODEL = model;
47
+ };
48
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/config/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAAkB,EAAiB,EAAE;IACtE,eAAe,EAAE,CAAC;IAClB,IACE,UAAU,KAAK,QAAQ,CAAC,iBAAiB;QACzC,UAAU,KAAK,QAAQ,CAAC,WAAW,EACnC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,UAAU,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;YAChC,OAAO,6HAA6H,CAAC;QACvI,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,UAAU,KAAK,QAAQ,CAAC,aAAa,EAAE,CAAC;QAC1C,MAAM,8BAA8B,GAClC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;QAC5E,MAAM,eAAe,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;QACrD,IAAI,CAAC,8BAA8B,IAAI,CAAC,eAAe,EAAE,CAAC;YACxD,OAAO,CACL,kDAAkD;gBAClD,2EAA2E;gBAC3E,kEAAkE;gBAClE,yEAAyE,CAC1E,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,UAAU,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;YAChC,OAAO,4GAA4G,CAAC;QACtH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,+BAA+B,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAc,EAAQ,EAAE;IACtD,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,MAAM,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAQ,EAAE;IACxD,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,OAAO,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAQ,EAAE;IACpD,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC;AACnC,CAAC,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Config, FileDiscoveryService } from '@qwen-code/qwen-code-core';
7
+ import { Settings } from './settings.js';
8
+ import { Extension } from './extension.js';
9
+ export interface CliArgs {
10
+ model: string | undefined;
11
+ sandbox: boolean | string | undefined;
12
+ sandboxImage: string | undefined;
13
+ debug: boolean | undefined;
14
+ prompt: string | undefined;
15
+ promptInteractive: string | undefined;
16
+ allFiles: boolean | undefined;
17
+ all_files: boolean | undefined;
18
+ showMemoryUsage: boolean | undefined;
19
+ show_memory_usage: boolean | undefined;
20
+ yolo: boolean | undefined;
21
+ telemetry: boolean | undefined;
22
+ checkpointing: boolean | undefined;
23
+ telemetryTarget: string | undefined;
24
+ telemetryOtlpEndpoint: string | undefined;
25
+ telemetryLogPrompts: boolean | undefined;
26
+ allowedMcpServerNames: string[] | undefined;
27
+ extensions: string[] | undefined;
28
+ listExtensions: boolean | undefined;
29
+ ideMode: boolean | undefined;
30
+ openaiLogging: boolean | undefined;
31
+ openaiApiKey: string | undefined;
32
+ openaiBaseUrl: string | undefined;
33
+ }
34
+ export declare function parseArguments(): Promise<CliArgs>;
35
+ export declare function loadHierarchicalGeminiMemory(currentWorkingDirectory: string, debugMode: boolean, fileService: FileDiscoveryService, extensionContextFilePaths?: string[]): Promise<{
36
+ memoryContent: string;
37
+ fileCount: number;
38
+ }>;
39
+ export declare function loadCliConfig(settings: Settings, extensions: Extension[], sessionId: string, argv: CliArgs): Promise<Config>;