WIP - ai process builder codex attempt

This commit is contained in:
Francisco Gaona
2026-01-17 20:16:04 +01:00
parent 20fc90a3fb
commit ded413b99b
34 changed files with 2199 additions and 13 deletions

View File

@@ -0,0 +1,43 @@
import { Background, Controls, MiniMap, ReactFlow, useEdgesState, useNodesState } from '@xyflow/react'
import '@xyflow/react/dist/style.css'
import './styles.css'
const initialNodes = [
{ id: 'start', data: { label: 'Start' }, position: { x: 0, y: 0 } },
{ id: 'llm', data: { label: 'LLM Decision' }, position: { x: 220, y: 0 } },
{ id: 'tool', data: { label: 'Tool Node' }, position: { x: 440, y: 0 } },
{ id: 'end', data: { label: 'End' }, position: { x: 660, y: 0 } },
]
const initialEdges = [
{ id: 'e1-2', source: 'start', target: 'llm' },
{ id: 'e2-3', source: 'llm', target: 'tool' },
{ id: 'e3-4', source: 'tool', target: 'end' },
]
export const App = () => {
const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes)
const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges)
return (
<div className="editor-shell">
<header className="editor-header">
<h1>AI Process Builder</h1>
<p>Design tenant workflows with deterministic execution.</p>
</header>
<div className="editor-canvas">
<ReactFlow
nodes={nodes}
edges={edges}
onNodesChange={onNodesChange}
onEdgesChange={onEdgesChange}
fitView
>
<MiniMap />
<Controls />
<Background />
</ReactFlow>
</div>
</div>
)
}

View File

@@ -0,0 +1,7 @@
import { createRoot } from 'react-dom/client'
import { App } from './App'
const root = document.getElementById('root')
if (root) {
createRoot(root).render(<App />)
}

View File

@@ -0,0 +1,33 @@
body {
margin: 0;
font-family: 'Inter', sans-serif;
color: #0f172a;
}
.editor-shell {
display: flex;
flex-direction: column;
height: 100vh;
}
.editor-header {
padding: 16px 20px;
border-bottom: 1px solid #e2e8f0;
background: #fff;
}
.editor-header h1 {
margin: 0 0 4px;
font-size: 18px;
}
.editor-header p {
margin: 0;
font-size: 12px;
color: #64748b;
}
.editor-canvas {
flex: 1;
background: #f8fafc;
}