-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
fix image rendering, use paste provider #229779
Conversation
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.
FYI, in this case you can use the ChatContextAttachments
contribution which also takes care of duplicates. We are not able to use it for chat dnd sadly.
} | ||
|
||
const attachContribution = widget.getContrib<ChatContextAttachments>(ChatContextAttachments.ID); | ||
attachContribution?.setContext(false, imageContext); |
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.
provideDocumentPasteEdits
should not have any side effects. Maybe ok as a temporary workaround for now but let's look into allowing workspace edits to add attachments to chat. That way undo/redo will work nicely too
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.
Approving for continued iteration but please make sure to follow up about using workspace edits
this moves
chatImagePaste
content intochatPasteProvider
which is invoked on paste.fixes #229625 and https://github.com/microsoft/vscode-copilot/issues/8637
cc. @benibenj
paste:
Screen.Recording.2024-09-25.at.4.21.11.PM.mov
dnd:
secondone.mov