Commit graph

5559 commits

Author SHA1 Message Date
wenshao
7804946970 refactor(footer): inline status line in footer left section
Move status line from a dedicated row below the footer into the
footer's left section, replacing "? for shortcuts" when active.
High-priority messages (Ctrl+C/D, Esc, vim INSERT, shell mode)
still override the status line.

Move approval mode indicator to a separate row below the footer,
shown only when mode is non-default. This eliminates the empty
gap in default mode and matches upstream layout.
2026-04-08 20:18:06 +08:00
wenshao
841eb3c70c fix: address reviewer feedback — stdin error logging, JSON schema, i18n
- Log non-EPIPE stdin errors at debug level instead of silently
  swallowing them
- Add proper JSON schema properties for statusLine (type, command,
  padding) with enum, required, and additionalProperties constraints
- Add missing i18n entry for /statusline command description
2026-04-08 20:08:36 +08:00
qqqys
36482f04f7
fix(cli): fix csiUPrefix error in Linux/Wayland (#2995) 2026-04-08 19:08:51 +08:00
wenshao
fc7ac2abb7 fix(statusline-setup): clarify agent prompt for script execution and git locks
- Instruct agent to use "bash script.sh" pattern instead of direct
  execution (agent cannot chmod +x without SHELL tool)
- Replace vague "skip optional locks" with concrete GIT_OPTIONAL_LOCKS=0
- Simplify "parent agent" framing to direct user-facing message
2026-04-08 19:05:18 +08:00
wenshao
55b1ab174d fix(status-line): derive remaining_percentage from used and reject empty commands
- Compute remaining_percentage as round(100 - used) to guarantee
  used + remaining always sums to exactly 100.0
- Reject empty or whitespace-only command strings in config validation
2026-04-08 18:58:06 +08:00
pomelo
1e87388ffd
feat: add qwen3.6-plus model to ModelStudio Coding Plan (#3015)
- Add qwen3.6-plus to both China and Global/Intl regions as the first
  model in the Coding Plan template (1M context, enable_thinking)
- Set qwen3.6-plus as the new default MAINLINE_CODER_MODEL
- Add image+video input modality support for qwen3.6-plus

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-08 18:57:07 +08:00
wenshao
0be4d32cb0 Merge remote-tracking branch 'origin/main' into feature/status-line-customization 2026-04-08 18:50:10 +08:00
wenshao
520ed4e040 fix: address audit findings across status-line and verbose-mode features
- useStatusLine: clamp used/remaining percentage to [0,100], track
  totalLinesRemoved as trigger, clean up debounceRef on unmount
- AppContainer: use drainQueue from useMessageQueue instead of manual
  messageQueueRef to avoid stale-ref reads between renders
- builtin-agents: add WRITE_FILE tool to statusline-setup agent, improve
  PS1 parsing instructions (unquoted assignments, \[/\]/\e escapes),
  strip ANSI colors, remove unreachable symlink instruction
- CompactToolGroupDisplay: fix misleading hint "show full tool output"
  to "toggle verbose mode" across all 6 locales
- AppContainer.test: add missing drainQueue mock
2026-04-08 18:45:44 +08:00
wenshao
c36953816c fix(test): add missing metrics and model fields to Footer test mock
useStatusLine hook accesses sessionStats.metrics.tools.totalCalls,
sessionStats.metrics.files.totalLinesAdded, and currentModel which
were missing from the mock UIState, causing a TypeError crash during
render and making 4 Footer tests fail in CI.
2026-04-08 18:28:40 +08:00
tanzhenxin
d9a1275913
Merge pull request #2954 from QwenLM/fix/disable-followup-suggestions-default
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
fix(cli): disable follow-up suggestions by default
2026-04-08 18:02:00 +08:00
pomelo
2a4e8705c5
Merge pull request #2881 from QwenLM/feat/add-bugfix-workflow-and-testing-agents
feat: add bugfix workflow, test-engineer agent, and debugging skills
2026-04-08 17:54:18 +08:00
克竟
24a28d5fb0 refactor(status-line): redesign JSON input schema and add context fields
Restructure the status line stdin JSON for clarity and accuracy:
- Rename model.id → model.display_name, cwd → workspace.current_dir
- Replace raw context_window size/count with used_percentage,
  remaining_percentage, current_usage, context_window_size, and
  total_input_tokens/total_output_tokens
- Add version field from cfg.getCliVersion()
- Add git.branch, metrics.models, metrics.files
- Remove upstream-only fields: tokens.tool (never populated),
  session (start_time/elapsed_time not live-updating),
  streaming_state, approval_mode, terminal, metrics.tools
- Rename tokens.candidates → tokens.completion (Qwen API convention)
- Fix template string escaping in builtin-agents to avoid
  templateString() placeholder collision

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 17:52:07 +08:00
Shaojin Wen
1e8bc031cc
feat(core): adaptive output token escalation (8K default + 64K retry) (#2898)
* feat(core): adaptive output token escalation (8K default + 64K retry)

99% of model responses are under 5K tokens, but we previously reserved
32K for every request. This wastes GPU slot capacity by ~4x.

Now the default output limit is 8K. When a response hits this cap
(stop_reason=max_tokens), it automatically retries once at 64K — only
the ~1% of requests that actually need more tokens pay the cost.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add design doc and user doc for adaptive output token escalation

- Add design doc covering problem, architecture, token limit
  determination, escalation mechanism, and design decisions
- Document QWEN_CODE_MAX_OUTPUT_TOKENS env var in settings.md
- Add max_tokens adaptive behavior explanation in model config section

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 17:30:39 +08:00
tanzhenxin
3c23952ef7
Merge pull request #2897 from QwenLM/feat/thinking-cross-turn-retention-idle-cleanup
feat(core): thinking block cross-turn retention with idle cleanup
2026-04-08 15:26:53 +08:00
zhangxy-zju
db7488f3a2
Merge pull request #2921 from QwenLM/feat/plan-mode
feat(cli): implement /plan command for plan mode
2026-04-08 15:23:27 +08:00
wenshao
121af70cc0 fix: ProceedOnce should set DEFAULT mode, not restore pre-plan mode
"Yes, and manually approve edits" was restoring getPrePlanMode() which
could be YOLO, contradicting the label. Now hardcodes DEFAULT to match
the "manually approve" semantics.
2026-04-08 14:51:26 +08:00
wenshao
6a55a9aeea feat(config): make thinking idle threshold configurable and lower default to 5min
Align with observed provider prompt-cache TTL (~5 min). Add
`context.gapThresholdMinutes` setting so users can tune the threshold
for providers with different cache TTLs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:21:06 +08:00
DennisYu07
28b81b807f
Merge pull request #2976 from chinesepowered/fix/hook-signal-exit-code
fix(hooks): preserve null exit code from signal kills instead of collapsing to 0
2026-04-08 10:41:03 +08:00
wenshao
1d4c17b1ce fix: rename /plan execute to /plan exit
Rename the subcommand to accurately reflect its behavior (exits plan
mode and restores previous approval mode, does not trigger execution).
Update source, tests, i18n keys (6 locales), and docs.
2026-04-08 10:21:00 +08:00
wenshao
a83877e3de fix(review): findings MUST go in comments array, NOT in body
LLM was putting all findings in the review body (creating a summary
comment) instead of the comments array (inline comments). Added
prominent warning: "Findings go in comments array, NOT in body."
Also: "Do NOT use COMMENT when there are Critical findings."

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 09:22:57 +08:00
wenshao
d4b96c8527 feat(review): use Create Review API for single-call review submission
Replace the two-phase posting (individual gh api comments + separate
gh pr review verdict) with a single Create Review API call that bundles
inline comments + verdict together — same approach as Copilot Code Review.

Benefits:
- No summary comment needed (inline comments ARE the review)
- No "two-phase posting" complexity
- No "STOP for Comment verdict" rules
- No duplicate/orphaned reviews
- One API call instead of N+1
- Verdict (approve/request_changes/comment) correctly attached

Eliminates ~40 lines of complex posting rules replaced by ~30 lines
of straightforward JSON construction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 07:33:15 +08:00
wenshao
97aacfac4e fix(review): enforce correct verdict flag + exclude Nice to have from PR
Three issues found from real /review output on PR #2921:

1. Critical findings but verdict submitted as --comment instead of
   --request-changes. Added explicit: "Do NOT use --comment when
   verdict is Request changes — this loses the blocking status."
2. Nice to have findings appeared in PR summary. Added: "Do NOT
   include Nice to have findings" to all summary rules.
3. Clarified that failed-inline summary should only contain
   Critical/Suggestion, never Nice to have.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 07:26:59 +08:00
wenshao
b50f23f91c fix: correct copyright year from 2026 to 2025 in planCommand.ts 2026-04-08 06:53:44 +08:00
chinesepowered
6763035e1e fix(hooks): distinguish signal-killed hook from successful exit 2026-04-07 14:24:41 -07:00
wenshao
bb85768adf fix(review): detect old review comments + require line numbers
Two issues found from real review (PR #2826):

1. Multiple /review runs on same PR create duplicate comments. Now
   Step 9 checks for existing "via Qwen Code /review" comments
   before posting and warns the user about potential duplicates.

2. Comments posted without line numbers appear as orphaned PR
   comments. Now enforced: every inline comment MUST reference a
   specific line in the diff. Findings that can't be mapped to
   diff lines go in the summary instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 05:20:12 +08:00
wenshao
7902806e63 docs: add ui.statusLine entry to settings reference
Add the missing ui.statusLine setting to the settings.md reference
table with a link to the status-line feature documentation.
2026-04-08 05:09:56 +08:00
wenshao
51964fa4b9 Merge remote-tracking branch 'origin/main' into feature/status-line-customization
# Conflicts:
#	packages/cli/src/ui/components/Footer.tsx
2026-04-08 05:05:04 +08:00
wenshao
ab72b5e6bb fix(review): simplify comment template — example-first, rules after
Replaced 5 numbered rules + example with example-first format.
LLMs pattern-match from examples better than parsing rules.
Rules condensed to 2 sentences after the example.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 04:28:15 +08:00
wenshao
664bc34d84 fix(review): fix broken nested code fence in comment template
Prettier mangled the nested code fences (4-backtick outer + 3-backtick
suggestion inner). Replaced with plain-text numbered structure +
indented example. Also fixed orphaned 4-backtick fence closing Step B.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 04:27:05 +08:00
wenshao
1a93078aee fix(review): suggestion blocks supported by GitLab/Gitea too, not just GitHub
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 04:19:49 +08:00
wenshao
3f91c1d1b7 feat(review): use GitHub suggestion blocks for one-click fixes
Inline comments now use ```suggestion blocks when the fix is a direct
line replacement. PR authors can accept fixes with one click instead
of manually copying code. Falls back to regular code blocks when the
fix spans multiple locations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 04:17:54 +08:00
wenshao
5a41e17b2b fix(review): clarify Critical vs Suggestion severity boundary
Logic errors causing incorrect behavior (wrong return values, skipped
code paths) were being classified as Suggestion instead of Critical.
Added explicit examples: "if code does something wrong, it's Critical
— not Suggestion."

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 04:16:33 +08:00
wenshao
3982df56bc fix(review): PR summary should not repeat inline comments or show stats
Three issues found in real review output:
1. Summary repeated findings already posted as inline comments
2. "Review Stats" (agent count, raw/confirmed) is internal noise
3. Summary was too verbose

Fix: partial-failure summary must contain ONLY the failed findings.
Distinguish terminal output (stats OK) from PR comments (no stats).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 04:12:54 +08:00
wenshao
2824bf6327 fix(review): avoid #N notation in PR comments (GitHub auto-links)
GitHub renders #1, #2 as links to issues/PRs with those numbers.
Review summaries using "#1 (logic error)" link to the wrong target.
Added guideline: use (1), [1], or descriptive references instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 04:11:19 +08:00
wenshao
ea2f8e1b78 feat(review): match review language to PR language
Review comments, findings, and summaries must use the same language
as the PR (title/description/code comments). English PR → English
review. Chinese PR → Chinese review. No language switching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 04:08:21 +08:00
易良
4d4af4ac51
fix(vscode-ide-companion): fix blank screen in VS Code 0.14.1 webview (#2959)
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
Qwen Code CI / Test-7 (push) Blocked by required conditions
* fix(vscode-ide-companion): avoid pulling Node.js modules into webview bundle

- Add wildcard to esbuild external config to exclude deep sub-path imports
- Inline isSupportedImageMimeType to remove core package dependency
- Create browser-safe tokenLimits.ts to avoid dynamic require at runtime
- Update App.tsx to use local tokenLimits module

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* chore(vscode-ide-companion): bump version to 0.14.2

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-07 23:47:46 +08:00
wenshao
16640e92b9 Merge remote-tracking branch 'origin/main' into feat/review-skill-improvements 2026-04-07 22:15:13 +08:00
wenshao
6bb5e0a276 Merge remote-tracking branch 'origin/main' into feat/plan-mode
# Conflicts:
#	packages/cli/src/i18n/locales/de.js
#	packages/cli/src/i18n/locales/en.js
#	packages/cli/src/i18n/locales/ja.js
#	packages/cli/src/i18n/locales/pt.js
#	packages/cli/src/i18n/locales/ru.js
#	packages/cli/src/i18n/locales/zh.js
2026-04-07 21:04:25 +08:00
tanzhenxin
03fdaf2faa fix(cli): disable follow-up suggestions by default
Most Qwen OAuth users don't have a fast model configured for this
feature, so it fires a wasted API request on every turn with no
visible benefit. Default to off; users can opt in via settings.
2026-04-07 12:50:27 +00:00
wenshao
297d81ee5f fix(review): enforce one-line summary body for Approve/Request changes
LLM was writing detailed analysis in the review summary body despite
"minimal body" instruction. Strengthened to "one-line body only, do
NOT include analysis/findings/explanations" with concrete examples.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 17:27:52 +08:00
LaZzyMan
80b0c6baec fix(core): add getDefaultPermission and allowExternalPaths to ripGrep tool
Add getDefaultPermission() override to GrepToolInvocation in ripGrep.ts
to match the behavior of grep.ts, returning "ask" for paths outside
the workspace and "allow" for workspace-internal paths.

Also pass allowExternalPaths: true to resolveAndValidatePath in both
the execute() and validateToolParamValues() methods, so external paths
are not rejected at the validation layer (permission is deferred to
getDefaultPermission as designed).

Fixes issue where grep searches in arbitrary workspace paths would
fail with "Path is not within workspace" even when the user intended
to search external directories.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-07 17:18:24 +08:00
tanzhenxin
9b22c9fa7c
Merge pull request #2943 from QwenLM/fix/weixin-ilink-headers
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
fix(weixin): add missing iLink-App-Id and iLink-App-ClientVersion headers
2026-04-07 15:52:15 +08:00
tanzhenxin
5b550ae7cd
Merge pull request #2858 from QwenLM/fix/anyof-schema-validation-coercion
fix(core): coerce stringified JSON values for anyOf/oneOf MCP tool schemas
2026-04-07 15:52:01 +08:00
tanzhenxin
b632541629
Merge pull request #2770 from chiga0/feat/add-verbose-mode-switcher
feat: to #2767, support verbose and compact mode swither with ctrl-o
2026-04-07 15:48:41 +08:00
wenshao
820191d99d docs: add zero-findings PR tip to follow-up table
User doc and PR description now include the "PR review, zero findings
→ post comments → approve PR" row in the follow-up actions table.
Also fixed PR description: "Step 4" → "Step 9" for post comments.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:33:03 +08:00
wenshao
2717aa1269 feat(review): add "post comments" tip for zero-findings PR review
When PR review finds no issues and --comment was not specified, suggest
"post comments" so the user can formally approve the PR on GitHub.
Without this, the LGTM only appears in terminal — no approval status
on the PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:27:23 +08:00
tanzhenxin
928a957db1 fix(weixin): add missing iLink-App-Id and iLink-App-ClientVersion headers
The iLink Bot API requires these headers for session authentication.
Without them, getupdates returns errcode -14 (session timeout).

The protocol version (2.0.0) is tracked independently from our channel
version, matching the current official plugin's API compatibility level.

Closes #2908
2026-04-07 15:26:00 +08:00
tanzhenxin
d7f60fb416 test(cli): remove flaky 'should delete entire placeholder on backspace' test
Same class of Windows CI timing flake — the backspace keypress
doesn't propagate through the paste/keypress pipeline fast enough
on slow runners, so replaceRangeByOffset is never called (0 calls).
2026-04-07 07:25:27 +00:00
wenshao
3e5582aa45 fix(review): simplify --comment on unchanged PR — just re-run review
Loading cached findings from a Markdown report is fragile (unstructured
prose, LLM might misparse). Instead, when --comment is specified on an
unchanged PR, simply run the full review. The user explicitly wants
comments posted — spending 7 LLM calls is acceptable.

Removed reportPath from cache schema (no longer needed).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:57:53 +08:00
wenshao
6b54aff0e3 fix(review): add reportPath to cache for --comment on unchanged PR
When --comment is used on an unchanged PR, Step 9 needs prior findings
to post. Cache now stores reportPath pointing to the saved report from
Step 10, allowing findings to be loaded without re-running the review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:52:09 +08:00