-
Notifications
You must be signed in to change notification settings - Fork 1
Add "Copy entire chat log" button to bottom more menu #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: chrisglein <26607885+chrisglein@users.noreply.github.com>
chrisglein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Address PR feedback
src/Chat.tsx
Outdated
| const responses = entry.responses || []; | ||
| if (responses.length > 0) { | ||
| return `OpenAI: ${responses[0]}`; | ||
| } | ||
| return 'OpenAI: [Loading...]'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const responses = entry.responses || []; | |
| if (responses.length > 0) { | |
| return `OpenAI: ${responses[0]}`; | |
| } | |
| return 'OpenAI: [Loading...]'; | |
| if (entry.responses?.length > 0) { | |
| return `OpenAI: ${entry.responses[0]}`; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use optional chaining as suggested. The code now uses entry.responses?.length > 0 for a more concise and safe check. Commit d9ec908.
Co-authored-by: chrisglein <26607885+chrisglein@users.noreply.github.com>
|
@copilot The change is ready to submit but needs to first be merged with main and have conflicts resolved. |
Merge with main completed successfully. Resolved import conflicts by including both Clipboard and WelcomeMessage imports, maintained all copyEntireChatLog functionality with proper optional chaining, and integrated with new main branch features including message pinning and system instructions. The branch is now ready for submission. Commit 555c958. |
555c958 to
81de49a
Compare
This PR adds a "Copy entire chat log" feature to the bottom more menu (...) as requested in the issue. Users can now easily copy their complete conversation history to paste into emails, documents, or other applications.
Changes Made
copyEntireChatLog()function that formats all chat entries as readable textImplementation Details
The copy function formats chat entries in a clean, readable format:
Prompt: [user input]OpenAI: [ai response]OpenAI: [Loading...]The implementation reuses existing clipboard functionality and follows established UI patterns for consistency. The code uses modern JavaScript optional chaining (
entry.responses?.length > 0) for robust property checking. The feature is fully compatible with new main branch functionality including message pinning and customizable system instructions.Menu Order
The bottom more menu now displays options in this order:
Example Output
This provides users with a convenient way to export their entire conversation for sharing or documentation purposes.
Fixes #143.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.