Skip to content

Commit 5df8cbd

Browse files
author
Gerome El-assaad
committed
updated workflows & removed mock code
1 parent 149cb94 commit 5df8cbd

File tree

37 files changed

+1231
-267
lines changed

37 files changed

+1231
-267
lines changed

.vscode/extensions.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"recommendations": ["21st.21st-extension"]
2+
"recommendations": [
3+
"21st.21st-extension",
4+
"bradlc.vscode-tailwindcss"
5+
]
36
}

.vscode/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"css.validate": false,
3+
"scss.validate": false,
4+
"less.validate": false,
5+
"tailwindCSS.includeLanguages": {
6+
"css": "css",
7+
"html": "html",
8+
"javascript": "javascript",
9+
"typescript": "typescript",
10+
"typescriptreact": "typescriptreact",
11+
"javascriptreact": "javascriptreact"
12+
},
13+
"tailwindCSS.experimental.classRegex": [
14+
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
15+
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
16+
],
17+
"files.associations": {
18+
"*.css": "tailwindcss"
19+
}
20+
}

CHANGELOG.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,89 @@
11
# Changelog
22

33
All notable changes to this project will be documented in this file.
4+
5+
## [0.0.29] - 2025-01-26
6+
7+
### 🚀 Added
8+
- **Workflow System Integration**: Complete AI-powered workflow creation and execution system
9+
- New `/api/chat/workflow` endpoint for AI-enhanced workflow generation
10+
- Intelligent workflow detection from user prompts
11+
- Multi-step application creation through conversational AI
12+
- Fragment-to-node mapping system for seamless code execution
13+
- Support for all template types (Next.js, Vue, Streamlit, Gradio, Python)
14+
15+
- **Workflow Management APIs**: Full CRUD operations for workflows
16+
- Create, read, update, delete workflow operations
17+
- Workflow execution with real-time status tracking
18+
- Background execution with proper error handling
19+
- Database persistence with Supabase integration
20+
21+
- **Production-Ready Database Schema**:
22+
- Workflow tables with proper RLS policies
23+
- Execution tracking and logging
24+
- Template management system
25+
- Migration scripts and setup documentation
26+
27+
### 🔧 Fixed
28+
- **Workflow Engine**: Complete rewrite of execution system
29+
- Removed all mock/demo code and placeholders
30+
- Proper E2B sandbox integration for code execution
31+
- Real-time fragment execution with timeout handling
32+
- Error recovery and retry mechanisms
33+
34+
- **Authentication Security**: Addressed Supabase auth warnings
35+
- Updated to use `supabase.auth.getUser()` for secure authentication
36+
- Proper session validation in API routes
37+
- Enhanced security for workflow operations
38+
39+
- **Code Quality**: Comprehensive codebase cleanup
40+
- Removed all comments from `/app` directory (38+ files cleaned)
41+
- Eliminated development artifacts and console.log statements
42+
- Fixed all TypeScript errors and warnings
43+
- Production-ready error handling
44+
45+
### 🛠️ Technical Improvements
46+
- **Fragment-Node Mapper**: New abstraction layer for workflow operations
47+
- Template-specific configurations and defaults
48+
- Proper input/output port mapping
49+
- Resource allocation and retry policies
50+
- Cross-template compatibility
51+
52+
- **Workflow Detection AI**: Smart workflow suggestion system
53+
- Analyzes user prompts for multi-step tasks
54+
- Suggests appropriate templates for each step
55+
- Automatic dependency management
56+
- Confidence scoring for workflow recommendations
57+
58+
- **Database Migrations**: Production-ready setup
59+
- SQL migration files for manual deployment
60+
- Proper indexes and constraints
61+
- Row-level security policies
62+
- Documentation for setup procedures
63+
64+
### 📝 Documentation
65+
- **CLAUDE.md**: Enhanced development guide
66+
- Workflow system architecture overview
67+
- Template customization instructions
68+
- Database setup procedures
69+
- Common development workflows
70+
71+
### 🏗️ Infrastructure
72+
- **Environment Configuration**: Improved .env handling
73+
- Better error messages for missing configurations
74+
- Graceful fallbacks for optional services
75+
- Clear documentation of required variables
76+
77+
### 🧹 Maintenance
78+
- **Codebase Cleanup**: Removed 200+ lines of comments and debugging code
79+
- All API routes cleaned of development artifacts
80+
- Page components stripped of unnecessary comments
81+
- JSX comments removed from UI components
82+
- Production-ready code standards enforced
83+
84+
---
85+
86+
## [0.0.28] - Previous Release
87+
- Base application functionality
88+
- Fragment execution system
89+
- Template support for multiple frameworks

app/api/chat/codeInterpreter.ts

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
1-
import 'server-only';
2-
3-
import { Sandbox } from '@e2b/code-interpreter';
4-
1+
import 'server-only';
2+
3+
import { Sandbox } from '@e2b/code-interpreter';
4+
55
const E2B_API_KEY = process.env.E2B_API_KEY;
66

77
const sandboxTimeout = 10 * 60 * 1000;
88

9-
export async function evaluateCode(
10-
sessionID: string,
11-
code: string,
12-
) {
13-
if (!E2B_API_KEY) {
14-
throw new Error('E2B_API_KEY environment variable not found');
15-
}
16-
9+
export async function evaluateCode(
10+
sessionID: string,
11+
code: string,
12+
) {
13+
if (!E2B_API_KEY) {
14+
throw new Error('E2B_API_KEY environment variable not found');
15+
}
16+
1717
const sandbox = await getSandbox(sessionID);
1818

19-
// Execute the code in a Jupyter Notebook in the sandbox.
20-
// https://e2b.dev/docs/code-interpreter/execution
21-
const execution = await sandbox.runCode(code, {
22-
// We can also use callbacks to handle streaming stdout, stderr, and results from the sandbox.
23-
// This is useful if you want to stream the results to client directly.
24-
// onStdout,
25-
// onStderr,
26-
// onResult,
27-
});
19+
const execution = await sandbox.runCode(code, {});
2820

2921
return {
3022
results: execution.results,
@@ -35,11 +27,11 @@ export async function evaluateCode(
3527
}
3628

3729

38-
async function getSandbox(sessionID: string) {
39-
if (!E2B_API_KEY) {
40-
throw new Error('E2B_API_KEY environment variable not found');
41-
}
42-
30+
async function getSandbox(sessionID: string) {
31+
if (!E2B_API_KEY) {
32+
throw new Error('E2B_API_KEY environment variable not found');
33+
}
34+
4335
const sandboxes = await Sandbox.list();
4436

4537
const sandboxID = sandboxes.find(sandbox => sandbox.metadata?.sessionID === sessionID)?.sandboxId;

app/api/chat/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export async function POST(req: Request) {
6969
schema,
7070
system: systemPrompt,
7171
messages,
72-
maxRetries: 0, // do not retry on errors
72+
maxRetries: 0,
7373
...modelParams,
7474
})
7575

0 commit comments

Comments
 (0)