qwen-code/docs/users/features
qqqys 36c77ff803
fix(dingtalk): attach media from quoted messages (#9347)
* fix(dingtalk): attach media from quoted messages

* fix(dingtalk): keep the reply text when attaching quoted media

R1-1: `attachMedia`'s placeholder cleanup was written for the direct-media
path, where `extractContent` generates `(audio)` / `(video)` /
`(file: name)` itself. This PR made the quoted-media path reach it, and there
`envelope.text` is the user's own reply — so a reply reading exactly like one
of those placeholders was blanked and the agent got an attachment with no
prompt. A group `@Bot (audio)` arrives here as exactly `(audio)`, the mention
having been stripped upstream. `attachMedia` now takes the placeholder to
erase as a parameter; only the direct-media call site passes one.

R1-2: the same path newly routes text-only replies through the unguarded
`mkdirSync`/`writeFileSync`/`basename` block. Those are synchronous throw
sites — ENOSPC on a write of up to 50 MB, ENAMETOOLONG from a quoted fileName
over 255 bytes (`basename` does not truncate), a TypeError from a truthy
non-string fileName. An escape rejects `processMessage`, whose catch sends
the generic error reply and never calls `handleInbound`; the msgId is already
in `seenMessages`, so DingTalk's retry is deduped and the prompt is lost for
good. The block now degrades the way a failed download already does: log,
skip the attachment, deliver the text. This also covers the pre-existing
direct-media path.

Verified: dingtalk 310/310. Both mutation-checked — restoring the caller-blind
cleanup fails 3 tests, letting the fs block throw fails 1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(dingtalk): address quoted-media review findings

Unify the msgType->mediaType mapping in a shared helper, make extractContent
the single source of truth for the placeholder text cleaned on attach, and
remove the store directory when a media write fails so failed stores no longer
leak into tmpdir. Merge the stacked attachMedia JSDoc blocks, document quoted
media downloads, and pin the previously uncovered paths: unmapped quoted
msgTypes with a downloadCode, own-media + quoted-media combinations, direct
placeholder cleaning, and the degraded-store attachment shapes.

* fix(dingtalk): file-back a quoted image colliding with the own image

* fix(dingtalk): give generated media store names a mime-derived extension (#9347)

---------

Co-authored-by: qqqys <266654365+qqqys@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot[bot]@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-08-20 03:18:32 +00:00
..
channels fix(dingtalk): attach media from quoted messages (#9347) 2026-08-20 03:18:32 +00:00
_meta.ts feat(cli): add native multi-agent coordination (#8804) 2026-08-12 17:39:03 +00:00
approval-mode.md feat(cli): change default approval mode from default to auto (#6899) 2026-07-15 04:55:32 +00:00
arena.md feat(cli): add native multi-agent coordination (#8804) 2026-08-12 17:39:03 +00:00
auto-mode.md fix: ask when auto classifier is unavailable (#7331) 2026-07-21 03:27:17 +00:00
code-review.md feat(review): wire --resume through /review and the review run subcommand (#9153) 2026-08-19 05:13:09 +00:00
commands.md feat(cli): add /advisor command for second-opinion conversation review (#7567) 2026-08-17 08:54:18 +00:00
computer-use.md Fix long session timeline scrolling (#6526) 2026-07-09 11:43:21 +00:00
dual-output.md fix(cli): bound headless tool result content (#9012) 2026-08-12 16:22:36 +00:00
followup-suggestions.md feat(cli): show follow-up suggestion in input placeholder (#5145) 2026-06-19 13:39:12 +08:00
headless.md fix(cli): bound headless tool result content (#9012) 2026-08-12 16:22:36 +00:00
hooks.md fix(core): separate hook context from transcript display (#7948) 2026-08-08 02:03:20 +00:00
language.md refactor(cli): revert dynamic slash command LLM translation (#4145) 2026-05-15 16:01:16 +08:00
lsp.md fix(lsp): expose status and startup diagnostics (#3649) 2026-05-17 01:42:28 +08:00
markdown-rendering.md feat(cli): support /copy N to copy Nth-last AI message (#4761) 2026-06-08 10:08:45 +08:00
mcp.md fix(core): Avoid replaying unsafe MCP tool calls (#8387) 2026-08-03 11:04:38 +00:00
memory.md feat(memory): protect pinned files during forked Dream (#7714) 2026-08-01 00:55:45 +00:00
multi-agent-coordination.md feat(cli): add native multi-agent coordination (#8804) 2026-08-12 17:39:03 +00:00
sandbox.md fix(cli): avoid updating active CLI processes (#6874) 2026-07-15 00:33:17 +00:00
scheduled-tasks.md docs(channels): Document loops and proactive delivery (#7628) 2026-07-26 07:32:18 +00:00
skills.md docs: document skill learning and live reload (#8298) 2026-08-01 15:23:08 +00:00
status-line.md fix(cli): avoid duplicate context usage in footer and status line (#8749) 2026-08-11 07:18:48 +00:00
structured-output.md docs: user + design docs for --json-schema structured output (#4051) 2026-05-17 23:10:34 +08:00
sub-agents.md feat(core): let a workflow agent pin a directory and outlive the default bounds (#8972) 2026-08-17 08:34:03 +00:00
tips.md feat: add contextual tips system with post-response context awareness (#2904) 2026-04-13 17:40:27 +08:00
token-caching.md feat: update docs 2025-12-12 19:37:36 +08:00
tool-use-summaries.md fix(cli): stabilize thinking block height, replace transcript overlay with inline Ctrl+O toggle (#8077) 2026-08-01 02:39:53 +00:00
worktree.md feat(core): improve subagent delegation defaults and guardrails (#7048) 2026-07-18 08:52:48 +00:00