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

chat: fix diff not showing for streaming chat pills #241799

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

connor4312
Copy link
Member

@connor4312 connor4312 commented Feb 25, 2025

The addition of typesToSkip broke because the code pill looks back for
the last undo stop to know what to diff between. See:
https://github.com/microsoft/vscode-copilot/issues/13229#issuecomment-2679994707

This gets rid of that, and instead allows IChatContentPart to choose
not to render a domNode. We can then 'render' undo stops without
side-effects and fix the issue. This is kind of special but I feel like
this is the cleanest way to do things now, and I can imagine other parts
might use this in the future.

Fixes https://github.com/microsoft/vscode-copilot/issues/13229

The addition of `typesToSkip` broke because the chat pill looks back for
the last undo stop to know what to diff between. See:
microsoft/vscode-copilot#13229 (comment)

This gets rid of that, and instead allows IChatContentPart to choose
not to render a domNode. We can then 'render' undo stops without
side-effects and fix the issue. This is kind of special but I feel like
this is the cleanest way to do things now, and I can imagine other parts
might use this in the future.

Fixes microsoft/vscode-copilot#13229
@connor4312 connor4312 self-assigned this Feb 25, 2025
@connor4312 connor4312 enabled auto-merge (squash) February 25, 2025 04:53
@vs-code-engineering vs-code-engineering bot added this to the February 2025 milestone Feb 25, 2025
}

// todo@connor4312/roblourens: should this throw or renderNoContent to avoid progressive render thrashing?
Copy link
Member Author

Choose a reason for hiding this comment

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

@roblourens what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, sorry for the break! If this method returns undefined, it tries to render that part forever? Your renderNoContent makes sense. Actually there's a couple cases already that render an empty dom element, like when a progress message hides.

}

// todo@connor4312/roblourens: should this throw or renderNoContent to avoid progressive render thrashing?
Copy link
Member

Choose a reason for hiding this comment

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

Oh, sorry for the break! If this method returns undefined, it tries to render that part forever? Your renderNoContent makes sense. Actually there's a couple cases already that render an empty dom element, like when a progress message hides.

@connor4312 connor4312 merged commit 8b5daf2 into main Feb 25, 2025
8 checks passed
@connor4312 connor4312 deleted the connor4312/copilot-13229 branch February 25, 2025 05:17
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.

3 participants