@qwen-code/qwen-code 0.17.0-nightly.20260602.cea15a118 → 0.17.0-preview.0

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.
Files changed (44) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +13 -12
  2. package/bundled/qc-helper/docs/configuration/themes.md +39 -0
  3. package/bundled/qc-helper/docs/features/commands.md +66 -12
  4. package/bundled/qc-helper/docs/features/status-line.md +7 -5
  5. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +16 -0
  6. package/bundled/simplify/SKILL.md +123 -0
  7. package/chunks/{agent-F4BU2ODB.js → agent-Z7O3I6MY.js} +6 -5
  8. package/chunks/{anthropicContentGenerator-HN7PREHK.js → anthropicContentGenerator-UCGOKLGC.js} +1 -1
  9. package/chunks/{chunk-EK5NMIUQ.js → chunk-4Q4IDQE5.js} +2 -2
  10. package/chunks/{chunk-QJ47SC3D.js → chunk-7JHNICSJ.js} +2673 -2245
  11. package/chunks/{chunk-DY2NUOZS.js → chunk-BF5WTWOH.js} +4 -4
  12. package/chunks/{chunk-7YJIR2FX.js → chunk-G4K6P5KN.js} +8 -15
  13. package/chunks/chunk-HX3JRTWL.js +393 -0
  14. package/chunks/{chunk-FE256H4M.js → chunk-MJCO2CPA.js} +38 -8
  15. package/chunks/chunk-MRO43B25.js +30 -0
  16. package/chunks/{chunk-ODPVJ6JJ.js → chunk-OJFMTECH.js} +6 -1
  17. package/chunks/{chunk-3ORWVTVV.js → chunk-OXXOAIGT.js} +30 -12
  18. package/chunks/{chunk-6NUSWV4M.js → chunk-TDZCEIK6.js} +2 -0
  19. package/chunks/{chunk-VTEBSLED.js → chunk-ZWH2TVVN.js} +1 -1
  20. package/chunks/{contextCommand-LLQ6OB7H.js → contextCommand-FU55EUOH.js} +8 -7
  21. package/chunks/{edit-XBNOBA3X.js → edit-UQFK25NR.js} +6 -5
  22. package/chunks/{enter-worktree-PYG3GX6S.js → enter-worktree-VZT6JX45.js} +6 -5
  23. package/chunks/{exit-worktree-COMH2NFH.js → exit-worktree-JETQQ26R.js} +6 -5
  24. package/chunks/{exitPlanMode-XW573D7X.js → exitPlanMode-SFNBASAU.js} +6 -5
  25. package/chunks/{geminiContentGenerator-CUXKZ45G.js → geminiContentGenerator-XWUW7B7J.js} +3 -2
  26. package/chunks/{glob-CAHZLJ2U.js → glob-34CPYA2M.js} +6 -5
  27. package/chunks/{grep-SOWEZIQ5.js → grep-4RXPZUYZ.js} +6 -5
  28. package/chunks/{monitor-3EXFHEFF.js → monitor-QCNAUO75.js} +9 -6
  29. package/chunks/{notebook-edit-4OHKOOGL.js → notebook-edit-I2MBTWI6.js} +6 -5
  30. package/chunks/{openaiContentGenerator-7FWKNMJT.js → openaiContentGenerator-VNQUJIG5.js} +5 -4
  31. package/chunks/{qwenContentGenerator-SJ2ETCXH.js → qwenContentGenerator-LICFK2K7.js} +7 -6
  32. package/chunks/{qwenOAuth2-BAN2EGSH.js → qwenOAuth2-LKXG7XVO.js} +2 -1
  33. package/chunks/{read-file-2FQHFIJG.js → read-file-N2YTOQ2U.js} +4 -3
  34. package/chunks/{ripGrep-QFEVI72T.js → ripGrep-NBWBOVPW.js} +6 -5
  35. package/chunks/scheduler-XHHMN7TA.js +306 -0
  36. package/chunks/{serve-5TNEYF5R.js → serve-HESJL2FH.js} +8 -7
  37. package/chunks/{shell-KDDCMC42.js → shell-V7PVS7O7.js} +6 -5
  38. package/chunks/{skill-FDQCJMI2.js → skill-6LP5ANRL.js} +4 -3
  39. package/chunks/{src-QOYK6ZSY.js → src-4TLZBCTV.js} +27 -5
  40. package/chunks/{todoWrite-Y6F7YEIM.js → todoWrite-USWGQJ53.js} +6 -1
  41. package/chunks/{tool-search-2QK2MOQ3.js → tool-search-6CRPUSUB.js} +4 -3
  42. package/chunks/{write-file-E5LB4KZH.js → write-file-CCMVL5Q7.js} +6 -5
  43. package/cli.js +5295 -3211
  44. package/package.json +2 -2
