diff --git a/network-poc/static/index.html b/network-poc/static/index.html index 3273947..f7ead66 100644 --- a/network-poc/static/index.html +++ b/network-poc/static/index.html @@ -1459,12 +1459,14 @@ filename.py: one-line description CONSTRAINTS: the coder can only generate ~400 tokens per file - Max 3 files (keep it minimal) - Each file must be SHORT: one clear responsibility, no boilerplate -- Only .py and pyproject.toml files +- Only .py, .html and pyproject.toml files +- If the project has a UI, include one index.html served by FastAPI at / EXAMPLE: for "FastAPI todo app with SQLite" pyproject.toml: project metadata and dependencies models.py: SQLAlchemy models and database setup -main.py: FastAPI app with CRUD endpoints +main.py: FastAPI app with CRUD endpoints and serves index.html at / +index.html: simple HTML UI with forms and fetch() to call the API Project: (käyttäjän kuvaus)` }, coder: { label: 'Koodaus', prompt: `Project: (managerin suunnitelma) @@ -2168,8 +2170,9 @@ IMPORTANT: Include get_db() dependency for FastAPI` }, const icon = s.status === 'done' ? '✓' : s.status === 'active' ? '◷' : '◯'; const iconColor = s.status === 'done' ? '#3fb950' : s.status === 'active' ? '#d29922' : '#8b949e'; const arrow = i < pipelineSteps.length - 1 ? ' → ' : ''; - // Tooltip: input/output esikatselu - return `${icon} ${esc(s.label)}${arrow}`; + const stepDescs = { 'Suunnittelu': 'Pilkkoo tiedostoiksi', 'Review': 'Arvioi koodin laadun', 'Testit': 'Kirjoittaa testit', 'Dockerfile': 'Docker-image', 'Compose': 'Palvelumääritys', 'README': 'Dokumentaatio', 'Validointi': 'Tarkistaa yhteensopivuuden', 'Korjaukset': 'Korjaa löydetyt bugit' }; + const desc = stepDescs[s.label] || s.label; + return `${icon} ${esc(s.label)}${arrow}`; }).join(''); } @@ -2364,14 +2367,16 @@ filename.py: one-line description CONSTRAINTS — the coder can only generate ~400 tokens per file: - Max 3 files (keep it minimal) - Each file must be SHORT: one clear responsibility, no boilerplate -- Only .py and pyproject.toml files +- Only .py, .html and pyproject.toml files +- If the project has a UI, include one index.html served by FastAPI at / - No directories, no paths, just filenames - List dependencies first, then main app EXAMPLE for "FastAPI todo app with SQLite": pyproject.toml: project metadata and dependencies models.py: SQLAlchemy models and database setup -main.py: FastAPI app with CRUD endpoints +main.py: FastAPI app with CRUD endpoints and serves index.html at / +index.html: simple HTML UI with forms and fetch() to call the API Project: ${task}`; termLog(`\n[1] Manageri — projektin suunnittelu`); @@ -2646,7 +2651,7 @@ ${Object.entries(generatedFiles).map(([n, c]) => `--- ${n} ---\n${c}`).join('\n\ const mainFile = Object.keys(generatedFiles).find(f => f.includes('main') || f.includes('app')) || Object.keys(generatedFiles)[0]; const hasPyproject = 'pyproject.toml' in generatedFiles; const hasRequirements = 'requirements.txt' in generatedFiles; - const pyFiles = Object.keys(generatedFiles).filter(f => f.endsWith('.py')); + const codeFiles = Object.keys(generatedFiles).filter(f => f.endsWith('.py') || f.endsWith('.html')); // Dockerfile-templatti: ei anneta mallin keksiä omaa let depLines; if (hasPyproject) { @@ -2660,7 +2665,7 @@ ${Object.entries(generatedFiles).map(([n, c]) => `--- ${n} ---\n${c}`).join('\n\ COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv WORKDIR /app ${depLines} -COPY ${pyFiles.join(' ')} ./ +COPY ${codeFiles.join(' ')} ./ EXPOSE 8000 CMD ["uv", "run", "uvicorn", "${mainFile.replace('.py','')}:app", "--host", "0.0.0.0", "--port", "8000"]`; // Generoidaan Dockerfile suoraan templatesta, ei mallilla @@ -2694,8 +2699,8 @@ volumes: pipelineStep('tester', 'README', 'active', 'README.md'); const readmePrompt = `Write a minimal README.md. Include ONLY: 1. One-line description -2. Quick start: docker compose up -3. Development: uv sync && uv run uvicorn main:app --reload +2. Quick start: docker compose up → open http://localhost:8000 +3. Development: uv sync && uv run uvicorn main:app --reload → http://localhost:8000 4. API endpoints (if applicable) 5. Testing: uv run pytest Max 20 lines. @@ -2822,6 +2827,11 @@ ${fixableFiles}`;
${task} — ${new Date().toLocaleString('fi-FI')} — ${fileEntries.length} tiedostoa, ${steps.length} vaihetta
+Generoitu Kipinä Agentic Playground v0.2.2 — kipina.studio
+