AI and CoPilot Context

已回答

I'm wondering if there are any phpdoc extensions that can be used to add context to the Jetbrains AI or Github CoPilot?

I mainly use CoPilot, and I can see that it's trying to be more intelligent by adding additional files to the context, but it's not that good at selecting the files.

In a perfect world, the AI would be aware of the entire codebase, but when you have 500k+ LOC, that is not feasible with current context window sizes.

A second prize would be to be able to specify explicitly additional files to include.

For example, you're working on a JS or PHP file that manipulates the DOM, it would be great if we could create a document with sample HTML and reference it somehow for the AI's to include.

Something like @context /doc/wireframe.html

0

Yes, it is possible in the latest release of PhpStorm / JetBrains AI Assistant - 2024.3: 

You can also use the adding files as context attachments feature: https://blog.jetbrains.com/ai/2024/11/jetbrains-ai-assistant-2024-3/#improved-context-management
 

0

Sorry - I wasn't too clear.

I'm not interested in the chat feature. I'm more interested in the autocomplete suggestions.

Copilot keeps suggesting incorrect selectors or class methods.

There should be a way to indicate in the docblock where it should go for more context to be more helpful.

0

Ah, ok sorry for the misunderstanding.
Unfortunately, there is no such feature yet. Context for code completion feature is auto-generated based on the current user position and previous behavior. You are welcome to create a feature request on our issue tracker for it: https://youtrack.jetbrains.com/newIssue?project=LLM. Thank you!

0

We created a new feature request according to your feedback: https://youtrack.jetbrains.com/issue/LLM-13609.
Please vote for it and follow for progress updates.

0

That link doesn't work.

0

Sorry it was set to private by mistake. Please try again.

0

请先登录再写评论。