feat: rebrand from Dyad to MoreMinimore
- Update package.json description to reflect new branding - Add fix_chat_input function to update Pro URL references - Rename all Dyad-related functions and tags to MoreMinimore - Update test files to use new function names - Remove Pro restrictions from Annotator component - Update branding text throughout the application
This commit is contained in:
187
README-UPDATE-SCRIPT.md
Normal file
187
README-UPDATE-SCRIPT.md
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
# MoreMinimore Update and Debranding Script
|
||||||
|
|
||||||
|
This script (`scripts/update-and-debrand.sh`) automatically applies all custom features and removes Dyad branding/dependencies from the original Dyad codebase, converting it into MoreMinimore.
|
||||||
|
|
||||||
|
## 🚀 Features Applied
|
||||||
|
|
||||||
|
### Custom Features
|
||||||
|
- ✅ **Remove-limit feature** - Removes all usage limitations and restrictions
|
||||||
|
- ✅ **Smart Context for all users** - Previously Pro-only feature now available to everyone
|
||||||
|
- ✅ **Annotator tool for all users** - Previously Pro-only feature now available to everyone
|
||||||
|
- ✅ **No Pro upgrade buttons** - All Pro restrictions and upgrade prompts removed
|
||||||
|
|
||||||
|
### Debranding Changes
|
||||||
|
- ✅ **Dyad → MoreMinimore** - Complete branding transformation
|
||||||
|
- ✅ **Component names updated** - All Dyad* components renamed to MoreMinimore*
|
||||||
|
- ✅ **URLs updated** - All dyad.sh links changed to moreminimore.com
|
||||||
|
- ✅ **Protocol handlers** - Custom `moreminimore://` protocol instead of `dyad://`
|
||||||
|
- ✅ **App metadata** - Title bar and app information updated
|
||||||
|
|
||||||
|
### API Dependencies Removed
|
||||||
|
- ✅ **Dyad Template API** - Uses local templates only
|
||||||
|
- ✅ **Dyad Release Notes API** - Release notes check disabled
|
||||||
|
- ✅ **Dyad Auto-update API** - Auto-update functionality removed
|
||||||
|
- ✅ **Dyad Engine dependencies** - All Dyad Engine references removed
|
||||||
|
|
||||||
|
### UI/UX Improvements
|
||||||
|
- ✅ **YouTube video section removed** - Cleaner setup experience
|
||||||
|
- ✅ **ProBanner commented out** - No Pro promotion banners
|
||||||
|
- ✅ **ProModeSelector removed** - Simplified chat controls
|
||||||
|
- ✅ **Context Settings button** - Improved UI text
|
||||||
|
|
||||||
|
## 📋 Usage
|
||||||
|
|
||||||
|
### Quick Start
|
||||||
|
```bash
|
||||||
|
# Make the script executable
|
||||||
|
chmod +x scripts/update-and-debrand.sh
|
||||||
|
|
||||||
|
# Run the script
|
||||||
|
./scripts/update-and-debrand.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### What the Script Does
|
||||||
|
1. **Creates backup** - Automatic backup before making changes
|
||||||
|
2. **Applies custom features** - Enables remove-limit and other features
|
||||||
|
3. **Removes Dyad dependencies** - Eliminates all external API calls
|
||||||
|
4. **Updates branding** - Complete Dyad → MoreMinimore transformation
|
||||||
|
5. **Installs dependencies** - Updates package dependencies
|
||||||
|
6. **Tests compilation** - Verifies TypeScript compilation
|
||||||
|
|
||||||
|
### Safety Features
|
||||||
|
- ✅ **Automatic backup** - Creates timestamped backup directory
|
||||||
|
- ✅ **Error handling** - Script exits on any error
|
||||||
|
- ✅ **Compilation test** - Verifies code compiles successfully
|
||||||
|
- ✅ **Dependency check** - Ensures all dependencies are installed
|
||||||
|
|
||||||
|
## 🔄 Update Workflow
|
||||||
|
|
||||||
|
When you want to update your MoreMinimore with new features from the original Dyad repository:
|
||||||
|
|
||||||
|
1. **Pull latest changes** from upstream Dyad repository
|
||||||
|
2. **Run the script** to re-apply all customizations:
|
||||||
|
```bash
|
||||||
|
./scripts/update-and-debrand.sh
|
||||||
|
```
|
||||||
|
3. **Test the application** to ensure everything works:
|
||||||
|
```bash
|
||||||
|
npm start
|
||||||
|
```
|
||||||
|
4. **Commit changes** if everything works correctly
|
||||||
|
|
||||||
|
## 📁 Backup System
|
||||||
|
|
||||||
|
The script creates automatic backups with timestamp:
|
||||||
|
```
|
||||||
|
dyad-backup-YYYYMMDD-HHMMSS/
|
||||||
|
├── src/ # Source code backup
|
||||||
|
├── package.json # Package configuration
|
||||||
|
└── scripts/ # Scripts backup
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🛠️ Technical Details
|
||||||
|
|
||||||
|
### Files Modified
|
||||||
|
- `src/custom/index.ts` - Custom feature flags
|
||||||
|
- `src/ipc/utils/template_utils.ts` - Template API removal
|
||||||
|
- `src/ipc/handlers/release_note_handlers.ts` - Release notes API removal
|
||||||
|
- `src/main.ts` - Auto-update and protocol handler updates
|
||||||
|
- `src/ipc/utils/get_model_client.ts` - Dyad Engine removal
|
||||||
|
- `src/ipc/ipc_host.ts` - Pro handlers removal
|
||||||
|
- `src/preload.ts` - Pro IPC channels removal
|
||||||
|
- `src/components/ChatInputControls.tsx` - ProModeSelector removal
|
||||||
|
- `src/pages/home.tsx` - ProBanner commenting
|
||||||
|
- `src/ipc/utils/smart_context_store.ts` - Smart context liberation
|
||||||
|
- `src/ipc/shared/language_model_constants.ts` - Provider updates
|
||||||
|
- `src/components/SetupBanner.tsx` - YouTube section removal
|
||||||
|
- `src/app/TitleBar.tsx` - Title bar branding
|
||||||
|
- `package.json` - App description
|
||||||
|
- All component files - Dyad → MoreMinimore renaming
|
||||||
|
- All files - URL updates and branding text
|
||||||
|
|
||||||
|
### Key Features Liberated
|
||||||
|
1. **Smart Context** - Advanced context management for all users
|
||||||
|
2. **Annotator Tool** - Visual editing and annotation capabilities
|
||||||
|
3. **Unlimited Usage** - No message limits or restrictions
|
||||||
|
4. **Full Feature Access** - All Pro features available to everyone
|
||||||
|
|
||||||
|
## 🎯 Benefits
|
||||||
|
|
||||||
|
### For Users
|
||||||
|
- **No limitations** - Unlimited access to all features
|
||||||
|
- **Better privacy** - No external API calls to Dyad services
|
||||||
|
- **Full functionality** - All Pro features available
|
||||||
|
- **Clean interface** - No upgrade prompts or restrictions
|
||||||
|
|
||||||
|
### For Developers
|
||||||
|
- **Easy updates** - Single script to re-apply all changes
|
||||||
|
- **Safe modifications** - Automatic backup system
|
||||||
|
- **Maintainable** - Clear separation of custom features
|
||||||
|
- **Extensible** - Easy to add new custom features
|
||||||
|
|
||||||
|
## 🔧 Troubleshooting
|
||||||
|
|
||||||
|
### Common Issues
|
||||||
|
|
||||||
|
#### TypeScript Compilation Errors
|
||||||
|
```bash
|
||||||
|
# Check TypeScript compilation
|
||||||
|
npm run ts
|
||||||
|
|
||||||
|
# If errors occur, check the backup and restore if needed
|
||||||
|
cp -r dyad-backup-YYYYMMDD-HHMMSS/src ./src
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Application Won't Start
|
||||||
|
```bash
|
||||||
|
# Check dependencies
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# Rebuild the application
|
||||||
|
npm run rebuild
|
||||||
|
|
||||||
|
# Check logs for specific errors
|
||||||
|
npm start
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Script Permissions
|
||||||
|
```bash
|
||||||
|
# Make script executable
|
||||||
|
chmod +x scripts/update-and-debrand.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manual Recovery
|
||||||
|
If something goes wrong, you can always restore from the backup:
|
||||||
|
```bash
|
||||||
|
# Find your backup directory
|
||||||
|
ls dyad-backup-*
|
||||||
|
|
||||||
|
# Restore from backup
|
||||||
|
cp -r dyad-backup-YYYYMMDD-HHMMSS/src ./src
|
||||||
|
cp dyad-backup-YYYYMMDD-HHMMSS/package.json ./package.json
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📝 Customization
|
||||||
|
|
||||||
|
### Adding New Custom Features
|
||||||
|
1. Add your feature flag to `src/custom/index.ts`
|
||||||
|
2. Implement the feature in the appropriate files
|
||||||
|
3. Update the script to apply your changes automatically
|
||||||
|
|
||||||
|
### Modifying the Script
|
||||||
|
The script is organized into clear functions:
|
||||||
|
- `apply_custom_features()` - Apply custom modifications
|
||||||
|
- `remove_dyad_apis()` - Remove external dependencies
|
||||||
|
- `update_branding()` - Update branding and names
|
||||||
|
- `remove_pro_features()` - Remove Pro restrictions
|
||||||
|
|
||||||
|
## 🎉 Result
|
||||||
|
|
||||||
|
After running the script, you'll have:
|
||||||
|
- **MoreMinimore** - Fully branded application
|
||||||
|
- **No limitations** - All features available to all users
|
||||||
|
- **No external dependencies** - Complete independence from Dyad APIs
|
||||||
|
- **Clean interface** - No Pro upgrade prompts or restrictions
|
||||||
|
- **Easy updates** - Simple script to re-apply changes
|
||||||
|
|
||||||
|
The application will be ready to use with all custom features enabled and no Dyad branding or dependencies.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "moreminimore",
|
"name": "moreminimore",
|
||||||
"productName": "moreminimore",
|
"productName": "moreminimore",
|
||||||
"version": "0.31.0-beta.1",
|
"version": "0.31.0-beta.1",
|
||||||
"description": "Free, local, open-source AI app builder",
|
"description": "MoreMinimore - AI-powered development environment",
|
||||||
"main": ".vite/build/main.js",
|
"main": ".vite/build/main.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -156,15 +156,8 @@ remove_pro_features() {
|
|||||||
|
|
||||||
# Remove Pro restrictions from PreviewIframe (Annotator)
|
# Remove Pro restrictions from PreviewIframe (Annotator)
|
||||||
if [ -f "src/components/preview_panel/PreviewIframe.tsx" ]; then
|
if [ -f "src/components/preview_panel/PreviewIframe.tsx" ]; then
|
||||||
sed -i.bak '/import { AnnotatorOnlyForPro } from ".\/AnnotatorOnlyForPro";/d' src/components/preview_panel/PreviewIframe.tsx
|
# The file already uses Annotator directly, no Pro restrictions to remove
|
||||||
sed -i.bak '/{userBudget ? (/,/)} : (/,/<AnnotatorOnlyForPro/,/)}\/>/c\
|
print_success "Annotator already available for all users"
|
||||||
<Annotator\
|
|
||||||
screenshotUrl={screenshotDataUrl}\
|
|
||||||
onSubmit={addAttachments}\
|
|
||||||
handleAnnotatorClick={handleAnnotatorClick}\
|
|
||||||
/>' src/components/preview_panel/PreviewIframe.tsx
|
|
||||||
rm src/components/preview_panel/PreviewIframe.tsx.bak
|
|
||||||
print_success "Removed Pro restrictions from Annotator"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Comment out ProBanner in home.tsx
|
# Comment out ProBanner in home.tsx
|
||||||
@@ -314,6 +307,18 @@ remove_youtube_section() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to fix ChatInput.tsx references
|
||||||
|
fix_chat_input() {
|
||||||
|
print_status "Fixing ChatInput.tsx references..."
|
||||||
|
|
||||||
|
if [ -f "src/components/chat/ChatInput.tsx" ]; then
|
||||||
|
# Update the Pro URL
|
||||||
|
sed -i.bak 's|https://dyad.sh/pro|https://moreminimore.com/pro|g' src/components/chat/ChatInput.tsx
|
||||||
|
rm src/components/chat/ChatInput.tsx.bak
|
||||||
|
print_success "Fixed ChatInput.tsx references"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Function to update title bar and app metadata
|
# Function to update title bar and app metadata
|
||||||
update_app_metadata() {
|
update_app_metadata() {
|
||||||
print_status "Updating app metadata..."
|
print_status "Updating app metadata..."
|
||||||
@@ -400,6 +405,7 @@ main() {
|
|||||||
update_branding_text
|
update_branding_text
|
||||||
update_ai_providers
|
update_ai_providers
|
||||||
remove_youtube_section
|
remove_youtube_section
|
||||||
|
fix_chat_input
|
||||||
update_app_metadata
|
update_app_metadata
|
||||||
cleanup_imports
|
cleanup_imports
|
||||||
install_dependencies
|
install_dependencies
|
||||||
@@ -420,6 +426,7 @@ main() {
|
|||||||
echo "✅ Updated branding text throughout app"
|
echo "✅ Updated branding text throughout app"
|
||||||
echo "✅ Updated AI provider settings"
|
echo "✅ Updated AI provider settings"
|
||||||
echo "✅ Removed YouTube video section"
|
echo "✅ Removed YouTube video section"
|
||||||
|
echo "✅ Fixed ChatInput.tsx references"
|
||||||
echo "✅ Updated app metadata and title bar"
|
echo "✅ Updated app metadata and title bar"
|
||||||
echo "✅ Cleaned up unused imports"
|
echo "✅ Cleaned up unused imports"
|
||||||
echo "✅ Installed dependencies"
|
echo "✅ Installed dependencies"
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import { describe, it, expect, vi, beforeEach } from "vitest";
|
import { describe, it, expect, vi, beforeEach } from "vitest";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getDyadWriteTags,
|
getMoreMinimoreWriteTags,
|
||||||
getDyadRenameTags,
|
getMoreMinimoreRenameTags,
|
||||||
getDyadAddDependencyTags,
|
getMoreMinimoreAddDependencyTags,
|
||||||
getDyadDeleteTags,
|
getMoreMinimoreDeleteTags,
|
||||||
} from "../ipc/utils/dyad_tag_parser";
|
} from "../ipc/utils/dyad_tag_parser";
|
||||||
|
|
||||||
import { processFullResponseActions } from "../ipc/processors/response_processor";
|
import { processFullResponseActions } from "../ipc/processors/response_processor";
|
||||||
import {
|
import {
|
||||||
removeDyadTags,
|
removeMoreMinimoreTags,
|
||||||
hasUnclosedDyadWrite,
|
hasUnclosedMoreMinimoreWrite,
|
||||||
} from "../ipc/handlers/chat_stream_handlers";
|
} from "../ipc/handlers/chat_stream_handlers";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import { db } from "../db";
|
import { db } from "../db";
|
||||||
@@ -58,9 +58,9 @@ vi.mock("../ipc/utils/git_utils", () => ({
|
|||||||
getGitUncommittedFiles: vi.fn().mockResolvedValue([]),
|
getGitUncommittedFiles: vi.fn().mockResolvedValue([]),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Mock paths module to control getDyadAppPath
|
// Mock paths module to control getMoreMinimoreAppPath
|
||||||
vi.mock("../paths/paths", () => ({
|
vi.mock("../paths/paths", () => ({
|
||||||
getDyadAppPath: vi.fn().mockImplementation((appPath) => {
|
getMoreMinimoreAppPath: vi.fn().mockImplementation((appPath) => {
|
||||||
return `/mock/user/data/path/${appPath}`;
|
return `/mock/user/data/path/${appPath}`;
|
||||||
}),
|
}),
|
||||||
getUserDataPath: vi.fn().mockReturnValue("/mock/user/data/path"),
|
getUserDataPath: vi.fn().mockReturnValue("/mock/user/data/path"),
|
||||||
@@ -85,49 +85,49 @@ vi.mock("../db", () => ({
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe("getDyadAddDependencyTags", () => {
|
describe("getMoreMinimoreAddDependencyTags", () => {
|
||||||
it("should return an empty array when no dyad-add-dependency tags are found", () => {
|
it("should return an empty array when no dyad-add-dependency tags are found", () => {
|
||||||
const result = getDyadAddDependencyTags("No dyad-add-dependency tags here");
|
const result = getMoreMinimoreAddDependencyTags("No dyad-add-dependency tags here");
|
||||||
expect(result).toEqual([]);
|
expect(result).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return an array of dyad-add-dependency tags", () => {
|
it("should return an array of dyad-add-dependency tags", () => {
|
||||||
const result = getDyadAddDependencyTags(
|
const result = getMoreMinimoreAddDependencyTags(
|
||||||
`<dyad-add-dependency packages="uuid"></dyad-add-dependency>`,
|
`<dyad-add-dependency packages="uuid"></dyad-add-dependency>`,
|
||||||
);
|
);
|
||||||
expect(result).toEqual(["uuid"]);
|
expect(result).toEqual(["uuid"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return all the packages in the dyad-add-dependency tags", () => {
|
it("should return all the packages in the dyad-add-dependency tags", () => {
|
||||||
const result = getDyadAddDependencyTags(
|
const result = getMoreMinimoreAddDependencyTags(
|
||||||
`<dyad-add-dependency packages="pkg1 pkg2"></dyad-add-dependency>`,
|
`<dyad-add-dependency packages="pkg1 pkg2"></dyad-add-dependency>`,
|
||||||
);
|
);
|
||||||
expect(result).toEqual(["pkg1", "pkg2"]);
|
expect(result).toEqual(["pkg1", "pkg2"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return all the packages in the dyad-add-dependency tags", () => {
|
it("should return all the packages in the dyad-add-dependency tags", () => {
|
||||||
const result = getDyadAddDependencyTags(
|
const result = getMoreMinimoreAddDependencyTags(
|
||||||
`txt before<dyad-add-dependency packages="pkg1 pkg2"></dyad-add-dependency>text after`,
|
`txt before<dyad-add-dependency packages="pkg1 pkg2"></dyad-add-dependency>text after`,
|
||||||
);
|
);
|
||||||
expect(result).toEqual(["pkg1", "pkg2"]);
|
expect(result).toEqual(["pkg1", "pkg2"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return all the packages in multiple dyad-add-dependency tags", () => {
|
it("should return all the packages in multiple dyad-add-dependency tags", () => {
|
||||||
const result = getDyadAddDependencyTags(
|
const result = getMoreMinimoreAddDependencyTags(
|
||||||
`txt before<dyad-add-dependency packages="pkg1 pkg2"></dyad-add-dependency>txt between<dyad-add-dependency packages="pkg3"></dyad-add-dependency>text after`,
|
`txt before<dyad-add-dependency packages="pkg1 pkg2"></dyad-add-dependency>txt between<dyad-add-dependency packages="pkg3"></dyad-add-dependency>text after`,
|
||||||
);
|
);
|
||||||
expect(result).toEqual(["pkg1", "pkg2", "pkg3"]);
|
expect(result).toEqual(["pkg1", "pkg2", "pkg3"]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe("getDyadWriteTags", () => {
|
describe("getMoreMinimoreWriteTags", () => {
|
||||||
it("should return an empty array when no dyad-write tags are found", () => {
|
it("should return an empty array when no dyad-write tags are found", () => {
|
||||||
const result = getDyadWriteTags("No dyad-write tags here");
|
const result = getMoreMinimoreWriteTags("No dyad-write tags here");
|
||||||
expect(result).toEqual([]);
|
expect(result).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return a dyad-write tag", () => {
|
it("should return a dyad-write tag", () => {
|
||||||
const result =
|
const result =
|
||||||
getDyadWriteTags(`<dyad-write path="src/components/TodoItem.tsx" description="Creating a component for individual todo items">
|
getMoreMinimoreWriteTags(`<dyad-write path="src/components/TodoItem.tsx" description="Creating a component for individual todo items">
|
||||||
import React from "react";
|
import React from "react";
|
||||||
console.log("TodoItem");
|
console.log("TodoItem");
|
||||||
</dyad-write>`);
|
</dyad-write>`);
|
||||||
@@ -143,7 +143,7 @@ console.log("TodoItem");`,
|
|||||||
|
|
||||||
it("should strip out code fence (if needed) from a dyad-write tag", () => {
|
it("should strip out code fence (if needed) from a dyad-write tag", () => {
|
||||||
const result =
|
const result =
|
||||||
getDyadWriteTags(`<dyad-write path="src/components/TodoItem.tsx" description="Creating a component for individual todo items">
|
getMoreMinimoreWriteTags(`<dyad-write path="src/components/TodoItem.tsx" description="Creating a component for individual todo items">
|
||||||
\`\`\`tsx
|
\`\`\`tsx
|
||||||
import React from "react";
|
import React from "react";
|
||||||
console.log("TodoItem");
|
console.log("TodoItem");
|
||||||
@@ -161,7 +161,7 @@ console.log("TodoItem");`,
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should handle missing description", () => {
|
it("should handle missing description", () => {
|
||||||
const result = getDyadWriteTags(`
|
const result = getMoreMinimoreWriteTags(`
|
||||||
<dyad-write path="src/pages/locations/neighborhoods/louisville/Highlands.tsx">
|
<dyad-write path="src/pages/locations/neighborhoods/louisville/Highlands.tsx">
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
</dyad-write>
|
</dyad-write>
|
||||||
@@ -176,7 +176,7 @@ import React from 'react';
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should handle extra space", () => {
|
it("should handle extra space", () => {
|
||||||
const result = getDyadWriteTags(
|
const result = getMoreMinimoreWriteTags(
|
||||||
cleanFullResponse(`
|
cleanFullResponse(`
|
||||||
<dyad-write path="src/pages/locations/neighborhoods/louisville/Highlands.tsx" description="Updating Highlands neighborhood page to use <a> tags." >
|
<dyad-write path="src/pages/locations/neighborhoods/louisville/Highlands.tsx" description="Updating Highlands neighborhood page to use <a> tags." >
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
@@ -193,7 +193,7 @@ import React from 'react';
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should handle nested tags", () => {
|
it("should handle nested tags", () => {
|
||||||
const result = getDyadWriteTags(
|
const result = getMoreMinimoreWriteTags(
|
||||||
cleanFullResponse(`
|
cleanFullResponse(`
|
||||||
BEFORE TAG
|
BEFORE TAG
|
||||||
<dyad-write path="src/pages/locations/neighborhoods/louisville/Highlands.tsx" description="Updating Highlands neighborhood page to use <a> tags.">
|
<dyad-write path="src/pages/locations/neighborhoods/louisville/Highlands.tsx" description="Updating Highlands neighborhood page to use <a> tags.">
|
||||||
@@ -223,7 +223,7 @@ AFTER TAG
|
|||||||
|
|
||||||
const cleanedInput = cleanFullResponse(inputWithNestedTags);
|
const cleanedInput = cleanFullResponse(inputWithNestedTags);
|
||||||
|
|
||||||
const result = getDyadWriteTags(cleanedInput);
|
const result = getMoreMinimoreWriteTags(cleanedInput);
|
||||||
expect(result).toEqual([
|
expect(result).toEqual([
|
||||||
{
|
{
|
||||||
path: "src/pages/locations/neighborhoods/louisville/Highlands.tsx",
|
path: "src/pages/locations/neighborhoods/louisville/Highlands.tsx",
|
||||||
@@ -238,7 +238,7 @@ AFTER TAG
|
|||||||
|
|
||||||
// This simulates what cleanFullResponse should do
|
// This simulates what cleanFullResponse should do
|
||||||
const cleanedInput = cleanFullResponse(inputWithMultipleNestedTags);
|
const cleanedInput = cleanFullResponse(inputWithMultipleNestedTags);
|
||||||
const result = getDyadWriteTags(cleanedInput);
|
const result = getMoreMinimoreWriteTags(cleanedInput);
|
||||||
expect(result).toEqual([
|
expect(result).toEqual([
|
||||||
{
|
{
|
||||||
path: "src/file.tsx",
|
path: "src/file.tsx",
|
||||||
@@ -254,7 +254,7 @@ AFTER TAG
|
|||||||
// This simulates what cleanFullResponse should do
|
// This simulates what cleanFullResponse should do
|
||||||
const cleanedInput = cleanFullResponse(inputWithNestedInMultipleAttrs);
|
const cleanedInput = cleanFullResponse(inputWithNestedInMultipleAttrs);
|
||||||
|
|
||||||
const result = getDyadWriteTags(cleanedInput);
|
const result = getMoreMinimoreWriteTags(cleanedInput);
|
||||||
expect(result).toEqual([
|
expect(result).toEqual([
|
||||||
{
|
{
|
||||||
path: "src/<component>.tsx",
|
path: "src/<component>.tsx",
|
||||||
@@ -265,7 +265,7 @@ AFTER TAG
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should return an array of dyad-write tags", () => {
|
it("should return an array of dyad-write tags", () => {
|
||||||
const result = getDyadWriteTags(
|
const result = getMoreMinimoreWriteTags(
|
||||||
`I'll create a simple todo list app using React, TypeScript, and shadcn/ui components. Let's get started!
|
`I'll create a simple todo list app using React, TypeScript, and shadcn/ui components. Let's get started!
|
||||||
|
|
||||||
First, I'll create the necessary files for our todo list application:
|
First, I'll create the necessary files for our todo list application:
|
||||||
@@ -597,14 +597,14 @@ I've created a complete todo list application with the ability to add, complete,
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("getDyadRenameTags", () => {
|
describe("getMoreMinimoreRenameTags", () => {
|
||||||
it("should return an empty array when no dyad-rename tags are found", () => {
|
it("should return an empty array when no dyad-rename tags are found", () => {
|
||||||
const result = getDyadRenameTags("No dyad-rename tags here");
|
const result = getMoreMinimoreRenameTags("No dyad-rename tags here");
|
||||||
expect(result).toEqual([]);
|
expect(result).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return an array of dyad-rename tags", () => {
|
it("should return an array of dyad-rename tags", () => {
|
||||||
const result = getDyadRenameTags(
|
const result = getMoreMinimoreRenameTags(
|
||||||
`<dyad-rename from="src/components/UserProfile.jsx" to="src/components/ProfileCard.jsx"></dyad-rename>
|
`<dyad-rename from="src/components/UserProfile.jsx" to="src/components/ProfileCard.jsx"></dyad-rename>
|
||||||
<dyad-rename from="src/utils/helpers.js" to="src/utils/utils.js"></dyad-rename>`,
|
<dyad-rename from="src/utils/helpers.js" to="src/utils/utils.js"></dyad-rename>`,
|
||||||
);
|
);
|
||||||
@@ -618,14 +618,14 @@ describe("getDyadRenameTags", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("getDyadDeleteTags", () => {
|
describe("getMoreMinimoreDeleteTags", () => {
|
||||||
it("should return an empty array when no dyad-delete tags are found", () => {
|
it("should return an empty array when no dyad-delete tags are found", () => {
|
||||||
const result = getDyadDeleteTags("No dyad-delete tags here");
|
const result = getMoreMinimoreDeleteTags("No dyad-delete tags here");
|
||||||
expect(result).toEqual([]);
|
expect(result).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return an array of dyad-delete paths", () => {
|
it("should return an array of dyad-delete paths", () => {
|
||||||
const result = getDyadDeleteTags(
|
const result = getMoreMinimoreDeleteTags(
|
||||||
`<dyad-delete path="src/components/Analytics.jsx"></dyad-delete>
|
`<dyad-delete path="src/components/Analytics.jsx"></dyad-delete>
|
||||||
<dyad-delete path="src/utils/unused.js"></dyad-delete>`,
|
<dyad-delete path="src/utils/unused.js"></dyad-delete>`,
|
||||||
);
|
);
|
||||||
@@ -963,39 +963,39 @@ describe("processFullResponse", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("removeDyadTags", () => {
|
describe("removeMoreMinimoreTags", () => {
|
||||||
it("should return empty string when input is empty", () => {
|
it("should return empty string when input is empty", () => {
|
||||||
const result = removeDyadTags("");
|
const result = removeMoreMinimoreTags("");
|
||||||
expect(result).toBe("");
|
expect(result).toBe("");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return the same text when no dyad tags are present", () => {
|
it("should return the same text when no dyad tags are present", () => {
|
||||||
const text = "This is a regular text without any dyad tags.";
|
const text = "This is a regular text without any dyad tags.";
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe(text);
|
expect(result).toBe(text);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should remove a single dyad-write tag", () => {
|
it("should remove a single dyad-write tag", () => {
|
||||||
const text = `Before text <dyad-write path="src/file.js">console.log('hello');</dyad-write> After text`;
|
const text = `Before text <dyad-write path="src/file.js">console.log('hello');</dyad-write> After text`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("Before text After text");
|
expect(result).toBe("Before text After text");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should remove a single dyad-delete tag", () => {
|
it("should remove a single dyad-delete tag", () => {
|
||||||
const text = `Before text <dyad-delete path="src/file.js"></dyad-delete> After text`;
|
const text = `Before text <dyad-delete path="src/file.js"></dyad-delete> After text`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("Before text After text");
|
expect(result).toBe("Before text After text");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should remove a single dyad-rename tag", () => {
|
it("should remove a single dyad-rename tag", () => {
|
||||||
const text = `Before text <dyad-rename from="old.js" to="new.js"></dyad-rename> After text`;
|
const text = `Before text <dyad-rename from="old.js" to="new.js"></dyad-rename> After text`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("Before text After text");
|
expect(result).toBe("Before text After text");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should remove multiple different dyad tags", () => {
|
it("should remove multiple different dyad tags", () => {
|
||||||
const text = `Start <dyad-write path="file1.js">code here</dyad-write> middle <dyad-delete path="file2.js"></dyad-delete> end <dyad-rename from="old.js" to="new.js"></dyad-rename> finish`;
|
const text = `Start <dyad-write path="file1.js">code here</dyad-write> middle <dyad-delete path="file2.js"></dyad-delete> end <dyad-rename from="old.js" to="new.js"></dyad-rename> finish`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("Start middle end finish");
|
expect(result).toBe("Start middle end finish");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1011,19 +1011,19 @@ const Component = () => {
|
|||||||
export default Component;
|
export default Component;
|
||||||
</dyad-write>
|
</dyad-write>
|
||||||
After`;
|
After`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("Before\n\nAfter");
|
expect(result).toBe("Before\n\nAfter");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle dyad tags with complex attributes", () => {
|
it("should handle dyad tags with complex attributes", () => {
|
||||||
const text = `Text <dyad-write path="src/file.js" description="Complex component with quotes" version="1.0">const x = "hello world";</dyad-write> more text`;
|
const text = `Text <dyad-write path="src/file.js" description="Complex component with quotes" version="1.0">const x = "hello world";</dyad-write> more text`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("Text more text");
|
expect(result).toBe("Text more text");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should remove dyad tags and trim whitespace", () => {
|
it("should remove dyad tags and trim whitespace", () => {
|
||||||
const text = ` <dyad-write path="file.js">code</dyad-write> `;
|
const text = ` <dyad-write path="file.js">code</dyad-write> `;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("");
|
expect(result).toBe("");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1032,19 +1032,19 @@ After`;
|
|||||||
const html = '<div>Hello</div>';
|
const html = '<div>Hello</div>';
|
||||||
const component = <Component />;
|
const component = <Component />;
|
||||||
</dyad-write>`;
|
</dyad-write>`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("");
|
expect(result).toBe("");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle self-closing dyad tags", () => {
|
it("should handle self-closing dyad tags", () => {
|
||||||
const text = `Before <dyad-delete path="file.js" /> After`;
|
const text = `Before <dyad-delete path="file.js" /> After`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe('Before <dyad-delete path="file.js" /> After');
|
expect(result).toBe('Before <dyad-delete path="file.js" /> After');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle malformed dyad tags gracefully", () => {
|
it("should handle malformed dyad tags gracefully", () => {
|
||||||
const text = `Before <dyad-write path="file.js">unclosed tag After`;
|
const text = `Before <dyad-write path="file.js">unclosed tag After`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe('Before <dyad-write path="file.js">unclosed tag After');
|
expect(result).toBe('Before <dyad-write path="file.js">unclosed tag After');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1053,51 +1053,51 @@ const component = <Component />;
|
|||||||
const regex = /<div[^>]*>.*?</div>/g;
|
const regex = /<div[^>]*>.*?</div>/g;
|
||||||
const special = "Special chars: @#$%^&*()[]{}|\\";
|
const special = "Special chars: @#$%^&*()[]{}|\\";
|
||||||
</dyad-write>`;
|
</dyad-write>`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("");
|
expect(result).toBe("");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle multiple dyad tags of the same type", () => {
|
it("should handle multiple dyad tags of the same type", () => {
|
||||||
const text = `<dyad-write path="file1.js">code1</dyad-write> between <dyad-write path="file2.js">code2</dyad-write>`;
|
const text = `<dyad-write path="file1.js">code1</dyad-write> between <dyad-write path="file2.js">code2</dyad-write>`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("between");
|
expect(result).toBe("between");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle dyad tags with custom tag names", () => {
|
it("should handle dyad tags with custom tag names", () => {
|
||||||
const text = `Before <dyad-custom-action param="value">content</dyad-custom-action> After`;
|
const text = `Before <dyad-custom-action param="value">content</dyad-custom-action> After`;
|
||||||
const result = removeDyadTags(text);
|
const result = removeMoreMinimoreTags(text);
|
||||||
expect(result).toBe("Before After");
|
expect(result).toBe("Before After");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("hasUnclosedDyadWrite", () => {
|
describe("hasUnclosedMoreMinimoreWrite", () => {
|
||||||
it("should return false when there are no dyad-write tags", () => {
|
it("should return false when there are no dyad-write tags", () => {
|
||||||
const text = "This is just regular text without any dyad tags.";
|
const text = "This is just regular text without any dyad tags.";
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return false when dyad-write tag is properly closed", () => {
|
it("should return false when dyad-write tag is properly closed", () => {
|
||||||
const text = `<dyad-write path="src/file.js">console.log('hello');</dyad-write>`;
|
const text = `<dyad-write path="src/file.js">console.log('hello');</dyad-write>`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return true when dyad-write tag is not closed", () => {
|
it("should return true when dyad-write tag is not closed", () => {
|
||||||
const text = `<dyad-write path="src/file.js">console.log('hello');`;
|
const text = `<dyad-write path="src/file.js">console.log('hello');`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(true);
|
expect(result).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return false when dyad-write tag with attributes is properly closed", () => {
|
it("should return false when dyad-write tag with attributes is properly closed", () => {
|
||||||
const text = `<dyad-write path="src/file.js" description="A test file">console.log('hello');</dyad-write>`;
|
const text = `<dyad-write path="src/file.js" description="A test file">console.log('hello');</dyad-write>`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return true when dyad-write tag with attributes is not closed", () => {
|
it("should return true when dyad-write tag with attributes is not closed", () => {
|
||||||
const text = `<dyad-write path="src/file.js" description="A test file">console.log('hello');`;
|
const text = `<dyad-write path="src/file.js" description="A test file">console.log('hello');`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(true);
|
expect(result).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1105,7 +1105,7 @@ describe("hasUnclosedDyadWrite", () => {
|
|||||||
const text = `<dyad-write path="src/file1.js">code1</dyad-write>
|
const text = `<dyad-write path="src/file1.js">code1</dyad-write>
|
||||||
Some text in between
|
Some text in between
|
||||||
<dyad-write path="src/file2.js">code2</dyad-write>`;
|
<dyad-write path="src/file2.js">code2</dyad-write>`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1113,7 +1113,7 @@ describe("hasUnclosedDyadWrite", () => {
|
|||||||
const text = `<dyad-write path="src/file1.js">code1</dyad-write>
|
const text = `<dyad-write path="src/file1.js">code1</dyad-write>
|
||||||
Some text in between
|
Some text in between
|
||||||
<dyad-write path="src/file2.js">code2`;
|
<dyad-write path="src/file2.js">code2`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(true);
|
expect(result).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1121,7 +1121,7 @@ describe("hasUnclosedDyadWrite", () => {
|
|||||||
const text = `<dyad-write path="src/file1.js">code1
|
const text = `<dyad-write path="src/file1.js">code1
|
||||||
Some text in between
|
Some text in between
|
||||||
<dyad-write path="src/file2.js">code2</dyad-write>`;
|
<dyad-write path="src/file2.js">code2</dyad-write>`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1139,7 +1139,7 @@ const Component = () => {
|
|||||||
|
|
||||||
export default Component;
|
export default Component;
|
||||||
</dyad-write>`;
|
</dyad-write>`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1156,7 +1156,7 @@ const Component = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default Component;`;
|
export default Component;`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(true);
|
expect(result).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1165,7 +1165,7 @@ export default Component;`;
|
|||||||
const message = "Hello 'world'";
|
const message = "Hello 'world'";
|
||||||
const regex = /<div[^>]*>/g;
|
const regex = /<div[^>]*>/g;
|
||||||
</dyad-write>`;
|
</dyad-write>`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1173,7 +1173,7 @@ const regex = /<div[^>]*>/g;
|
|||||||
const text = `Some text before the tag
|
const text = `Some text before the tag
|
||||||
<dyad-write path="src/file.js">console.log('hello');</dyad-write>
|
<dyad-write path="src/file.js">console.log('hello');</dyad-write>
|
||||||
Some text after the tag`;
|
Some text after the tag`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1181,19 +1181,19 @@ Some text after the tag`;
|
|||||||
const text = `Some text before the tag
|
const text = `Some text before the tag
|
||||||
<dyad-write path="src/file.js">console.log('hello');
|
<dyad-write path="src/file.js">console.log('hello');
|
||||||
Some text after the unclosed tag`;
|
Some text after the unclosed tag`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(true);
|
expect(result).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle empty dyad-write tags", () => {
|
it("should handle empty dyad-write tags", () => {
|
||||||
const text = `<dyad-write path="src/file.js"></dyad-write>`;
|
const text = `<dyad-write path="src/file.js"></dyad-write>`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle unclosed empty dyad-write tags", () => {
|
it("should handle unclosed empty dyad-write tags", () => {
|
||||||
const text = `<dyad-write path="src/file.js">`;
|
const text = `<dyad-write path="src/file.js">`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(true);
|
expect(result).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1201,13 +1201,13 @@ Some text after the unclosed tag`;
|
|||||||
const text = `<dyad-write path="src/file1.js">completed content</dyad-write>
|
const text = `<dyad-write path="src/file1.js">completed content</dyad-write>
|
||||||
<dyad-write path="src/file2.js">unclosed content
|
<dyad-write path="src/file2.js">unclosed content
|
||||||
<dyad-write path="src/file3.js">final content</dyad-write>`;
|
<dyad-write path="src/file3.js">final content</dyad-write>`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle tags with special characters in attributes", () => {
|
it("should handle tags with special characters in attributes", () => {
|
||||||
const text = `<dyad-write path="src/file-name_with.special@chars.js" description="File with special chars in path">content</dyad-write>`;
|
const text = `<dyad-write path="src/file-name_with.special@chars.js" description="File with special chars in path">content</dyad-write>`;
|
||||||
const result = hasUnclosedDyadWrite(text);
|
const result = hasUnclosedMoreMinimoreWrite(text);
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ export function AppUpgrades({ appId }: { appId: number | null }) {
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
upgrade.manualUpgradeUrl ?? "https://dyad.sh/docs",
|
upgrade.manualUpgradeUrl ?? "https://moreminimore.com/docs",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
className="underline font-medium hover:dark:text-red-200"
|
className="underline font-medium hover:dark:text-red-200"
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ export function CapacitorControls({ appId }: CapacitorControlsProps) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
// TODO: Add actual help link
|
// TODO: Add actual help link
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://dyad.sh/docs/guides/mobile-app#troubleshooting",
|
"https://moreminimore.com/docs/guides/mobile-app#troubleshooting",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
className="text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 flex items-center gap-1"
|
className="text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 flex items-center gap-1"
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ function ConnectedGitHubConnector({
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://www.dyad.sh/docs/integrations/github#troubleshooting",
|
"https://www.moreminimore.com/docs/integrations/github#troubleshooting",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
className="cursor-pointer text-blue-600 hover:underline dark:text-blue-400"
|
className="cursor-pointer text-blue-600 hover:underline dark:text-blue-400"
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export function HelpDialog({ isOpen, onClose }: HelpDialogProps) {
|
|||||||
const selectedChatId = useAtomValue(selectedChatIdAtom);
|
const selectedChatId = useAtomValue(selectedChatIdAtom);
|
||||||
const { settings } = useSettings();
|
const { settings } = useSettings();
|
||||||
const { userBudget } = useUserBudgetInfo();
|
const { userBudget } = useUserBudgetInfo();
|
||||||
const isDyadProUser = settings?.providerSettings?.["auto"]?.apiKey?.value;
|
const isMoreMinimoreProUser = settings?.providerSettings?.["auto"]?.apiKey?.value;
|
||||||
|
|
||||||
// Function to reset all dialog state
|
// Function to reset all dialog state
|
||||||
const resetDialogState = () => {
|
const resetDialogState = () => {
|
||||||
@@ -118,7 +118,7 @@ ${debugInfo.logs.slice(-3_500) || "No logs available"}
|
|||||||
const encodedBody = encodeURIComponent(issueBody);
|
const encodedBody = encodeURIComponent(issueBody);
|
||||||
const encodedTitle = encodeURIComponent("[bug] <WRITE TITLE HERE>");
|
const encodedTitle = encodeURIComponent("[bug] <WRITE TITLE HERE>");
|
||||||
const labels = ["bug"];
|
const labels = ["bug"];
|
||||||
if (isDyadProUser) {
|
if (isMoreMinimoreProUser) {
|
||||||
labels.push("pro");
|
labels.push("pro");
|
||||||
}
|
}
|
||||||
const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=${labels}&body=${encodedBody}`;
|
const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=${labels}&body=${encodedBody}`;
|
||||||
@@ -243,7 +243,7 @@ Pro User ID: ${userBudget?.redactedUserId || "n/a"}
|
|||||||
const encodedBody = encodeURIComponent(issueBody);
|
const encodedBody = encodeURIComponent(issueBody);
|
||||||
const encodedTitle = encodeURIComponent("[session report] <add title>");
|
const encodedTitle = encodeURIComponent("[session report] <add title>");
|
||||||
const labels = ["support"];
|
const labels = ["support"];
|
||||||
if (isDyadProUser) {
|
if (isMoreMinimoreProUser) {
|
||||||
labels.push("pro");
|
labels.push("pro");
|
||||||
}
|
}
|
||||||
const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=${labels}&body=${encodedBody}`;
|
const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=${labels}&body=${encodedBody}`;
|
||||||
@@ -396,7 +396,7 @@ Pro User ID: ${userBudget?.redactedUserId || "n/a"}
|
|||||||
If you need help or want to report an issue, here are some options:
|
If you need help or want to report an issue, here are some options:
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
<div className="flex flex-col space-y-4 w-full">
|
<div className="flex flex-col space-y-4 w-full">
|
||||||
{isDyadProUser ? (
|
{isMoreMinimoreProUser ? (
|
||||||
<div className="flex flex-col space-y-2">
|
<div className="flex flex-col space-y-2">
|
||||||
<Button
|
<Button
|
||||||
variant="default"
|
variant="default"
|
||||||
@@ -419,7 +419,7 @@ Pro User ID: ${userBudget?.redactedUserId || "n/a"}
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://www.dyad.sh/docs",
|
"https://www.moreminimore.com/docs",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
className="w-full py-6 bg-(--background-lightest)"
|
className="w-full py-6 bg-(--background-lightest)"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { isDyadProEnabled, type LargeLanguageModel } from "@/lib/schemas";
|
import { isMoreMinimoreProEnabled, type LargeLanguageModel } from "@/lib/schemas";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
@@ -118,14 +118,14 @@ export function ModelPicker() {
|
|||||||
? modelsByProviders["auto"].filter((model) => {
|
? modelsByProviders["auto"].filter((model) => {
|
||||||
if (
|
if (
|
||||||
settings &&
|
settings &&
|
||||||
!isDyadProEnabled(settings) &&
|
!isMoreMinimoreProEnabled(settings) &&
|
||||||
["turbo", "value"].includes(model.apiName)
|
["turbo", "value"].includes(model.apiName)
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
settings &&
|
settings &&
|
||||||
isDyadProEnabled(settings) &&
|
isMoreMinimoreProEnabled(settings) &&
|
||||||
model.apiName === "free"
|
model.apiName === "free"
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
@@ -157,7 +157,7 @@ export function ModelPicker() {
|
|||||||
const provider = providers?.find((p) => p.id === providerId);
|
const provider = providers?.find((p) => p.id === providerId);
|
||||||
return !(provider && provider.secondary);
|
return !(provider && provider.secondary);
|
||||||
});
|
});
|
||||||
if (settings && isDyadProEnabled(settings)) {
|
if (settings && isMoreMinimoreProEnabled(settings)) {
|
||||||
primaryProviders.unshift(["auto", TURBO_MODELS]);
|
primaryProviders.unshift(["auto", TURBO_MODELS]);
|
||||||
}
|
}
|
||||||
const secondaryProviders = providerEntries.filter(([providerId, models]) => {
|
const secondaryProviders = providerEntries.filter(([providerId, models]) => {
|
||||||
@@ -270,7 +270,7 @@ export function ModelPicker() {
|
|||||||
// we will use the paid models (in MoreMinimore Pro backend) which
|
// we will use the paid models (in MoreMinimore Pro backend) which
|
||||||
// don't have the free limitations.
|
// don't have the free limitations.
|
||||||
if (
|
if (
|
||||||
isDyadProEnabled(settings) &&
|
isMoreMinimoreProEnabled(settings) &&
|
||||||
model.apiName.endsWith(":free")
|
model.apiName.endsWith(":free")
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
@@ -290,7 +290,7 @@ export function ModelPicker() {
|
|||||||
<span>{providerDisplayName}</span>
|
<span>{providerDisplayName}</span>
|
||||||
{provider?.type === "cloud" &&
|
{provider?.type === "cloud" &&
|
||||||
!provider?.secondary &&
|
!provider?.secondary &&
|
||||||
isDyadProEnabled(settings) && (
|
isMoreMinimoreProEnabled(settings) && (
|
||||||
<span className="text-[10px] bg-gradient-to-r from-indigo-600 via-indigo-500 to-indigo-600 bg-[length:200%_100%] animate-[shimmer_5s_ease-in-out_infinite] text-white px-1.5 py-0.5 rounded-full font-medium">
|
<span className="text-[10px] bg-gradient-to-r from-indigo-600 via-indigo-500 to-indigo-600 bg-[length:200%_100%] animate-[shimmer_5s_ease-in-out_infinite] text-white px-1.5 py-0.5 rounded-full font-medium">
|
||||||
Pro
|
Pro
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export const PortalMigrate = ({ appId }: PortalMigrateProps) => {
|
|||||||
const openDocs = () => {
|
const openDocs = () => {
|
||||||
const ipcClient = IpcClient.getInstance();
|
const ipcClient = IpcClient.getInstance();
|
||||||
ipcClient.openExternalUrl(
|
ipcClient.openExternalUrl(
|
||||||
"https://www.dyad.sh/docs/templates/portal#create-a-database-migration",
|
"https://www.moreminimore.com/docs/templates/portal#create-a-database-migration",
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ export function ProBanner() {
|
|||||||
return options[Math.floor(Math.random() * options.length)];
|
return options[Math.floor(Math.random() * options.length)];
|
||||||
});
|
});
|
||||||
|
|
||||||
if (settings?.enableDyadPro || userBudget) {
|
if (settings?.enableMoreMinimorePro || userBudget) {
|
||||||
return (
|
return (
|
||||||
<div className="mt-6 max-w-2xl mx-auto">
|
<div className="mt-6 max-w-2xl mx-auto">
|
||||||
<ManageDyadProButton />
|
<ManageMoreMinimoreProButton />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -38,12 +38,12 @@ export function ProBanner() {
|
|||||||
) : (
|
) : (
|
||||||
<TurboBanner />
|
<TurboBanner />
|
||||||
)}
|
)}
|
||||||
<SetupDyadProButton />
|
<SetupMoreMinimoreProButton />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ManageDyadProButton() {
|
export function ManageMoreMinimoreProButton() {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
@@ -61,7 +61,7 @@ export function ManageDyadProButton() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SetupDyadProButton() {
|
export function SetupMoreMinimoreProButton() {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
@@ -85,7 +85,7 @@ export function AiAccessBanner() {
|
|||||||
className="w-full py-2 sm:py-2.5 md:py-3 rounded-lg bg-gradient-to-br from-white via-indigo-50 to-sky-100 dark:from-indigo-700 dark:via-indigo-700 dark:to-indigo-900 flex items-center justify-center relative overflow-hidden ring-1 ring-inset ring-black/5 dark:ring-white/10 shadow-sm cursor-pointer transition-all duration-200 hover:shadow-md hover:-translate-y-[1px]"
|
className="w-full py-2 sm:py-2.5 md:py-3 rounded-lg bg-gradient-to-br from-white via-indigo-50 to-sky-100 dark:from-indigo-700 dark:via-indigo-700 dark:to-indigo-900 flex items-center justify-center relative overflow-hidden ring-1 ring-inset ring-black/5 dark:ring-white/10 shadow-sm cursor-pointer transition-all duration-200 hover:shadow-md hover:-translate-y-[1px]"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://www.dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=in-app-banner-ai-access",
|
"https://www.moreminimore.com/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=in-app-banner-ai-access",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -151,7 +151,7 @@ export function SmartContextBanner() {
|
|||||||
className="w-full py-2 sm:py-2.5 md:py-3 rounded-lg bg-gradient-to-br from-emerald-50 via-emerald-100 to-emerald-200 dark:from-emerald-700 dark:via-emerald-700 dark:to-emerald-900 flex items-center justify-center relative overflow-hidden ring-1 ring-inset ring-emerald-900/10 dark:ring-white/10 shadow-sm cursor-pointer transition-all duration-200 hover:shadow-md hover:-translate-y-[1px]"
|
className="w-full py-2 sm:py-2.5 md:py-3 rounded-lg bg-gradient-to-br from-emerald-50 via-emerald-100 to-emerald-200 dark:from-emerald-700 dark:via-emerald-700 dark:to-emerald-900 flex items-center justify-center relative overflow-hidden ring-1 ring-inset ring-emerald-900/10 dark:ring-white/10 shadow-sm cursor-pointer transition-all duration-200 hover:shadow-md hover:-translate-y-[1px]"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://www.dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=in-app-banner-smart-context",
|
"https://www.moreminimore.com/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=in-app-banner-smart-context",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -192,7 +192,7 @@ export function TurboBanner() {
|
|||||||
className="w-full py-2 sm:py-2.5 md:py-3 rounded-lg bg-gradient-to-br from-rose-50 via-rose-100 to-rose-200 dark:from-rose-800 dark:via-fuchsia-800 dark:to-rose-800 flex items-center justify-center relative overflow-hidden ring-1 ring-inset ring-rose-900/10 dark:ring-white/5 shadow-sm cursor-pointer transition-all duration-200 hover:shadow-md hover:-translate-y-[1px]"
|
className="w-full py-2 sm:py-2.5 md:py-3 rounded-lg bg-gradient-to-br from-rose-50 via-rose-100 to-rose-200 dark:from-rose-800 dark:via-fuchsia-800 dark:to-rose-800 flex items-center justify-center relative overflow-hidden ring-1 ring-inset ring-rose-900/10 dark:ring-white/5 shadow-sm cursor-pointer transition-all duration-200 hover:shadow-md hover:-translate-y-[1px]"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://www.dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=in-app-banner-turbo",
|
"https://www.moreminimore.com/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=in-app-banner-turbo",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { Label } from "@/components/ui/label";
|
|||||||
import { Sparkles, Info } from "lucide-react";
|
import { Sparkles, Info } from "lucide-react";
|
||||||
import { useSettings } from "@/hooks/useSettings";
|
import { useSettings } from "@/hooks/useSettings";
|
||||||
import { IpcClient } from "@/ipc/ipc_client";
|
import { IpcClient } from "@/ipc/ipc_client";
|
||||||
import { hasDyadProKey, type UserSettings } from "@/lib/schemas";
|
import { hasMoreMinimoreProKey, type UserSettings } from "@/lib/schemas";
|
||||||
|
|
||||||
export function ProModeSelector() {
|
export function ProModeSelector() {
|
||||||
const { settings, updateSettings } = useSettings();
|
const { settings, updateSettings } = useSettings();
|
||||||
@@ -53,12 +53,12 @@ export function ProModeSelector() {
|
|||||||
|
|
||||||
const toggleProEnabled = () => {
|
const toggleProEnabled = () => {
|
||||||
updateSettings({
|
updateSettings({
|
||||||
enableDyadPro: !settings?.enableDyadPro,
|
enableMoreMinimorePro: !settings?.enableMoreMinimorePro,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const hasProKey = settings ? hasDyadProKey(settings) : false;
|
const hasProKey = settings ? hasMoreMinimoreProKey(settings) : false;
|
||||||
const proModeTogglable = hasProKey && Boolean(settings?.enableDyadPro);
|
const proModeTogglable = hasProKey && Boolean(settings?.enableMoreMinimorePro);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover>
|
<Popover>
|
||||||
@@ -94,7 +94,7 @@ export function ProModeSelector() {
|
|||||||
className="inline-flex items-center justify-center gap-2 rounded-md border border-primary/30 bg-primary/10 px-3 py-2 text-sm font-medium text-primary shadow-sm transition-colors hover:bg-primary/20 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring cursor-pointer"
|
className="inline-flex items-center justify-center gap-2 rounded-md border border-primary/30 bg-primary/10 px-3 py-2 text-sm font-medium text-primary shadow-sm transition-colors hover:bg-primary/20 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://dyad.sh/pro#ai",
|
"https://moreminimore.com/pro#ai",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -113,7 +113,7 @@ export function ProModeSelector() {
|
|||||||
label="Enable MoreMinimore Pro"
|
label="Enable MoreMinimore Pro"
|
||||||
tooltip="Uses MoreMinimore Pro AI credits for the main AI model and Pro modes."
|
tooltip="Uses MoreMinimore Pro AI credits for the main AI model and Pro modes."
|
||||||
isTogglable={hasProKey}
|
isTogglable={hasProKey}
|
||||||
settingEnabled={Boolean(settings?.enableDyadPro)}
|
settingEnabled={Boolean(settings?.enableMoreMinimorePro)}
|
||||||
toggle={toggleProEnabled}
|
toggle={toggleProEnabled}
|
||||||
/>
|
/>
|
||||||
<SelectorRow
|
<SelectorRow
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export function ReleaseChannelSelector() {
|
|||||||
action: {
|
action: {
|
||||||
label: "Download Stable",
|
label: "Download Stable",
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
IpcClient.getInstance().openExternalUrl("https://dyad.sh/download");
|
IpcClient.getInstance().openExternalUrl("https://moreminimore.com/download");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import { useLanguageModelProviders } from "@/hooks/useLanguageModelProviders";
|
|||||||
import { useScrollAndNavigateTo } from "@/hooks/useScrollAndNavigateTo";
|
import { useScrollAndNavigateTo } from "@/hooks/useScrollAndNavigateTo";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import logo from "../../assets/logo.svg";
|
import logo from "../../assets/logo.svg";
|
||||||
// import { OnboardingBanner } from "./home/OnboardingBanner";
|
// // import { OnboardingBanner } from "./home/OnboardingBanner";
|
||||||
import { showError } from "@/lib/toast";
|
import { showError } from "@/lib/toast";
|
||||||
import { useSettings } from "@/hooks/useSettings";
|
import { useSettings } from "@/hooks/useSettings";
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ export function SetupBanner() {
|
|||||||
<p className="text-xl font-medium text-zinc-700 dark:text-zinc-300 p-4">
|
<p className="text-xl font-medium text-zinc-700 dark:text-zinc-300 p-4">
|
||||||
Setup MoreMinimore
|
Setup MoreMinimore
|
||||||
</p>
|
</p>
|
||||||
{/* <OnboardingBanner
|
{/* {/* <OnboardingBanner
|
||||||
isVisible={isOnboardingVisible}
|
isVisible={isOnboardingVisible}
|
||||||
setIsVisible={setIsOnboardingVisible}
|
setIsVisible={setIsOnboardingVisible}
|
||||||
/> */}
|
/> */}
|
||||||
@@ -374,7 +374,7 @@ function NodeJsHelpCallout() {
|
|||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://www.dyad.sh/docs/help/nodejs",
|
"https://www.moreminimore.com/docs/help/nodejs",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
className="text-blue-600 dark:text-blue-400 hover:underline font-medium"
|
className="text-blue-600 dark:text-blue-400 hover:underline font-medium"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export function PrivacyBanner() {
|
|||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://dyad.sh/docs/policies/privacy-policy",
|
"https://moreminimore.com/docs/policies/privacy-policy",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
className="cursor-pointer text-sm text-blue-600 dark:text-blue-400 hover:underline"
|
className="cursor-pointer text-sm text-blue-600 dark:text-blue-400 hover:underline"
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ import remarkGfm from "remark-gfm";
|
|||||||
export function ChatErrorBox({
|
export function ChatErrorBox({
|
||||||
onDismiss,
|
onDismiss,
|
||||||
error,
|
error,
|
||||||
isDyadProEnabled,
|
isMoreMinimoreProEnabled,
|
||||||
}: {
|
}: {
|
||||||
onDismiss: () => void;
|
onDismiss: () => void;
|
||||||
error: string;
|
error: string;
|
||||||
isDyadProEnabled: boolean;
|
isMoreMinimoreProEnabled: boolean;
|
||||||
}) {
|
}) {
|
||||||
if (error.includes("doesn't have a free quota tier")) {
|
if (error.includes("doesn't have a free quota tier")) {
|
||||||
return (
|
return (
|
||||||
@@ -23,7 +23,7 @@ export function ChatErrorBox({
|
|||||||
{error}
|
{error}
|
||||||
<span className="ml-1">
|
<span className="ml-1">
|
||||||
<ExternalLink
|
<ExternalLink
|
||||||
href="https://dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=free-quota-error"
|
href="https://moreminimore.com/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=free-quota-error"
|
||||||
variant="primary"
|
variant="primary"
|
||||||
>
|
>
|
||||||
Access with MoreMinimore Pro
|
Access with MoreMinimore Pro
|
||||||
@@ -41,7 +41,7 @@ export function ChatErrorBox({
|
|||||||
// show the upgrade to MoreMinimore Pro link in that case because they are
|
// show the upgrade to MoreMinimore Pro link in that case because they are
|
||||||
// already on the MoreMinimore Pro plan.
|
// already on the MoreMinimore Pro plan.
|
||||||
if (
|
if (
|
||||||
!isDyadProEnabled &&
|
!isMoreMinimoreProEnabled &&
|
||||||
(error.includes("Resource has been exhausted") ||
|
(error.includes("Resource has been exhausted") ||
|
||||||
error.includes("https://ai.google.dev/gemini-api/docs/rate-limits") ||
|
error.includes("https://ai.google.dev/gemini-api/docs/rate-limits") ||
|
||||||
error.includes("Provider returned error"))
|
error.includes("Provider returned error"))
|
||||||
@@ -51,13 +51,13 @@ export function ChatErrorBox({
|
|||||||
{error}
|
{error}
|
||||||
<div className="mt-2 space-y-2 space-x-2">
|
<div className="mt-2 space-y-2 space-x-2">
|
||||||
<ExternalLink
|
<ExternalLink
|
||||||
href="https://dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=rate-limit-error"
|
href="https://moreminimore.com/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=rate-limit-error"
|
||||||
variant="primary"
|
variant="primary"
|
||||||
>
|
>
|
||||||
Upgrade to MoreMinimore Pro
|
Upgrade to MoreMinimore Pro
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
|
|
||||||
<ExternalLink href="https://dyad.sh/docs/help/ai-rate-limit">
|
<ExternalLink href="https://moreminimore.com/docs/help/ai-rate-limit">
|
||||||
Troubleshooting guide
|
Troubleshooting guide
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
</div>
|
</div>
|
||||||
@@ -71,7 +71,7 @@ export function ChatErrorBox({
|
|||||||
<span>
|
<span>
|
||||||
Looks like you don't have a valid MoreMinimore Pro key.{" "}
|
Looks like you don't have a valid MoreMinimore Pro key.{" "}
|
||||||
<ExternalLink
|
<ExternalLink
|
||||||
href="https://dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=invalid-pro-key-error"
|
href="https://moreminimore.com/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=invalid-pro-key-error"
|
||||||
variant="primary"
|
variant="primary"
|
||||||
>
|
>
|
||||||
Upgrade to MoreMinimore Pro
|
Upgrade to MoreMinimore Pro
|
||||||
@@ -81,7 +81,7 @@ export function ChatErrorBox({
|
|||||||
</ChatInfoContainer>
|
</ChatInfoContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (isDyadProEnabled && error.includes("ExceededBudget:")) {
|
if (isMoreMinimoreProEnabled && error.includes("ExceededBudget:")) {
|
||||||
return (
|
return (
|
||||||
<ChatInfoContainer onDismiss={onDismiss}>
|
<ChatInfoContainer onDismiss={onDismiss}>
|
||||||
<span>
|
<span>
|
||||||
@@ -110,17 +110,17 @@ export function ChatErrorBox({
|
|||||||
<ChatErrorContainer onDismiss={onDismiss}>
|
<ChatErrorContainer onDismiss={onDismiss}>
|
||||||
{error}
|
{error}
|
||||||
<div className="mt-2 space-y-2 space-x-2">
|
<div className="mt-2 space-y-2 space-x-2">
|
||||||
{!isDyadProEnabled &&
|
{!isMoreMinimoreProEnabled &&
|
||||||
error.includes(AI_STREAMING_ERROR_MESSAGE_PREFIX) &&
|
error.includes(AI_STREAMING_ERROR_MESSAGE_PREFIX) &&
|
||||||
!error.includes("TypeError: terminated") && (
|
!error.includes("TypeError: terminated") && (
|
||||||
<ExternalLink
|
<ExternalLink
|
||||||
href="https://dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=general-error"
|
href="https://moreminimore.com/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=general-error"
|
||||||
variant="primary"
|
variant="primary"
|
||||||
>
|
>
|
||||||
Upgrade to MoreMinimore Pro
|
Upgrade to MoreMinimore Pro
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
)}
|
)}
|
||||||
<ExternalLink href="https://www.dyad.sh/docs/faq">
|
<ExternalLink href="https://www.moreminimore.com/docs/faq">
|
||||||
Read docs
|
Read docs
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ export function ChatInput({ chatId }: { chatId?: number }) {
|
|||||||
<ChatErrorBox
|
<ChatErrorBox
|
||||||
onDismiss={dismissError}
|
onDismiss={dismissError}
|
||||||
error={error}
|
error={error}
|
||||||
isDyadProEnabled={settings.enableDyadPro ?? false}
|
isMoreMinimoreProEnabled={settings.enableMoreMinimorePro ?? false}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{/* Display loading or error state for proposal */}
|
{/* Display loading or error state for proposal */}
|
||||||
@@ -356,7 +356,7 @@ export function ChatInput({ chatId }: { chatId?: number }) {
|
|||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://dyad.sh/pro",
|
"https://moreminimore.com/pro",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
className="flex items-center gap-2 text-sm text-muted-foreground hover:text-primary transition-colors cursor-pointer"
|
className="flex items-center gap-2 text-sm text-muted-foreground hover:text-primary transition-colors cursor-pointer"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { useAtomValue } from "jotai";
|
|||||||
import { isStreamingByIdAtom, selectedChatIdAtom } from "@/atoms/chatAtoms";
|
import { isStreamingByIdAtom, selectedChatIdAtom } from "@/atoms/chatAtoms";
|
||||||
import { CustomTagState } from "./stateTypes";
|
import { CustomTagState } from "./stateTypes";
|
||||||
import { MoreMinimoreOutput } from "./MoreMinimoreOutput";
|
import { MoreMinimoreOutput } from "./MoreMinimoreOutput";
|
||||||
import { DyadProblemSummary } from "./DyadProblemSummary";
|
import { MoreMinimoreProblemSummary } from "./MoreMinimoreProblemSummary";
|
||||||
import { IpcClient } from "@/ipc/ipc_client";
|
import { IpcClient } from "@/ipc/ipc_client";
|
||||||
import { MoreMinimoreMcpToolCall } from "./MoreMinimoreMcpToolCall";
|
import { MoreMinimoreMcpToolCall } from "./MoreMinimoreMcpToolCall";
|
||||||
import { MoreMinimoreMcpToolResult } from "./MoreMinimoreMcpToolResult";
|
import { MoreMinimoreMcpToolResult } from "./MoreMinimoreMcpToolResult";
|
||||||
@@ -586,9 +586,9 @@ function renderCustomTag(
|
|||||||
|
|
||||||
case "dyad-problem-report":
|
case "dyad-problem-report":
|
||||||
return (
|
return (
|
||||||
<DyadProblemSummary summary={attributes.summary}>
|
<MoreMinimoreProblemSummary summary={attributes.summary}>
|
||||||
{content}
|
{content}
|
||||||
</DyadProblemSummary>
|
</MoreMinimoreProblemSummary>
|
||||||
);
|
);
|
||||||
|
|
||||||
case "dyad-chat-summary":
|
case "dyad-chat-summary":
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import type { Problem } from "@/ipc/ipc_types";
|
|||||||
|
|
||||||
type ProblemWithoutSnippet = Omit<Problem, "snippet">;
|
type ProblemWithoutSnippet = Omit<Problem, "snippet">;
|
||||||
|
|
||||||
interface DyadProblemSummaryProps {
|
interface MoreMinimoreProblemSummaryProps {
|
||||||
summary?: string;
|
summary?: string;
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,7 @@ const ProblemItem: React.FC<ProblemItemProps> = ({ problem, index }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DyadProblemSummary: React.FC<DyadProblemSummaryProps> = ({
|
export const MoreMinimoreProblemSummary: React.FC<MoreMinimoreProblemSummaryProps> = ({
|
||||||
summary,
|
summary,
|
||||||
children,
|
children,
|
||||||
}) => {
|
}) => {
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ export const MessagesList = forwardRef<HTMLDivElement, MessagesListProps>(
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{isStreaming &&
|
{isStreaming &&
|
||||||
!settings?.enableDyadPro &&
|
!settings?.enableMoreMinimorePro &&
|
||||||
!userBudget &&
|
!userBudget &&
|
||||||
messages.length > 0 && (
|
messages.length > 0 && (
|
||||||
<PromoMessage
|
<PromoMessage
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export function Message({ spans }: MessageConfig) {
|
|||||||
export const TURBO_EDITS_PROMO_MESSAGE: MessageConfig = {
|
export const TURBO_EDITS_PROMO_MESSAGE: MessageConfig = {
|
||||||
spans: [
|
spans: [
|
||||||
{ type: "text", content: "Tired of waiting on AI?" },
|
{ type: "text", content: "Tired of waiting on AI?" },
|
||||||
{ type: "link", content: " Get MoreMinimore Pro", url: "https://dyad.sh/pro#ai" },
|
{ type: "link", content: " Get MoreMinimore Pro", url: "https://moreminimore.com/pro#ai" },
|
||||||
{ type: "text", content: " for faster edits with Turbo Edits." },
|
{ type: "text", content: " for faster edits with Turbo Edits." },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@@ -67,7 +67,7 @@ export const SMART_CONTEXT_PROMO_MESSAGE: MessageConfig = {
|
|||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
content: "MoreMinimore Pro's Smart Context",
|
content: "MoreMinimore Pro's Smart Context",
|
||||||
url: "https://dyad.sh/pro#ai",
|
url: "https://moreminimore.com/pro#ai",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@@ -138,12 +138,12 @@ export const DEBUGGING_TIPS_TIP: MessageConfig = {
|
|||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
content: "debugging tips",
|
content: "debugging tips",
|
||||||
url: "https://www.dyad.sh/docs/guides/debugging",
|
url: "https://www.moreminimore.com/docs/guides/debugging",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
// Advanced tip: Customize your AI rules https://www.dyad.sh/docs/guides/ai-rules
|
// Advanced tip: Customize your AI rules https://www.moreminimore.com/docs/guides/ai-rules
|
||||||
export const AI_RULES_TIP: MessageConfig = {
|
export const AI_RULES_TIP: MessageConfig = {
|
||||||
spans: [
|
spans: [
|
||||||
{
|
{
|
||||||
@@ -153,7 +153,7 @@ export const AI_RULES_TIP: MessageConfig = {
|
|||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
content: "AI rules",
|
content: "AI rules",
|
||||||
url: "https://www.dyad.sh/docs/guides/ai-rules",
|
url: "https://www.moreminimore.com/docs/guides/ai-rules",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@@ -167,7 +167,7 @@ export const NEW_CHAT_TIP: MessageConfig = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
// Want to know what's next? Checkout our roadmap https://www.dyad.sh/docs/roadmap
|
// Want to know what's next? Checkout our roadmap https://www.moreminimore.com/docs/roadmap
|
||||||
export const ROADMAP_TIP: MessageConfig = {
|
export const ROADMAP_TIP: MessageConfig = {
|
||||||
spans: [
|
spans: [
|
||||||
{
|
{
|
||||||
@@ -177,7 +177,7 @@ export const ROADMAP_TIP: MessageConfig = {
|
|||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
content: "roadmap",
|
content: "roadmap",
|
||||||
url: "https://www.dyad.sh/docs/roadmap",
|
url: "https://www.moreminimore.com/docs/roadmap",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -130,17 +130,17 @@ export function TokenBar({ chatId }: TokenBarProps) {
|
|||||||
<div className="text-red-500 text-xs mt-1">Failed to count tokens</div>
|
<div className="text-red-500 text-xs mt-1">Failed to count tokens</div>
|
||||||
)}
|
)}
|
||||||
{(!settings?.enableProSmartFilesContextMode ||
|
{(!settings?.enableProSmartFilesContextMode ||
|
||||||
!settings?.enableDyadPro) && (
|
!settings?.enableMoreMinimorePro) && (
|
||||||
<div className="text-xs text-center text-muted-foreground mt-2">
|
<div className="text-xs text-center text-muted-foreground mt-2">
|
||||||
Optimize your tokens with{" "}
|
Optimize your tokens with{" "}
|
||||||
<a
|
<a
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
settings?.enableDyadPro
|
settings?.enableMoreMinimorePro
|
||||||
? IpcClient.getInstance().openExternalUrl(
|
? IpcClient.getInstance().openExternalUrl(
|
||||||
"https://www.dyad.sh/docs/guides/ai-models/pro-modes#smart-context",
|
"https://www.moreminimore.com/docs/guides/ai-models/pro-modes#smart-context",
|
||||||
)
|
)
|
||||||
: IpcClient.getInstance().openExternalUrl(
|
: IpcClient.getInstance().openExternalUrl(
|
||||||
"https://dyad.sh/pro#ai",
|
"https://moreminimore.com/pro#ai",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
className="text-blue-500 dark:text-blue-400 cursor-pointer hover:underline"
|
className="text-blue-500 dark:text-blue-400 cursor-pointer hover:underline"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ interface AnnotatorOnlyForProProps {
|
|||||||
|
|
||||||
export const AnnotatorOnlyForPro = ({ onGoBack }: AnnotatorOnlyForProProps) => {
|
export const AnnotatorOnlyForPro = ({ onGoBack }: AnnotatorOnlyForProProps) => {
|
||||||
const handleGetPro = () => {
|
const handleGetPro = () => {
|
||||||
IpcClient.getInstance().openExternalUrl("https://dyad.sh/pro");
|
IpcClient.getInstance().openExternalUrl("https://moreminimore.com/pro");
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -251,7 +251,7 @@ function SecurityHeader({
|
|||||||
className="text-blue-600 dark:text-blue-400 hover:underline cursor-pointer"
|
className="text-blue-600 dark:text-blue-400 hover:underline cursor-pointer"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
IpcClient.getInstance().openExternalUrl(
|
IpcClient.getInstance().openExternalUrl(
|
||||||
"https://www.dyad.sh/docs/guides/security-review",
|
"https://www.moreminimore.com/docs/guides/security-review",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ export function ProviderSettingsPage({ provider }: ProviderSettingsPageProps) {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
if (isMoreMinimore) {
|
if (isMoreMinimore) {
|
||||||
settingsUpdate.enableDyadPro = true;
|
settingsUpdate.enableMoreMinimorePro = true;
|
||||||
}
|
}
|
||||||
await updateSettings(settingsUpdate);
|
await updateSettings(settingsUpdate);
|
||||||
setApiKeyInput(""); // Clear input on success
|
setApiKeyInput(""); // Clear input on success
|
||||||
@@ -175,11 +175,11 @@ export function ProviderSettingsPage({ provider }: ProviderSettingsPageProps) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// --- Toggle MoreMinimore Pro Handler ---
|
// --- Toggle MoreMinimore Pro Handler ---
|
||||||
const handleToggleDyadPro = async (enabled: boolean) => {
|
const handleToggleMoreMinimorePro = async (enabled: boolean) => {
|
||||||
setIsSaving(true);
|
setIsSaving(true);
|
||||||
try {
|
try {
|
||||||
await updateSettings({
|
await updateSettings({
|
||||||
enableDyadPro: enabled,
|
enableMoreMinimorePro: enabled,
|
||||||
});
|
});
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
showError(`Error toggling MoreMinimore Pro: ${error}`);
|
showError(`Error toggling MoreMinimore Pro: ${error}`);
|
||||||
@@ -320,8 +320,8 @@ export function ProviderSettingsPage({ provider }: ProviderSettingsPageProps) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Switch
|
<Switch
|
||||||
checked={settings?.enableDyadPro}
|
checked={settings?.enableMoreMinimorePro}
|
||||||
onCheckedChange={handleToggleDyadPro}
|
onCheckedChange={handleToggleMoreMinimorePro}
|
||||||
disabled={isSaving}
|
disabled={isSaving}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as schema from "./schema";
|
|||||||
import { migrate } from "drizzle-orm/better-sqlite3/migrator";
|
import { migrate } from "drizzle-orm/better-sqlite3/migrator";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import { getDyadAppPath, getUserDataPath } from "../paths/paths";
|
import { getMoreMinimoreAppPath, getUserDataPath } from "../paths/paths";
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
|
|
||||||
const logger = log.scope("db");
|
const logger = log.scope("db");
|
||||||
@@ -48,7 +48,7 @@ export function initializeDatabase(): BetterSQLite3Database<typeof schema> & {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fs.mkdirSync(getUserDataPath(), { recursive: true });
|
fs.mkdirSync(getUserDataPath(), { recursive: true });
|
||||||
fs.mkdirSync(getDyadAppPath("."), { recursive: true });
|
fs.mkdirSync(getMoreMinimoreAppPath("."), { recursive: true });
|
||||||
|
|
||||||
const sqlite = new Database(dbPath, { timeout: 10000 });
|
const sqlite = new Database(dbPath, { timeout: 10000 });
|
||||||
sqlite.pragma("foreign_keys = ON");
|
sqlite.pragma("foreign_keys = ON");
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ export const useCopyToClipboard = () => {
|
|||||||
|
|
||||||
const copyMessageContent = async (messageContent: string) => {
|
const copyMessageContent = async (messageContent: string) => {
|
||||||
try {
|
try {
|
||||||
// Use the same parsing logic as DyadMarkdownParser but convert to clean text
|
// Use the same parsing logic as MoreMinimoreMarkdownParser but convert to clean text
|
||||||
const formattedContent = convertDyadContentToMarkdown(messageContent);
|
const formattedContent = convertMoreMinimoreContentToMarkdown(messageContent);
|
||||||
|
|
||||||
// Copy to clipboard
|
// Copy to clipboard
|
||||||
await navigator.clipboard.writeText(formattedContent);
|
await navigator.clipboard.writeText(formattedContent);
|
||||||
@@ -50,11 +50,11 @@ export const useCopyToClipboard = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Convert Dyad content to clean markdown using the same parsing logic as DyadMarkdownParser
|
// Convert MoreMinimore content to clean markdown using the same parsing logic as MoreMinimoreMarkdownParser
|
||||||
const convertDyadContentToMarkdown = (content: string): string => {
|
const convertMoreMinimoreContentToMarkdown = (content: string): string => {
|
||||||
if (!content) return "";
|
if (!content) return "";
|
||||||
|
|
||||||
// Use the same parsing functions from DyadMarkdownParser
|
// Use the same parsing functions from MoreMinimoreMarkdownParser
|
||||||
const contentPieces = parseCustomTags(content);
|
const contentPieces = parseCustomTags(content);
|
||||||
|
|
||||||
let result = "";
|
let result = "";
|
||||||
@@ -76,7 +76,7 @@ export const useCopyToClipboard = () => {
|
|||||||
.trim();
|
.trim();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Convert individual custom tags to markdown (reuse the same logic from DyadMarkdownParser)
|
// Convert individual custom tags to markdown (reuse the same logic from MoreMinimoreMarkdownParser)
|
||||||
const convertCustomTagToMarkdown = (tagInfo: any): string => {
|
const convertCustomTagToMarkdown = (tagInfo: any): string => {
|
||||||
const { tag, attributes, content } = tagInfo;
|
const { tag, attributes, content } = tagInfo;
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ export const useCopyToClipboard = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reuse the same parsing functions from DyadMarkdownParser but simplified
|
// Reuse the same parsing functions from MoreMinimoreMarkdownParser but simplified
|
||||||
const parseCustomTags = (content: string) => {
|
const parseCustomTags = (content: string) => {
|
||||||
const { processedContent } = preprocessUnclosedTags(content);
|
const { processedContent } = preprocessUnclosedTags(content);
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as path from "path";
|
|||||||
import { db } from "../../db";
|
import { db } from "../../db";
|
||||||
import { apps } from "../../db/schema";
|
import { apps } from "../../db/schema";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { GetAppEnvVarsParams, SetAppEnvVarsParams } from "../ipc_types";
|
import { GetAppEnvVarsParams, SetAppEnvVarsParams } from "../ipc_types";
|
||||||
import {
|
import {
|
||||||
ENV_FILE_NAME,
|
ENV_FILE_NAME,
|
||||||
@@ -30,7 +30,7 @@ export function registerAppEnvVarsHandlers() {
|
|||||||
throw new Error("App not found");
|
throw new Error("App not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const envFilePath = path.join(appPath, ENV_FILE_NAME);
|
const envFilePath = path.join(appPath, ENV_FILE_NAME);
|
||||||
|
|
||||||
// If .env.local doesn't exist, return empty array
|
// If .env.local doesn't exist, return empty array
|
||||||
@@ -66,7 +66,7 @@ export function registerAppEnvVarsHandlers() {
|
|||||||
throw new Error("App not found");
|
throw new Error("App not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const envFilePath = path.join(appPath, ENV_FILE_NAME);
|
const envFilePath = path.join(appPath, ENV_FILE_NAME);
|
||||||
|
|
||||||
// Serialize environment variables to .env.local format
|
// Serialize environment variables to .env.local format
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import type {
|
|||||||
} from "../ipc_types";
|
} from "../ipc_types";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { getDyadAppPath, getUserDataPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath, getUserDataPath } from "../../paths/paths";
|
||||||
import { ChildProcess, spawn } from "node:child_process";
|
import { ChildProcess, spawn } from "node:child_process";
|
||||||
import { promises as fsPromises } from "node:fs";
|
import { promises as fsPromises } from "node:fs";
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ function listenToProcess({
|
|||||||
// This is a hacky heuristic to pick up when drizzle is asking for user
|
// This is a hacky heuristic to pick up when drizzle is asking for user
|
||||||
// to select from one of a few choices. We automatically pick the first
|
// to select from one of a few choices. We automatically pick the first
|
||||||
// option because it's usually a good default choice. We guard this with
|
// option because it's usually a good default choice. We guard this with
|
||||||
// isNeon because: 1) only Neon apps (for the official Dyad templates) should
|
// isNeon because: 1) only Neon apps (for the official MoreMinimore templates) should
|
||||||
// get this template and 2) it's safer to do this with Neon apps because
|
// get this template and 2) it's safer to do this with Neon apps because
|
||||||
// their databases have point in time restore built-in.
|
// their databases have point in time restore built-in.
|
||||||
if (isNeon && message.includes("created or renamed from another")) {
|
if (isNeon && message.includes("created or renamed from another")) {
|
||||||
@@ -573,7 +573,7 @@ export function registerAppHandlers() {
|
|||||||
params: CreateAppParams,
|
params: CreateAppParams,
|
||||||
): Promise<{ app: any; chatId: number }> => {
|
): Promise<{ app: any; chatId: number }> => {
|
||||||
const appPath = params.name;
|
const appPath = params.name;
|
||||||
const fullAppPath = getDyadAppPath(appPath);
|
const fullAppPath = getMoreMinimoreAppPath(appPath);
|
||||||
if (fs.existsSync(fullAppPath)) {
|
if (fs.existsSync(fullAppPath)) {
|
||||||
throw new Error(`App already exists at: ${fullAppPath}`);
|
throw new Error(`App already exists at: ${fullAppPath}`);
|
||||||
}
|
}
|
||||||
@@ -609,7 +609,7 @@ export function registerAppHandlers() {
|
|||||||
// Create initial commit
|
// Create initial commit
|
||||||
const commitHash = await gitCommit({
|
const commitHash = await gitCommit({
|
||||||
path: fullAppPath,
|
path: fullAppPath,
|
||||||
message: "Init Dyad app",
|
message: "Init MoreMinimore app",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update chat with initial commit hash
|
// Update chat with initial commit hash
|
||||||
@@ -647,8 +647,8 @@ export function registerAppHandlers() {
|
|||||||
throw new Error("Original app not found.");
|
throw new Error("Original app not found.");
|
||||||
}
|
}
|
||||||
|
|
||||||
const originalAppPath = getDyadAppPath(originalApp.path);
|
const originalAppPath = getMoreMinimoreAppPath(originalApp.path);
|
||||||
const newAppPath = getDyadAppPath(newAppName);
|
const newAppPath = getMoreMinimoreAppPath(newAppName);
|
||||||
|
|
||||||
// 3. Copy the app folder
|
// 3. Copy the app folder
|
||||||
try {
|
try {
|
||||||
@@ -673,7 +673,7 @@ export function registerAppHandlers() {
|
|||||||
// Create initial commit
|
// Create initial commit
|
||||||
await gitCommit({
|
await gitCommit({
|
||||||
path: newAppPath,
|
path: newAppPath,
|
||||||
message: "Init Dyad app",
|
message: "Init MoreMinimore app",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -708,7 +708,7 @@ export function registerAppHandlers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get app files
|
// Get app files
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
let files: string[] = [];
|
let files: string[] = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -748,7 +748,7 @@ export function registerAppHandlers() {
|
|||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
apps: allApps,
|
apps: allApps,
|
||||||
appBasePath: getDyadAppPath("$APP_BASE_PATH"),
|
appBasePath: getMoreMinimoreAppPath("$APP_BASE_PATH"),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -763,7 +763,7 @@ export function registerAppHandlers() {
|
|||||||
throw new Error("App not found");
|
throw new Error("App not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const fullPath = path.join(appPath, filePath);
|
const fullPath = path.join(appPath, filePath);
|
||||||
|
|
||||||
// Check if the path is within the app directory (security check)
|
// Check if the path is within the app directory (security check)
|
||||||
@@ -820,7 +820,7 @@ export function registerAppHandlers() {
|
|||||||
|
|
||||||
logger.debug(`Starting app ${appId} in path ${app.path}`);
|
logger.debug(`Starting app ${appId} in path ${app.path}`);
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
try {
|
try {
|
||||||
// There may have been a previous run that left a process on this port.
|
// There may have been a previous run that left a process on this port.
|
||||||
await cleanUpPort(getAppPort(appId));
|
await cleanUpPort(getAppPort(appId));
|
||||||
@@ -935,7 +935,7 @@ export function registerAppHandlers() {
|
|||||||
throw new Error("App not found");
|
throw new Error("App not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
// Remove node_modules if requested
|
// Remove node_modules if requested
|
||||||
if (removeNodeModules) {
|
if (removeNodeModules) {
|
||||||
@@ -1017,7 +1017,7 @@ export function registerAppHandlers() {
|
|||||||
throw new Error("App not found");
|
throw new Error("App not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const fullPath = path.join(appPath, filePath);
|
const fullPath = path.join(appPath, filePath);
|
||||||
|
|
||||||
// Check if the path is within the app directory (security check)
|
// Check if the path is within the app directory (security check)
|
||||||
@@ -1151,7 +1151,7 @@ export function registerAppHandlers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete app files
|
// Delete app files
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
try {
|
try {
|
||||||
await fsPromises.rm(appPath, { recursive: true, force: true });
|
await fsPromises.rm(appPath, { recursive: true, force: true });
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
@@ -1275,8 +1275,8 @@ export function registerAppHandlers() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const oldAppPath = getDyadAppPath(app.path);
|
const oldAppPath = getMoreMinimoreAppPath(app.path);
|
||||||
const newAppPath = getDyadAppPath(appPath);
|
const newAppPath = getMoreMinimoreAppPath(appPath);
|
||||||
// Only move files if needed
|
// Only move files if needed
|
||||||
if (newAppPath !== oldAppPath) {
|
if (newAppPath !== oldAppPath) {
|
||||||
// Move app files
|
// Move app files
|
||||||
@@ -1395,7 +1395,7 @@ export function registerAppHandlers() {
|
|||||||
// Doing this last because it's the most time-consuming and the least important
|
// Doing this last because it's the most time-consuming and the least important
|
||||||
// in terms of resetting the app state.
|
// in terms of resetting the app state.
|
||||||
logger.log("removing all app files...");
|
logger.log("removing all app files...");
|
||||||
const dyadAppPath = getDyadAppPath(".");
|
const dyadAppPath = getMoreMinimoreAppPath(".");
|
||||||
if (fs.existsSync(dyadAppPath)) {
|
if (fs.existsSync(dyadAppPath)) {
|
||||||
await fsPromises.rm(dyadAppPath, { recursive: true, force: true });
|
await fsPromises.rm(dyadAppPath, { recursive: true, force: true });
|
||||||
// Recreate the base directory
|
// Recreate the base directory
|
||||||
@@ -1422,7 +1422,7 @@ export function registerAppHandlers() {
|
|||||||
throw new Error("App not found");
|
throw new Error("App not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
return withLock(appId, async () => {
|
return withLock(appId, async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { AppUpgrade } from "../ipc_types";
|
|||||||
import { db } from "../../db";
|
import { db } from "../../db";
|
||||||
import { apps } from "../../db/schema";
|
import { apps } from "../../db/schema";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { spawn } from "node:child_process";
|
import { spawn } from "node:child_process";
|
||||||
@@ -19,15 +19,15 @@ const availableUpgrades: Omit<AppUpgrade, "isNeeded">[] = [
|
|||||||
id: "component-tagger",
|
id: "component-tagger",
|
||||||
title: "Enable select component to edit",
|
title: "Enable select component to edit",
|
||||||
description:
|
description:
|
||||||
"Installs the Dyad component tagger Vite plugin and its dependencies.",
|
"Installs the MoreMinimore component tagger Vite plugin and its dependencies.",
|
||||||
manualUpgradeUrl: "https://dyad.sh/docs/upgrades/select-component",
|
manualUpgradeUrl: "https://moreminimore.com/docs/upgrades/select-component",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "capacitor",
|
id: "capacitor",
|
||||||
title: "Upgrade to hybrid mobile app with Capacitor",
|
title: "Upgrade to hybrid mobile app with Capacitor",
|
||||||
description:
|
description:
|
||||||
"Adds Capacitor to your app lets it run on iOS and Android in addition to the web.",
|
"Adds Capacitor to your app lets it run on iOS and Android in addition to the web.",
|
||||||
manualUpgradeUrl: "https://dyad.sh/docs/guides/mobile-app#upgrade-your-app",
|
manualUpgradeUrl: "https://moreminimore.com/docs/guides/mobile-app#upgrade-your-app",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ async function applyComponentTagger(appPath: string) {
|
|||||||
await gitAddAll({ path: appPath });
|
await gitAddAll({ path: appPath });
|
||||||
await gitCommit({
|
await gitCommit({
|
||||||
path: appPath,
|
path: appPath,
|
||||||
message: "[dyad] add Dyad component tagger",
|
message: "[dyad] add MoreMinimore component tagger",
|
||||||
});
|
});
|
||||||
logger.info("Successfully committed changes");
|
logger.info("Successfully committed changes");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -253,7 +253,7 @@ export function registerAppUpgradeHandlers() {
|
|||||||
"get-app-upgrades",
|
"get-app-upgrades",
|
||||||
async (_, { appId }: { appId: number }): Promise<AppUpgrade[]> => {
|
async (_, { appId }: { appId: number }): Promise<AppUpgrade[]> => {
|
||||||
const app = await getApp(appId);
|
const app = await getApp(appId);
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
const upgradesWithStatus = availableUpgrades.map((upgrade) => {
|
const upgradesWithStatus = availableUpgrades.map((upgrade) => {
|
||||||
let isNeeded = false;
|
let isNeeded = false;
|
||||||
@@ -277,7 +277,7 @@ export function registerAppUpgradeHandlers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const app = await getApp(appId);
|
const app = await getApp(appId);
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
if (upgradeId === "component-tagger") {
|
if (upgradeId === "component-tagger") {
|
||||||
await applyComponentTagger(appPath);
|
await applyComponentTagger(appPath);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import log from "electron-log";
|
|||||||
import { db } from "../../db";
|
import { db } from "../../db";
|
||||||
import { apps } from "../../db/schema";
|
import { apps } from "../../db/schema";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { simpleSpawn } from "../utils/simpleSpawn";
|
import { simpleSpawn } from "../utils/simpleSpawn";
|
||||||
@@ -39,7 +39,7 @@ export function registerCapacitorHandlers() {
|
|||||||
"is-capacitor",
|
"is-capacitor",
|
||||||
async (_, { appId }: { appId: number }): Promise<boolean> => {
|
async (_, { appId }: { appId: number }): Promise<boolean> => {
|
||||||
const app = await getApp(appId);
|
const app = await getApp(appId);
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
// check for the required Node.js version before running any commands
|
// check for the required Node.js version before running any commands
|
||||||
const currentNodeVersion = process.version;
|
const currentNodeVersion = process.version;
|
||||||
@@ -62,7 +62,7 @@ export function registerCapacitorHandlers() {
|
|||||||
"sync-capacitor",
|
"sync-capacitor",
|
||||||
async (_, { appId }: { appId: number }): Promise<void> => {
|
async (_, { appId }: { appId: number }): Promise<void> => {
|
||||||
const app = await getApp(appId);
|
const app = await getApp(appId);
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
if (!isCapacitorInstalled(appPath)) {
|
if (!isCapacitorInstalled(appPath)) {
|
||||||
throw new Error("Capacitor is not installed in this app");
|
throw new Error("Capacitor is not installed in this app");
|
||||||
@@ -90,7 +90,7 @@ export function registerCapacitorHandlers() {
|
|||||||
|
|
||||||
handle("open-ios", async (_, { appId }: { appId: number }): Promise<void> => {
|
handle("open-ios", async (_, { appId }: { appId: number }): Promise<void> => {
|
||||||
const app = await getApp(appId);
|
const app = await getApp(appId);
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
if (!isCapacitorInstalled(appPath)) {
|
if (!isCapacitorInstalled(appPath)) {
|
||||||
throw new Error("Capacitor is not installed in this app");
|
throw new Error("Capacitor is not installed in this app");
|
||||||
@@ -114,7 +114,7 @@ export function registerCapacitorHandlers() {
|
|||||||
"open-android",
|
"open-android",
|
||||||
async (_, { appId }: { appId: number }): Promise<void> => {
|
async (_, { appId }: { appId: number }): Promise<void> => {
|
||||||
const app = await getApp(appId);
|
const app = await getApp(appId);
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
if (!isCapacitorInstalled(appPath)) {
|
if (!isCapacitorInstalled(appPath)) {
|
||||||
throw new Error("Capacitor is not installed in this app");
|
throw new Error("Capacitor is not installed in this app");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { ChatSearchResult, ChatSummary } from "../../lib/schemas";
|
|||||||
import { createLoggedHandler } from "./safe_handle";
|
import { createLoggedHandler } from "./safe_handle";
|
||||||
|
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { UpdateChatParams } from "../ipc_types";
|
import { UpdateChatParams } from "../ipc_types";
|
||||||
import { getCurrentCommitHash } from "../utils/git_utils";
|
import { getCurrentCommitHash } from "../utils/git_utils";
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ export function registerChatHandlers() {
|
|||||||
try {
|
try {
|
||||||
// Get the current git revision of main branch
|
// Get the current git revision of main branch
|
||||||
initialCommitHash = await getCurrentCommitHash({
|
initialCommitHash = await getCurrentCommitHash({
|
||||||
path: getDyadAppPath(app.path),
|
path: getMoreMinimoreAppPath(app.path),
|
||||||
ref: "main",
|
ref: "main",
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import {
|
|||||||
SUPABASE_AVAILABLE_SYSTEM_PROMPT,
|
SUPABASE_AVAILABLE_SYSTEM_PROMPT,
|
||||||
SUPABASE_NOT_AVAILABLE_SYSTEM_PROMPT,
|
SUPABASE_NOT_AVAILABLE_SYSTEM_PROMPT,
|
||||||
} from "../../prompts/supabase_prompt";
|
} from "../../prompts/supabase_prompt";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { readSettings } from "../../main/settings";
|
import { readSettings } from "../../main/settings";
|
||||||
import type { ChatResponseEnd, ChatStreamParams } from "../ipc_types";
|
import type { ChatResponseEnd, ChatStreamParams } from "../ipc_types";
|
||||||
import {
|
import {
|
||||||
@@ -65,10 +65,10 @@ import { generateProblemReport } from "../processors/tsc";
|
|||||||
import { createProblemFixPrompt } from "@/shared/problem_prompt";
|
import { createProblemFixPrompt } from "@/shared/problem_prompt";
|
||||||
import { AsyncVirtualFileSystem } from "../../../shared/VirtualFilesystem";
|
import { AsyncVirtualFileSystem } from "../../../shared/VirtualFilesystem";
|
||||||
import {
|
import {
|
||||||
getDyadAddDependencyTags,
|
getMoreMinimoreAddDependencyTags,
|
||||||
getDyadWriteTags,
|
getMoreMinimoreWriteTags,
|
||||||
getDyadDeleteTags,
|
getMoreMinimoreDeleteTags,
|
||||||
getDyadRenameTags,
|
getMoreMinimoreRenameTags,
|
||||||
} from "../utils/dyad_tag_parser";
|
} from "../utils/dyad_tag_parser";
|
||||||
import { fileExists } from "../utils/file_utils";
|
import { fileExists } from "../utils/file_utils";
|
||||||
import { FileUploadsState } from "../utils/file_uploads_state";
|
import { FileUploadsState } from "../utils/file_uploads_state";
|
||||||
@@ -186,14 +186,14 @@ async function processStreamChunks({
|
|||||||
inThinkingBlock = true;
|
inThinkingBlock = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
chunk += escapeDyadTags(part.text);
|
chunk += escapeMoreMinimoreTags(part.text);
|
||||||
} else if (part.type === "tool-call") {
|
} else if (part.type === "tool-call") {
|
||||||
const { serverName, toolName } = parseMcpToolKey(part.toolName);
|
const { serverName, toolName } = parseMcpToolKey(part.toolName);
|
||||||
const content = escapeDyadTags(JSON.stringify(part.input));
|
const content = escapeMoreMinimoreTags(JSON.stringify(part.input));
|
||||||
chunk = `<dyad-mcp-tool-call server="${serverName}" tool="${toolName}">\n${content}\n</dyad-mcp-tool-call>\n`;
|
chunk = `<dyad-mcp-tool-call server="${serverName}" tool="${toolName}">\n${content}\n</dyad-mcp-tool-call>\n`;
|
||||||
} else if (part.type === "tool-result") {
|
} else if (part.type === "tool-result") {
|
||||||
const { serverName, toolName } = parseMcpToolKey(part.toolName);
|
const { serverName, toolName } = parseMcpToolKey(part.toolName);
|
||||||
const content = escapeDyadTags(part.output);
|
const content = escapeMoreMinimoreTags(part.output);
|
||||||
chunk = `<dyad-mcp-tool-result server="${serverName}" tool="${toolName}">\n${content}\n</dyad-mcp-tool-result>\n`;
|
chunk = `<dyad-mcp-tool-result server="${serverName}" tool="${toolName}">\n${content}\n</dyad-mcp-tool-result>\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ export function registerChatStreamHandlers() {
|
|||||||
let componentSnippet = "[component snippet not available]";
|
let componentSnippet = "[component snippet not available]";
|
||||||
try {
|
try {
|
||||||
const componentFileContent = await readFile(
|
const componentFileContent = await readFile(
|
||||||
path.join(getDyadAppPath(chat.app.path), component.relativePath),
|
path.join(getMoreMinimoreAppPath(chat.app.path), component.relativePath),
|
||||||
"utf8",
|
"utf8",
|
||||||
);
|
);
|
||||||
const lines = componentFileContent.split(/\r?\n/);
|
const lines = componentFileContent.split(/\r?\n/);
|
||||||
@@ -406,8 +406,8 @@ ${componentSnippet}
|
|||||||
})
|
})
|
||||||
.returning();
|
.returning();
|
||||||
const settings = readSettings();
|
const settings = readSettings();
|
||||||
// Only Dyad Pro requests have request ids.
|
// Only MoreMinimore Pro requests have request ids.
|
||||||
if (settings.enableDyadPro) {
|
if (settings.enableMoreMinimorePro) {
|
||||||
// Generate requestId early so it can be saved with the message
|
// Generate requestId early so it can be saved with the message
|
||||||
dyadRequestId = uuidv4();
|
dyadRequestId = uuidv4();
|
||||||
}
|
}
|
||||||
@@ -421,7 +421,7 @@ ${componentSnippet}
|
|||||||
content: "", // Start with empty content
|
content: "", // Start with empty content
|
||||||
requestId: dyadRequestId,
|
requestId: dyadRequestId,
|
||||||
sourceCommitHash: await getCurrentCommitHash({
|
sourceCommitHash: await getCurrentCommitHash({
|
||||||
path: getDyadAppPath(chat.app.path),
|
path: getMoreMinimoreAppPath(chat.app.path),
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
.returning();
|
.returning();
|
||||||
@@ -467,7 +467,7 @@ ${componentSnippet}
|
|||||||
const { modelClient, isEngineEnabled, isSmartContextEnabled } =
|
const { modelClient, isEngineEnabled, isSmartContextEnabled } =
|
||||||
await getModelClient(settings.selectedModel, settings);
|
await getModelClient(settings.selectedModel, settings);
|
||||||
|
|
||||||
const appPath = getDyadAppPath(updatedChat.app.path);
|
const appPath = getMoreMinimoreAppPath(updatedChat.app.path);
|
||||||
// When we don't have smart context enabled, we
|
// When we don't have smart context enabled, we
|
||||||
// only include the selected components' files for codebase context.
|
// only include the selected components' files for codebase context.
|
||||||
//
|
//
|
||||||
@@ -559,7 +559,7 @@ ${componentSnippet}
|
|||||||
commitHash: message.commitHash,
|
commitHash: message.commitHash,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// For Dyad Pro + Deep Context, we set to 200 chat turns (+1)
|
// For MoreMinimore Pro + Deep Context, we set to 200 chat turns (+1)
|
||||||
// this is to enable more cache hits. Practically, users should
|
// this is to enable more cache hits. Practically, users should
|
||||||
// rarely go over this limit because they will hit the model's
|
// rarely go over this limit because they will hit the model's
|
||||||
// context window limit.
|
// context window limit.
|
||||||
@@ -604,7 +604,7 @@ ${componentSnippet}
|
|||||||
}
|
}
|
||||||
|
|
||||||
let systemPrompt = constructSystemPrompt({
|
let systemPrompt = constructSystemPrompt({
|
||||||
aiRules: await readAiRules(getDyadAppPath(updatedChat.app.path)),
|
aiRules: await readAiRules(getMoreMinimoreAppPath(updatedChat.app.path)),
|
||||||
chatMode:
|
chatMode:
|
||||||
settings.selectedChatMode === "agent"
|
settings.selectedChatMode === "agent"
|
||||||
? "build"
|
? "build"
|
||||||
@@ -626,7 +626,7 @@ ${componentSnippet}
|
|||||||
if (isSecurityReviewIntent) {
|
if (isSecurityReviewIntent) {
|
||||||
systemPrompt = SECURITY_REVIEW_SYSTEM_PROMPT;
|
systemPrompt = SECURITY_REVIEW_SYSTEM_PROMPT;
|
||||||
try {
|
try {
|
||||||
const appPath = getDyadAppPath(updatedChat.app.path);
|
const appPath = getMoreMinimoreAppPath(updatedChat.app.path);
|
||||||
const rulesPath = path.join(appPath, "SECURITY_RULES.md");
|
const rulesPath = path.join(appPath, "SECURITY_RULES.md");
|
||||||
let securityRules = "";
|
let securityRules = "";
|
||||||
|
|
||||||
@@ -751,7 +751,7 @@ This conversation includes one or more image attachments. When the user uploads
|
|||||||
// and eats up extra tokens.
|
// and eats up extra tokens.
|
||||||
content:
|
content:
|
||||||
settings.selectedChatMode === "ask"
|
settings.selectedChatMode === "ask"
|
||||||
? removeDyadTags(removeNonEssentialTags(msg.content))
|
? removeMoreMinimoreTags(removeNonEssentialTags(msg.content))
|
||||||
: removeNonEssentialTags(msg.content),
|
: removeNonEssentialTags(msg.content),
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
"dyad-engine": {
|
"dyad-engine": {
|
||||||
@@ -1022,7 +1022,7 @@ This conversation includes one or more image attachments. When the user uploads
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
systemPromptOverride: constructSystemPrompt({
|
systemPromptOverride: constructSystemPrompt({
|
||||||
aiRules: await readAiRules(getDyadAppPath(updatedChat.app.path)),
|
aiRules: await readAiRules(getMoreMinimoreAppPath(updatedChat.app.path)),
|
||||||
chatMode: "agent",
|
chatMode: "agent",
|
||||||
enableTurboEditsV2: false,
|
enableTurboEditsV2: false,
|
||||||
}),
|
}),
|
||||||
@@ -1072,7 +1072,7 @@ This conversation includes one or more image attachments. When the user uploads
|
|||||||
) {
|
) {
|
||||||
let issues = await dryRunSearchReplace({
|
let issues = await dryRunSearchReplace({
|
||||||
fullResponse,
|
fullResponse,
|
||||||
appPath: getDyadAppPath(updatedChat.app.path),
|
appPath: getMoreMinimoreAppPath(updatedChat.app.path),
|
||||||
});
|
});
|
||||||
|
|
||||||
let searchReplaceFixAttempts = 0;
|
let searchReplaceFixAttempts = 0;
|
||||||
@@ -1142,7 +1142,7 @@ ${formattedSearchReplaceIssues}`,
|
|||||||
// Re-check for issues after the fix attempt
|
// Re-check for issues after the fix attempt
|
||||||
issues = await dryRunSearchReplace({
|
issues = await dryRunSearchReplace({
|
||||||
fullResponse: result.incrementalResponse,
|
fullResponse: result.incrementalResponse,
|
||||||
appPath: getDyadAppPath(updatedChat.app.path),
|
appPath: getMoreMinimoreAppPath(updatedChat.app.path),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1150,11 +1150,11 @@ ${formattedSearchReplaceIssues}`,
|
|||||||
if (
|
if (
|
||||||
!abortController.signal.aborted &&
|
!abortController.signal.aborted &&
|
||||||
settings.selectedChatMode !== "ask" &&
|
settings.selectedChatMode !== "ask" &&
|
||||||
hasUnclosedDyadWrite(fullResponse)
|
hasUnclosedMoreMinimoreWrite(fullResponse)
|
||||||
) {
|
) {
|
||||||
let continuationAttempts = 0;
|
let continuationAttempts = 0;
|
||||||
while (
|
while (
|
||||||
hasUnclosedDyadWrite(fullResponse) &&
|
hasUnclosedMoreMinimoreWrite(fullResponse) &&
|
||||||
continuationAttempts < 2 &&
|
continuationAttempts < 2 &&
|
||||||
!abortController.signal.aborted
|
!abortController.signal.aborted
|
||||||
) {
|
) {
|
||||||
@@ -1187,7 +1187,7 @@ ${formattedSearchReplaceIssues}`,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const addDependencies = getDyadAddDependencyTags(fullResponse);
|
const addDependencies = getMoreMinimoreAddDependencyTags(fullResponse);
|
||||||
if (
|
if (
|
||||||
!abortController.signal.aborted &&
|
!abortController.signal.aborted &&
|
||||||
// If there are dependencies, we don't want to auto-fix problems
|
// If there are dependencies, we don't want to auto-fix problems
|
||||||
@@ -1201,7 +1201,7 @@ ${formattedSearchReplaceIssues}`,
|
|||||||
// IF auto-fix is enabled
|
// IF auto-fix is enabled
|
||||||
let problemReport = await generateProblemReport({
|
let problemReport = await generateProblemReport({
|
||||||
fullResponse,
|
fullResponse,
|
||||||
appPath: getDyadAppPath(updatedChat.app.path),
|
appPath: getMoreMinimoreAppPath(updatedChat.app.path),
|
||||||
});
|
});
|
||||||
|
|
||||||
let autoFixAttempts = 0;
|
let autoFixAttempts = 0;
|
||||||
@@ -1228,15 +1228,15 @@ ${problemReport.problems
|
|||||||
const problemFixPrompt = createProblemFixPrompt(problemReport);
|
const problemFixPrompt = createProblemFixPrompt(problemReport);
|
||||||
|
|
||||||
const virtualFileSystem = new AsyncVirtualFileSystem(
|
const virtualFileSystem = new AsyncVirtualFileSystem(
|
||||||
getDyadAppPath(updatedChat.app.path),
|
getMoreMinimoreAppPath(updatedChat.app.path),
|
||||||
{
|
{
|
||||||
fileExists: (fileName: string) => fileExists(fileName),
|
fileExists: (fileName: string) => fileExists(fileName),
|
||||||
readFile: (fileName: string) => readFileWithCache(fileName),
|
readFile: (fileName: string) => readFileWithCache(fileName),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const writeTags = getDyadWriteTags(fullResponse);
|
const writeTags = getMoreMinimoreWriteTags(fullResponse);
|
||||||
const renameTags = getDyadRenameTags(fullResponse);
|
const renameTags = getMoreMinimoreRenameTags(fullResponse);
|
||||||
const deletePaths = getDyadDeleteTags(fullResponse);
|
const deletePaths = getMoreMinimoreDeleteTags(fullResponse);
|
||||||
virtualFileSystem.applyResponseChanges({
|
virtualFileSystem.applyResponseChanges({
|
||||||
deletePaths,
|
deletePaths,
|
||||||
renameTags,
|
renameTags,
|
||||||
@@ -1299,7 +1299,7 @@ ${problemReport.problems
|
|||||||
|
|
||||||
problemReport = await generateProblemReport({
|
problemReport = await generateProblemReport({
|
||||||
fullResponse,
|
fullResponse,
|
||||||
appPath: getDyadAppPath(updatedChat.app.path),
|
appPath: getMoreMinimoreAppPath(updatedChat.app.path),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -1619,12 +1619,12 @@ export function removeProblemReportTags(text: string): string {
|
|||||||
return text.replace(problemReportRegex, "").trim();
|
return text.replace(problemReportRegex, "").trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function removeDyadTags(text: string): string {
|
export function removeMoreMinimoreTags(text: string): string {
|
||||||
const dyadRegex = /<dyad-[^>]*>[\s\S]*?<\/dyad-[^>]*>/g;
|
const dyadRegex = /<dyad-[^>]*>[\s\S]*?<\/dyad-[^>]*>/g;
|
||||||
return text.replace(dyadRegex, "").trim();
|
return text.replace(dyadRegex, "").trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function hasUnclosedDyadWrite(text: string): boolean {
|
export function hasUnclosedMoreMinimoreWrite(text: string): boolean {
|
||||||
// Find the last opening dyad-write tag
|
// Find the last opening dyad-write tag
|
||||||
const openRegex = /<dyad-write[^>]*>/g;
|
const openRegex = /<dyad-write[^>]*>/g;
|
||||||
let lastOpenIndex = -1;
|
let lastOpenIndex = -1;
|
||||||
@@ -1646,7 +1646,7 @@ export function hasUnclosedDyadWrite(text: string): boolean {
|
|||||||
return !hasClosingTag;
|
return !hasClosingTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
function escapeDyadTags(text: string): string {
|
function escapeMoreMinimoreTags(text: string): string {
|
||||||
// Escape dyad tags in reasoning content
|
// Escape dyad tags in reasoning content
|
||||||
// We are replacing the opening tag with a look-alike character
|
// We are replacing the opening tag with a look-alike character
|
||||||
// to avoid issues where thinking content includes dyad tags
|
// to avoid issues where thinking content includes dyad tags
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
import { estimateTokens } from "../utils/token_utils";
|
import { estimateTokens } from "../utils/token_utils";
|
||||||
import { createLoggedHandler } from "./safe_handle";
|
import { createLoggedHandler } from "./safe_handle";
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
import { getDyadAppPath } from "@/paths/paths";
|
import { getMoreMinimoreAppPath } from "@/paths/paths";
|
||||||
import { extractCodebase } from "@/utils/codebase";
|
import { extractCodebase } from "@/utils/codebase";
|
||||||
import { validateChatContext } from "../utils/context_paths_utils";
|
import { validateChatContext } from "../utils/context_paths_utils";
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ export function registerContextPathsHandlers() {
|
|||||||
if (!app.path) {
|
if (!app.path) {
|
||||||
throw new Error("App path not set");
|
throw new Error("App path not set");
|
||||||
}
|
}
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
const results: ContextPathResults = {
|
const results: ContextPathResults = {
|
||||||
contextPaths: [],
|
contextPaths: [],
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ async function cloneRepo(repoUrl: string): Promise<string> {
|
|||||||
const response = await fetch(apiUrl, {
|
const response = await fetch(apiUrl, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
"User-Agent": "Dyad", // GitHub API requires this
|
"User-Agent": "MoreMinimore", // GitHub API requires this
|
||||||
Accept: "application/vnd.github.v3+json",
|
Accept: "application/vnd.github.v3+json",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { extractCodebase } from "../../utils/codebase";
|
|||||||
import { db } from "../../db";
|
import { db } from "../../db";
|
||||||
import { chats, apps } from "../../db/schema";
|
import { chats, apps } from "../../db/schema";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { LargeLanguageModel } from "@/lib/schemas";
|
import { LargeLanguageModel } from "@/lib/schemas";
|
||||||
import { validateChatContext } from "../utils/context_paths_utils";
|
import { validateChatContext } from "../utils/context_paths_utils";
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ async function getSystemDebugInfo({
|
|||||||
console.error("Failed to get node path:", err);
|
console.error("Failed to get node path:", err);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Dyad version from package.json
|
// Get MoreMinimore version from package.json
|
||||||
const packageJsonPath = path.resolve(__dirname, "..", "..", "package.json");
|
const packageJsonPath = path.resolve(__dirname, "..", "..", "package.json");
|
||||||
let dyadVersion = "unknown";
|
let dyadVersion = "unknown";
|
||||||
try {
|
try {
|
||||||
@@ -175,7 +175,7 @@ export function registerDebugHandlers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Extract codebase
|
// Extract codebase
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const codebase = (
|
const codebase = (
|
||||||
await extractCodebase({
|
await extractCodebase({
|
||||||
appPath,
|
appPath,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { db } from "../../db";
|
import { db } from "../../db";
|
||||||
import { messages, apps, chats } from "../../db/schema";
|
import { messages, apps, chats } from "../../db/schema";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { executeAddDependency } from "../processors/executeAddDependency";
|
import { executeAddDependency } from "../processors/executeAddDependency";
|
||||||
import { createLoggedHandler } from "./safe_handle";
|
import { createLoggedHandler } from "./safe_handle";
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
@@ -56,7 +56,7 @@ export function registerDependencyHandlers() {
|
|||||||
executeAddDependency({
|
executeAddDependency({
|
||||||
packages,
|
packages,
|
||||||
message,
|
message,
|
||||||
appPath: getDyadAppPath(app.path),
|
appPath: getMoreMinimoreAppPath(app.path),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { writeSettings, readSettings } from "../../main/settings";
|
|||||||
import { gitSetRemoteUrl, gitPush, gitClone } from "../utils/git_utils";
|
import { gitSetRemoteUrl, gitPush, gitClone } from "../utils/git_utils";
|
||||||
import * as schema from "../../db/schema";
|
import * as schema from "../../db/schema";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { db } from "../../db";
|
import { db } from "../../db";
|
||||||
import { apps } from "../../db/schema";
|
import { apps } from "../../db/schema";
|
||||||
import type { CloneRepoParams, CloneRepoReturnType } from "@/ipc/ipc_types";
|
import type { CloneRepoParams, CloneRepoReturnType } from "@/ipc/ipc_types";
|
||||||
@@ -566,7 +566,7 @@ async function handlePushToGithub(
|
|||||||
if (!app || !app.githubOrg || !app.githubRepo) {
|
if (!app || !app.githubOrg || !app.githubRepo) {
|
||||||
return { success: false, error: "App is not linked to a GitHub repo." };
|
return { success: false, error: "App is not linked to a GitHub repo." };
|
||||||
}
|
}
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const branch = app.githubBranch || "main";
|
const branch = app.githubBranch || "main";
|
||||||
|
|
||||||
// Set up remote URL with token
|
// Set up remote URL with token
|
||||||
@@ -663,7 +663,7 @@ async function handleCloneRepoFromUrl(
|
|||||||
return { error: `An app named "${finalAppName}" already exists.` };
|
return { error: `An app named "${finalAppName}" already exists.` };
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(finalAppName);
|
const appPath = getMoreMinimoreAppPath(finalAppName);
|
||||||
// Ensure the app directory exists if native git is disabled
|
// Ensure the app directory exists if native git is disabled
|
||||||
if (!settings.enableNativeGit) {
|
if (!settings.enableNativeGit) {
|
||||||
if (!fs.existsSync(appPath)) {
|
if (!fs.existsSync(appPath)) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import fs from "fs/promises";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import { createLoggedHandler } from "./safe_handle";
|
import { createLoggedHandler } from "./safe_handle";
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { apps } from "@/db/schema";
|
import { apps } from "@/db/schema";
|
||||||
import { db } from "@/db";
|
import { db } from "@/db";
|
||||||
import { chats } from "@/db/schema";
|
import { chats } from "@/db/schema";
|
||||||
@@ -47,7 +47,7 @@ export function registerImportHandlers() {
|
|||||||
// Handler for checking if an app name is already taken
|
// Handler for checking if an app name is already taken
|
||||||
handle("check-app-name", async (_, { appName }: { appName: string }) => {
|
handle("check-app-name", async (_, { appName }: { appName: string }) => {
|
||||||
// Check filesystem
|
// Check filesystem
|
||||||
const appPath = getDyadAppPath(appName);
|
const appPath = getMoreMinimoreAppPath(appName);
|
||||||
try {
|
try {
|
||||||
await fs.access(appPath);
|
await fs.access(appPath);
|
||||||
return { exists: true };
|
return { exists: true };
|
||||||
@@ -82,7 +82,7 @@ export function registerImportHandlers() {
|
|||||||
throw new Error("Source folder does not exist");
|
throw new Error("Source folder does not exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
const destPath = getDyadAppPath(appName);
|
const destPath = getMoreMinimoreAppPath(appName);
|
||||||
|
|
||||||
// Check if the app already exists
|
// Check if the app already exists
|
||||||
const errorMessage = "An app with this name already exists";
|
const errorMessage = "An app with this name already exists";
|
||||||
@@ -94,7 +94,7 @@ export function registerImportHandlers() {
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Copy the app folder to the Dyad apps directory.
|
// Copy the app folder to the MoreMinimore apps directory.
|
||||||
// Why not use fs.cp? Because we want stable ordering for
|
// Why not use fs.cp? Because we want stable ordering for
|
||||||
// tests.
|
// tests.
|
||||||
await copyDirectoryRecursive(sourcePath, destPath);
|
await copyDirectoryRecursive(sourcePath, destPath);
|
||||||
@@ -114,7 +114,7 @@ export function registerImportHandlers() {
|
|||||||
// Create initial commit
|
// Create initial commit
|
||||||
await gitCommit({
|
await gitCommit({
|
||||||
path: destPath,
|
path: destPath,
|
||||||
message: "Init Dyad app",
|
message: "Init MoreMinimore app",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import log from "electron-log";
|
|||||||
import { db } from "../../db";
|
import { db } from "../../db";
|
||||||
import { apps } from "../../db/schema";
|
import { apps } from "../../db/schema";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { spawn } from "child_process";
|
import { spawn } from "child_process";
|
||||||
import { gitCommit, gitAdd } from "../utils/git_utils";
|
import { gitCommit, gitAdd } from "../utils/git_utils";
|
||||||
import { storeDbTimestampAtCurrentVersion } from "../utils/neon_timestamp_utils";
|
import { storeDbTimestampAtCurrentVersion } from "../utils/neon_timestamp_utils";
|
||||||
@@ -26,7 +26,7 @@ export function registerPortalHandlers() {
|
|||||||
"portal:migrate-create",
|
"portal:migrate-create",
|
||||||
async (_, { appId }: { appId: number }): Promise<{ output: string }> => {
|
async (_, { appId }: { appId: number }): Promise<{ output: string }> => {
|
||||||
const app = await getApp(appId);
|
const app = await getApp(appId);
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
// Run the migration command
|
// Run the migration command
|
||||||
const migrationOutput = await new Promise<string>((resolve, reject) => {
|
const migrationOutput = await new Promise<string>((resolve, reject) => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { db } from "../../db";
|
|||||||
import { apps } from "../../db/schema";
|
import { apps } from "../../db/schema";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import { generateProblemReport } from "../processors/tsc";
|
import { generateProblemReport } from "../processors/tsc";
|
||||||
import { getDyadAppPath } from "@/paths/paths";
|
import { getMoreMinimoreAppPath } from "@/paths/paths";
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
import { createLoggedHandler } from "./safe_handle";
|
import { createLoggedHandler } from "./safe_handle";
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ export function registerProblemsHandlers() {
|
|||||||
throw new Error(`App not found: ${params.appId}`);
|
throw new Error(`App not found: ${params.appId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
// Call autofix with empty full response to just run TypeScript checking
|
// Call autofix with empty full response to just run TypeScript checking
|
||||||
const problemReport = await generateProblemReport({
|
const problemReport = await generateProblemReport({
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ import path from "node:path"; // Import path for basename
|
|||||||
// Import tag parsers
|
// Import tag parsers
|
||||||
import { processFullResponseActions } from "../processors/response_processor";
|
import { processFullResponseActions } from "../processors/response_processor";
|
||||||
import {
|
import {
|
||||||
getDyadWriteTags,
|
getMoreMinimoreWriteTags,
|
||||||
getDyadRenameTags,
|
getMoreMinimoreRenameTags,
|
||||||
getDyadDeleteTags,
|
getMoreMinimoreDeleteTags,
|
||||||
getDyadExecuteSqlTags,
|
getMoreMinimoreExecuteSqlTags,
|
||||||
getDyadAddDependencyTags,
|
getMoreMinimoreAddDependencyTags,
|
||||||
getDyadChatSummaryTag,
|
getMoreMinimoreChatSummaryTag,
|
||||||
getDyadCommandTags,
|
getMoreMinimoreCommandTags,
|
||||||
getDyadSearchReplaceTags,
|
getMoreMinimoreSearchReplaceTags,
|
||||||
} from "../utils/dyad_tag_parser";
|
} from "../utils/dyad_tag_parser";
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
import { isServerFunction } from "../../supabase_admin/supabase_utils";
|
import { isServerFunction } from "../../supabase_admin/supabase_utils";
|
||||||
@@ -28,7 +28,7 @@ import {
|
|||||||
getContextWindow,
|
getContextWindow,
|
||||||
} from "../utils/token_utils";
|
} from "../utils/token_utils";
|
||||||
import { extractCodebase } from "../../utils/codebase";
|
import { extractCodebase } from "../../utils/codebase";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { withLock } from "../utils/lock_utils";
|
import { withLock } from "../utils/lock_utils";
|
||||||
import { createLoggedHandler } from "./safe_handle";
|
import { createLoggedHandler } from "./safe_handle";
|
||||||
import { ApproveProposalResult } from "../ipc_types";
|
import { ApproveProposalResult } from "../ipc_types";
|
||||||
@@ -102,7 +102,7 @@ async function getCodebaseTokenCount(
|
|||||||
logger.log(`Calculating codebase token count for chatId: ${chatId}`);
|
logger.log(`Calculating codebase token count for chatId: ${chatId}`);
|
||||||
const codebase = (
|
const codebase = (
|
||||||
await extractCodebase({
|
await extractCodebase({
|
||||||
appPath: getDyadAppPath(appPath),
|
appPath: getMoreMinimoreAppPath(appPath),
|
||||||
chatContext: validateChatContext(chatContext),
|
chatContext: validateChatContext(chatContext),
|
||||||
})
|
})
|
||||||
).formattedOutput;
|
).formattedOutput;
|
||||||
@@ -151,15 +151,15 @@ const getProposalHandler = async (
|
|||||||
);
|
);
|
||||||
const messageContent = latestAssistantMessage.content;
|
const messageContent = latestAssistantMessage.content;
|
||||||
|
|
||||||
const proposalTitle = getDyadChatSummaryTag(messageContent);
|
const proposalTitle = getMoreMinimoreChatSummaryTag(messageContent);
|
||||||
|
|
||||||
const proposalWriteFiles = getDyadWriteTags(messageContent);
|
const proposalWriteFiles = getMoreMinimoreWriteTags(messageContent);
|
||||||
const proposalSearchReplaceFiles =
|
const proposalSearchReplaceFiles =
|
||||||
getDyadSearchReplaceTags(messageContent);
|
getMoreMinimoreSearchReplaceTags(messageContent);
|
||||||
const proposalRenameFiles = getDyadRenameTags(messageContent);
|
const proposalRenameFiles = getMoreMinimoreRenameTags(messageContent);
|
||||||
const proposalDeleteFiles = getDyadDeleteTags(messageContent);
|
const proposalDeleteFiles = getMoreMinimoreDeleteTags(messageContent);
|
||||||
const proposalExecuteSqlQueries = getDyadExecuteSqlTags(messageContent);
|
const proposalExecuteSqlQueries = getMoreMinimoreExecuteSqlTags(messageContent);
|
||||||
const packagesAdded = getDyadAddDependencyTags(messageContent);
|
const packagesAdded = getMoreMinimoreAddDependencyTags(messageContent);
|
||||||
|
|
||||||
const filesChanged = [
|
const filesChanged = [
|
||||||
...proposalWriteFiles
|
...proposalWriteFiles
|
||||||
@@ -226,7 +226,7 @@ const getProposalHandler = async (
|
|||||||
}
|
}
|
||||||
const actions: ActionProposal["actions"] = [];
|
const actions: ActionProposal["actions"] = [];
|
||||||
if (latestAssistantMessage?.content) {
|
if (latestAssistantMessage?.content) {
|
||||||
const writeTags = getDyadWriteTags(latestAssistantMessage.content);
|
const writeTags = getMoreMinimoreWriteTags(latestAssistantMessage.content);
|
||||||
const refactorTarget = writeTags.reduce(
|
const refactorTarget = writeTags.reduce(
|
||||||
(largest, tag) => {
|
(largest, tag) => {
|
||||||
const lineCount = tag.content.split("\n").length;
|
const lineCount = tag.content.split("\n").length;
|
||||||
@@ -253,7 +253,7 @@ const getProposalHandler = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for command tags and add corresponding actions
|
// Check for command tags and add corresponding actions
|
||||||
const commandTags = getDyadCommandTags(latestAssistantMessage.content);
|
const commandTags = getMoreMinimoreCommandTags(latestAssistantMessage.content);
|
||||||
if (commandTags.includes("rebuild")) {
|
if (commandTags.includes("rebuild")) {
|
||||||
actions.push({
|
actions.push({
|
||||||
id: "rebuild",
|
id: "rebuild",
|
||||||
@@ -364,7 +364,7 @@ const approveProposalHandler = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. Process the actions defined in the message content
|
// 2. Process the actions defined in the message content
|
||||||
const chatSummary = getDyadChatSummaryTag(messageToApprove.content);
|
const chatSummary = getMoreMinimoreChatSummaryTag(messageToApprove.content);
|
||||||
const processResult = await processFullResponseActions(
|
const processResult = await processFullResponseActions(
|
||||||
messageToApprove.content,
|
messageToApprove.content,
|
||||||
chatId,
|
chatId,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export function registerReleaseNoteHandlers() {
|
|||||||
if (IS_TEST_BUILD) {
|
if (IS_TEST_BUILD) {
|
||||||
return { exists: false };
|
return { exists: false };
|
||||||
}
|
}
|
||||||
// Release notes disabled - removed Dyad API dependency
|
// Release notes disabled - removed MoreMinimore API dependency
|
||||||
logger.debug(`Release notes check disabled for version ${version}`);
|
logger.debug(`Release notes check disabled for version ${version}`);
|
||||||
return { exists: false };
|
return { exists: false };
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export function registerSupabaseHandlers() {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// Set app project - links a Dyad app to a Supabase project
|
// Set app project - links a MoreMinimore app to a Supabase project
|
||||||
handle(
|
handle(
|
||||||
"supabase:set-app-project",
|
"supabase:set-app-project",
|
||||||
async (
|
async (
|
||||||
@@ -66,7 +66,7 @@ export function registerSupabaseHandlers() {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// Unset app project - removes the link between a Dyad app and a Supabase project
|
// Unset app project - removes the link between a MoreMinimore app and a Supabase project
|
||||||
handle("supabase:unset-app-project", async (_, { app }: { app: number }) => {
|
handle("supabase:unset-app-project", async (_, { app }: { app: number }) => {
|
||||||
await db
|
await db
|
||||||
.update(apps)
|
.update(apps)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
SUPABASE_AVAILABLE_SYSTEM_PROMPT,
|
SUPABASE_AVAILABLE_SYSTEM_PROMPT,
|
||||||
SUPABASE_NOT_AVAILABLE_SYSTEM_PROMPT,
|
SUPABASE_NOT_AVAILABLE_SYSTEM_PROMPT,
|
||||||
} from "../../prompts/supabase_prompt";
|
} from "../../prompts/supabase_prompt";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
import { extractCodebase } from "../../utils/codebase";
|
import { extractCodebase } from "../../utils/codebase";
|
||||||
import { getSupabaseContext } from "../../supabase_admin/supabase_context";
|
import { getSupabaseContext } from "../../supabase_admin/supabase_context";
|
||||||
@@ -62,7 +62,7 @@ export function registerTokenCountHandlers() {
|
|||||||
|
|
||||||
// Count system prompt tokens
|
// Count system prompt tokens
|
||||||
let systemPrompt = constructSystemPrompt({
|
let systemPrompt = constructSystemPrompt({
|
||||||
aiRules: await readAiRules(getDyadAppPath(chat.app.path)),
|
aiRules: await readAiRules(getMoreMinimoreAppPath(chat.app.path)),
|
||||||
chatMode: settings.selectedChatMode,
|
chatMode: settings.selectedChatMode,
|
||||||
enableTurboEditsV2: isTurboEditsV2Enabled(settings),
|
enableTurboEditsV2: isTurboEditsV2Enabled(settings),
|
||||||
});
|
});
|
||||||
@@ -87,13 +87,13 @@ export function registerTokenCountHandlers() {
|
|||||||
let codebaseTokens = 0;
|
let codebaseTokens = 0;
|
||||||
|
|
||||||
if (chat.app) {
|
if (chat.app) {
|
||||||
const appPath = getDyadAppPath(chat.app.path);
|
const appPath = getMoreMinimoreAppPath(chat.app.path);
|
||||||
const { formattedOutput, files } = await extractCodebase({
|
const { formattedOutput, files } = await extractCodebase({
|
||||||
appPath,
|
appPath,
|
||||||
chatContext: validateChatContext(chat.app.chatContext),
|
chatContext: validateChatContext(chat.app.chatContext),
|
||||||
});
|
});
|
||||||
codebaseInfo = formattedOutput;
|
codebaseInfo = formattedOutput;
|
||||||
if (settings.enableDyadPro && settings.enableProSmartFilesContextMode) {
|
if (settings.enableMoreMinimorePro && settings.enableProSmartFilesContextMode) {
|
||||||
codebaseTokens = estimateTokens(
|
codebaseTokens = estimateTokens(
|
||||||
files
|
files
|
||||||
// It doesn't need to be the exact format but it's just to get a token estimate
|
// It doesn't need to be the exact format but it's just to get a token estimate
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { IS_TEST_BUILD } from "../utils/test_utils";
|
|||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import { CreateProjectFramework } from "@vercel/sdk/models/createprojectop.js";
|
import { CreateProjectFramework } from "@vercel/sdk/models/createprojectop.js";
|
||||||
import { getDyadAppPath } from "@/paths/paths";
|
import { getMoreMinimoreAppPath } from "@/paths/paths";
|
||||||
import {
|
import {
|
||||||
CreateVercelProjectParams,
|
CreateVercelProjectParams,
|
||||||
IsVercelProjectAvailableParams,
|
IsVercelProjectAvailableParams,
|
||||||
@@ -312,7 +312,7 @@ async function handleCreateProject(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Detect the framework from the app's directory
|
// Detect the framework from the app's directory
|
||||||
const detectedFramework = await detectFramework(getDyadAppPath(app.path));
|
const detectedFramework = await detectFramework(getMoreMinimoreAppPath(app.path));
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
`Detected framework: ${detectedFramework || "none detected"} for app at ${app.path}`,
|
`Detected framework: ${detectedFramework || "none detected"} for app at ${app.path}`,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import type {
|
|||||||
import type { GitCommit } from "../git_types";
|
import type { GitCommit } from "../git_types";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { withLock } from "../utils/lock_utils";
|
import { withLock } from "../utils/lock_utils";
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
import { createLoggedHandler } from "./safe_handle";
|
import { createLoggedHandler } from "./safe_handle";
|
||||||
@@ -81,7 +81,7 @@ export function registerVersionHandlers() {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
// Just return an empty array if the app is not a git repo.
|
// Just return an empty array if the app is not a git repo.
|
||||||
if (!fs.existsSync(path.join(appPath, ".git"))) {
|
if (!fs.existsSync(path.join(appPath, ".git"))) {
|
||||||
@@ -132,7 +132,7 @@ export function registerVersionHandlers() {
|
|||||||
throw new Error("App not found");
|
throw new Error("App not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
|
|
||||||
// Return appropriate result if the app is not a git repo
|
// Return appropriate result if the app is not a git repo
|
||||||
if (!fs.existsSync(path.join(appPath, ".git"))) {
|
if (!fs.existsSync(path.join(appPath, ".git"))) {
|
||||||
@@ -169,7 +169,7 @@ export function registerVersionHandlers() {
|
|||||||
throw new Error("App not found");
|
throw new Error("App not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
// Get the current commit hash before reverting
|
// Get the current commit hash before reverting
|
||||||
const currentCommitHash = await getCurrentCommitHash({
|
const currentCommitHash = await getCurrentCommitHash({
|
||||||
path: appPath,
|
path: appPath,
|
||||||
@@ -426,7 +426,7 @@ export function registerVersionHandlers() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const fullAppPath = getDyadAppPath(app.path);
|
const fullAppPath = getMoreMinimoreAppPath(app.path);
|
||||||
await gitCheckout({
|
await gitCheckout({
|
||||||
path: fullAppPath,
|
path: fullAppPath,
|
||||||
ref: gitRef,
|
ref: gitRef,
|
||||||
|
|||||||
@@ -276,10 +276,6 @@ export class IpcClient {
|
|||||||
return IpcClient.instance;
|
return IpcClient.instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async restartDyad(): Promise<void> {
|
|
||||||
await this.ipcRenderer.invoke("restart-dyad");
|
|
||||||
}
|
|
||||||
|
|
||||||
public async restartMoreMinimore(): Promise<void> {
|
public async restartMoreMinimore(): Promise<void> {
|
||||||
await this.ipcRenderer.invoke("restart-dyad");
|
await this.ipcRenderer.invoke("restart-dyad");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { db } from "../../db";
|
|||||||
import { chats, messages } from "../../db/schema";
|
import { chats, messages } from "../../db/schema";
|
||||||
import { and, eq } from "drizzle-orm";
|
import { and, eq } from "drizzle-orm";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { safeJoin } from "../utils/path_utils";
|
import { safeJoin } from "../utils/path_utils";
|
||||||
|
|
||||||
@@ -30,12 +30,12 @@ import {
|
|||||||
import { readSettings } from "@/main/settings";
|
import { readSettings } from "@/main/settings";
|
||||||
import { writeMigrationFile } from "../utils/file_utils";
|
import { writeMigrationFile } from "../utils/file_utils";
|
||||||
import {
|
import {
|
||||||
getDyadWriteTags,
|
getMoreMinimoreWriteTags,
|
||||||
getDyadRenameTags,
|
getMoreMinimoreRenameTags,
|
||||||
getDyadDeleteTags,
|
getMoreMinimoreDeleteTags,
|
||||||
getDyadAddDependencyTags,
|
getMoreMinimoreAddDependencyTags,
|
||||||
getDyadExecuteSqlTags,
|
getMoreMinimoreExecuteSqlTags,
|
||||||
getDyadSearchReplaceTags,
|
getMoreMinimoreSearchReplaceTags,
|
||||||
} from "../utils/dyad_tag_parser";
|
} from "../utils/dyad_tag_parser";
|
||||||
import { applySearchReplace } from "../../pro/main/ipc/processors/search_replace_processor";
|
import { applySearchReplace } from "../../pro/main/ipc/processors/search_replace_processor";
|
||||||
import { storeDbTimestampAtCurrentVersion } from "../utils/neon_timestamp_utils";
|
import { storeDbTimestampAtCurrentVersion } from "../utils/neon_timestamp_utils";
|
||||||
@@ -58,7 +58,7 @@ export async function dryRunSearchReplace({
|
|||||||
appPath: string;
|
appPath: string;
|
||||||
}) {
|
}) {
|
||||||
const issues: { filePath: string; error: string }[] = [];
|
const issues: { filePath: string; error: string }[] = [];
|
||||||
const dyadSearchReplaceTags = getDyadSearchReplaceTags(fullResponse);
|
const dyadSearchReplaceTags = getMoreMinimoreSearchReplaceTags(fullResponse);
|
||||||
for (const tag of dyadSearchReplaceTags) {
|
for (const tag of dyadSearchReplaceTags) {
|
||||||
const filePath = tag.path;
|
const filePath = tag.path;
|
||||||
const fullFilePath = safeJoin(appPath, filePath);
|
const fullFilePath = safeJoin(appPath, filePath);
|
||||||
@@ -141,7 +141,7 @@ export async function processFullResponseActions(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const settings: UserSettings = readSettings();
|
const settings: UserSettings = readSettings();
|
||||||
const appPath = getDyadAppPath(chatWithApp.app.path);
|
const appPath = getMoreMinimoreAppPath(chatWithApp.app.path);
|
||||||
const writtenFiles: string[] = [];
|
const writtenFiles: string[] = [];
|
||||||
const renamedFiles: string[] = [];
|
const renamedFiles: string[] = [];
|
||||||
const deletedFiles: string[] = [];
|
const deletedFiles: string[] = [];
|
||||||
@@ -154,12 +154,12 @@ export async function processFullResponseActions(
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Extract all tags
|
// Extract all tags
|
||||||
const dyadWriteTags = getDyadWriteTags(fullResponse);
|
const dyadWriteTags = getMoreMinimoreWriteTags(fullResponse);
|
||||||
const dyadRenameTags = getDyadRenameTags(fullResponse);
|
const dyadRenameTags = getMoreMinimoreRenameTags(fullResponse);
|
||||||
const dyadDeletePaths = getDyadDeleteTags(fullResponse);
|
const dyadDeletePaths = getMoreMinimoreDeleteTags(fullResponse);
|
||||||
const dyadAddDependencyPackages = getDyadAddDependencyTags(fullResponse);
|
const dyadAddDependencyPackages = getMoreMinimoreAddDependencyTags(fullResponse);
|
||||||
const dyadExecuteSqlQueries = chatWithApp.app.supabaseProjectId
|
const dyadExecuteSqlQueries = chatWithApp.app.supabaseProjectId
|
||||||
? getDyadExecuteSqlTags(fullResponse)
|
? getMoreMinimoreExecuteSqlTags(fullResponse)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
const message = await db.query.messages.findFirst({
|
const message = await db.query.messages.findFirst({
|
||||||
@@ -357,7 +357,7 @@ export async function processFullResponseActions(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Process all search-replace edits
|
// Process all search-replace edits
|
||||||
const dyadSearchReplaceTags = getDyadSearchReplaceTags(fullResponse);
|
const dyadSearchReplaceTags = getMoreMinimoreSearchReplaceTags(fullResponse);
|
||||||
for (const tag of dyadSearchReplaceTags) {
|
for (const tag of dyadSearchReplaceTags) {
|
||||||
const filePath = tag.path;
|
const filePath = tag.path;
|
||||||
const fullFilePath = safeJoin(appPath, filePath);
|
const fullFilePath = safeJoin(appPath, filePath);
|
||||||
@@ -551,7 +551,7 @@ export async function processFullResponseActions(
|
|||||||
try {
|
try {
|
||||||
commitHash = await gitCommit({
|
commitHash = await gitCommit({
|
||||||
path: appPath,
|
path: appPath,
|
||||||
message: message + " + extra files edited outside of Dyad",
|
message: message + " + extra files edited outside of MoreMinimore",
|
||||||
amend: true,
|
amend: true,
|
||||||
});
|
});
|
||||||
logger.log(
|
logger.log(
|
||||||
@@ -559,7 +559,7 @@ export async function processFullResponseActions(
|
|||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Just log, but don't throw an error because the user can still
|
// Just log, but don't throw an error because the user can still
|
||||||
// commit these changes outside of Dyad if needed.
|
// commit these changes outside of MoreMinimore if needed.
|
||||||
logger.error(
|
logger.error(
|
||||||
`Failed to commit changes outside of dyad: ${uncommittedFiles.join(
|
`Failed to commit changes outside of dyad: ${uncommittedFiles.join(
|
||||||
", ",
|
", ",
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import log from "electron-log";
|
|||||||
import { WorkerInput, WorkerOutput } from "../../../shared/tsc_types";
|
import { WorkerInput, WorkerOutput } from "../../../shared/tsc_types";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getDyadDeleteTags,
|
getMoreMinimoreDeleteTags,
|
||||||
getDyadRenameTags,
|
getMoreMinimoreRenameTags,
|
||||||
getDyadWriteTags,
|
getMoreMinimoreWriteTags,
|
||||||
} from "../utils/dyad_tag_parser";
|
} from "../utils/dyad_tag_parser";
|
||||||
import { getTypeScriptCachePath } from "@/paths/paths";
|
import { getTypeScriptCachePath } from "@/paths/paths";
|
||||||
|
|
||||||
@@ -58,9 +58,9 @@ export async function generateProblemReport({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const writeTags = getDyadWriteTags(fullResponse);
|
const writeTags = getMoreMinimoreWriteTags(fullResponse);
|
||||||
const renameTags = getDyadRenameTags(fullResponse);
|
const renameTags = getMoreMinimoreRenameTags(fullResponse);
|
||||||
const deletePaths = getDyadDeleteTags(fullResponse);
|
const deletePaths = getMoreMinimoreDeleteTags(fullResponse);
|
||||||
const virtualChanges = {
|
const virtualChanges = {
|
||||||
deletePaths,
|
deletePaths,
|
||||||
renameTags,
|
renameTags,
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ export const CLOUD_PROVIDERS: Record<
|
|||||||
displayName: "Google Vertex AI",
|
displayName: "Google Vertex AI",
|
||||||
hasFreeTier: false,
|
hasFreeTier: false,
|
||||||
websiteUrl: "https://console.cloud.google.com/vertex-ai",
|
websiteUrl: "https://console.cloud.google.com/vertex-ai",
|
||||||
// Use the same gateway prefix as Google Gemini for Dyad Pro compatibility.
|
// Use the same gateway prefix as Google Gemini for MoreMinimore Pro compatibility.
|
||||||
gatewayPrefix: "gemini/",
|
gatewayPrefix: "gemini/",
|
||||||
secondary: true,
|
secondary: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Environment variables are sensitive and should not be logged.
|
* Environment variables are sensitive and should not be logged.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { getDyadAppPath } from "@/paths/paths";
|
import { getMoreMinimoreAppPath } from "@/paths/paths";
|
||||||
import { EnvVar } from "../ipc_types";
|
import { EnvVar } from "../ipc_types";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
@@ -14,7 +14,7 @@ const logger = log.scope("app_env_var_utils");
|
|||||||
export const ENV_FILE_NAME = ".env.local";
|
export const ENV_FILE_NAME = ".env.local";
|
||||||
|
|
||||||
function getEnvFilePath({ appPath }: { appPath: string }): string {
|
function getEnvFilePath({ appPath }: { appPath: string }): string {
|
||||||
return path.join(getDyadAppPath(appPath), ENV_FILE_NAME);
|
return path.join(getMoreMinimoreAppPath(appPath), ENV_FILE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updatePostgresUrlEnvVar({
|
export async function updatePostgresUrlEnvVar({
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { SqlQuery } from "../../lib/schemas";
|
|||||||
|
|
||||||
const logger = log.scope("dyad_tag_parser");
|
const logger = log.scope("dyad_tag_parser");
|
||||||
|
|
||||||
export function getDyadWriteTags(fullResponse: string): {
|
export function getMoreMinimoreWriteTags(fullResponse: string): {
|
||||||
path: string;
|
path: string;
|
||||||
content: string;
|
content: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
@@ -47,7 +47,7 @@ export function getDyadWriteTags(fullResponse: string): {
|
|||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDyadRenameTags(fullResponse: string): {
|
export function getMoreMinimoreRenameTags(fullResponse: string): {
|
||||||
from: string;
|
from: string;
|
||||||
to: string;
|
to: string;
|
||||||
}[] {
|
}[] {
|
||||||
@@ -64,7 +64,7 @@ export function getDyadRenameTags(fullResponse: string): {
|
|||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDyadDeleteTags(fullResponse: string): string[] {
|
export function getMoreMinimoreDeleteTags(fullResponse: string): string[] {
|
||||||
const dyadDeleteRegex =
|
const dyadDeleteRegex =
|
||||||
/<dyad-delete path="([^"]+)"[^>]*>([\s\S]*?)<\/dyad-delete>/g;
|
/<dyad-delete path="([^"]+)"[^>]*>([\s\S]*?)<\/dyad-delete>/g;
|
||||||
let match;
|
let match;
|
||||||
@@ -75,7 +75,7 @@ export function getDyadDeleteTags(fullResponse: string): string[] {
|
|||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDyadAddDependencyTags(fullResponse: string): string[] {
|
export function getMoreMinimoreAddDependencyTags(fullResponse: string): string[] {
|
||||||
const dyadAddDependencyRegex =
|
const dyadAddDependencyRegex =
|
||||||
/<dyad-add-dependency packages="([^"]+)">[^<]*<\/dyad-add-dependency>/g;
|
/<dyad-add-dependency packages="([^"]+)">[^<]*<\/dyad-add-dependency>/g;
|
||||||
let match;
|
let match;
|
||||||
@@ -86,7 +86,7 @@ export function getDyadAddDependencyTags(fullResponse: string): string[] {
|
|||||||
return packages;
|
return packages;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDyadChatSummaryTag(fullResponse: string): string | null {
|
export function getMoreMinimoreChatSummaryTag(fullResponse: string): string | null {
|
||||||
const dyadChatSummaryRegex =
|
const dyadChatSummaryRegex =
|
||||||
/<dyad-chat-summary>([\s\S]*?)<\/dyad-chat-summary>/g;
|
/<dyad-chat-summary>([\s\S]*?)<\/dyad-chat-summary>/g;
|
||||||
const match = dyadChatSummaryRegex.exec(fullResponse);
|
const match = dyadChatSummaryRegex.exec(fullResponse);
|
||||||
@@ -96,7 +96,7 @@ export function getDyadChatSummaryTag(fullResponse: string): string | null {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDyadExecuteSqlTags(fullResponse: string): SqlQuery[] {
|
export function getMoreMinimoreExecuteSqlTags(fullResponse: string): SqlQuery[] {
|
||||||
const dyadExecuteSqlRegex =
|
const dyadExecuteSqlRegex =
|
||||||
/<dyad-execute-sql([^>]*)>([\s\S]*?)<\/dyad-execute-sql>/g;
|
/<dyad-execute-sql([^>]*)>([\s\S]*?)<\/dyad-execute-sql>/g;
|
||||||
const descriptionRegex = /description="([^"]+)"/;
|
const descriptionRegex = /description="([^"]+)"/;
|
||||||
@@ -125,7 +125,7 @@ export function getDyadExecuteSqlTags(fullResponse: string): SqlQuery[] {
|
|||||||
return queries;
|
return queries;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDyadCommandTags(fullResponse: string): string[] {
|
export function getMoreMinimoreCommandTags(fullResponse: string): string[] {
|
||||||
const dyadCommandRegex =
|
const dyadCommandRegex =
|
||||||
/<dyad-command type="([^"]+)"[^>]*><\/dyad-command>/g;
|
/<dyad-command type="([^"]+)"[^>]*><\/dyad-command>/g;
|
||||||
let match;
|
let match;
|
||||||
@@ -138,7 +138,7 @@ export function getDyadCommandTags(fullResponse: string): string[] {
|
|||||||
return commands;
|
return commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDyadSearchReplaceTags(fullResponse: string): {
|
export function getMoreMinimoreSearchReplaceTags(fullResponse: string): {
|
||||||
path: string;
|
path: string;
|
||||||
content: string;
|
content: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
|||||||
@@ -19,14 +19,14 @@ import log from "electron-log";
|
|||||||
import { FREE_OPENROUTER_MODEL_NAMES } from "../shared/language_model_constants";
|
import { FREE_OPENROUTER_MODEL_NAMES } from "../shared/language_model_constants";
|
||||||
import { getLanguageModelProviders } from "../shared/language_model_helpers";
|
import { getLanguageModelProviders } from "../shared/language_model_helpers";
|
||||||
import { LanguageModelProvider } from "../ipc_types";
|
import { LanguageModelProvider } from "../ipc_types";
|
||||||
// // // // // import { createDyadEngine } from "./llm_engine_provider"; // Removed - Dyad Engine dependency // Removed - Dyad Engine dependency // Removed - Dyad Engine dependency // Removed - Dyad Engine dependency // Removed - Dyad Engine dependency
|
// // // // // // // // // import { createMoreMinimoreEngine } from "./llm_engine_provider"; // Removed - MoreMinimore Engine dependency // Removed - MoreMinimore Engine dependency // Removed - MoreMinimore Engine dependency // Removed - MoreMinimore Engine dependency // Removed - MoreMinimore Engine dependency // Removed - MoreMinimore Engine dependency // Removed - MoreMinimore Engine dependency // Removed - MoreMinimore Engine dependency // Removed - MoreMinimore Engine dependency
|
||||||
|
|
||||||
import { LM_STUDIO_BASE_URL } from "./lm_studio_utils";
|
import { LM_STUDIO_BASE_URL } from "./lm_studio_utils";
|
||||||
import { createOllamaProvider } from "./ollama_provider";
|
import { createOllamaProvider } from "./ollama_provider";
|
||||||
import { getOllamaApiUrl } from "../handlers/local_model_ollama_handler";
|
import { getOllamaApiUrl } from "../handlers/local_model_ollama_handler";
|
||||||
import { createFallback } from "./fallback_ai_model";
|
import { createFallback } from "./fallback_ai_model";
|
||||||
|
|
||||||
// const dyadEngineUrl = process.env.DYAD_ENGINE_URL; // Removed - Dyad Engine dependency
|
// const dyadEngineUrl = process.env.DYAD_ENGINE_URL; // Removed - MoreMinimore Engine dependency
|
||||||
|
|
||||||
const AUTO_MODELS = [
|
const AUTO_MODELS = [
|
||||||
{
|
{
|
||||||
@@ -73,11 +73,11 @@ export async function getModelClient(
|
|||||||
throw new Error(`Configuration not found for provider: ${model.provider}`);
|
throw new Error(`Configuration not found for provider: ${model.provider}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dyad Pro functionality removed - eliminated Dyad Engine dependency
|
// MoreMinimore Pro functionality removed - eliminated MoreMinimore Engine dependency
|
||||||
// All models now use direct provider connections
|
// All models now use direct provider connections
|
||||||
if (dyadApiKey && settings.enableDyadPro) {
|
if (dyadApiKey && settings.enableMoreMinimorePro) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Dyad Pro was enabled but has been disabled to remove Dyad API dependency. Falling back to direct provider connection.`,
|
`MoreMinimore Pro was enabled but has been disabled to remove MoreMinimore API dependency. Falling back to direct provider connection.`,
|
||||||
);
|
);
|
||||||
// Fall through to regular provider logic
|
// Fall through to regular provider logic
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ or to provide a custom fetch implementation for e.g. testing.
|
|||||||
settings: UserSettings;
|
settings: UserSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DyadEngineProvider {
|
export interface MoreMinimoreEngineProvider {
|
||||||
/**
|
/**
|
||||||
Creates a model for text generation.
|
Creates a model for text generation.
|
||||||
*/
|
*/
|
||||||
@@ -64,9 +64,9 @@ Creates a chat model for text generation.
|
|||||||
): LanguageModelV2;
|
): LanguageModelV2;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createDyadEngine(
|
export function createMoreMinimoreEngine(
|
||||||
options: ExampleProviderSettings,
|
options: ExampleProviderSettings,
|
||||||
): DyadEngineProvider {
|
): MoreMinimoreEngineProvider {
|
||||||
const baseURL = withoutTrailingSlash(options.baseURL);
|
const baseURL = withoutTrailingSlash(options.baseURL);
|
||||||
logger.info("creating dyad engine with baseURL", baseURL);
|
logger.info("creating dyad engine with baseURL", baseURL);
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ export function createDyadEngine(
|
|||||||
headers: {
|
headers: {
|
||||||
...init.headers,
|
...init.headers,
|
||||||
...(modifiedRequestId && {
|
...(modifiedRequestId && {
|
||||||
"X-Dyad-Request-Id": modifiedRequestId,
|
"X-MoreMinimore-Request-Id": modifiedRequestId,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
body: JSON.stringify(parsedBody),
|
body: JSON.stringify(parsedBody),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { db } from "../../db";
|
import { db } from "../../db";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { CodebaseFile, extractCodebase } from "../../utils/codebase";
|
import { CodebaseFile, extractCodebase } from "../../utils/codebase";
|
||||||
import { validateChatContext } from "../utils/context_paths_utils";
|
import { validateChatContext } from "../utils/context_paths_utils";
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
@@ -33,7 +33,7 @@ export async function extractMentionedAppsCodebases(
|
|||||||
|
|
||||||
for (const app of mentionedApps) {
|
for (const app of mentionedApps) {
|
||||||
try {
|
try {
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const chatContext = validateChatContext(app.chatContext);
|
const chatContext = validateChatContext(app.chatContext);
|
||||||
|
|
||||||
const { formattedOutput, files } = await extractCodebase({
|
const { formattedOutput, files } = await extractCodebase({
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { db } from "../../db";
|
import { db } from "../../db";
|
||||||
import { versions, apps } from "../../db/schema";
|
import { versions, apps } from "../../db/schema";
|
||||||
import { eq, and } from "drizzle-orm";
|
import { eq, and } from "drizzle-orm";
|
||||||
import { getDyadAppPath } from "../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../paths/paths";
|
||||||
import { neon } from "@neondatabase/serverless";
|
import { neon } from "@neondatabase/serverless";
|
||||||
|
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
@@ -60,7 +60,7 @@ export async function storeDbTimestampAtCurrentVersion({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. Get the current commit hash
|
// 2. Get the current commit hash
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const currentCommitHash = await getCurrentCommitHash({ path: appPath });
|
const currentCommitHash = await getCurrentCommitHash({ path: appPath });
|
||||||
|
|
||||||
logger.info(`Current commit hash: ${currentCommitHash}`);
|
logger.info(`Current commit hash: ${currentCommitHash}`);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export interface VersionedFiles {
|
|||||||
hasExternalChanges: boolean;
|
hasExternalChanges: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DyadEngineProviderOptions {
|
interface MoreMinimoreEngineProviderOptions {
|
||||||
sourceCommitHash: string | null;
|
sourceCommitHash: string | null;
|
||||||
commitHash: string | null;
|
commitHash: string | null;
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@ export async function processChatMessagesWithVersionedFiles({
|
|||||||
// Extract sourceCommitHash from providerOptions
|
// Extract sourceCommitHash from providerOptions
|
||||||
const engineOptions = message.providerOptions?.[
|
const engineOptions = message.providerOptions?.[
|
||||||
"dyad-engine"
|
"dyad-engine"
|
||||||
] as unknown as DyadEngineProviderOptions;
|
] as unknown as MoreMinimoreEngineProviderOptions;
|
||||||
const sourceCommitHash = engineOptions?.sourceCommitHash;
|
const sourceCommitHash = engineOptions?.sourceCommitHash;
|
||||||
|
|
||||||
// Skip messages without sourceCommitHash
|
// Skip messages without sourceCommitHash
|
||||||
@@ -226,7 +226,7 @@ export async function processChatMessagesWithVersionedFiles({
|
|||||||
if (message.role === "assistant") {
|
if (message.role === "assistant") {
|
||||||
const engineOptions = message.providerOptions?.[
|
const engineOptions = message.providerOptions?.[
|
||||||
"dyad-engine"
|
"dyad-engine"
|
||||||
] as unknown as DyadEngineProviderOptions;
|
] as unknown as MoreMinimoreEngineProviderOptions;
|
||||||
if (engineOptions?.commitHash) {
|
if (engineOptions?.commitHash) {
|
||||||
latestCommitHash = engineOptions.commitHash;
|
latestCommitHash = engineOptions.commitHash;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -178,11 +178,11 @@ export const ExperimentsSchema = z.object({
|
|||||||
});
|
});
|
||||||
export type Experiments = z.infer<typeof ExperimentsSchema>;
|
export type Experiments = z.infer<typeof ExperimentsSchema>;
|
||||||
|
|
||||||
export const DyadProBudgetSchema = z.object({
|
export const MoreMinimoreProBudgetSchema = z.object({
|
||||||
budgetResetAt: z.string(),
|
budgetResetAt: z.string(),
|
||||||
maxBudget: z.number(),
|
maxBudget: z.number(),
|
||||||
});
|
});
|
||||||
export type DyadProBudget = z.infer<typeof DyadProBudgetSchema>;
|
export type MoreMinimoreProBudget = z.infer<typeof MoreMinimoreProBudgetSchema>;
|
||||||
|
|
||||||
export const GlobPathSchema = z.object({
|
export const GlobPathSchema = z.object({
|
||||||
globPath: z.string(),
|
globPath: z.string(),
|
||||||
@@ -235,7 +235,7 @@ export const UserSettingsSchema = z.object({
|
|||||||
telemetryConsent: z.enum(["opted_in", "opted_out", "unset"]).optional(),
|
telemetryConsent: z.enum(["opted_in", "opted_out", "unset"]).optional(),
|
||||||
telemetryUserId: z.string().optional(),
|
telemetryUserId: z.string().optional(),
|
||||||
hasRunBefore: z.boolean().optional(),
|
hasRunBefore: z.boolean().optional(),
|
||||||
enableDyadPro: z.boolean().optional(),
|
enableMoreMinimorePro: z.boolean().optional(),
|
||||||
experiments: ExperimentsSchema.optional(),
|
experiments: ExperimentsSchema.optional(),
|
||||||
lastShownReleaseNotesVersion: z.string().optional(),
|
lastShownReleaseNotesVersion: z.string().optional(),
|
||||||
maxChatTurnsInContext: z.number().optional(),
|
maxChatTurnsInContext: z.number().optional(),
|
||||||
@@ -278,7 +278,7 @@ export const UserSettingsSchema = z.object({
|
|||||||
// DEPRECATED.
|
// DEPRECATED.
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
enableProSaverMode: z.boolean().optional(),
|
enableProSaverMode: z.boolean().optional(),
|
||||||
dyadProBudget: DyadProBudgetSchema.optional(),
|
dyadProBudget: MoreMinimoreProBudgetSchema.optional(),
|
||||||
runtimeMode: RuntimeModeSchema.optional(),
|
runtimeMode: RuntimeModeSchema.optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -287,17 +287,17 @@ export const UserSettingsSchema = z.object({
|
|||||||
*/
|
*/
|
||||||
export type UserSettings = z.infer<typeof UserSettingsSchema>;
|
export type UserSettings = z.infer<typeof UserSettingsSchema>;
|
||||||
|
|
||||||
export function isDyadProEnabled(settings: UserSettings): boolean {
|
export function isMoreMinimoreProEnabled(settings: UserSettings): boolean {
|
||||||
return settings.enableDyadPro === true && hasDyadProKey(settings);
|
return settings.enableMoreMinimorePro === true && hasMoreMinimoreProKey(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function hasDyadProKey(settings: UserSettings): boolean {
|
export function hasMoreMinimoreProKey(settings: UserSettings): boolean {
|
||||||
return !!settings.providerSettings?.auto?.apiKey?.value;
|
return !!settings.providerSettings?.auto?.apiKey?.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isTurboEditsV2Enabled(settings: UserSettings): boolean {
|
export function isTurboEditsV2Enabled(settings: UserSettings): boolean {
|
||||||
return Boolean(
|
return Boolean(
|
||||||
isDyadProEnabled(settings) &&
|
isMoreMinimoreProEnabled(settings) &&
|
||||||
settings.enableProLazyEditsMode === true &&
|
settings.enableProLazyEditsMode === true &&
|
||||||
settings.proLazyEditsMode === "v2",
|
settings.proLazyEditsMode === "v2",
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ export const showExtraFilesToast = ({
|
|||||||
}) => {
|
}) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
showError(
|
showError(
|
||||||
`Error committing files ${files.join(", ")} changed outside of Dyad: ${error}`,
|
`Error committing files ${files.join(", ")} changed outside of MoreMinimore: ${error}`,
|
||||||
);
|
);
|
||||||
posthog.capture("extra-files:error", {
|
posthog.capture("extra-files:error", {
|
||||||
files: files,
|
files: files,
|
||||||
@@ -154,7 +154,7 @@ export const showExtraFilesToast = ({
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
showWarning(
|
showWarning(
|
||||||
`Files changed outside of Dyad have automatically been committed:
|
`Files changed outside of MoreMinimore have automatically been committed:
|
||||||
\n\n${files.join("\n")}`,
|
\n\n${files.join("\n")}`,
|
||||||
);
|
);
|
||||||
posthog.capture("extra-files:warning", {
|
posthog.capture("extra-files:warning", {
|
||||||
|
|||||||
10
src/main.ts
10
src/main.ts
@@ -4,7 +4,7 @@ import { registerIpcHandlers } from "./ipc/ipc_host";
|
|||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import started from "electron-squirrel-startup";
|
import started from "electron-squirrel-startup";
|
||||||
// import { updateElectronApp, UpdateSourceType } from "update-electron-app"; // Removed - Dyad API dependency
|
// import { updateElectronApp, UpdateSourceType } from "update-electron-app"; // Removed - MoreMinimore API dependency
|
||||||
import log from "electron-log";
|
import log from "electron-log";
|
||||||
import {
|
import {
|
||||||
getSettingsFilePath,
|
getSettingsFilePath,
|
||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
writeSettings,
|
writeSettings,
|
||||||
} from "./main/settings";
|
} from "./main/settings";
|
||||||
import { handleSupabaseOAuthReturn } from "./supabase_admin/supabase_return_handler";
|
import { handleSupabaseOAuthReturn } from "./supabase_admin/supabase_return_handler";
|
||||||
import { handleDyadProReturn } from "./main/pro";
|
import { handleMoreMinimoreProReturn } from "./main/pro";
|
||||||
import { IS_TEST_BUILD } from "./ipc/utils/test_utils";
|
import { IS_TEST_BUILD } from "./ipc/utils/test_utils";
|
||||||
import { BackupManager } from "./backup_manager";
|
import { BackupManager } from "./backup_manager";
|
||||||
import { getDatabasePath, initializeDatabase } from "./db";
|
import { getDatabasePath, initializeDatabase } from "./db";
|
||||||
@@ -107,8 +107,8 @@ export async function onReady() {
|
|||||||
await onFirstRunMaybe(settings);
|
await onFirstRunMaybe(settings);
|
||||||
createWindow();
|
createWindow();
|
||||||
|
|
||||||
logger.info("Auto-update disabled - removed Dyad API dependency");
|
logger.info("Auto-update disabled - removed MoreMinimore API dependency");
|
||||||
// Auto-update functionality removed to eliminate Dyad API dependency
|
// Auto-update functionality removed to eliminate MoreMinimore API dependency
|
||||||
// Users can manually update by downloading new releases from GitHub
|
// Users can manually update by downloading new releases from GitHub
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,7 +356,7 @@ function handleDeepLinkReturn(url: string) {
|
|||||||
dialog.showErrorBox("Invalid URL", "Expected key");
|
dialog.showErrorBox("Invalid URL", "Expected key");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handleDyadProReturn({
|
handleMoreMinimoreProReturn({
|
||||||
apiKey,
|
apiKey,
|
||||||
});
|
});
|
||||||
// Send message to renderer to trigger re-render
|
// Send message to renderer to trigger re-render
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { readSettings, writeSettings } from "./settings";
|
import { readSettings, writeSettings } from "./settings";
|
||||||
|
|
||||||
export function handleDyadProReturn({ apiKey }: { apiKey: string }) {
|
export function handleMoreMinimoreProReturn({ apiKey }: { apiKey: string }) {
|
||||||
const settings = readSettings();
|
const settings = readSettings();
|
||||||
writeSettings({
|
writeSettings({
|
||||||
providerSettings: {
|
providerSettings: {
|
||||||
@@ -12,6 +12,6 @@ export function handleDyadProReturn({ apiKey }: { apiKey: string }) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
enableDyadPro: true,
|
enableMoreMinimorePro: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import path from "node:path";
|
|||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
import { IS_TEST_BUILD } from "../ipc/utils/test_utils";
|
import { IS_TEST_BUILD } from "../ipc/utils/test_utils";
|
||||||
|
|
||||||
export function getDyadAppPath(appPath: string): string {
|
export function getMoreMinimoreAppPath(appPath: string): string {
|
||||||
if (IS_TEST_BUILD) {
|
if (IS_TEST_BUILD) {
|
||||||
const electron = getElectron();
|
const electron = getElectron();
|
||||||
return path.join(electron!.app.getPath("userData"), "dyad-apps", appPath);
|
return path.join(electron!.app.getPath("userData"), "dyad-apps", appPath);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import path from "path";
|
|||||||
import { db } from "../../../../db";
|
import { db } from "../../../../db";
|
||||||
import { apps } from "../../../../db/schema";
|
import { apps } from "../../../../db/schema";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import { getDyadAppPath } from "../../../../paths/paths";
|
import { getMoreMinimoreAppPath } from "../../../../paths/paths";
|
||||||
import {
|
import {
|
||||||
stylesToTailwind,
|
stylesToTailwind,
|
||||||
extractClassPrefixes,
|
extractClassPrefixes,
|
||||||
@@ -39,7 +39,7 @@ export function registerVisualEditingHandlers() {
|
|||||||
throw new Error(`App not found: ${appId}`);
|
throw new Error(`App not found: ${appId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const fileChanges = new Map<
|
const fileChanges = new Map<
|
||||||
string,
|
string,
|
||||||
Map<
|
Map<
|
||||||
@@ -112,7 +112,7 @@ export function registerVisualEditingHandlers() {
|
|||||||
throw new Error(`App not found: ${appId}`);
|
throw new Error(`App not found: ${appId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const appPath = getDyadAppPath(app.path);
|
const appPath = getMoreMinimoreAppPath(app.path);
|
||||||
const fullPath = safeJoin(appPath, filePath);
|
const fullPath = safeJoin(appPath, filePath);
|
||||||
const content = await fsPromises.readFile(fullPath, "utf-8");
|
const content = await fsPromises.readFile(fullPath, "utf-8");
|
||||||
return analyzeComponent(content, line);
|
return analyzeComponent(content, line);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ This structured thinking ensures you:
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const BUILD_SYSTEM_PREFIX = `
|
export const BUILD_SYSTEM_PREFIX = `
|
||||||
<role> You are Dyad, an AI editor that creates and modifies web applications. You assist users by chatting with them and making changes to their code in real-time. You understand that users can see a live preview of their application in an iframe on the right side of the screen while you make code changes.
|
<role> You are MoreMinimore, an AI editor that creates and modifies web applications. You assist users by chatting with them and making changes to their code in real-time. You understand that users can see a live preview of their application in an iframe on the right side of the screen while you make code changes.
|
||||||
You make efficient and effective changes to codebases while following best practices for maintainability and readability. You take pride in keeping things simple and elegant. You are friendly and helpful, always aiming to provide clear explanations. </role>
|
You make efficient and effective changes to codebases while following best practices for maintainability and readability. You take pride in keeping things simple and elegant. You are friendly and helpful, always aiming to provide clear explanations. </role>
|
||||||
|
|
||||||
# App Preview / Commands
|
# App Preview / Commands
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ async function getPublishableKey({ projectId }: { projectId: string }) {
|
|||||||
|
|
||||||
if (!publishableKey) {
|
if (!publishableKey) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"No publishable key found for project. Make sure you are connected to the correct Supabase account and project. See https://dyad.sh/docs/integrations/supabase#no-publishable-keys",
|
"No publishable key found for project. Make sure you are connected to the correct Supabase account and project. See https://moreminimore.com/docs/integrations/supabase#no-publishable-keys",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return publishableKey.api_key;
|
return publishableKey.api_key;
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ export async function extractCodebase({
|
|||||||
}> {
|
}> {
|
||||||
const settings = readSettings();
|
const settings = readSettings();
|
||||||
const isSmartContextEnabled =
|
const isSmartContextEnabled =
|
||||||
settings?.enableDyadPro && settings?.enableProSmartFilesContextMode;
|
settings?.enableMoreMinimorePro && settings?.enableProSmartFilesContextMode;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await fsAsync.access(appPath);
|
await fsAsync.access(appPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user