Contributing to Astrelium
September 9, 2025 ยท View on GitHub
Thank you for your interest in contributing to Astrelium! We welcome contributions from the community.
๐ค How to Contribute
Reporting Bugs
Before creating bug reports, please check the existing issues to avoid duplicates. When creating a bug report, include:
- Clear description of the issue
- Steps to reproduce the behavior
- Expected behavior vs actual behavior
- Screenshots if applicable
- Environment details (OS, VS Code version, Node.js version)
- Console logs if relevant
Suggesting Features
Feature requests are welcome! Please:
- Check if the feature already exists or has been requested
- Clearly describe the feature and its benefits
- Provide examples of how it would be used
- Consider implementation complexity
Pull Requests
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/amazing-feature) - Make your changes following the coding standards below
- Test thoroughly - ensure all existing tests pass
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request with a clear description
๐ ๏ธ Development Setup
Prerequisites
- Node.js 16.0 or higher
- npm or yarn
- VS Code
- Git
Local Development
# Clone your fork
git clone https://github.com/YOUR_USERNAME/astrelium.git
cd astrelium
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Run in development mode
# Press F5 in VS Code to start Extension Development Host
Running Tests
# Run all tests
npm test
# Run tests in watch mode
npm run watch-tests
๐ Coding Standards
TypeScript Guidelines
- Use TypeScript for all new code
- Follow strict mode settings
- Use interfaces for type definitions
- Write JSDoc comments for public functions
- Use async/await instead of Promises when possible
Code Style
- Use 4 spaces for indentation
- Follow camelCase for variables and functions
- Follow PascalCase for classes and interfaces
- Use UPPER_CASE for constants
- Maximum line length: 120 characters
File Structure
src/
โโโ extension.ts # Main extension file
โโโ types/ # Type definitions
โโโ utils/ # Utility functions
โโโ services/ # Service classes
โโโ test/ # Test files
Commit Messages
Use conventional commit format:
feat: add new AI function for code review
fix: resolve fetch API issue with Ollama
docs: update README with installation steps
test: add unit tests for workspace analysis
refactor: improve error handling in chat provider
Documentation
- Update README.md for user-facing changes
- Add JSDoc comments for all public APIs
- Include code examples for new features
- Update CHANGELOG.md for releases
๐งช Testing Guidelines
Unit Tests
- Write tests for all new functions
- Use descriptive test names
- Test both success and error cases
- Mock external dependencies
Integration Tests
- Test extension activation
- Test webview functionality
- Test Ollama integration
- Test file operations
Manual Testing
Before submitting:
- Test extension activation/deactivation
- Test all major features
- Test error scenarios
- Test on different file types
- Verify UI responsiveness
๐ Debugging
VS Code Extension Debugging
- Open project in VS Code
- Press
F5to start Extension Development Host - Use
console.log()for debugging - Check Developer Console:
Help > Toggle Developer Tools
Common Issues
- Extension not loading: Check
package.jsonactivation events - Webview not working: Verify CSP settings and resource paths
- Ollama connection fails: Ensure Ollama is running on port 11434
- TypeScript errors: Run
npm run compileto check for issues
๐ License
By contributing to Astrelium, you agree that your contributions will be licensed under the Apache License 2.0.
๐ Recognition
Contributors will be recognized in:
- README.md contributors section
- Release notes
- Project documentation
Thank you for making Astrelium better! ๐