{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/docs\/plan-form-components-refactoring.md",
"offset": 560,
"limit": 50
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/docs\/plan-form-components-refactoring.md",
"content": "```\n\n### 0d.5 Repository & Service\n\n```php\n\/\/ \/src\/Infrastructure\/Persistence\/UserPreferencesRepository.php\nclass UserPreferencesRepository\n{\n public function getForUser(int $userId = 1): array\n {\n $stmt = $this->db->prepare(\"\n SELECT * FROM user_preferences WHERE user_id = ?\n \");\n $stmt->execute([$userId]);\n return $stmt->fetch() ?: $this->getDefaults();\n }\n\n public function update(int $userId, array $data): void\n {\n \/\/ UPDATE user_preferences SET ... WHERE user_id = ?\n }\n\n private function getDefaults(): array\n {\n return [\n 'default_model_id' => null,\n 'default_temperature' => 0.70,\n 'default_max_tokens' => 4096,\n 'default_collections' => '[\"documents\"]',\n 'default_context_limit' => 5,\n \/\/ ...\n ];\n }\n}\n```\n\n```php\n\/\/ \/src\/Infrastructure\/UserPreferencesService.php\nclass UserPreferencesService\n{\n private UserPreferencesRepository $repository;\n private ?array $cached = null;\n\n public function get(): array\n {\n if ($this->cached === null) {\n $this->cached = $this->repository->getForUser(1);\n }\n return $this->cached;\n }",
"numLines": 50,
"startLine": 560,
"totalLines": 3667
}
}
}