-
-
Notifications
You must be signed in to change notification settings - Fork 44
Add AI Autocomplete functionality #176
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
Add AI Autocomplete functionality #176
Conversation
…roved suggestions
|
This looks awesome. How about copilot? |
|
No api no party 🥲 It's not supported for third-party integration. |
|
If the token is invalid or another error occurs, should we provide feedback to the user, and if so, in what form? 🤔 |
|
For me, the simplest solution is to use https://reka-ui.com/docs/components/toast to launch a simple toast. |
|
How about just |
|
Basically, the prompt needs to be optimised, because there are cases where it doesn't do what I expect. I need to figure out how to manage the prompt. The idea is to improve the context based on the type of project, whether it is Laravel, Symfony, or something else. Then, it takes the vendor to see what is installed and also sees where the cursor is located. |
…s and tab context
…AI completion service
…AI completion service
|
Okay, that should do it. The file that defines the contextual AI completion prompt is complete. It works by analyzing the user's position and actions to decide what type of assistance to provide (comment completion, code from comment, and code completion). The main logic doesn't use a single approach but instead routes the request to three different specialized prompts, each optimized for a specific task. The first case is triggered when the user writes a comment and moves to a new empty line; here, the service understands that the intent is to translate the comment into executable code and uses a prompt focused on "translating" from natural language to PHP. The second case occurs when the cursor is inside an existing comment line; the service selects a prompt specifically designed to continue writing the comment's text in a natural and descriptive way. Finally, if neither of the previous scenarios is active, a default prompt is used the most rigid and technical one whose sole purpose is to complete the current line of code with valid, brief, and precise syntax. This three-prompt strategy allows it to offer much more accurate and relevant suggestions than a generic approach, as each prompt is finely calibrated with specific instructions and examples for its single purpose, distinguishing between code generation, code completion, and comment writing. |
|
Review Notes / Feedback (suggestions)
|
|
I've testing again 🙌 |
| id="ai-model" | ||
| v-model="settingsStore.settings.aiModelId" | ||
| @change="saveSettings()" | ||
| placeholder="Select the AI Model" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion for the future: Sort in alphabetical order for easier navigation.
|
@ILDaviz can we make the prompt customizable by the user instead of hard-coding it please? |
…o features/ai-code-completion


New AI-powered code autocomplete feature, leveraging the OpenRouter provider. This allows users to receive real-time code suggestions directly in the editor, enhancing productivity and the development experience.
New Additions and Main Changes:
How It Works:
This feature has been designed to be extensible, allowing for the addition of other AI providers in the future.