{
"event": "PreToolUse",
"tool_name": "Bash",
"tool_input": {
"command": "php -r '\n\/\/ Bootstrap laden\nrequire_once \"src\/Framework\/App.php\";\n$app = new Framework\\App();\n$container = $app->getContainer();\n\nuse Infrastructure\\AI\\ChatService;\n\n$chat = $container->get(ChatService::class);\n\n$question = \"Was ist systemisches Coaching?\";\necho \"Query: $question\\n\";\necho \"Model: ollama:mistral:latest\\n\";\necho \"Collections: [documents]\\n\\n\";\n\ntry {\n $result = $chat->chat($question, \"ollama:mistral:latest\", [\"documents\"], 3);\n \n echo \"=== ERGEBNIS ===\\n\";\n echo \"Chunks verwendet: \" . $result[\"chunks_used\"] . \"\\n\\n\";\n \n echo \"=== QUELLEN (mit Scoring) ===\\n\";\n foreach ($result[\"sources\"] as $i => $src) {\n echo sprintf(\"%d. %s (Score: %.3f)\\n\", $i+1, substr($src[\"title\"], 0, 50), $src[\"score\"]);\n }\n \n echo \"\\n=== ANTWORT (gekürzt) ===\\n\";\n echo substr($result[\"answer\"], 0, 300) . \"...\\n\";\n} catch (Exception $e) {\n echo \"FEHLER: \" . $e->getMessage() . \"\\n\";\n}\n' 2>&1",
"timeout": 60000,
"description": "Test ChatService via DI container"
}
}