exec((__import__('pathlib').Path(__file__).parent/'apply-shared.py').read_text().split("append('src/lib/format.ts'")[0])
p=root/'src/components/ComposerControls.tsx';s=p.read_text();s=s.replace("import { Btn, Dialog, Icon }", "import { Btn, Dialog, Icon, ErrorNotice }");s="import { formatModelName } from '../lib/format';\nimport { features } from '../lib/features';\n"+s
start=s.index(' ',start);s=s[:start]+s[start:end].replace('}')+s[end:]
start=s.index('
{features.thinkingLevels&&}
'''+s[end:]
start=s.index('
', '{a.status===\'failed\'?setLog(true)}>View log:null}');s=s.replace(' ;',' ;');p.write_text(s)
append('src/styles/app.css','\n.text-action { padding:0; border:0; background:none; color:var(--st-accent-text); cursor:pointer; font:inherit; font-size:12px; text-decoration:underline; }\n')