{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/SemanticExplorerController.php",
"limit": 100
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/SemanticExplorerController.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Controller;\n\n\/\/ @responsibility: HTTP-Endpunkte für Semantic Explorer (Nutzdaten, Vektor-Suche)\n\nuse Framework\\Controller;\nuse Infrastructure\\AI\\VectorSearchService;\nuse Infrastructure\\SemanticExplorerRepository;\n\nclass SemanticExplorerController extends Controller\n{\n private SemanticExplorerRepository $repository;\n private VectorSearchService $vectorSearchService;\n\n public function __construct(\n SemanticExplorerRepository $repository,\n VectorSearchService $vectorSearchService\n ) {\n $this->repository = $repository;\n $this->vectorSearchService = $vectorSearchService;\n }\n\n \/**\n * GET \/semantic-explorer\n * Dashboard mit Statistiken\n *\/\n public function index(): void\n {\n $docStats = $this->repository->getDocumentStats();\n $chunkStats = $this->repository->getChunkStats();\n $documents = $this->repository->getDocuments();\n $recentChunks = $this->repository->getRecentChunks(5);\n\n $this->view('semantic-explorer.index', [\n 'title' => 'Semantic Explorer',\n 'docStats' => $docStats,\n 'chunkStats' => $chunkStats,\n 'documents' => $documents,\n 'recentChunks' => $recentChunks,\n ]);\n }\n\n \/**\n * GET \/semantic-explorer\/dokumente\n * Liste aller Dokumente\n *\/\n public function dokumente(): void\n {\n $status = $this->getString('status');\n $search = $this->getString('search');\n\n $documents = $this->repository->getDocumentsFiltered($status, $search);\n\n $this->view('semantic-explorer.dokumente.index', [\n 'title' => 'Dokumente',\n 'documents' => $documents,\n 'currentStatus' => $status,\n 'currentSearch' => $search,\n ]);\n }\n\n \/**\n * GET \/semantic-explorer\/dokumente\/{id}\n * Dokument-Details mit Chunks\n *\/\n public function dokumentShow(int $id): void\n {\n $document = $this->repository->getDocument($id);\n\n if ($document === null) {\n $this->notFound('Dokument nicht gefunden');\n }\n\n $chunks = $this->repository->getChunksForDocument($id);\n\n \/\/ Heading-Paths dekodieren\n foreach ($chunks as &$chunk) {\n $chunk['heading_path_decoded'] = $this->decodeJson($chunk['heading_path'] ?? null);\n $chunk['metadata_decoded'] = $this->decodeJson($chunk['metadata'] ?? null);\n }\n\n $this->view('semantic-explorer.dokumente.show', [\n 'title' => $document['filename'],\n 'document' => $document,\n 'chunks' => $chunks,\n ]);\n }\n\n \/**\n * GET \/semantic-explorer\/chunks\n * Liste aller Chunks\n *\/\n public function chunks(): void\n {\n $search = $this->getString('search');\n $embedded = $this->getString('embedded');\n $pagination = $this->getPagination(50);",
"numLines": 100,
"startLine": 1,
"totalLines": 263
}
}
}