docs: Add detailed documentation for Qwen Code's approval modes and usage

- Introduced a comprehensive guide on the four permission modes: Plan, Default, Auto-Edit, and YOLO, including their use cases and risk levels.
- Updated the overview and quickstart documentation for clarity and consistency.
- Removed the outdated CLI reference document and integrated relevant content into the updated documentation.
- Improved command creation examples and best practices for custom commands.
This commit is contained in:
joeytoday
2025-12-11 21:12:32 +08:00
parent 4d4e9a7b3d
commit 9fd4f58c16
6 changed files with 460 additions and 518 deletions

View File

@@ -225,12 +225,23 @@ Review {{args}}, reference standards:
#### "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 | `<br># ~/.qwen/commands/refactor/pure.toml<br>description = "Refactor code to pure function"<br>prompt = """<br>Please analyze code in current context, refactor to pure function.<br>Requirements:<br>1. Provide refactored code<br>2. Explain key changes and pure function characteristic implementation<br>3. Maintain function unchanged<br>"""<br>` |
| 4⃣ Test command | `@file.js``/refactor:pure` |
| 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` |
```# ~/.qwen/commands/refactor/pure.toml
description = "Refactor code to pure function"
prompt = """
Please analyze code in current context, refactor to pure function.
Requirements:
1. Provide refactored code
2. Explain key changes and pure function characteristic implementation
3. Maintain function unchanged
"""
```
### 💡 Custom Command Best Practices Summary