{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/docs\/plan-form-components-refactoring.md",
"offset": 1900
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/docs\/plan-form-components-refactoring.md",
"content": "```\n\n### 3.7 max-tokens.php\n\n**Input:**\n```php\n$options = [\n 'selected' => 4096, \/\/ Optional\n 'name' => 'max_tokens', \/\/ Optional\n 'tokens' => [1024, 2048, 4096, 8192], \/\/ Optional\n];\n```\n\n### 3.8 contract.php \/ structure.php\n\nAnalog zu author-profile.php.\n\n---\n\n## 4. CSS-Klassen (einheitlich)\n\n```css\n\/* Basis *\/\n.form-select { \/* Standard Select *\/ }\n.form-select--inline { \/* Kompakt für Inline-Nutzung *\/ }\n.form-input { \/* Standard Input *\/ }\n.form-range { \/* Range Slider *\/ }\n.form-checkbox { \/* Checkbox *\/ }\n\n\/* Spezifisch *\/\n.collections-select { \/* Multi-Select für Collections *\/ }\n.temperature-control { \/* Wrapper für Temp-Slider *\/ }\n\n\/* Varianten *\/\n.form-group { \/* Wrapper mit Label *\/ }\n.form-group--inline { \/* Inline-Variante *\/ }\n```\n\n---\n\n## 5. Verwendung in Views\n\n### 5.1 Chat (nach Refactoring)\n\n```php\n<div class=\"chat-options-row\">\n <?php include VIEW_PATH . '\/partials\/form\/model-select.php'; ?>\n <?php include VIEW_PATH . '\/partials\/form\/collections.php'; ?>\n <?php include VIEW_PATH . '\/partials\/form\/context-limit.php'; ?>\n <?php include VIEW_PATH . '\/partials\/form\/author-profile.php'; ?>\n <?php include VIEW_PATH . '\/partials\/form\/system-prompt.php'; ?>\n<\/div>\n<div class=\"chat-options-row chat-options-row--advanced\">\n <?php include VIEW_PATH . '\/partials\/form\/temperature.php'; ?>\n <?php include VIEW_PATH . '\/partials\/form\/max-tokens.php'; ?>\n<\/div>\n```\n\n### 5.2 Content New (nach Refactoring)\n\n```php\n<fieldset>\n <legend>KI-Einstellungen<\/legend>\n <div class=\"form-row\">\n <?php $options = ['variant' => 'default', 'label' => 'Sprachmodell']; ?>\n <?php include VIEW_PATH . '\/partials\/form\/model-select.php'; ?>\n <?php include VIEW_PATH . '\/partials\/form\/context-limit.php'; ?>\n <\/div>\n <?php $options = ['variant' => 'checkbox']; ?>\n <?php include VIEW_PATH . '\/partials\/form\/collections.php'; ?>\n<\/fieldset>\n```\n\n### 5.3 Content Show (nach Refactoring)\n\n```php\n<div class=\"action-bar\">\n <?php $options = ['variant' => 'inline']; ?>\n <?php include VIEW_PATH . '\/partials\/form\/model-select.php'; ?>\n <?php include VIEW_PATH . '\/partials\/form\/collections.php'; ?>\n <?php include VIEW_PATH . '\/partials\/form\/context-limit.php'; ?>\n<\/div>\n```\n\n---\n\n## 6. Controller-Anpassungen\n\n### 6.1 Einheitliche Daten-Bereitstellung\n\n```php\n\/\/ ChatController::show()\n$this->view('chat.index', [\n 'models' => ModelConfig::getAll(),\n 'defaultModel' => ModelConfig::DEFAULT_MODEL,\n 'collections' => $this->qdrantService->listCollections(),\n 'authorProfiles' => $this->repository->findByType('author_profile'),\n 'systemPrompts' => $this->repository->findByType('system_prompt'),\n \/\/ ...\n]);\n\n\/\/ ContentController::contentNew()\n$this->view('content.new', [\n 'models' => ModelConfig::getAll(),\n 'defaultModel' => ModelConfig::DEFAULT_MODEL,\n 'collections' => $this->qdrantService->listCollections(),\n 'authorProfiles' => $this->repository->findByType('author_profile'),\n 'contracts' => $this->repository->findByType('contract'),\n 'structures' => $this->repository->findByType('structure'),\n \/\/ ...\n]);\n```\n\n---\n\n## 7. Migrations-Schritte\n\n### Phase 1: Infrastruktur\n1. [ ] Verzeichnis `\/src\/View\/partials\/form\/` erstellen\n2. [ ] `CollectionConfig.php` erstellen (Label-Mapping)\n3. [ ] CSS-Klassen vereinheitlichen in `styles.css`\n\n### Phase 2: Partials erstellen\n4. [ ] `model-select.php` - mit Optgroup-Support\n5. [ ] `collections.php` - mit Varianten (multi\/single\/checkbox)\n6. [ ] `context-limit.php`\n7. [ ] `author-profile.php`\n8. [ ] `system-prompt.php`\n9. [ ] `temperature.php`\n10. [ ] `max-tokens.php`\n11. [ ] `contract.php`\n12. [ ] `structure.php`\n\n### Phase 3: Views migrieren\n13. [ ] `chat\/index.php` auf Partials umstellen\n14. [ ] `content\/new.php` auf Partials umstellen\n15. [ ] `content\/show.php` auf Partials umstellen\n\n### Phase 4: Controller anpassen\n16. [ ] Variablennamen vereinheitlichen\n17. [ ] Redundante Logik entfernen\n\n### Phase 5: Testing\n18. [ ] Chat funktioniert wie vorher\n19. [ ] Content Studio funktioniert wie vorher\n20. [ ] Visuelle Konsistenz prüfen\n\n---\n\n## 8. Nicht im Scope\n\n- Neue Features hinzufügen\n- UX-Redesign\n- Zusätzliche Validierung\n- JavaScript-Komponenten (außer bestehende)\n\n---\n\n## 9. Risiken\n\n| Risiko | Mitigation |\n|--------|------------|\n| Breaking Changes in Forms | Schrittweise Migration, Testing pro View |\n| CSS-Konflikte | Klassen-Prefix oder BEM-Notation |\n| Variable-Scope in Partials | `$options`-Array als Konvention |\n\n---\n\n## 10. Erfolgskriterien\n\n- [ ] Jedes Form-Element existiert nur 1x als Partial\n- [ ] Alle Views nutzen dieselben Partials\n- [ ] Einheitliche CSS-Klassen\n- [ ] Einheitliche Variablennamen\n- [ ] Collection-Labels überall deutsch\n- [ ] Modell-Dropdown überall mit Optgroups\n",
"numLines": 177,
"startLine": 1900,
"totalLines": 2076
}
}
}