feat(cli): improve /copy command argumentHint and description#5110
Conversation
|
Thanks for the PR @huww98! Template looks good ✓ On direction: Clear UX discoverability improvement — On approach: The scope is right — just updating strings, no logic changes. The new Moving on to code review and testing. 🔍 中文说明感谢贡献 @huww98! 模板完整 ✓ 方向:清晰的 UX 可发现性改进—— 方案:范围合理——仅更新字符串,无逻辑变更。作者的更新在英文描述和 zh/zh-TW 翻译中都保留了"Nth-latest"语义,解决了之前关于精确性的顾虑。 进入代码审查和测试。🔍 — Qwen Code · qwen3.7-max |
wenshao
left a comment
There was a problem hiding this comment.
No review findings. Downgraded from Approve to Comment: CI still running. — qwen3.7-max via Qwen Code /review
The /copy command supports code block selection with language filtering, LaTeX, and Mermaid — but the TUI autocomplete only showed "[N]" with a description about copying the full AI reply. Users had no way to discover these capabilities from the prompt. Update argumentHint to "[N] [<lang>|code|latex|mermaid] [<index>]" and description to mention all supported targets, noting N counts from the last message.
d0259d6 to
d540f41
Compare
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
Updated to preserve |
Code ReviewIndependent proposal: To improve Diff review: Clean, minimal changes — 4 files, +10/-8 lines. Only string changes, no logic modifications.
No correctness issues, no security concerns, no convention violations found. TestingUnit tests (on PR branch):
CI (all green):
Source verification: TUI testing (tmux): The React Ink TUI does not receive Local TUI verification by @wenshao (Linux, Node 22.22.2): confirmed the new hint renders correctly in both en and zh-CN in the real TUI, and every advertised option is backed by a working, tested 中文说明代码审查独立方案: 为了改善 Diff 审查: 干净、最小化——4 个文件,+10/-8 行。仅字符串更改,无逻辑修改。
未发现问题。 测试
— Qwen Code · qwen3.7-max |
|
This is a clean, well-scoped PR that solves a real discoverability problem. The The implementation is exactly what I would have done — just update the strings. The i18n key change is handled correctly (consistent key across all three updated locale files), and the author's follow-up commit preserved "Nth-latest" semantics that the first triage flagged as slightly lost. Tests pass (65/65), CI is green on all three platforms, and @wenshao's local TUI verification confirmed the hint renders correctly and every advertised option maps to a real, tested capability. The old key orphaned in 6 untranslated locale files is harmless — it joins a pre-existing pile of ~203 unused keys that The tmux TUI input injection doesn't work in this CI environment (React Ink raw mode limitation), but the dev build starts fine and the source-level verification is conclusive. Combined with @wenshao's real-TUI verification on Linux, the evidence is sufficient. Approving. ✅ 中文说明这是一个干净、范围合理的 PR,解决了真实的可发现性问题。 实现方式是我会选择的方案——直接更新字符串。i18n 键更改处理正确(三个更新的 locale 文件中键一致),作者的后续提交保留了第一次审查指出稍丢失的"Nth-latest"语义。测试全部通过(65/65),CI 在三个平台上全绿,@wenshao 的本地 TUI 验证确认提示正确渲染,每个宣传的选项都对应真实且有测试覆盖的功能。 6 个未翻译 locale 文件中的旧孤儿键无害——加入了 CI 环境中 tmux TUI 输入注入不可用(React Ink raw mode 限制),但 dev 构建正常启动,源码级验证是结论性的。加上 @wenshao 在 Linux 上的真实 TUI 验证,证据充分。 批准。✅ — Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
Local verification (merge reference)Low-risk, text-only change (autocomplete Verdict: the hint is accurate, the i18n is consistent, and it renders correctly in both English and Chinese. Good to merge. 1. Real TUI autocomplete (the deliverable)Typing en zh-CN (same syntax hint, translated description) 2. The hint is accurate (every advertised option is real)I checked the hint against
So the hint doesn't over-promise — all of it works today. 3. Tests + i18n
Minor (non-blocking, optional)The previous key Good to merge — accurate hint, consistent i18n, renders correctly in en/zh, fully backed by passing tests. 中文版(Chinese version)本地验证(合并参考)低风险、纯文本改动( 结论:提示准确、i18n 一致、在英文与中文下都渲染正确。可以合并。 1. 真实 TUI 自动补全(交付物本身)在构建出的二进制里输入 en zh-CN(语法提示一致,描述为翻译版) 2. 提示是准确的(每个宣传项都真实存在)我对照
所以提示没有夸大——这些功能现在都能用。 3. 测试 + i18n
小问题(不阻断,可选)旧 key 可以合并——提示准确、i18n 一致、en/zh 渲染正确、并由通过的测试完整支撑。 |
|
@qwen-code /triage |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
|
Qwen Code review did not complete successfully: Qwen review aborted with an API error before posting comments. See workflow logs. |
The /copy command supports code block selection with language filtering, LaTeX, and Mermaid — but the TUI autocomplete only showed "[N]" with a description about copying the full AI reply. Users had no way to discover these capabilities from the prompt. Update argumentHint to "[N] [<lang>|code|latex|mermaid] [<index>]" and description to mention all supported targets, noting N counts from the last message.

What this PR does
Updates the
/copyslash command's TUI autocomplete hint and description. Previously it only showed[N]with "Copy the last AI response to clipboard", giving users no way to discover code block selection, language filtering, LaTeX, or Mermaid support.New argumentHint:
[N] [<lang>|code|latex|mermaid] [<index>]New description:
Copy to clipboard: reply, code (by lang), LaTeX, or Mermaid. N picks message, index picks blockTranslations updated for en/zh/zh-TW locales following project convention (other locales fall back to English).
Why it's needed
The
/copycommand has rich sub-selection features — code blocks filtered by language, LaTeX math blocks (including inline), Mermaid diagrams — but none of this was discoverable from the TUI prompt. Users had to read source code or docs to learn these capabilities.Reviewer Test Plan
How to verify
npm run dev/copyand observe the autocomplete suggestion[N] [<lang>|code|latex|mermaid] [<index>]and the updated description/copy code pythonon a message with a Python code block to verify the command still worksEvidence (Before & After)
Before:
[N]将最近的 AI 回复复制到剪贴板(/copy N 复制倒数第 N 条)After:
[N] [<lang>|code|latex|mermaid] [<index>]复制到剪贴板:AI 回复、代码块(可按语言筛选)、LaTeX 或 Mermaid。N 选消息,index 选块Tested on
Environment (optional)
npm run dev+ 37 copyCommand tests passed + 28 i18n tests passed.Risk & Scope
Linked Issues
N/A
中文说明
本 PR 做了什么
更新了
/copy斜杠命令在 TUI 自动补全中的语法提示和描述。之前只显示[N]和"将最近的 AI 回复复制到剪贴板",用户无法从提示中发现代码块选择、语言筛选、LaTeX、Mermaid 等功能。新 argumentHint:
[N] [<lang>|code|latex|mermaid] [<index>]新 description:
复制到剪贴板:AI 回复、代码块(可按语言筛选)、LaTeX 或 Mermaid。N 选消息,index 选块遵循项目惯例只更新了 en/zh/zh-TW 三个 locale(其他 locale 回退到英文)。
为什么需要
/copy命令有丰富的子选择功能——按语言筛选代码块、LaTeX 数学公式块(含行内公式)、Mermaid 图表——但这些都没有在 TUI 提示中体现。用户需要阅读源码或文档才能发现这些能力。审阅测试计划
如何验证
npm run dev/copy观察自动补全建议[N] [<lang>|code|latex|mermaid] [<index>]和更新后的描述/copy code python验证命令仍正常工作证据(修改前 & 修改后)
修改前:
[N]将最近的 AI 回复复制到剪贴板(/copy N 复制倒数第 N 条)修改后:
[N] [<lang>|code|latex|mermaid] [<index>]复制到剪贴板:AI 回复、代码块(可按语言筛选)、LaTeX 或 Mermaid。N 选消息,index 选块测试环境
npm run dev+ 37 个 copyCommand 测试通过 + 28 个 i18n 测试通过。风险与范围
关联 Issue
无