Skip to content

feat(chat): add copy button for AI messages#159

Merged
sparkleMing merged 1 commit into
mainfrom
feat/chat-copy-message
May 19, 2026
Merged

feat(chat): add copy button for AI messages#159
sparkleMing merged 1 commit into
mainfrom
feat/chat-copy-message

Conversation

@sparkleMing
Copy link
Copy Markdown
Collaborator

Summary

在 AgentChatDialog 的每条 AI 回复气泡下方新增一键复制按钮,点击即可将原始 Markdown 文本复制到剪贴板。

Changes

  • AI 消息气泡外部下方左侧新增 copy icon(18px outlined 风格)
  • 点击后图标动画切换为 ✓,2 秒后恢复
  • Toast 提示「已复制到剪贴板」
  • 流式输出中不显示按钮,避免干扰

Testing

  • 手动测试:发送消息后 AI 回复完成,点击复制按钮,粘贴验证内容为原始 Markdown 源文本
  • 流式输出期间按钮不可见

Closes #156

Add a one-tap copy button below each AI message bubble that copies
the original Markdown source text to clipboard. The button uses an
outlined copy icon (18px) that animates to a checkmark on success.

Closes #156
@github-actions
Copy link
Copy Markdown

PR Preflight Summary / PR 预检汇总

中文

  • 统一结论:低风险:两个预检均已完成,质量预检通过,可走普通手动合并流程。
  • Policy preflight:低风险。未命中打回或高风险规则,仅有 1 条警告供 review 参考。
  • Flutter quality:通过。Analyzer 和 test baseline 均未发现新增问题。
  • PR head:76c7cd455e2a860816ed7e8ab64f1d35ee9ac973
  • Policy run:26076216050
  • Flutter run:26076216034

English

  • Combined result: Low risk: both preflights completed and quality passed; use the normal manual merge flow.
  • Policy preflight: LOW RISK. No blocking or high-risk policy signal; 1 warning(s) remain for review context.
  • Flutter quality: PASS. Analyzer and test baselines found no newly introduced issue.
  • PR head: 76c7cd455e2a860816ed7e8ab64f1d35ee9ac973
  • Policy run: 26076216050
  • Flutter run: 26076216034
PR Policy Preflight / PR 规则预检

PR Policy Preflight / PR 规则预检

中文

  • 判定:低风险
  • 变更文件数:1
  • 变更行数:161
  • Diff 是否截断:false

规则命中

  • 警告 sensitive-keyword lib/ui/chat/widgets/agent_chat_dialog.dart: UserStorage 引用发生变化。

English

  • Decision: LOW RISK
  • Changed files: 1
  • Changed lines: 161
  • Diff truncated: false

Findings

  • warn sensitive-keyword lib/ui/chat/widgets/agent_chat_dialog.dart: UserStorage reference changed.
PR Flutter Quality / Flutter 质量预检

PR Flutter Quality / Flutter 质量预检

中文

  • 总体:通过
  • Analyzer baseline:通过
  • Test baseline:通过

English

  • Overall: PASS
  • Analyzer baseline: PASS
  • Test baseline: PASS

Flutter Analyzer Baseline

  • Base issues: 324
  • PR issues: 324
  • New issues: 0

No new analyzer issues introduced by this PR.

Flutter Test Baseline

  • Base failures: 3
  • PR failures: 3
  • New failures: 0

No new Flutter test failures introduced by this PR.

@sparkleMing sparkleMing merged commit d1da1fe into main May 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat: 对话内容无法全选复制,需要一键复制原内容功能

1 participant