@@ -77,17 +77,18 @@ Settings are organized into categories. Most settings should be placed within th
77
77
 
78
78
  #### general
79
79
 
80
- | Setting | Type | Description | Default |
81
- | ------------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
82
- | `general.preferredEditor` | string | The preferred editor to open files in. | `undefined` |
83
- | `general.vimMode` | boolean | Enable Vim keybindings. | `false` |
84
- | `general.enableAutoUpdate` | boolean | Enable automatic update checks and installations on startup. | `true` |
85
- | `general.showSessionRecap` | boolean | Auto-show a one-line "where you left off" recap when returning to the terminal after being away. Off by default. Use `/recap` to trigger manually regardless of this setting. | `false` |
86
- | `general.sessionRecapAwayThresholdMinutes` | number | Minutes the terminal must be blurred before an auto-recap fires on focus-in. Only used when `showSessionRecap` is enabled. | `5` |
87
- | `general.gitCoAuthor.commit` | boolean | Add a Co-authored-by trailer to git commit messages AND attach a per-file AI-attribution git note (`refs/notes/ai-attribution`) for commits made through Qwen Code. Disabling skips both. | `true` |
88
- | `general.gitCoAuthor.pr` | boolean | Append a Qwen Code attribution line to pull request descriptions when running `gh pr create`. | `true` |
89
- | `general.checkpointing.enabled` | boolean | Enable session checkpointing for recovery. | `false` |
90
- | `general.defaultFileEncoding` | string | Default encoding for new files. Use `"utf-8"` (default) for UTF-8 without BOM, or `"utf-8-bom"` for UTF-8 with BOM. Only change this if your project specifically requires BOM. | `"utf-8"` |
80
+ | Setting | Type | Description | Default |
81
+ | ------------------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
82
+ | `general.preferredEditor` | string | The preferred editor to open files in. | `undefined` |
83
+ | `general.vimMode` | boolean | Enable Vim keybindings. | `false` |
84
+ | `general.enableAutoUpdate` | boolean | Enable automatic update checks and installations on startup. | `true` |
85
+ | `general.showSessionRecap` | boolean | Auto-show a one-line "where you left off" recap when returning to the terminal after being away. Off by default. Use `/recap` to trigger manually regardless of this setting. | `false` |
86
+ | `general.sessionRecapAwayThresholdMinutes` | number | Minutes the terminal must be blurred before an auto-recap fires on focus-in. Only used when `showSessionRecap` is enabled. | `5` |
87
+ | `general.gitCoAuthor.commit` | boolean | Add a Co-authored-by trailer to git commit messages AND attach a per-file AI-attribution git note (`refs/notes/ai-attribution`) for commits made through Qwen Code. Disabling skips both. | `true` |
88
+ | `general.gitCoAuthor.pr` | boolean | Append a Qwen Code attribution line to pull request descriptions when running `gh pr create`. | `true` |
89
+ | `general.checkpointing.enabled` | boolean | Enable session checkpointing for recovery. | `false` |
90
+ | `general.defaultFileEncoding` | string | Default encoding for new files. Use `"utf-8"` (default) for UTF-8 without BOM, or `"utf-8-bom"` for UTF-8 with BOM. Only change this if your project specifically requires BOM. | `"utf-8"` |
91
+ | `general.cleanupPeriodDays` | number | Days to retain `~/.qwen/file-history/` session backups used by `/rewind`. Backups older than this are removed by a background pass that runs at most once per day. `0` = minimum retention (~1 hour): keeps sessions touched in the last hour plus the currently active one. Changes take effect after restart. | `30` |
91
92
 
92
93
  #### output
93
94
 
@@ -101,7 +102,7 @@ Settings are organized into categories. Most settings should be placed within th
101
102
  | --------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
102
103
  | `ui.theme` | string | The color theme for the UI. See [Themes](../configuration/themes) for available options. | `undefined` |
103
104
  | `ui.customThemes` | object | Custom theme definitions. | `{}` |
104
- | `ui.statusLine` | object | Custom status line configuration. A shell command whose output is shown in the footer's left section. See [Status Line](../features/status-line). | `undefined` |
105
+ | `ui.statusLine` | object | Custom status line configuration. Supports `command`, `refreshInterval`, `respectUserColors`, and `hideContextIndicator` options. See [Status Line](../features/status-line). | `undefined` |
105
106
  | `ui.hideWindowTitle` | boolean | Hide the window title bar. | `false` |
106
107
  | `ui.hideTips` | boolean | Hide all tips (startup and post-response) in the UI. See [Contextual Tips](../features/tips). | `false` |
107
108
  | `ui.hideBanner` | boolean | Hide the startup ASCII logo and info panel. Tips and chat input still render unless `ui.hideTips` is also set. | `false` |
@@ -36,6 +36,45 @@ Selected themes are saved in Qwen Code's [configuration](../configuration/settin
36
36
 
37
37
  ---
38
38
 
39
+ ## Auto Theme Detection
40
+
41
+ When the theme is set to `"auto"` (or left unset), Qwen Code automatically detects whether your terminal uses a dark or light background and selects the matching Qwen theme (`Qwen Dark` or `Qwen Light`).
42
+
43
+ ### How to enable
44
+
45
+ Set the theme to `"auto"` in `settings.json`:
46
+
47
+ ```json
48
+ {
49
+ "ui": {
50
+ "theme": "auto"
51
+ }
52
+ }
53
+ ```
54
+
55
+ Or select **Auto** in the `/theme` dialog. This is the default behavior when no theme is explicitly configured.
56
+
57
+ ### Detection methods
58
+
59
+ Qwen Code uses multiple detection methods in a fallback chain. At startup (async path), the order is:
60
+
61
+ | Priority | Method | Platform | How it works |
62
+ | -------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------------------- |
63
+ | 1 | `COLORFGBG` | All | Reads the `COLORFGBG` environment variable (set by terminals like iTerm2, rxvt, Konsole) |
64
+ | 2 | OSC 11 | All (TTY) | Sends an `ESC]11;?` query to the terminal and parses the background color from the response (~200ms) |
65
+ | 3 | macOS system appearance | macOS only | Runs `defaults read -g AppleInterfaceStyle` to check if macOS Dark Mode is active |
66
+ | 4 | Default | All | Falls back to dark theme if no method succeeds |
67
+
68
+ The first method that returns a result wins. The detected value is cached for the session so subsequent theme resolutions (e.g. reselecting Auto in the `/theme` dialog) stay consistent.
69
+
70
+ ### When to use Auto
71
+
72
+ - **Most users** — Auto works well if your terminal background matches your OS appearance or if your terminal sets `COLORFGBG` / supports OSC 11.
73
+ - **tmux / screen users** — OSC 11 may not pass through multiplexers. Detection falls back to `COLORFGBG` or macOS system appearance. If neither is available, the default dark theme is used. Set a specific theme if auto-detection gives the wrong result.
74
+ - **SSH sessions** — detection depends on the remote environment. If `COLORFGBG` is not forwarded and the remote terminal doesn't respond to OSC 11, the default dark theme is used.
75
+
76
+ ---
77
+
39
78
  ## Custom Color Themes
40
79
 
41
80
  Qwen Code allows you to create your own custom color themes by specifying them in your `settings.json` file. This gives you full control over the color palette used in the CLI.
@@ -31,15 +31,16 @@ These commands help you save, restore, and summarize work progress.
31
31
 
32
32
  Commands for adjusting interface appearance and work environment.
33
33
 
