{
"event": "PreToolUse",
"tool_name": "Bash",
"tool_input": {
"command": "python3 << 'PYTHON_HEREDOC'\nwith open('\/var\/www\/dev.campus.systemische-tools.de\/src\/services.php', 'r') as f:\n content = f.read()\n\n# Replace the PipelineStepService instantiation\nold_text = ''' $container->set(PipelineStepService::class, function (Container $c) {\n return new PipelineStepService(\n $c->get(PipelineRepository::class),\n $c->get(ModelRegistry::class)\n );\n });'''\n\nnew_text = ''' $container->set(PipelineStepService::class, function (Container $c) {\n return new PipelineStepService(\n $c->get(PipelineConfigRepositoryInterface::class),\n $c->get(PipelineStepRepositoryInterface::class),\n $c->get(ModelRegistry::class)\n );\n });'''\n\ncontent = content.replace(old_text, new_text)\n\nwith open('\/var\/www\/dev.campus.systemische-tools.de\/src\/services.php', 'w') as f:\n f.write(content)\n\nprint(\"Updated services.php successfully\")\nPYTHON_HEREDOC",
"description": "Update PipelineStepService with Python",
"dangerouslyDisableSandbox": true
}
}