{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/ContentController.php",
"offset": 125,
"limit": 50
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/ContentController.php",
"content": " 'model' => $model,\n 'collections' => json_encode($collections),\n 'context_limit' => $contextLimit,\n ]);\n\n \/\/ If \"generate\" action: generate content immediately\n if (($_POST['action'] ?? 'save') === 'generate') {\n $collection = $collections[0] ?? 'documents';\n $result = $this->callPython('generate', $orderId, [$model, $collection, $contextLimit]);\n\n if (isset($result['error'])) {\n $_SESSION['error'] = 'Generierung fehlgeschlagen: ' . $result['error'];\n } else {\n $_SESSION['success'] = 'Content wurde generiert.';\n }\n }\n\n header('Location: \/content\/' . $orderId);\n exit;\n }\n\n \/**\n * GET \/content\/{id}\n * Show order details\n *\/\n public function show(int $id): void\n {\n $order = $this->repository->findOrder($id);\n\n if ($order === null) {\n $this->notFound('Auftrag nicht gefunden');\n }\n\n $versions = $this->repository->findVersionsByOrder($id);\n $latestVersion = $versions[0] ?? null;\n $critiques = $latestVersion ? $this->repository->findCritiquesByVersion($latestVersion['id']) : [];\n $sources = $this->repository->findSourcesByOrder($id);\n\n \/\/ Get available collections for the dropdown\n $availableCollections = $this->getAvailableCollections();\n\n $this->view('content.show', [\n 'title' => $order['title'],\n 'order' => $order,\n 'versions' => $versions,\n 'latestVersion' => $latestVersion,\n 'critiques' => $critiques,\n 'sources' => $sources,\n 'models' => ModelConfig::getAll(),\n 'availableCollections' => $availableCollections,",
"numLines": 50,
"startLine": 125,
"totalLines": 461
}
}
}