@qwen-code/qwen-code 0.0.1-alpha.12 → 0.0.1-alpha.13
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.
- package/README.md +169 -52
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +79 -0
- package/dist/src/config/auth.d.ts +9 -0
- package/dist/src/config/auth.js +48 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/config.d.ts +39 -0
- package/dist/src/config/config.js +318 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/extension.d.ts +21 -0
- package/dist/src/config/extension.js +109 -0
- package/dist/src/config/extension.js.map +1 -0
- package/dist/src/config/sandboxConfig.d.ts +13 -0
- package/dist/src/config/sandboxConfig.js +75 -0
- package/dist/src/config/sandboxConfig.js.map +1 -0
- package/dist/src/config/settings.d.ts +95 -0
- package/dist/src/config/settings.js +263 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/gemini.d.ts +6 -0
- package/dist/src/gemini.js +256 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +6 -0
- package/dist/src/generated/git-commit.js +9 -0
- package/dist/src/generated/git-commit.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +7 -0
- package/dist/src/nonInteractiveCli.js +191 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +13 -0
- package/dist/src/services/CommandService.js +38 -0
- package/dist/src/services/CommandService.js.map +1 -0
- package/dist/src/ui/App.d.ts +15 -0
- package/dist/src/ui/App.js +499 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/colors.d.ts +7 -0
- package/dist/src/ui/colors.js +48 -0
- package/dist/src/ui/colors.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
- package/dist/src/ui/commands/aboutCommand.js +37 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +14 -0
- package/dist/src/ui/commands/authCommand.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.d.ts +7 -0
- package/dist/src/ui/commands/clearCommand.js +16 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.d.ts +7 -0
- package/dist/src/ui/commands/helpCommand.js +18 -0
- package/dist/src/ui/commands/helpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/memoryCommand.js +81 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/privacyCommand.d.ts +7 -0
- package/dist/src/ui/commands/privacyCommand.js +14 -0
- package/dist/src/ui/commands/privacyCommand.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.d.ts +7 -0
- package/dist/src/ui/commands/themeCommand.js +14 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +64 -0
- package/dist/src/ui/commands/types.js +7 -0
- package/dist/src/ui/commands/types.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +16 -0
- package/dist/src/ui/components/AboutBox.js +6 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +7 -0
- package/dist/src/ui/components/AsciiArt.js +22 -0
- package/dist/src/ui/components/AsciiArt.js.map +1 -0
- package/dist/src/ui/components/AuthDialog.d.ts +15 -0
- package/dist/src/ui/components/AuthDialog.js +90 -0
- package/dist/src/ui/components/AuthDialog.js.map +1 -0
- package/dist/src/ui/components/AuthInProgress.d.ts +11 -0
- package/dist/src/ui/components/AuthInProgress.js +27 -0
- package/dist/src/ui/components/AuthInProgress.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +26 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +15 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +41 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +14 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js +34 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +15 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +73 -0
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
- package/dist/src/ui/components/Footer.d.ts +21 -0
- package/dist/src/ui/components/Footer.js +14 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +17 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +16 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
- package/dist/src/ui/components/Header.d.ts +14 -0
- package/dist/src/ui/components/Header.js +20 -0
- package/dist/src/ui/components/Header.js.map +1 -0
- package/dist/src/ui/components/Help.d.ts +12 -0
- package/dist/src/ui/components/Help.js +10 -0
- package/dist/src/ui/components/Help.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +18 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +17 -0
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +25 -0
- package/dist/src/ui/components/InputPrompt.js +338 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
- package/dist/src/ui/components/LoadingIndicator.js +20 -0
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +27 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +33 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.d.ts +12 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.js +118 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +4 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
- package/dist/src/ui/components/ShellModeIndicator.js +5 -0
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
- package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
- package/dist/src/ui/components/ShowMoreLines.js +24 -0
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.d.ts +12 -0
- package/dist/src/ui/components/StatsDisplay.js +42 -0
- package/dist/src/ui/components/StatsDisplay.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +21 -0
- package/dist/src/ui/components/SuggestionsDisplay.js +32 -0
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.d.ts +19 -0
- package/dist/src/ui/components/ThemeDialog.js +127 -0
- package/dist/src/ui/components/ThemeDialog.js.map +1 -0
- package/dist/src/ui/components/Tips.d.ts +12 -0
- package/dist/src/ui/components/Tips.js +8 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
- package/dist/src/ui/components/UpdateNotification.js +10 -0
- package/dist/src/ui/components/UpdateNotification.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/CompressionMessage.js +16 -0
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +15 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +212 -0
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
- package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessage.js +10 -0
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js +15 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/InfoMessage.js +9 -0
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +111 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +18 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +53 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolMessage.js +61 -0
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserMessage.js +9 -0
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
- package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js +384 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +44 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +100 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +184 -0
- package/dist/src/ui/components/shared/text-buffer.js +1010 -0
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
- package/dist/src/ui/constants.d.ts +8 -0
- package/dist/src/ui/constants.js +12 -0
- package/dist/src/ui/constants.js.map +1 -0
- package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
- package/dist/src/ui/contexts/OverflowContext.js +43 -0
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.d.ts +37 -0
- package/dist/src/ui/contexts/SessionContext.js +68 -0
- package/dist/src/ui/contexts/SessionContext.js.map +1 -0
- package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
- package/dist/src/ui/contexts/StreamingContext.js +15 -0
- package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
- package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
- package/dist/src/ui/editors/editorSettingsManager.js +54 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +31 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +310 -0
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +16 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +261 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +27 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +1042 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAuthCommand.d.ts +14 -0
- package/dist/src/ui/hooks/useAuthCommand.js +64 -0
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +37 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
- package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
- package/dist/src/ui/hooks/useCompletion.d.ts +21 -0
- package/dist/src/ui/hooks/useCompletion.js +375 -0
- package/dist/src/ui/hooks/useCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +12 -0
- package/dist/src/ui/hooks/useConsoleMessages.js +60 -0
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
- package/dist/src/ui/hooks/useEditorSettings.js +43 -0
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +23 -0
- package/dist/src/ui/hooks/useGeminiStream.js +579 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +61 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.d.ts +22 -0
- package/dist/src/ui/hooks/useHistoryManager.js +72 -0
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistory.js +84 -0
- package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/src/ui/hooks/useKeypress.d.ts +29 -0
- package/dist/src/ui/hooks/useKeypress.js +156 -0
- package/dist/src/ui/hooks/useKeypress.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js +44 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useLogger.d.ts +10 -0
- package/dist/src/ui/hooks/useLogger.js +29 -0
- package/dist/src/ui/hooks/useLogger.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +189 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +16 -0
- package/dist/src/ui/hooks/usePrivacySettings.js +115 -0
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +33 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js +186 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.d.ts +11 -0
- package/dist/src/ui/hooks/useShellHistory.js +89 -0
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js +58 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
- package/dist/src/ui/hooks/useStateAndRef.js +26 -0
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
- package/dist/src/ui/hooks/useTerminalSize.js +27 -0
- package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useThemeCommand.js +78 -0
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.d.ts +12 -0
- package/dist/src/ui/hooks/useTimer.js +58 -0
- package/dist/src/ui/hooks/useTimer.js.map +1 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +40 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +17 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js +17 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/PrivacyNotice.js +25 -0
- package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.d.ts +7 -0
- package/dist/src/ui/themes/ansi-light.js +139 -0
- package/dist/src/ui/themes/ansi-light.js.map +1 -0
- package/dist/src/ui/themes/ansi.d.ts +7 -0
- package/dist/src/ui/themes/ansi.js +149 -0
- package/dist/src/ui/themes/ansi.js.map +1 -0
- package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
- package/dist/src/ui/themes/atom-one-dark.js +136 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
- package/dist/src/ui/themes/ayu-light.d.ts +7 -0
- package/dist/src/ui/themes/ayu-light.js +128 -0
- package/dist/src/ui/themes/ayu-light.js.map +1 -0
- package/dist/src/ui/themes/ayu.d.ts +7 -0
- package/dist/src/ui/themes/ayu.js +102 -0
- package/dist/src/ui/themes/ayu.js.map +1 -0
- package/dist/src/ui/themes/default-light.d.ts +7 -0
- package/dist/src/ui/themes/default-light.js +100 -0
- package/dist/src/ui/themes/default-light.js.map +1 -0
- package/dist/src/ui/themes/default.d.ts +7 -0
- package/dist/src/ui/themes/default.js +143 -0
- package/dist/src/ui/themes/default.js.map +1 -0
- package/dist/src/ui/themes/dracula.d.ts +7 -0
- package/dist/src/ui/themes/dracula.js +113 -0
- package/dist/src/ui/themes/dracula.js.map +1 -0
- package/dist/src/ui/themes/github-dark.d.ts +7 -0
- package/dist/src/ui/themes/github-dark.js +136 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -0
- package/dist/src/ui/themes/github-light.d.ts +7 -0
- package/dist/src/ui/themes/github-light.js +138 -0
- package/dist/src/ui/themes/github-light.js.map +1 -0
- package/dist/src/ui/themes/googlecode.d.ts +7 -0
- package/dist/src/ui/themes/googlecode.js +135 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -0
- package/dist/src/ui/themes/no-color.d.ts +7 -0
- package/dist/src/ui/themes/no-color.js +84 -0
- package/dist/src/ui/themes/no-color.js.map +1 -0
- package/dist/src/ui/themes/qwen-dark.d.ts +7 -0
- package/dist/src/ui/themes/qwen-dark.js +102 -0
- package/dist/src/ui/themes/qwen-dark.js.map +1 -0
- package/dist/src/ui/themes/qwen-light.d.ts +7 -0
- package/dist/src/ui/themes/qwen-light.js +128 -0
- package/dist/src/ui/themes/qwen-light.js.map +1 -0
- package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
- package/dist/src/ui/themes/shades-of-purple.js +302 -0
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.d.ts +33 -0
- package/dist/src/ui/themes/theme-manager.js +119 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +67 -0
- package/dist/src/ui/themes/theme.js +304 -0
- package/dist/src/ui/themes/theme.js.map +1 -0
- package/dist/src/ui/themes/xcode.d.ts +7 -0
- package/dist/src/ui/themes/xcode.js +143 -0
- package/dist/src/ui/themes/xcode.js.map +1 -0
- package/dist/src/ui/types.d.ts +172 -0
- package/dist/src/ui/types.js +43 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.d.ts +14 -0
- package/dist/src/ui/utils/CodeColorizer.js +97 -0
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
- package/dist/src/ui/utils/ConsolePatcher.d.ts +23 -0
- package/dist/src/ui/utils/ConsolePatcher.js +42 -0
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +16 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +104 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +14 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +205 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
- package/dist/src/ui/utils/TableRenderer.js +84 -0
- package/dist/src/ui/utils/TableRenderer.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.d.ts +22 -0
- package/dist/src/ui/utils/clipboardUtils.js +127 -0
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +22 -0
- package/dist/src/ui/utils/commandUtils.js +25 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -0
- package/dist/src/ui/utils/computeStats.d.ts +10 -0
- package/dist/src/ui/utils/computeStats.js +55 -0
- package/dist/src/ui/utils/computeStats.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.d.ts +17 -0
- package/dist/src/ui/utils/displayUtils.js +24 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -0
- package/dist/src/ui/utils/errorParsing.d.ts +7 -0
- package/dist/src/ui/utils/errorParsing.js +90 -0
- package/dist/src/ui/utils/errorParsing.js.map +1 -0
- package/dist/src/ui/utils/formatters.d.ts +13 -0
- package/dist/src/ui/utils/formatters.js +56 -0
- package/dist/src/ui/utils/formatters.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.js +110 -0
- package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +22 -0
- package/dist/src/ui/utils/textUtils.js +58 -0
- package/dist/src/ui/utils/textUtils.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +6 -0
- package/dist/src/ui/utils/updateCheck.js +36 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +8 -0
- package/dist/src/utils/cleanup.js +34 -0
- package/dist/src/utils/cleanup.js.map +1 -0
- package/dist/src/utils/package.d.ts +12 -0
- package/dist/src/utils/package.js +24 -0
- package/dist/src/utils/package.js.map +1 -0
- package/dist/src/utils/readStdin.d.ts +6 -0
- package/dist/src/utils/readStdin.js +34 -0
- package/dist/src/utils/readStdin.js.map +1 -0
- package/dist/src/utils/sandbox.d.ts +7 -0
- package/dist/src/utils/sandbox.js +690 -0
- package/dist/src/utils/sandbox.js.map +1 -0
- package/dist/src/utils/startupWarnings.d.ts +6 -0
- package/dist/src/utils/startupWarnings.js +40 -0
- package/dist/src/utils/startupWarnings.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.js +48 -0
- package/dist/src/utils/userStartupWarnings.js.map +1 -0
- package/dist/src/utils/version.d.ts +6 -0
- package/dist/src/utils/version.js +11 -0
- package/dist/src/utils/version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +61 -70
- package/README.gemini.md +0 -162
- package/bundle/gemini.js +0 -291612
- /package/{bundle → dist/src/utils}/sandbox-macos-permissive-closed.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-permissive-open.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-permissive-proxied.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-restrictive-closed.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-restrictive-open.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-restrictive-proxied.sb +0 -0
package/README.md
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
# Qwen Code
|
|
2
2
|
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
3
5
|

