[go: up one dir, main page]

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

fix image rendering, use paste provider #229779

Merged
merged 17 commits into from
Oct 7, 2024

Conversation

justschen
Copy link
Contributor
@justschen justschen commented Sep 25, 2024

this moves chatImagePaste content into chatPasteProvider 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

Copy link
Contributor
@benibenj benibenj left a 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.

@justschen justschen marked this pull request as ready for review September 30, 2024 18:35
@vs-code-engineering vs-code-engineering bot added this to the October 2024 milestone Sep 30, 2024
}

const attachContribution = widget.getContrib<ChatContextAttachments>(ChatContextAttachments.ID);
attachContribution?.setContext(false, imageContext);
Copy link
Collaborator

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

mjbvz
mjbvz previously approved these changes Oct 7, 2024
Copy link
Collaborator
@mjbvz mjbvz left a 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

@justschen justschen enabled auto-merge (squash) October 7, 2024 21:30
@justschen justschen merged commit 74b40c2 into microsoft:main Oct 7, 2024
7 checks passed
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.

Delay when pasting in large image.
4 participants