mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-10-19 12:43:39 +00:00
* fix(core): surface PreToolUse ask content on MCP tool confirmations (#13687) A PreToolUse 'ask' now merges into the tool's normal approval as one confirmation, but withPreToolUseAskReason only handled edit/exec/info confirmation details. MCP tools return 'mcp' details, which fell into the default passthrough, so the hook's question and the exact content it asked about were silently dropped: approving the plain MCP prompt admitted the call blind (or, under YOLO, the forced confirmation showed no content at all). Fall back to the literal-text info confirmation the pre-merge hook bounce used, so the content stays reviewable and expandable before approval. The Mem0 write E2E test asserted the pre-merge two-dialog sequence: MCP permission prompt, then a separate hook content prompt. Update the scenarios to the merged single-dialog contract — one confirmation whose heading is the hook's literal content, in every approval mode — and add a scheduler unit test pinning the MCP fallback. Fixes #13687. Unblocks the v0.25.1-preview.1 release run (#13696). * fix(core): judge plan mode from the tool's real confirmation shape A PreToolUse 'ask' on an MCP tool rewrites the confirmation to the literal-text `info` shape, and `isPlanModeBlocked` exempts `info` — so a hook-asked MCP call in plan mode flipped from a hard block into an approvable dialog. Read the pre-rewrite shape in the plan-mode gate and pin it with a regression test. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Patrol-Run: qwen-pr-closeout/jmuzv9c3wfd * test(core): pin the hook-ask guard and name the MCP destination The PreToolUse ask fallback for MCP calls now names the server and tool in the dialog body: the `info` shape renders no title and carries no server field, so the hook's reason alone need not identify the destination. The MCP fixtures use a distinct `toolDisplayName` so the title assertion discriminates which field production reads, and a new AUTO_EDIT test pins the `!preToolUseAsk` term that keeps a hook-asked MCP write from being silently auto-approved. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Patrol-Run: qwen-pr-closeout/jmuzzjnorfk --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> |
||
|---|---|---|
| .. | ||
| command-output-visibility.test.ts | ||
| context-compress-interactive.test.ts | ||
| cron-interactive.test.ts | ||
| ctrl-c-exit.test.ts | ||
| external-context-auto-recall.test.ts | ||
| external-context-mem0-write.test.ts | ||
| file-system-interactive.test.ts | ||
| hooks-command.test.ts | ||
| interactive-session.test.ts | ||
| interactive-session.ts | ||
| mid-turn-submit-interactive.test.ts | ||
| mixed-input-crash.test.ts | ||
| protocol-tags-interactive.test.ts | ||
| submitted-prompt-provenance.test.ts | ||
| workflow-completion.test.ts | ||