{
"event": "PreToolUse",
"tool_name": "Write",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/Entity\/ChatSession.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Entity;\n\n\/\/ @responsibility: Repräsentiert eine Chat-Session mit ihren Metadaten\n\nuse Domain\\ValueObject\\SessionMetadata;\nuse Domain\\ValueObject\\SessionUuid;\n\nclass ChatSession\n{\n public function __construct(\n private readonly SessionUuid $uuid,\n private readonly SessionMetadata $metadata,\n private readonly ?int $id = null,\n private readonly ?string $sessionToken = null,\n private readonly ?int $userId = null,\n private readonly ?int $personaId = null,\n private readonly ?string $title = null,\n private readonly ?int $authorProfileId = null,\n private readonly ?int $systemPromptId = null,\n private readonly \\DateTimeImmutable $createdAt = new \\DateTimeImmutable(),\n private readonly \\DateTimeImmutable $updatedAt = new \\DateTimeImmutable(),\n private readonly \\DateTimeImmutable $lastActivity = new \\DateTimeImmutable()\n ) {\n }\n\n public function getId(): ?int\n {\n return $this->id;\n }\n\n public function getUuid(): string\n {\n return $this->uuid->value();\n }\n\n public function getUuidObject(): SessionUuid\n {\n return $this->uuid;\n }\n\n public function getSessionToken(): ?string\n {\n return $this->sessionToken;\n }\n\n public function getUserId(): ?int\n {\n return $this->userId;\n }\n\n public function getPersonaId(): ?int\n {\n return $this->personaId;\n }\n\n public function getTitle(): ?string\n {\n return $this->title;\n }\n\n public function getModel(): string\n {\n return $this->metadata->getModel();\n }\n\n \/** @return array<string> *\/\n public function getCollections(): array\n {\n return $this->metadata->getCollections();\n }\n\n public function getContextLimit(): int\n {\n return $this->metadata->getContextLimit();\n }\n\n public function getTemperature(): float\n {\n return $this->metadata->getTemperature();\n }\n\n public function getMaxTokens(): int\n {\n return $this->metadata->getMaxTokens();\n }\n\n public function getAuthorProfileId(): ?int\n {\n return $this->authorProfileId;\n }\n\n public function getSystemPromptId(): ?int\n {\n return $this->systemPromptId;\n }\n\n public function getCreatedAt(): \\DateTimeImmutable\n {\n return $this->createdAt;\n }\n\n public function getUpdatedAt(): \\DateTimeImmutable\n {\n return $this->updatedAt;\n }\n\n public function getLastActivity(): \\DateTimeImmutable\n {\n return $this->lastActivity;\n }\n\n public function withId(int $id): self\n {\n return new self($this->uuid, $this->metadata, $id, $this->sessionToken, $this->userId,\n $this->personaId, $this->title, $this->authorProfileId, $this->systemPromptId,\n $this->createdAt, $this->updatedAt, $this->lastActivity);\n }\n\n public function withTitle(string $title): self\n {\n return new self($this->uuid, $this->metadata, $this->id, $this->sessionToken, $this->userId,\n $this->personaId, $title, $this->authorProfileId, $this->systemPromptId,\n $this->createdAt, new \\DateTimeImmutable(), new \\DateTimeImmutable());\n }\n\n public function updateSettings(string $model, array $collections, int $contextLimit,\n ?int $authorProfileId, float $temperature, int $maxTokens): self\n {\n $newMetadata = SessionMetadata::create($model, $collections, $contextLimit, $temperature, $maxTokens);\n return new self($this->uuid, $newMetadata, $this->id, $this->sessionToken, $this->userId,\n $this->personaId, $this->title, $authorProfileId, $this->systemPromptId,\n $this->createdAt, new \\DateTimeImmutable(), new \\DateTimeImmutable());\n }\n}\n"
}
}
{
"tool_response": {
"type": "update",
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/Entity\/ChatSession.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Entity;\n\n\/\/ @responsibility: Repräsentiert eine Chat-Session mit ihren Metadaten\n\nuse Domain\\ValueObject\\SessionMetadata;\nuse Domain\\ValueObject\\SessionUuid;\n\nclass ChatSession\n{\n public function __construct(\n private readonly SessionUuid $uuid,\n private readonly SessionMetadata $metadata,\n private readonly ?int $id = null,\n private readonly ?string $sessionToken = null,\n private readonly ?int $userId = null,\n private readonly ?int $personaId = null,\n private readonly ?string $title = null,\n private readonly ?int $authorProfileId = null,\n private readonly ?int $systemPromptId = null,\n private readonly \\DateTimeImmutable $createdAt = new \\DateTimeImmutable(),\n private readonly \\DateTimeImmutable $updatedAt = new \\DateTimeImmutable(),\n private readonly \\DateTimeImmutable $lastActivity = new \\DateTimeImmutable()\n ) {\n }\n\n public function getId(): ?int\n {\n return $this->id;\n }\n\n public function getUuid(): string\n {\n return $this->uuid->value();\n }\n\n public function getUuidObject(): SessionUuid\n {\n return $this->uuid;\n }\n\n public function getSessionToken(): ?string\n {\n return $this->sessionToken;\n }\n\n public function getUserId(): ?int\n {\n return $this->userId;\n }\n\n public function getPersonaId(): ?int\n {\n return $this->personaId;\n }\n\n public function getTitle(): ?string\n {\n return $this->title;\n }\n\n public function getModel(): string\n {\n return $this->metadata->getModel();\n }\n\n \/** @return array<string> *\/\n public function getCollections(): array\n {\n return $this->metadata->getCollections();\n }\n\n public function getContextLimit(): int\n {\n return $this->metadata->getContextLimit();\n }\n\n public function getTemperature(): float\n {\n return $this->metadata->getTemperature();\n }\n\n public function getMaxTokens(): int\n {\n return $this->metadata->getMaxTokens();\n }\n\n public function getAuthorProfileId(): ?int\n {\n return $this->authorProfileId;\n }\n\n public function getSystemPromptId(): ?int\n {\n return $this->systemPromptId;\n }\n\n public function getCreatedAt(): \\DateTimeImmutable\n {\n return $this->createdAt;\n }\n\n public function getUpdatedAt(): \\DateTimeImmutable\n {\n return $this->updatedAt;\n }\n\n public function getLastActivity(): \\DateTimeImmutable\n {\n return $this->lastActivity;\n }\n\n public function withId(int $id): self\n {\n return new self($this->uuid, $this->metadata, $id, $this->sessionToken, $this->userId,\n $this->personaId, $this->title, $this->authorProfileId, $this->systemPromptId,\n $this->createdAt, $this->updatedAt, $this->lastActivity);\n }\n\n public function withTitle(string $title): self\n {\n return new self($this->uuid, $this->metadata, $this->id, $this->sessionToken, $this->userId,\n $this->personaId, $title, $this->authorProfileId, $this->systemPromptId,\n $this->createdAt, new \\DateTimeImmutable(), new \\DateTimeImmutable());\n }\n\n public function updateSettings(string $model, array $collections, int $contextLimit,\n ?int $authorProfileId, float $temperature, int $maxTokens): self\n {\n $newMetadata = SessionMetadata::create($model, $collections, $contextLimit, $temperature, $maxTokens);\n return new self($this->uuid, $newMetadata, $this->id, $this->sessionToken, $this->userId,\n $this->personaId, $this->title, $authorProfileId, $this->systemPromptId,\n $this->createdAt, new \\DateTimeImmutable(), new \\DateTimeImmutable());\n }\n}\n",
"structuredPatch": [
{
"oldStart": 67,
"oldLines": 9,
"newStart": 67,
"newLines": 7,
"lines": [
" return $this->metadata->getModel();",
" }",
" ",
"- \/**",
"- * @return array<string>",
"- *\/",
"+ \/** @return array<string> *\/",
" public function getCollections(): array",
" {",
" return $this->metadata->getCollections();"
]
},
{
"oldStart": 117,
"oldLines": 63,
"newStart": 115,
"newLines": 24,
"lines": [
" ",
" public function withId(int $id): self",
" {",
"- return new self(",
"- uuid: $this->uuid,",
"- metadata: $this->metadata,",
"- id: $id,",
"- sessionToken: $this->sessionToken,",
"- userId: $this->userId,",
"- personaId: $this->personaId,",
"- title: $this->title,",
"- authorProfileId: $this->authorProfileId,",
"- systemPromptId: $this->systemPromptId,",
"- createdAt: $this->createdAt,",
"- updatedAt: $this->updatedAt,",
"- lastActivity: $this->lastActivity",
"- );",
"+ return new self($this->uuid, $this->metadata, $id, $this->sessionToken, $this->userId,",
"+ $this->personaId, $this->title, $this->authorProfileId, $this->systemPromptId,",
"+ $this->createdAt, $this->updatedAt, $this->lastActivity);",
" }",
" ",
" public function withTitle(string $title): self",
" {",
"- return new self(",
"- uuid: $this->uuid,",
"- metadata: $this->metadata,",
"- id: $this->id,",
"- sessionToken: $this->sessionToken,",
"- userId: $this->userId,",
"- personaId: $this->personaId,",
"- title: $title,",
"- authorProfileId: $this->authorProfileId,",
"- systemPromptId: $this->systemPromptId,",
"- createdAt: $this->createdAt,",
"- updatedAt: new \\DateTimeImmutable(),",
"- lastActivity: new \\DateTimeImmutable()",
"- );",
"+ return new self($this->uuid, $this->metadata, $this->id, $this->sessionToken, $this->userId,",
"+ $this->personaId, $title, $this->authorProfileId, $this->systemPromptId,",
"+ $this->createdAt, new \\DateTimeImmutable(), new \\DateTimeImmutable());",
" }",
" ",
"- public function updateSettings(",
"- string $model,",
"- array $collections,",
"- int $contextLimit,",
"- ?int $authorProfileId,",
"- float $temperature,",
"- int $maxTokens",
"- ): self {",
"+ public function updateSettings(string $model, array $collections, int $contextLimit,",
"+ ?int $authorProfileId, float $temperature, int $maxTokens): self",
"+ {",
" $newMetadata = SessionMetadata::create($model, $collections, $contextLimit, $temperature, $maxTokens);",
"- return new self(",
"- uuid: $this->uuid,",
"- metadata: $newMetadata,",
"- id: $this->id,",
"- sessionToken: $this->sessionToken,",
"- userId: $this->userId,",
"- personaId: $this->personaId,",
"- title: $this->title,",
"- authorProfileId: $authorProfileId,",
"- systemPromptId: $this->systemPromptId,",
"- createdAt: $this->createdAt,",
"- updatedAt: new \\DateTimeImmutable(),",
"- lastActivity: new \\DateTimeImmutable()",
"- );",
"+ return new self($this->uuid, $newMetadata, $this->id, $this->sessionToken, $this->userId,",
"+ $this->personaId, $this->title, $authorProfileId, $this->systemPromptId,",
"+ $this->createdAt, new \\DateTimeImmutable(), new \\DateTimeImmutable());",
" }",
"-",
" }"
]
}
],
"originalFile": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Entity;\n\n\/\/ @responsibility: Repräsentiert eine Chat-Session mit ihren Metadaten\n\nuse Domain\\ValueObject\\SessionMetadata;\nuse Domain\\ValueObject\\SessionUuid;\n\nclass ChatSession\n{\n public function __construct(\n private readonly SessionUuid $uuid,\n private readonly SessionMetadata $metadata,\n private readonly ?int $id = null,\n private readonly ?string $sessionToken = null,\n private readonly ?int $userId = null,\n private readonly ?int $personaId = null,\n private readonly ?string $title = null,\n private readonly ?int $authorProfileId = null,\n private readonly ?int $systemPromptId = null,\n private readonly \\DateTimeImmutable $createdAt = new \\DateTimeImmutable(),\n private readonly \\DateTimeImmutable $updatedAt = new \\DateTimeImmutable(),\n private readonly \\DateTimeImmutable $lastActivity = new \\DateTimeImmutable()\n ) {\n }\n\n public function getId(): ?int\n {\n return $this->id;\n }\n\n public function getUuid(): string\n {\n return $this->uuid->value();\n }\n\n public function getUuidObject(): SessionUuid\n {\n return $this->uuid;\n }\n\n public function getSessionToken(): ?string\n {\n return $this->sessionToken;\n }\n\n public function getUserId(): ?int\n {\n return $this->userId;\n }\n\n public function getPersonaId(): ?int\n {\n return $this->personaId;\n }\n\n public function getTitle(): ?string\n {\n return $this->title;\n }\n\n public function getModel(): string\n {\n return $this->metadata->getModel();\n }\n\n \/**\n * @return array<string>\n *\/\n public function getCollections(): array\n {\n return $this->metadata->getCollections();\n }\n\n public function getContextLimit(): int\n {\n return $this->metadata->getContextLimit();\n }\n\n public function getTemperature(): float\n {\n return $this->metadata->getTemperature();\n }\n\n public function getMaxTokens(): int\n {\n return $this->metadata->getMaxTokens();\n }\n\n public function getAuthorProfileId(): ?int\n {\n return $this->authorProfileId;\n }\n\n public function getSystemPromptId(): ?int\n {\n return $this->systemPromptId;\n }\n\n public function getCreatedAt(): \\DateTimeImmutable\n {\n return $this->createdAt;\n }\n\n public function getUpdatedAt(): \\DateTimeImmutable\n {\n return $this->updatedAt;\n }\n\n public function getLastActivity(): \\DateTimeImmutable\n {\n return $this->lastActivity;\n }\n\n public function withId(int $id): self\n {\n return new self(\n uuid: $this->uuid,\n metadata: $this->metadata,\n id: $id,\n sessionToken: $this->sessionToken,\n userId: $this->userId,\n personaId: $this->personaId,\n title: $this->title,\n authorProfileId: $this->authorProfileId,\n systemPromptId: $this->systemPromptId,\n createdAt: $this->createdAt,\n updatedAt: $this->updatedAt,\n lastActivity: $this->lastActivity\n );\n }\n\n public function withTitle(string $title): self\n {\n return new self(\n uuid: $this->uuid,\n metadata: $this->metadata,\n id: $this->id,\n sessionToken: $this->sessionToken,\n userId: $this->userId,\n personaId: $this->personaId,\n title: $title,\n authorProfileId: $this->authorProfileId,\n systemPromptId: $this->systemPromptId,\n createdAt: $this->createdAt,\n updatedAt: new \\DateTimeImmutable(),\n lastActivity: new \\DateTimeImmutable()\n );\n }\n\n public function updateSettings(\n string $model,\n array $collections,\n int $contextLimit,\n ?int $authorProfileId,\n float $temperature,\n int $maxTokens\n ): self {\n $newMetadata = SessionMetadata::create($model, $collections, $contextLimit, $temperature, $maxTokens);\n return new self(\n uuid: $this->uuid,\n metadata: $newMetadata,\n id: $this->id,\n sessionToken: $this->sessionToken,\n userId: $this->userId,\n personaId: $this->personaId,\n title: $this->title,\n authorProfileId: $authorProfileId,\n systemPromptId: $this->systemPromptId,\n createdAt: $this->createdAt,\n updatedAt: new \\DateTimeImmutable(),\n lastActivity: new \\DateTimeImmutable()\n );\n }\n\n}\n"
}
}