{
"event": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/Exception\/DimensionMismatchException.php",
"old_string": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Exception;\n\nuse RuntimeException;\n\n\/**\n * Exception thrown when vector dimensions don't match.\n *\n * This occurs when:\n * - Attempting to search collections with different embedding sizes\n * - Query embedding dimension doesn't match collection's vector_size\n *\n * @package Domain\\Exception\n *\/\nclass DimensionMismatchException",
"new_string": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Exception;\n\n\/\/ @responsibility: Exception bei Vektor-Dimensions-Inkompatibilität\n\nuse RuntimeException;\n\nclass DimensionMismatchException"
}
}
{
"tool_response": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/Exception\/DimensionMismatchException.php",
"oldString": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Exception;\n\nuse RuntimeException;\n\n\/**\n * Exception thrown when vector dimensions don't match.\n *\n * This occurs when:\n * - Attempting to search collections with different embedding sizes\n * - Query embedding dimension doesn't match collection's vector_size\n *\n * @package Domain\\Exception\n *\/\nclass DimensionMismatchException",
"newString": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Exception;\n\n\/\/ @responsibility: Exception bei Vektor-Dimensions-Inkompatibilität\n\nuse RuntimeException;\n\nclass DimensionMismatchException",
"originalFile": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Exception;\n\nuse RuntimeException;\n\n\/**\n * Exception thrown when vector dimensions don't match.\n *\n * This occurs when:\n * - Attempting to search collections with different embedding sizes\n * - Query embedding dimension doesn't match collection's vector_size\n *\n * @package Domain\\Exception\n *\/\nclass DimensionMismatchException extends RuntimeException\n{\n public function __construct(\n string $message,\n public readonly ?string $collectionId = null,\n public readonly ?int $expectedSize = null,\n public readonly ?int $actualSize = null\n ) {\n parent::__construct($message);\n }\n\n \/**\n * Create exception for incompatible collections.\n *\n * @param array<string, int> $collectionSizes Map of collection_id => vector_size\n *\/\n public static function incompatibleCollections(array $collectionSizes): self\n {\n $details = [];\n foreach ($collectionSizes as $id => $size) {\n $details[] = \"$id: {$size}d\";\n }\n\n return new self(\n 'Inkompatible Collections: Unterschiedliche Vektorgrößen (' . implode(', ', $details) . ')'\n );\n }\n\n \/**\n * Create exception for embedding size mismatch.\n *\/\n public static function embeddingMismatch(\n string $collectionId,\n int $expectedSize,\n int $actualSize\n ): self {\n return new self(\n \"Dimension Mismatch: Collection '$collectionId' erwartet {$expectedSize}d, Embedding hat {$actualSize}d\",\n $collectionId,\n $expectedSize,\n $actualSize\n );\n }\n}\n",
"structuredPatch": [
{
"oldStart": 4,
"oldLines": 17,
"newStart": 4,
"newLines": 10,
"lines": [
" ",
" namespace Domain\\Exception;",
" ",
"+\/\/ @responsibility: Exception bei Vektor-Dimensions-Inkompatibilität",
"+",
" use RuntimeException;",
" ",
"-\/**",
"- * Exception thrown when vector dimensions don't match.",
"- *",
"- * This occurs when:",
"- * - Attempting to search collections with different embedding sizes",
"- * - Query embedding dimension doesn't match collection's vector_size",
"- *",
"- * @package Domain\\Exception",
"- *\/",
" class DimensionMismatchException extends RuntimeException",
" {",
" public function __construct("
]
}
],
"userModified": false,
"replaceAll": false
}
}