34
- | Command | Description | Usage Examples |
35
- | ------------ | ---------------------------------------- | ----------------------------- |
36
- | `/clear` | Clear terminal screen content | `/clear` (shortcut: `Ctrl+L`) |
37
- | `/context` | Show context window usage breakdown | `/context` |
38
- | → `detail` | Show per-item context usage breakdown | `/context detail` |
39
- | `/theme` | Change Qwen Code visual theme | `/theme` |
40
- | `/vim` | Turn input area Vim editing mode on/off | `/vim` |
41
- | `/directory` | Manage multi-directory support workspace | `/dir add ./src,./tests` |
42
- | `/editor` | Open dialog to select supported editor | `/editor` |
34
+ | Command | Description | Usage Examples |
35
+ | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
36
+ | `/clear` | Clear terminal screen content | `/clear` (shortcut: `Ctrl+L`) |
37
+ | `/context` | Show context window usage breakdown | `/context` |
38
+ | → `detail` | Show per-item context usage breakdown | `/context detail` |
39
+ | `/diff` | Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Use ←/→ to switch between current git diff and individual conversation turns, ↑/↓ to browse files | `/diff` |
40
+ | `/theme` | Change Qwen Code visual theme | `/theme` |
41
+ | `/vim` | Turn input area Vim editing mode on/off | `/vim` |
42
+ | `/directory` | Manage multi-directory support workspace | `/dir add ./src,./tests` |
43
+ | `/editor` | Open dialog to select supported editor | `/editor` |
43
44
 
44
45
  ### 1.3 Language Settings
45
46
 
@@ -85,6 +86,7 @@ These commands invoke bundled skills that provide specialized workflows.
85
86
  | ------------ | ------------------------------------------------------------------- | ------------------------------------------------- |
86
87
  | `/review` | Review code changes with 5 parallel agents + deterministic analysis | `/review`, `/review 123`, `/review 123 --comment` |
87
88
  | `/loop` | Run a prompt on a recurring schedule | `/loop 5m check the build` |
89
+ | `/simplify` | Review recent changes and apply safe cleanup edits directly | `/simplify`, `/simplify focus on duplication` |
88
90
  | `/qc-helper` | Answer questions about Qwen Code usage and configuration | `/qc-helper how do I configure MCP?` |
89
91
 
90
92
  See [Code Review](./code-review.md) for full `/review` documentation.
@@ -208,7 +210,59 @@ this setting.
208
210
  > `general.showSessionRecap` to `false` to opt out of the auto-trigger
209
211
  > while keeping the manual command available.
210
212
 
211
- ### 1.8 Information, Settings, and Help
213
+ ### 1.8 Diff Viewer (`/diff`)
214
+
215
+ The `/diff` command opens an interactive diff viewer showing uncommitted changes and per-turn diffs. Use ←/→ to switch between the current git diff and individual conversation turns, ↑/↓ to browse files, and Enter to view inline diffs.
216
+
217
+ **How it works:**
218
+
219
+ In interactive mode, `/diff` opens a dialog with a **source picker** along the top:
220
+
221
+ - **Current** — working tree vs HEAD (`git diff HEAD`). Shows all uncommitted changes including staged, unstaged, and untracked files.
222
+ - **T1, T2, T3, …** — per-turn diffs, one tab per model turn that modified files. Most recent turns appear first. Each tab shows a preview of the original prompt for context.
223
+
224
+ The file list displays per-file stats (lines added/removed) with tags for special states (`new`, `deleted`, `untracked`, `binary`, `truncated`, `oversized`). Press Enter on a file to view its inline diff with syntax-highlighted hunks.
225
+
226
+ Per-turn diffs require [file checkpointing](./checkpointing) to be enabled (on by default in interactive mode). When file checkpointing is off, only the "Current" source is available.
227
+
228
+ **Keyboard shortcuts:**
229
+
230
+ | Key | Action |
231
+ | --------- | ------------------------------------------- |
232
+ | `←` / `→` | Switch between sources (Current / T1 / T2…) |
233
+ | `↑` / `↓` | Navigate file list |
234
+ | `j` / `k` | Navigate file list (vim-style) |
235
+ | Enter | View inline diff for selected file |
236
+ | `←` / Esc | Return to file list from inline diff view |
237
+ | Esc | Close the dialog |
238
+
239
+ **Example:**
240
+
241
+ ```
242
+ ┌ /diff · Turn 3 "refactor the auth middleware" ──── 3 files +45 -12 ┐
243
+ │ │
244
+ │ ◀ Current · T3 · T2 · T1 ▶ │
245
+ │ │
246
+ │ › src/utils/parser.ts +30 -8 │
247
+ │ src/utils/parser.test.ts +12 -2 │
248
+ │ README.md +3 -2 │
249
+ │ │
250
+ │ ←/→ source · ↑/↓ file · Enter view · Esc close │
251
+ └─────────────────────────────────────────────────────────────────────┘
252
+ ```
253
+
254
+ **Non-interactive mode:**
255
+
256
+ In headless (`--prompt`) or non-interactive contexts, `/diff` prints a plain-text summary of the working tree vs HEAD. Per-turn navigation is not available.
257
+
258
+ ```
259
+ 3 files changed, +45 / -12
260
+ +30 -8 src/utils/parser.ts
261
+ +12 -2 src/utils/parser.test.ts
262
+ +3 -2 README.md
263
+ ```
264
+
265
+ ### 1.9 Information, Settings, and Help
212
266
 
