Spaces:
Running
Running
Deploy live
Browse filesFiles changed (3)
- index.html+8-31
- script.jsAdded+703
- style.css+24-18
2 unmodified lines345676891081112131431 unmodified lines46474846474849505152535455565758596061626364656667686970714950514 unmodified lines565758825960618562636465697 unmodified lines7637647657897662 unmodified lines<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="TaskPilot is your personal AI task agent that helps you manage workflows, track tasks, and provide insights."> <meta name="keywords" content="AI, task management, workflow, productivity, automation"> <title>TaskPilot - Your Personal AI Task Agent</title><title>TaskPilot - Your Personal AI Task Agent</title> <link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🚀</text></svg>"> <link rel="stylesheet" href="style.css"> <script src="https://cdn.tailwindcss.com"></script><script src="https://cdn.tailwindcss.com"></script> <script src="https://unpkg.com/feather-icons"></script> <script> tailwind.config = {31 unmodified lines } } </script> <style> @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); body { font-family: 'Inter', sans-serif; background-color: #0f172a; color: #f1f5f9; } .panel-border { border-right: 1px solid #1e293b; } .step-card { transition: all 0.3s ease; } .step-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25); } .status-pending { background-color: #475569; } .status-in-progress { background-color: #0ea5e9; } .status-done { background-color: #10b981; } .status-skipped { background-color: #64748b; } .file-preview { max-height: 100px; overflow-y: auto; } </style></head><body class="bg-slate-900 text-slate-100 min-h-screen"> <div id="root" class="min-h-screen"></div>4 unmodified lines <!-- Babel for JSX processing --> <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> <!-- Main App Script --> <script src="script.js"></script> <script type="text/babel" data-type="module"> // Import necessary React features// Import necessary React features const { useState, useEffect, useRef, createContext, useContext } = React; // Interfaces697 unmodified lines </script><script src="https://huggingface.co/deepsite/deepsite-badge.js"></script></body></html></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703// Import necessary React featuresconst { useState, useEffect, useRef, createContext, useContext } = React;
// Interfacesconst ChatMessage = { id: '', role: 'user', // or 'agent' text: '', timestamp: '', workflowStepId: undefined};
const UploadedFile = { id: '', name: '', size: 0, type: '', textPreview: undefined};
const WorkflowStep = { id: '', title: '', description: '', status: 'pending', // pending, in_progress, done, skipped relatedFiles: []};
const AgentWorkflow = { id: '', name: '', steps: []};
const PolicyState = { detailLevel: 'medium', // low, medium, high tone: 'neutral', // concise, neutral, detailed preferredWorkflowTemplates: [], recentSuccessRate: 0.85};
const AgentTurn = { responseMessage: '', steps: [], reasoningTrace: '', policyState: PolicyState};
// TaskPilotAgent Classclass TaskPilotAgent { constructor() { this.policyState = { ...PolicyState }; this.workflows = []; this.workflowTemplates = { 'shopify': { id: 'shopify', name: 'Take a Shopify store live', steps: [ { id: 's1', title: 'Configure domain settings', description: 'Set up custom domain for the store', status: 'pending', relatedFiles: [] }, { id: 's2', title: 'Add payment gateways', description: 'Configure accepted payment methods', status: 'pending', relatedFiles: [] }, { id: 's3', title: 'Set up shipping zones', description: 'Define shipping regions and rates', status: 'pending', relatedFiles: [] }, { id: 's4', title: 'Review tax settings', description: 'Configure tax calculations for products', status: 'pending', relatedFiles: [] }, { id: 's5', title: 'Launch store', description: 'Remove password protection and go live', status: 'pending', relatedFiles: [] } ] }, 'website': { id: 'website', name: 'Create a simple marketing website', steps: [ { id: 'w1', title: 'Define target audience', description: 'Identify key demographics and personas', status: 'pending', relatedFiles: [] }, { id: 'w2', title: 'Create site map', description: 'Plan website structure and navigation', status: 'pending', relatedFiles: [] }, { id: 'w3', title: 'Design homepage layout', description: 'Create wireframes for key landing page', status: 'pending', relatedFiles: [] }, { id: 'w4', title: 'Develop core pages', description: 'Build About, Services, and Contact pages', status: 'pending', relatedFiles: [] }, { id: 'w5', title: 'Test and launch', description: 'Perform QA testing and deploy to production', status: 'pending', relatedFiles: [] } ] }, 'ux-review': { id: 'ux-review', name: 'Review and improve a page’s UI/UX', steps: [ { id: 'u1', title: 'Heuristic evaluation', description: 'Assess against UX best practices', status: 'pending', relatedFiles: [] }, { id: 'u2', title: 'User flow analysis', description: 'Map current navigation paths', status: 'pending', relatedFiles: [] }, { id: 'u3', title: 'Accessibility check', description: 'Verify WCAG compliance standards', status: 'pending', relatedFiles: [] }, { id: 'u4', title: 'Performance audit', description: 'Analyze loading times and optimizations', status: 'pending', relatedFiles: [] }, { id: 'u5', title: 'Implement improvements', description: 'Apply recommended changes to interface', status: 'pending', relatedFiles: [] } ] } }; } async handleUserMessage(message, files = []) { // Mock AI processing delay await new Promise(resolve => setTimeout(resolve, 800)); // Simple response logic based on message content let response = "I've received your message. How can I assist you further?"; let reasoning = "Processed user input"; if (message.toLowerCase().includes("hello") || message.toLowerCase().includes("hi")) { response = "Hello! I'm TaskPilot, your AI task assistant. How can I help you today?"; reasoning = "Greeting detected, provided welcome message"; } else if (message.toLowerCase().includes("help")) { response = "I can help you manage workflows, track tasks, and provide insights. Try asking me to start a workflow or analyze a task."; reasoning = "Help request detected, provided assistance options"; } else if (files.length > 0) { response = `I see you've uploaded ${files.length} file(s). I can analyze these to help with your tasks.`; reasoning = "Files detected in message, acknowledged attachment"; } // Update policy based on message content if (message.length > 100) { this.policyState.detailLevel = "detailed"; reasoning += ". User provided detailed input, increasing detail level."; } else if (message.length < 20) { this.policyState.detailLevel = "concise"; reasoning += ". User provided brief input, setting concise mode."; } return { responseMessage: response, steps: this.workflows.length > 0 ? [...this.workflows[0].steps] : [], reasoningTrace: reasoning, policyState: { ...this.policyState } }; } startWorkflow(templateId, userInputs = {}) { const template = this.workflowTemplates[templateId]; if (!template) { throw new Error(`Template ${templateId} not found`); } // Customize steps based on user inputs const customizedSteps = template.steps.map(step => { let description = step.description; if (templateId === 'shopify' && userInputs.storeName) { description = description.replace('store', `${userInputs.storeName} store`); } return { ...step, description }; }); const workflow = { id: `wf-${Date.now()}`, name: template.name, steps: customizedSteps }; this.workflows = [workflow]; return workflow; } updateStepStatus(stepId, status) { for (const workflow of this.workflows) { const step = workflow.steps.find(s => s.id === stepId); if (step) { step.status = status; break; } } // Update policy based on completion const allSteps = this.workflows.flatMap(wf => wf.steps); const completedSteps = allSteps.filter(s => s.status === 'done').length; const totalSteps = allSteps.length; if (totalSteps > 0) { this.policyState.recentSuccessRate = completedSteps / totalSteps; } return this.workflows.length > 0 ? [...this.workflows[0].steps] : []; } handleFeedback(isPositive) { if (isPositive) { // Increase preference for current templates if (this.workflows.length > 0) { const currentTemplate = this.workflows[0].name; if (!this.policyState.preferredWorkflowTemplates.includes(currentTemplate)) { this.policyState.preferredWorkflowTemplates.push(currentTemplate); } } // Adjust tone to be more confident this.policyState.tone = "detailed"; } else { // Decrease preference for current templates if (this.workflows.length > 0) { const currentTemplate = this.workflows[0].name; this.policyState.preferredWorkflowTemplates = this.policyState.preferredWorkflowTemplates.filter(t => t !== currentTemplate); } // Adjust tone to be more cautious this.policyState.tone = "concise"; } }}
// Create agent instanceconst agentInstance = new TaskPilotAgent();
// Context for sharing agent between componentsconst AgentContext = createContext();
// Chat Panel Componentconst ChatPanel = ({ messages, onSendMessage, onFeedback }) => { const [inputText, setInputText] = useState(''); const messagesEndRef = useRef(null); const scrollToBottom = () => { messagesEndRef.current?.scrollIntoView({ behavior: "smooth" }); }; useEffect(() => { scrollToBottom(); }, [messages]); const handleSubmit = (e) => { e.preventDefault(); if (inputText.trim()) { onSendMessage(inputText); setInputText(''); } }; return ( React.createElement('div', { className: "flex flex-col h-full" }, React.createElement('div', { className: "p-4 border-b border-slate-800" }, React.createElement('h2', { className: "text-xl font-bold text-primary-400" }, "TaskPilot Chat"), React.createElement('p', { className: "text-sm text-slate-400" }, "Your AI task assistant") ), React.createElement('div', { className: "flex-1 overflow-y-auto p-4 space-y-4" }, messages.map((msg) => React.createElement('div', { key: msg.id, className: `p-4 rounded-lg max-w-[80%] ${ msg.role === 'user' ? 'bg-slate-800 ml-auto' : 'bg-slate-700 mr-auto' }` }, React.createElement('div', { className: "flex items-start gap-2" }, msg.role === 'agent' && React.createElement('div', { className: "mt-1 flex-shrink-0 w-6 h-6 rounded-full bg-primary-500 flex items-center justify-center" }, React.createElement('i', { 'data-feather': "cpu", className: "w-4 h-4" }) ), React.createElement('div', { className: "flex-1" }, React.createElement('p', { className: "whitespace-pre-wrap" }, msg.text), msg.role === 'agent' && React.createElement('div', { className: "flex gap-2 mt-2" }, React.createElement('button', { onClick: () => onFeedback(true), className: "p-1 text-slate-400 hover:text-green-400 transition-colors", title: "Helpful" }, React.createElement('i', { 'data-feather': "thumbs-up" }) ), React.createElement('button', { onClick: () => onFeedback(false), className: "p-1 text-slate-400 hover:text-red-400 transition-colors", title: "Not helpful" }, React.createElement('i', { 'data-feather': "thumbs-down" }) ) ) ) ) ) ), React.createElement('div', { ref: messagesEndRef }) ), React.createElement('form', { onSubmit: handleSubmit, className: "p-4 border-t border-slate-800" }, React.createElement('div', { className: "flex gap-2" }, React.createElement('textarea', { value: inputText, onChange: (e) => setInputText(e.target.value), placeholder: "Message TaskPilot...", className: "flex-1 bg-slate-800 border border-slate-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 resize-none", rows: "2" } ), React.createElement('button', { type: "submit", className: "bg-primary-600 hover:bg-primary-700 text-white rounded-lg px-4 py-2 font-medium transition-colors flex items-center gap-2" }, React.createElement('i', { 'data-feather': "send" }), "Send" ) ) ) ) );};
// Workflow Panel Componentconst WorkflowPanel = ({ workflows, onStartWorkflow, onUpdateStepStatus }) => { const [selectedTemplate, setSelectedTemplate] = useState(''); const [userInputs, setUserInputs] = useState({}); const handleStartWorkflow = () => { if (selectedTemplate) { onStartWorkflow(selectedTemplate, userInputs); setUserInputs({}); } }; const currentWorkflow = workflows.length > 0 ? workflows[0] : null; return ( React.createElement('div', { className: "flex flex-col h-full" }, React.createElement('div', { className: "p-4 border-b border-slate-800" }, React.createElement('h2', { className: "text-xl font-bold text-primary-400" }, "Workflows"), React.createElement('p', { className: "text-sm text-slate-400" }, "Manage your task sequences") ), !currentWorkflow ? React.createElement('div', { className: "p-4 space-y-4" }, React.createElement('div', null, React.createElement('label', { className: "block text-sm font-medium mb-2" }, "Select Template"), React.createElement('select', { value: selectedTemplate, onChange: (e) => setSelectedTemplate(e.target.value), className: "w-full bg-slate-800 border border-slate-700 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500" }, React.createElement('option', { value: "" }, "Choose a workflow..."), React.createElement('option', { value: "shopify" }, "Take a Shopify store live"), React.createElement('option', { value: "website" }, "Create a simple marketing website"), React.createElement('option', { value: "ux-review" }, "Review and improve a page's UI/UX") ) ), selectedTemplate === 'shopify' && React.createElement('div', null, React.createElement('label', { className: "block text-sm font-medium mb-2" }, "Store Name"), React.createElement('input', { type: "text", value: userInputs.storeName || '', onChange: (e) => setUserInputs({...userInputs, storeName: e.target.value}), placeholder: "Enter store name", className: "w-full bg-slate-800 border border-slate-700 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500" } ) ), React.createElement('button', { onClick: handleStartWorkflow, disabled: !selectedTemplate, className: `w-full py-2 px-4 rounded-lg font-medium transition-colors ${ selectedTemplate ? 'bg-primary-600 hover:bg-primary-700 text-white' : 'bg-slate-800 text-slate-500 cursor-not-allowed' }` }, "Start Workflow" ) ) : React.createElement('div', { className: "flex-1 overflow-y-auto" }, React.createElement('div', { className: "p-4 border-b border-slate-800" }, React.createElement('div', { className: "flex justify-between items-center" }, React.createElement('h3', { className: "font-semibold" }, currentWorkflow.name), React.createElement('span', { className: "text-xs bg-slate-800 px-2 py-1 rounded" }, `${currentWorkflow.steps.filter(s => s.status === 'done').length}/${currentWorkflow.steps.length} completed` ) ) ), React.createElement('div', { className: "p-4 space-y-4" }, currentWorkflow.steps.map((step) => React.createElement('div', { key: step.id, className: "step-card bg-slate-800 rounded-lg p-4 border border-slate-700" }, React.createElement('div', { className: "flex justify-between items-start" }, React.createElement('div', null, React.createElement('h4', { className: "font-medium" }, step.title), React.createElement('p', { className: "text-sm text-slate-400 mt-1" }, step.description) ), React.createElement('span', { className: `px-2 py-1 rounded-full text-xs font-medium capitalize ${ step.status === 'pending' ? 'status-pending' : step.status === 'in_progress' ? 'status-in-progress' : step.status === 'done' ? 'status-done' : 'status-skipped' }` }, step.status.replace('_', ' ') ) ), React.createElement('div', { className: "flex gap-2 mt-3" }, step.status === 'pending' && React.createElement('button', { onClick: () => onUpdateStepStatus(step.id, 'in_progress'), className: "text-xs bg-blue-600 hover:bg-blue-700 text-white px-2 py-1 rounded transition-colors" }, "Start" ), (step.status === 'pending' || step.status === 'in_progress') && React.createElement('button', { onClick: () => onUpdateStepStatus(step.id, 'done'), className: "text-xs bg-green-600 hover:bg-green-700 text-white px-2 py-1 rounded transition-colors" }, "Mark Done" ), step.status === 'pending' && React.createElement('button', { onClick: () => onUpdateStepStatus(step.id, 'skipped'), className: "text-xs bg-slate-700 hover:bg-slate-600 text-white px-2 py-1 rounded transition-colors" }, "Skip" ) ) ) ) ) ) ) );};
// Files Inspector Panel Componentconst FilesInspectorPanel = ({ files, onFileUpload, onRemoveFile, policyState, reasoningTrace }) => { const fileInputRef = useRef(null); const handleFileChange = (e) => { const newFiles = Array.from(e.target.files); onFileUpload(newFiles); }; const triggerFileInput = () => { fileInputRef.current.click(); }; return ( React.createElement('div', { className: "flex flex-col h-full" }, React.createElement('div', { className: "p-4 border-b border-slate-800" }, React.createElement('h2', { className: "text-xl font-bold text-primary-400" }, "Files & Inspector"), React.createElement('p', { className: "text-sm text-slate-400" }, "Manage attachments and view insights") ), React.createElement('div', { className: "p-4 border-b border-slate-800" }, React.createElement('button', { onClick: triggerFileInput, className: "w-full py-2 px-4 bg-slate-800 hover:bg-slate-700 border border-dashed border-slate-600 rounded-lg flex flex-col items-center justify-center gap-2 transition-colors" }, React.createElement('i', { 'data-feather': "upload", className: "text-slate-400" }), React.createElement('span', { className: "text-sm" }, "Drag & drop files or click to browse"), React.createElement('input', { type: "file", ref: fileInputRef, onChange: handleFileChange, multiple: true, className: "hidden" } ) ) ), React.createElement('div', { className: "flex-1 overflow-y-auto p-4 space-y-4" }, React.createElement('div', null, React.createElement('h3', { className: "font-medium mb-2" }, `Uploaded Files (${files.length})`), files.length === 0 ? React.createElement('p', { className: "text-sm text-slate-500 italic" }, "No files uploaded yet") : React.createElement('div', { className: "space-y-2" }, files.map((file) => React.createElement('div', { key: file.id, className: "bg-slate-800 rounded-lg p-3 border border-slate-700" }, React.createElement('div', { className: "flex justify-between" }, React.createElement('div', { className: "flex items-center gap-2" }, React.createElement('i', { 'data-feather': "file-text", className: "text-slate-400" }), React.createElement('div', null, React.createElement('p', { className: "text-sm font-medium truncate max-w-[160px]" }, file.name), React.createElement('p', { className: "text-xs text-slate-500" }, `${(file.size / 1024).toFixed(1)} KB`) ) ), React.createElement('button', { onClick: () => onRemoveFile(file.id), className: "text-slate-500 hover:text-red-400" }, React.createElement('i', { 'data-feather': "x" }) ) ), file.textPreview && React.createElement('div', { className: "mt-2 text-xs bg-slate-900 p-2 rounded file-preview" }, React.createElement('pre', { className: "whitespace-pre-wrap" }, file.textPreview) ) ) ) ) ), React.createElement('div', null, React.createElement('h3', { className: "font-medium mb-2" }, "Policy State"), React.createElement('div', { className: "bg-slate-800 rounded-lg p-3 border border-slate-700" }, React.createElement('pre', { className: "text-xs overflow-x-auto" }, JSON.stringify(policyState, null, 2)) ) ), React.createElement('div', null, React.createElement('h3', { className: "font-medium mb-2" }, "Reasoning Trace"), React.createElement('div', { className: "bg-slate-800 rounded-lg p-3 border border-slate-700" }, React.createElement('p', { className: "text-sm" }, reasoningTrace || 'No reasoning trace available') ) ) ) ) );};
// Main App Componentconst App = () => { const [messages, setMessages] = useState([ { id: '1', role: 'agent', text: 'Hello! I\'m TaskPilot, your AI task assistant. I can help you manage workflows, track tasks, and provide insights. What would you like to work on today?', timestamp: new Date().toISOString() } ]); const [files, setFiles] = useState([]); const [workflows, setWorkflows] = useState([]); const [policyState, setPolicyState] = useState(agentInstance.policyState); const [reasoningTrace, setReasoningTrace] = useState(''); const handleSendMessage = async (text) => { // Add user message const userMessage = { id: `msg-${Date.now()}`, role: 'user', text: text, timestamp: new Date().toISOString() }; setMessages(prev => [...prev, userMessage]); // Get agent response const turn = await agentInstance.handleUserMessage(text, files); // Add agent message const agentMessage = { id: `msg-${Date.now() + 1}`, role: 'agent', text: turn.responseMessage, timestamp: new Date().toISOString() }; setMessages(prev => [...prev, agentMessage]); setPolicyState(turn.policyState); setReasoningTrace(turn.reasoningTrace); }; const handleStartWorkflow = (templateId, userInputs) => { try { const workflow = agentInstance.startWorkflow(templateId, userInputs); setWorkflows([workflow]); // Add notification message const templateNames = { 'shopify': 'Shopify Store Launch', 'website': 'Marketing Website Creation', 'ux-review': 'UI/UX Review' }; const message = { id: `msg-${Date.now()}`, role: 'agent', text: `I've started the "${templateNames[templateId]}" workflow for you. You can track progress in the Workflows panel.`, timestamp: new Date().toISOString() }; setMessages(prev => [...prev, message]); } catch (error) { console.error('Error starting workflow:', error); } }; const handleUpdateStepStatus = (stepId, status) => { const updatedSteps = agentInstance.updateStepStatus(stepId, status); setWorkflows(prev => prev.length > 0 ? [{...prev[0], steps: updatedSteps}] : []); setPolicyState({...agentInstance.policyState}); }; const handleFeedback = (isPositive) => { agentInstance.handleFeedback(isPositive); setPolicyState({...agentInstance.policyState}); // Add confirmation message const message = { id: `msg-${Date.now()}`, role: 'agent', text: isPositive ? 'Thanks for the feedback! I\'ll continue providing responses like this.' : 'Thanks for the feedback. I\'ll adjust my approach accordingly.', timestamp: new Date().toISOString() }; setMessages(prev => [...prev, message]); }; const handleFileUpload = (newFiles) => { const processedFiles = newFiles.map(file => { const reader = new FileReader(); let textPreview = ''; // For text files, read content preview if (file.type.startsWith('text/') || file.name.endsWith('.json')) { reader.onload = (e) => { textPreview = e.target.result.substring(0, 200); setFiles(prev => prev.map(f => f.name === file.name ? {...f, textPreview} : f )); }; reader.readAsText(file); } return { id: `file-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, name: file.name, size: file.size, type: file.type, textPreview }; }); setFiles(prev => [...prev, ...processedFiles]); }; const handleRemoveFile = (fileId) => { setFiles(prev => prev.filter(file => file.id !== fileId)); }; useEffect(() => { feather.replace(); }, [messages, files, workflows]); return ( React.createElement(AgentContext.Provider, { value: agentInstance }, React.createElement('div', { className: "flex flex-col h-screen" }, // Header React.createElement('header', { className: "bg-slate-800 border-b border-slate-700 p-4" }, React.createElement('div', { className: "flex items-center justify-between" }, React.createElement('div', { className: "flex items-center gap-3" }, React.createElement('div', { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-primary-500 to-secondary-500 flex items-center justify-center" }, React.createElement('i', { 'data-feather': "cpu", className: "text-white" }) ), React.createElement('div', null, React.createElement('h1', { className: "text-xl font-bold" }, "TaskPilot"), React.createElement('p', { className: "text-xs text-slate-400" }, "Your Personal AI Task Agent") ) ), React.createElement('div', { className: "flex items-center gap-2" }, React.createElement('span', { className: "px-2 py-1 bg-slate-700 text-xs rounded-full" }, "MetaEvolver"), React.createElement('span', { className: "px-2 py-1 bg-slate-700 text-xs rounded-full" }, "AutoLoop") ) ) ), // Main Content React.createElement('div', { className: "flex flex-1 overflow-hidden" }, // Chat Panel - Left React.createElement('div', { className: "w-1/3 panel-border flex flex-col" }, React.createElement(ChatPanel, { messages: messages, onSendMessage: handleSendMessage, onFeedback: handleFeedback }) ), // Workflow Panel - Middle React.createElement('div', { className: "w-1/3 panel-border flex flex-col" }, React.createElement(WorkflowPanel, { workflows: workflows, onStartWorkflow: handleStartWorkflow, onUpdateStepStatus: handleUpdateStepStatus }) ), // Files & Inspector Panel - Right React.createElement('div', { className: "w-1/3 flex flex-col" }, React.createElement(FilesInspectorPanel, { files: files, onFileUpload: handleFileUpload, onRemoveFile: handleRemoveFile, policyState: policyState, reasoningTrace: reasoningTrace }) ) ) ) ) );};
// Render the appconst root = ReactDOM.createRoot(document.getElementById('root'));root.render(React.createElement(App));123423567891011126781314151611121314151718192018192021222321222324252627262728293031323334
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body { padding: 2rem; font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif; font-family: 'Inter', sans-serif; background-color: #0f172a; color: #f1f5f9; margin: 0; padding: 0; min-height: 100vh;}
h1 { font-size: 16px; margin-top: 0;.panel-border { border-right: 1px solid #1e293b;}
p { color: rgb(107, 114, 128); font-size: 15px; margin-bottom: 10px; margin-top: 5px;.step-card { transition: all 0.3s ease;}
.card { max-width: 620px; margin: 0 auto; padding: 16px; border: 1px solid lightgray; border-radius: 16px;.step-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);}
.card p:last-child { margin-bottom: 0;.status-pending { background-color: #475569; }.status-in-progress { background-color: #0ea5e9; }.status-done { background-color: #10b981; }.status-skipped { background-color: #64748b; }
.file-preview { max-height: 100px; overflow-y: auto;}index.html+8-31
script.jsAdded+703
style.css+24-18