Delphi-AI-Developer

Delphi-AI-Developer

Inspired by GitHub Copilot, this plugin adds AI-powered interaction capabilities to the Delphi IDE

Stars: 89

Visit
 screenshot

Delphi AI Developer is a plugin that enhances the Delphi IDE with AI capabilities from OpenAI, Gemini, and Groq APIs. It assists in code generation, refactoring, and speeding up development by providing code suggestions and predefined questions. Users can interact with AI chat and databases within the IDE, customize settings, and access documentation. The plugin is open-source and under the MIT License.

README:

Delphi AI Developer (Copilot)

Inspired by GitHub Copilot, Delphi AI Developer is a plugin that adds Artificial intelligence (AI) interaction capabilities to the Delphi IDE, using both the OpenAI API, Gemini API and Groq API, as well as offering offline AI support.

With Delphi AI Developer, you will have assistance in generating and refactoring code, facilitating and accelerating development.

Receive suggestions for creating and improving code directly in the IDE and take advantage of the possibility of creating predefined questions to speed up your searches.

đź“ž Contacts

       

⚙️ Installation

1 - Download Delphi AI Developer. You can download the .zip file or clone the project on your PC. image

2 - In your Delphi, access the menu File > Open and select the file: Package\DelphiAIDeveloper.dpk

image

3 - Right-click on the project name and select "Install"

image

4- The "AI Developer" item will be added to the IDE's MainMenu

image


PLUGIN SETTINGS

  • Access the menu “AI Developer” > “Settings” > Tab “Preferences” image
  1. Language used in questions: Indicate in which language you will ask questions in chats, so that the prompts generated by the Plugin are generated in the same language.
  2. AI default (Chat and Databases Chat): Default AI when starting the IDE.
  3. Color to highlight Delphi/Pascal code: Color to highlight Delphi/Pascal/SQL code in responses displayed on chat screens
  4. Default Prompt: The Default Prompts that were added in this field will be sent to the AIs, with this you can considerably improve the quality of the responses. (Example of prompt: Always return SQL commands in lowercase)

CONFIGURING IAS ONLINE

You can choose between 3 APIs, Gemini (Google), ChatGPT (OpenAI) and Groq. Gemini and Groq APIs are free. Access the menu “AI Developer” > “Settings” > Tab “IAs on-line” image

  1. Inform the desired model.
  2. Click on the "Generate API Key" link to generate your key.
  3. In this field you must enter the API access key.

AI Chat interacting with Delphi IDE

Access the menu “AI Developer” > “Chat” or Ctrl+Shift+Alt+A image

  1. Select the desired AI to be used in the chat
  2. Field where the question/prompt should be added
  3. Field where the AI ​​response will be displayed
  4. Access the menu with pre-registered questions (to register, access the menu: “AI Developer” > “Defaults Questions”)
  5. By checking this option, the AI ​​will only return codes, without inserting comments or explanations.
  6. By checking the "Use current unit code in query" option, the source code of the current unit will be used as a reference for the prompt sent to the AIs. Note: If the current unit has any code selected, only the selected code snippet will be used as a reference, otherwise the entire unit code will be used.
  7. Button that makes the request to the AIs
  8. Insert Selected Text at Cursor: Inserts the selected text into the response, field in the IDE code editor (if there is no selection, use the entire response)
  9. Create new unit with selected code (if there is no selection, use the entire response)
  10. Copy Selected Text (if there is no selection, use the entire response)
  11. Clean all and start a new chat
  12. Opens a menu with additional options

Chat for database interaction

  • To register Databases, access the menu “AI Developer” > “Databases Registers” image

  • Generate reference with database

  • Note: This process must always be performed whenever a new field or table is added to the database. image

  • Optional Step: Link Default Database to Project or Project Group image

  • Chat for database

image

  1. Select the desired database
  2. Quick access to the reference generation screen for the selected database
  3. Select the desired AI to be used in the chat
  4. Field where the question/prompt should be added
  5. Button that makes the request to the AIs
  6. Field where the AI ​​response will be displayed
  7. Button to execute the SQL command of the field with the response (field 6)
  8. Grid with the response from the execution of the SQl command
  9. Options for copying or exporting Grid data
  10. Access the menu with pre-registered questions (to register, access the menu: “AI Developer” > “Defaults Questions”)
  11. By checking this option, the AI ​​will only return SQL commands, without inserting comments or explanations.
  12. By checking the "Use current unit code in query" option, the source code of the current unit will be used as a reference for the prompt sent to the AIs. Note: If the current unit has any code selected, only the selected code snippet will be used as a reference, otherwise the entire unit code will be used.
  13. Insert Selected Text at Cursor: Inserts the selected text into the response, field in the IDE code editor (if there is no selection, use the entire response)
  14. Create new unit with selected code (if there is no selection, use the entire response)
  15. Copy Selected Text (if there is no selection, use the entire response)
  16. Clean all and start a new chat
  17. Opens a menu with additional options

▶️ Demo Video

We have also created a video with details on how to download, install and use the plugin. The video is in Portuguese (ptBR), but we are providing subtitles and possibly a video in English.


đź“„ Documentation under construction

We will soon publish the complete documentation for the Plugin.

đź’¬ Contributions / Ideas / Bug Fixes

To submit a pull request, follow these steps:

  1. Fork the project
  2. Create a new branch (git checkout -b minha-nova-funcionalidade)
  3. Make your changes
  4. Make the commit (git commit -am 'Functionality or adjustment message')
  5. Push the branch (git push origin Message about functionality or adjustment)
  6. Open a pull request

⚠️ License

Delphi AI Developer is free and open-source wizard licensed under the MIT License.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for Delphi-AI-Developer

Similar Open Source Tools

For similar tasks

For similar jobs