-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Enable terminal chat message copy #19009
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
base: feature/llm
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Played around with the branch, looks and feels great! Thank you for the contribution
Not a blocker (and I'm not even sure if it's possible but I think it's worth investigating) but I wonder if the "Copy" option should show up even if there's no selection in the bubble (i.e. so we interpret that as "copy the entire message"). That way if a user wants to copy the whole thing they don't need to first click "Select All" and then right click again and click "Copy". This is what happens right now when you right-click without selecting anything first:
Approving anyway since right-click->"Select all"->right-click->"Copy" is still a fairly straightforward way to copy the entire thing, but if you can investigate whether copying the entire thing with the first right-click is possible that'll be great :)
That's a good idea. Thanks for the feedback! I will investigate. |
![]() @PankajBhojwani is this what you had in mind? I pushed to the branch. It still supports select with the cursor and ctrl+c/ctrl+v. But now on right click we simply show the custom MenuFlyout. Awesome suggestion!! |
textBlock.CopySelectionToClipboard(); | ||
} | ||
_queryBox().CopySelectionToClipboard(); |
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.
Questions:
- This copies to the clipboard twice in a row. Is that intentional?
- Do we need to handle Ctrl+C manually here? Why is it not handled as part of the
_richBlock
context menu? - Most importantly, why don't we use our custom
TextMenuFlyout
class here, similar to other parts of the code base? It should supportRichTextBlock
.
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.
- No, Its not intentional. :|
- I think it's useful. I'm sure other people would find it useful too. There was other code here that did something similar. "Get in where you fit in?".
- Dang, it! My gut told me something was in the project for that. Didnt look hard enough. Ill swap it.
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.
So ill basically be at the previous commit only using the TextMenuFlyout class.
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.
Update pushed. Thanks for your feedback!
Summary of the Pull Request
This pull request enables copying terminal chat messages from AI Suggesstions.
References and Relevant Issues
#17941
Detailed Description of the Pull Request / Additional comments
Enables both keyboard copy with ctrl+c and mouse copy with a context menu.
Validation Steps Performed
This was tested locally on my machine. Both functions verified to work.
PR Checklist