diff --git a/docs/users/configuration/qwen-ignore.md b/docs/users/configuration/qwen-ignore.md index 1b870910..25087657 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`](./tools/multi-file.md) 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,14 +20,10 @@ You can update your `.qwenignore` file at any time. To apply the changes, you mu ## How to use `.qwenignore` -To enable `.qwenignore`: - -1. Create a file named `.qwenignore` in the root of your project directory. - -To add a file or directory to `.qwenignore`: - -1. Open your `.qwenignore` file. -2. Add the path or file you want to ignore, for example: `/archive/` or `apikeys.txt`. +| 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/themes.md b/docs/users/configuration/themes.md index 3b262bc9..d17498ea 100644 --- a/docs/users/configuration/themes.md +++ b/docs/users/configuration/themes.md @@ -140,7 +140,9 @@ The theme file must be a valid JSON file that follows the same structure as a cu ### Example Custom Theme -Custom theme example + + + ### Using Your Custom Theme @@ -148,56 +150,15 @@ The theme file must be a valid JSON file that follows the same structure as a cu - 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. ---- -## Dark Themes -### ANSI +## Themes Preview -ANSI theme - -### Atom OneDark - -Atom One theme - -### Ayu - -Ayu theme - -### Default - -Default theme - -### Dracula - -Dracula theme - -### GitHub - -GitHub theme - -## Light Themes - -### ANSI Light - -ANSI Light theme - -### Ayu Light - -Ayu Light theme - -### Default Light - -Default Light theme - -### GitHub Light - -GitHub Light theme - -### Google Code - -Google Code theme - -### Xcode - -Xcode Light theme +| 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 6fe3486b..afe955ef 100644 --- a/docs/users/configuration/trusted-folders.md +++ b/docs/users/configuration/trusted-folders.md @@ -22,8 +22,8 @@ Add the following to your user `settings.json` file: Once the feature is enabled, the first time you run the Qwen Code from a folder, a dialog will automatically appear, prompting you to make a choice: -- **Trust folder**: Grants full trust to the current folder (e.g., `my-project`). -- **Trust parent folder**: Grants trust to the parent directory (e.g., `safe-projects`), which automatically trusts all of its subdirectories as well. This is useful if you keep all your safe projects in one place. +- **Trust folder**: Grants full trust to the current folder (e.g. `my-project`). +- **Trust parent folder**: Grants trust to the parent directory (e.g. `safe-projects`), which automatically trusts all of its subdirectories as well. This is useful if you keep all your safe projects in one place. - **Don't trust**: Marks the folder as untrusted. The CLI will operate in a restricted "safe mode." Your choice is saved in a central file (`~/.qwen/trustedFolders.json`), so you will only be asked once per folder. @@ -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](./ide-integration.md), 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](/users/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/ide-integration/ide-integration.md b/docs/users/ide-integration/ide-integration.md index febcf478..af7d1b7a 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](./ide-companion-spec.md). +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). ## Features diff --git a/docs/users/reference/cli-reference.md b/docs/users/reference/cli-reference.md index 9006930b..a8557bdf 100644 --- a/docs/users/reference/cli-reference.md +++ b/docs/users/reference/cli-reference.md @@ -120,7 +120,7 @@ Environment Variables: Commands executed via `!` will set the `QWEN_CODE=1` envi Save frequently used prompts as shortcut commands to improve work efficiency and ensure consistency. -### πŸ“‹ Quick Overview +### Quick Overview | Function | Description | Advantages | Priority | Applicable Scenarios | | ---------------- | ------------------------------------------ | -------------------------------------- | -------- | ---------------------------------------------------- | @@ -130,7 +130,7 @@ Save frequently used prompts as shortcut commands to improve work efficiency and Priority Rules: Project commands > User commands (project command used when names are same) -### πŸ”€ Command Naming Rules +### Command Naming Rules #### File Path to Command Name Mapping Table @@ -141,14 +141,14 @@ Priority Rules: Project commands > User commands (project command used when name Naming Rules: Path separator (`/` or `\`) converted to colon (`:`) -### πŸ“„ TOML File Format Specification +### TOML File Format Specification | Field | Required | Description | Example | | ------------- | -------- | ---------------------------------------- | ------------------------------------------ | | `prompt` | Required | Prompt content sent to model | `prompt = "Please analyze code: {{args}}"` | | `description` | Optional | Command description (displayed in /help) | `description = "Code analysis tool"` | -### πŸ”§ Parameter Processing Mechanism +### Parameter Processing Mechanism | Processing Method | Syntax | Applicable Scenarios | Security Features | | ---------------------------- | ------------------ | ------------------------------------ | -------------------------------------- | @@ -182,11 +182,11 @@ Naming Rules: Path separator (`/` or `\`) converted to colon (`:`) | Operation | User Interaction | | ------------------------------- | -------------------- | -| 1️⃣ Parse command and parameters | - | -| 2️⃣ Automatic Shell escaping | - | -| 3️⃣ Show confirmation dialog | βœ… User confirmation | -| 4️⃣ Execute command | - | -| 5️⃣ Inject output to prompt | - | +| 1. Parse command and parameters | - | +| 2. Automatic Shell escaping | - | +| 3. Show confirmation dialog | βœ… User confirmation | +| 4. Execute command | - | +| 5. Inject output to prompt | - | Example: Git Commit Message Generation @@ -221,16 +221,16 @@ Review {{args}}, reference standards: """ ``` -### πŸ› οΈ Practical Creation Example +### Practical Creation Example #### "Pure Function Refactoring" Command Creation Steps Table | Operation | Command/Code | | ----------------------------- | ------------------------------------------- | -| 1️⃣ Create directory structure | `mkdir -p ~/.qwen/commands/refactor` | -| 2️⃣ Create command file | `touch ~/.qwen/commands/refactor/pure.toml` | -| 3️⃣ Edit command content | 参考下方代码 | -| 4️⃣ Test command | `@file.js` β†’ `/refactor:pure` | +| 1. Create directory structure | `mkdir -p ~/.qwen/commands/refactor` | +| 2. Create command file | `touch ~/.qwen/commands/refactor/pure.toml` | +| 3. Edit command content | Refer to the complete code below. | +| 4. Test command | `@file.js` β†’ `/refactor:pure` | ```# ~/.qwen/commands/refactor/pure.toml description = "Refactor code to pure function" @@ -243,7 +243,7 @@ prompt = """ """ ``` -### πŸ’‘ Custom Command Best Practices Summary +### Custom Command Best Practices Summary #### Command Design Recommendations Table diff --git a/docs/users/support/Uninstall.md b/docs/users/support/Uninstall.md index 602bb22b..f8970c88 100644 --- a/docs/users/support/Uninstall.md +++ b/docs/users/support/Uninstall.md @@ -33,7 +33,7 @@ Remove-Item -Path (Join-Path $env:LocalAppData "npm-cache\_npx") -Recurse -Force ## Method 2: Using npm (Global Install) -If you installed the CLI globally (e.g., `npm install -g @qwen-code/qwen-code`), use the `npm uninstall` command with the `-g` flag to remove it. +If you installed the CLI globally (e.g. `npm install -g @qwen-code/qwen-code`), use the `npm uninstall` command with the `-g` flag to remove it. ```bash npm uninstall -g @qwen-code/qwen-code diff --git a/docs/users/support/tos-privacy.md b/docs/users/support/tos-privacy.md index 046b1d08..84ec5c0a 100644 --- a/docs/users/support/tos-privacy.md +++ b/docs/users/support/tos-privacy.md @@ -23,19 +23,21 @@ When you authenticate using your qwen.ai account, these Terms of Service and Pri - **Terms of Service:** Your use is governed by the [Qwen Terms of Service](https://qwen.ai/termsservice). - **Privacy Notice:** The collection and use of your data is described in the [Qwen Privacy Policy](https://qwen.ai/privacypolicy). -For details about authentication setup, quotas, and supported features, see [Authentication Setup](./cli/authentication.md). +For details about authentication setup, quotas, and supported features, see [Authentication Setup](/users/configuration/settings). ## 2. If you are using OpenAI-Compatible API Authentication When you authenticate using API keys from OpenAI-compatible providers, the applicable Terms of Service and Privacy Notice depend on your chosen provider. -**Important:** When using OpenAI-compatible API authentication, you are subject to the terms and privacy policies of your chosen API provider, not Qwen Code's terms. Please review your provider's documentation for specific details about data usage, retention, and privacy practices. +> [!important] +> +> When using OpenAI-compatible API authentication, you are subject to the terms and privacy policies of your chosen API provider, not Qwen Code's terms. Please review your provider's documentation for specific details about data usage, retention, and privacy practices. Qwen Code supports various OpenAI-compatible providers. Please refer to your specific provider's terms of service and privacy policy for detailed information. ## Usage Statistics and Telemetry -Qwen Code may collect anonymous usage statistics and telemetry data to improve the user experience and product quality. This data collection is optional and can be controlled through configuration settings. +Qwen Code may collect anonymous usage statistics and [telemetry](/developers/development/telemetry) data to improve the user experience and product quality. This data collection is optional and can be controlled through configuration settings. ### What Data is Collected @@ -50,10 +52,6 @@ When enabled, Qwen Code may collect: - **Qwen OAuth:** Usage statistics are governed by Qwen's privacy policy. You can opt-out through Qwen Code's configuration settings. - **OpenAI-Compatible API:** No additional data is collected by Qwen Code beyond what your chosen API provider collects. -### Opt-Out Instructions - -You can disable usage statistics collection by following the instructions in the [Usage Statistics Configuration](./cli/configuration.md#usage-statistics) documentation. - ## Frequently Asked Questions (FAQ) ### 1. Is my code, including prompts and answers, used to train AI models? @@ -85,8 +83,6 @@ When enabled, Qwen Code may collect: The Usage Statistics setting only controls data collection by Qwen Code itself. It does not affect what data your chosen AI service provider (Qwen, OpenAI, etc.) may collect according to their own privacy policies. -You can disable Usage Statistics collection by following the instructions in the [Usage Statistics Configuration](./cli/configuration.md#usage-statistics) documentation. - ### 3. How do I switch between authentication methods? You can switch between Qwen OAuth and OpenAI-compatible API authentication at any time: @@ -95,4 +91,4 @@ You can switch between Qwen OAuth and OpenAI-compatible API authentication at an 2. **Within the CLI**: Use the `/auth` command to reconfigure your authentication method 3. **Environment variables**: Set up `.env` files for automatic OpenAI-compatible API authentication -For detailed instructions, see the [Authentication Setup](./cli/authentication.md) documentation. +For detailed instructions, see the [Authentication Setup](/users/configuration/settings#environment-variables-for-api-access) documentation. diff --git a/docs/users/support/troubleshooting.md b/docs/users/support/troubleshooting.md index 5bc40362..f5129300 100644 --- a/docs/users/support/troubleshooting.md +++ b/docs/users/support/troubleshooting.md @@ -31,7 +31,7 @@ This guide provides solutions to common issues and debugging tips, including top 1. In your home directory: `~/.qwen/settings.json`. 2. In your project's root directory: `./.qwen/settings.json`. - Refer to [Qwen Code Configuration](./cli/configuration.md) for more details. + Refer to [Qwen Code Configuration](/users/configuration/settings) for more details. - **Q: Why don't I see cached token counts in my stats output?** - A: Cached token information is only displayed when cached tokens are being used. This feature is available for API key users (Qwen API key or Google Cloud Vertex AI) but not for OAuth users (such as Google Personal/Enterprise accounts like Google Gmail or Google Workspace, respectively). This is because the Qwen Code Assist API does not support cached content creation. You can still view your total token usage using the `/stats` command. @@ -48,7 +48,7 @@ This guide provides solutions to common issues and debugging tips, including top - **Solution:** The update depends on how you installed Qwen Code: - If you installed `qwen` globally, check that your `npm` global binary directory is in your `PATH`. You can update using the command `npm install -g @qwen-code/qwen-code@latest`. - - If you are running `qwen` from source, ensure you are using the correct command to invoke it (e.g., `node packages/cli/dist/index.js ...`). To update, pull the latest changes from the repository, and then rebuild using the command `npm run build`. + - If you are running `qwen` from source, ensure you are using the correct command to invoke it (e.g. `node packages/cli/dist/index.js ...`). To update, pull the latest changes from the repository, and then rebuild using the command `npm run build`. - **Error: `MODULE_NOT_FOUND` or import errors.** - **Cause:** Dependencies are not installed correctly, or the project hasn't been built. @@ -59,12 +59,12 @@ This guide provides solutions to common issues and debugging tips, including top - **Error: "Operation not permitted", "Permission denied", or similar.** - **Cause:** When sandboxing is enabled, Qwen Code may attempt operations that are restricted by your sandbox configuration, such as writing outside the project directory or system temp directory. - - **Solution:** Refer to the [Configuration: Sandboxing](./cli/configuration.md#sandboxing) documentation for more information, including how to customize your sandbox configuration. + - **Solution:** Refer to the [Configuration: Sandboxing](/users/features/sandbox) documentation for more information, including how to customize your sandbox configuration. - **Qwen Code is not running in interactive mode in "CI" environments** - - **Issue:** Qwen Code does not enter interactive mode (no prompt appears) if an environment variable starting with `CI_` (e.g., `CI_TOKEN`) is set. This is because the `is-in-ci` package, used by the underlying UI framework, detects these variables and assumes a non-interactive CI environment. + - **Issue:** Qwen Code does not enter interactive mode (no prompt appears) if an environment variable starting with `CI_` (e.g. `CI_TOKEN`) is set. This is because the `is-in-ci` package, used by the underlying UI framework, detects these variables and assumes a non-interactive CI environment. - **Cause:** The `is-in-ci` package checks for the presence of `CI`, `CONTINUOUS_INTEGRATION`, or any environment variable with a `CI_` prefix. When any of these are found, it signals that the environment is non-interactive, which prevents the CLI from starting in its interactive mode. - - **Solution:** If the `CI_` prefixed variable is not needed for the CLI to function, you can temporarily unset it for the command. e.g., `env -u CI_TOKEN qwen` + - **Solution:** If the `CI_` prefixed variable is not needed for the CLI to function, you can temporarily unset it for the command. e.g. `env -u CI_TOKEN qwen` - **DEBUG mode not working from project .env file** - **Issue:** Setting `DEBUG=true` in a project's `.env` file doesn't enable debug mode for the CLI. @@ -84,12 +84,12 @@ This guide provides solutions to common issues and debugging tips, including top The Qwen Code uses specific exit codes to indicate the reason for termination. This is especially useful for scripting and automation. -| Exit Code | Error Type | Description | -| --------- | -------------------------- | --------------------------------------------------------------------------------------------------- | -| 41 | `FatalAuthenticationError` | An error occurred during the authentication process. | -| 42 | `FatalInputError` | Invalid or missing input was provided to the CLI. (non-interactive mode only) | -| 44 | `FatalSandboxError` | An error occurred with the sandboxing environment (e.g., Docker, Podman, or Seatbelt). | -| 52 | `FatalConfigError` | A configuration file (`settings.json`) is invalid or contains errors. | +| Exit Code | Error Type | Description | +| --------- | -------------------------- | ------------------------------------------------------------ | +| 41 | `FatalAuthenticationError` | An error occurred during the authentication process. | +| 42 | `FatalInputError` | Invalid or missing input was provided to the CLI. (non-interactive mode only) | +| 44 | `FatalSandboxError` | An error occurred with the sandboxing environment (e.g. Docker, Podman, or Seatbelt). | +| 52 | `FatalConfigError` | A configuration file (`settings.json`) is invalid or contains errors. | | 53 | `FatalTurnLimitedError` | The maximum number of conversational turns for the session was reached. (non-interactive mode only) | ## Debugging Tips @@ -101,7 +101,7 @@ The Qwen Code uses specific exit codes to indicate the reason for termination. T - **Core debugging:** - Check the server console output for error messages or stack traces. - Increase log verbosity if configurable. - - Use Node.js debugging tools (e.g., `node --inspect`) if you need to step through server-side code. + - Use Node.js debugging tools (e.g. `node --inspect`) if you need to step through server-side code. - **Tool issues:** - If a specific tool is failing, try to isolate the issue by running the simplest possible version of the command or operation the tool performs.