{
"event": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/chat\/partials\/system-prompt-modal.php",
"old_string": " <form class=\"modal__body\"\n hx-post=\"\/chat\/<?= htmlspecialchars($uuid) ?>\/system-prompt\"\n hx-target=\"#system-prompt-result\"\n hx-swap=\"innerHTML\">",
"new_string": " <form class=\"modal__body\"\n hx-post=\"\/chat\/<?= htmlspecialchars($uuid) ?>\/system-prompt\"\n hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'\n hx-target=\"#system-prompt-result\"\n hx-swap=\"innerHTML\">"
}
}
{
"tool_response": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/chat\/partials\/system-prompt-modal.php",
"oldString": " <form class=\"modal__body\"\n hx-post=\"\/chat\/<?= htmlspecialchars($uuid) ?>\/system-prompt\"\n hx-target=\"#system-prompt-result\"\n hx-swap=\"innerHTML\">",
"newString": " <form class=\"modal__body\"\n hx-post=\"\/chat\/<?= htmlspecialchars($uuid) ?>\/system-prompt\"\n hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'\n hx-target=\"#system-prompt-result\"\n hx-swap=\"innerHTML\">",
"originalFile": "<?php\n\/**\n * System Prompt Modal Partial\n *\n * @var array $session Current session data\n * @var string $currentPrompt Current custom system prompt\n * @var string $defaultPrompt Default system prompt\n *\/\n\n$uuid = $session['uuid'] ?? '';\n?>\n<div class=\"modal-backdrop\" onclick=\"closeSystemPromptModal()\"><\/div>\n<div class=\"modal modal--system-prompt\">\n <div class=\"modal__header\">\n <h3>System-Prompt bearbeiten<\/h3>\n <button type=\"button\" class=\"modal__close\" onclick=\"closeSystemPromptModal()\">×<\/button>\n <\/div>\n <form class=\"modal__body\"\n hx-post=\"\/chat\/<?= htmlspecialchars($uuid) ?>\/system-prompt\"\n hx-target=\"#system-prompt-result\"\n hx-swap=\"innerHTML\">\n <div class=\"form-group\">\n <label for=\"system_prompt\">Eigener System-Prompt:<\/label>\n <textarea name=\"system_prompt\"\n id=\"system_prompt\"\n rows=\"8\"\n placeholder=\"Leer lassen für Standard-Prompt...\"\n maxlength=\"2000\"><?= htmlspecialchars($currentPrompt) ?><\/textarea>\n <small class=\"form-help\">Max. 2000 Zeichen. Leer lassen für Standard-Prompt.<\/small>\n <\/div>\n <div class=\"form-group\">\n <details>\n <summary>Standard-Prompt anzeigen<\/summary>\n <pre class=\"default-prompt\"><?= htmlspecialchars($defaultPrompt) ?><\/pre>\n <\/details>\n <\/div>\n <div id=\"system-prompt-result\"><\/div>\n <div class=\"modal__footer\">\n <button type=\"button\" class=\"btn btn--secondary\" onclick=\"closeSystemPromptModal()\">Abbrechen<\/button>\n <button type=\"submit\" class=\"btn btn--primary\">Speichern<\/button>\n <\/div>\n <\/form>\n<\/div>\n\n<script>\nfunction closeSystemPromptModal() {\n const modal = document.querySelector('.modal--system-prompt');\n const backdrop = document.querySelector('.modal-backdrop');\n if (modal) modal.remove();\n if (backdrop) backdrop.remove();\n}\n<\/script>\n",
"structuredPatch": [
{
"oldStart": 17,
"oldLines": 6,
"newStart": 17,
"newLines": 7,
"lines": [
" <\/div>",
" <form class=\"modal__body\"",
" hx-post=\"\/chat\/<?= htmlspecialchars($uuid) ?>\/system-prompt\"",
"+ hx-headers='{\"X-CSRF-TOKEN\": \"<?= $csrfToken ?>\"}'",
" hx-target=\"#system-prompt-result\"",
" hx-swap=\"innerHTML\">",
" <div class=\"form-group\">"
]
}
],
"userModified": false,
"replaceAll": false
}
}