Protokoll #28914

ID28914
Zeitstempel2025-12-28 23:18:16.089486
Clientroot
IP145.224.72.140
Modellclaude-sonnet-4-20250514
Statuspending
Tokens755 (Input: 755, Output: 0)
Dauer-
Request-Zeit2025-12-28 23:18:16.089486
Response-Zeit-

Request

{
    "event": "PreToolUse",
    "tool_name": "Write",
    "tool_input": {
        "file_path": "\/var\/www\/dev.campus.systemische-tools.de\/test_search.php",
        "content": "<?php\n\n\/\/ @responsibility: CLI test script for ContentSearchService semantic search\n\n\/**\n * Test ContentSearchService - Semantische Suche\n *\/\n\nrequire_once __DIR__ . '\/vendor\/autoload.php';\n$dotenv = Dotenv\\Dotenv::createImmutable(__DIR__);\n$dotenv->load();\nrequire_once __DIR__ . '\/config\/config.php';\nrequire_once __DIR__ . '\/config\/database.php';\nrequire_once __DIR__ . '\/config\/autoload.php';\n\n\/\/ App und Container erstellen\n$app = new Framework\\App();\n$container = $app->container();\n\n$searchService = $container->get(Infrastructure\\Search\\ContentSearchService::class);\n\necho \"=== ContentSearchService Test ===\\n\\n\";\n\n\/\/ Test 1: Normale Suche\necho \"--- Test 1: Normale Suche \\\"systemisches Coaching\\\" ---\\n\";\n$results = $searchService->search(\"systemisches Coaching\", [], 5);\necho \"Gefunden: \" . count($results) . \" Ergebnisse\\n\\n\";\n\nforeach ($results as $i => $r) {\n    echo ($i+1) . \". Score: \" . number_format($r[\"relevance_score\"], 3) . \"\\n\";\n    echo \"   Intent: \" . ($r[\"intent\"] ?? \"-\") . \" | Role: \" . ($r[\"discourse_role\"] ?? \"-\") . \"\\n\";\n    echo \"   Sentiment: \" . ($r[\"sentiment\"] ?? \"-\") . \" | Frame: \" . ($r[\"frame\"] ?? \"-\") . \"\\n\";\n    echo \"   \" . substr(str_replace(\"\\n\", \" \", $r[\"content\"]), 0, 120) . \"...\\n\\n\";\n}\n\n\/\/ Test 2: Definition-Query (sollte discourse_role=definition boosten)\necho \"--- Test 2: Definition-Query \\\"Was ist systemisches Coaching?\\\" ---\\n\";\n$results = $searchService->search(\"Was ist systemisches Coaching?\", [], 3);\necho \"Gefunden: \" . count($results) . \" Ergebnisse\\n\\n\";\n\nforeach ($results as $i => $r) {\n    echo ($i+1) . \". Score: \" . number_format($r[\"relevance_score\"], 3) . \"\\n\";\n    echo \"   Intent: \" . ($r[\"intent\"] ?? \"-\") . \" | Role: \" . ($r[\"discourse_role\"] ?? \"-\") . \"\\n\";\n    $kw = array_slice($r[\"keywords\"] ?? [], 0, 5);\n    echo \"   Keywords: \" . implode(\", \", $kw) . \"\\n\\n\";\n}\n\n\/\/ Test 3: Filter nach Intent\necho \"--- Test 3: Suche mit intent=explain Filter ---\\n\";\n$results = $searchService->search(\"Methoden\", [\"intent\" => \"explain\"], 3);\necho \"Gefunden: \" . count($results) . \" Ergebnisse\\n\\n\";\n\nforeach ($results as $i => $r) {\n    echo ($i+1) . \". Score: \" . number_format($r[\"relevance_score\"], 3) . \"\\n\";\n    echo \"   Intent: \" . ($r[\"intent\"] ?? \"-\") . \" | Role: \" . ($r[\"discourse_role\"] ?? \"-\") . \"\\n\\n\";\n}\n\n\/\/ Test 4: Semantic Stats\necho \"--- Test 4: Semantic Stats (Top 10) ---\\n\";\n$stats = $searchService->getSemanticStats();\nforeach (array_slice($stats, 0, 10) as $s) {\n    printf(\"  %-10s \/ %-12s : %d\\n\",\n        $s[\"intent\"] ?? \"-\",\n        $s[\"discourse_role\"] ?? \"-\",\n        $s[\"count\"]\n    );\n}\n\necho \"\\n=== Test abgeschlossen ===\\n\";\n"
    }
}

Response

-
← Vorheriger Zur Liste Nächster →