CopilotForXcode icon indicating copy to clipboard operation
CopilotForXcode copied to clipboard

Copilot doesn't work well after manually edit code.

Open owenzhao opened this issue 2 months ago • 6 comments

Describe the bug

Copilot always revert my edited code to previous code.

Versions

  • Copilot for Xcode: 0.43.140
  • Xcode: 26.0.1
  • macOS: 26.0.1

Steps to reproduce

  1. Ask Copilot to change some code.
  2. Manually change some code.
  3. Ask Copilot to change some other code.

Copilot will do the task I ask, but always revert what I changed. Create new tab will be the same. Only quit and reopen will work.

It reason is because copilot always read it cache instead of the file in Xcode. Copilot knows it and it doesn't follow my instruction to read from Xcode. It answers but still using the cache.

Screenshots

Logs

Additional context

owenzhao avatar Oct 06 '25 21:10 owenzhao

https://github.com/github/CopilotForXcode/issues/559#issue-3489089209

willsmith78997-del avatar Oct 09 '25 04:10 willsmith78997-del

I'm noticing this too - you can't work with CoPilot at the moment as it undoes every manual edit between chats, even if you're editing a file that seemingly is unrelated. Also keeping edits has no effect on the reverting of manual changes.

awgeorge avatar Oct 09 '25 08:10 awgeorge

Possible dupe: #345

awgeorge avatar Oct 09 '25 08:10 awgeorge

#345 https://github.com/github/CopilotForXcode/issues/345

On Thu, Oct 9, 2025 at 3:25 AM William George @.***> wrote:

awgeorge left a comment (github/CopilotForXcode#559) https://github.com/github/CopilotForXcode/issues/559#issuecomment-3384717688

Possible dupe: #345 https://github.com/github/CopilotForXcode/issues/345

— Reply to this email directly, view it on GitHub https://github.com/github/CopilotForXcode/issues/559#issuecomment-3384717688, or unsubscribe https://github.com/notifications/unsubscribe-auth/BYH3ASPSEAT3Y4BSATVXUXL3WYLYDAVCNFSM6AAAAACIOJTRF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOBUG4YTONRYHA . You are receiving this because you commented.Message ID: @.***>

willsmith78997-del avatar Oct 09 '25 08:10 willsmith78997-del

@lijie-lee pls take a look.

testforstephen avatar Oct 11 '25 06:10 testforstephen