diff --git a/.gitignore b/.gitignore index 8266f60..1db18fb 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ next-env.d.ts # logs logs *.log +fix_*.py diff --git a/README.md b/README.md index 1f74f02..b27df84 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,8 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | Version | Date | Highlights | |---------|------|------------| +| [1.6.0](CHANGELOG.md#160---2026-03-18) | 2026-03-18 20:34 | SEO web audit, URL fetching, auto web search for SEO mode | +| [1.5.0](CHANGELOG.md#150---2026-03-18) | 2026-03-18 20:29 | Modification progress overlay, preview blink fix | | [1.4.0](CHANGELOG.md#140---2026-03-18) | 2026-03-18 19:57 | Review Code button, web search grounding, responsive preview, model selector fix | | [1.3.0](CHANGELOG.md#130---2026-03-18) | 2026-03-18 18:51 | Plan-first workflow, OpenRouter, post-coding UX, enhanced prompt engine | | [1.2.0](CHANGELOG.md#120---2026-01-19) | 2026-01-19 19:16 | SEO agent fixes, Z.AI API validation | diff --git a/fix_device_array.py b/fix_device_array.py deleted file mode 100644 index 05d13c6..0000000 --- a/fix_device_array.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python3 -fp = '/home/uroma/promptarch/components/AIAssist.tsx' -with open(fp, 'r') as f: - content = f.read() - -# Fix the array that lost all its quotes -old = '{([[full, Full], [desktop, Desktop], [tablet, Tablet], [mobile, Mobile]] as const).map(([size, label]) => (' -new = '{([["full", "Full"], ["desktop", "Desktop"], ["tablet", "Tablet"], ["mobile", "Mobile"]] as const).map(([size, label]) => (' - -if old in content: - content = content.replace(old, new, 1) - print('Fixed array quotes') -else: - print('WARNING: Could not find array') - -with open(fp, 'w') as f: - f.write(content) diff --git a/fix_device_buttons.py b/fix_device_buttons.py deleted file mode 100644 index 650d691..0000000 --- a/fix_device_buttons.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python3 -fp = '/home/uroma/promptarch/components/AIAssist.tsx' -with open(fp, 'r') as f: - content = f.read() - -changes = 0 - -# Fix 1: viewMode === preview -> viewMode === "preview" -old = 'viewMode === preview && (' -new = 'viewMode === "preview" && (' -if old in content: - content = content.replace(old, new, 1) - changes += 1 - print('Fix 1: viewMode quote restored') - -# Fix 2: className=flex -> className="flex" -old = 'className=flex items-center gap-1 mt-1.5' -new = 'className="flex items-center gap-1 mt-1.5"' -if old in content: - content = content.replace(old, new, 1) - changes += 1 - print('Fix 2: className quote restored') - -# Fix 3: Restore quotes in the device button className -# The issue is the className prop lost its opening quote and the string content lost quotes -old_btn_class = '''className={cn( - px-2 py-1 text-[9px] font-black uppercase rounded-md transition-all border, - deviceSize === size - ? bg-blue-500 text-white border-blue-500 shadow-md - : text-blue-300/50 border-transparent hover:text-blue-200 hover:bg-blue-900/30 - )}''' -new_btn_class = '''className={cn( - "px-2 py-1 text-[9px] font-black uppercase rounded-md transition-all border", - deviceSize === size - ? "bg-blue-500 text-white border-blue-500 shadow-md" - : "text-blue-300/50 border-transparent hover:text-blue-200 hover:bg-blue-900/30" - )}''' -if old_btn_class in content: - content = content.replace(old_btn_class, new_btn_class, 1) - changes += 1 - print('Fix 3: Button className quotes restored') - -with open(fp, 'w') as f: - f.write(content) - -print(f'Applied {changes}/3 fixes') diff --git a/fix_device_size.py b/fix_device_size.py deleted file mode 100644 index 182d6b4..0000000 --- a/fix_device_size.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 -fp = '/home/uroma/promptarch/components/AIAssist.tsx' -with open(fp, 'r') as f: - lines = f.readlines() - -changes = 0 - -# CHANGE 1: Add deviceSize state after viewMode state -for i, line in enumerate(lines): - if 'const [viewMode, setViewMode]' in line and 'useState' in line: - new_lines = [ - line, - ' const [deviceSize, setDeviceSize] = useState<"full" | "desktop" | "tablet" | "mobile">("full");\n', - ' const deviceWidths: Record = { full: "100%", desktop: "1280px", tablet: "768px", mobile: "375px" };\n', - ] - lines[i:i+1] = new_lines - changes += 1 - print('Change 1: Added deviceSize state') - break - -# CHANGE 2: Find canvas wrapper and add device-size wrapper around LiveCanvas -for i, line in enumerate(lines): - if 'flex-1 overflow-auto relative bg-[#050505]' in line and i > 1400: - print('Found canvas wrapper at line', i+1) - # Find LiveCanvas line - for j in range(i, min(i+10, len(lines))): - if '\n' - lines[j:j] = [wrapper] - changes += 1 - print('Change 2: Added device wrapper before LiveCanvas') - break - break - -with open(fp, 'w') as f: - f.writelines(lines) - -print('Applied', changes, 'changes') diff --git a/fix_device_size2.py b/fix_device_size2.py deleted file mode 100644 index d25f829..0000000 --- a/fix_device_size2.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python3 -fp = '/home/uroma/promptarch/components/AIAssist.tsx' -with open(fp, 'r') as f: - lines = f.readlines() - -changes = 0 - -for i, line in enumerate(lines): - if 'flex-1 overflow-hidden relative' in line and i > 1400: - lines[i] = '
\n' - changes += 1 - print('Fixed overflow at line', i+1) - - for j in range(i, min(i+10, len(lines))): - if '\n' - lines[j:j] = [w] - changes += 1 - print('Added device wrapper before LiveCanvas at line', j+1) - break - break - -with open(fp, 'w') as f: - f.writelines(lines) - -print('Applied', changes, 'changes') diff --git a/fix_reviewcode.py b/fix_reviewcode.py deleted file mode 100644 index a6a6619..0000000 --- a/fix_reviewcode.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python3 -"""Fix the broken reviewCode template literal.""" - -fp = '/home/uroma/promptarch/components/AIAssist.tsx' -with open(fp, 'r') as f: - content = f.read() - -# Find and replace the broken reviewPrompt line -# The problem: backticks inside template literal need to be escaped with \` -old_line = ' const reviewPrompt = `Please review this generated code for bugs, security issues, performance problems, and best practices. Provide specific improvements:\\n\\n\\\\`\\\\`\\\\`${previewData.language || "code"}\\n${previewData.data}\\n\\\\`\\\\`\\\\`';' - -new_line = ' const reviewPrompt = "Please review this generated code for bugs, security issues, performance problems, and best practices. Provide specific improvements:\\n\\n\`\`\`" + (previewData.language || "code") + "\\n" + previewData.data + "\\n\`\`\`";' - -if old_line in content: - content = content.replace(old_line, new_line, 1) - print("Fixed reviewCode template literal") -else: - # Try with the actual escaped content - # Let's just find it by the function start and replace the whole function - print("Trying line-by-line approach...") - lines = content.split('\n') - for i, line in enumerate(lines): - if 'const reviewPrompt' in line and 'review this generated code' in line: - print(f"Found at line {i+1}: {line[:80]}...") - lines[i] = new_line - print("Fixed") - break - content = '\n'.join(lines) - -with open(fp, 'w') as f: - f.write(content) diff --git a/fix_reviewcode2.py b/fix_reviewcode2.py deleted file mode 100644 index 2e6dae9..0000000 --- a/fix_reviewcode2.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python3 -fp = '/home/uroma/promptarch/components/AIAssist.tsx' -with open(fp, 'r') as f: - lines = f.readlines() - -bt = chr(96) # backtick character -nl = chr(92) + 'n' # \n - -for i, line in enumerate(lines): - if 'const reviewPrompt' in line and 'review this generated code' in line: - new_line = ' const reviewPrompt = "Please review this generated code for bugs, security issues, performance problems, and best practices. Provide specific improvements:" + "' + nl + '" + "' + nl + '" + "' + bt*3 + '" + (previewData.language || "code") + "' + nl + '" + previewData.data + "' + nl + '" + "' + bt*3 + '";\n' - lines[i] = new_line - print(f'Fixed line {i+1}') - print(repr(new_line)) - break - -with open(fp, 'w') as f: - f.writelines(lines) diff --git a/fix_v1.4.0.py b/fix_v1.4.0.py deleted file mode 100644 index 5cd144f..0000000 --- a/fix_v1.4.0.py +++ /dev/null @@ -1,210 +0,0 @@ -#!/usr/bin/env python3 -"""Apply v1.4.0 improvements: model color fix, review button, web search grounding.""" - -import re - -fp = '/home/uroma/promptarch/components/AIAssist.tsx' -with open(fp, 'r') as f: - content = f.read() - -changes = 0 - -# ============================================================ -# CHANGE 1: Fix model selector text color -# ============================================================ -old_option = '{availableModels.map(m => )}' -new_option = '{availableModels.map(m => )}' - -if old_option in content: - content = content.replace(old_option, new_option, 1) - changes += 1 - print("Change 1: Fixed