Closed watevadafa closed 2 months ago
I've also been experiencing this, and it's so frustrating that I had to disable the extension. What's most annoying is that the files are empty, with no undo history, yet I can't even close them without getting the dialog about losing unsaved changes.
I am also seeing this since last week or so, I didn't realize it was caused by the Cody extension!
Same issue for the last couple of weeks. I've had to disable the extension because of it.
I am experiencing the same issue with Cody AI. Anytime a file is modified a new untitled file will be created. Apparently, there is a very similar issue with Github Copilot here.
I've also been experiencing this, and through "Extension Bisect" confirmed that it only happens with Cody on.
Version: 1.90.2 (Universal) Commit: 5437499feb04f7a586f677b155b039bc2b3669eb Date: 2024-06-18T22:37:41.291Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0
@deadband Currently, your link goes to this issue itself.
I'm having trouble replicating this - Are any of you aware of a consistent method leading to this behavior?
It appears the only pathway which should create new files is the 'Generate Unit Tests' command - have you been utilizing this command? If not, do you use any other commands?
@justinmilner1
I've even recorded my screen to watch when the files suddenly get opened, because I really enjoy using Cody chat but this bug is making it unusable.
The issue is difficult to pinpoint, but it looks related to one or more of the following:
The video I took shows a new file being opened does not happen upon the user directly interacting with Cody. FWIW I've never used the "Generate Unit Tests" command.
@JeongJuhyeon Got it, thanks for the info. Do you mind sharing the video?
@JeongJuhyeon Got it, thanks for the info. Do you mind sharing the video?
Unfortunately that's not easy because I spend most of my time writing closed source code, and as such I've already deleted it. Happy to assist with other kinds of debugging if possible.
@JeongJuhyeon Ah gotcha. Two more questions:
I believe the issue is likely inadvertant calls of openUntitledDocument, but there are a lot of reasons that could be happening. Created this pr to maybe get some more info.
@justinmilner1
Are the unexpected files always untitled and empty for you?
Yes, they are always untitled and empty.
Does this happen often? Or only occasionally?
It seems to get worse the more I use chat (or possibly the more chat windows I have open, or the more files I have @ mentioned in chat) in a given session. When I've used chat quite a bit it can be pretty bad, with a good number of new files having opened after an hour of coding. For me it's often enough that the distraction of having to close random files makes me disable Cody, despite finding it a much better product than competitors' offerings.
What I'll try and do is have the Cody extension activated but not use any of its functionality, and see if it still happens. So far it looks like it won't.
For me this happening even If I do not open a chat Also seems related - I might create an empty file and make some drafts and later - close this file, and after that Cody will create empty files.
Also, at the moment of file creation in Output tab there is two regular records that autocompletion was made (and two files was created)
For me this happening even If I do not open a chat Also seems related - I might create an empty file and make some drafts and later - close this file, and after that Cody will create empty files.
This could very well be related - I also often open empty files, make drafts and then close them.
I disabled the extension, switched to Release version
in the config, restarted VS Code, and re-enabled the extension. I haven't had the issue and it's been a full day of use with many new and existing files. Maybe related to pre-release version?
nope. it's started again for me. i have not used cody chat or any other features except the code completion suggestions.
nope. it's started again for me. i have not used cody chat or any other features except the code completion suggestions.
Do you also have a habit of sometimes creating empty files (e.g. to paste stuff into, or to make a draft) and then closing them, like @worm2fed and me?
I might be misremembering but I also think every time I had this issue, I had made some untitled files to paste some stuff into. I think I close them eventually or restart VS Code or something and start noticing how there would still be "untitled" files popping up.
Maybe Cody trying to be smart and learning on such behavior (create files for smth)?
It's getting worse, now it creates a new file immediately after I close it.
It put's two log messages into output window. First when I'm clicking close on file, and second one when it creates a new file again
█ SimpleChatPanelProvider: postContextStatus [{"displayName":"project","providers":[{"kind":"embeddings","state":"ready","embeddingsAPIProvider":"sourcegraph"},{"kind":"search","type":"local","state":"ready"}]}]
█ SimpleChatPanelProvider: postContextStatus [{"displayName":"project","providers":[{"kind":"embeddings","state":"ready","embeddingsAPIProvider":"sourcegraph"},{"kind":"search","type":"local","state":"ready"}]}]
Maybe Cody trying to be smart and learning on such behavior (create files for smth)?
No, it is creating untitled files at the root location. These files are not like regular new files that we can easily close. When prompted to save, it asks for confirmation. What should someone do by saving these files?
It's getting worse, now it creates a new file immediately after I close it.
It put's two log messages into output window. First when I'm clicking close on file, and second one when it creates a new file again
█ SimpleChatPanelProvider: postContextStatus [{"displayName":"project","providers":[{"kind":"embeddings","state":"ready","embeddingsAPIProvider":"sourcegraph"},{"kind":"search","type":"local","state":"ready"}]}] █ SimpleChatPanelProvider: postContextStatus [{"displayName":"project","providers":[{"kind":"embeddings","state":"ready","embeddingsAPIProvider":"sourcegraph"},{"kind":"search","type":"local","state":"ready"}]}]
This is indeed becoming worse. I have disabled the extension. It was creating multiple files. Started with creating one, then kept on increasing 5-6 files. And it won't let me close. Opens more as soon as I close one.
@worm2fed @abs-angularminds It seems like not leaving any more unsaved files open has fixed it for me. I now just keep a separate VSCode window open to paste/draft random stuff when I want to.
I'm seeing this as well. I made a video where I see this with a project that I'm working on. Before the video, I closed all tabs and then exited so that the next launch would have no files open. Then I open a file and unwanted tabs are opened next. Next steps are not in the video, I close the unwanted tabs and answer the prompt "do I want to save?" : "no". As soon as I finish answering the last modal yes/no prompt, new tabs open up.
https://github.com/user-attachments/assets/be1b0a57-e266-417e-a2ec-e08ea1eec018
In this case then, the only thing I did in the session was select a file in the file browser and then close the unwanted tabs. The one complication is that I'm connecting to a WSL session.
The version of the VS Code extension I made the video with is:
Though I have been experiencing this prior to updating.
I am seeing this as well. The issue goes away after deactivating the VSCode extension.
I am also having this issue of untitled tabs being created/sticking around.
~/.config/Code
, except pre-authenticating with cody and accepting at least 1 auto-complete suggestion in the past (from previous takes)Screencast_20240718_093718.webm
Here's a proper bug report with repro steps etc (note these steps are slightly different from what's visible in my text editor in the video - I couldn't be bothered doing another take):
main.py
in itmain.py
file to trigger an inline autocomplete suggestion (no need to accept it)The untitled tab gets auto-reopened each time it's closed, and attempting to close the re-opened tab prompts to save its contents.
The untitled tab should stay closed.
To remove "stuck open" untitled tabs:
Then avoid ever creating any new untitled tabs, otherwise the issue will recur.
And yes, it is super annoying.
Version
1.90.0
Describe the bug
Version: 1.90.0 Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573 Date: 2024-06-04T19:34:48.028Z Electron: 29.4.0 ElectronBuildId: 9593362 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0
When cody creates files say, test-something.py or any untitled.py, these files if ignored and closed keep showing up after sometime
Expected behavior
Once closed it should be closed, or ignored when user opt-out saving them!
Additional context
No response