Skip to content
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

feat: Add a save button to assistant messages #2163

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

dustinbyrne
Copy link
Contributor

Add a save button to assistant messages

Adds a new button to save the assistant's message to a file. When clicked, the button emits a save-message root event containing:

  • messageId - The unique ID of the message
  • threadId - The ID of the chat thread containing the message
  • content - The text content of the message

Changes

  • Added a save icon button next to copy button on assistant messages
  • Updated styles to handle multiple action buttons consistently
  • Added tests to verify event emission with correct payload
  • Updated download.svg icon to work with dynamic coloring

Screenshots

image

Testing

  • Unit tests added to verify event payload
  • Manually verified save button appears only on assistant messages
  • Tested button hover and click states

The implementation assumes the code editor frontend will implement the file save dialog and write operations when receiving the save-message event.

this.$root.$emit('save-message', {
messageId: this.id,
threadId: this.threadId,
content: this.message,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, is this going to include the gatherer output? @dividedmind

We should probably move the gatherer feedback into its own UI element and propagate that back to the frontend via the RPC. If properly presented, it would be interesting / useful to the user to see what the gatherer is doing.

@dustinbyrne dustinbyrne force-pushed the feat/user-theme-navie branch 3 times, most recently from 11cf3b6 to 8c96877 Compare December 18, 2024 20:02
@dustinbyrne dustinbyrne force-pushed the feat/download-message branch from 91c352b to edd3137 Compare December 18, 2024 20:03
Base automatically changed from feat/user-theme-navie to main December 18, 2024 20:43
@dustinbyrne dustinbyrne force-pushed the feat/download-message branch from edd3137 to 4840659 Compare December 18, 2024 20:45
@dustinbyrne dustinbyrne merged commit 0133759 into main Dec 18, 2024
13 checks passed
@dustinbyrne dustinbyrne deleted the feat/download-message branch December 18, 2024 20:45
@appland-release
Copy link
Contributor

🎉 This PR is included in version @appland/components-v4.42.0 🎉

The release is available on:

  • @appland/components-v4.42.0
  • GitHub release
  • @appland/components-v4.42.0

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants