hit-cxf
2026-04-07 03e0244561c7e015eb17f22e2120499ab34a0d33
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
import re
 
path = r'd:\Projects\AIGC-Claw\aigc-director\aigc-claw\backend\core\agents\script_agent.py'
with open(path, 'r', encoding='utf-8') as f:
    text = f.read()
 
# Fix the broken variable assignments
bad_patterns = [
    r'_get_script_prompt\([^)]+\)\s*=\s*\([\s\S]*?\n\)\n', # _get_script_prompt(...) = (\n...\n)
    r'MICRO__get_script_prompt\([^)]+\)\s*=\s*\([\s\S]*?\n\)\n',
]
for p in bad_patterns:
    text = re.sub(p, '', text)
 
with open(path, 'w', encoding='utf-8') as f:
    f.write(text)
print("Removed broken assignment definitions.")