213
267
  Commands for obtaining information and performing system settings.
214
268
 
@@ -224,7 +278,7 @@ Commands for obtaining information and performing system settings.
224
278
  | `/copy` | Copy last output content to clipboard | `/copy` |
225
279
  | `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
226
280
 
227
- ### 1.9 Common Shortcuts
281
+ ### 1.10 Common Shortcuts
228
282
 
229
283
  | Shortcut | Function | Note |
230
284
  | ------------------ | ----------------------- | ---------------------- |
@@ -234,7 +288,7 @@ Commands for obtaining information and performing system settings.
234
288
  | `Ctrl/cmd+Z` | Undo input | Text editing |
235
289
  | `Ctrl/cmd+Shift+Z` | Redo input | Text editing |
236
290
 
237
- ### 1.10 Authentication Commands
291
+ ### 1.11 Authentication Commands
238
292
 
239
293
  Use `/auth` inside a Qwen Code session to configure authentication. Use `/doctor` to inspect the current authentication and environment status.
240
294
 
@@ -60,11 +60,13 @@ Add a `statusLine` object under the `ui` key in `~/.qwen/settings.json`:
60
60
  }
61
61
  ```
62
62
 
63
- | Field | Type | Required | Description |
64
- | ----------------- | ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
65
- | `type` | `"command"` | Yes | Must be `"command"` |
66
- | `command` | string | Yes | Shell command to execute. Receives JSON via stdin, stdout is displayed (up to 2 lines). |
67
- | `refreshInterval` | number | No | Re-run the command every N seconds (minimum 1). Useful for data that changes without an Agent state event (clock, quota, uptime). |
63
+ | Field | Type | Required | Description |
64
+ | ---------------------- | ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
65
+ | `type` | `"command"` | Yes | Must be `"command"` |
66
+ | `command` | string | Yes | Shell command to execute. Receives JSON via stdin, stdout is displayed (up to 2 lines). |
67
+ | `refreshInterval` | number | No | Re-run the command every N seconds (minimum 1). Useful for data that changes without an Agent state event (clock, quota, uptime). |
68
+ | `respectUserColors` | boolean | No | Preserve ANSI color codes in command output instead of applying dimmed footer styling. Defaults to `false`. |
69
+ | `hideContextIndicator` | boolean | No | Hide the built-in context usage indicator in the footer right section. Defaults to `false`. |
68
70
 
69
71
  ## JSON input
70
72
 
@@ -67,6 +67,22 @@ This document lists the available keyboard shortcuts in Qwen Code.
67
67
  | `1-9` | Select an item by its number. |
68
68
  | (multi-digit) | For items with numbers greater than 9, press the digits in quick succession to select the corresponding item. |
69
69
 
70
+ ## History scrollback
71
+
72
+ Active only when `ui.useTerminalBuffer` is enabled (Settings → UI → Virtualized History). In that mode conversation history is rendered inside an in-app viewport instead of the host terminal scrollback, so the keys below replace the terminal's native scroll.
73
+
74
+ | Shortcut | Description |
75
+ | --------------- | ---------------------------------------------------- |
76
+ | `Shift+Up` | Scroll history up one line. |
77
+ | `Shift+Down` | Scroll history down one line. |
78
+ | `PgUp` | Scroll history up one page (viewport height). |
79
+ | `PgDn` | Scroll history down one page (viewport height). |
80
+ | `Ctrl+Home` | Jump to the top of the conversation. |
81
+ | `Ctrl+End` | Jump to the bottom (and re-engage live auto-follow). |
82
+ | **Mouse wheel** | Scroll history (3 lines per tick). |
83
+
84
+ When `ui.useTerminalBuffer` is on, the terminal forwards mouse events to qwen-code so the wheel can drive the in-app viewport. As a side effect, **native click-and-drag text selection is consumed by the program** — hold `Shift` (or `Option` on macOS Terminal / iTerm) while dragging to bypass mouse capture and select text the usual way.
85
+
70
86
  ## IDE Integration
