Added complete source code and pre-compiled application: Source Code: - app.asar (compiled Electron app) - app-extracted/ (all extracted source files) - dist/services/aiProviderService.js - dist/services/settingsService.js - dist/ipcHandlers.js - dist/aiProviderAPI.ts - dist/ai-provider-settings.html - And all other application files Build Tools: - scripts/extract-app.sh - scripts/repack-app.sh - scripts/build-deb.sh - scripts/install-deb.sh Documentation: - SOURCE_CODE.md (repository structure) - BUILD.md (build instructions) - README.md (overview) - docs/ (complete API docs) - AI_PROVIDER_SPECIFICATION.md - AI_PROVIDER_README.md - IMPLEMENTATION_SUMMARY.md Features included: - 17+ AI provider presets - One-click provider setup - Model auto-fetching - Connection testing - Modern GUI interface - Complete IPC handlers (14 new) - TypeScript API wrapper - Persistent settings Ready to build and customize!
11 KiB
11 KiB
Antigravity IDE - AI Provider Edition Source Code
📁 Repository Structure
antigravity-ai-providers/
├── README.md # This file
├── LICENSE # License information
├── CHANGELOG.md # Version history
├── INSTALL.md # Installation guide
├── BUILD.md # Build instructions
├── src/ # Modified source code
│ ├── app.asar # Compiled Electron app
│ ├── app-extracted/ # Extracted app contents
│ │ ├── dist/
│ │ │ ├── services/
│ │ │ │ ├── aiProviderService.js # NEW: AI Provider Service
│ │ │ │ └── settingsService.js # MODIFIED: Added AI settings
│ │ │ ├── ipcHandlers.js # MODIFIED: Added AI IPC handlers
│ │ │ ├── aiProviderAPI.ts # NEW: TypeScript API wrapper
│ │ │ ├── ai-provider-settings.html # NEW: Complete GUI
│ │ │ └── [other dist files...]
│ │ └── [other extracted files...]
│ └── [original source files...]
├── packages/ # Pre-built packages
│ └── antigravity_2.0.1-ai-providers-1_amd64.deb
├── docs/ # Documentation
│ ├── AI_PROVIDER_SPECIFICATION.md
│ ├── AI_PROVIDER_README.md
│ ├── IMPLEMENTATION_SUMMARY.md
│ └── API_REFERENCE.md
├── scripts/ # Build and utility scripts
│ ├── build-deb.sh
│ ├── extract-app.sh
│ ├── repack-app.sh
│ └── install-deb.sh
└── .gitignore
🎯 Overview
This repository contains the complete source code and pre-built packages for Antigravity IDE v2.0.1 - AI Provider Edition.
What's Included
-
Complete Electron Application Source
- Modified main process code
- IPC handlers for AI provider operations
- Settings service with AI configuration
- TypeScript API wrapper
- Complete HTML/CSS/JS GUI implementation
-
Pre-compiled Package
- Ready-to-install .deb package for amd64
- All dependencies bundled
- Desktop integration
- Auto-installation scripts
-
Build Tools
- Shell scripts for extraction and repacking
- Build automation
- Installation helpers
-
Comprehensive Documentation
- Installation guides
- API reference
- Implementation details
- Usage examples
🚀 Quick Start
Option 1: Install Pre-built Package
# Download the .deb file
wget https://github.rommark.dev/admin/antigravity-ai-providers/releases/download/v2.0.1-ai-providers-1/antigravity_2.0.1-ai-providers-1_amd64.deb
# Install
sudo dpkg -i antigravity_2.0.1-ai-providers-1_amd64.deb
# Launch
antigravity
Option 2: Build from Source
# Clone the repository
git clone https://github.rommark.dev/admin/antigravity-ai-providers.git
cd antigravity-ai-providers
# Extract app.asar
./scripts/extract-app.sh
# Make modifications (optional)
# Edit files in src/app-extracted/dist/
# Repack app.asar
./scripts/repack-app.sh
# Build .deb package
./scripts/build-deb.sh
# Install
sudo dpkg -i packages/antigravity_2.0.1-ai-providers-1_amd64.deb
📦 Source Code Components
Backend (Electron Main Process)
src/app-extracted/dist/services/aiProviderService.js
- Purpose: Core AI provider management service
- Features:
- 17+ provider presets
- CRUD operations for providers
- Model fetching from APIs
- Connection testing
- Settings persistence
- Event system for real-time updates
src/app-extracted/dist/services/settingsService.js
- Purpose: Application settings management
- Modifications: Added AI-related settings
aiProvider: Default provider IDaiModel: Default modelaiTemperature: Response creativityaiMaxTokens: Max response lengthaiStreaming: Streaming toggleaiEmbeddingProvider: Embedding provider
src/app-extracted/dist/ipcHandlers.js
- Purpose: IPC communication bridge
- Modifications: Added 14 AI provider IPC handlers
ai:get-providers- Get all providersai:get-available-presets- List presetsai:add-provider-from-preset- Quick setupai:fetch-models- Auto-fetch modelsai:test-connection- Connection testing- And more...
Frontend (Renderer Process)
src/app-extracted/dist/aiProviderAPI.ts
- Purpose: Type-safe API wrapper
- Features:
- TypeScript interfaces
- IPC communication helpers
- Settings management
- Provider operations
src/app-extracted/dist/ai-provider-settings.html
- Purpose: Complete GUI implementation
- Features:
- Modern responsive design
- Provider cards with status
- Preset selector
- Model auto-fetch
- Connection testing UI
- Settings panel
- Toast notifications
- Modal dialogs
🔧 Building from Source
Prerequisites
- Node.js 18+ (for asar tools)
- npm or yarn
- Linux system (for .deb packaging)
- Standard build tools
Step 1: Extract app.asar
cd src
mkdir -p app-extracted
cd app-extracted
npx asar extract ../app.asar dist/
Step 2: Make Modifications
Edit files in src/app-extracted/dist/:
# Example: Modify provider presets
vim dist/services/aiProviderService.js
# Example: Add new IPC handler
vim dist/ipcHandlers.js
# Example: Customize GUI
vim dist/ai-provider-settings.html
Step 3: Repack app.asar
npx asar pack dist/ ../app.asar
Step 4: Build .deb Package
cd ../..
./scripts/build-deb.sh
📚 Documentation
For Users
- INSTALL.md - Installation instructions
- docs/AI_PROVIDER_README.md - Usage guide
For Developers
- BUILD.md - Build instructions
- docs/AI_PROVIDER_SPECIFICATION.md - API reference
- docs/IMPLEMENTATION_SUMMARY.md - Architecture
🤝 Contributing
Reporting Issues
- Check existing issues
- Create new issue with:
- Bug description
- Steps to reproduce
- Expected vs actual behavior
- System information
- Logs (if applicable)
Submitting Changes
- Fork the repository
- Create feature branch
- Make changes
- Add tests (if applicable)
- Submit pull request
Code Style
- JavaScript: ES6+ with async/await
- TypeScript: Strict mode enabled
- HTML/CSS: Semantic, accessible
- Comments: English only
🔒 Security
API Keys
- Never commit API keys
- Use environment variables
- Store securely in app config
- Validate before use
Network Security
- HTTPS required for external APIs
- Certificate validation
- Secure headers
- No mixed content
📊 Architecture
┌─────────────────────────────────────────┐
│ Renderer Process (GUI) │
│ ┌─────────────────────────────────┐ │
│ │ ai-provider-settings.html │ │
│ │ ├── Provider Cards │ │
│ │ ├── Settings Panel │ │
│ │ ├── Preset Selector │ │
│ │ └── Connection Testing │ │
│ └─────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────┐ │
│ │ aiProviderAPI.ts │ │
│ │ └── Type-safe IPC wrapper │ │
│ └─────────────────────────────────┘ │
└──────────────────│──────────────────────┘
│ IPC (14 handlers)
▼
┌─────────────────────────────────────────┐
│ Main Process (Backend) │
│ ┌─────────────────────────────────┐ │
│ │ ipcHandlers.js │ │
│ │ └── AI Provider handlers │ │
│ └─────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────┐ │
│ │ aiProviderService.js │ │
│ │ ├── Provider management │ │
│ │ ├── Preset system │ │
│ │ ├── Connection testing │ │
│ │ └── Model fetching │ │
│ └─────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────┐ │
│ │ settingsService.js │ │
│ │ └── AI settings keys │ │
│ └─────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────┐ │
│ │ storage.js │ │
│ │ └── Persistent storage │ │
│ └─────────────────────────────────┘ │
└─────────────────────────────────────────┘
🌟 Key Features
One-Click Provider Setup
await window.electron.invoke('ai:add-provider-from-preset',
'Google Antigravity (OAuth)',
'api-key'
);
Model Auto-Fetching
const models = await window.electron.invoke('ai:fetch-models', providerId);
Connection Testing
const result = await window.electron.invoke('ai:test-connection', providerId);
if (result.success) {
console.log('✅ Connected!');
}
📞 Support
- Issues: https://github.rommark.dev/admin/antigravity-ai-providers/issues
- Discussions: https://github.rommark.dev/admin/antigravity-ai-providers/discussions
- Documentation: See
/docsdirectory
🙏 Acknowledgments
- Antigravity IDE - Original application
- Codex Launcher - Provider presets
- Electron - Desktop framework
- Node.js - JavaScript runtime
📄 License
Same as original Antigravity application.
🎉 Summary
This repository provides:
- ✅ Complete source code
- ✅ Pre-compiled package
- ✅ Build tools
- ✅ Comprehensive docs
- ✅ Easy installation
- ✅ Full customization
Start using or customizing Antigravity with AI Provider support today!