{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/Api\/ExplorerController.php",
"limit": 100
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/Api\/ExplorerController.php",
"content": "<?php\n\nnamespace Controller\\Api;\n\nuse Framework\\Controller;\nuse Infrastructure\\Docs\\HybridSearchService;\nuse Infrastructure\\Persistence\\SystemExplorerRepository;\nuse Infrastructure\\Traits\\JsonDecodeTrait;\n\n\/**\n * ExplorerController - REST-API für Doc2Vector Pipeline\n *\n * Endpoints für Dokumente, Seiten, Chunks, Taxonomie und Suche.\n *\/\nclass ExplorerController extends Controller\n{\n use JsonDecodeTrait;\n\n private SystemExplorerRepository $repository;\n\n public function __construct()\n {\n $this->repository = new SystemExplorerRepository();\n }\n\n \/**\n * GET \/api\/v1\/explorer\/stats\n *\/\n public function stats(): void\n {\n try {\n $this->json([\n 'success' => true,\n 'data' => [\n 'dokumente' => $this->repository->countDokumente(),\n 'seiten' => $this->repository->countSeiten(),\n 'chunks' => $this->repository->getChunkStats(),\n 'taxonomy_categories' => $this->repository->getTopTaxonomyCategories(100),\n ],\n ]);\n } catch (\\Exception $e) {\n $this->jsonError($e->getMessage());\n }\n }\n\n \/**\n * GET \/api\/v1\/explorer\/dokumente\n *\/\n public function listDokumente(): void\n {\n try {\n $dokumente = $this->repository->getDokumenteWithFullStats();\n\n $this->json([\n 'success' => true,\n 'data' => $dokumente,\n 'meta' => ['total' => count($dokumente)],\n ]);\n } catch (\\Exception $e) {\n $this->jsonError($e->getMessage());\n }\n }\n\n \/**\n * GET \/api\/v1\/explorer\/dokumente\/{id}\n *\/\n public function getDokument(string $id): void\n {\n try {\n $dokument = $this->repository->getDokumentRoot((int) $id);\n\n if ($dokument === null) {\n $this->json(['success' => false, 'error' => 'Dokument nicht gefunden'], 404);\n\n return;\n }\n\n $this->json([\n 'success' => true,\n 'data' => [\n 'dokument' => $dokument,\n 'seiten' => $this->repository->getSeitenWithStatsForParent((int) $id),\n 'taxonomy' => $this->repository->getTaxonomyForDokumentTree((int) $id),\n ],\n ]);\n } catch (\\Exception $e) {\n $this->jsonError($e->getMessage());\n }\n }\n\n \/**\n * GET \/api\/v1\/explorer\/seiten\n *\/\n public function listSeiten(): void\n {\n try {\n $search = $this->getString('search');\n $parentId = $this->getString('parent_id');\n $limit = $this->getLimit(100, 50);\n $offset = $this->getInt('offset');",
"numLines": 100,
"startLine": 1,
"totalLines": 280
}
}
}