|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/@qwen-code/qwen-code)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
[](https://nodejs.org/)
|
|
10
|
+
[](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.
|
|
6
19
|
|
|
7
20
|
> [!WARNING]
|
|
8
|
-
> Qwen Code may issue multiple API calls per cycle, resulting in higher token usage
|
|
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).
|
|
9
24
|
|
|
10
25
|
## Key Features
|
|
11
26
|
|
|
@@ -13,7 +28,7 @@ Qwen Code is a command-line AI workflow tool adapted from [**Gemini CLI**](https
|
|
|
13
28
|
- **Workflow Automation** - Automate operational tasks like handling pull requests and complex rebases
|
|
14
29
|
- **Enhanced Parser** - Adapted parser specifically optimized for Qwen-Coder models
|
|
15
30
|
|
|
16
|
-
##
|
|
31
|
+
## Installation
|
|
17
32
|
|
|
18
33
|
### Prerequisites
|
|
19
34
|
|
|
@@ -23,20 +38,14 @@ Ensure you have [Node.js version 20](https://nodejs.org/en/download) or higher i
|
|
|
23
38
|
curl -qL https://www.npmjs.com/install.sh | sh
|
|
24
39
|
```
|
|
25
40
|
|
|
26
|
-
###
|
|
41
|
+
### Install from npm
|
|
27
42
|
|
|
28
43
|
```bash
|
|
29
44
|
npm install -g @qwen-code/qwen-code@latest
|
|
30
45
|
qwen --version
|
|
31
46
|
```
|
|
32
47
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
qwen
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Or you can install it from source:
|
|
48
|
+
### Install from source
|
|
40
49
|
|
|
41
50
|
```bash
|
|
42
51
|
git clone https://github.com/QwenLM/qwen-code.git
|
|
@@ -45,8 +54,25 @@ npm install
|
|
|
45
54
|
npm install -g .
|
|
46
55
|
```
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
## Quick Start
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Start Qwen Code
|
|
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:
|
|
50
76
|
|
|
51
77
|
```json
|
|
52
78
|
{
|
|
@@ -54,17 +80,47 @@ For example, if you want to set the max session token limit to 32000, you can se
|
|
|
54
80
|
}
|
|
55
81
|
```
|
|
56
82
|
|
|
57
|
-
|
|
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.
|
|
58
90
|
|
|
59
91
|
### API Configuration
|
|
60
92
|
|
|
61
|
-
|
|
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
|
|
62
119
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
> **If you are not in mainland China, please go to https://modelstudio.console.alibabacloud.com/ to apply for your API key**
|
|
120
|
+
<details>
|
|
121
|
+
<summary><b>🇨🇳 For Users in Mainland China</b></summary>
|
|
66
122
|
|
|
67
|
-
|
|
123
|
+
**Option 1: Alibaba Cloud Bailian** ([Apply for API Key](https://bailian.console.aliyun.com/))
|
|
68
124
|
|
|
69
125
|
```bash
|
|
70
126
|
export OPENAI_API_KEY="your_api_key_here"
|
|
@@ -72,7 +128,10 @@ export OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
|
|
|
72
128
|
export OPENAI_MODEL="qwen3-coder-plus"
|
|
73
129
|
```
|
|
74
130
|
|
|
75
|
-
|
|
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
|
|
76
135
|
|
|
77
136
|
```bash
|
|
78
137
|
export OPENAI_API_KEY="your_api_key_here"
|
|
@@ -80,7 +139,12 @@ export OPENAI_BASE_URL="https://api-inference.modelscope.cn/v1"
|
|
|
80
139
|
export OPENAI_MODEL="Qwen/Qwen3-Coder-480B-A35B-Instruct"
|
|
81
140
|
```
|
|
82
141
|
|
|
83
|
-
|
|
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/))
|
|
84
148
|
|
|
85
149
|
```bash
|
|
86
150
|
export OPENAI_API_KEY="your_api_key_here"
|
|
@@ -88,83 +152,136 @@ export OPENAI_BASE_URL="https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
|
|
|
88
152
|
export OPENAI_MODEL="qwen3-coder-plus"
|
|
89
153
|
```
|
|
90
154
|
|
|
91
|
-
OpenRouter
|
|
155
|
+
**Option 2: OpenRouter (Free Tier Available)** ([Apply for API Key](https://openrouter.ai/))
|
|
92
156
|
|
|
93
157
|
```bash
|
|
94
158
|
export OPENAI_API_KEY="your_api_key_here"
|
|
95
|
-
export OPENAI_BASE_URL=https://openrouter.ai/api/v1
|
|
159
|
+
export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
|
|
96
160
|
export OPENAI_MODEL="qwen/qwen3-coder:free"
|
|
97
161
|
```
|
|
98
162
|
|
|
163
|
+
</details>
|
|
164
|
+
|
|
99
165
|
## Usage Examples
|
|
100
166
|
|
|
101
|
-
### Explore Codebases
|
|
167
|
+
### 🔍 Explore Codebases
|
|
102
168
|
|
|
103
|
-
```
|
|
169
|
+
```bash
|
|
104
170
|
cd your-project/
|
|
105
171
|
qwen
|
|
172
|
+
|
|
173
|
+
# Architecture analysis
|
|
106
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
|
|
107
177
|
```
|
|
108
178
|
|
|
109
|
-
### Code Development
|
|
179
|
+
### 💻 Code Development
|
|
110
180
|
|
|
111
|
-
```
|
|
181
|
+
```bash
|
|
182
|
+
# Refactoring
|
|
112
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
|
|
113
191
|
```
|
|
114
192
|
|
|
115
|
-
### Automate Workflows
|
|
193
|
+
### 🔄 Automate Workflows
|
|
116
194
|
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
|
|
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
|
|
120
200
|
|
|
121
|
-
|
|
201
|
+
# File operations
|
|
122
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
|
|
123
217
|
```
|
|
124
218
|
|
|
125
219
|
## Popular Tasks
|
|
126
220
|
|
|
127
|
-
### Understand New Codebases
|
|
221
|
+
### 📚 Understand New Codebases
|
|
128
222
|
|
|
129
223
|
```text
|
|
130
224
|
> What are the core business logic components?
|
|
131
225
|
> What security mechanisms are in place?
|
|
132
|
-
> How does the data flow
|
|
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
|
|
133
229
|
```
|
|
134
230
|
|
|
135
|
-
### Code Refactoring & Optimization
|
|
231
|
+
### 🔨 Code Refactoring & Optimization
|
|
136
232
|
|
|
137
233
|
```text
|
|
138
234
|
> What parts of this module can be optimized?
|
|
139
|
-
> Help me refactor this class to follow
|
|
235
|
+
> Help me refactor this class to follow SOLID principles
|
|
140
236
|
> Add proper error handling and logging
|
|
237
|
+
> Convert callbacks to async/await pattern
|
|
238
|
+
> Implement caching for expensive operations
|
|
141
239
|
```
|
|
142
240
|
|
|
143
|
-
### Documentation & Testing
|
|
241
|
+
### 📝 Documentation & Testing
|
|
144
242
|
|
|
145
243
|
```text
|
|
146
|
-
> Generate comprehensive JSDoc comments for
|
|
147
|
-
> Write unit tests for this component
|
|
148
|
-
> 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
|
|
149
249
|
```
|
|
150
250
|
|
|
251
|
+
### 🚀 Development Acceleration
|
|
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
|
|
259
|
+
```
|
|
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
|
+
|
|
151
277
|
## Benchmark Results
|
|
152
278
|
|
|
153
|
-
### Terminal-Bench
|
|
279
|
+
### Terminal-Bench Performance
|
|
154
280
|
|
|
155
281
|
| Agent | Model | Accuracy |
|
|
156
282
|
| --------- | ------------------ | -------- |
|
|
157
|
-
| Qwen Code | Qwen3-Coder-480A35 | 37.5
|
|
158
|
-
|
|
159
|
-
## Project Structure
|
|
160
|
-
|
|
161
|
-
```
|
|
162
|
-
qwen-code/
|
|
163
|
-
├── packages/ # Core packages
|
|
164
|
-
├── docs/ # Documentation
|
|
165
|
-
├── examples/ # Example code
|
|
166
|
-
└── tests/ # Test files
|
|
167
|
-
```
|
|
283
|
+
| Qwen Code | Qwen3-Coder-480A35 | 37.5% |
|
|
284
|
+
| Qwen Code | Qwen3-Coder-30BA3B | 31.3% |
|
|
168
285
|
|
|
169
286
|
## Development & Contributing
|
|
170
287
|
|
package/dist/.last_build
ADDED
|
File without changes
|
package/dist/index.d.ts
ADDED
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.1-alpha.13",
|
|
4
|
+
"description": "Gemini CLI",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+http://gitlab.alibaba-inc.com/Qwen-Coder/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.1-alpha.13"
|
|
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>;
|