autocode-ai/userInterface.md
2024-11-03 18:02:33 +01:00

5.7 KiB

UserInterface.js Documentation

Overview

UserInterface.js is a core module in the AutoCode project that handles user interactions and orchestrates various operations within the application. It provides a command-line interface for users to interact with different features of AutoCode, including code generation, analysis, documentation, and AI agent execution.

The module imports various dependencies and other project modules to facilitate its operations. It uses the inquirer library for interactive prompts, chalk for colored console output, and ora for loading spinners.

Key Components

anthropic Instance

An instance of the Anthropic API client is created using the API key stored in the environment variables.

UserInterface Object

This is the main export of the module, containing all the methods for user interaction and action handling.

Methods

promptForAction()

Prompts the user to select an action from a list of available options.

Returns: Promise