71
87
 
72
88
  | Shortcut | Description |
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: simplify
3
+ description: Review recent code changes for reuse, code quality, and efficiency, then directly apply straightforward cleanup improvements. Use when the user wants a post-implementation cleanup pass, pre-PR polish, or asks to simplify/refine recent changes. Invoke with `/simplify` or `/simplify <focus>`.
4
+ allowedTools:
5
+ - agent
6
+ - run_shell_command
7
+ - grep_search
8
+ - read_file
9
+ - write_file
10
+ - edit
11
+ - glob
12
+ ---
13
+
14
+ # Simplify Recent Changes
15
+
16
+ You are running a structured cleanup workflow over recent code changes. Your goal is not just to comment on the code, but to safely improve it.
17
+
18
+ ## Step 1: Identify the review scope
19
+
20
+ Determine which files and changes to review.
21
+
22
+ 1. First inspect the current git state.
23
+ 2. If there are staged changes, review against `HEAD` so both staged and unstaged tracked changes are included.
24
+ 3. Otherwise review the current uncommitted diff.
25
+ 4. If there is no git diff, fall back to `git ls-files --modified --others --exclude-standard` so the scope respects `.gitignore` (this keeps build output, `node_modules`, and other ignored paths out of the cleanup).
26
+ 5. If that is still empty, fall back to files edited in this conversation.
27
+ 6. If you still cannot identify a meaningful scope, stop and tell the user there are no recent changes to simplify.
28
+
29
+ Preferred commands:
30
+
31
+ - `git diff --name-only`
32
+ - `git diff --staged --name-only`
33
+ - `git diff HEAD --name-only`
34
+ - `git diff`
35
+ - `git diff HEAD`
36
+ - `git status --short`
37
+
38
+ Use `git diff HEAD` whenever staged changes exist. Otherwise use `git diff`.
39
+
40
+ ## Step 2: Launch three review passes in parallel
41
+
42
+ Use the `agent` tool and launch all review passes in a single response so they run concurrently. Each pass must receive the same review scope and diff command. These passes are read-only: each one inspects and reports findings only and must not modify files — all edits happen later in Step 4.
43
+
44
+ Keep each review prompt short and focused. Do not paste the full diff into the prompt. Tell each pass to read the diff itself and inspect only files relevant to its findings.
45
+
46
+ ### Pass 1: Code Reuse Review
47
+
48
+ Look for opportunities to reduce duplication and reuse existing code:
49
+
50
+ - existing utilities or helpers that should be reused
51
+ - duplicated logic introduced in new code
52
+ - inline logic that should delegate to an existing abstraction
53
+ - ad-hoc helpers for string, path, env, parsing, or type checks when a project utility already exists
54
+
55
+ ### Pass 2: Code Quality Review
56
+
57
+ Look for maintainability issues:
58
+
59
+ - copy-paste variants that should be unified
60
+ - parameter sprawl or awkward APIs
61
+ - redundant state or indirection
62
+ - abstraction leaks
63
+ - stringly-typed code that should be modeled more clearly
64
+ - unnecessary nesting
65
+ - unnecessary comments that explain what instead of why
66
+ - naming or structure that does not match surrounding code
67
+
68
+ ### Pass 3: Efficiency Review
69
+
70
+ Look for wasteful work and unnecessary overhead:
71
+
72
+ - repeated work that can be memoized, cached, or removed
73
+ - serial work that can be parallelized safely
74
+ - unnecessary scans, allocations, reads, or traversals
75
+ - hot-path blocking work
76
+ - redundant no-op updates
77
+ - overly broad operations when a narrower one would work
78
+ - existence-check patterns that introduce TOCTOU style waste or risk
79
+
80
+ ## Step 3: Aggregate findings
81
+
82
+ Wait for all three passes to finish, then merge overlapping findings.
83
+
84
+ Prioritize fixes that are:
85
+
86
+ - low risk
87
+ - local in scope
88
+ - clearly aligned with existing project patterns
89
+ - easy to validate with tests or targeted commands
90
+
91
+ Do not force a cleanup if it would require speculative architectural changes.
92
+
93
+ ## Step 4: Apply straightforward improvements
94
+
95
+ Directly implement safe cleanup improvements.
96
+
97
+ Examples of good automatic fixes:
98
+
99
+ - replace duplicated logic with an existing helper
100
+ - remove redundant code, but only after a repository-wide search confirms it has no remaining callers
101
+ - simplify conditionals or control flow
102
+ - tighten loops or repeated work
103
+ - reduce unnecessary state or wrapper code
104
+ - remove low-value comments
105
+ - align code with nearby conventions
106
+
107
+ Skip items that are uncertain, risky, or too invasive. Do not spend time debating rejected findings; simply move on.
108
+
109
+ ## Step 5: Verify the cleanup
110
+
111
+ After making changes:
112
+
113
+ 1. Run focused tests for the changed area when they exist.
114
+ 2. Run the relevant project quality checks you can identify for the touched code.
115
+ 3. If there are no applicable tests, at least run a targeted build, typecheck, or lint command that covers the edited files.
116
+
117
+ Prefer targeted verification over whole-repo commands unless the project only exposes repo-wide checks.
118
+
119
+ ## Additional focus
120
+
121
+ If the user supplied extra instructions after `/simplify`, treat them as additional review focus and prioritize them alongside the default dimensions.
122
+
123
+ The raw user invocation appears below when present. Use it to extract any extra focus such as performance, duplication, rendering, API clarity, testability, or naming consistency.
@@ -7,7 +7,7 @@ import {
7
7
  hasRebuiltToolRegistry,
8
8
  rebuildToolRegistryOnOverride,
9
9
  resolveSubagentApprovalMode
10
- } from "./chunk-QJ47SC3D.js";
10
+ } from "./chunk-7JHNICSJ.js";
11
11
  import "./chunk-24YKA2DA.js";
