{
"event": "PostToolUse",
"tool_name": "Read",
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/PromptsController.php",
"content": " $this->redirect('\/prompts');\n }\n\n public function duplicate(string $id): void\n {\n $this->requireCsrf();\n\n $result = $this->promptsUseCase->duplicate((int) $id);\n\n \/\/ HTMX request handling\n if ($this->isHtmxRequest()) {\n if (!$result->success) {\n $this->htmxError($result->message);\n\n return;\n }\n $this->htmxRedirect('\/prompts\/' . $result->id . '\/edit');\n\n return;\n }\n\n \/\/ Traditional form fallback\n if (!$result->success) {\n $_SESSION['error'] = $result->message;\n $this->redirect('\/prompts\/' . $id);\n }\n\n $_SESSION['success'] = $result->message;\n $this->redirect('\/prompts\/' . $result->id . '\/edit');\n }\n}\n",
"numLines": 32,
"startLine": 150,
"totalLines": 181
}
}
}