CopilotForXcode icon indicating copy to clipboard operation
CopilotForXcode copied to clipboard

Add Files in Frameworks as Context

Open owenzhao opened this issue 5 months ago • 5 comments

Currently Copilot can only use files that I created in my project as context. However, sometimes AI can't use some framework properly. For example, AI may keeps using some properties relate to a framework with the wrong types. Currently, the only way to solve this kind of issue is to copy the full code of the source file and paste it in the prompt window. However, it will be much better to choose the file of the framework as context.

owenzhao avatar Jul 07 '25 02:07 owenzhao

Hi @owenzhao, , thanks for sharing! Just wondering—are there any common frameworks you use for ios app development I guess where this issue happens? If you have sample code or examples, that would be super helpful too!

silenceJialuo avatar Jul 11 '25 02:07 silenceJialuo

It is not an iOS app. It is a server macOS app, which using Vapor as framework. Since Vapor is a Swift server side framework, it introduces a lot of other frameworks.

Also, it uses Swift Package instead of Xcode project file. Maybe there are too many frameworks that exceeds the limitation of Copilot?

Image

Below is the file I copy and paste. The last is which was wrong. It didn't know the correct type of body before and used it as Buffer type directly.

Image Image

owenzhao avatar Jul 11 '25 11:07 owenzhao

Thank you for sharing. Our engineering team will investigate on it first.

silenceJialuo avatar Jul 15 '25 06:07 silenceJialuo

🫵🫵💔💔💔💔

On Tue, Jul 15, 2025, 1:32 AM Jialuo Gan @.***> wrote:

silenceJialuo left a comment (github/CopilotForXcode#359) https://github.com/github/CopilotForXcode/issues/359#issuecomment-3072194408

Thank you for sharing. Our engineering team will investigate on it first.

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

EddieMonsterJr avatar Jul 15 '25 06:07 EddieMonsterJr