diff --git a/.github/workflows/release-sdk.yml b/.github/workflows/release-sdk.yml index 69192520..c5e30ee9 100644 --- a/.github/workflows/release-sdk.yml +++ b/.github/workflows/release-sdk.yml @@ -121,6 +121,11 @@ jobs: IS_PREVIEW: '${{ steps.vars.outputs.is_preview }}' MANUAL_VERSION: '${{ inputs.version }}' + - name: 'Build CLI Bundle' + run: | + npm run build + npm run bundle + - name: 'Run Tests' if: |- ${{ github.event.inputs.force_skip_tests != 'true' }} @@ -132,13 +137,6 @@ jobs: OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}' - - name: 'Build CLI for Integration Tests' - if: |- - ${{ github.event.inputs.force_skip_tests != 'true' }} - run: | - npm run build - npm run bundle - - name: 'Run SDK Integration Tests' if: |- ${{ github.event.inputs.force_skip_tests != 'true' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c4ff85a..ffcda3dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -133,8 +133,8 @@ jobs: ${{ github.event.inputs.force_skip_tests != 'true' }} run: | npm run preflight - npm run test:integration:sandbox:none - npm run test:integration:sandbox:docker + npm run test:integration:cli:sandbox:none + npm run test:integration:cli:sandbox:docker env: OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}' OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}' diff --git a/docs/developers/tools/mcp-server.md b/docs/developers/tools/mcp-server.md index 4a75b1fc..8d48970a 100644 --- a/docs/developers/tools/mcp-server.md +++ b/docs/developers/tools/mcp-server.md @@ -627,7 +627,12 @@ The MCP integration tracks several states: ### Schema Compatibility -- **Property stripping:** The system automatically removes certain schema properties (`$schema`, `additionalProperties`) for Qwen API compatibility +- **Schema compliance mode:** By default (`schemaCompliance: "auto"`), tool schemas are passed through as-is. Set `"model": { "generationConfig": { "schemaCompliance": "openapi_30" } }` in your `settings.json` to convert models to Strict OpenAPI 3.0 format. +- **OpenAPI 3.0 transformations:** When `openapi_30` mode is enabled, the system handles: + - Nullable types: `["string", "null"]` -> `type: "string", nullable: true` + - Const values: `const: "foo"` -> `enum: ["foo"]` + - Exclusive limits: numeric `exclusiveMinimum` -> boolean form with `minimum` + - Keyword removal: `$schema`, `$id`, `dependencies`, `patternProperties` - **Name sanitization:** Tool names are automatically sanitized to meet API requirements - **Conflict resolution:** Tool name conflicts between servers are resolved through automatic prefixing diff --git a/docs/index.md b/docs/index.md index 802c6899..ff8a4803 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,7 +14,7 @@ Learn how to use Qwen Code as an end user. This section covers: - Configuration options - Troubleshooting -### [Developer Guide](./developers/contributing) +### [Developer Guide](./developers/architecture) Learn how to contribute to and develop Qwen Code. This section covers: diff --git a/docs/users/common-workflow.md b/docs/users/common-workflow.md index 5dde4a97..078447cf 100644 --- a/docs/users/common-workflow.md +++ b/docs/users/common-workflow.md @@ -189,8 +189,8 @@ Then select "create" and follow the prompts to define: > - Create project-specific subagents in `.qwen/agents/` for team sharing > - Use descriptive `description` fields to enable automatic delegation > - Limit tool access to what each subagent actually needs -> - Know more about [Sub Agents](/users/features/sub-agents) -> - Know more about [Approval Mode](/users/features/approval-mode) +> - Know more about [Sub Agents](./features/sub-agents) +> - Know more about [Approval Mode](./features/approval-mode) ## Work with tests @@ -318,7 +318,7 @@ This provides a directory listing with file information. Show me the data from @github: repos/owner/repo/issues ``` -This fetches data from connected MCP servers using the format @server: resource. See [MCP](/users/features/mcp) for details. +This fetches data from connected MCP servers using the format @server: resource. See [MCP](./features/mcp) for details. > [!tip] > diff --git a/docs/users/configuration/qwen-ignore.md b/docs/users/configuration/qwen-ignore.md index 25087657..9b992bda 100644 --- a/docs/users/configuration/qwen-ignore.md +++ b/docs/users/configuration/qwen-ignore.md @@ -6,7 +6,7 @@ Qwen Code includes the ability to automatically ignore files, similar to `.gitig ## How it works -When you add a path to your `.qwenignore` file, tools that respect this file will exclude matching files and directories from their operations. For example, when you use the [`read_many_files`](/developers/tools/multi-file) command, any paths in your `.qwenignore` file will be automatically excluded. +When you add a path to your `.qwenignore` file, tools that respect this file will exclude matching files and directories from their operations. For example, when you use the [`read_many_files`](../../developers/tools/multi-file) command, any paths in your `.qwenignore` file will be automatically excluded. For the most part, `.qwenignore` follows the conventions of `.gitignore` files: @@ -20,9 +20,9 @@ You can update your `.qwenignore` file at any time. To apply the changes, you mu ## How to use `.qwenignore` -| Step | Description | -| ---------------------- | ------------------------------------------------------------ | -| **Enable .qwenignore** | Create a file named `.qwenignore` in your project root directory | +| Step | Description | +| ---------------------- | -------------------------------------------------------------------------------------- | +| **Enable .qwenignore** | Create a file named `.qwenignore` in your project root directory | | **Add ignore rules** | Open `.qwenignore` file and add paths to ignore, example: `/archive/` or `apikeys.txt` | ### `.qwenignore` examples diff --git a/docs/users/configuration/settings.md b/docs/users/configuration/settings.md index a62ef2fe..658e4835 100644 --- a/docs/users/configuration/settings.md +++ b/docs/users/configuration/settings.md @@ -2,7 +2,7 @@ > [!tip] > -> **Authentication / API keys:** Authentication (Qwen OAuth vs OpenAI-compatible API) and auth-related environment variables (like `OPENAI_API_KEY`) are documented in **[Authentication](/users/configuration/auth)**. +> **Authentication / API keys:** Authentication (Qwen OAuth vs OpenAI-compatible API) and auth-related environment variables (like `OPENAI_API_KEY`) are documented in **[Authentication](../configuration/auth)**. > [!note] > @@ -42,7 +42,7 @@ Qwen Code uses JSON settings files for persistent configuration. There are four In addition to a project settings file, a project's `.qwen` directory can contain other project-specific files related to Qwen Code's operation, such as: -- [Custom sandbox profiles](/users/features/sandbox) (e.g. `.qwen/sandbox-macos-custom.sb`, `.qwen/sandbox.Dockerfile`). +- [Custom sandbox profiles](../features/sandbox) (e.g. `.qwen/sandbox-macos-custom.sb`, `.qwen/sandbox.Dockerfile`). ### Available settings in `settings.json` @@ -50,13 +50,14 @@ Settings are organized into categories. All settings should be placed within the #### general -| Setting | Type | Description | Default | -| ------------------------------- | ------- | ------------------------------------------ | ----------- | -| `general.preferredEditor` | string | The preferred editor to open files in. | `undefined` | -| `general.vimMode` | boolean | Enable Vim keybindings. | `false` | -| `general.disableAutoUpdate` | boolean | Disable automatic updates. | `false` | -| `general.disableUpdateNag` | boolean | Disable update notification prompts. | `false` | -| `general.checkpointing.enabled` | boolean | Enable session checkpointing for recovery. | `false` | +| Setting | Type | Description | Default | +| ------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------- | ----------- | +| `general.preferredEditor` | string | The preferred editor to open files in. | `undefined` | +| `general.vimMode` | boolean | Enable Vim keybindings. | `false` | +| `general.disableAutoUpdate` | boolean | Disable automatic updates. | `false` | +| `general.disableUpdateNag` | boolean | Disable update notification prompts. | `false` | +| `general.gitCoAuthor` | boolean | Automatically add a Co-authored-by trailer to git commit messages when commits are made through Qwen Code. | `true` | +| `general.checkpointing.enabled` | boolean | Enable session checkpointing for recovery. | `false` | #### output @@ -68,7 +69,7 @@ Settings are organized into categories. All settings should be placed within the | Setting | Type | Description | Default | | ---------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -| `ui.theme` | string | The color theme for the UI. See [Themes](/users/configuration/themes) for available options. | `undefined` | +| `ui.theme` | string | The color theme for the UI. See [Themes](../configuration/themes) for available options. | `undefined` | | `ui.customThemes` | object | Custom theme definitions. | `{}` | | `ui.hideWindowTitle` | boolean | Hide the window title bar. | `false` | | `ui.hideTips` | boolean | Hide helpful tips in the UI. | `false` | @@ -325,7 +326,7 @@ The CLI keeps a history of shell commands you run. To avoid conflicts between di Environment variables are a common way to configure applications, especially for sensitive information (like tokens) or for settings that might change between environments. Qwen Code can automatically load environment variables from `.env` files. -For authentication-related variables (like `OPENAI_*`) and the recommended `.qwen/.env` approach, see **[Authentication](/users/configuration/auth)**. +For authentication-related variables (like `OPENAI_*`) and the recommended `.qwen/.env` approach, see **[Authentication](../configuration/auth)**. > [!tip] > @@ -356,38 +357,38 @@ Arguments passed directly when running the CLI can override other configurations ### Command-Line Arguments Table -| Argument | Alias | Description | Possible Values | Notes | -| ---------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--model` | `-m` | Specifies the Qwen model to use for this session. | Model name | Example: `npm start -- --model qwen3-coder-plus` | -| `--prompt` | `-p` | Used to pass a prompt directly to the command. This invokes Qwen Code in a non-interactive mode. | Your prompt text | For scripting examples, use the `--output-format json` flag to get structured output. | -| `--prompt-interactive` | `-i` | Starts an interactive session with the provided prompt as the initial input. | Your prompt text | The prompt is processed within the interactive session, not before it. Cannot be used when piping input from stdin. Example: `qwen -i "explain this code"` | -| `--output-format` | `-o` | Specifies the format of the CLI output for non-interactive mode. | `text`, `json`, `stream-json` | `text`: (Default) The standard human-readable output. `json`: A machine-readable JSON output emitted at the end of execution. `stream-json`: Streaming JSON messages emitted as they occur during execution. For structured output and scripting, use the `--output-format json` or `--output-format stream-json` flag. See [Headless Mode](/users/features/headless) for detailed information. | -| `--input-format` | | Specifies the format consumed from standard input. | `text`, `stream-json` | `text`: (Default) Standard text input from stdin or command-line arguments. `stream-json`: JSON message protocol via stdin for bidirectional communication. Requirement: `--input-format stream-json` requires `--output-format stream-json` to be set. When using `stream-json`, stdin is reserved for protocol messages. See [Headless Mode](/users/features/headless) for detailed information. | -| `--include-partial-messages` | | Include partial assistant messages when using `stream-json` output format. When enabled, emits stream events (message_start, content_block_delta, etc.) as they occur during streaming. | | Default: `false`. Requirement: Requires `--output-format stream-json` to be set. See [Headless Mode](/users/features/headless) for detailed information about stream events. | -| `--sandbox` | `-s` | Enables sandbox mode for this session. | | | -| `--sandbox-image` | | Sets the sandbox image URI. | | | -| `--debug` | `-d` | Enables debug mode for this session, providing more verbose output. | | | -| `--all-files` | `-a` | If set, recursively includes all files within the current directory as context for the prompt. | | | -| `--help` | `-h` | Displays help information about command-line arguments. | | | -| `--show-memory-usage` | | Displays the current memory usage. | | | -| `--yolo` | | Enables YOLO mode, which automatically approves all tool calls. | | | -| `--approval-mode` | | Sets the approval mode for tool calls. | `plan`, `default`, `auto-edit`, `yolo` | Supported modes: `plan`: Analyze only—do not modify files or execute commands. `default`: Require approval for file edits or shell commands (default behavior). `auto-edit`: Automatically approve edit tools (edit, write_file) while prompting for others. `yolo`: Automatically approve all tool calls (equivalent to `--yolo`). Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of `--yolo` for the new unified approach. Example: `qwen --approval-mode auto-edit`
See more about [Approval Mode](/users/features/approval-mode). | -| `--allowed-tools` | | A comma-separated list of tool names that will bypass the confirmation dialog. | Tool names | Example: `qwen --allowed-tools "Shell(git status)"` | -| `--telemetry` | | Enables [telemetry](/developers/development/telemetry). | | | -| `--telemetry-target` | | Sets the telemetry target. | | See [telemetry](/developers/development/telemetry) for more information. | -| `--telemetry-otlp-endpoint` | | Sets the OTLP endpoint for telemetry. | | See [telemetry](/developers/development/telemetry) for more information. | -| `--telemetry-otlp-protocol` | | Sets the OTLP protocol for telemetry (`grpc` or `http`). | | Defaults to `grpc`. See [telemetry](/developers/development/telemetry) for more information. | -| `--telemetry-log-prompts` | | Enables logging of prompts for telemetry. | | See [telemetry](/developers/development/telemetry) for more information. | -| `--checkpointing` | | Enables [checkpointing](/users/features/checkpointing). | | | -| `--extensions` | `-e` | Specifies a list of extensions to use for the session. | Extension names | If not provided, all available extensions are used. Use the special term `qwen -e none` to disable all extensions. Example: `qwen -e my-extension -e my-other-extension` | -| `--list-extensions` | `-l` | Lists all available extensions and exits. | | | -| `--proxy` | | Sets the proxy for the CLI. | Proxy URL | Example: `--proxy http://localhost:7890`. | -| `--include-directories` | | Includes additional directories in the workspace for multi-directory support. | Directory paths | Can be specified multiple times or as comma-separated values. 5 directories can be added at maximum. Example: `--include-directories /path/to/project1,/path/to/project2` or `--include-directories /path/to/project1 --include-directories /path/to/project2` | -| `--screen-reader` | | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. | | | -| `--version` | | Displays the version of the CLI. | | | -| `--openai-logging` | | Enables logging of OpenAI API calls for debugging and analysis. | | This flag overrides the `enableOpenAILogging` setting in `settings.json`. | -| `--openai-logging-dir` | | Sets a custom directory path for OpenAI API logs. | Directory path | This flag overrides the `openAILoggingDir` setting in `settings.json`. Supports absolute paths, relative paths, and `~` expansion. Example: `qwen --openai-logging-dir "~/qwen-logs" --openai-logging` | -| `--tavily-api-key` | | Sets the Tavily API key for web search functionality for this session. | API key | Example: `qwen --tavily-api-key tvly-your-api-key-here` | +| Argument | Alias | Description | Possible Values | Notes | +| ---------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--model` | `-m` | Specifies the Qwen model to use for this session. | Model name | Example: `npm start -- --model qwen3-coder-plus` | +| `--prompt` | `-p` | Used to pass a prompt directly to the command. This invokes Qwen Code in a non-interactive mode. | Your prompt text | For scripting examples, use the `--output-format json` flag to get structured output. | +| `--prompt-interactive` | `-i` | Starts an interactive session with the provided prompt as the initial input. | Your prompt text | The prompt is processed within the interactive session, not before it. Cannot be used when piping input from stdin. Example: `qwen -i "explain this code"` | +| `--output-format` | `-o` | Specifies the format of the CLI output for non-interactive mode. | `text`, `json`, `stream-json` | `text`: (Default) The standard human-readable output. `json`: A machine-readable JSON output emitted at the end of execution. `stream-json`: Streaming JSON messages emitted as they occur during execution. For structured output and scripting, use the `--output-format json` or `--output-format stream-json` flag. See [Headless Mode](../features/headless) for detailed information. | +| `--input-format` | | Specifies the format consumed from standard input. | `text`, `stream-json` | `text`: (Default) Standard text input from stdin or command-line arguments. `stream-json`: JSON message protocol via stdin for bidirectional communication. Requirement: `--input-format stream-json` requires `--output-format stream-json` to be set. When using `stream-json`, stdin is reserved for protocol messages. See [Headless Mode](../features/headless) for detailed information. | +| `--include-partial-messages` | | Include partial assistant messages when using `stream-json` output format. When enabled, emits stream events (message_start, content_block_delta, etc.) as they occur during streaming. | | Default: `false`. Requirement: Requires `--output-format stream-json` to be set. See [Headless Mode](../features/headless) for detailed information about stream events. | +| `--sandbox` | `-s` | Enables sandbox mode for this session. | | | +| `--sandbox-image` | | Sets the sandbox image URI. | | | +| `--debug` | `-d` | Enables debug mode for this session, providing more verbose output. | | | +| `--all-files` | `-a` | If set, recursively includes all files within the current directory as context for the prompt. | | | +| `--help` | `-h` | Displays help information about command-line arguments. | | | +| `--show-memory-usage` | | Displays the current memory usage. | | | +| `--yolo` | | Enables YOLO mode, which automatically approves all tool calls. | | | +| `--approval-mode` | | Sets the approval mode for tool calls. | `plan`, `default`, `auto-edit`, `yolo` | Supported modes: `plan`: Analyze only—do not modify files or execute commands. `default`: Require approval for file edits or shell commands (default behavior). `auto-edit`: Automatically approve edit tools (edit, write_file) while prompting for others. `yolo`: Automatically approve all tool calls (equivalent to `--yolo`). Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of `--yolo` for the new unified approach. Example: `qwen --approval-mode auto-edit`
See more about [Approval Mode](../features/approval-mode). | +| `--allowed-tools` | | A comma-separated list of tool names that will bypass the confirmation dialog. | Tool names | Example: `qwen --allowed-tools "Shell(git status)"` | +| `--telemetry` | | Enables [telemetry](/developers/development/telemetry). | | | +| `--telemetry-target` | | Sets the telemetry target. | | See [telemetry](/developers/development/telemetry) for more information. | +| `--telemetry-otlp-endpoint` | | Sets the OTLP endpoint for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. | +| `--telemetry-otlp-protocol` | | Sets the OTLP protocol for telemetry (`grpc` or `http`). | | Defaults to `grpc`. See [telemetry](../../developers/development/telemetry) for more information. | +| `--telemetry-log-prompts` | | Enables logging of prompts for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. | +| `--checkpointing` | | Enables [checkpointing](../features/checkpointing). | | | +| `--extensions` | `-e` | Specifies a list of extensions to use for the session. | Extension names | If not provided, all available extensions are used. Use the special term `qwen -e none` to disable all extensions. Example: `qwen -e my-extension -e my-other-extension` | +| `--list-extensions` | `-l` | Lists all available extensions and exits. | | | +| `--proxy` | | Sets the proxy for the CLI. | Proxy URL | Example: `--proxy http://localhost:7890`. | +| `--include-directories` | | Includes additional directories in the workspace for multi-directory support. | Directory paths | Can be specified multiple times or as comma-separated values. 5 directories can be added at maximum. Example: `--include-directories /path/to/project1,/path/to/project2` or `--include-directories /path/to/project1 --include-directories /path/to/project2` | +| `--screen-reader` | | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. | | | +| `--version` | | Displays the version of the CLI. | | | +| `--openai-logging` | | Enables logging of OpenAI API calls for debugging and analysis. | | This flag overrides the `enableOpenAILogging` setting in `settings.json`. | +| `--openai-logging-dir` | | Sets a custom directory path for OpenAI API logs. | Directory path | This flag overrides the `openAILoggingDir` setting in `settings.json`. Supports absolute paths, relative paths, and `~` expansion. Example: `qwen --openai-logging-dir "~/qwen-logs" --openai-logging` | +| `--tavily-api-key` | | Sets the Tavily API key for web search functionality for this session. | API key | Example: `qwen --tavily-api-key tvly-your-api-key-here` | ## Context Files (Hierarchical Instructional Context) @@ -437,11 +438,11 @@ This example demonstrates how you can provide general project context, specific - Location: The CLI also scans for the configured context file in subdirectories _below_ the current working directory (respecting common ignore patterns like `node_modules`, `.git`, etc.). The breadth of this search is limited to 200 directories by default, but can be configured with the `context.discoveryMaxDirs` setting in your `settings.json` file. - Scope: Allows for highly specific instructions relevant to a particular component, module, or subsection of your project. - **Concatenation & UI Indication:** The contents of all found context files are concatenated (with separators indicating their origin and path) and provided as part of the system prompt. The CLI footer displays the count of loaded context files, giving you a quick visual cue about the active instructional context. -- **Importing Content:** You can modularize your context files by importing other Markdown files using the `@path/to/file.md` syntax. For more details, see the [Memory Import Processor documentation](/users/configuration/memory). +- **Importing Content:** You can modularize your context files by importing other Markdown files using the `@path/to/file.md` syntax. For more details, see the [Memory Import Processor documentation](../configuration/memory). - **Commands for Memory Management:** - Use `/memory refresh` to force a re-scan and reload of all context files from all configured locations. This updates the AI's instructional context. - Use `/memory show` to display the combined instructional context currently loaded, allowing you to verify the hierarchy and content being used by the AI. - - See the [Commands documentation](/users/reference/cli-reference) for full details on the `/memory` command and its sub-commands (`show` and `refresh`). + - See the [Commands documentation](../features/commands) for full details on the `/memory` command and its sub-commands (`show` and `refresh`). By understanding and utilizing these configuration layers and the hierarchical nature of context files, you can effectively manage the AI's memory and tailor Qwen Code's responses to your specific needs and projects. @@ -449,7 +450,7 @@ By understanding and utilizing these configuration layers and the hierarchical n Qwen Code can execute potentially unsafe operations (like shell commands and file modifications) within a sandboxed environment to protect your system. -[Sandbox](/users/features/sandbox) is disabled by default, but you can enable it in a few ways: +[Sandbox](../features/sandbox) is disabled by default, but you can enable it in a few ways: - Using `--sandbox` or `-s` flag. - Setting `GEMINI_SANDBOX` environment variable. diff --git a/docs/users/configuration/themes.md b/docs/users/configuration/themes.md index d17498ea..e74cfe02 100644 --- a/docs/users/configuration/themes.md +++ b/docs/users/configuration/themes.md @@ -32,7 +32,7 @@ Qwen Code comes with a selection of pre-defined themes, which you can list using ### Theme Persistence -Selected themes are saved in Qwen Code's [configuration](./configuration.md) so your preference is remembered across sessions. +Selected themes are saved in Qwen Code's [configuration](../configuration/settings) so your preference is remembered across sessions. --- @@ -140,25 +140,21 @@ The theme file must be a valid JSON file that follows the same structure as a cu ### Example Custom Theme - -  ### Using Your Custom Theme - Select your custom theme using the `/theme` command in Qwen Code. Your custom theme will appear in the theme selection dialog. - Or, set it as the default by adding `"theme": "MyCustomTheme"` to the `ui` object in your `settings.json`. -- Custom themes can be set at the user, project, or system level, and follow the same [configuration precedence](./configuration.md) as other settings. - - +- Custom themes can be set at the user, project, or system level, and follow the same [configuration precedence](../configuration/settings) as other settings. ## Themes Preview -| Dark Theme | Preview | Light Theme | Preview | -| :-: | :-: | :-: | :-: | -| ANSI | | ANSI Light | | -| Atom OneDark | | Ayu Light |  | -| Ayu |  | Default Light |  | -| Default | | GitHub Light |  | -| Dracula | | Google Code |  | -| GitHub |  | Xcode |  | +| Dark Theme | Preview | Light Theme | Preview | +| :----------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| ANSI | | ANSI Light | | +| Atom OneDark | | Ayu Light |  | +| Ayu |  | Default Light |  | +| Default | | GitHub Light |  | +| Dracula | | Google Code |  | +| GitHub |  | Xcode |  | diff --git a/docs/users/configuration/trusted-folders.md b/docs/users/configuration/trusted-folders.md index afe955ef..7aa16d84 100644 --- a/docs/users/configuration/trusted-folders.md +++ b/docs/users/configuration/trusted-folders.md @@ -56,6 +56,6 @@ If you need to change a decision or see all your settings, you have a couple of For advanced users, it's helpful to know the exact order of operations for how trust is determined: -1. **IDE Trust Signal**: If you are using the [IDE Integration](/users/ide-integration/ide-integration), the CLI first asks the IDE if the workspace is trusted. The IDE's response takes highest priority. +1. **IDE Trust Signal**: If you are using the [IDE Integration](../ide-integration/ide-integration), the CLI first asks the IDE if the workspace is trusted. The IDE's response takes highest priority. 2. **Local Trust File**: If the IDE is not connected, the CLI checks the central `~/.qwen/trustedFolders.json` file. diff --git a/docs/users/features/approval-mode.md b/docs/users/features/approval-mode.md index 0749140e..e072f237 100644 --- a/docs/users/features/approval-mode.md +++ b/docs/users/features/approval-mode.md @@ -1,3 +1,5 @@ +# Approval Mode + Qwen Code offers three distinct permission modes that allow you to flexibly control how AI interacts with your code and system based on task complexity and risk level. ## Permission Modes Comparison diff --git a/docs/users/features/commands.md b/docs/users/features/commands.md index 92833b4e..716fc392 100644 --- a/docs/users/features/commands.md +++ b/docs/users/features/commands.md @@ -20,10 +20,11 @@ These commands help you save, restore, and summarize work progress. | Command | Description | Usage Examples | | ----------- | --------------------------------------------------------- | ------------------------------------ | +| `/init` | Analyze current directory and create initial context file | `/init` | | `/summary` | Generate project summary based on conversation history | `/summary` | | `/compress` | Replace chat history with summary to save Tokens | `/compress` | +| `/resume` | Resume a previous conversation session | `/resume` | | `/restore` | Restore files to state before tool execution | `/restore` (list) or `/restore ` | -| `/init` | Analyze current directory and create initial context file | `/init` | ### 1.2 Interface and Workspace Control diff --git a/docs/users/features/headless.md b/docs/users/features/headless.md index 2a92bb1b..203e08a2 100644 --- a/docs/users/features/headless.md +++ b/docs/users/features/headless.md @@ -203,7 +203,7 @@ Key command-line options for headless usage: | `--continue` | Resume the most recent session for this project | `qwen --continue -p "Pick up where we left off"` | | `--resume [sessionId]` | Resume a specific session (or choose interactively) | `qwen --resume 123e... -p "Finish the refactor"` | -For complete details on all available configuration options, settings files, and environment variables, see the [Configuration Guide](/users/configuration/settings). +For complete details on all available configuration options, settings files, and environment variables, see the [Configuration Guide](../configuration/settings). ## Examples @@ -276,7 +276,7 @@ tail -5 usage.log ## Resources -- [CLI Configuration](/users/configuration/settings#command-line-arguments) - Complete configuration guide -- [Authentication](/users/configuration/settings#environment-variables-for-api-access) - Setup authentication -- [Commands](/users/reference/cli-reference) - Interactive commands reference -- [Tutorials](/users/quickstart) - Step-by-step automation guides +- [CLI Configuration](../configuration/settings#command-line-arguments) - Complete configuration guide +- [Authentication](../configuration/settings#environment-variables-for-api-access) - Setup authentication +- [Commands](../features/commands) - Interactive commands reference +- [Tutorials](../quickstart) - Step-by-step automation guides diff --git a/docs/users/features/mcp.md b/docs/users/features/mcp.md index 77fcea45..2b123c12 100644 --- a/docs/users/features/mcp.md +++ b/docs/users/features/mcp.md @@ -12,6 +12,7 @@ With MCP servers connected, you can ask Qwen Code to: - Automate workflows (repeatable tasks exposed as tools/prompts) > [!tip] +> > If you’re looking for the “one command to get started”, jump to [Quick start](#quick-start). ## Quick start @@ -51,7 +52,8 @@ qwen mcp add --scope user --transport http my-server http://localhost:3000/mcp ``` > [!tip] -> For advanced configuration layers (system defaults/system settings and precedence rules), see [Settings](/users/configuration/settings). +> +> For advanced configuration layers (system defaults/system settings and precedence rules), see [Settings](../configuration/settings). ## Configure servers @@ -64,6 +66,7 @@ qwen mcp add --scope user --transport http my-server http://localhost:3000/mcp | `stdio` | Local process (scripts, CLIs, Docker) on your machine | `command`, `args` (+ optional `cwd`, `env`) | > [!note] +> > If a server supports both, prefer **HTTP** over **SSE**. ### Configure via `settings.json` vs `qwen mcp add` diff --git a/docs/users/features/sandbox.md b/docs/users/features/sandbox.md index 4d4e8f25..dbe598bc 100644 --- a/docs/users/features/sandbox.md +++ b/docs/users/features/sandbox.md @@ -220,6 +220,6 @@ qwen -s -p "run shell command: mount | grep workspace" ## Related documentation -- [Configuration](/users/configuration/settings): Full configuration options. -- [Commands](/users/reference/cli-reference): Available commands. -- [Troubleshooting](/users/support/troubleshooting): General troubleshooting. +- [Configuration](../configuration/settings): Full configuration options. +- [Commands](../features/commands): Available commands. +- [Troubleshooting](../support/troubleshooting): General troubleshooting. diff --git a/docs/users/ide-integration/ide-integration.md b/docs/users/ide-integration/ide-integration.md index af7d1b7a..b0cdf922 100644 --- a/docs/users/ide-integration/ide-integration.md +++ b/docs/users/ide-integration/ide-integration.md @@ -2,7 +2,7 @@ Qwen Code can integrate with your IDE to provide a more seamless and context-aware experience. This integration allows the CLI to understand your workspace better and enables powerful features like native in-editor diffing. -Currently, the only supported IDE is [Visual Studio Code](https://code.visualstudio.com/) and other editors that support VS Code extensions. To build support for other editors, see the [IDE Companion Extension Spec](/users/ide-integration/ide-companion-spec). +Currently, the only supported IDE is [Visual Studio Code](https://code.visualstudio.com/) and other editors that support VS Code extensions. To build support for other editors, see the [IDE Companion Extension Spec](../ide-integration/ide-companion-spec). ## Features diff --git a/docs/users/integration-github-action.md b/docs/users/integration-github-action.md index b9b348a1..281967dd 100644 --- a/docs/users/integration-github-action.md +++ b/docs/users/integration-github-action.md @@ -6,41 +6,14 @@ Use it to perform GitHub pull request reviews, triage issues, perform code analysis and modification, and more using [Qwen Code] conversationally (e.g., `@qwencoder fix this issue`) directly inside your GitHub repositories. -- [qwen-code-action](#qwen-code-action) - - [Overview](#overview) - - [Features](#features) - - [Quick Start](#quick-start) - - [1. Get a Qwen API Key](#1-get-a-qwen-api-key) - - [2. Add it as a GitHub Secret](#2-add-it-as-a-github-secret) - - [3. Update your .gitignore](#3-update-your-gitignore) - - [4. Choose a Workflow](#4-choose-a-workflow) - - [5. Try it out](#5-try-it-out) - - [Workflows](#workflows) - - [Qwen Code Dispatch](#qwen-code-dispatch) - - [Issue Triage](#issue-triage) - - [Pull Request Review](#pull-request-review) - - [Qwen Code CLI Assistant](#qwen-code-cli-assistant) - - [Configuration](#configuration) - - [Inputs](#inputs) - - [Outputs](#outputs) - - [Repository Variables](#repository-variables) - - [Secrets](#secrets) - - [Authentication](#authentication) - - [GitHub Authentication](#github-authentication) - - [Extensions](#extensions) - - [Best Practices](#best-practices) - - [Customization](#customization) - - [Contributing](#contributing) - ## Features - **Automation**: Trigger workflows based on events (e.g. issue opening) or schedules (e.g. nightly). - **On-demand Collaboration**: Trigger workflows in issue and pull request - comments by mentioning the [Qwen Code CLI] (e.g., `@qwencoder /review`). -- **Extensible with Tools**: Leverage [Qwen Code] models' tool-calling capabilities to - interact with other CLIs like the [GitHub CLI] (`gh`). + comments by mentioning the [Qwen Code CLI](./features/commands) (e.g., `@qwencoder /review`). +- **Extensible with Tools**: Leverage [Qwen Code](../developers/tools/introduction.md) models' tool-calling capabilities to interact with other CLIs like the [GitHub CLI] (`gh`). - **Customizable**: Use a `QWEN.md` file in your repository to provide - project-specific instructions and context to [Qwen Code CLI]. + project-specific instructions and context to [Qwen Code CLI](./features/commands). ## Quick Start @@ -48,7 +21,7 @@ Get started with Qwen Code CLI in your repository in just a few minutes: ### 1. Get a Qwen API Key -Obtain your API key from [DashScope] (Alibaba Cloud's AI platform) +Obtain your API key from [DashScope](https://help.aliyun.com/zh/model-studio/qwen-code) (Alibaba Cloud's AI platform) ### 2. Add it as a GitHub Secret @@ -90,7 +63,7 @@ You have two options to set up a workflow: **Option B: Manually copy workflows** -1. Copy the pre-built workflows from the [`examples/workflows`](./examples/workflows) directory to your repository's `.github/workflows` directory. Note: the `qwen-dispatch.yml` workflow must also be copied, which triggers the workflows to run. +1. Copy the pre-built workflows from the [`examples/workflows`](./common-workflow) directory to your repository's `.github/workflows` directory. Note: the `qwen-dispatch.yml` workflow must also be copied, which triggers the workflows to run. ### 5. Try it out @@ -119,30 +92,19 @@ This action provides several pre-built workflows for different use cases. Each w ### Qwen Code Dispatch -This workflow acts as a central dispatcher for Qwen Code CLI, routing requests to -the appropriate workflow based on the triggering event and the command provided -in the comment. For a detailed guide on how to set up the dispatch workflow, go -to the -[Qwen Code Dispatch workflow documentation](./examples/workflows/qwen-dispatch). +This workflow acts as a central dispatcher for Qwen Code CLI, routing requests to the appropriate workflow based on the triggering event and the command provided in the comment. For a detailed guide on how to set up the dispatch workflow, go to the [Qwen Code Dispatch workflow documentation](./common-workflow). ### Issue Triage -This action can be used to triage GitHub Issues automatically or on a schedule. -For a detailed guide on how to set up the issue triage system, go to the -[GitHub Issue Triage workflow documentation](./examples/workflows/issue-triage). +This action can be used to triage GitHub Issues automatically or on a schedule. For a detailed guide on how to set up the issue triage system, go to the [GitHub Issue Triage workflow documentation](./examples/workflows/issue-triage). ### Pull Request Review -This action can be used to automatically review pull requests when they are -opened. For a detailed guide on how to set up the pull request review system, -go to the [GitHub PR Review workflow documentation](./examples/workflows/pr-review). +This action can be used to automatically review pull requests when they are opened. For a detailed guide on how to set up the pull request review system, go to the [GitHub PR Review workflow documentation](./common-workflow). ### Qwen Code CLI Assistant -This type of action can be used to invoke a general-purpose, conversational Qwen Code -AI assistant within the pull requests and issues to perform a wide range of -tasks. For a detailed guide on how to set up the general-purpose Qwen Code CLI workflow, -go to the [Qwen Code Assistant workflow documentation](./examples/workflows/qwen-assistant). +This type of action can be used to invoke a general-purpose, conversational Qwen Code AI assistant within the pull requests and issues to perform a wide range of tasks. For a detailed guide on how to set up the general-purpose Qwen Code CLI workflow, go to the [Qwen Code Assistant workflow documentation](./common-workflow). ## Configuration @@ -222,8 +184,7 @@ To add a secret: 2. Enter the secret name and value. 3. Save. -For more information, refer to the -[official GitHub documentation on creating and using encrypted secrets][secrets]. +For more information, refer to the [official GitHub documentation on creating and using encrypted secrets][secrets]. ## Authentication @@ -239,7 +200,7 @@ You can authenticate with GitHub in two ways: authentication, we recommend creating a custom GitHub App. For detailed setup instructions for both Qwen and GitHub authentication, go to the -[**Authentication documentation**](./docs/authentication.md). +[**Authentication documentation**](./configuration/auth). ## Extensions @@ -247,7 +208,7 @@ The Qwen Code CLI can be extended with additional functionality through extensio These extensions are installed from source from their GitHub repositories. For detailed instructions on how to set up and configure extensions, go to the -[Extensions documentation](./docs/extensions.md). +[Extensions documentation](../developers/extensions/extension). ## Best Practices @@ -258,20 +219,18 @@ Key recommendations include: - **Securing Your Repository:** Implementing branch and tag protection, and restricting pull request approvers. - **Monitoring and Auditing:** Regularly reviewing action logs and enabling OpenTelemetry for deeper insights into performance and behavior. -For a comprehensive guide on securing your repository and workflows, please refer to our [**Best Practices documentation**](./docs/best-practices.md). +For a comprehensive guide on securing your repository and workflows, please refer to our [**Best Practices documentation**](./common-workflow). ## Customization -Create a [QWEN.md] file in the root of your repository to provide -project-specific context and instructions to [Qwen Code CLI]. This is useful for defining +Create a QWEN.md file in the root of your repository to provide +project-specific context and instructions to [Qwen Code CLI](./common-workflow). This is useful for defining coding conventions, architectural patterns, or other guidelines the model should follow for a given repository. ## Contributing -Contributions are welcome! Check out the Qwen Code CLI -[**Contributing Guide**](./CONTRIBUTING.md) for more details on how to get -started. +Contributions are welcome! Check out the Qwen Code CLI **Contributing Guide** for more details on how to get started. [secrets]: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions [Qwen Code]: https://github.com/QwenLM/qwen-code diff --git a/docs/users/integration-vscode.md b/docs/users/integration-vscode.md index e827df26..b12de785 100644 --- a/docs/users/integration-vscode.md +++ b/docs/users/integration-vscode.md @@ -4,7 +4,7 @@
-