# mainAgent **Repository Path**: llcTony/main-agent ## Basic Information - **Project Name**: mainAgent - **Description**: agent插件生成相关 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-17 - **Last Updated**: 2026-03-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # React AI Generator A VS Code extension that uses AI to generate React code through a chat interface. ## Features - Chat interface for describing React components and features - AI-powered code generation using OpenAI API (or compatible APIs like DeepSeek, Azure OpenAI, etc.) - Support for TypeScript and modern React (Hooks, Functional Components) - Copy code to clipboard or insert directly into editor - Customizable API endpoint and model - VS Code dark theme integrated ## Requirements - VS Code 1.85.0 or higher - OpenAI/DeepSeek API key (or compatible API) ## Quick Start 1. Install the extension from `react-ai-generator-0.0.1.vsix` 2. Create an `ai-config.json` file in your project root 3. Open the command palette (Ctrl+Shift+P), search "React AI Generator" 4. Describe the component you want to create 5. Click "生成代码" or press Ctrl+Enter ## Configuration Create an `ai-config.json` file in your project root directory: ```json { "apiKey": "your-api-key-here", "model": "deepseek-chat", "apiEndpoint": "https://api.deepseek.com" } ``` ### Configuration Options | Option | Description | Default | |--------|-------------|---------| | `apiKey` | Your API key (required) | - | | `model` | AI model to use | `deepseek-chat` | | `apiEndpoint` | API endpoint URL | `https://api.deepseek.com` | ### Supported Models - **DeepSeek**: `deepseek-chat` - **OpenAI**: `gpt-4`, `gpt-3.5-turbo` - **Azure OpenAI**: your custom deployment - **Local**: LM Studio (`http://localhost:1234/v1`), Ollama (`http://localhost:11434/v1`) ## Usage 1. Open the command palette (Ctrl+Shift+P) 2. Search for "React AI Generator" and press Enter 3. Describe the React component or feature you want to create 4. Click "生成代码" or press Ctrl+Enter to generate 5. Use the "复制" button to copy code or "插入" to add it to your editor ## Example Prompts - "创建一个用户登录表单,包含用户名和密码输入框,以及登录按钮" - "创建一个产品卡片组件,展示产品图片、名称、价格和添加到购物车按钮" - "创建一个待办事项列表组件,支持添加、删除、标记完成待办项" - "创建一个日期选择器组件,支持选择日期范围" - "创建一个表格组件,支持排序和分页" ## Building the Extension ```bash npm install npm run compile vsce package ``` ## License MIT