Skip to content

feat: add edit button to user messages for quick re-editing#513

Open
Keduoli03 wants to merge 1 commit intoEKKOLearnAI:mainfrom
Keduoli03:feat/message-edit-button
Open

feat: add edit button to user messages for quick re-editing#513
Keduoli03 wants to merge 1 commit intoEKKOLearnAI:mainfrom
Keduoli03:feat/message-edit-button

Conversation

@Keduoli03
Copy link
Copy Markdown
Contributor

在消息的元信息栏中添加一个“铅笔编辑按钮”(与复制按钮和时间显示并列),仅对用户消息生效。点击该按钮后,会将消息内容重新填入聊天输入框,方便用户快速修改并重新发送。

  • 用户消息气泡下方新增铅笔编辑图标,与复制按钮、时间戳同排
  • 点击后将消息原文回填到输入框并自动聚焦,用户可直接编辑后重新发送
  • 历史页面(只读查看)不显示编辑按钮
  • 8 种语言均已翻译 tooltip
image

Add a pencil edit button in the message meta bar (alongside copy and time)
for user messages. Clicking it fills the message content back into the chat
input, allowing users to quickly edit and re-send.

- Add `pendingEditContent` ref to chat store for cross-component communication
- Add edit button with pencil icon to MessageItem meta bar (user messages only,
  hidden in readonly contexts like HistoryMessageList)
- Add `readonly` prop to MessageItem to suppress edit button in history views
- Watch `pendingEditContent` in ChatInput to populate textarea and auto-focus
- Add `editBubble` i18n key across all 8 locales
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.

1 participant