feat: add legal document acceptance and standard project files generation

Implement legal document acceptance tracking requiring users to accept
terms of service and privacy policy before continuing to use the system.
Add automatic generation of standard project files (LICENSE, README.md,
RULES.md, cookies.html, termos-de-uso.html, privacidade.html) with
download functionality. Enhance prompt building with detailed Portuguese
instructions and system requirements. Update seeders with comprehensive
legal content and standard files configuration for all prompt templates.
This commit is contained in:
2026-10-07 21:30:40 -03:00
parent 9b21d11e75
commit f2bca340f9
13 changed files with 883 additions and 75 deletions
@@ -342,6 +342,14 @@
document.getElementById('variables').value = template.variables || '';
document.getElementById('temperature').value = template.temperature ?? 0.7;
document.getElementById('max_tokens').value = template.max_tokens ?? 1024;
if (template.standard_files !== false) {
const stdFilesNote = "\n\n---\nNOTA: Os arquivos padrao (LICENSE, README.md, RULES.md, cookies.html, termos-de-uso.html, privacidade.html) serao gerados automaticamente pelo sistema apos a geracao do prompt. NAO os inclua na sua resposta.";
const constraintsEl = document.getElementById('constraints');
if (constraintsEl && !constraintsEl.value.includes('Arquivos padrao')) {
constraintsEl.value = constraintsEl.value.trim() + stdFilesNote;
}
}
} else {
const fields = ['title', 'objective', 'context', 'persona', 'tone', 'constraints', 'output_format', 'examples', 'variables', 'temperature', 'max_tokens'];
fields.forEach(field => {