Skip to content

[Feature Request] Add /copy command to copy the current assistant response #1725

@exposir

Description

@exposir

Problem

Currently, there is no built-in way to copy the current assistant response from a Kimi Code CLI session. Users who want to save a single insightful answer, a code block, or a decision explanation must manually select text from their terminal, which is error-prone and loses formatting.

Proposed Solution

Add a new slash command that copies the current assistant message to the system clipboard:

/copy

This should behave similarly to Claude Code's message copy action — copying only the most recent AI response, not the entire conversation history.

Expected Behavior

  • /copy: Copies the current assistant response (the latest AI message in the active turn) to the system clipboard in Markdown format.
  • Code blocks, reasoning steps, and formatting should be preserved.
  • It should not include previous user messages or earlier turns.
  • Full conversation history export is a separate concern and can be addressed by a potential future /export command.

Use Cases

  1. Save a code snippet: Quickly copy a generated function or fix to paste into an editor.
  2. Document a decision: Copy the agent's reasoning for a specific choice.
  3. Share an explanation: Forward a concise answer to a colleague without including the full back-and-forth.
  4. Prompt iteration: Reuse a well-written response as a template.

Alternatives Considered

  • Manually selecting text in the terminal: breaks formatting and is hard for long responses.
  • Terminal buffer copy-paste: includes surrounding UI noise (timestamps, prompts, etc.).

Additional Context

This is a small but high-impact quality-of-life feature that makes the terminal agent feel more polished for daily workflows. Thank you for considering this request!


中文版

问题

目前 Kimi Code CLI 没有内置方式一键复制当前 AI 回复。用户若想保存某一条有价值的回答、代码片段或决策说明,只能在终端里手动选中文本复制,既容易出错又会丢失格式。

建议方案

新增一个 slash 命令,将当前助手消息复制到系统剪贴板:

/copy

行为上建议参考 Claude Code 的复制当前消息功能:仅复制最新一条 AI 回复,不包含完整对话历史。

预期行为

  • /copy:将当前助手回复(活跃轮次中的最新 AI 消息)以 Markdown 格式复制到剪贴板。
  • 保留代码块、推理过程和原始格式。
  • 不包含之前的用户消息或更早轮次的内容。
  • 完整对话历史导出是另一个独立需求,可通过未来的 /export 命令实现。

使用场景

  1. 保存代码片段:快速复制生成的函数或修复方案,粘贴到编辑器中。
  2. 记录决策依据:复制 Agent 对某个选择的推理过程。
  3. 分享 concise 答案:把一条清晰的解释转发给同事,无需带上完整来回对话。
  4. Prompt 复用:将写得好的回答作为模板复用。

已考虑的替代方案

  • 手动在终端里选中复制:容易破坏格式,且长回复很难操作。
  • 终端缓冲区复制:会带上周围的 UI 干扰(时间戳、提示符等)。

补充说明

这是一个小而高频的易用性改进,能让终端 Agent 在日常工作流中更顺手。感谢团队考虑这个需求!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions