diff --git a/docs/users/features/status-line.md b/docs/users/features/status-line.md index c0b3eb6be5..b427129eb4 100644 --- a/docs/users/features/status-line.md +++ b/docs/users/features/status-line.md @@ -88,8 +88,8 @@ Add a `statusLine` object under the `ui` key in `~/.qwen/settings.json`: | `model` | | Current model name without reasoning level | | `git-branch` | Yes | Current Git branch name (hidden when not in a git repo) | | `context-remaining` | Yes | Percentage of context window remaining (e.g. `Context 65.7% left`) | -| `total-input-tokens` | | Total input tokens used in session (e.g. `30.0k in`) | -| `total-output-tokens` | | Total output tokens used in session (e.g. `5.0k out`) | +| `total-input-tokens` | | Cumulative input tokens used in session (e.g. `30.0k total in`) | +| `total-output-tokens` | | Cumulative output tokens used in session (e.g. `5.0k total out`) | | `current-dir` | Yes | Current working directory | | `project-name` | | Project name (basename of working directory) | | `pull-request-number` | | Open PR number for the current branch (requires `gh` CLI) | @@ -103,6 +103,8 @@ Add a `statusLine` object under the `ui` key in `~/.qwen/settings.json`: Items marked **Default** are pre-selected when you first open the `/statusline` dialog. +`total-input-tokens` and `total-output-tokens` are session totals. They add up token usage across turns, so input tokens can grow quickly because each new model request includes the current conversation context again. Use `used-tokens` when you want the current prompt size instead of cumulative session spend. + ### Example output With the default items, the status line looks like: diff --git a/packages/cli/src/ui/statusLinePresets.test.ts b/packages/cli/src/ui/statusLinePresets.test.ts index 6a1a8b3226..24a88f3d77 100644 --- a/packages/cli/src/ui/statusLinePresets.test.ts +++ b/packages/cli/src/ui/statusLinePresets.test.ts @@ -163,7 +163,7 @@ describe('statusLinePresets', () => { data, ), ).toEqual([ - 'qwen3-code-plus high | qwen3-code-plus | feature/pr-4087-statusline | Context 75% left | 1.2k in | 340 out | /repo/project | project | #4087 | +12 -3 | Context 25% used | Ready | v1.2.3 | 1.0k window | 250 used | session-123', + 'qwen3-code-plus high | qwen3-code-plus | feature/pr-4087-statusline | Context 75% left | 1.2k total in | 340 total out | /repo/project | project | #4087 | +12 -3 | Context 25% used | Ready | v1.2.3 | 1.0k window | 250 used | session-123', ]); }); diff --git a/packages/cli/src/ui/statusLinePresets.ts b/packages/cli/src/ui/statusLinePresets.ts index aee28b3d0e..b2d8013d8e 100644 --- a/packages/cli/src/ui/statusLinePresets.ts +++ b/packages/cli/src/ui/statusLinePresets.ts @@ -406,10 +406,10 @@ export function buildStatusLinePresetParts( } break; case 'total-input-tokens': - parts.push(`${formatTokenCount(data.totalInputTokens)} in`); + parts.push(`${formatTokenCount(data.totalInputTokens)} total in`); break; case 'total-output-tokens': - parts.push(`${formatTokenCount(data.totalOutputTokens)} out`); + parts.push(`${formatTokenCount(data.totalOutputTokens)} total out`); break; case 'session-id': if (data.sessionId) {