12
12
  import "./chunk-O4PICXES.js";
13
13
  import "./chunk-TW522KN6.js";
@@ -19,20 +19,21 @@ import "./chunk-EY6BDW7Y.js";
19
19
  import "./chunk-HAQCNXSG.js";
20
20
  import "./chunk-77WXWU44.js";
21
21
  import "./chunk-GVWPJCXU.js";
22
- import "./chunk-3ORWVTVV.js";
22
+ import "./chunk-OXXOAIGT.js";
23
23
  import "./chunk-J5VCSWPA.js";
24
24
  import "./chunk-UWCTAVOD.js";
25
25
  import "./chunk-W57YDFU5.js";
26
26
  import "./chunk-OFEVLU4C.js";
27
27
  import "./chunk-NQ3E7YLD.js";
28
- import "./chunk-ODPVJ6JJ.js";
28
+ import "./chunk-OJFMTECH.js";
29
29
  import "./chunk-UQRYJQBE.js";
30
30
  import "./chunk-6RQTH7UQ.js";
31
31
  import "./chunk-R2B65CAN.js";
32
- import "./chunk-7YJIR2FX.js";
32
+ import "./chunk-G4K6P5KN.js";
33
33
  import "./chunk-OIL7KDWV.js";
34
+ import "./chunk-HX3JRTWL.js";
34
35
  import "./chunk-U2K6HDUJ.js";
35
- import "./chunk-6NUSWV4M.js";
36
+ import "./chunk-TDZCEIK6.js";
36
37
  import "./chunk-HCSJIOLR.js";
37
38
  import "./chunk-SZOEIL6S.js";
38
39
  import "./chunk-5IFG2VC4.js";
@@ -25,7 +25,7 @@ import {
25
25
  runtimeDiagnostics,
26
26
  safeJsonParse,
27
27
  tokenLimit
28
- } from "./chunk-6NUSWV4M.js";
28
+ } from "./chunk-TDZCEIK6.js";
29
29
  import {
30
30
  FinishReason,
31
31
  GenerateContentResponse
@@ -7,7 +7,7 @@ import {
7
7
  OpenAIContentConverter,
8
8
  TaggedThinkingParser,
9
9
  openaiRequestCaptureContext
10
- } from "./chunk-3ORWVTVV.js";
10
+ } from "./chunk-OXXOAIGT.js";
11
11
  import {
12
12
  buildRuntimeFetchOptions,
13
13
  redactProxyError
@@ -22,7 +22,7 @@ import {
22
22
  runtimeDiagnostics,
23
23
  safeJsonParse,
24
24
  tokenLimit
25
- } from "./chunk-6NUSWV4M.js";
25
+ } from "./chunk-TDZCEIK6.js";
26
26
  import {
27
27
  GenerateContentResponse
28
28
  } from "./chunk-HCSJIOLR.js";