{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Docs\/ChunkSyncService.php",
"limit": 50
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Docs\/ChunkSyncService.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\Docs;\n\nuse Infrastructure\\AI\\OllamaService;\nuse Infrastructure\\Traits\\JsonDecodeTrait;\nuse PDO;\nuse RuntimeException;\n\n\/**\n * Service for synchronizing documentation chunks to Qdrant vector database.\n *\n * Syncs analyzed chunks with their embeddings and metadata to enable\n * semantic search with structured filtering.\n *\/\nfinal class ChunkSyncService\n{\n use JsonDecodeTrait;\n\n private const string COLLECTION = 'dokumentation_chunks';\n private const string QDRANT_HOST = 'http:\/\/localhost:6333';\n private const int VECTOR_SIZE = 1024;\n private const int TIMEOUT = 60;\n private const int BATCH_SIZE = 10;\n\n private PDO $pdo;\n private OllamaService $ollama;\n\n public function __construct()\n {\n $this->ollama = new OllamaService();\n $this->pdo = $this->createConnection();\n }\n\n \/**\n * Ensures the Qdrant collection exists with proper configuration.\n *\/\n public function ensureCollection(): bool\n {\n \/\/ Check if collection exists\n $url = sprintf('%s\/collections\/%s', self::QDRANT_HOST, self::COLLECTION);\n\n try {\n $response = $this->makeRequest($url, [], 'GET');\n if (isset($response['result'])) {\n return true; \/\/ Collection exists\n }\n } catch (RuntimeException) {",
"numLines": 50,
"startLine": 1,
"totalLines": 544
}
}
}