{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/UseCases\/Chat\/SendChatMessageUseCase.php",
"offset": 130,
"limit": 50
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/UseCases\/Chat\/SendChatMessageUseCase.php",
"content": " endMicrotime: $endTime,\n authorProfileId: $authorProfileId > 0 ? $authorProfileId : null,\n systemPromptId: $systemPromptId > 0 ? $systemPromptId : null,\n collectionsJson: $collectionsJson,\n contextLimit: $contextLimit\n );\n\n \/\/ 10. Create response\n $response = ChatResponse::fromServiceResponse($result, $endTime - $startTime);\n\n \/\/ 11. Run quality validation if enabled\n if ($qualityCheck) {\n $structureName = $structureId > 0 ? $this->getStructureName($structureId) : null;\n $validation = $this->qualityValidator->validate(\n question: $message,\n answer: $result['answer'],\n sources: $result['sources'],\n structureName: $structureName\n );\n $response = $response->withQualityValidation($validation);\n }\n\n \/\/ 12. Return response\n return $response;\n }\n\n \/**\n * Get structure name by ID\n *\/\n private function getStructureName(int $structureId): ?string\n {\n $structure = $this->configRepo->findByIdAndType($structureId, 'structure');\n\n return $structure['name'] ?? null;\n }\n\n \/**\n * Create default ChatService from credentials\n *\/\n private function createDefaultChatService(): ChatService\n {\n $config = \\Infrastructure\\AI\\AIConfig::fromCredentialsFile();\n\n return $config->createChatService();\n }\n\n \/**\n * Get style prompt from author profile\n *\/\n private function getStylePromptFromProfile(int $profileId): ?string",
"numLines": 50,
"startLine": 130,
"totalLines": 358
}
}
}