exec((__import__('pathlib').Path(__file__).parent/'apply-shared.py').read_text().split("append('src/lib/format.ts'")[0]) p=root/'src/screens/Setup.tsx';s=p.read_text();s=s.replace('Bar, Btn, Dialog, Icon, Pill, Steps','Bar, Btn, Icon, Pill, Steps, ErrorNotice, PreviewBadge');s=s.replace('DemoTest, MemoryBudget, PerformancePreview, ProfileChoice, TuningDials','DemoTest, MemoryBudget');s=s.replace("import { ModelPicker } from '../components/ModelCatalog';", "import { VersionLadder } from '../components/VersionLadder';\nimport { modelVersions, recommendedVersion, versionFit } from '../lib/model-versions';\nimport { Select } from '../components/ui';") s=s.replace('estimate, recommend','estimate');s=s.replace('import { sizeGb }','import { sizeGb, formatModelName }');s=s.replace("const [profile, setProfile]", "const [profile, setProfile]") s=s.replace("const [adjust, setAdjust] = useState(false); const [picker, setPicker] = useState(false); ", '');s=s.replace("const [workload, setWorkload] = useState('document');", "const workload:Workload='document';") a=s.index(' const recommendations =');b=s.index(' const experience',a);s=s[:a]+''' const versions=library?modelVersions(library):[]; const recommended=recommendedVersion(versions,hardware,config.context); const candidate=versions.find(v=>v.id===picked)??recommended??versions[0]; '''+s[b:];a=s.index(' const modelTitle =');b=s.index(' const choices',a);s=s[:a]+" const modelTitle=formatModelName(candidate);\n"+s[b:];s=s.replace('[4096, 8192, 16384, 32768, 65536, 131072]','[4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576]');s=s.replace("experience.fit === 'too-large' || experience.fit === 'unsupported'", "!!candidate && versionFit(candidate,hardware,config.context).zone === 'too-big'") s=s.replace('

Set up Strata

','

Set up Strata

');s=s.replace('{demo ?

Demo · downloads and answers are simulated.

: null}', '');s=s.replace('Find my models','Pick a version').replace('Browse models','View versions') a=s.index(" {step === 2 ?");b=s.index(" {step === 3 ?",a);s=s[:a]+''' {step === 2 ?

Pick a version

{versions[0]?.family} · the same model at different sizes.

Conversation context
Context lengthDeleted tasks','/>Deleted tasks}');s=s.replace('

{error}

', 'void refresh()}/>');s=s.replace('

{t.error}

', '');s=s.replace("t.enabled&&t.nextRunAt?`Next: ${new Date(t.nextRunAt).toLocaleString(undefined,{dateStyle:'medium',timeStyle:'short'})}`:'Paused'", "t.enabled?(t.nextRunAt?`Next: ${new Date(t.nextRunAt).toLocaleString(undefined,{dateStyle:'medium',timeStyle:'short'})}`:'Scheduled · calculating next run'):'Paused'") s=s.replace('
", " : setGuide(true)}>Connect an app} />}") old=' { setError(\'\'); setSharingOpen(true); }} />' s=s.replace(old,'');s=s.replace('{serving.tunnel?.status', '
Local network
{serving.sharing?.active?"Shared on local network":"Off"}{setError(\'\');setSharingOpen(true);}}>{serving.sharing?.active?"Manage / stop":"Share"}
{serving.tunnel?.status') s=s.replace('{serving.sharing.url}', '
{serving.sharing.url}void navigator.clipboard.writeText(serving.sharing!.url!)}/>
') s=s.replace(' void navigator.clipboard.writeText(keyDraft)} />', '{keyDraft? void navigator.clipboard.writeText(keyDraft)} />:null}') s=s.replace('Generate a key for me', 'Generate another key') s=s.replace("'Demo model ready'", "'Model ready'");p.write_text(s) p=root/'src/components/CloudflareDialog.tsx';s=p.read_text().replace("from './ui';", "from './ui';") s=s.replace('Btn, Dialog,', 'Btn, ErrorNotice, Dialog,');s=s.replace('

{error||tunnel?.error}

', '');p.write_text(s) # Settings index follows the actual scroll container and filtered sections. p=root/'src/screens/Settings.tsx';s=p.read_text().replace('useState, type ReactNode','useState, useEffect, useRef, type ReactNode');s=s.replace('CONTENT_FONT_RANGE, go,','CONTENT_FONT_RANGE, createChatShowcase, createPreviewExamples, go,');s=s.replace(" const fields:", " const bodyRef=useRef(null);\n const fields:");s=s.replace(" { section: 'About', label: 'Version'", " {section:'About',label:'Design examples',hint:'Explore code, media, approvals and file previews.',aliases:'help demo showcase',control:
Chat showcasePreview examples
},\n { section: 'About', label: 'Version'") s=s.replace('Manage models','Manage model versions');s=s.replace(' return { const body=bodyRef.current,scroll=body?.closest('.main__body');if(!body||!scroll)return; const sections=[...body.querySelectorAll('.settings-section')]; const update=()=>{const top=scroll.getBoundingClientRect().top+80;const current=sections.filter(s=>s.getBoundingClientRect().top<=top).at(-1)??sections[0];setActive(current?.id.replace('settings-','')??'');}; const observer=new IntersectionObserver(update,{root:scroll,rootMargin:'-70px 0px -55% 0px'});sections.forEach(s=>observer.observe(s));scroll.addEventListener('scroll',update,{passive:true});update();return()=>{observer.disconnect();scroll.removeEventListener('scroll',update);}; },[query]); return ','
');p.write_text(s) append('src/styles/app.css',''' .request-status { display:inline-flex; padding:3px 8px; border-radius:6px; background:var(--st-surface-2); color:var(--st-ink-soft); font-size:12px; white-space:nowrap; }.request-status[data-state='generating'] { color:var(--st-info-text); }.request-status[data-state='done'] { color:var(--st-accent-text); }.request-status[data-state='error'],.task-failed { color:var(--st-danger-text); }.request-status[data-state='shared'] { color:var(--st-warn-text); } .setupmodal__surface { max-height:calc(100dvh - 48px); overflow:auto; background:var(--st-surface); opacity:1; animation:none; }.setup-redesign .setup-actions { position:sticky; bottom:0; padding:16px 0; background:var(--st-surface); z-index:2; }.setup-headline:focus { outline:none; }.setup-redesign .version-rung { padding:9px 12px; }.settings-body output { white-space:nowrap; min-width:44px; } ''')