Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
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<Workload>('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('<h1 className="h2">Set up Strata</h1>','<h1 className="h2">Set up Strata <PreviewBadge/></h1>');s=s.replace('{demo ? <p className="demo-strip"><Icon name="info" size={16} />Demo · downloads and answers are simulated.</p> : 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 ? <section className="stack"><h2 className="setup-headline" tabIndex={-1}>Pick a version</h2><p className="small muted">{versions[0]?.family} · the same model at different sizes.</p><VersionLadder versions={versions} hardware={hardware} context={config.context} selected={candidate?.id} recommended={recommended?.id} onSelect={setPicked}/><details className="disclosure"><summary>Conversation context</summary><div className="input-field"><span>Context length</span><Select ariaLabel="Setup context" value={context} onChange={setContext} options={[{value:'recommended',label:'Recommended (32K)'},...[4,8,16,32,64,128,256,512,1024].filter(n=>n*1024<=(candidate?.contextMax??32768)).map(n=>({value:`${n}k` as BeginnerConfig['contextLength'],label:`${n}K`}))]}/></div></details>{blocked?<ErrorNotice message="This version needs more memory at this context." next="Choose a smaller version or shorten the conversation context."/>:null}<div className="setup-actions"><Btn disabled={pending} onClick={()=>void advance(1)}>Back</Btn><Btn variant="primary" disabled={!candidate||blocked||pending} onClick={()=>void run()}>{pending?'Preparing…':installed?'Load version':'Download and continue'}</Btn></div></section>:null}
'''+s[b:];s=s.replace('tabIndex={-1}>Preparing your model</h2>', 'tabIndex={-1}>{error?"Couldn’t prepare the model":"Preparing your model"}</h2>');s=s.replace('{error ? <p role="alert" className="inline-error small">{error}</p> : null}', '{error ? <ErrorNotice message={error} next="Your choices have been saved. Use Retry to continue."/> : null}')
a=s.index(' </div><Dialog open={adjust}');b=s.index('<DemoTest open={testOpen}',a);s=s[:a]+' </div>'+s[b:];p.write_text(s)
# Errors and task controls.
p=root/'src/components/TaskEditor.tsx';s=p.read_text().replace('Btn, Dialog, Select','Btn, Dialog, Select, ErrorNotice');s=s.replace(" const modelName=library?.variants.find(v=>v.id===library.loaded)?.family.split('-')[0]??'model';\n",'');s=s.replace("assistant?'Create with '+modelName", "assistant?'Create with AI'");s=s.replace('<p role="alert" className="inline-error">{error}</p>', '<ErrorNotice message={error}/>');p.write_text(s)
p=root/'src/screens/Tasks.tsx';s=p.read_text().replace('IconBtn, Select','IconBtn, Select, ErrorNotice');s=s.replace(" const modelName=loaded?.family.split('-')[0] ?? 'model';\n",'');s=s.replace('Create with {modelName}', 'Create with AI');s=s.replace('title={currentTask?.title??"Tasks"}', 'title={currentTask?<><button className="text-action" onClick={()=>navigate(\'tasks\')}>Tasks</button> › {currentTask.title}</>:"Tasks"}');s=s.replace('sub="Run a prompt on a schedule, or whenever you need it." actions={<div', 'sub={currentTask?undefined:"Run a prompt on a schedule, or whenever you need it."} actions={currentTask?undefined:<div');s=s.replace('{location.param?<button className="text-action" onClick={()=>navigate(\'tasks\')}>All tasks</button>:null}', '');s=s.replace('<p className="task-runtime small muted">','{!currentTask&&<p className="task-runtime small muted">').replace('file and web tools aren’t connected.</p>','the instructions you save.</p>}');s=s.replace('<label className="row small muted"><input type="checkbox" checked={archived}', '{!currentTask&&<label className="row small muted"><input type="checkbox" checked={archived}').replace('/>Deleted tasks</label>','/>Deleted tasks</label>}');s=s.replace('<p role="alert" className="inline-error">{error}</p>', '<ErrorNotice message={error} onRetry={()=>void refresh()}/>');s=s.replace('<p className="small inline-error">{t.error}</p>', '<button className="task-failed text-action" onClick={()=>setResult(t.id!)}>Last run failed · View</button>');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('<IconBtn name={t.status===\'running\'?\'stop\':\'send\'}', '<Btn size="sm" icon={t.status===\'running\'?\'stop\':\'bolt\'}');s=s.replace('`))}/><button className="st-toggle"', '`))}>{t.status===\'running\'?\'Stop\':\'Run now\'}</Btn><label className="row small"><span>On schedule</span><button className="st-toggle"');s=s.replace('{enabled:!t.enabled}))}/></>', '{enabled:!t.enabled}))}/></label></>');s=s.replace("<Markdown text={selected.output??'No result yet.'}/>", "{selected.error?<ErrorNotice message={selected.error} next=\"Try running this task again.\"/>:<Markdown text={selected.output??'No result yet.'}/>}");p.write_text(s)
p=root/'src/screens/Skills.tsx';s=p.read_text().replace('Select, type IconName','Select, ErrorNotice, type IconName');s=s.replace('<p role="alert" className="inline-error">{error}</p>', '<ErrorNotice message={error} action="Retry" onRetry={()=>void action(\'refresh\',loadSkills)}/>');s=s.replace('enabled here','enabled in this workspace');p.write_text(s)
# Error consistency and sharing discoverability.
p=root/'src/screens/Serving.tsx';s=p.read_text().replace('IconBtn, Seg','IconBtn, Seg, ErrorNotice');s=s.replace(" function closeKey()", " function generateKey(){const bytes=crypto.getRandomValues(new Uint8Array(32));setKeyDraft('sk-strata-'+Array.from(bytes,v=>v.toString(16).padStart(2,'0')).join(''));setGenerated(true);}\n function closeKey()")
s=s.replace("setKeyDraft(''); setGenerated(false);", 'generateKey();');s=s.replace('<p role="alert" className="inline-error">{error}</p>', '<ErrorNotice message={error}/>');s=s.replace('<p ref={cancelResult} tabIndex={-1} role="alert">{selected.error}</p>', '<div ref={cancelResult} tabIndex={-1}><ErrorNotice message={selected.error} next="Check the client connection and try the request again."/></div>');s=s.replace('useRef<HTMLParagraphElement>', 'useRef<HTMLDivElement>')
s=s.replace("{selected.cancellable ? <Btn", "{selected.cancellable!==false&&['queued','generating'].includes(selected.state) ? <Btn")
s=s.replace("r.cancelRequested ? r.cancellable ? 'Cancelling…' : 'Cancelled' : r.state", "<span className=\"request-status\" data-state={r.state}>{r.cancelRequested ? r.cancellable ? 'Cancelling…' : 'Cancelled' : r.state.charAt(0).toUpperCase()+r.state.slice(1)}</span>")
s=s.replace(" : undefined} />}</section>", " : <Btn onClick={()=>setGuide(true)}>Connect an app</Btn>} />}</section>")
old='<IconBtn name="link" title={serving.sharing?.active ? \'Manage local sharing\' : \'Start local sharing\'} active={!!serving.sharing?.active} onClick={() => { setError(\'\'); setSharingOpen(true); }} />'
s=s.replace(old,'');s=s.replace('</dd></div>{serving.tunnel?.status', '</dd></div><div><dt>Local network</dt><dd className="row"><span className="request-status" data-state={serving.sharing?.active?"shared":"queued"}>{serving.sharing?.active?"Shared on local network":"Off"}</span><Btn size="sm" onClick={()=>{setError(\'\');setSharingOpen(true);}}>{serving.sharing?.active?"Manage / stop":"Share"}</Btn></dd></div>{serving.tunnel?.status')
s=s.replace('<code className="key-url">{serving.sharing.url}</code>', '<div className="row"><code className="key-url">{serving.sharing.url}</code><IconBtn name="copy" title="Copy local network URL" onClick={()=>void navigator.clipboard.writeText(serving.sharing!.url!)}/></div>')
s=s.replace('<IconBtn name="copy" title="Copy new API key" disabled={!keyDraft} onClick={() => void navigator.clipboard.writeText(keyDraft)} />', '{keyDraft?<IconBtn name="copy" title="Copy new API key" onClick={() => void navigator.clipboard.writeText(keyDraft)} />:null}')
s=s.replace('Generate a key for me</Btn>', 'Generate another key</Btn><button className="text-action" onClick={()=>{setKeyDraft(\'\');setGenerated(false);}}>Use my own key</button>')
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('<p className="inline-error" role="alert">{error||tunnel?.error}</p>', '<ErrorNotice message={error||tunnel?.error||\'Connection failed\'} next="Check the connector and network, then try connecting again."/>');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<HTMLDivElement>(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:<div className=\"row\"><Btn size=\"sm\" onClick={createChatShowcase}>Chat showcase</Btn><Btn size=\"sm\" onClick={createPreviewExamples}>Preview examples</Btn></div>},\n { section: 'About', label: 'Version'")
s=s.replace('Manage models','Manage model versions');s=s.replace(' return <Screen', ''' useEffect(()=>{
const body=bodyRef.current,scroll=body?.closest('.main__body');if(!body||!scroll)return;
const sections=[...body.querySelectorAll<HTMLElement>('.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 <Screen''');s=s.replace("document.getElementById(`settings-${section}`)?.scrollIntoView({ block: 'start', behavior: scrollBehavior() });", "const target=document.getElementById(`settings-${section}`);const container=bodyRef.current?.closest('.main__body');if(target&&container)container.scrollTo({top:container.scrollTop+target.getBoundingClientRect().top-container.getBoundingClientRect().top-72,behavior:scrollBehavior()});")
s=s.replace('<div className="stack stack--lg settings-body">','<div ref={bodyRef} className="stack stack--lg settings-body">');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; }
''')