{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/migration\/content-pipeline\/src\/web_chat.py",
"limit": 30
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/migration\/content-pipeline\/src\/web_generate.py",
"content": "#!\/usr\/bin\/env python3\n\"\"\"\nWeb Content Generation Interface for KI-System\nCalled from PHP with command and parameters.\n\nUsage:\n python web_generate.py generate <order_id> [model] [collection] [limit]\n python web_generate.py critique <version_id> [model]\n python web_generate.py revise <version_id> [model]\n\"\"\"\n\nimport json\nimport sys\nfrom datetime import datetime\n\nimport mysql.connector\n\n# Change to pipeline directory and add to path\nPIPELINE_PATH = \"\/var\/www\/scripts\/pipeline\"\nsys.path.insert(0, PIPELINE_PATH)\n\nfrom config import DB_CONFIG\nfrom generate import generate_content, revise_content, run_critique_round\n\n# Max log lines to keep\nMAX_LOG_LINES = 50\n\n\ndef log_step(order_id: int, message: str, step: str | None = None) -> None:\n \"\"\"Append a log line and optionally update current step.\"\"\"",
"numLines": 30,
"startLine": 1,
"totalLines": 320
}
}
}