Skip to content

Conversation

@Gerome-Elassaad
Copy link
Member

Changes made:

  • Better Error Handling: Typed errors with proper HTTP status codes and retry information
  • Modular Stores: Easier to maintain and test with separated concerns
  • Prompt Management: Version tracking, usage stats, and unified API
  • User Visibility: Users can now see which files are in context and token usage
  • Artifact History: Foundation for rollback functionality with version tracking
Feature Files Created / Modified
Zod Validation app/lib/api/chat-validation.ts – Request validation with typed errors
Error Handling app/routes/api.chat.ts – Categorized errors, proper HTTP status codes
Store Extraction app/lib/stores/artifacts.ts – Artifacts management extracted
app/lib/stores/alerts.ts – Alerts management extracted
Prompt Registry app/lib/common/prompt-registry.ts – Unified prompt system with versioning and stats
app/lib/common/prompt-library.ts – Updated to use new registry
Artifact Versioning app/lib/stores/artifact-versions.ts – Version tracking for artifacts and files
Context Display app/components/chat/ContextIndicator.tsx – Collapsible context indicator
app/components/chat/AssistantMessage.tsx – Integrated new indicator
Universal Prompt app/lib/common/prompts/system-prompt-universal.ts – Multi-framework

- Delete system-prompt.txt (unused, replaced by prompts/prompts.ts)
- Update tools.json to only document implemented tools (file, line-replace, shell, supabase, mcp-tools)
- All system prompts now managed through:
  * prompts/prompts.ts (default)
  * prompts/fine-tuned.ts (enhanced)
  * prompts/optimized.ts (experimental)
  * prompt-library.ts (central registry)
- Prompts accessible via Settings UI and programmatically via PromptLibrary
- All prompts are dynamically injected with Supabase and environment context
Update system prompts to support all JavaScript/TypeScript-based frameworks:
- Web frameworks: React, Vue, Svelte, Angular, Next.js, Astro, Qwik, TypeScript
- Mobile frameworks: React Native, Expo, and other JS/TS mobile frameworks
- Backend frameworks: Node.js, Express, and similar frameworks

Changes:
- prompts/prompts.ts: Replace framework restriction with comprehensive framework list
- prompts/fine-tuned.ts: Replace framework restriction with comprehensive framework list
- Keep technical WebContainer constraints (no native binaries, limited Python, etc.)

This aligns with starter templates available in app/utils/constants.ts
Create new base-prompt.ts that contains core standards applicable to all projects:
- Framework-agnostic universal guidelines
- Code quality standards (TypeScript, error handling, security)
- Validation and database best practices
- Tool usage documentation
- Artifact requirements
- Response standards
- Code organization patterns
- Design and UX standards
- Performance optimization
- Testing mindset
- Decision framework

Update prompt-library.ts to include base prompt as 'Universal Standards (Core)'
This provides a foundation that applies regardless of framework or project type.

Prompts now available:
- base: Universal Standards (Core) - framework-agnostic best practices
- default: Default Prompt - comprehensive guidelines
- enhanced: Fine Tuned Prompt - optimized for better results
- optimized: Optimized Prompt - low token usage (experimental)
- Remove unused ArtifactsStore class from app/lib/stores/artifacts.ts
- Consolidate artifact management into WorkbenchStore (single source of truth)
- Add new prompt registry and alert store files
- Update prompt library and chat API routes
- Change webcontainer setupWebContainerEventHandlers to static import
- Remove dynamic import in workbench.ts for better code splitting
- Maintains all existing functionality while improving bundle optimization
- Move Workbench component from main content area to right below the unified header container
- Maintains all existing functionality while improving layout structure
- Headers (CodeModeHeader/PreviewHeader) now directly precede the workbench content
- Move workbench back to its original position as a sibling to the chat in the main content area
- Restore the intended side-by-side layout of chat and workbench
- Headers remain at the top, followed by the flex container with chat and workbench
- Add dark:invert class to Netlify and Cloudflare SVG icons in PreviewHeader
- Add dark:invert class to Netlify and Cloudflare SVG icons in DeployDialog
- Vercel icons already had dark:invert class
- All deployment platform icons now properly adapt to light/dark themes
@Gerome-Elassaad Gerome-Elassaad self-assigned this Dec 4, 2025
@Gerome-Elassaad Gerome-Elassaad added enhancement New feature or request feature Requested feature or new feature labels Dec 4, 2025
@Gerome-Elassaad Gerome-Elassaad merged commit 36610fc into main Dec 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature Requested feature or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants