The GenAIcode tool offers a comprehensive set of features designed to enhance code generation capabilities and provide a flexible development experience. This document outlines all available features, their configuration, and usage.
- Activation: Default mode when using
--interactive
flag - Description: Enables conversation-driven code generation with real-time feedback
- Features:
- Real-time clarification through questions
- Context-aware interactions
- Multi-step operation support
- Continuous conversation flow
- Benefits:
- Enhanced understanding of requirements
- More accurate code generation
- Better error handling
- Improved user experience
- Activation:
--ui
flag - Description: Provides a web-based graphical interface for code generation
- Features:
- Real-time interaction
- Visual feedback for operations
- File upload support
- Image handling capabilities
- Conversation history visualization
- Configuration:
{ "uiPort": 3000, "uiFrameAncestors": ["http://localhost:3000"] }
- Benefits:
- User-friendly interface
- Visual operation feedback
- Enhanced file management
- Improved accessibility
- Activation: Enabled by default, can be disabled with
--disable-history
flag - Description: Manages conversation history and context preservation
- Features:
- Conversation tracking
- Context preservation
- History summarization
- Configurable retention
- Related Options:
--disable-conversation-summary
: Disables automatic conversation summarization
- Benefits:
- Improved context awareness
- Better conversation continuity
- Reduced token usage
- Enhanced user experience
- Activation: Automatic when plugins are configured
- Description: Enables extensibility through custom plugins
- Features:
- Custom AI service integration
- Action handler extensions
- Operation customization
- Hook system
- Configuration:
{ "plugins": ["my-custom-plugin", "./local-plugin.js"] }
- Benefits:
- Enhanced extensibility
- Custom functionality
- Integration capabilities
- Operation flexibility
- Activation: Enabled by default, can be disabled with
--disable-context-optimization
flag - Description: Optimizes context handling for improved performance
- Features:
- Smart context selection
- Token usage optimization
- Dependency analysis
- Content masking
- Benefits:
- Reduced token usage
- Improved performance
- Better accuracy
- Cost optimization
- Activation:
--vision
flag - Description: Enables image processing and analysis
- Compatible Models: Vertex AI's Gemini Pro Vision
- Use Cases:
- UI code generation from mockups
- Image processing algorithms
- Visual reference-based development
- Benefits:
- Enhanced visual understanding
- Improved UI development
- Better visual context handling
- Activation:
--imagen
flag - Description: Enables AI-powered image generation
- Supported Services:
- DALL-E
- Vertex AI Imagen
- Features:
- Custom image generation
- Visual asset creation
- Image modification
- Benefits:
- Integrated asset creation
- Visual content generation
- Enhanced development workflow
- Activation: Enabled by default when Git is available
- Description: Allows the AI model to request context from the project's Git history.
- Features:
- Request recent commit history.
- Request commit history for specific files.
- Request
git blame
output for specific files (and optionally commits).
- Usage: The AI uses the
requestGitContext
action via theaskQuestion
function. - Benefits:
- Provides the AI with deeper understanding of code evolution.
- Improves the AI's ability to reason about changes and maintain consistency.
- Configuration: Via
.genaicoderc
- Description: Allows customization of AI model behavior
- Options:
{ "modelOverrides": { "temperature": 0.7, "maxTokens": 4096 } }
- Benefits:
- Fine-tuned responses
- Custom behavior
- Improved control
- Configuration: Via
.genaicoderc
- Description: Defines critical context for code generation
- Example:
{ "importantContext": ["src/core/**/*.ts", "README.md"] }
- Benefits:
- Better context awareness
- Improved accuracy
- Focused generation
- Activation: Enabled by default, can be disabled with
--disable-ai-service-fallback
- Description: Provides automatic fallback between AI services
- Features:
- Automatic service switching
- Error recovery
- Service availability monitoring
- Benefits:
- Improved reliability
- Continuous operation
- Error resilience
- Activation:
--verbose-prompt
flag - Description: Displays detailed prompts and interactions
- Benefits:
- Debugging assistance
- Process transparency
- Better understanding
- Activation:
--temperature
parameter (default: 0.7) - Range: 0.0 to 2.0
- Usage: Fine-tunes AI response creativity
- Benefits:
- Controlled creativity
- Consistent output
- Task-appropriate responses
- Activation:
--content-mask=<path>
parameter - Description: Filters initial source code context
- Benefits:
- Reduced token usage
- Focused context
- Improved performance
- Activation:
--cheap
flag - Description: Uses cost-effective AI models
- Benefits:
- Reduced costs
- Faster processing
- Resource optimization
- Permissions:
--allow-file-create
--allow-file-delete
--allow-directory-create
--allow-file-move
- Operations:
- File creation/deletion
- Directory management
- File movement
- Content updates
- Benefits:
- Comprehensive file handling
- Safe operations
- Flexible management
- Configuration: Via
.genaicoderc
- Description: Integrates with project linting
- Example:
{ "lintCommand": "npm run lint" }
- Benefits:
- Code quality maintenance
- Standard compliance
- Automated checking
- Activation:
--dry-run
flag - Description: Simulates operations without changes
- Benefits:
- Safe testing
- Operation preview
- Risk mitigation
- Activation:
--disable-cache
flag - Description: Controls caching behavior
- Benefits:
- Fresh results
- Controlled caching
- Improved accuracy
These features collectively make GenAIcode a versatile and powerful tool for AI-assisted code generation, capable of adapting to various development workflows and requirements. Each feature can be configured and combined to create an optimal development experience.