Protokoll #12383
| ID | 12383 |
|---|---|
| Zeitstempel | 2025-12-24 01:10:39.097888 |
| Client | root |
| IP | Warning: Undefined array key "request_ip" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 13 Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 13 |
| Modell | claude-sonnet-4-20250514 |
| Status | completed |
| Tokens | 10,664 (Input: 0, Output: 0) |
| Dauer | 88 ms |
| Request-Zeit | Warning: Undefined array key "request_timestamp" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 18 |
| Response-Zeit | - |
Warning: Undefined array key "error_message" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 22
Request
{
"event": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/content\/show.php",
"old_string": "<h2>Aktionen<\/h2>\n<div class=\"action-bar\">\n <a href=\"\/content\/<?= $order['id'] ?>\/edit\" class=\"btn\">Bearbeiten<\/a>\n <?php if (!$latestVersion): ?>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/generate\" class=\"inline-form generate-form\" id=\"generate-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/generate\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\"\n hx-disabled-elt=\"find button\">\n <?= $csrfField ?>\n <select name=\"model\" class=\"form-select--inline\" <?= $isGenerating ? 'disabled' : '' ?>>\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <?php\n $collections = $availableCollections ?? [];\n $selected = $orderCollections;\n $name = 'collection';\n $variant = 'inline';\n $multiple = false;\n include __DIR__ . '\/..\/partials\/form\/collections-select.php';\n ?>\n <select name=\"context_limit\" class=\"form-select--inline\" <?= $isGenerating ? 'disabled' : '' ?>>\n <option value=\"3\" <?= $orderContextLimit === 3 ? 'selected' : '' ?>>3 Quellen<\/option>\n <option value=\"5\" <?= $orderContextLimit === 5 ? 'selected' : '' ?>>5 Quellen<\/option>\n <option value=\"10\" <?= $orderContextLimit === 10 ? 'selected' : '' ?>>10 Quellen<\/option>\n <option value=\"15\" <?= $orderContextLimit === 15 ? 'selected' : '' ?>>15 Quellen<\/option>\n <\/select>\n <button type=\"submit\" class=\"btn btn--primary generate-btn <?= $isGenerating ? 'is-loading' : '' ?>\" <?= $isGenerating ? 'disabled' : '' ?>>\n <span class=\"btn-text\">Generieren<\/span>\n <span class=\"btn-loading\"><span><\/span><span><\/span><span><\/span><\/span>\n <\/button>\n <\/form>\n <?php endif; ?>\n <?php if ($latestVersion): ?>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/critique\" class=\"inline-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/critique\"\n hx-target=\"#critique-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <select name=\"model\" class=\"form-select--inline\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <button type=\"submit\" class=\"btn btn--light\">Kritik-Runde<\/button>\n <\/form>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/revise\" class=\"inline-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/revise\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <select name=\"model\" class=\"form-select--inline\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <button type=\"submit\" class=\"btn btn--light\">Revision<\/button>\n <\/form>\n <?php if (in_array($order['status'], ['validate', 'critique', 'revision'])): ?>\n <button class=\"btn btn--success\" hx-post=\"\/content\/<?= $order['id'] ?>\/approve\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Genehmigen<\/button>\n <button class=\"btn btn--danger\" hx-post=\"\/content\/<?= $order['id'] ?>\/decline\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Ablehnen<\/button>\n <?php endif; ?>\n <?php endif; ?>\n<\/div>",
"new_string": "<h2>Aktionen<\/h2>\n<div class=\"action-cards\">\n <!-- Basis-Aktionen -->\n <div class=\"action-card\">\n <div class=\"action-card__header\">Auftrag<\/div>\n <div class=\"action-card__body\">\n <a href=\"\/content\/<?= $order['id'] ?>\/edit\" class=\"btn btn--full\">Bearbeiten<\/a>\n <\/div>\n <\/div>\n\n <?php if (!$latestVersion): ?>\n <!-- Content Generieren -->\n <div class=\"action-card action-card--primary\">\n <div class=\"action-card__header\">Content generieren<\/div>\n <div class=\"action-card__desc\">Erstellt Content basierend auf Briefing und RAG-Quellen<\/div>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/generate\" class=\"action-card__body generate-form\" id=\"generate-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/generate\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\"\n hx-disabled-elt=\"find button\">\n <?= $csrfField ?>\n <div class=\"form-row\">\n <label class=\"form-label\">KI-Modell<\/label>\n <select name=\"model\" class=\"form-select\" <?= $isGenerating ? 'disabled' : '' ?>>\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <\/div>\n <div class=\"form-row\">\n <label class=\"form-label\">Wissens-Quelle<\/label>\n <?php\n $collections = $availableCollections ?? [];\n $selected = $orderCollections;\n $name = 'collection';\n $variant = 'block';\n $multiple = false;\n include __DIR__ . '\/..\/partials\/form\/collections-select.php';\n ?>\n <\/div>\n <div class=\"form-row\">\n <label class=\"form-label\">Kontext-Limit<\/label>\n <select name=\"context_limit\" class=\"form-select\" <?= $isGenerating ? 'disabled' : '' ?>>\n <option value=\"3\" <?= $orderContextLimit === 3 ? 'selected' : '' ?>>3 Quellen<\/option>\n <option value=\"5\" <?= $orderContextLimit === 5 ? 'selected' : '' ?>>5 Quellen<\/option>\n <option value=\"10\" <?= $orderContextLimit === 10 ? 'selected' : '' ?>>10 Quellen<\/option>\n <option value=\"15\" <?= $orderContextLimit === 15 ? 'selected' : '' ?>>15 Quellen<\/option>\n <\/select>\n <\/div>\n <button type=\"submit\" class=\"btn btn--primary btn--full generate-btn <?= $isGenerating ? 'is-loading' : '' ?>\" <?= $isGenerating ? 'disabled' : '' ?>>\n <span class=\"btn-text\">Generieren<\/span>\n <span class=\"btn-loading\"><span><\/span><span><\/span><span><\/span><\/span>\n <\/button>\n <\/form>\n <\/div>\n <?php endif; ?>\n\n <?php if ($latestVersion): ?>\n <!-- Kritik-Runde -->\n <div class=\"action-card\">\n <div class=\"action-card__header\">Kritik-Runde<\/div>\n <div class=\"action-card__desc\">\n Alle aktiven Kritiker pruefen den Content:\n <a href=\"\/critics\" class=\"action-link\">Faktenpruefer, Stilist, Strukturanalyst<\/a>\n <\/div>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/critique\" class=\"action-card__body\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/critique\"\n hx-target=\"#critique-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <div class=\"form-row\">\n <label class=\"form-label\">KI-Modell fuer Kritik<\/label>\n <select name=\"model\" class=\"form-select\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <\/div>\n <button type=\"submit\" class=\"btn btn--light btn--full\">Kritik starten<\/button>\n <\/form>\n <\/div>\n\n <!-- Revision -->\n <div class=\"action-card\">\n <div class=\"action-card__header\">Revision erstellen<\/div>\n <div class=\"action-card__desc\">Ueberarbeitet Content basierend auf dem Kritik-Feedback<\/div>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/revise\" class=\"action-card__body\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/revise\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <div class=\"form-row\">\n <label class=\"form-label\">KI-Modell fuer Revision<\/label>\n <select name=\"model\" class=\"form-select\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <\/div>\n <button type=\"submit\" class=\"btn btn--light btn--full\">Revision erstellen<\/button>\n <\/form>\n <\/div>\n\n <!-- Freigabe -->\n <?php if (in_array($order['status'], ['validate', 'critique', 'revision'])): ?>\n <div class=\"action-card\">\n <div class=\"action-card__header\">Freigabe<\/div>\n <div class=\"action-card__desc\">Content genehmigen oder zurueck zu Entwurf<\/div>\n <div class=\"action-card__body action-card__buttons\">\n <button class=\"btn btn--success btn--full\" hx-post=\"\/content\/<?= $order['id'] ?>\/approve\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Genehmigen<\/button>\n <button class=\"btn btn--danger btn--full\" hx-post=\"\/content\/<?= $order['id'] ?>\/decline\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Ablehnen<\/button>\n <\/div>\n <\/div>\n <?php endif; ?>\n <?php endif; ?>\n<\/div>"
}
}
Response
{
"tool_response": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/content\/show.php",
"oldString": "<h2>Aktionen<\/h2>\n<div class=\"action-bar\">\n <a href=\"\/content\/<?= $order['id'] ?>\/edit\" class=\"btn\">Bearbeiten<\/a>\n <?php if (!$latestVersion): ?>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/generate\" class=\"inline-form generate-form\" id=\"generate-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/generate\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\"\n hx-disabled-elt=\"find button\">\n <?= $csrfField ?>\n <select name=\"model\" class=\"form-select--inline\" <?= $isGenerating ? 'disabled' : '' ?>>\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <?php\n $collections = $availableCollections ?? [];\n $selected = $orderCollections;\n $name = 'collection';\n $variant = 'inline';\n $multiple = false;\n include __DIR__ . '\/..\/partials\/form\/collections-select.php';\n ?>\n <select name=\"context_limit\" class=\"form-select--inline\" <?= $isGenerating ? 'disabled' : '' ?>>\n <option value=\"3\" <?= $orderContextLimit === 3 ? 'selected' : '' ?>>3 Quellen<\/option>\n <option value=\"5\" <?= $orderContextLimit === 5 ? 'selected' : '' ?>>5 Quellen<\/option>\n <option value=\"10\" <?= $orderContextLimit === 10 ? 'selected' : '' ?>>10 Quellen<\/option>\n <option value=\"15\" <?= $orderContextLimit === 15 ? 'selected' : '' ?>>15 Quellen<\/option>\n <\/select>\n <button type=\"submit\" class=\"btn btn--primary generate-btn <?= $isGenerating ? 'is-loading' : '' ?>\" <?= $isGenerating ? 'disabled' : '' ?>>\n <span class=\"btn-text\">Generieren<\/span>\n <span class=\"btn-loading\"><span><\/span><span><\/span><span><\/span><\/span>\n <\/button>\n <\/form>\n <?php endif; ?>\n <?php if ($latestVersion): ?>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/critique\" class=\"inline-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/critique\"\n hx-target=\"#critique-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <select name=\"model\" class=\"form-select--inline\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <button type=\"submit\" class=\"btn btn--light\">Kritik-Runde<\/button>\n <\/form>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/revise\" class=\"inline-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/revise\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <select name=\"model\" class=\"form-select--inline\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <button type=\"submit\" class=\"btn btn--light\">Revision<\/button>\n <\/form>\n <?php if (in_array($order['status'], ['validate', 'critique', 'revision'])): ?>\n <button class=\"btn btn--success\" hx-post=\"\/content\/<?= $order['id'] ?>\/approve\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Genehmigen<\/button>\n <button class=\"btn btn--danger\" hx-post=\"\/content\/<?= $order['id'] ?>\/decline\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Ablehnen<\/button>\n <?php endif; ?>\n <?php endif; ?>\n<\/div>",
"newString": "<h2>Aktionen<\/h2>\n<div class=\"action-cards\">\n <!-- Basis-Aktionen -->\n <div class=\"action-card\">\n <div class=\"action-card__header\">Auftrag<\/div>\n <div class=\"action-card__body\">\n <a href=\"\/content\/<?= $order['id'] ?>\/edit\" class=\"btn btn--full\">Bearbeiten<\/a>\n <\/div>\n <\/div>\n\n <?php if (!$latestVersion): ?>\n <!-- Content Generieren -->\n <div class=\"action-card action-card--primary\">\n <div class=\"action-card__header\">Content generieren<\/div>\n <div class=\"action-card__desc\">Erstellt Content basierend auf Briefing und RAG-Quellen<\/div>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/generate\" class=\"action-card__body generate-form\" id=\"generate-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/generate\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\"\n hx-disabled-elt=\"find button\">\n <?= $csrfField ?>\n <div class=\"form-row\">\n <label class=\"form-label\">KI-Modell<\/label>\n <select name=\"model\" class=\"form-select\" <?= $isGenerating ? 'disabled' : '' ?>>\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <\/div>\n <div class=\"form-row\">\n <label class=\"form-label\">Wissens-Quelle<\/label>\n <?php\n $collections = $availableCollections ?? [];\n $selected = $orderCollections;\n $name = 'collection';\n $variant = 'block';\n $multiple = false;\n include __DIR__ . '\/..\/partials\/form\/collections-select.php';\n ?>\n <\/div>\n <div class=\"form-row\">\n <label class=\"form-label\">Kontext-Limit<\/label>\n <select name=\"context_limit\" class=\"form-select\" <?= $isGenerating ? 'disabled' : '' ?>>\n <option value=\"3\" <?= $orderContextLimit === 3 ? 'selected' : '' ?>>3 Quellen<\/option>\n <option value=\"5\" <?= $orderContextLimit === 5 ? 'selected' : '' ?>>5 Quellen<\/option>\n <option value=\"10\" <?= $orderContextLimit === 10 ? 'selected' : '' ?>>10 Quellen<\/option>\n <option value=\"15\" <?= $orderContextLimit === 15 ? 'selected' : '' ?>>15 Quellen<\/option>\n <\/select>\n <\/div>\n <button type=\"submit\" class=\"btn btn--primary btn--full generate-btn <?= $isGenerating ? 'is-loading' : '' ?>\" <?= $isGenerating ? 'disabled' : '' ?>>\n <span class=\"btn-text\">Generieren<\/span>\n <span class=\"btn-loading\"><span><\/span><span><\/span><span><\/span><\/span>\n <\/button>\n <\/form>\n <\/div>\n <?php endif; ?>\n\n <?php if ($latestVersion): ?>\n <!-- Kritik-Runde -->\n <div class=\"action-card\">\n <div class=\"action-card__header\">Kritik-Runde<\/div>\n <div class=\"action-card__desc\">\n Alle aktiven Kritiker pruefen den Content:\n <a href=\"\/critics\" class=\"action-link\">Faktenpruefer, Stilist, Strukturanalyst<\/a>\n <\/div>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/critique\" class=\"action-card__body\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/critique\"\n hx-target=\"#critique-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <div class=\"form-row\">\n <label class=\"form-label\">KI-Modell fuer Kritik<\/label>\n <select name=\"model\" class=\"form-select\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <\/div>\n <button type=\"submit\" class=\"btn btn--light btn--full\">Kritik starten<\/button>\n <\/form>\n <\/div>\n\n <!-- Revision -->\n <div class=\"action-card\">\n <div class=\"action-card__header\">Revision erstellen<\/div>\n <div class=\"action-card__desc\">Ueberarbeitet Content basierend auf dem Kritik-Feedback<\/div>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/revise\" class=\"action-card__body\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/revise\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <div class=\"form-row\">\n <label class=\"form-label\">KI-Modell fuer Revision<\/label>\n <select name=\"model\" class=\"form-select\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <\/div>\n <button type=\"submit\" class=\"btn btn--light btn--full\">Revision erstellen<\/button>\n <\/form>\n <\/div>\n\n <!-- Freigabe -->\n <?php if (in_array($order['status'], ['validate', 'critique', 'revision'])): ?>\n <div class=\"action-card\">\n <div class=\"action-card__header\">Freigabe<\/div>\n <div class=\"action-card__desc\">Content genehmigen oder zurueck zu Entwurf<\/div>\n <div class=\"action-card__body action-card__buttons\">\n <button class=\"btn btn--success btn--full\" hx-post=\"\/content\/<?= $order['id'] ?>\/approve\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Genehmigen<\/button>\n <button class=\"btn btn--danger btn--full\" hx-post=\"\/content\/<?= $order['id'] ?>\/decline\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Ablehnen<\/button>\n <\/div>\n <\/div>\n <?php endif; ?>\n <?php endif; ?>\n<\/div>",
"originalFile": "<?php\nob_start();\n$orderModel = $order['model'] ?? 'claude-sonnet-4-20250514';\n$orderCollections = json_decode($order['collections'] ?? '[\"documents\"]', true) ?: ['documents'];\n$orderContextLimit = (int) ($order['context_limit'] ?? 5);\n$isGenerating = ($order['generation_status'] ?? 'idle') === 'generating';\n$orderId = $order['id'];\n?>\n\n<nav class=\"breadcrumb\">\n <a href=\"\/content\">Content Studio<\/a> » Auftrag #<?= $order['id'] ?>\n<\/nav>\n\n<h1><?= htmlspecialchars($order['title']) ?><\/h1>\n\n<div class=\"info-grid\">\n <div class=\"info-card\">\n <h3>Auftrag<\/h3>\n <dl class=\"info-list\">\n <dt>ID<\/dt><dd><?= $order['id'] ?><\/dd>\n <dt>Status<\/dt><dd><span class=\"badge badge--<?= $order['status'] ?>\"><?= $order['status'] ?><\/span><\/dd>\n <dt>Erstellt<\/dt><dd><?= $order['created_at'] ?><\/dd>\n <\/dl>\n <\/div>\n <div class=\"info-card\">\n <h3>KI-Einstellungen<\/h3>\n <dl class=\"info-list\">\n <dt>Modell<\/dt><dd><?= htmlspecialchars($models[$orderModel] ?? $orderModel) ?><\/dd>\n <dt>Collections<\/dt><dd><?= htmlspecialchars(implode(', ', $orderCollections)) ?><\/dd>\n <dt>Quellen<\/dt><dd><?= $orderContextLimit ?><\/dd>\n <\/dl>\n <\/div>\n <div class=\"info-card\">\n <h3>Content-Config<\/h3>\n <dl class=\"info-list\">\n <dt>Profil<\/dt><dd><?= htmlspecialchars($order['profile_name'] ?? '-') ?><\/dd>\n <dt>Contract<\/dt><dd><?= htmlspecialchars($order['contract_name'] ?? '-') ?><\/dd>\n <dt>Struktur<\/dt><dd><?= htmlspecialchars($order['structure_name'] ?? '-') ?><\/dd>\n <\/dl>\n <\/div>\n<\/div>\n\n<h2>Briefing<\/h2>\n<div class=\"briefing-box\"><?= nl2br(htmlspecialchars($order['briefing'])) ?><\/div>\n\n<h2>Aktionen<\/h2>\n<div class=\"action-bar\">\n <a href=\"\/content\/<?= $order['id'] ?>\/edit\" class=\"btn\">Bearbeiten<\/a>\n <?php if (!$latestVersion): ?>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/generate\" class=\"inline-form generate-form\" id=\"generate-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/generate\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\"\n hx-disabled-elt=\"find button\">\n <?= $csrfField ?>\n <select name=\"model\" class=\"form-select--inline\" <?= $isGenerating ? 'disabled' : '' ?>>\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <?php\n $collections = $availableCollections ?? [];\n $selected = $orderCollections;\n $name = 'collection';\n $variant = 'inline';\n $multiple = false;\n include __DIR__ . '\/..\/partials\/form\/collections-select.php';\n ?>\n <select name=\"context_limit\" class=\"form-select--inline\" <?= $isGenerating ? 'disabled' : '' ?>>\n <option value=\"3\" <?= $orderContextLimit === 3 ? 'selected' : '' ?>>3 Quellen<\/option>\n <option value=\"5\" <?= $orderContextLimit === 5 ? 'selected' : '' ?>>5 Quellen<\/option>\n <option value=\"10\" <?= $orderContextLimit === 10 ? 'selected' : '' ?>>10 Quellen<\/option>\n <option value=\"15\" <?= $orderContextLimit === 15 ? 'selected' : '' ?>>15 Quellen<\/option>\n <\/select>\n <button type=\"submit\" class=\"btn btn--primary generate-btn <?= $isGenerating ? 'is-loading' : '' ?>\" <?= $isGenerating ? 'disabled' : '' ?>>\n <span class=\"btn-text\">Generieren<\/span>\n <span class=\"btn-loading\"><span><\/span><span><\/span><span><\/span><\/span>\n <\/button>\n <\/form>\n <?php endif; ?>\n <?php if ($latestVersion): ?>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/critique\" class=\"inline-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/critique\"\n hx-target=\"#critique-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <select name=\"model\" class=\"form-select--inline\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <button type=\"submit\" class=\"btn btn--light\">Kritik-Runde<\/button>\n <\/form>\n <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/revise\" class=\"inline-form\"\n hx-post=\"\/content\/<?= $order['id'] ?>\/revise\"\n hx-target=\"#content-result\"\n hx-swap=\"innerHTML\">\n <?= $csrfField ?>\n <select name=\"model\" class=\"form-select--inline\">\n <?php foreach ($models ?? [] as $modelId => $modelName): ?>\n <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <button type=\"submit\" class=\"btn btn--light\">Revision<\/button>\n <\/form>\n <?php if (in_array($order['status'], ['validate', 'critique', 'revision'])): ?>\n <button class=\"btn btn--success\" hx-post=\"\/content\/<?= $order['id'] ?>\/approve\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Genehmigen<\/button>\n <button class=\"btn btn--danger\" hx-post=\"\/content\/<?= $order['id'] ?>\/decline\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Ablehnen<\/button>\n <?php endif; ?>\n <?php endif; ?>\n<\/div>\n\n<div id=\"content-result\">\n<?php if ($isGenerating): ?>\n <?php include __DIR__ . '\/partials\/generating.php'; ?>\n<?php endif; ?>\n<\/div>\n<div id=\"critique-result\"><\/div>\n\n<?php if ($latestVersion):\n $contentData = json_decode($latestVersion['content'], true);\n $contentText = is_array($contentData) ? ($contentData['text'] ?? '') : $latestVersion['content'];\n ?>\n<h2>Content (Version <?= $latestVersion['version_number'] ?>)<\/h2>\n<div class=\"result-box\">\n <div class=\"result-box__header\">\n <strong>Version <?= $latestVersion['version_number'] ?><\/strong>\n <span><?= date('d.m.Y H:i', strtotime($latestVersion['created_at'])) ?><\/span>\n <\/div>\n <div class=\"result-box__content\">\n <pre><?= htmlspecialchars($contentText) ?><\/pre>\n <\/div>\n<\/div>\n<?php endif; ?>\n\n<?php if (!empty($critiques)): ?>\n<h2>Kritiken<\/h2>\n<table data-sortable>\n <thead>\n <tr>\n <th data-sort=\"round\">Runde<\/th>\n <th data-sort=\"critic\">Kritiker<\/th>\n <th data-sort=\"rating\">Bewertung<\/th>\n <th data-sort=\"status\">Status<\/th>\n <th data-sort=\"summary\">Zusammenfassung<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php foreach ($critiques as $c): ?>\n <tr>\n <td><?= $c['round'] ?? '-' ?><\/td>\n <td><?= htmlspecialchars($c['critic_name'] ?? '-') ?><\/td>\n <td><?= $c['rating'] ?? '-' ?>\/10<\/td>\n <td><span class=\"badge badge--<?= ($c['passed'] ?? false) ? 'completed' : 'failed' ?>\"><?= ($c['passed'] ?? false) ? 'Bestanden' : 'Offen' ?><\/span><\/td>\n <td><?= htmlspecialchars($c['summary'] ?? '-') ?><\/td>\n <\/tr>\n <?php endforeach; ?>\n <\/tbody>\n<\/table>\n<?php endif; ?>\n\n<?php if (!empty($sources)): ?>\n<h2>Quellen (RAG)<\/h2>\n<table data-sortable>\n <thead>\n <tr>\n <th data-sort=\"document\">Dokument<\/th>\n <th data-sort=\"score\">Relevanz<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php foreach ($sources as $s): ?>\n <tr>\n <td><?= htmlspecialchars($s['document_name'] ?? 'Unbekannt') ?><\/td>\n <td><?= round(($s['relevance_score'] ?? 0) * 100) ?>%<\/td>\n <\/tr>\n <?php endforeach; ?>\n <\/tbody>\n<\/table>\n<?php endif; ?>\n\n<?php if (count($versions) > 1): ?>\n<h2>Versionshistorie<\/h2>\n<table data-sortable>\n <thead>\n <tr>\n <th data-sort=\"version\">Version<\/th>\n <th data-sort=\"created\">Erstellt<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php foreach ($versions as $v): ?>\n <tr>\n <td>V<?= $v['version_number'] ?><\/td>\n <td><?= date('d.m.Y H:i', strtotime($v['created_at'])) ?><\/td>\n <\/tr>\n <?php endforeach; ?>\n <\/tbody>\n<\/table>\n<?php endif; ?>\n\n<p style=\"margin-top: 2rem;\"><a href=\"\/content\">← Zurück zur Übersicht<\/a><\/p>\n\n<style>\n.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-lg); }\n.info-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 8px; padding: var(--space-md); }\n.info-card h3 { margin: 0 0 var(--space-sm) 0; font-size: 0.9rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }\n.info-list { display: grid; grid-template-columns: auto 1fr; gap: var(--space-xs) var(--space-sm); margin: 0; }\n.info-list dt { color: var(--color-text-muted); font-size: 0.85rem; }\n.info-list dd { margin: 0; font-weight: 500; }\n.briefing-box { background: var(--color-bg-muted); border-radius: 8px; padding: var(--space-md); margin-bottom: var(--space-lg); line-height: 1.6; }\n.action-bar { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; margin-bottom: var(--space-lg); }\n.inline-form { display: flex; gap: var(--space-xs); align-items: center; }\n.form-select--inline { padding: 0.4rem 0.6rem; font-size: 0.85rem; border-radius: 4px; }\n\n\/* Generate Button Animation *\/\n.generate-btn .btn-text { display: inline; }\n.generate-btn .btn-loading { display: none; gap: 3px; justify-content: center; align-items: center; }\n.generate-btn.is-loading .btn-text { display: none; }\n.generate-btn.is-loading .btn-loading { display: inline-flex; }\n.generate-btn .btn-loading span {\n width: 6px; height: 6px;\n background: currentColor;\n border-radius: 50%;\n animation: btn-bounce 1.4s infi... [TRUNCATED-221ecde3aa67619a]",
"structuredPatch": [
{
"oldStart": 44,
"oldLines": 68,
"newStart": 44,
"newLines": 118,
"lines": [
" <div class=\"briefing-box\"><?= nl2br(htmlspecialchars($order['briefing'])) ?><\/div>",
" ",
" <h2>Aktionen<\/h2>",
"-<div class=\"action-bar\">",
"- <a href=\"\/content\/<?= $order['id'] ?>\/edit\" class=\"btn\">Bearbeiten<\/a>",
"+<div class=\"action-cards\">",
"+ <!-- Basis-Aktionen -->",
"+ <div class=\"action-card\">",
"+ <div class=\"action-card__header\">Auftrag<\/div>",
"+ <div class=\"action-card__body\">",
"+ <a href=\"\/content\/<?= $order['id'] ?>\/edit\" class=\"btn btn--full\">Bearbeiten<\/a>",
"+ <\/div>",
"+ <\/div>",
"+",
" <?php if (!$latestVersion): ?>",
"- <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/generate\" class=\"inline-form generate-form\" id=\"generate-form\"",
"- hx-post=\"\/content\/<?= $order['id'] ?>\/generate\"",
"- hx-target=\"#content-result\"",
"- hx-swap=\"innerHTML\"",
"- hx-disabled-elt=\"find button\">",
"- <?= $csrfField ?>",
"- <select name=\"model\" class=\"form-select--inline\" <?= $isGenerating ? 'disabled' : '' ?>>",
"- <?php foreach ($models ?? [] as $modelId => $modelName): ?>",
"- <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>",
"- <?php endforeach; ?>",
"- <\/select>",
"- <?php",
"- $collections = $availableCollections ?? [];",
"- $selected = $orderCollections;",
"- $name = 'collection';",
"- $variant = 'inline';",
"- $multiple = false;",
"- include __DIR__ . '\/..\/partials\/form\/collections-select.php';",
"- ?>",
"- <select name=\"context_limit\" class=\"form-select--inline\" <?= $isGenerating ? 'disabled' : '' ?>>",
"- <option value=\"3\" <?= $orderContextLimit === 3 ? 'selected' : '' ?>>3 Quellen<\/option>",
"- <option value=\"5\" <?= $orderContextLimit === 5 ? 'selected' : '' ?>>5 Quellen<\/option>",
"- <option value=\"10\" <?= $orderContextLimit === 10 ? 'selected' : '' ?>>10 Quellen<\/option>",
"- <option value=\"15\" <?= $orderContextLimit === 15 ? 'selected' : '' ?>>15 Quellen<\/option>",
"- <\/select>",
"- <button type=\"submit\" class=\"btn btn--primary generate-btn <?= $isGenerating ? 'is-loading' : '' ?>\" <?= $isGenerating ? 'disabled' : '' ?>>",
"- <span class=\"btn-text\">Generieren<\/span>",
"- <span class=\"btn-loading\"><span><\/span><span><\/span><span><\/span><\/span>",
"- <\/button>",
"- <\/form>",
"+ <!-- Content Generieren -->",
"+ <div class=\"action-card action-card--primary\">",
"+ <div class=\"action-card__header\">Content generieren<\/div>",
"+ <div class=\"action-card__desc\">Erstellt Content basierend auf Briefing und RAG-Quellen<\/div>",
"+ <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/generate\" class=\"action-card__body generate-form\" id=\"generate-form\"",
"+ hx-post=\"\/content\/<?= $order['id'] ?>\/generate\"",
"+ hx-target=\"#content-result\"",
"+ hx-swap=\"innerHTML\"",
"+ hx-disabled-elt=\"find button\">",
"+ <?= $csrfField ?>",
"+ <div class=\"form-row\">",
"+ <label class=\"form-label\">KI-Modell<\/label>",
"+ <select name=\"model\" class=\"form-select\" <?= $isGenerating ? 'disabled' : '' ?>>",
"+ <?php foreach ($models ?? [] as $modelId => $modelName): ?>",
"+ <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>",
"+ <?php endforeach; ?>",
"+ <\/select>",
"+ <\/div>",
"+ <div class=\"form-row\">",
"+ <label class=\"form-label\">Wissens-Quelle<\/label>",
"+ <?php",
"+ $collections = $availableCollections ?? [];",
"+ $selected = $orderCollections;",
"+ $name = 'collection';",
"+ $variant = 'block';",
"+ $multiple = false;",
"+ include __DIR__ . '\/..\/partials\/form\/collections-select.php';",
"+ ?>",
"+ <\/div>",
"+ <div class=\"form-row\">",
"+ <label class=\"form-label\">Kontext-Limit<\/label>",
"+ <select name=\"context_limit\" class=\"form-select\" <?= $isGenerating ? 'disabled' : '' ?>>",
"+ <option value=\"3\" <?= $orderContextLimit === 3 ? 'selected' : '' ?>>3 Quellen<\/option>",
"+ <option value=\"5\" <?= $orderContextLimit === 5 ? 'selected' : '' ?>>5 Quellen<\/option>",
"+ <option value=\"10\" <?= $orderContextLimit === 10 ? 'selected' : '' ?>>10 Quellen<\/option>",
"+ <option value=\"15\" <?= $orderContextLimit === 15 ? 'selected' : '' ?>>15 Quellen<\/option>",
"+ <\/select>",
"+ <\/div>",
"+ <button type=\"submit\" class=\"btn btn--primary btn--full generate-btn <?= $isGenerating ? 'is-loading' : '' ?>\" <?= $isGenerating ? 'disabled' : '' ?>>",
"+ <span class=\"btn-text\">Generieren<\/span>",
"+ <span class=\"btn-loading\"><span><\/span><span><\/span><span><\/span><\/span>",
"+ <\/button>",
"+ <\/form>",
"+ <\/div>",
" <?php endif; ?>",
"+",
" <?php if ($latestVersion): ?>",
"- <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/critique\" class=\"inline-form\"",
"- hx-post=\"\/content\/<?= $order['id'] ?>\/critique\"",
"- hx-target=\"#critique-result\"",
"- hx-swap=\"innerHTML\">",
"- <?= $csrfField ?>",
"- <select name=\"model\" class=\"form-select--inline\">",
"- <?php foreach ($models ?? [] as $modelId => $modelName): ?>",
"- <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>",
"- <?php endforeach; ?>",
"- <\/select>",
"- <button type=\"submit\" class=\"btn btn--light\">Kritik-Runde<\/button>",
"- <\/form>",
"- <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/revise\" class=\"inline-form\"",
"- hx-post=\"\/content\/<?= $order['id'] ?>\/revise\"",
"- hx-target=\"#content-result\"",
"- hx-swap=\"innerHTML\">",
"- <?= $csrfField ?>",
"- <select name=\"model\" class=\"form-select--inline\">",
"- <?php foreach ($models ?? [] as $modelId => $modelName): ?>",
"- <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>",
"- <?php endforeach; ?>",
"- <\/select>",
"- <button type=\"submit\" class=\"btn btn--light\">Revision<\/button>",
"- <\/form>",
"+ <!-- Kritik-Runde -->",
"+ <div class=\"action-card\">",
"+ <div class=\"action-card__header\">Kritik-Runde<\/div>",
"+ <div class=\"action-card__desc\">",
"+ Alle aktiven Kritiker pruefen den Content:",
"+ <a href=\"\/critics\" class=\"action-link\">Faktenpruefer, Stilist, Strukturanalyst<\/a>",
"+ <\/div>",
"+ <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/critique\" class=\"action-card__body\"",
"+ hx-post=\"\/content\/<?= $order['id'] ?>\/critique\"",
"+ hx-target=\"#critique-result\"",
"+ hx-swap=\"innerHTML\">",
"+ <?= $csrfField ?>",
"+ <div class=\"form-row\">",
"+ <label class=\"form-label\">KI-Modell fuer Kritik<\/label>",
"+ <select name=\"model\" class=\"form-select\">",
"+ <?php foreach ($models ?? [] as $modelId => $modelName): ?>",
"+ <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>",
"+ <?php endforeach; ?>",
"+ <\/select>",
"+ <\/div>",
"+ <button type=\"submit\" class=\"btn btn--light btn--full\">Kritik starten<\/button>",
"+ <\/form>",
"+ <\/div>",
"+",
"+ <!-- Revision -->",
"+ <div class=\"action-card\">",
"+ <div class=\"action-card__header\">Revision erstellen<\/div>",
"+ <div class=\"action-card__desc\">Ueberarbeitet Content basierend auf dem Kritik-Feedback<\/div>",
"+ <form method=\"POST\" action=\"\/content\/<?= $order['id'] ?>\/revise\" class=\"action-card__body\"",
"+ hx-post=\"\/content\/<?= $order['id'] ?>\/revise\"",
"+ hx-target=\"#content-result\"",
"+ hx-swap=\"innerHTML\">",
"+ <?= $csrfField ?>",
"+ <div class=\"form-row\">",
"+ <label class=\"form-label\">KI-Modell fuer Revision<\/label>",
"+ <select name=\"model\" class=\"form-select\">",
"+ <?php foreach ($models ?? [] as $modelId => $modelName): ?>",
"+ <option value=\"<?= $modelId ?>\" <?= $modelId === $orderModel ? 'selected' : '' ?>><?= htmlspecialchars($modelName) ?><\/option>",
"+ <?php endforeach; ?>",
"+ <\/select>",
"+ <\/div>",
"+ <button type=\"submit\" class=\"btn btn--light btn--full\">Revision erstellen<\/button>",
"+ <\/form>",
"+ <\/div>",
"+",
"+ <!-- Freigabe -->",
" <?php if (in_array($order['status'], ['validate', 'critique', 'revision'])): ?>",
"- <button class=\"btn btn--success\" hx-post=\"\/content\/<?= $order['id'] ?>\/approve\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Genehmigen<\/button>",
"- <button class=\"btn btn--danger\" hx-post=\"\/content\/<?= $order['id'] ?>\/decline\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Ablehnen<\/button>",
"+ <div class=\"action-card\">",
"+ <div class=\"action-card__header\">Freigabe<\/div>",
"+ <div class=\"action-card__desc\">Content genehmigen oder zurueck zu Entwurf<\/div>",
"+ <div class=\"action-card__body action-card__buttons\">",
"+ <button class=\"btn btn--success btn--full\" hx-post=\"\/content\/<?= $order['id'] ?>\/approve\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Genehmigen<\/button>",
"+ <button class=\"btn btn--danger btn--full\" hx-post=\"\/content\/<?= $order['id'] ?>\/decline\" hx-swap=\"none\" hx-on::after-request=\"location.reload()\" hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'>Ablehnen<\/button>",
"+ <\/div>",
"+ <\/div>",
" <?php endif; ?>",
" <?php endif; ?>",
" <\/div>"
]
}
],
"userModified": false,
"replaceAll": false
}
}