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

adds images in history, create file for pasted images in chat #241664

Merged
merged 7 commits into from
Feb 24, 2025

Conversation

justschen
Copy link
Contributor

fix #240026

@justschen justschen marked this pull request as ready for review February 24, 2025 17:39
Copy link

⚠️ This PR originates from a fork. Due to security restrictions, pipelines from forks are no longer triggered automatically. Learn more.

If the changes appear safe, you can manually trigger the pipeline by commenting /AzurePipelines run.

@vs-code-engineering vs-code-engineering bot added this to the February 2025 milestone Feb 24, 2025
TylerLeonhardt
TylerLeonhardt previously approved these changes Feb 24, 2025
// A funtion that filters out specifically the `value` property of the attachment.
private getFilteredEntry(query: string, inputState: IChatInputState): IChatHistoryEntry {
const attachmentsWithoutImageValues = inputState.chatContextAttachments?.map(attachment => {
if (attachment.isImage && attachment.references?.length && attachment.value) {
Copy link
Member

Choose a reason for hiding this comment

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

Is there some case where an image attachment doesn't have references, and then the image data will still be saved in history?

Copy link
Contributor Author

@justschen justschen Feb 24, 2025

Choose a reason for hiding this comment

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

there shouldn't be case where images don't have references (besides if it comes from web and is an image, then it is okay because the value will be a URL)

@justschen justschen enabled auto-merge (squash) February 24, 2025 23:39
@justschen justschen merged commit ac0e2ac into microsoft:main Feb 24, 2025
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.

add images in chat input history
3 participants