{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Docs\/ChunkSyncService.php",
"offset": 65,
"limit": 30
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Docs\/ChunkSyncService.php",
"content": " $keywords = $this->decodeJsonArray($chunk['keywords'] ?? null);\n if (!empty($keywords)) {\n $parts[] = 'Keywords: ' . implode(', ', $keywords);\n }\n\n $content = $chunk['content_clean'] ?? $chunk['content'] ?? '';\n $content = $this->sanitizeForEmbedding($content);\n if (mb_strlen($content) > Constants::EMBEDDING_TEXT_LIMIT) {\n $content = mb_substr($content, 0, Constants::EMBEDDING_TEXT_LIMIT) . '...';\n }\n $parts[] = 'Inhalt: ' . $content;\n\n $text = implode(\"\\n\\n\", $parts);\n\n if (mb_strlen($text) > 1800) {\n $text = mb_substr($text, 0, 1800) . '...';\n }\n\n return $text;\n }\n\n \/**\n * Sanitizes text for embedding by removing problematic characters.\n *\/\n private function sanitizeForEmbedding(string $text): string\n {\n $text = preg_replace('\/[\\x{2500}-\\x{257F}]\/u', ' ', $text) ?? $text;\n $text = preg_replace('\/[\\x{2580}-\\x{259F}]\/u', ' ', $text) ?? $text;\n $text = preg_replace('\/[\\x{25A0}-\\x{25FF}]\/u', ' ', $text) ?? $text;\n $text = preg_replace('\/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]\/u', '', $text) ?? $text;",
"numLines": 30,
"startLine": 165,
"totalLines": 303
}
}
}