Skip to content

Any plans on implementing "Apply suggestion" option? #260

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
tarbaiev-smg opened this issue Apr 28, 2025 · 8 comments
Open

Any plans on implementing "Apply suggestion" option? #260

tarbaiev-smg opened this issue Apr 28, 2025 · 8 comments

Comments

@tarbaiev-smg
Copy link

Copilot chat interface for VSCode as well as many other AI assistant coding tools can generate change suggestions instead of re-generating the whole file for every prompt.
Currently there seems to be no such functionality in the Copilot for Xcode, which is very annoying when working with chat interface. It's also very easy to hit the response size limits.
Lacking this feature forces me to look into alternative products.

Can we expect to get diff suggestions anytime soon?

@testforstephen
Copy link

@tarbaiev-smg thank you for trying out Xcode copilot. Yes, improving the code diff and apply experience is on the road.

We have just published a pre-release version 0.34.116 for agent mode support in Xcode copilot today, which supports generating code diff and edit file directly. Feel free to have a try and let us know how it's going. thanks.

You can opt-in pre-release from the app settings or download it directly from https://github.com/github/CopilotForXcode/releases/tag/0.34.116.

@tarbaiev-smg
Copy link
Author

tarbaiev-smg commented Apr 30, 2025

@testforstephen Thanks for your suggestion. It looks promising!
Would it be able to discover other files in the project/package like VS code agent?

@testforstephen
Copy link

Would it be able to discover other files in the project/package like VS code agent?

Yes, glad it helps. What kind of other files are not auto discovered in the agent call? Could you elaborate it a little bit? thanks.

@tarbaiev-smg
Copy link
Author

@testforstephen For example when I ask it to run tests for a currently opened local Swift Package it tries to run the tests for the app project which is located in the git root directory.
In VS Code I can open the whole package directory and the same prompt will make it run the tests for the package alone. Also it can freely navigate the directory and check e.g. Package.swift and other files it needs for extra context. This doesn't seem possible with the Copilot for Xcode currently.

@testforstephen
Copy link

@tarbaiev-smg thank you for sharing your use case. To help us reproduce the issue, do you mind describing your workspace structure and the prompt you use?

@tarbaiev-smg
Copy link
Author

tarbaiev-smg commented May 1, 2025

@testforstephen The project structure is similar to the following:

MyApp/
  MyApp/
  Modules/
    MySwiftPackage/
      Package.swift
  MyApp.xcodeproj

Xcode

I open the Package.swift in Xcode to work with it in isolation.
Then I ask Copilot Agent for Xcode:

Run tests and fix errors. Use xcodebuild as the package is for iOS.

It tries to run xcodebuild from MyApp root directory.

VS Code

I open the MySwiftPackage directory in VS Code and send the prompt above to the Agent.
It runs the tests from the MySwiftPackage directory.

However it doesn't seem to be consistent in VS Code either as in another project with similar structure it did try running tests from the project root directory. I had to correct it asking to run the tests from the package directory and it followed my command.

@tarbaiev-smg
Copy link
Author

tarbaiev-smg commented May 1, 2025

Would it be able to discover other files in the project/package like VS code agent?

To be fair, the Xcode version can search for the files same as VS Code version.
However the results it's producing are still worse than those done by the VS Code version somehow. Looks like it gets way less context in Xcode, even if I tell it to search for missing declarations.
It also tends to hang more often after executing a command.
Need to play a bit more with both of them.

@testforstephen
Copy link

thanks for the information. basically the Xcode copilot has the understanding of your workspace structure, and the agent will read the files by itself on demand.

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

No branches or pull requests

2 participants