7.5 KiB
MoreMinimore Script Integration Guide
This guide explains how to use the updated scripts to integrate your Moreminimore provider customizations when updating from the upstream Dyad repository.
Overview
The script system has been updated to include all the latest Moreminimore provider changes, making it easy to re-apply your customizations after updating from upstream.
Scripts Overview
1. scripts/update-and-debrand.sh - Main Integration Script
Purpose: Applies all Moreminimore customizations and removes Dyad branding.
New Features Added:
- ✅ Adds Moreminimore as a cloud provider in
language_model_constants.ts - ✅ Adds Moreminimore case to
get_model_client.tsbackend - ✅ Updates provider settings UI to hide model selection for Moreminimore
- ✅ Updates button text to "Setup Moreminimore AI"
- ✅ All existing debranding and custom features
Usage:
# Apply all customizations
./scripts/update-and-debrand.sh
# Or run specific functions
source scripts/update-and-debrand.sh
add_moreminimore_provider
update_backend_model_client
update_provider_settings_ui
2. scripts/integrate-custom-features.sh - Custom Feature Integration
Purpose: Integrates custom features with upstream updates, includes Moreminimore provider support.
New Features Added:
- ✅ Moreminimore provider files in the file list
- ✅
integrate_moreminimore_provider()function - ✅ Validation for Moreminimore configuration
Usage:
# Integrate all custom features
./scripts/integrate-custom-features.sh
# Validate current integration
./scripts/integrate-custom-features.sh validate
# Restore from backup
./scripts/integrate-custom-features.sh restore backup-20231201-120000
3. scripts/build-moreminimore-app.sh - Build Script with Validation
Purpose: Builds the MoreMinimore application with proper validation.
New Features Added:
- ✅
validate_moreminimore_provider()function - ✅ Automatic Moreminimore provider validation during build
- ✅ Auto-fix missing Moreminimore configurations
Usage:
# Development build
./scripts/build-moreminimore-app.sh
# Production build (requires code signing)
./scripts/build-moreminimore-app.sh --production
# Clean build artifacts only
./scripts/build-moreminimore-app.sh --clean-only
# Verbose output
./scripts/build-moreminimore-app.sh --verbose
What the Scripts Do
Moreminimore Provider Integration
-
Backend Provider Configuration:
- Adds "moreminimore" to
CLOUD_PROVIDERSinlanguage_model_constants.ts - Adds GLM-4.6 model configuration
- Sets up proper website URL and gateway prefix
- Adds "moreminimore" to
-
Backend Model Client:
- Adds "moreminimore" case to
get_model_client.ts - Configures OpenAI-compatible client with fixed base URL
- Proper API key validation
- Adds "moreminimore" case to
-
Frontend UI Updates:
- Hides model selection UI for Moreminimore (fixed model)
- Updates button text to "Setup Moreminimore AI"
- Simplified provider configuration experience
Existing Features Maintained
- ✅ Remove-limit feature integration
- ✅ Dyad branding removal
- ✅ Logo updates and icon generation
- ✅ Smart context liberation
- ✅ Pro feature removal
- ✅ YouTube section removal
- ✅ All existing customizations
Update Workflow
When updating from upstream Dyad:
Option 1: Full Integration (Recommended)
# 1. Update from upstream
git fetch upstream
git merge upstream/main
# 2. Apply all customizations
./scripts/update-and-debrand.sh
# 3. Build and test
./scripts/build-moreminimore-app.sh
Option 2: Custom Feature Integration
# 1. Update from upstream
git fetch upstream
git merge upstream/main
# 2. Integrate custom features only
./scripts/integrate-custom-features.sh
# 3. Build and test
./scripts/build-moreminimore-app.sh
Option 3: Manual Control
# 1. Update from upstream
git fetch upstream
git merge upstream/main
# 2. Run specific functions
source scripts/update-and-debrand.sh
add_moreminimore_provider
update_backend_model_client
update_provider_settings_ui
# 3. Build and test
./scripts/build-moreminimore-app.sh
Validation and Testing
Automatic Validation
The build script automatically validates:
- ✅ Moreminimore provider exists in
language_model_constants.ts - ✅ Moreminimore case exists in
get_model_client.ts - ✅ Provider settings UI is updated
- ✅ TypeScript compilation succeeds
Manual Validation
# Validate custom features integration
./scripts/integrate-custom-features.sh validate
# Check TypeScript compilation
npm run ts
# Test the application
npm start
File Changes Made
Backend Files
-
src/ipc/shared/language_model_constants.ts:- Added
moreminimore:toCLOUD_PROVIDERS - Added
moreminimore:toMODEL_OPTIONS
- Added
-
src/ipc/utils/get_model_client.ts:- Added
case "moreminimore":in switch statement - Configured OpenAI-compatible client
- Added
Frontend Files
-
src/components/settings/ProviderSettingsPage.tsx:- Updated ModelsSection condition to hide for Moreminimore
- Simplified provider handling
-
src/components/settings/ProviderSettingsHeader.tsx:- Updated button text to "Setup Moreminimore AI"
Troubleshooting
Common Issues
-
"Unsupported model provider: moreminimore":
# Re-run the backend model client update source scripts/update-and-debrand.sh update_backend_model_client -
Missing Moreminimore in provider list:
# Re-add the provider source scripts/update-and-debrand.sh add_moreminimore_provider -
Model selection UI showing for Moreminimore:
# Update the UI source scripts/update-and-debrand.sh update_provider_settings_ui -
Build failures:
# Clean build with validation ./scripts/build-moreminimore-app.sh --clean-only ./scripts/build-moreminimore-app.sh --verbose
Backup and Recovery
All scripts create automatic backups:
# Backups are stored in:
dyad-backup-YYYYMMDD-HHMMSS/
# Restore from backup (integrate-custom-features.sh)
./scripts/integrate-custom-features.sh restore backup-20231201-120000
Testing the Integration
After running the scripts:
-
Start the application:
npm start -
Verify Moreminimore provider:
- Go to Settings → AI Providers
- Select "MoreMinimore AI"
- Should show simplified configuration (no model selection)
- Button should say "Setup Moreminimore AI"
-
Test API connection:
- Configure your Moreminimore API key
- Click "Setup Moreminimore AI"
- Try sending a chat message
- Should work without "Unsupported model provider" error
Script Maintenance
The scripts are designed to be:
- ✅ Idempotent: Safe to run multiple times
- ✅ Validating: Check for existing changes
- ✅ Backup-safe: Create backups before modifying
- ✅ Error-handling: Clear error messages and recovery options
Future Updates
When new features are added to Moreminimore:
- Update the relevant functions in
update-and-debrand.sh - Add validation in
build-moreminimore-app.sh - Update this documentation
Support
For issues with the scripts:
- Check the troubleshooting section above
- Review the script output for specific error messages
- Verify file permissions and directory structure
- Test with verbose output:
--verboseflag
The scripts are designed to handle most edge cases automatically and provide clear feedback when manual intervention is needed.