New features: - Review Code button sends generated code back to AI for review - Web search grounding via SearXNG (toggle in toolbar, enriches prompts) - Responsive preview with device size selector (Full/Desktop/Tablet/Mobile) - /api/search proxy route Fixes: - Model selector text color now white on dark theme - Post-coding button text overflow (shorter labels + min-w-0) - Duplicate activateArtifact button suppressed when action row shows
7.6 KiB
7.6 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.4.0] - 2026-03-18 19:57 UTC
Added
- Review Code Button — Post-coding action to send generated code back to AI for review
reviewCode()function sends code with review-focused prompt- Emerald-green "Review" button alongside Preview and Modify
- 3-column post-coding action grid: Preview / Review / Modify
- Web Search Grounding — Enrich AI prompts with live web search results
lib/services/search-api.ts— SearXNG public API wrapper with 4 instance fallback/api/searchroute — server-side search proxy endpoint- Toggle button in toolbar to enable/disable (amber highlight when active)
- Shows "Searching the web..." status while fetching
- Appends top 5 results as
[WEB SEARCH CONTEXT]to user prompt
- Responsive Preview — Device size selector in canvas panel
- Full / Desktop (1280px) / Tablet (768px) / Mobile (375px) buttons
- Centered device frame with border, shadow, and scroll on overflow
- Only visible in preview mode, below Live Render / Inspect Code tabs
Fixed
- Model selector text color — Option text now white on dark theme (
bg-[#0b1414] text-white) - Button text overflow — Shortened labels (Preview/Review/Modify), added
min-w-0for proper truncation - Duplicate activateArtifact button — Original button now hides when post-coding action row is shown
Technical Details
- Files modified: 1 (AIAssist.tsx: +85/-11 lines)
- Files added: 2 (
lib/services/search-api.ts,app/api/search/route.ts) - New state:
deviceSize,webSearchEnabled - New function:
reviewCode()
[1.3.0] - 2026-03-18 18:51 UTC
Added
- OpenRouter Integration — 4th AI provider with API key auth, 20+ model support
- New
lib/services/openrouter.tsstreaming service - Provider selector in AI Assist: Qwen, Ollama, Z.AI, OpenRouter
- Default model:
google/gemini-2.0-flash-exp:free - Custom model selector with popular free/paid model presets
- Settings panel: API key input with validation and model picker
- New
- Plan-First Workflow — AI now generates a structured plan before code
- PLAN MODE instructions injected into all 4 service system prompts
- Plan card UI with architecture, tech stack, files, and steps
parsePlanFromResponse()extracts plans from AI markdown output[PLAN]tags hidden from displayed chat messages- Three action buttons: Modify Plan / Start Coding / Skip to Code
- Post-Coding UX — Preview + Request Modifications after code generation
- After "Start Coding" approval, AI generates code with
[PREVIEW]tags - Canvas opens automatically with renderable previews
- Two post-coding buttons: Preview (re-opens canvas) and Request Modifications
isApprovalflag prevents stale React closure bugs in approval flow
- After "Start Coding" approval, AI generates code with
- Enhanced Prompt Engine — New modular prompt enhancement system
lib/enhance-engine.tswith 9 enhancement strategies- Strategies: clarify, add-context, add-constraints, structure, add-examples, set-tone, expand, simplify, chain-of-thought
- Context-aware enhancement based on detected intent type
- 11+ intent detection patterns (coding, creative, analysis, etc.)
- Smart strategy selection per intent for optimal prompt refinement
- Streaming Plan Mode — Real-time plan parsing during AI response
wasIdleflag captures initial request phase before state updates- Canvas display suppressed during plan generation, enabled after approval
- Post-stream routing: plan card for initial requests, preview for approvals
- Tab
showCanvasstate gated by plan phase
Changed
- AIAssist.tsx — Major refactor for plan-first flow
handleSendMessagenow acceptsisApprovalparameter to prevent stale closuresapproveAndGenerate()passesisApproval=trueto bypass idle detectionassistStepstate machine:idle -> plan -> generating -> previewparseStreamingContent()filters[PLAN]tags from displayed output
- PromptEnhancer.tsx — Rebuilt with modular enhance engine
- Moved enhancement logic to
lib/enhance-engine.ts - Added expand, simplify, and chain-of-thought strategies
- Improved intent detection and strategy mapping
- Moved enhancement logic to
- SettingsPanel.tsx — Added OpenRouter provider configuration
- API key input with validation
- Model selector with preset dropdown
- Provider-specific endpoint display
- model-adapter.ts — Extended with OpenRouter provider support
- New adapter mapping for OpenRouter service
- Unified interface across all 4 providers
- translations.ts — Added i18n keys for plan mode, OpenRouter, post-coding actions
- Keys:
modifyPlan,startCoding,skipToCode,requestModifications - OpenRouter provider labels and descriptions
- English, Russian, Hebrew translations updated
- Keys:
- store.ts — Added
selectedProviderstate for multi-provider selection - types/index.ts — Added
PreviewDatainterface for typed canvas rendering - adapter-instance.ts — Registered OpenRouter in provider registry
Fixed
- Stale React closure in
approveAndGenerate—setAssistStep("generating")followed byhandleSendMessage()read staleassistStepvalue. Fixed with explicitisApprovalboolean parameter. - Plan card reappearing after code generation — Post-stream logic now correctly routes to
previewmode after approval coding, not back toplanmode. - Canvas auto-opening during plan phase —
setShowCanvas(true)inonChunknow gated by!wasIdleflag. - i18n missing keys — Added
syncCompletefor Hebrew, fixed double commas in multiple translation strings.
Technical Details
- Files modified: 11 (960 insertions, 194 deletions)
- Files added: 2 (
lib/enhance-engine.ts,lib/services/openrouter.ts) - Total project lines: ~10,179 across core files
- System prompt PLAN MODE block added to:
qwen-oauth.ts,ollama-cloud.ts,zai-plan.ts,openrouter.ts
[1.2.0] - 2026-01-19 19:16 UTC
Added
- SEO Agent Behavior Fixes
- SEO agent now stays locked and answers queries through an SEO lens
- Smart agent suggestions via
[SUGGEST_AGENT:xxx]marker for clearly non-SEO tasks - Visual suggestion banner with Switch/Dismiss buttons
- Prevented unwanted agent auto-switching mid-response
- z.ai API Validation
- Real-time API key validation with 500ms debounce
- Inline status indicators:
- Checkmark with "Validated Xm ago" for valid keys
- Red X with error message for invalid keys
- Loading spinner during validation
- "Test Connection" button for manual re-validation
- Persistent validation cache (5 minutes) in localStorage
Changed
- Updated Settings panel with improved UX for API key management
- Enhanced agent selection behavior to prevent unintended switches
[1.1.0] - 2025-12-29 17:55 UTC
Added
- GitHub integration for pushing AI-generated artifacts
- XLSX export functionality for Google Ads campaigns
- High-fidelity HTML report generation
- OAuth token management for Qwen API
[1.0.0] - 2025-12-29 13:51 UTC
Added
- Initial release of PromptArch
- Multi-provider AI support (Qwen, Ollama, Z.AI)
- Prompt Enhancer with 11+ intent patterns
- PRD Generator with structured output
- Action Plan generator with framework recommendations
- Visual canvas for live code rendering
- Multi-language support (English, Russian, Hebrew)