Skip to content

Conversation

@dfwgj
Copy link
Collaborator

@dfwgj dfwgj commented Dec 21, 2025

Summary

  • Add "Copy Prompt" button in resource editor preview mode, replacing the "Save File" button
  • Clicking the button copies the full preview prompt content to clipboard with a success toast notification
  • Fix scrolling issue in preview content area by adding min-h-0 to nested flex containers
  • Add i18n translations for copyPrompt and copySuccess in both English and Chinese

Changes

  • ResourceEditor.tsx: Add Copy button with clipboard functionality in preview tab
  • en.json / zh-CN.json: Add new translation keys for copy button and success message
  • Fix CSS flex layout to enable proper scrolling in preview content area

Test Plan

  • Open resource editor and switch to preview tab
  • Verify "Copy Prompt" button appears instead of "Save File" button
  • Click the button and verify prompt content is copied to clipboard
  • Verify success toast notification appears
  • Verify preview content area scrolls properly with long content

Closes #514

- 预览模式下显示"复制提示词"按钮替代"保存文件"按钮
- 点击复制预览内容到剪贴板并显示成功提示
- 修复预览内容滚动问题

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@deepracticexs deepracticexs merged commit 0e4980f into main Dec 23, 2025
@deepracticexs deepracticexs deleted the feat/resource-editor-copy-prompt branch December 23, 2025 06:06
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.

要求能有个提示词预览功能

3 participants