{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/ContentController.php",
"offset": 260,
"limit": 80
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/ContentController.php",
"content": " $this->view('content.partials.generating', [\n 'orderId' => $id,\n 'log' => $order['generation_log'] ?? '',\n 'step' => $order['generation_step'] ?? '',\n ]);\n\n return;\n }\n\n \/\/ Status is idle - return empty (nothing happening)\n $this->html('');\n }\n\n \/**\n * POST \/content\/{id}\/critique - Start async critique round (HTMX)\n *\/\n public function critique(int $id): void\n {\n $this->requireCsrf();\n\n $version = $this->repository->findLatestVersion($id);\n if ($version === null) {\n $this->htmxError('Keine Version vorhanden.');\n\n return;\n }\n\n \/\/ Set status to critiquing and start async\n $this->repository->updateCritiqueStatus($id, 'critiquing');\n $this->generateUseCase->critiqueAsync($id, $version['id'], $_POST['model'] ?? 'claude-opus-4-5-20251101');\n\n \/\/ Return polling partial\n $this->view('content.partials.critiquing-live', ['orderId' => $id]);\n }\n\n \/**\n * GET \/content\/{id}\/critique-status - Poll critique status (HTMX)\n *\/\n public function critiqueStatus(int $id): void\n {\n $order = $this->repository->findOrder($id);\n if ($order === null) {\n $this->htmxError('Auftrag nicht gefunden');\n\n return;\n }\n\n $status = $order['critique_status'] ?? 'idle';\n\n if ($status === 'completed') {\n \/\/ Get latest version and its critiques\n $version = $this->repository->findLatestVersion($id);\n if ($version !== null) {\n $critiques = $this->repository->findCritiquesByVersion($version['id']);\n \/\/ Get the latest round\n $latestRound = $order['current_critique_round'] ?? 1;\n \/\/ Filter critiques for latest round\n $roundCritiques = array_filter($critiques, fn ($c) => ($c['round'] ?? 0) === $latestRound);\n\n \/\/ Reset status to idle after showing result\n $this->repository->updateCritiqueStatus($id, 'idle');\n\n \/\/ Check if all passed\n $allPassed = true;\n foreach ($roundCritiques as $c) {\n if (!($c['passed'] ?? false)) {\n $allPassed = false;\n break;\n }\n }\n\n $this->renderCritiquePartial([\n 'critiques' => array_values($roundCritiques),\n 'all_passed' => $allPassed,\n 'round' => $latestRound,\n ]);\n\n return;\n }\n }",
"numLines": 80,
"startLine": 260,
"totalLines": 435
}
}
}