{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/UseCases\/Chat\/ChatResponse.php"
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/UseCases\/Chat\/ChatSessionDTO.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace UseCases\\Chat;\n\n\/\/ @responsibility: Datenübertragungsobjekt für Chat-Sessions\n\nuse Domain\\Entity\\ChatMessage;\nuse Domain\\Entity\\ChatSession;\n\nfinal class ChatSessionDTO\n{\n private ChatSession $session;\n \/** @var array<int, ChatMessage> *\/\n private array $messages;\n\n \/**\n * @param ChatSession $session Session entity\n * @param array<int, ChatMessage> $messages Messages for this session\n *\/\n public function __construct(\n ChatSession $session,\n array $messages = [],\n ) {\n $this->session = $session;\n $this->messages = $messages;\n }\n\n public function getSession(): ChatSession\n {\n return $this->session;\n }\n\n public function getId(): int\n {\n return $this->session->getId() ?? 0;\n }\n\n public function getUuid(): string\n {\n return $this->session->getUuid();\n }\n\n public function getTitle(): ?string\n {\n return $this->session->getTitle();\n }\n\n public function getModel(): string\n {\n return $this->session->getModel();\n }\n\n \/**\n * @return array<string>\n *\/\n public function getCollections(): array\n {\n return $this->session->getCollections();\n }\n\n public function getContextLimit(): int\n {\n return $this->session->getContextLimit();\n }\n\n public function getAuthorProfileId(): int\n {\n return $this->session->getAuthorProfileId() ?? 0;\n }\n\n public function getSystemPromptId(): int\n {\n return $this->session->getSystemPromptId() ?? 1;\n }\n\n public function getTemperature(): float\n {\n return $this->session->getTemperature();\n }\n\n public function getMaxTokens(): int\n {\n return $this->session->getMaxTokens();\n }\n\n \/**\n * @return array<int, ChatMessage>\n *\/\n public function getMessages(): array\n {\n return $this->messages;\n }\n\n \/**\n * Get messages as arrays for views.\n *\n * @return array<int, array<string, mixed>>\n *\/\n public function getMessagesAsArrays(): array\n {\n return array_map(fn (ChatMessage $m) => $m->toArray(), $this->messages);\n }\n\n public function getMessageCount(): int\n {\n return count($this->messages);\n }\n\n \/**\n * Get session as array for views.\n *\n * @return array<string, mixed>\n *\/\n public function toArray(): array\n {\n return $this->session->toArray();\n }\n\n \/**\n * Check if session exists\n *\/\n public function exists(): bool\n {\n return $this->getId() > 0;\n }\n}\n",
"numLines": 129,
"startLine": 1,
"totalLines": 129
}
}
}