Skip to content

chat: don't recreate empty file if previously deleted on workspace restoration #251018

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Cubox
Copy link

@Cubox Cubox commented Jun 9, 2025

This should fix microsoft/vscode-copilot-release#11990

I cannot try this (as this depends on the Copilot extensions).

@isidorn

@isidorn
Copy link
Collaborator

isidorn commented Jun 13, 2025

Joh is out on vacation. Assigning to Rob to take a look.

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! You should be able to use the copilot extension in OSS by downloading the vsix and using "Install Extension from VSIX". Or, something like starting oss with --extensions-dir=~/.vscode/extensions. Does that help?

I don't have time to test it right now, I can look later.

@@ -523,6 +523,16 @@ export class ChatEditingSession extends Disposable implements IChatEditingSessio
const entriesArr: AbstractChatEditingModifiedFileEntry[] = [];
// Restore all entries from the snapshot
for (const snapshotEntry of entries.values()) {
// During workspace restore, check if the file exists on disk before attempting to restore it
if (isWorkspaceRestore) {
Copy link
Member

Choose a reason for hiding this comment

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

I believe you could also just use the restoreToDisk flag for this, seems like the same intent

@Cubox
Copy link
Author

Cubox commented Jun 25, 2025

Thanks for the PR! You should be able to use the copilot extension in OSS by downloading the vsix and using "Install Extension from VSIX". Or, something like starting oss with --extensions-dir=~/.vscode/extensions. Does that help?

I don't have time to test it right now, I can look later.

Unfortunately, I'm unable to test it out at the moment. I'll try if/when I have some time.

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.

Chat creates empty files when opening VSCode when they were deleted
5 participants