Skip to content

VS Code extension that streamlines development workflows through AI-powered task execution, intelligent file management, and automated code generation. Built on Aider, it integrates with Open AI to enhance productivity and code quality while simplifying complex development tasks.

License

Notifications You must be signed in to change notification settings

presidio-oss/aider-based-code-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

License Issues Stars Forks

HAI Logo

πŸš€ Code Generator

HAI Code Generator is a cutting-edge tool designed to simplify and automate task execution while enhancing code generation workflows. Leveraging Specif AI, it streamlines processes like task execution, file identification, and code documentation through intelligent automation and AI-driven capabilities.

πŸ—οΈ Built on Aider's powerful foundation for AI-assisted development.

HAI Demo

⚠️ Notice: A newer and more advanced version of this tool is available! We highly recommend using the latest HAI Code Generator for enhanced features and improved performance.

Table of Contents

🌟 Overview

HAI Code Generator is designed to boost productivity and precision by automating task execution and integrating file management capabilities. It combines intelligent file indexing, context generation, and LLM-driven automation to minimize manual effort and ensure task accuracy. With user-friendly interfaces and configurable settings, HAI Code Generator is perfect for both developers and teams aiming to enhance their workflows.

πŸ“₯ Getting Started

  • Download the latest HAI Code Generator extension from our releases page
  • Open Visual Studio Code β†’ Extensions (β‡§βŒ˜X) β†’ Views and More Actions (Button with three dots in the top right corner of the left pane)
HAI Demo

  • Click Install from VSIX and select the downloaded β€œ.vsix” file
  • Upon installation, press Shift + Command + P (on macOS) or Shift + Ctrl + P (on Windows), then select hai Build: Initialize from the command palette to load the extension.
HAI Demo

✨ Features

πŸ“‚ Prepare Code

A critical step in ensuring accurate and efficient file management, Code Preparation focuses on enhancing file context and accessibility through :

  • Contextual Code Comments

    • Automatically generate contextual comments for every identified file, offering deeper insights and clarifications.
    • Store all generated comments in a dedicated folder, ensuring they are easily accessible without cluttering your codebase.
  • Faiss DB Indexing

    • Built on the robust vector-search engine, Faiss DB ensures real-time and highly accurate file indexing, enabling instant discovery of relevant files.
    • Handles large repositories effortlessly, ensuring HAI Code Generator scales with your project's needs.

By performing Code Preparation as a mandatory step, you establish a foundation for seamless and contextual file discovery, enabling smoother task execution and streamlined workflows.


Tasks List Page with Tasks Loaded

πŸ“ Build from Requirements

Harness the power of AI for seamless task management and user-story execution, HAI Code Generator integrates tasks generated by Specif AI, allowing them to be loaded directly into the HAI Tasks page. This streamlined process enables you to:

  • Review AI-generated tasks within a dedicated interface.
  • Execute them instantly with a single click.
  • Manage all tasks in one place for improved clarity and productivity.

By centralizing AI-driven tasks in HAI Code Generator, you can maintain an efficient workflow from ideation to execution.


Tasks List Page with Tasks Loaded

πŸ”§ Refine Existing Code

The Refine Existing Code feature empowers users to directly perform tasks on their existing codebase without the need to load tasks from Specif AI. This allows you to:

  • Quickly edit or enhance your code based on specific requirements or improvements.
  • Leverage AI-driven suggestions to make precise and efficient changes.
  • Maintain control over your codebase while benefiting from automation and contextual understanding.

This feature provides a streamlined way to refine and improve your code without additional setup, ensuring productivity and flexibility in your workflow.


πŸ” File Identification

Enhanced file identification with intelligent discovery and retrieval, the File Identification feature provides the ability to locate and retrieve files swiftly within large codebases.

File Identification

File Identification

This feature ensures accurate and efficient file management by leveraging HAI’s advanced file-tracking capabilities to:

  • Pinpoint relevant files based on your specific queries or requirements.
  • Optimize navigation within extensive repositories to enhance productivity.

🀝 Contributing

To contribute to the project, start by exploring open issues or checking our feature request board.

To get started with HAI Code Generator, follow these steps:

Local Development Instructions
  1. Clone the repository:

    git clone https://github.com/presidio-oss/aider-based-code-generator
  2. Open the project in VSCode:

    code aider-based-code-generator
  3. Run the command:

    make
  4. Make sure to open plugin folder in a separate VS Code window.Launch by pressing F5 (or Run -> Start Debugging) to open a new VSCode window with the extension loaded. (You may need to install the esbuild problem matchers extension if you run into issues building the project.)


For detailed setup instructions, refer to:

Please read our Contributing Guidelines for more details.

ℹ️ Usage Instructions

Prepare Code

Data Required:

  • Absolute path of the src folder of the codebase/project
  • Application context – Description of the project
  • Excluded folders(Optional) – Folders that should not be vectorized (e.g., node_modules, .git)

Prerequisite Condition:

  • The codebase must be present within a src directory.

Workflow:

  1. The user clicks on "Prepare Code" after entering the necessary details.
  2. A Code Preparation orchestrator manages the workflow, with agents performing the following functions:
    • Adds comments to the entire codebase before vectorizing, providing code context.
    • Finds every file across the codebase, vectorizes the files, and stores them in a tmp folder. Faiss DB is used for the vector store.
  3. Once vectorization is complete, HAI sends a message to the user, asking if any additional tasks need to be done.

Build From Requirements

Data Required:

  • Absolute path of the tmp folder containing the vectorized project
  • Absolute path of the requirements generated by the Requirements app

Prerequisite Condition:

  • Code Preparation must be done.
  • Tasks must be generated by Specif AI.

Workflow:

  1. Once the "Build from Requirements" button is clicked, two terminals are initialized:
    • HAI Build Terminal: For chatting with the LLM and validating code generation.
    • HAI Build Watch Terminal: For monitoring file changes and updating the vector store of the codebase accordingly.
  2. After the terminals are initialized, HAI prompts the user to select a task to be implemented in the codebase.
  3. The user clicks on the task of their choice from the list.
  4. The agent first identifies the files to be edited and seeks confirmation from the user regarding the files to be edited/added.
  5. Once the user confirms, the tasks are implemented through a few exchanges.

Refine Existing Code

Data Required:

  • Absolute path of the tmp folder containing the vectorized project

Prerequisite Condition:

  • Code Preparation must be done.

Workflow:

  1. Once the "Start Conversation" button is clicked, two terminals are initialized:
    • HAI Build Terminal: For chatting with the LLM and validating code generation.
    • HAI Build Watch Terminal: For monitoring file changes and updating the vector store of the codebase accordingly.
  2. After the terminals are initialized, HAI asks for a task to be implemented in the codebase.
  3. The user enters the task they want to be completed.
  4. The agent first identifies the files to be edited and seeks confirmation from the user regarding the files to be edited/added.
  5. Once the user confirms, the tasks are implemented through a few exchanges.

πŸ“œ License

This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.

πŸ™ Acknowledgments

Thanks to all contributors and users for their support and feedback.

πŸ“§ Contact

For any questions or feedback, please contact us at [email protected].

About

VS Code extension that streamlines development workflows through AI-powered task execution, intelligent file management, and automated code generation. Built on Aider, it integrates with Open AI to enhance productivity and code quality while simplifying complex development tasks.

Topics

Resources

License

Stars

Watchers

Forks