CalliopeAI Extensions Build System
Calliope Integration: This component is integrated into the Calliope AI platform. Some features and configurations may differ from the upstream project.
This document describes the integration of CalliopeAI extensions into the WAIIDE WAIIDE build.
Overview
The WAIIDE build system now automatically includes:
- CalliopeAI WAIIDE Agent - AI coding assistant extension
- Pergamon Theme - CalliopeAI’s branded theme, set as the default
Changes Made
1. Built-in Extensions
Extensions are now included as built-in extensions in WAIIDE/product.json:
{
"builtInExtensions": [
{
"name": "calliope-WAIIDE-agent",
"version": "0.0.1",
"path": "./calliope-WAIIDE-agent"
},
{
"name": "theme-pergamon",
"version": "1.0.0",
"path": "../calliope-theme"
}
]
}2. Default Theme
The default theme has been changed to Pergamon Blue in WAIIDE/src/vs/workbench/services/themes/common/workbenchThemeService.ts:
export enum ThemeSettingDefaults {
COLOR_THEME_DARK = 'Pergamon Blue',
COLOR_THEME_LIGHT = 'Pergamon Blue',
// ... other themes
}3. Build System
A new build script scripts/build-calliope-extensions.sh automatically:
- Builds the CalliopeAI WAIIDE Agent extension
- Copies both extensions to the WAIIDE extensions directory
- Cleans up development dependencies to reduce image size
Usage
Building Extensions
# Build extensions only
./build.sh build-extensions
# Build full Docker image (includes extensions)
./build.sh buildDirectory Structure
calliope-WAIIDE/
├── WAIIDE/ # WAIIDE source (submodule)
│ ├── extensions/
│ │ ├── calliope-WAIIDE-agent/ # Copied from calliope-WAIIDE-agent/
│ │ └── theme-pergamon/ # Copied from calliope-theme/
│ └── product.json # Modified to include built-in extensions
├── calliope-WAIIDE-agent/ # CalliopeAI Agent source (submodule)
├── calliope-theme/ # Theme source
├── scripts/
│ └── build-calliope-extensions.sh # Extension build script
└── build.sh # Main build script (updated)Requirements
- CalliopeAI Agent Extension is included as a git submodule at
calliope-WAIIDE-agent/ - CalliopeAI Theme is located at
calliope-theme/ - Both extensions must have valid
package.jsonfiles - The agent extension must support
npm run build:production
Features
Non-Removable Extensions
Extensions are built into the WAIIDE binary and cannot be disabled or removed by users.
Default Theme
Pergamon Blue is automatically set as the default theme for both light and dark modes.
Automatic Build
Extensions are automatically built and included when running ./build.sh build.
Development
Testing Extensions
# Build extensions
./build.sh build-extensions
# Build and run container
./build.sh build
./build.sh up
# Access WAIIDE at http://localhost:8090Modifying Extensions
- Make changes to the source extensions
- Run
./build.sh build-extensionsto rebuild - Rebuild the Docker image with
./build.sh build
Troubleshooting
Extension Build Fails
- Ensure the
calliope-WAIIDE-agentsubmodule is initialized:git submodule update --init - Check that
calliope-WAIIDE-agent/package.jsonexists - Verify that
npm installandnpm run build:productionwork in the agent directory - Ensure Node.js and npm are installed
Theme Not Loading
- Ensure
calliope-theme/package.jsonhas correct theme definition - Check that
themes/pergamon-blue.jsonexists - Verify the theme name matches exactly: “Pergamon Blue”
Extensions Not Available
- Check that
WAIIDE/extensions/calliope-WAIIDE-agent/exists after build - Verify
WAIIDE/extensions/theme-pergamon/exists after build - Ensure
WAIIDE/product.jsonhas been modified correctly
CI/CD Environment Setup
For continuous integration environments, ensure submodules are properly initialized:
# In your CI pipeline
git submodule update --init --recursive
# Build the image
./build.sh buildGitHub Actions Configuration
The CI workflows have been updated to automatically handle submodules:
- name: Checkout WAIIDE
uses: actions/checkout@v4
with:
submodules: 'recursive'
token: ${{ secrets.GITHUB_TOKEN }}Build Process
The build script automatically:
- Checks for and initializes submodules if needed
- Installs main extension dependencies
- Installs webview (coder-gui) dependencies separately
- Builds both webpack (extension) and vite (webview) components
- Copies extensions to WAIIDE and cleans up dev dependencies
This resolves the previous Vite.js import errors by ensuring all subdirectory dependencies are properly installed.
Files Modified
WAIIDE/product.json- Added built-in extensionsWAIIDE/src/vs/workbench/services/themes/common/workbenchThemeService.ts- Changed default themebuild.sh- Added extension build step and submodule initializationscripts/build-calliope-extensions.sh- Extension build script (updated for submodule path).gitmodules- Added calliope-WAIIDE-agent as submodule