microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.21k stars 29.29k forks source link

After accepting any suggestion from copilot i'm not able to save the file #228710

Open thameurr opened 1 month ago

thameurr commented 1 month ago

Type: Bug

After accepting any suggestion from copilot i'm not able to save the file.

VS Code version: Code 1.93.1 (Universal) (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z) OS version: Darwin x64 23.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|2, 3, 3| |Memory (System)|16.00GB (0.26GB free)| |Process Argv|--crash-reporter-id 7cc89160-37fe-4560-b6dd-941beb6584f8| |Screen Reader|no| |VM|0%|
Extensions (37) Extension|Author (truncated)|Version ---|---|--- format-selection-as-html|adr|2.3.0 ng-template|Ang|18.2.0 vscode-eslint|dba|3.0.10 vscode-html-css|ecm|2.0.10 prettier-vscode|esb|11.0.0 esp-idf-extension|esp|1.8.1 copilot|Git|1.229.0 copilot-chat|Git|0.20.1 ionic|Ion|1.94.1 Angular2|joh|18.0.2 vscode-azureappservice|ms-|0.25.3 vscode-azurefunctions|ms-|1.15.4 vscode-azureresourcegroups|ms-|0.9.5 vscode-cosmosdb|ms-|0.23.0 csdevkit|ms-|1.10.18 csharp|ms-|2.45.25 vscode-dotnet-runtime|ms-|2.1.5 vscodeintellicode-csharp|ms-|2.1.11 remote-containers|ms-|0.384.0 azure-account|ms-|0.12.0 cmake-tools|ms-|1.19.51 cpptools|ms-|1.21.6 cpptools-extension-pack|ms-|1.3.0 live-server|ms-|0.4.15 vscode-css-peek|pra|4.4.1 java|red|1.34.0 cmake|twx|0.0.17 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 vscode-gradle|vsc|3.16.4 vscode-java-debug|vsc|0.58.0 vscode-java-dependency|vsc|0.24.0 vscode-java-pack|vsc|0.29.0 vscode-java-test|vsc|0.42.0 vscode-maven|vsc|0.44.0 eno|Wsc|2.3.53 JavaScriptSnippets|xab|1.8.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 724cj586:31013169 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 nativerepl1:31134654 refactort:31108082 pythonrstrctxt:31112756 flightc:31134773 wkspc-onlycs-t:31132770 wkspc-ranged-c:31125598 pme_test_t:31118333 defaultse:31133495 ei213698:31121563 ```
thameurr commented 1 month ago
Screenshot 2024-09-16 at 2 29 30 PM
jrieken commented 1 month ago

After accepting any suggestion from copilot i'm not able to save the file.

@thameurr Do you mean ghost text suggestions or those from an inline chat conversation (Cmd+I)?

mcx808 commented 1 month ago

I have the same issue:

Version: 1.93.1 Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40 Date: 2024-09-11T17:20:05.685Z Electron: 30.4.0 ElectronBuildId: 10073054 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Darwin arm64 23.6.0

For me it's when the changes suggested by copilot in the chat are applied. See the 'Saving' spinning wheel on the bottom status bar which has been there 5 mins trying to save some small text files. 'Save As' also doesn't work.

Screenshot 2024-09-18 at 16 15 37
jrieken commented 1 month ago

ping @thameurr

jpeg2600 commented 1 month ago

I'm having the same issue. In my case, the ghost test appeared, it was not good so I pressed escape but then I can't save any new modification made to the file. I've been getting that bug a lot in the last days, it's quite annoying.

If I try to close the file, it even asks if I want to save but if I click save, it's not doing anything and my file stays open.

I can also save other files without problem.

mcx808 commented 1 month ago

@jrieken , BTW here are the steps to reproduce:

  1. Create new file hello.ps1 in VSCode
  2. set the content to Write-Host "Hello World" and save it.
  3. Open the copilot chat and ask it to change to goodbye world. Click Apply In Editor button that appears when hovering over the suggested codeblock.
  4. File > Save. Doesn't work
  5. File > Save As... and saving a different filename will create a 0b file and never set the content.
thameurr commented 1 month ago

ping @thameurr

Hi, once I get suggestion from the copilot I accept it , then the code change and everything fine, the problem that when I want to save to test the code , im not able to save and keep hanging, I can open another file or edit another file but only the file that I accept suggestion stop working .

mcx808 commented 1 month ago

Update from me: still on VSCode 1.93.1 but the latest copilot chat extension (2024-09-23, 09:15:26) now included a 'waiting to accept changes' in the saving dialogue on the bottom status bar.

When I saw this, I noticed there was also a dialogue over the changed code with accept or reject. Once I hit accept the file could be saved.

Screenshot 2024-09-24 at 10 37 42