@mmmbuto/qwen-code-termux 0.14.0-termux → 0.14.1-termux
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 +54 -152
- package/bundled/qc-helper/docs/configuration/settings.md +9 -0
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/commands.md +86 -17
- package/bundled/qc-helper/docs/features/followup-suggestions.md +109 -0
- package/bundled/qc-helper/docs/overview.md +1 -0
- package/cli.js +5754 -3552
- package/locales/de.js +12 -0
- package/locales/en.js +11 -0
- package/locales/ja.js +10 -0
- package/locales/pt.js +12 -0
- package/locales/ru.js +12 -0
- package/locales/zh.js +9 -0
- package/package.json +7 -3
- package/scripts/postinstall.cjs +12 -0
- package/bundled/qc-helper/docs/configuration.md +0 -73
package/README.md
CHANGED
|
@@ -7,97 +7,71 @@
|
|
|
7
7
|
|
|
8
8
|
**An open-source AI agent that lives in your terminal — Termux Edition (Android).**
|
|
9
9
|
|
|
10
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/zh/users/overview">中文</a> |
|
|
11
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/de/users/overview">Deutsch</a> |
|
|
12
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/fr/users/overview">français</a> |
|
|
13
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/ja/users/overview">日本語</a> |
|
|
14
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/ru/users/overview">Русский</a> |
|
|
15
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/pt-BR/users/overview">Português (Brasil)</a>
|
|
16
|
-
|
|
17
10
|
</div>
|
|
18
11
|
|
|
19
|
-
>
|
|
12
|
+
> News (2026-04-07): `v0.14.1-termux` is rebuilt from upstream `v0.14.1` on a clean history line for the Termux fork.
|
|
13
|
+
|
|
14
|
+
Qwen Code Termux is a clean fork of [QwenLM/qwen-code](https://github.com/QwenLM/qwen-code), rebuilt release-by-release from upstream and patched only where Android/Termux needs different behavior.
|
|
15
|
+
|
|
16
|
+
## Why a Termux fork?
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
This **Termux Edition** fork keeps upstream behaviour while fixing what breaks on Android/Termux.
|
|
18
|
+
Upstream targets desktop Unix and Windows first. On Android/Termux, the main breakpoints are:
|
|
23
19
|
|
|
24
|
-
|
|
20
|
+
- PTY availability on ARM64
|
|
21
|
+
- install-time scripts that are fine on desktop but noisy on Termux
|
|
22
|
+
- attention/notification workflows that are useful on mobile
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
native dependency issues (PTY, node-gyp) and environment quirks.
|
|
24
|
+
This fork keeps upstream behavior as close as possible while adding:
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
- Android ARM64 PTY fallback via `@mmmbuto/node-pty-android-arm64`
|
|
27
|
+
- optional `tts_notification` tool backed by `termux-tts-speak`
|
|
28
|
+
- Termux environment detection for runtime-specific behavior
|
|
29
|
+
- release docs and test suites intended to be run directly inside Termux
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
- **Termux runtime patches** (base64 polyfills, character encoding)
|
|
33
|
-
- **Termux-safe install** (skips husky + sandbox bundle on npm install)
|
|
34
|
-
- **TTS Notifications** — speak completion/alerts via `termux-tts-speak`
|
|
35
|
-
- **Tested on-device** — see [test-reports/](test-reports/)
|
|
31
|
+
## Installation
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
### Termux / Android
|
|
38
34
|
|
|
39
35
|
```bash
|
|
40
|
-
|
|
36
|
+
pkg install nodejs-lts
|
|
37
|
+
pkg install termux-api # optional, only for TTS
|
|
38
|
+
|
|
41
39
|
npm install -g @mmmbuto/qwen-code-termux@latest
|
|
42
40
|
qwen --version
|
|
43
41
|
```
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- [Termux (F-Droid)](https://f-droid.org/packages/com.termux/) — Google Play version has issues
|
|
48
|
-
- Node.js 20+ (`pkg install nodejs-lts`)
|
|
49
|
-
- `termux-api` package (optional, for TTS): `pkg install termux-api`
|
|
43
|
+
Requirements:
|
|
50
44
|
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
- [Termux from F-Droid](https://f-droid.org/packages/com.termux/)
|
|
46
|
+
- Node.js 20+
|
|
47
|
+
- `termux-api` only if you want TTS notifications
|
|
53
48
|
|
|
54
|
-
|
|
49
|
+
### Non-Termux platforms
|
|
55
50
|
|
|
56
|
-
|
|
51
|
+
Use upstream:
|
|
57
52
|
|
|
58
53
|
```bash
|
|
59
|
-
|
|
60
|
-
bash -c "$(curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh)"
|
|
61
|
-
|
|
62
|
-
# Windows (Admin CMD)
|
|
63
|
-
curl -fsSL -o %TEMP%\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat && %TEMP%\install-qwen.bat
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Or via Homebrew:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
brew install qwen-code
|
|
54
|
+
npm install -g @qwen-code/qwen-code@latest
|
|
70
55
|
```
|
|
71
56
|
|
|
72
57
|
## Quick Start
|
|
73
58
|
|
|
74
59
|
```bash
|
|
75
|
-
cd your-project
|
|
60
|
+
cd your-project
|
|
76
61
|
qwen
|
|
77
|
-
|
|
78
|
-
# Then inside the session:
|
|
79
|
-
/help
|
|
80
|
-
/auth
|
|
81
62
|
```
|
|
82
63
|
|
|
83
|
-
|
|
64
|
+
Useful first commands:
|
|
84
65
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
What does this project do?
|
|
89
|
-
Explain the codebase structure.
|
|
90
|
-
Help me refactor this function.
|
|
91
|
-
Generate unit tests for this module.
|
|
92
|
-
```
|
|
66
|
+
- `/help`
|
|
67
|
+
- `/auth`
|
|
68
|
+
- `/model`
|
|
93
69
|
|
|
94
70
|
## Authentication
|
|
95
71
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
### API-KEY (recommended)
|
|
72
|
+
For headless or Termux-heavy workflows, API-key auth is the practical default.
|
|
99
73
|
|
|
100
|
-
|
|
74
|
+
Example `~/.qwen/settings.json`:
|
|
101
75
|
|
|
102
76
|
```json
|
|
103
77
|
{
|
|
@@ -107,7 +81,7 @@ Set up `~/.qwen/settings.json`:
|
|
|
107
81
|
"id": "qwen3.6-plus",
|
|
108
82
|
"name": "qwen3.6-plus",
|
|
109
83
|
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
110
|
-
"description": "
|
|
84
|
+
"description": "Qwen via DashScope OpenAI-compatible API",
|
|
111
85
|
"envKey": "DASHSCOPE_API_KEY"
|
|
112
86
|
}
|
|
113
87
|
]
|
|
@@ -126,77 +100,31 @@ Set up `~/.qwen/settings.json`:
|
|
|
126
100
|
}
|
|
127
101
|
```
|
|
128
102
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
qwen
|
|
133
|
-
/auth
|
|
134
|
-
# Complete browser flow
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
> OAuth requires a browser — not available over SSH/headless. Use API-KEY instead.
|
|
103
|
+
OAuth still works where a browser is available, but API-key auth is the safer recommendation on Termux and over SSH.
|
|
138
104
|
|
|
139
|
-
##
|
|
105
|
+
## Termux-specific features
|
|
140
106
|
|
|
141
|
-
###
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
qwen
|
|
145
|
-
# Use @ to reference files: @src/main.ts
|
|
146
|
-
```
|
|
107
|
+
### TTS notifications
|
|
147
108
|
|
|
148
|
-
|
|
109
|
+
If `termux-api` is installed, the fork exposes a `tts_notification` tool that can speak short alerts:
|
|
149
110
|
|
|
150
111
|
```bash
|
|
151
|
-
|
|
112
|
+
termux-tts-speak "Qwen Code Termux ready"
|
|
152
113
|
```
|
|
153
114
|
|
|
154
|
-
###
|
|
155
|
-
|
|
156
|
-
| Command | Description |
|
|
157
|
-
| ----------- | ------------------------------- |
|
|
158
|
-
| `/help` | Available commands |
|
|
159
|
-
| `/clear` | Clear history |
|
|
160
|
-
| `/compress` | Compress history to save tokens |
|
|
161
|
-
| `/stats` | Session info |
|
|
162
|
-
| `/bug` | Submit bug report |
|
|
163
|
-
| `/exit` | Quit |
|
|
115
|
+
### PTY fallback
|
|
164
116
|
|
|
165
|
-
|
|
117
|
+
The fork keeps upstream PTY loading first, then falls back to `@mmmbuto/node-pty-android-arm64` for Android ARM64.
|
|
166
118
|
|
|
167
|
-
|
|
168
|
-
- `Ctrl+D` — Exit (empty line)
|
|
169
|
-
- `Up/Down` — Command history
|
|
119
|
+
### Release testing from Termux
|
|
170
120
|
|
|
171
|
-
|
|
121
|
+
Run the documented Termux release checks from:
|
|
172
122
|
|
|
173
|
-
|
|
123
|
+
- [docs/developers/BUILDING.md](docs/developers/BUILDING.md)
|
|
124
|
+
- [test-reports/README.md](test-reports/README.md)
|
|
125
|
+
- [test-reports/suites/latest/termux.md](test-reports/suites/latest/termux.md)
|
|
174
126
|
|
|
175
|
-
|
|
176
|
-
using Android's text-to-speech engine:
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
# Install termux-api for TTS
|
|
180
|
-
pkg install termux-api
|
|
181
|
-
|
|
182
|
-
# TTS is used automatically by the tts_notification tool
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### PTY Support
|
|
186
|
-
|
|
187
|
-
Shell execution uses a PTY (pseudo-terminal) for proper ANSI colour and interactive
|
|
188
|
-
command support. On Termux, PTY deps are auto-installed on first `npm install`.
|
|
189
|
-
|
|
190
|
-
### Runtime Patches
|
|
191
|
-
|
|
192
|
-
| File | Purpose |
|
|
193
|
-
| --------------------------------------------- | ------------------------------ |
|
|
194
|
-
| `packages/core/src/patches/termux-runtime.ts` | Android base64 polyfill |
|
|
195
|
-
| `scripts/prepare-termux.cjs` | Skip husky + bundle on Termux |
|
|
196
|
-
| `scripts/postinstall.cjs` | Termux install confirmation |
|
|
197
|
-
| `packages/core/src/utils/termux-detect.ts` | `isTermux()` detection utility |
|
|
198
|
-
|
|
199
|
-
## Building from Source
|
|
127
|
+
## Building from source
|
|
200
128
|
|
|
201
129
|
```bash
|
|
202
130
|
git clone https://github.com/DioNanos/qwen-code-termux.git
|
|
@@ -204,47 +132,21 @@ cd qwen-code-termux
|
|
|
204
132
|
npm install
|
|
205
133
|
npm run build
|
|
206
134
|
npm run bundle
|
|
207
|
-
|
|
208
|
-
# Install globally
|
|
209
|
-
npm install -g
|
|
210
135
|
```
|
|
211
136
|
|
|
212
|
-
See [docs/developers/BUILDING.md](docs/developers/BUILDING.md) for
|
|
213
|
-
|
|
214
|
-
## Configuration
|
|
215
|
-
|
|
216
|
-
| File | Scope | Description |
|
|
217
|
-
| ----------------------- | ------- | ----------------------------- |
|
|
218
|
-
| `~/.qwen/settings.json` | User | Global settings (recommended) |
|
|
219
|
-
| `.qwen/settings.json` | Project | Project-level overrides |
|
|
220
|
-
|
|
221
|
-
See the [authentication guide](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/) for all options.
|
|
222
|
-
|
|
223
|
-
> **Security note:** Never commit API keys to version control.
|
|
137
|
+
See [docs/developers/BUILDING.md](docs/developers/BUILDING.md) for the fork-specific notes.
|
|
224
138
|
|
|
225
139
|
## Troubleshooting
|
|
226
140
|
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
|
|
231
|
-
## Ecosystem
|
|
232
|
-
|
|
233
|
-
- [**AionUi**](https://github.com/iOfficeAI/AionUi) — Modern GUI for Qwen Code
|
|
234
|
-
- [**Gemini CLI Desktop**](https://github.com/Piebald-AI/gemini-cli-desktop) — Cross-platform desktop UI
|
|
235
|
-
|
|
236
|
-
## Connect
|
|
237
|
-
|
|
238
|
-
- [Discord](https://discord.gg/RN7tqZCeDK)
|
|
239
|
-
- [Dingtalk](https://qr.dingtalk.com/action/joingroup?code=v1,k1,+FX6Gf/ZDlTahTIRi8AEQhIaBlqykA0j+eBKKdhLeAE=&_dt_no_comment=1&origin=1)
|
|
141
|
+
- If you are not on Termux, install upstream instead of this fork.
|
|
142
|
+
- If shell execution is broken on Android, verify the PTY dependency is present.
|
|
143
|
+
- If TTS does nothing, install `termux-api` and check `termux-tts-speak`.
|
|
144
|
+
- For release validation, use the Termux suite in [test-reports/suites/latest/termux.md](test-reports/suites/latest/termux.md).
|
|
240
145
|
|
|
241
146
|
## Acknowledgments
|
|
242
147
|
|
|
243
|
-
This
|
|
244
|
-
[Qwen Code](https://github.com/QwenLM/qwen-code). We acknowledge and appreciate the excellent
|
|
245
|
-
work of both teams. This fork focuses on Termux/Android compatibility and Termux-specific
|
|
246
|
-
features.
|
|
148
|
+
This fork is based on [Qwen Code](https://github.com/QwenLM/qwen-code) and exists to keep a release-quality Termux track with minimal divergence from upstream.
|
|
247
149
|
|
|
248
150
|
## License
|
|
249
151
|
|
|
250
|
-
Apache-2.0
|
|
152
|
+
Apache-2.0
|
|
@@ -109,6 +109,9 @@ Settings are organized into categories. All settings should be placed within the
|
|
|
109
109
|
| `ui.accessibility.enableLoadingPhrases` | boolean | Enable loading phrases (disable for accessibility). | `true` |
|
|
110
110
|
| `ui.accessibility.screenReader` | boolean | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. | `false` |
|
|
111
111
|
| `ui.customWittyPhrases` | array of strings | A list of custom phrases to display during loading states. When provided, the CLI will cycle through these phrases instead of the default ones. | `[]` |
|
|
112
|
+
| `ui.enableFollowupSuggestions` | boolean | Enable [followup suggestions](../features/followup-suggestions) that predict what you want to type next after the model responds. Suggestions appear as ghost text and can be accepted with Tab, Enter, or Right Arrow. | `true` |
|
|
113
|
+
| `ui.enableCacheSharing` | boolean | Use cache-aware forked queries for suggestion generation. Reduces cost on providers that support prefix caching (experimental). | `true` |
|
|
114
|
+
| `ui.enableSpeculation` | boolean | Speculatively execute accepted suggestions before submission. Results appear instantly when you accept (experimental). | `false` |
|
|
112
115
|
|
|
113
116
|
#### ide
|
|
114
117
|
|
|
@@ -185,6 +188,12 @@ The `extra_body` field allows you to add custom parameters to the request body s
|
|
|
185
188
|
- `"./custom-logs"` - Logs to `./custom-logs` relative to current directory
|
|
186
189
|
- `"/tmp/openai-logs"` - Logs to absolute path `/tmp/openai-logs`
|
|
187
190
|
|
|
191
|
+
#### fastModel
|
|
192
|
+
|
|
193
|
+
| Setting | Type | Description | Default |
|
|
194
|
+
| ----------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
195
|
+
| `fastModel` | string | Model for background tasks ([suggestion generation](../features/followup-suggestions), speculation). Leave empty to use the main model. A smaller/faster model (e.g., `qwen3.5-flash`) reduces latency and cost. Can also be set via `/model --fast`. | `""` |
|
|
196
|
+
|
|
188
197
|
#### context
|
|
189
198
|
|
|
190
199
|
| Setting | Type | Description | Default |
|
|
@@ -56,21 +56,90 @@ Commands specifically for controlling interface and output language.
|
|
|
56
56
|
|
|
57
57
|
Commands for managing AI tools and models.
|
|
58
58
|
|
|
59
|
-
| Command | Description
|
|
60
|
-
| ---------------- |
|
|
61
|
-
| `/mcp` | List configured MCP servers and tools
|
|
62
|
-
| `/tools` | Display currently available tool list
|
|
63
|
-
| `/skills` | List and run available skills
|
|
64
|
-
| `/approval-mode` | Change approval mode for tool usage
|
|
65
|
-
| →`plan` | Analysis only, no execution
|
|
66
|
-
| →`default` | Require approval for edits
|
|
67
|
-
| →`auto-edit` | Automatically approve edits
|
|
68
|
-
| →`yolo` | Automatically approve all
|
|
69
|
-
| `/model` | Switch model used in current session
|
|
70
|
-
| `/
|
|
71
|
-
| `/
|
|
72
|
-
|
|
73
|
-
|
|
59
|
+
| Command | Description | Usage Examples |
|
|
60
|
+
| ---------------- | ------------------------------------------------- | --------------------------------------------- |
|
|
61
|
+
| `/mcp` | List configured MCP servers and tools | `/mcp`, `/mcp desc` |
|
|
62
|
+
| `/tools` | Display currently available tool list | `/tools`, `/tools desc` |
|
|
63
|
+
| `/skills` | List and run available skills | `/skills`, `/skills <name>` |
|
|
64
|
+
| `/approval-mode` | Change approval mode for tool usage | `/approval-mode <mode (auto-edit)> --project` |
|
|
65
|
+
| →`plan` | Analysis only, no execution | Secure review |
|
|
66
|
+
| →`default` | Require approval for edits | Daily use |
|
|
67
|
+
| →`auto-edit` | Automatically approve edits | Trusted environment |
|
|
68
|
+
| →`yolo` | Automatically approve all | Quick prototyping |
|
|
69
|
+
| `/model` | Switch model used in current session | `/model` |
|
|
70
|
+
| `/model --fast` | Set or select the fast model for background tasks | `/model --fast qwen3.5-flash` |
|
|
71
|
+
| `/extensions` | List all active extensions in current session | `/extensions` |
|
|
72
|
+
| `/memory` | Manage AI's instruction context | `/memory add Important Info` |
|
|
73
|
+
|
|
74
|
+
### 1.5 Side Question (`/btw`)
|
|
75
|
+
|
|
76
|
+
The `/btw` command allows you to ask quick side questions without interrupting or affecting the main conversation flow.
|
|
77
|
+
|
|
78
|
+
| Command | Description |
|
|
79
|
+
| ---------------------- | ------------------------------------- |
|
|
80
|
+
| `/btw <your question>` | Ask a quick side question |
|
|
81
|
+
| `?btw <your question>` | Alternative syntax for side questions |
|
|
82
|
+
|
|
83
|
+
**How It Works:**
|
|
84
|
+
|
|
85
|
+
- The side question is sent as a separate API call with recent conversation context (up to the last 20 messages)
|
|
86
|
+
- The response is displayed above the Composer — you can continue typing while waiting
|
|
87
|
+
- The main conversation is **not blocked** — it continues independently
|
|
88
|
+
- The side question response does **not** become part of the main conversation history
|
|
89
|
+
- Answers are rendered with full Markdown support (code blocks, lists, tables, etc.)
|
|
90
|
+
|
|
91
|
+
**Keyboard Shortcuts (Interactive Mode):**
|
|
92
|
+
|
|
93
|
+
| Shortcut | Action |
|
|
94
|
+
| -------------------- | --------------------------------------------------- |
|
|
95
|
+
| `Escape` | Cancel (while loading) or dismiss (after completed) |
|
|
96
|
+
| `Space` or `Enter` | Dismiss the answer (when input is empty) |
|
|
97
|
+
| `Ctrl+C` or `Ctrl+D` | Cancel an in-flight side question |
|
|
98
|
+
|
|
99
|
+
**Example:**
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
(While the main conversation is about refactoring code)
|
|
103
|
+
|
|
104
|
+
> /btw What's the difference between let and var in JavaScript?
|
|
105
|
+
|
|
106
|
+
╭──────────────────────────────────────────╮
|
|
107
|
+
│ /btw What's the difference between let │
|
|
108
|
+
│ and var in JavaScript? │
|
|
109
|
+
│ │
|
|
110
|
+
│ + Answering... │
|
|
111
|
+
│ Press Escape, Ctrl+C, or Ctrl+D to cancel│
|
|
112
|
+
╰──────────────────────────────────────────╯
|
|
113
|
+
> (Composer remains active — keep typing)
|
|
114
|
+
|
|
115
|
+
(After the answer arrives)
|
|
116
|
+
|
|
117
|
+
╭──────────────────────────────────────────╮
|
|
118
|
+
│ /btw What's the difference between let │
|
|
119
|
+
│ and var in JavaScript? │
|
|
120
|
+
│ │
|
|
121
|
+
│ `let` is block-scoped, while `var` is │
|
|
122
|
+
│ function-scoped. `let` was introduced │
|
|
123
|
+
│ in ES6 and doesn't hoist the same way. │
|
|
124
|
+
│ │
|
|
125
|
+
│ Press Space, Enter, or Escape to dismiss │
|
|
126
|
+
╰──────────────────────────────────────────╯
|
|
127
|
+
> (Composer still active)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Supported Execution Modes:**
|
|
131
|
+
|
|
132
|
+
| Mode | Behavior |
|
|
133
|
+
| -------------------- | -------------------------------------------- |
|
|
134
|
+
| Interactive | Shows above Composer with Markdown rendering |
|
|
135
|
+
| Non-interactive | Returns text result: `btw> question\nanswer` |
|
|
136
|
+
| ACP (Agent Protocol) | Returns stream_messages async generator |
|
|
137
|
+
|
|
138
|
+
> [!tip]
|
|
139
|
+
>
|
|
140
|
+
> Use `/btw` when you need a quick answer without derailing your main task. It's especially useful for clarifying concepts, checking facts, or getting quick explanations while staying focused on your primary workflow.
|
|
141
|
+
|
|
142
|
+
### 1.6 Information, Settings, and Help
|
|
74
143
|
|
|
75
144
|
Commands for obtaining information and performing system settings.
|
|
76
145
|
|
|
@@ -85,7 +154,7 @@ Commands for obtaining information and performing system settings.
|
|
|
85
154
|
| `/copy` | Copy last output content to clipboard | `/copy` |
|
|
86
155
|
| `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
|
|
87
156
|
|
|
88
|
-
### 1.
|
|
157
|
+
### 1.7 Common Shortcuts
|
|
89
158
|
|
|
90
159
|
| Shortcut | Function | Note |
|
|
91
160
|
| ------------------ | ----------------------- | ---------------------- |
|
|
@@ -95,7 +164,7 @@ Commands for obtaining information and performing system settings.
|
|
|
95
164
|
| `Ctrl/cmd+Z` | Undo input | Text editing |
|
|
96
165
|
| `Ctrl/cmd+Shift+Z` | Redo input | Text editing |
|
|
97
166
|
|
|
98
|
-
### 1.
|
|
167
|
+
### 1.8 CLI Auth Subcommands
|
|
99
168
|
|
|
100
169
|
In addition to the in-session `/auth` slash command, Qwen Code provides standalone CLI subcommands for managing authentication directly from the terminal:
|
|
101
170
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Followup Suggestions
|
|
2
|
+
|
|
3
|
+
Qwen Code can predict what you want to type next and show it as ghost text in the input area. This feature uses an LLM call to analyze the conversation context and generate a natural next step suggestion.
|
|
4
|
+
|
|
5
|
+
This feature works end-to-end in the CLI. In the WebUI, the hook and UI plumbing are available, but host applications must trigger suggestion generation and wire the followup state for suggestions to appear.
|
|
6
|
+
|
|
7
|
+
## How It Works
|
|
8
|
+
|
|
9
|
+
After Qwen Code finishes responding, a suggestion appears as dimmed text in the input area after a short delay (~300ms). For example, after fixing a bug, you might see:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
> run the tests
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The suggestion is generated by sending the conversation history to the model, which predicts what you would naturally type next.
|
|
16
|
+
|
|
17
|
+
## Accepting Suggestions
|
|
18
|
+
|
|
19
|
+
| Key | Action |
|
|
20
|
+
| ------------- | ------------------------------------------------ |
|
|
21
|
+
| `Tab` | Accept the suggestion and fill it into the input |
|
|
22
|
+
| `Enter` | Accept the suggestion and submit it immediately |
|
|
23
|
+
| `Right Arrow` | Accept the suggestion and fill it into the input |
|
|
24
|
+
| Any typing | Dismiss the suggestion and type normally |
|
|
25
|
+
|
|
26
|
+
## When Suggestions Appear
|
|
27
|
+
|
|
28
|
+
Suggestions are generated when all of the following conditions are met:
|
|
29
|
+
|
|
30
|
+
- The model has completed its response (not during streaming)
|
|
31
|
+
- At least 2 model turns have occurred in the conversation
|
|
32
|
+
- There are no errors in the most recent response
|
|
33
|
+
- No confirmation dialogs are pending (e.g., shell confirmation, permissions)
|
|
34
|
+
- The approval mode is not set to `plan`
|
|
35
|
+
- The feature is enabled in settings (enabled by default)
|
|
36
|
+
|
|
37
|
+
Suggestions will not appear in non-interactive mode (e.g., headless/SDK mode).
|
|
38
|
+
|
|
39
|
+
Suggestions are automatically dismissed when:
|
|
40
|
+
|
|
41
|
+
- You start typing
|
|
42
|
+
- A new model turn begins
|
|
43
|
+
- The suggestion is accepted
|
|
44
|
+
|
|
45
|
+
## Fast Model
|
|
46
|
+
|
|
47
|
+
By default, suggestions use the same model as your main conversation. For faster and cheaper suggestions, configure a dedicated fast model:
|
|
48
|
+
|
|
49
|
+
### Via command
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
/model --fast qwen3.5-flash
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Or use `/model --fast` (without a model name) to open a selection dialog.
|
|
56
|
+
|
|
57
|
+
### Via settings.json
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"fastModel": "qwen3.5-flash"
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The fast model is used for background tasks like suggestion generation. When not configured, the main conversation model is used as fallback.
|
|
66
|
+
|
|
67
|
+
Thinking/reasoning mode is automatically disabled for all background tasks (suggestion generation and speculation), regardless of your main model's thinking configuration. This avoids wasting tokens on internal reasoning that isn't needed for these tasks.
|
|
68
|
+
|
|
69
|
+
## Configuration
|
|
70
|
+
|
|
71
|
+
These settings can be configured in `settings.json`:
|
|
72
|
+
|
|
73
|
+
| Setting | Type | Default | Description |
|
|
74
|
+
| ------------------------------ | ------- | ------- | ------------------------------------------------------------------ |
|
|
75
|
+
| `ui.enableFollowupSuggestions` | boolean | `true` | Enable or disable followup suggestions |
|
|
76
|
+
| `ui.enableCacheSharing` | boolean | `true` | Use cache-aware forked queries to reduce cost (experimental) |
|
|
77
|
+
| `ui.enableSpeculation` | boolean | `false` | Speculatively execute suggestions before submission (experimental) |
|
|
78
|
+
| `fastModel` | string | `""` | Model for background tasks (suggestion generation, speculation) |
|
|
79
|
+
|
|
80
|
+
### Example
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"fastModel": "qwen3.5-flash",
|
|
85
|
+
"ui": {
|
|
86
|
+
"enableFollowupSuggestions": true,
|
|
87
|
+
"enableCacheSharing": true
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Monitoring
|
|
93
|
+
|
|
94
|
+
Suggestion model usage appears in `/stats` output, showing tokens consumed by the fast model for suggestion generation.
|
|
95
|
+
|
|
96
|
+
The fast model is also shown in `/about` output under "Fast Model".
|
|
97
|
+
|
|
98
|
+
## Suggestion Quality
|
|
99
|
+
|
|
100
|
+
Suggestions go through quality filters to ensure they are useful:
|
|
101
|
+
|
|
102
|
+
- Must be 2-12 words (CJK: 2-30 characters), under 100 characters total
|
|
103
|
+
- Cannot be evaluative ("looks good", "thanks")
|
|
104
|
+
- Cannot use AI voice ("Let me...", "I'll...")
|
|
105
|
+
- Cannot be multiple sentences or contain formatting (markdown, newlines)
|
|
106
|
+
- Cannot be meta-commentary ("nothing to suggest", "silence")
|
|
107
|
+
- Cannot be error messages or prefixed labels ("Suggestion: ...")
|
|
108
|
+
- Single-word suggestions are only allowed for common commands (yes, commit, push, etc.)
|
|
109
|
+
- Slash commands (e.g., `/commit`) are always allowed as single-word suggestions
|
|
@@ -56,6 +56,7 @@ You'll be prompted to log in on first use. That's it! [Continue with Quickstart
|
|
|
56
56
|
- **Debug and fix issues**: Describe a bug or paste an error message. Qwen Code will analyze your codebase, identify the problem, and implement a fix.
|
|
57
57
|
- **Navigate any codebase**: Ask anything about your team's codebase, and get a thoughtful answer back. Qwen Code maintains awareness of your entire project structure, can find up-to-date information from the web, and with [MCP](./features/mcp) can pull from external datasources like Google Drive, Figma, and Slack.
|
|
58
58
|
- **Automate tedious tasks**: Fix fiddly lint issues, resolve merge conflicts, and write release notes. Do all this in a single command from your developer machines, or automatically in CI.
|
|
59
|
+
- **[Followup suggestions](./features/followup-suggestions)**: Qwen Code predicts what you want to type next and shows it as ghost text. Press Tab to accept, or just keep typing to dismiss.
|
|
59
60
|
|
|
60
61
|
## Why developers love Qwen Code
|
|
61
62
|
|