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++
Settings > Storage: Models folder card with the three choices (move, keep, start empty), progress, stop, and plain errors; host routes and Control calls; 78 strings in 8 languages; tests
Niko12211d6a040129ac
diff --git a/apps/host/server/control-runtime.mjs b/apps/host/server/control-runtime.mjsindex 6f352b543..0447572de 100644--- a/apps/host/server/control-runtime.mjs+++ b/apps/host/server/control-runtime.mjs@@ -207,6 +207,23 @@ export function createControl({ control = findControl(), env = process.env, runif (result.json?.plan && Array.isArray(result.json.plan.issues)) return result.json.plan;throw failure(result, 'The files could not be checked.');},+ /** What picking `to` as the models folder means (sizes, free space, which choices are possible, why not): nothing is changed. */+ async planModelsMove(from, to) {+ const result = await call(['models', 'move', to, ...(from ? ['--from', from] : []), '--plan', '--output', 'json'], { timeoutMs: 120_000 });+ if (result.json?.plan) return result.json.plan;+ throw failure(result, 'The folder could not be checked.');+ },+ /**+ * Move the model files to `to` (copied, checked, then the old copies removed). `onEvent` gets the progress lines; a file at `cancelFile` stops it+ * safely. Resolves with the summary (done / stopped, what moved, what is left); a failure is a ControlError whose `output` carries the details.+ */+ async moveModels(from, to, { installDir = null, cancelFile = null, onEvent = null } = {}) {+ const args = ['models', 'move', to, ...(from ? ['--from', from] : []), ...(installDir ? ['--install-dir', installDir] : []), ...(cancelFile ? ['--cancel-file', cancelFile] : []), '--output', 'jsonl'];+ const result = await call(args, { timeoutMs: 24 * 3600_000, onLine: onEvent ?? (() => {}) });+ if (result.json?.ok && result.json.event === 'result') return result.json;+ const error = result.json?.error;+ throw Object.assign(new ControlError(error?.message ?? (result.stderr.split(/\r?\n/).filter(Boolean).pop() || 'The models could not be moved.'), { exitCode: result.code, output: result.json }), { code: error?.code ?? 'move_failed', details: error?.details ?? '' });+ },async saveProfile(name, configPath) {const listed = await call(['profile', 'list', '--output', 'json'], { timeoutMs: 20_000 });const known = (listed.json?.profiles ?? []).some(p => p.id === name);diff --git a/apps/host/server/index.mjs b/apps/host/server/index.mjsindex 30a5557ac..eb454cb4f 100644--- a/apps/host/server/index.mjs+++ b/apps/host/server/index.mjs@@ -966,6 +966,14 @@ async function api(req, res, path, method, url) {if(path==='/api/native'&&method==='GET')return json(res,200,await native.refresh(url.searchParams.get('refresh')==='1'));if(path==='/api/native'&&method==='PATCH')return json(res,200,await native.configure(await readBody(req)));if(path==='/api/native/directory'&&method==='POST')return json(res,200,native.setDownloadDirectory((await readBody(req)).directory));+ /* Settings > Storage > Models folder: pick (or type) a folder, say what it means, then start the choice. Copying is Control's (strata models move). */+ if(path==='/api/native/models-folder/plan'&&method==='POST'){+ const typed=await typedFolder((await readBody(req)).path,{isAbsolute});+ const picked=typed?{path:typed}:await chooseFolder('Choose a folder for your models');+ if(picked.unavailable){const u=chooserUnavailable(picked);return error(res,501,u.message,{code:u.code});}+ if(picked.cancelled)return json(res,200,{cancelled:true});+ return json(res,200,{plan:await native.planModelsFolder(picked.path)});}+ if(path==='/api/native/models-folder/start'&&method==='POST'){const body=await readBody(req);const result=await native.startModelsFolder({folder:body.path,choice:body.choice,stopRunning:body.stopRunning===true});return json(res,result.id?202:200,result);}if(path==='/api/native/plan'&&method==='POST')return json(res,200,await native.plan(await readBody(req)));if(path==='/api/native/operations'&&method==='POST'){if(storageChanging)return error(res,409,'Wait for the model folder check to finish.');const body=await readBody(req);return json(res,202,native.operation(body.kind,body.args));}if(path==='/api/native/logs'&&method==='GET')return json(res,200,{logs:native.logs()});@@ -1010,7 +1018,7 @@ async function api(req, res, path, method, url) {if(nativeSettingsFile&&method==='POST')return json(res,200,await native.openSettingsFile(nativeSettingsFile[1]));// Credentials are handled only on the host. Responses and events expose a key-set flag.- return error(res,404,'Unknown native control action.');}catch(e){return error(res,/Finish|Unload|running|current operation/.test(e.message)?409:400,e.message);}}+ return error(res,404,'Unknown native control action.');}catch(e){return error(res,/Finish|Unload|running|current operation/.test(e.message)?409:400,e.message,{...(e.code&&typeof e.code==='string'?{code:e.code}:{}),...(e.details?{details:String(e.details)}:{})});}}if (path === '/api/model-providers' && method === 'GET') return json(res, 200, withPictureAnswers(modelProviders.list()));if (path === '/api/model-providers/discover' && method === 'POST') {diff --git a/apps/host/server/native-control.mjs b/apps/host/server/native-control.mjsindex 618abeed0..75f7c0ced 100644--- a/apps/host/server/native-control.mjs+++ b/apps/host/server/native-control.mjs@@ -2,8 +2,8 @@import { spawn } from 'node:child_process';import {chooseParallel,applyParallel,withoutParallel,FALLBACK_NOTE} from './native-parallel.mjs';import { randomBytes, randomUUID, createHash } from 'node:crypto';-import { existsSync, readdirSync, readFileSync, writeFileSync, mkdirSync, realpathSync, copyFileSync, renameSync, unlinkSync, chmodSync, statSync, accessSync, constants } from 'node:fs';-import { join, resolve, dirname, basename } from 'node:path';+import { existsSync, readdirSync, readFileSync, writeFileSync, mkdirSync, realpathSync, copyFileSync, renameSync, rmSync, statfsSync, unlinkSync, chmodSync, statSync, accessSync, constants } from 'node:fs';+import { join, resolve, dirname, basename, sep } from 'node:path';import { fileURLToPath } from 'node:url';import { createServer } from 'node:net';import { NATIVE_FIELDS, APP_OWNED_FIELDS, withoutDraftLayer, validateNativeSettings, validateMcpServers, publicMcpServers, publicNativeEnv, restoreNativeEnv } from './native-settings.mjs';@@ -52,7 +52,8 @@ export function createNativeControl({directory,requests=()=>[],changed=()=>{},splet defaultId=null,timer=null,closing=false,polling=false;const emit=()=>{const value=state();writeFileSync(join(directory,'native-jobs.json'),JSON.stringify(value.jobs),{mode:0o600});changed(value);};const append=(instanceId,line)=>{logs.push({at:new Date().toISOString(),instanceId,line:String(line).slice(0,2000)});if(logs.length>400)logs.shift();};- function state(){return {...snapshot,downloadDirectory:preferences.downloadDirectory??(modelsDirectory?modelsDirectory():snapshot.installed?.data_folder),fields:nativeFields(),instances:[...instances.values()].map(({key,configPath,fingerprint,mcpServers,...i})=>structuredClone(i)),defaultId,jobs:[...jobs.values()].slice(-12).map(({process,abort,engineAbort,rawResult,...j})=>j),capabilities:{responses:sourceText().includes('/v1/responses'),updates:!!snapshot.available,rollback:previousEngine(),componentUpdates:packaged&&typeof control.update==='function',calibration:packaged?false:snapshot.hardware?.gpus?.some(g=>/nvidia/i.test(g.name??''))??false}};}+ function diskSpace(path){try{const s=statfsSync(path);return {free:Number(s.bavail)*Number(s.bsize),total:Number(s.blocks)*Number(s.bsize)};}catch{return null;}}+ function state(){const folder=preferences.downloadDirectory??(modelsDirectory?modelsDirectory():snapshot.installed?.data_folder),space=folder?diskSpace(folder):null;return {...snapshot,downloadDirectory:folder,downloadFreeBytes:space?.free??null,downloadTotalBytes:space?.total??null,fields:nativeFields(),instances:[...instances.values()].map(({key,configPath,fingerprint,mcpServers,...i})=>structuredClone(i)),defaultId,jobs:[...jobs.values()].slice(-12).map(({process,abort,engineAbort,rawResult,...j})=>j),capabilities:{responses:sourceText().includes('/v1/responses'),updates:!!snapshot.available,rollback:previousEngine(),componentUpdates:packaged&&typeof control.update==='function',calibration:packaged?false:snapshot.hardware?.gpus?.some(g=>/nvidia/i.test(g.name??''))??false}};}let sourceCache={path:'',time:0,text:''};function sourceText(){try{const path=join(packaged?control.control.dir:preferences.repo,'serve/server.py'),time=statSync(path).mtimeMs;if(sourceCache.path===path&&sourceCache.time===time)return sourceCache.text;sourceCache={path,time,text:readFileSync(path,'utf8')};return sourceCache.text;}catch{return '';}}function nativeFields(){const source=sourceText();return NATIVE_FIELDS.map(field=>({...field,supported:APP_OWNED_FIELDS.includes(field.id)||field.id.startsWith('vision_')||field.id.startsWith('mcp_')||field.id==='vram_reserve_mib'||source.includes(field.id)}));}@@ -126,7 +127,7 @@ export function createNativeControl({directory,requests=()=>[],changed=()=>{},sprefreshing=(async()=>{try{const [catalog,status]=packaged?await (async()=>{const s=await tool('strata_status',{hardware:true});const c=await tool('strata_models').catch(error=>({families:[],contexts:[],recommendation:{family:null,model:null},context_note:'',error:error.message}));return [c,s];})():await Promise.all([tool('strata_models'),tool('strata_status',{hardware:true})]);let visionReader=false;if(packaged){try{const e=await control.engine();const root=e?.engine?.root??(e?.engine?.exe?dirname(e.engine.exe):'');visionReader=!!root&&['strata-vision','strata-vision.exe'].some(n=>existsSync(join(root,n)));}catch{visionReader=false;}}const markImages=c=>c&&Array.isArray(c.families)?{...c,families:c.families.map(f=>({...f,imagesCapable:!!f.images,images:!!f.images&&visionReader,sizes:(f.sizes??[]).map(s=>({...s,imagesCapable:!!s.images,images:!!s.images&&visionReader}))}))}:c;snapshot={available:true,repo:packaged?status.installDir:repo(),version:packaged?(control.version??null):await execute('git',['describe','--tags','--always'],repo()).then(s=>s.trim()).catch(()=>null),summary:status.summary,catalog:markEngine(packaged?markImages(catalog):catalog,status.engine),engineInfo:{version:status.engine?.version??null,source:status.engine?.source??null},visionReader:packaged?visionReader:true,installed:installedInfo(status.installed),hardware:status.hardware,error:null,install:status.install,external:status.running??null,...(packaged?{packaged:true,installDir:status.installDir,engine:status.engine,installerError:status.installerError}:{})};lastRead=Date.now();if(status.install?.running&&![...jobs.values()].some(j=>j.state==='running'))begin('install',j=>watchInstall(j,status.install));}catch(error){snapshot={...snapshot,available:false,error:error.message};lastRead=Date.now();}emit();return state();})().finally(()=>{refreshing=null;});const run=refreshing;if(!force&&snapshot.available){run.catch(()=>{});return state();}return run;}function configure({repository}){if(packaged){if(instances.size||[...jobs.values()].some(j=>j.state==='running'))throw new Error('Unload models and finish operations before changing the installation.');const next=realpathSync(String(repository));if(!statSync(next).isDirectory())throw new Error('Choose the folder that holds your Strata model configurations.');preferences={...preferences,installDir:next};packagedInstall=null;disconnect();writeFileSync(settingsPath,JSON.stringify(preferences,null,2),{mode:0o600});lastRead=0;return refresh(true);}if(instances.size||[...jobs.values()].some(j=>j.state==='running'))throw new Error('Unload models and finish operations before changing the installation.');const next=realpathSync(String(repository));const old=preferences;preferences={...preferences,repo:next};try{repo();}catch(e){preferences=old;throw e;}disconnect();writeFileSync(settingsPath,JSON.stringify(preferences,null,2),{mode:0o600});lastRead=0;return refresh(true);}- function setDownloadDirectory(input){if([...jobs.values()].some(j=>j.state==='running'))throw new Error('Finish the current operation before changing the folder.');if(typeof input!=='string'||!input.trim()||/[\r\n\0]/.test(input))throw new Error('Choose a model folder.');let path;try{path=realpathSync(input.trim());}catch{throw new Error('That folder does not exist. Check the path, or that the drive is connected.');}if(!statSync(path).isDirectory())throw new Error('Choose a folder, not a file.');/* A whole drive (D:\) is not filled with models: D:\Strata is made and used. */if(isDriveRoot(path)){const own=dataFolderFromPick(path).path;makeFolder(own);path=realpathSync(own);}try{accessSync(path,constants.R_OK|constants.W_OK);}catch{throw new Error('Strata cannot write in that folder. Choose a folder you can save files in.');}preferences={...preferences,downloadDirectory:path};/* the same choice for the installer and the Terminal: the Control settings file */if(packaged)rememberDataFolder(controlSettingsFile(),path,Date.now()/1000,true);writeFileSync(settingsPath,JSON.stringify(preferences,null,2),{mode:0o600});shareDataFolder();emit();return state();}+ function setDownloadDirectory(input,{insideJob=false}={}){if(!insideJob&&[...jobs.values()].some(j=>j.state==='running'))throw new Error('Finish the current operation before changing the folder.');if(typeof input!=='string'||!input.trim()||/[\r\n\0]/.test(input))throw new Error('Choose a model folder.');let path;try{path=realpathSync(input.trim());}catch{throw new Error('That folder does not exist. Check the path, or that the drive is connected.');}if(!statSync(path).isDirectory())throw new Error('Choose a folder, not a file.');/* A whole drive (D:\) is not filled with models: D:\Strata is made and used. */if(isDriveRoot(path)){const own=dataFolderFromPick(path).path;makeFolder(own);path=realpathSync(own);}try{accessSync(path,constants.R_OK|constants.W_OK);}catch{throw new Error('Strata cannot write in that folder. Choose a folder you can save files in.');}preferences={...preferences,downloadDirectory:path};/* the same choice for the installer and the Terminal: the Control settings file */if(packaged)rememberDataFolder(controlSettingsFile(),path,Date.now()/1000,true);writeFileSync(settingsPath,JSON.stringify(preferences,null,2),{mode:0o600});shareDataFolder();emit();return state();}function recordFile(model){if(!safeId(model))throw new Error('Choose an installed model.');const entry=snapshot.installed?.models?.find(i=>i.model===model);if(!entry)throw new Error('This model is not installed. Download and prepare it first.');const path=realpathSync(entry.configPath??join(repo(),entry.config));if(dirname(path)!==repo()||!/^strata-[a-z0-9_-]+\.json$/i.test(basename(path)))throw new Error('The model configuration is outside the Strata installation.');return {entry,path};}function record(model){const {entry,path}=recordFile(model);return {entry,path,config:readJson(path)};}/* The text file a power user edits by hand: where it is and what is wrong in it (run-config-check.mjs). */@@ -377,10 +378,77 @@ return {summary:result.summary??'Deleted',removed:result.plan?.gb??null};}return autotuner.start(job,job.kind==='recheck'?'recheck':'tune',{configPath:path,presetId:args.presetId,mode:args.mode,use:args.use,goal:room?'room':'speed',leaveRam:room?20:0,allowSmallDifferences:args.allowSmallDifferences===true,name:args.name},{onProgress:p=>{job.summary=p.text??job.summary;emit();}});}function operation(kind,args={}){if(!['install','load','benchmark','tune','autotune','recheck','calibrate','update-engine','update-strata','rollback','remove'].includes(kind))throw new Error('Choose a supported native operation.');if(!snapshot.available)throw new Error(snapshot.error??'Connect the native Strata installation first.');if(kind==='install'||kind==='load'){const refusal=engineRefusal(snapshot.catalog,args.model,snapshot.engineInfo);if(refusal)throw new Error(refusal);}return begin(kind,job=>kind==='install'?install(job,args):kind==='load'?loadEngine(job,args):kind==='benchmark'?benchmark(job,args):kind==='tune'?tune(job,args):kind==='autotune'||kind==='recheck'?autotune(job,args):kind==='remove'?removeModel(job,args):program(job,args),{guided:args.guided===true,model:args.model,...(args.family?{family:args.family}:{})});}- async function cancel(id){const job=jobs.get(id);if(!job||job.state!=='running')throw new Error('This operation is no longer running.');if(job.kind==='install'){job.engineAbort?.abort();await tool('strata_install',{cancel:true});}else if(job.abort)job.abort.abort();else if(job.process){if(!['tune','calibrate','autotune','recheck'].includes(job.kind))throw new Error('File updates cannot be cancelled safely while files are being replaced.');job.state='cancelled';await stopProcess(job.process);}job.state='cancelled';job.summary=job.kind==='install'?'Stopped. Completed downloads are kept.':'Stopped.';emit();return state();}+ /* ---- The models folder card (0.2.2): what a picked folder means, and the three choices. The copying is Control's (strata models move). ---- */+ const currentModelsFolder=()=>preferences.downloadDirectory??(modelsDirectory?modelsDirectory():snapshot.installed?.data_folder)??null;+ const moveFile=()=>join(directory,'models-move.cancel');+ const folderWords=error=>({message:error.message,details:error.details||''});+ /** A picked folder as the data folder: a whole drive (D:\) becomes D:\Strata, and the person is told (the models then live in D:\Strata\Models). */+ function pickedModelsFolder(input){+ if(typeof input!=='string'||!input.trim()||/[\r\n\0]/.test(input))throw new Error('Choose a models folder.');+ const picked=resolve(input.trim()),target=dataFolderFromPick(picked);+ return {picked,folder:target.path,wholeDrive:!!target.note,shown:target.note?join(target.path,'Models'):target.path};+ }+ async function planModelsFolder(input){+ if(!packaged)throw new Error('Changing the models folder is part of the Strata app.');+ const now=currentModelsFolder();if(!now)throw new Error('Strata is still reading your models folder. Try again in a moment.');+ const pick=pickedModelsFolder(input),plan=await control.planModelsMove(now,pick.folder);+ return {...plan,...pick,current:now,running:instances.size,busy:[...jobs.values()].some(j=>j.state==='running')};+ }+ /* "Start empty": the old models are no longer listed. Their run configs are moved (not deleted) into old-models beside the others; the model files are not touched. */+ function setAsideConfigs(old){+ const folder=repo(),kept=join(folder,'old-models'),aside=[];+ const under=value=>typeof value==='string'&&[ 'models','packs','mtp' ].some(item=>{const base=join(old,item).toLowerCase();const v=value.toLowerCase();return v===base||v.startsWith(base+sep)||v.startsWith(base+'/');});+ const scan=value=>Array.isArray(value)?value.some(scan):value&&typeof value==='object'?Object.values(value).some(scan):under(value);+ for(const name of readdirSync(folder)){+ if(!/^strata-[a-z0-9_-]+\.json$/i.test(name)||name.endsWith('.shared-settings.json'))continue;+ if(!scan(readJson(join(folder,name))))continue;+ mkdirSync(kept,{recursive:true});renameSync(join(folder,name),join(kept,name));aside.push(name);+ }+ return aside;+ }+ async function startModelsFolder({folder:input,choice,stopRunning=false}){+ if(!packaged)throw new Error('Changing the models folder is part of the Strata app.');+ if(!['move','keep','empty'].includes(choice))throw new Error('Choose what to do with your models.');+ if([...jobs.values()].some(j=>j.state==='running'))throw new Error('Finish or stop the download to change the folder.');+ const plan=await planModelsFolder(input);+ if(plan.issue)throw Object.assign(new Error(plan.issue.message),{details:plan.issue.details,code:plan.issue.code});+ if(!plan.choices[choice].possible)throw Object.assign(new Error(plan.choices[choice].reason||'That choice is not possible here.'),{code:'not_possible'});+ if(instances.size){+ if(!stopRunning)throw Object.assign(new Error('A model is running. Stop it first, then change the folder.'),{code:'running'});+ for(const id of [...instances.keys()])await unload(id);+ }+ const old=plan.current,target=plan.folder;+ if(choice!=='move'){+ makeFolder(target);+ const aside=choice==='empty'?setAsideConfigs(old):[];+ setDownloadDirectory(target);lastRead=0;await refresh(true);+ return {done:true,choice,folder:target,oldFolder:old,setAside:aside};+ }+ rmSync(moveFile(),{force:true});+ return begin('models-move',async job=>{+ job.cancelFile=moveFile();job.summary='Starting…';+ try{+ const result=await control.moveModels(old,target,{installDir:repo(),cancelFile:moveFile(),onEvent:event=>{+ if(event.event!=='progress')return;+ job.progress={done:event.done,total:event.total,file:event.file,group:event.group,index:event.index,count:event.count,secondsLeft:event.seconds_left||0,sameDrive:!!event.same_drive};+ job.summary=`${Math.round(event.done/1e8)/10} of ${Math.round(event.total/1e8)/10} GB`;emit();}});+ const finished={done:!!result.done,stopped:!!result.stopped,moved:result.moved??[],remaining:result.remaining??[],bytes:result.bytes_moved??0,total:result.total_bytes??0,from:old,to:target,files:result.files_moved??0,sameDrive:!!result.same_drive};+ /* Only a whole move changes the folder the app uses: a stopped move leaves it where it was, and every model works where it is. */+ if(result.done){setDownloadDirectory(target,{insideJob:true});finished.folder=target;}+ job.progress=null;+ return {summary:result.done?'Your models are moved.':'Moving stopped. Nothing was lost.',...finished};+ }catch(error){+ const left=error.output;+ job.result={failed:true,code:error.code,moved:left?.moved??[],remaining:left?.remaining??[],bytes:left?.bytes_moved??0,total:left?.total_bytes??0,from:old,to:target};+ job.progress=null;+ throw error;+ }finally{rmSync(moveFile(),{force:true});}+ },{family:undefined});+ }+ async function cancel(id){const job=jobs.get(id);if(!job||job.state!=='running')throw new Error('This operation is no longer running.');if(job.kind==='install'){job.engineAbort?.abort();await tool('strata_install',{cancel:true});}else if(job.kind==='models-move'){/* a safe stop: the copy in flight is dropped, files already moved stay */try{writeFileSync(job.cancelFile,'stop');}catch{/* the run ends anyway */}job.summary='Stopping…';emit();return state();}else if(job.abort)job.abort.abort();else if(job.process){if(!['tune','calibrate','autotune','recheck'].includes(job.kind))throw new Error('File updates cannot be cancelled safely while files are being replaced.');job.state='cancelled';await stopProcess(job.process);}job.state='cancelled';job.summary=job.kind==='install'?'Stopped. Completed downloads are kept.':'Stopped.';emit();return state();}async function close(){closing=true;clearInterval(timer);const installing=packaged&&child&&[...jobs.values()].some(j=>j.kind==='install'&&j.state==='running');if(installing)await send('tools/call',{name:'strata_install',arguments:{cancel:true}},15000).catch(()=>{});const operations=[];for(const job of jobs.values()){job.abort?.abort();if(job.process)operations.push(stopProcess(job.process));if(job.state==='running')job.state='cancelled';}await Promise.all(operations);await Promise.all([...instances.keys()].map(id=>unload(id,true).catch(()=>{})));disconnect();}// Remove nonserializable process references from public jobs.const publicState=()=>{const value=state();value.jobs=value.jobs.map(({process,engineAbort,rawResult,...job})=>job);return value;};async function localPreview(path){if(!packaged)throw new Error('Checking local model files is part of the Strata app.');if(typeof path!=='string'||!path.trim()||[...path].some(c=>c.charCodeAt(0)<32))throw new Error('Choose a folder.');return control.importPlan(path.trim());}- return {state:publicState,tuneStatus,tuneEffective,tuneOff,tunePresets:{list:()=>autotuner.list(),action:(kind,id,extra)=>autotuner.action(kind,id,extra),undoFor:async args=>autotuner.undoFor(tuneConfig(args).path)},refresh,localPreview,configure,setDownloadDirectory,plan,settings,save,settingsFile,openSettingsFile,operation,cancel,unload,resolveInstance,poll,logs:()=>logs.slice(),benchmarkReport:()=>readJson(join(directory,'native-benchmark.json'),null),setDefault(id){defaultId=resolveInstance(id).id;emit();return publicState();},hasLive:()=>[...instances.values()].some(i=>i.status==='ready'),readyInstances:()=>[...instances.values()].filter(i=>i.status==='ready'),close};+ return {state:publicState,tuneStatus,tuneEffective,tuneOff,tunePresets:{list:()=>autotuner.list(),action:(kind,id,extra)=>autotuner.action(kind,id,extra),undoFor:async args=>autotuner.undoFor(tuneConfig(args).path)},refresh,localPreview,configure,setDownloadDirectory,planModelsFolder,startModelsFolder,plan,settings,save,settingsFile,openSettingsFile,operation,cancel,unload,resolveInstance,poll,logs:()=>logs.slice(),benchmarkReport:()=>readJson(join(directory,'native-benchmark.json'),null),setDefault(id){defaultId=resolveInstance(id).id;emit();return publicState();},hasLive:()=>[...instances.values()].some(i=>i.status==='ready'),readyInstances:()=>[...instances.values()].filter(i=>i.status==='ready'),close};}diff --git a/apps/host/src/components/ModelsFolderDialog.tsx b/apps/host/src/components/ModelsFolderDialog.tsxnew file mode 100644index 000000000..bf6285428--- /dev/null+++ b/apps/host/src/components/ModelsFolderDialog.tsx@@ -0,0 +1,230 @@+import { tr, localeTag } from '../lib/i18n';+import { useEffect, useMemo, useState } from 'react';+import { Bar, Btn, Dialog, Icon } from './ui';+import { api, ApiError } from '../lib/client';+import { nativeAction, refreshNative, useNative, type NativeJob, type NativeState } from '../lib/native';+import { nativeShortName } from '../lib/native-names';+import { sizeGb } from '../lib/format';++type Choice = 'move' | 'keep' | 'empty';+interface Plan {+ ok: boolean;+ issue: { code: string; message: string; details: string } | null;+ old: string; new: string; same_drive: boolean;+ free_bytes: number; models_bytes: number; needed_bytes: number;+ models: { group: string; name: string; bytes: number }[];+ choices: Record<Choice, { possible: boolean; reason: string }>;+ folder: string; picked: string; wholeDrive: boolean; shown: string; current: string; running: number; busy: boolean;+}+interface Outcome { done?: boolean; stopped?: boolean; failed?: boolean; code?: string; moved?: string[]; remaining?: string[]; bytes?: number; total?: number; from?: string; to?: string; sameDrive?: boolean }++const gb = (bytes: number) => sizeGb(bytes / 1e9);+const driveOf = (path: string) => /^[A-Za-z]:/.test(path) ? path.slice(0, 2) : path;+const list = (items: string[]) => { try { return new Intl.ListFormat(localeTag(), { type: 'conjunction' }).format(items); } catch { return items.join(', '); } };++/** The model a folder name belongs to, in the words the Storage list uses ("Gyro-S"); the draft layer and loose files have no name of their own. */+function modelName(group: string, native: NativeState | null) {+ const hit = native?.installed?.models.find(m => m.model.toLowerCase() === group.toLowerCase());+ return hit ? nativeShortName(hit.model) : null;+}++function timeLeft(seconds: number) {+ if (seconds <= 0) return null;+ if (seconds < 60) return tr('Less than a minute left');+ const minutes = Math.ceil(seconds / 60);+ if (minutes <= 1) return tr('About a minute left');+ if (minutes < 120) return tr('About {0} minutes left', [minutes]);+ return tr('About {0} hours left', [Math.ceil(minutes / 60)]);+}++function Failure({ message, next, details }: { message: string; next?: string; details?: string }) {+ return <div className="error-notice" role="alert"><Icon name="error" size={18}/><div><strong>{tr(message)}</strong>{next ? <p>{tr(next)}</p> : null}{details ? <details className="error-detail"><summary className="small">{tr('Details')}</summary><pre className="small muted">{details}</pre></details> : null}</div></div>;+}++/** Settings > Storage > Models folder: the card, the folder dialog with its three choices, the progress of a move and what came of it. */+export function ModelsFolderCard({ blocked }: { blocked: boolean }) {+ const native = useNative();+ const [plan, setPlan] = useState<Plan | null>(null);+ const [stage, setStage] = useState<'issue' | 'drive' | 'choose' | null>(null);+ const [choice, setChoice] = useState<Choice>('move');+ const [pending, setPending] = useState(false);+ const [error, setError] = useState<{ message: string; details?: string } | null>(null);+ const [typing, setTyping] = useState(false), [typed, setTyped] = useState('');+ const [jobId, setJobId] = useState<string | null>(null);+ const [outcome, setOutcome] = useState<{ job: NativeJob } | null>(null);+ const [notice, setNotice] = useState('');+ const [stopping, setStopping] = useState(false);+ const folder = native?.downloadDirectory ?? '';+ const free = native?.downloadFreeBytes ?? null;+ const usage = native?.installed?.usage?.total_bytes ?? 0;+ const moving = native?.jobs.find(j => j.kind === 'models-move' && j.state === 'running') ?? null;+ const finished = jobId ? native?.jobs.find(j => j.id === jobId && j.kind === 'models-move' && j.state !== 'running') : undefined;+ useEffect(() => { if (finished && !outcome) { setOutcome({ job: finished }); setStopping(false); void refreshNative(true); } }, [finished, outcome]);+ const total = native?.downloadTotalBytes ?? null;+ const used = free !== null && total ? Math.min(100, Math.max(1, ((total - free) / total) * 100)) : 0;+ useEffect(() => { if (moving && !jobId) setJobId(moving.id); }, [moving, jobId]);++ function leave() { setPlan(null); setStage(null); setError(null); setTyping(false); }+ async function pick(path = '') {+ setPending(true);+ setError(null);+ setNotice('');+ try {+ const result = await api.post<{ cancelled?: boolean; plan?: Plan }>('/api/native/models-folder/plan', { path });+ if (result.cancelled || !result.plan) return;+ const next = result.plan;+ setTyping(false);+ setPlan(next);+ if (next.issue?.code === 'same') { setPlan(null); return; }+ setChoice(next.choices.move.possible ? 'move' : 'keep');+ setStage(next.issue ? 'issue' : next.wholeDrive ? 'drive' : 'choose');+ }+ catch (e) {+ if (e instanceof ApiError && e.status === 501) { setTyping(true); setError({ message: e.message }); }+ else setError({ message: (e as Error).message, details: ((e as ApiError).body as { details?: string } | undefined)?.details });+ }+ finally { setPending(false); }+ }+ async function start() {+ if (!plan) return;+ setPending(true);+ setError(null);+ try {+ const result = await api.post<NativeJob & { done?: boolean; setAside?: string[] }>('/api/native/models-folder/start', { path: plan.picked, choice, stopRunning: true });+ if (result.id) { setJobId(result.id); setOutcome(null); setStage(null); await refreshNative(true); setPlan(prev => prev); return; }+ setNotice(choice === 'keep' ? tr('Strata now also uses {0}. New downloads go there, and your current models stay where they are.', [plan.shown])+ : tr('Strata now uses {0}. Your old model files are still in {1}; Strata does not delete them.', [plan.shown, plan.current]));+ await refreshNative(true);+ leave();+ }+ catch (e) { setError({ message: (e as Error).message, details: ((e as ApiError).body as { details?: string } | undefined)?.details }); }+ finally { setPending(false); }+ }+ async function stop() {+ if (!moving) return;+ setStopping(true);+ try { await nativeAction(`operations/${moving.id}/cancel`); }+ catch (e) { setError({ message: (e as Error).message }); }+ }+ function closeResult() { setOutcome(null); setJobId(null); leave(); setNotice(''); }++ const progress = moving?.progress as { done: number; total: number; file: string; group: string; index: number; count: number; secondsLeft: number; sameDrive: boolean } | null | undefined;+ const percent = progress && progress.total > 0 ? Math.round((progress.done / progress.total) * 100) : 0;+ const planNames = useMemo(() => (plan?.models ?? []).map(m => ({ ...m, label: modelName(m.group, native) })).filter(m => m.label), [plan, native]);+ const savedPlan = useMemo(() => plan, [plan]);++ return <>+ <section className="storage-directory" aria-labelledby="models-folder-title">+ <div className="storage-directory__heading"><span><Icon name="folder" size={18}/><strong id="models-folder-title">{tr('Models folder')}</strong></span><Btn size="sm" disabled={!folder || blocked || pending || !!moving} onClick={() => void pick()}>{tr(pending && !plan ? 'Waiting for the folder…' : 'Change folder')}</Btn></div>+ <p className="small muted">{tr('Strata saves the big model files here.')}</p>+ <code className="storage-directory__path">{folder || tr('Reading model directory…')}</code>+ {free !== null ? <div className="models-free"><Bar value={used} label={tr('Disk use')}/><div className="models-free__row small"><span><strong>{tr('{0} free', [gb(free)])}</strong> {tr('on this drive')}</span><span className="muted">{tr('Your models use {0}', [gb(usage)])}</span></div></div> : null}+ {blocked && !moving ? <p className="small muted">{tr('Finish or stop the download to change the folder.')}</p> : null}+ {typing ? <form className="storage-directory__edit" onSubmit={e => { e.preventDefault(); if (typed.trim()) void pick(typed.trim()); }}>+ <label htmlFor="models-folder-path" className="small">{tr('Directory path')}</label>+ <input id="models-folder-path" className="st-input" value={typed} onChange={e => setTyped(e.target.value)} placeholder={tr('Full path to an existing folder')} spellCheck={false} autoFocus/>+ <div className="row"><Btn variant="primary" type="submit" disabled={pending || !typed.trim()}>{tr('Use this directory')}</Btn></div>+ </form> : null}+ {notice ? <p className="small storage-directory__notice" role="status"><Icon name="check" size={15}/>{notice}</p> : null}+ {error && !stage ? <Failure message={error.message} details={error.details}/> : null}+ </section>++ <Dialog open={stage === 'issue' && !!plan?.issue} compact title={tr(plan?.issue?.code === 'not_found' ? "That folder isn't there" : "That folder can't be used")} onClose={leave}+ actions={<>{plan?.issue?.code === 'not_found' ? null : <Btn onClick={leave}>{tr('Cancel')}</Btn>}<Btn variant="primary" onClick={() => { leave(); void pick(); }}>{tr('Choose another folder')}</Btn></>}>+ {plan?.issue ? <Failure message={plan.issue.message} details={plan.issue.details}+ next={plan.issue.code === 'not_writable' ? 'Choose a folder you own, for example one in Documents or on another drive.' : plan.issue.code === 'not_found' ? 'Check that the drive is plugged in, then pick the folder again. Your models were not touched.' : undefined}/> : null}+ </Dialog>++ <Dialog open={stage === 'drive' && !!plan} compact title={tr('Use this folder for your models?')} onClose={leave}+ actions={<><Btn onClick={leave}>{tr('Cancel')}</Btn><Btn variant="primary" onClick={() => setStage('choose')}>{tr('Continue')}</Btn></>}>+ {plan ? <>+ <div className="models-picked"><span className="small muted">{tr('New folder')}</span><code className="storage-directory__path">{plan.shown}</code><span className="small muted">{tr('{0} free on this drive', [gb(plan.free_bytes)])}</span></div>+ <div className="models-notice models-notice--info"><Icon name="info" size={18}/><div>{tr('You picked the whole drive {0}. Strata keeps its files in a folder of their own, so your models go in {1}.', [plan.picked, plan.shown])}</div></div>+ <p className="small muted">{tr('The three choices follow, as in step 2.')}</p>+ </> : null}+ </Dialog>++ <Dialog open={stage === 'choose' && !!plan} title={tr('Use this folder for your models?')} onClose={() => { if (!pending) leave(); }}+ actions={plan ? <>{plan.choices.move.possible ? <Btn disabled={pending} onClick={leave}>{tr('Cancel')}</Btn> : <Btn disabled={pending} onClick={() => { leave(); void pick(); }}>{tr('Choose another folder')}</Btn>}<Btn variant="primary" disabled={pending} onClick={() => void start()}>{tr(pending ? 'Working…' : choice === 'move' ? 'Move my models' : choice === 'keep' ? 'Use both folders' : 'Start empty')}</Btn></> : null}>+ {plan ? <ChooseBody plan={plan} choice={choice} setChoice={setChoice} names={planNames} error={error}/> : null}+ </Dialog>++ <Dialog open={!!moving && !outcome} compact noClose title={tr('Moving your models')} onClose={() => undefined}+ actions={<Btn disabled={stopping} onClick={() => void stop()}>{tr(stopping ? 'Stopping…' : 'Stop moving')}</Btn>}>+ <div className="models-free"><Bar value={percent} label={tr('Progress')}/><div className="models-free__row small"><span><strong>{tr('{0} of {1} GB', [progress ? (progress.done / 1e9 >= 10 ? Math.round(progress.done / 1e9) : (progress.done / 1e9).toFixed(1)) : 0, Math.round((progress?.total ?? 0) / 1e9)])}</strong></span><span className="muted">{progress && !progress.sameDrive ? timeLeft(progress.secondsLeft) : null}</span></div></div>+ <p className="small">{tr('Keep Strata open. You can keep using other apps. Your models cannot be loaded until the move is done.')}</p>+ {progress ? <details className="models-details"><summary>{tr('Details')}</summary><ul>+ <li>{tr('Now copying: {0}, file {1} of {2}', [modelName(progress.group, native) ?? progress.group, progress.index, progress.count])}</li>+ <li>{tr('From {0} to {1}', [savedPlan?.current ?? '', savedPlan?.folder ?? ''])}</li></ul></details> : null}+ </Dialog>++ <ResultDialog outcome={outcome?.job ?? null} plan={savedPlan} native={native} onClose={closeResult} onAgain={() => { closeResult(); void pick(); }}/>+ </>;+}++function ChooseBody({ plan, choice, setChoice, names, error }: { plan: Plan; choice: Choice; setChoice: (c: Choice) => void; names: (Plan['models'][number] & { label: string | null })[]; error: { message: string; details?: string } | null }) {+ const none = plan.models_bytes === 0;+ const short = !none && !plan.choices.move.possible;+ const lacking = Math.max(0, plan.needed_bytes - plan.free_bytes);+ const options: { id: Choice; title: string; text: string; need: string }[] = [+ { id: 'move', title: 'Move my models there', text: none ? 'You have no models to move.' : plan.same_drive ? 'Strata moves your {0} of models to the new folder. This is the same drive, so it takes a moment.' : 'Strata copies your {0} of models to the new folder, checks them, then removes the old copies.',+ need: none ? '' : plan.same_drive ? 'Needs no extra space.' : 'Needs {0} free in the new folder. You have {1}.' },+ { id: 'keep', title: 'Keep them where they are and also use the new folder', text: 'Nothing is copied. Your current models keep working, and new downloads go to the new folder.', need: short ? 'Needs no space now. New downloads must fit in {1}.' : 'Needs no space now.' },+ { id: 'empty', title: 'Start empty', text: 'Strata uses the new folder from now on and does not list your current models. Your old files are not deleted.', need: 'Needs no space now. Each model you download later needs its own space.' },+ ];+ const values = [gb(plan.models_bytes), gb(plan.free_bytes)];+ const running = plan.running > 0;+ return <>+ <div className="models-picked"><span className="small muted">{tr('New folder')}</span><code className="storage-directory__path">{plan.shown}</code><span className="small muted">{tr('{0} free on this drive', [gb(plan.free_bytes)])}</span></div>+ {short ? <div className="models-notice models-notice--warn" role="alert"><Icon name="warning" size={18}/><div><strong>{tr('Your models need {0}, this drive has {1} free.', [gb(plan.needed_bytes), gb(plan.free_bytes)])}</strong><br/>{tr('Free up about {0} there, pick another folder, or choose one of the other two options.', [gb(lacking)])}</div></div> : null}+ <fieldset className="models-choices" aria-label={tr('What should happen to your models')}>+ {options.map(o => { const possible = plan.choices[o.id].possible; return <label className="models-choice" key={o.id} data-disabled={!possible || undefined}>+ <input type="radio" name="models-folder-choice" checked={choice === o.id} disabled={!possible} onChange={() => setChoice(o.id)}/>+ <span><strong>{tr(o.title)}</strong>{o.id === 'move' && possible && !none ? <span className="models-choice__tag">{tr('Recommended')}</span> : null}<br/><span className="small">{tr(o.text, o.id === 'move' ? [gb(plan.models_bytes)] : undefined)}</span></span>+ {o.need ? <span className="models-choice__need">{tr(o.need, o.id === 'move' ? [gb(plan.needed_bytes), gb(plan.free_bytes)] : [values[0], values[1]])}</span> : null}+ </label>; })}+ </fieldset>+ {running ? <p className="small muted">{tr('A running model is stopped first; load it again when the move is done.')}</p> : null}+ {error ? <Failure message={error.message} details={error.details}/> : null}+ <details className="models-details"><summary>{tr('Details')}</summary><ul>+ {names.length ? <li>{tr('{0} would move.', [list(names.map(m => `${m.label}, ${gb(m.bytes)}`))])}</li> : null}+ {short ? <li>{tr('Free space is measured on the drive that holds {0}.', [plan.shown])}</li> : <>+ <li>{tr('Old folder: {0}', [plan.current])}</li>+ <li>{tr('Strata copies one file at a time and checks its size before it removes the old one.')}</li>+ <li>{tr('You can stop at any time; files already moved stay usable.')}</li></>}+ </ul></details>+ </>;+}++function ResultDialog({ outcome, plan, native, onClose, onAgain }: { outcome: NativeJob | null; plan: Plan | null; native: NativeState | null; onClose: () => void; onAgain: () => void }) {+ if (!outcome) return null;+ const result = (outcome.result ?? {}) as Outcome;+ const sized = (groups: string[]) => list(groups.map(g => { const m = plan?.models.find(x => x.group === g); const name = modelName(g, native); return name ? `${name} (${gb(m?.bytes ?? 0)})` : null; }).filter((x): x is string => !!x));+ if (outcome.state === 'error') {+ const full = result.code === 'disk_full';+ const where = driveOf(result.to ?? '');+ const some = (result.moved?.length ?? 0) > 0;+ return <Dialog open compact title={tr(full ? 'The drive ran out of space' : 'The move stopped')} onClose={onClose}+ actions={<><Btn onClick={onClose}>{tr('Close')}</Btn><Btn variant="primary" onClick={onAgain}>{tr('Choose another folder')}</Btn></>}>+ <div className="error-notice" role="alert"><Icon name="error" size={18}/><div>+ <strong>{full ? tr('{0} filled up after {1}, so the move stopped.', [where, gb(result.bytes ?? 0)]) : tr(outcome.error ?? 'The models could not be moved.')}</strong>+ <p>{full ? (some ? tr('Nothing was lost. Models already moved are in the new folder, the rest are still in {0}, and the half-copied file was removed. Free up space on {1} or choose another folder, then try again.', [result.from ?? '', where])+ : tr('Nothing was lost. All your models are still in {0}, and the half-copied file was removed. Free up space on {1} or choose another folder, then try again.', [result.from ?? '', where]))+ : tr('Nothing was lost. Your models that were not moved are still in {0}. Choose another folder to try again.', [result.from ?? ''])}</p>+ {outcome.details ? <details className="error-detail"><summary className="small">{tr('Details')}</summary><pre className="small muted">{outcome.details}</pre></details> : null}+ </div></div>+ </Dialog>;+ }+ if (result.stopped) {+ const moved = sized(result.moved ?? []), left = sized(result.remaining ?? []);+ return <Dialog open compact title={tr('Moving stopped')} onClose={onClose} actions={<Btn variant="primary" onClick={onClose}>{tr('Close')}</Btn>}>+ <div className="models-notice models-notice--info"><Icon name="info" size={18}/><div><strong>{tr('Nothing was lost.')}</strong><br/>+ {moved ? tr('{0} is in the new folder.', [moved]) + ' ' : ''}{left ? tr('{0} is still in the old folder.', [left]) + ' ' : ''}{moved && left ? tr('Both work.') : ''}</div></div>+ <p className="small muted">{tr('Models in both folders are listed as normal. You can finish moving later with Change folder.')}</p>+ </Dialog>;+ }+ return <Dialog open compact title={tr('Your models are moved')} onClose={onClose} actions={<Btn variant="primary" onClick={onClose}>{tr('Done')}</Btn>}>+ <div className="models-ok"><span className="models-ok__mark"><Icon name="check" size={20}/></span><div><strong>{tr('{0} now live in {1}', [gb(result.total ?? 0), plan?.shown ?? result.to ?? ''])}</strong>+ {result.sameDrive ? null : <><br/><span className="small muted">{tr('The old copies were removed and {0} is free again on {1}.', [gb(result.total ?? 0), driveOf(result.from ?? '')])}</span></>}</div></div>+ </Dialog>;+}diff --git a/apps/host/src/components/SettingsStorage.tsx b/apps/host/src/components/SettingsStorage.tsxindex ba0dab556..9fbf9344a 100644--- a/apps/host/src/components/SettingsStorage.tsx+++ b/apps/host/src/components/SettingsStorage.tsx@@ -6,6 +6,7 @@ import { pickerGroups, pickerVersionState } from '../lib/model-picker';import { sizeGb } from '../lib/format';import { useNative } from '../lib/native';import { NativeDeleteDialog } from './NativeDelete';+import { ModelsFolderCard } from './ModelsFolderDialog';import { nativeShortName } from '../lib/native-names';export function SettingsStorage() {const state = useStore(s => s);@@ -77,7 +78,9 @@ export function SettingsStorage() {setPending(false);}}+ const downloading = !!native?.jobs.some(j => j.state === 'running' && j.kind !== 'models-move') || !!library?.downloads.active || !!state.imageModels?.variants.some(v => v.state === 'downloading');return <>+ {native?.available && native.downloadDirectory ? <ModelsFolderCard blocked={downloading}/> : null}<section className="storage-directory" aria-labelledby="storage-directory-title"><div className="storage-directory__heading"><span><Icon name="folder" size={18}/><strong id="storage-directory-title">{tr("Model directory")}</strong></span><Btn size="sm" disabled={!currentDirectory || directoryPending || pending} onClick={() => { setDirectory(currentDirectory); setEditing(!editing); setDirectoryError(''); setNotice(''); }}>{tr(editing ? 'Cancel' : 'Change directory')}</Btn></div><p className="small muted">{tr("Your models are saved here. Use an existing folder to reuse supported downloads.")}</p>diff --git a/apps/host/src/components/ui.tsx b/apps/host/src/components/ui.tsxindex a319355fe..8a475f0e7 100644--- a/apps/host/src/components/ui.tsx+++ b/apps/host/src/components/ui.tsx@@ -384,7 +384,7 @@ export function Select<T extends string>({ value, valueSuffix, options, onChange</>);}/** One modal surface for confirmations and narrow-screen inspectors. */-export function Dialog({ open, title, onClose, children, actions, headerActions, compact = false, sheet = false, wide = false, hideTitle = false, className }: {+export function Dialog({ open, title, onClose, children, actions, headerActions, compact = false, sheet = false, wide = false, hideTitle = false, className, noClose = false }: {open: boolean;title: ReactNode;onClose: () => void;@@ -396,6 +396,8 @@ export function Dialog({ open, title, onClose, children, actions, headerActions,wide?: boolean;hideTitle?: boolean;className?: string;+ /** No close button: the person must use the dialog's own buttons (a move that is running). */+ noClose?: boolean;}) {const ref = useRef<HTMLElement>(null);const id = useId();@@ -418,7 +420,7 @@ export function Dialog({ open, title, onClose, children, actions, headerActions,return createPortal(<div className="dialog-layer"><div className="dialog-scrim" onClick={onClose} aria-hidden="true"/><section ref={ref} className={cx(`${sheet ? 'dialog-surface dialog-surface--sheet' : 'dialog-surface'}${wide ? ' dialog-surface--wide' : ''}${compact ? ' dialog-surface--compact' : ''}`, className)} role="dialog" aria-modal="true" aria-labelledby={id} tabIndex={-1}>- <header className="dialog-head"><h2 className={hideTitle ? 'sr-only' : 'h3'} id={id}>{tr(title)}</h2><div className="dialog-head__actions">{tr(headerActions)}<IconBtn name="x" title={typeof title === 'string' ? tr("Close {0}", [title]) : tr("Close")} onClick={onClose}/></div></header>+ <header className="dialog-head"><h2 className={hideTitle ? 'sr-only' : 'h3'} id={id}>{tr(title)}</h2><div className="dialog-head__actions">{tr(headerActions)}{noClose ? null : <IconBtn name="x" title={typeof title === 'string' ? tr("Close {0}", [title]) : tr("Close")} onClick={onClose}/>}</div></header><div className="dialog-body">{tr(children)}</div>{tr(actions ? <footer className="dialog-actions">{tr(actions)}</footer> : null)}</section>diff --git a/apps/host/src/lib/native.ts b/apps/host/src/lib/native.tsindex 0fb14b67a..cc8906235 100644--- a/apps/host/src/lib/native.ts+++ b/apps/host/src/lib/native.ts@@ -12,7 +12,7 @@ export interface NativeState {/** The picture reader (strata-vision) is installed with the engine, so models marked for pictures can read them here. *//** Strata Control's view of the engine for this computer (the app): usable false = none found or recognised; `notice` says why in plain words. */engine?:{usable:boolean;notice?:string|null;wrongMake?:boolean;version?:string|null};- visionReader?: boolean;available:boolean;repo:string;downloadDirectory?:string;version?:string|null;summary:string;error:string|null;catalog:{families:NativeFamily[];contexts:number[];recommendation:{family:string|null;model:string|null;context?:number;why?:string};context_note:string}|null;installed:{models:{model:string;config:string;model_name:string;ready:boolean;/** The picture-reading files are on this computer (notes-split-agent8.md, item 8). */visionPrepared?:boolean;context?:number;kv?:string;images?:string;visionEnabled?:boolean;visionDevice?:string;lowRamMode?:string;resourceProfile?:'work'|'performance';dataFolder?:string;diskGb?:number;diskBytes?:number;/** Files this model shares with another (the picture reader, the draft layer): counted once, in `usage`. */sharedBytes?:number;/** What Delete frees: files in Strata's own folders that no other model uses. */removableGb?:number;missing_files?:string[]}[];/** What all models take on disk, from their real files, shared files counted once. */usage?:{total_bytes:number;total_gb:number;shared_bytes:number;shared_gb:number;models:Record<string,{bytes:number;gb:number}>}|null;data_folder:string;engine:{version:string|null}}|null;hardware:{ram_gb:number;engine_vendor?:string;gpus:{index:number;name:string;vram_gb:number;usable:boolean;vendor?:string;uma?:boolean;integrated?:boolean;unified_gb?:number;problem?:string|null}[]}|null;fields:NativeField[];instances:NativeInstance[];defaultId:string|null;jobs:NativeJob[];capabilities:{responses?:boolean;updates:boolean;rollback:boolean;calibration:boolean;componentUpdates?:boolean}}+ visionReader?: boolean;available:boolean;repo:string;downloadDirectory?:string;/** Free bytes on the drive that holds the models folder. */downloadFreeBytes?:number|null;downloadTotalBytes?:number|null;version?:string|null;summary:string;error:string|null;catalog:{families:NativeFamily[];contexts:number[];recommendation:{family:string|null;model:string|null;context?:number;why?:string};context_note:string}|null;installed:{models:{model:string;config:string;model_name:string;ready:boolean;/** The picture-reading files are on this computer (notes-split-agent8.md, item 8). */visionPrepared?:boolean;context?:number;kv?:string;images?:string;visionEnabled?:boolean;visionDevice?:string;lowRamMode?:string;resourceProfile?:'work'|'performance';dataFolder?:string;diskGb?:number;diskBytes?:number;/** Files this model shares with another (the picture reader, the draft layer): counted once, in `usage`. */sharedBytes?:number;/** What Delete frees: files in Strata's own folders that no other model uses. */removableGb?:number;missing_files?:string[]}[];/** What all models take on disk, from their real files, shared files counted once. */usage?:{total_bytes:number;total_gb:number;shared_bytes:number;shared_gb:number;models:Record<string,{bytes:number;gb:number}>}|null;data_folder:string;engine:{version:string|null}}|null;hardware:{ram_gb:number;engine_vendor?:string;gpus:{index:number;name:string;vram_gb:number;usable:boolean;vendor?:string;uma?:boolean;integrated?:boolean;unified_gb?:number;problem?:string|null}[]}|null;fields:NativeField[];instances:NativeInstance[];defaultId:string|null;jobs:NativeJob[];capabilities:{responses?:boolean;updates:boolean;rollback:boolean;calibration:boolean;componentUpdates?:boolean}}let state:NativeState|null=null;const listeners=new Set<()=>void>();function put(value:NativeState){if(state&&JSON.stringify(state)===JSON.stringify(value))return;state=value;listeners.forEach(fn=>fn());}diff --git a/apps/host/src/locales/de.json b/apps/host/src/locales/de.jsonindex 0c775832d..7fead0238 100644--- a/apps/host/src/locales/de.json+++ b/apps/host/src/locales/de.json@@ -3346,5 +3346,83 @@"s8257": "alle {0} Min.","s8258": "Diese Strata-Engine hat keinen Code für die Grafikkarte, die sie verwenden wollte.","s8259": "Wähle unter „Ausführen auf“ eine andere Karte, oder öffne die Details: Dort steht, welche Karten gefunden wurden und wofür die Engine gebaut ist.",- "s8260": "Dieser Schalter bewirkt in der App nichts. Webseiten beliebiger Seiten können die unter „API-Server“ gezeigte API schon aufrufen. Um nur bestimmte Seiten zuzulassen oder den eigenen Server der Engine (Port 8080) zu nutzen, tragen Sie \"cors_origins\": [\"https://ihre.seite\"] in die Konfigurationsdatei des Modells ein."+ "s8260": "Dieser Schalter bewirkt in der App nichts. Webseiten beliebiger Seiten können die unter „API-Server“ gezeigte API schon aufrufen. Um nur bestimmte Seiten zuzulassen oder den eigenen Server der Engine (Port 8080) zu nutzen, tragen Sie \"cors_origins\": [\"https://ihre.seite\"] in die Konfigurationsdatei des Modells ein.",+ "s8261": "Modellordner",+ "s8262": "Strata speichert die großen Modelldateien hier.",+ "s8263": "Ordner ändern",+ "s8264": "Warte auf den Ordner …",+ "s8265": "Speicherplatz belegt",+ "s8266": "{0} frei",+ "s8267": "auf diesem Laufwerk",+ "s8268": "Ihre Modelle belegen {0}",+ "s8269": "Beenden oder stoppen Sie den Download, um den Ordner zu ändern.",+ "s8270": "Diesen Ordner gibt es nicht",+ "s8271": "Dieser Ordner kann nicht verwendet werden",+ "s8272": "Strata kann in {0} keine Dateien speichern.",+ "s8273": "Strata kann {0} nicht finden.",+ "s8274": "Wählen Sie einen Ordner außerhalb des aktuellen.",+ "s8275": "Wählen Sie einen Ordner, der Ihnen gehört, zum Beispiel in Dokumente oder auf einem anderen Laufwerk.",+ "s8276": "Prüfen Sie, ob das Laufwerk angeschlossen ist, und wählen Sie den Ordner erneut. Ihre Modelle wurden nicht verändert.",+ "s8277": "Diesen Ordner für Ihre Modelle verwenden?",+ "s8278": "Neuer Ordner",+ "s8279": "{0} frei auf diesem Laufwerk",+ "s8280": "Sie haben das ganze Laufwerk {0} gewählt. Strata legt seine Dateien in einem eigenen Ordner ab, Ihre Modelle liegen daher in {1}.",+ "s8281": "Danach folgen die drei Möglichkeiten wie in Schritt 2.",+ "s8282": "Meine Modelle verschieben",+ "s8283": "Beide Ordner verwenden",+ "s8284": "Leer beginnen",+ "s8285": "Ihre Modelle werden verschoben",+ "s8286": "Verschieben stoppen",+ "s8287": "{0} von {1} GB",+ "s8288": "Weniger als eine Minute übrig",+ "s8289": "Etwa eine Minute übrig",+ "s8290": "Etwa {0} Minuten übrig",+ "s8291": "Etwa {0} Stunden übrig",+ "s8292": "Lassen Sie Strata geöffnet. Andere Apps können Sie weiter benutzen. Ihre Modelle lassen sich erst laden, wenn das Verschieben fertig ist.",+ "s8293": "Kopiert gerade: {0}, Datei {1} von {2}",+ "s8294": "Von {0} nach {1}",+ "s8295": "Meine Modelle dorthin verschieben",+ "s8296": "Sie haben keine Modelle zum Verschieben.",+ "s8297": "Strata verschiebt Ihre {0} Modelle in den neuen Ordner. Es ist dasselbe Laufwerk, das geht also schnell.",+ "s8298": "Strata kopiert Ihre {0} Modelle in den neuen Ordner, prüft sie und entfernt dann die alten Kopien.",+ "s8299": "Braucht keinen zusätzlichen Platz.",+ "s8300": "Benötigt {0} freien Platz im neuen Ordner. Verfügbar: {1}.",+ "s8301": "Am bisherigen Ort lassen und zusätzlich den neuen Ordner verwenden",+ "s8302": "Es wird nichts kopiert. Ihre aktuellen Modelle funktionieren weiter, neue Downloads landen im neuen Ordner.",+ "s8303": "Braucht jetzt keinen Platz. Neue Downloads müssen in {1} passen.",+ "s8304": "Braucht jetzt keinen Platz.",+ "s8305": "Strata verwendet ab jetzt den neuen Ordner und zeigt Ihre aktuellen Modelle nicht mehr an. Ihre alten Dateien werden nicht gelöscht.",+ "s8306": "Braucht jetzt keinen Platz. Jedes später geladene Modell braucht eigenen Platz.",+ "s8307": "Ihre Modelle brauchen {0}, auf diesem Laufwerk sind {1} frei.",+ "s8308": "Geben Sie dort etwa {0} frei, wählen Sie einen anderen Ordner oder nehmen Sie eine der anderen beiden Möglichkeiten.",+ "s8309": "Was soll mit Ihren Modellen geschehen",+ "s8310": "Ein laufendes Modell wird zuerst gestoppt; laden Sie es nach dem Verschieben erneut.",+ "s8311": "{0} würden verschoben.",+ "s8312": "Der freie Platz wird auf dem Laufwerk gemessen, auf dem {0} liegt.",+ "s8313": "Alter Ordner: {0}",+ "s8314": "Strata kopiert eine Datei nach der anderen und prüft ihre Größe, bevor die alte entfernt wird.",+ "s8315": "Sie können jederzeit stoppen; bereits verschobene Dateien bleiben nutzbar.",+ "s8316": "Auf dem Laufwerk ist der Platz ausgegangen",+ "s8317": "Das Verschieben wurde gestoppt",+ "s8318": "{0} war nach {1} voll, deshalb wurde das Verschieben gestoppt.",+ "s8319": "Die Modelle konnten nicht verschoben werden.",+ "s8320": "Es ging nichts verloren. Bereits verschobene Modelle liegen im neuen Ordner, die übrigen noch in {0}, und die halb kopierte Datei wurde entfernt. Schaffen Sie Platz auf {1} oder wählen Sie einen anderen Ordner und versuchen Sie es erneut.",+ "s8321": "Es ging nichts verloren. Alle Ihre Modelle liegen noch in {0}, und die halb kopierte Datei wurde entfernt. Schaffen Sie Platz auf {1} oder wählen Sie einen anderen Ordner und versuchen Sie es erneut.",+ "s8322": "Es ging nichts verloren. Die nicht verschobenen Modelle liegen noch in {0}. Wählen Sie einen anderen Ordner, um es erneut zu versuchen.",+ "s8323": "Verschieben gestoppt",+ "s8324": "Es ging nichts verloren.",+ "s8325": "{0} liegt im neuen Ordner.",+ "s8326": "{0} liegt noch im alten Ordner.",+ "s8327": "Beide funktionieren.",+ "s8328": "Modelle in beiden Ordnern werden wie gewohnt angezeigt. Das Verschieben können Sie später mit „Ordner ändern“ beenden.",+ "s8329": "Ihre Modelle wurden verschoben",+ "s8330": "{0} liegen jetzt in {1}",+ "s8331": "Die alten Kopien wurden entfernt, auf {1} sind wieder {0} frei.",+ "s8332": "Strata verwendet jetzt auch {0}. Neue Downloads landen dort, Ihre aktuellen Modelle bleiben, wo sie sind.",+ "s8333": "Strata verwendet jetzt {0}. Ihre alten Modelldateien liegen noch in {1}; Strata löscht sie nicht.",+ "s8334": "Das Ändern des Modellordners ist Teil der Strata-App.",+ "s8335": "Ein Modell läuft. Stoppen Sie es zuerst und ändern Sie dann den Ordner.",+ "s8336": "Wählen Sie einen Modellordner.",+ "s8337": "Wählen Sie, was mit Ihren Modellen geschehen soll.",+ "s8338": "Diese Möglichkeit gibt es hier nicht."}diff --git a/apps/host/src/locales/en.json b/apps/host/src/locales/en.jsonindex a11ad97a1..0f6eb0a63 100644--- a/apps/host/src/locales/en.json+++ b/apps/host/src/locales/en.json@@ -3346,5 +3346,83 @@"s8257": "every {0} min","s8258": "This Strata engine has no code for the graphics card it tried to use.","s8259": "Pick another card under Run on, or open Details to see which cards were found and what the engine is built for.",- "s8260": "This switch does nothing in the app. Web pages from any site can already call the API shown under Serving. To allow only some sites, or to use the engine’s own server (port 8080), add \"cors_origins\": [\"https://your.site\"] to the model’s config file."+ "s8260": "This switch does nothing in the app. Web pages from any site can already call the API shown under Serving. To allow only some sites, or to use the engine’s own server (port 8080), add \"cors_origins\": [\"https://your.site\"] to the model’s config file.",+ "s8261": "Models folder",+ "s8262": "Strata saves the big model files here.",+ "s8263": "Change folder",+ "s8264": "Waiting for the folder…",+ "s8265": "Disk use",+ "s8266": "{0} free",+ "s8267": "on this drive",+ "s8268": "Your models use {0}",+ "s8269": "Finish or stop the download to change the folder.",+ "s8270": "That folder isn't there",+ "s8271": "That folder can't be used",+ "s8272": "Strata can't save files in {0}.",+ "s8273": "Strata can't find {0}.",+ "s8274": "Pick a folder outside the current one.",+ "s8275": "Choose a folder you own, for example one in Documents or on another drive.",+ "s8276": "Check that the drive is plugged in, then pick the folder again. Your models were not touched.",+ "s8277": "Use this folder for your models?",+ "s8278": "New folder",+ "s8279": "{0} free on this drive",+ "s8280": "You picked the whole drive {0}. Strata keeps its files in a folder of their own, so your models go in {1}.",+ "s8281": "The three choices follow, as in step 2.",+ "s8282": "Move my models",+ "s8283": "Use both folders",+ "s8284": "Start empty",+ "s8285": "Moving your models",+ "s8286": "Stop moving",+ "s8287": "{0} of {1} GB",+ "s8288": "Less than a minute left",+ "s8289": "About a minute left",+ "s8290": "About {0} minutes left",+ "s8291": "About {0} hours left",+ "s8292": "Keep Strata open. You can keep using other apps. Your models cannot be loaded until the move is done.",+ "s8293": "Now copying: {0}, file {1} of {2}",+ "s8294": "From {0} to {1}",+ "s8295": "Move my models there",+ "s8296": "You have no models to move.",+ "s8297": "Strata moves your {0} of models to the new folder. This is the same drive, so it takes a moment.",+ "s8298": "Strata copies your {0} of models to the new folder, checks them, then removes the old copies.",+ "s8299": "Needs no extra space.",+ "s8300": "Needs {0} free in the new folder. You have {1}.",+ "s8301": "Keep them where they are and also use the new folder",+ "s8302": "Nothing is copied. Your current models keep working, and new downloads go to the new folder.",+ "s8303": "Needs no space now. New downloads must fit in {1}.",+ "s8304": "Needs no space now.",+ "s8305": "Strata uses the new folder from now on and does not list your current models. Your old files are not deleted.",+ "s8306": "Needs no space now. Each model you download later needs its own space.",+ "s8307": "Your models need {0}, this drive has {1} free.",+ "s8308": "Free up about {0} there, pick another folder, or choose one of the other two options.",+ "s8309": "What should happen to your models",+ "s8310": "A running model is stopped first; load it again when the move is done.",+ "s8311": "{0} would move.",+ "s8312": "Free space is measured on the drive that holds {0}.",+ "s8313": "Old folder: {0}",+ "s8314": "Strata copies one file at a time and checks its size before it removes the old one.",+ "s8315": "You can stop at any time; files already moved stay usable.",+ "s8316": "The drive ran out of space",+ "s8317": "The move stopped",+ "s8318": "{0} filled up after {1}, so the move stopped.",+ "s8319": "The models could not be moved.",+ "s8320": "Nothing was lost. Models already moved are in the new folder, the rest are still in {0}, and the half-copied file was removed. Free up space on {1} or choose another folder, then try again.",+ "s8321": "Nothing was lost. All your models are still in {0}, and the half-copied file was removed. Free up space on {1} or choose another folder, then try again.",+ "s8322": "Nothing was lost. Your models that were not moved are still in {0}. Choose another folder to try again.",+ "s8323": "Moving stopped",+ "s8324": "Nothing was lost.",+ "s8325": "{0} is in the new folder.",+ "s8326": "{0} is still in the old folder.",+ "s8327": "Both work.",+ "s8328": "Models in both folders are listed as normal. You can finish moving later with Change folder.",+ "s8329": "Your models are moved",+ "s8330": "{0} now live in {1}",+ "s8331": "The old copies were removed and {0} is free again on {1}.",+ "s8332": "Strata now also uses {0}. New downloads go there, and your current models stay where they are.",+ "s8333": "Strata now uses {0}. Your old model files are still in {1}; Strata does not delete them.",+ "s8334": "Changing the models folder is part of the Strata app.",+ "s8335": "A model is running. Stop it first, then change the folder.",+ "s8336": "Choose a models folder.",+ "s8337": "Choose what to do with your models.",+ "s8338": "That choice is not possible here."}diff --git a/apps/host/src/locales/es.json b/apps/host/src/locales/es.jsonindex e6723f68a..a0f3f33d1 100644--- a/apps/host/src/locales/es.json+++ b/apps/host/src/locales/es.json@@ -3346,5 +3346,83 @@"s8257": "cada {0} min","s8258": "Este motor de Strata no tiene código para la tarjeta gráfica que intentó usar.","s8259": "Elige otra tarjeta en «Ejecutar en», o abre los detalles para ver qué tarjetas se encontraron y para cuáles está compilado el motor.",- "s8260": "Este interruptor no hace nada en la app. Las páginas web de cualquier sitio ya pueden llamar a la API que se muestra en Servicio. Para permitir solo algunos sitios, o para usar el servidor propio del motor (puerto 8080), añada \"cors_origins\": [\"https://su.sitio\"] al archivo de configuración del modelo."+ "s8260": "Este interruptor no hace nada en la app. Las páginas web de cualquier sitio ya pueden llamar a la API que se muestra en Servicio. Para permitir solo algunos sitios, o para usar el servidor propio del motor (puerto 8080), añada \"cors_origins\": [\"https://su.sitio\"] al archivo de configuración del modelo.",+ "s8261": "Carpeta de modelos",+ "s8262": "Strata guarda aquí los archivos grandes de los modelos.",+ "s8263": "Cambiar carpeta",+ "s8264": "Esperando la carpeta…",+ "s8265": "Uso del disco",+ "s8266": "{0} libres",+ "s8267": "en esta unidad",+ "s8268": "Tus modelos ocupan {0}",+ "s8269": "Termina o detén la descarga para cambiar la carpeta.",+ "s8270": "Esa carpeta no existe",+ "s8271": "No se puede usar esa carpeta",+ "s8272": "Strata no puede guardar archivos en {0}.",+ "s8273": "Strata no encuentra {0}.",+ "s8274": "Elige una carpeta fuera de la actual.",+ "s8275": "Elige una carpeta tuya, por ejemplo una en Documentos o en otra unidad.",+ "s8276": "Comprueba que la unidad esté conectada y vuelve a elegir la carpeta. Tus modelos no se han tocado.",+ "s8277": "¿Usar esta carpeta para tus modelos?",+ "s8278": "Carpeta nueva",+ "s8279": "{0} libres en esta unidad",+ "s8280": "Has elegido toda la unidad {0}. Strata guarda sus archivos en una carpeta propia, así que tus modelos irán en {1}.",+ "s8281": "A continuación vienen las tres opciones, como en el paso 2.",+ "s8282": "Mover mis modelos",+ "s8283": "Usar ambas carpetas",+ "s8284": "Empezar vacío",+ "s8285": "Moviendo tus modelos",+ "s8286": "Detener el traslado",+ "s8287": "{0} de {1} GB",+ "s8288": "Queda menos de un minuto",+ "s8289": "Queda aproximadamente un minuto",+ "s8290": "Quedan aproximadamente {0} minutos",+ "s8291": "Quedan aproximadamente {0} horas",+ "s8292": "Mantén Strata abierto. Puedes seguir usando otras aplicaciones. Tus modelos no se podrán cargar hasta que termine el traslado.",+ "s8293": "Copiando ahora: {0}, archivo {1} de {2}",+ "s8294": "De {0} a {1}",+ "s8295": "Mover mis modelos allí",+ "s8296": "No tienes modelos que mover.",+ "s8297": "Strata mueve tus {0} de modelos a la carpeta nueva. Es la misma unidad, así que tarda un instante.",+ "s8298": "Strata copia tus {0} de modelos a la carpeta nueva, los comprueba y después elimina las copias antiguas.",+ "s8299": "No necesita espacio adicional.",+ "s8300": "Necesita {0} libres en la carpeta nueva. Tienes {1}.",+ "s8301": "Dejarlos donde están y usar también la carpeta nueva",+ "s8302": "No se copia nada. Tus modelos actuales siguen funcionando y las descargas nuevas van a la carpeta nueva.",+ "s8303": "No necesita espacio ahora. Las descargas nuevas deben caber en {1}.",+ "s8304": "No necesita espacio ahora.",+ "s8305": "Strata usará la carpeta nueva a partir de ahora y no mostrará tus modelos actuales. Tus archivos antiguos no se borran.",+ "s8306": "No necesita espacio ahora. Cada modelo que descargues después necesitará su propio espacio.",+ "s8307": "Tus modelos necesitan {0} y esta unidad tiene {1} libres.",+ "s8308": "Libera unos {0} allí, elige otra carpeta o escoge una de las otras dos opciones.",+ "s8309": "Qué debe pasar con tus modelos",+ "s8310": "Un modelo en ejecución se detiene antes; cárgalo de nuevo cuando termine el traslado.",+ "s8311": "Se moverían {0}.",+ "s8312": "El espacio libre se mide en la unidad que contiene {0}.",+ "s8313": "Carpeta anterior: {0}",+ "s8314": "Strata copia un archivo cada vez y comprueba su tamaño antes de eliminar el antiguo.",+ "s8315": "Puedes detenerlo en cualquier momento; los archivos ya movidos siguen siendo utilizables.",+ "s8316": "La unidad se quedó sin espacio",+ "s8317": "El traslado se detuvo",+ "s8318": "{0} se llenó tras {1}, así que el traslado se detuvo.",+ "s8319": "No se pudieron mover los modelos.",+ "s8320": "No se perdió nada. Los modelos ya movidos están en la carpeta nueva, el resto sigue en {0} y se eliminó el archivo copiado a medias. Libera espacio en {1} o elige otra carpeta y vuelve a intentarlo.",+ "s8321": "No se perdió nada. Todos tus modelos siguen en {0} y se eliminó el archivo copiado a medias. Libera espacio en {1} o elige otra carpeta y vuelve a intentarlo.",+ "s8322": "No se perdió nada. Los modelos que no se movieron siguen en {0}. Elige otra carpeta para volver a intentarlo.",+ "s8323": "Traslado detenido",+ "s8324": "No se perdió nada.",+ "s8325": "{0} está en la carpeta nueva.",+ "s8326": "{0} sigue en la carpeta anterior.",+ "s8327": "Ambos funcionan.",+ "s8328": "Los modelos de ambas carpetas aparecen como siempre. Puedes terminar el traslado más tarde con «Cambiar carpeta».",+ "s8329": "Tus modelos se han movido",+ "s8330": "{0} están ahora en {1}",+ "s8331": "Se eliminaron las copias antiguas y vuelven a estar libres {0} en {1}.",+ "s8332": "Strata ahora también usa {0}. Las descargas nuevas van allí y tus modelos actuales se quedan donde están.",+ "s8333": "Strata ahora usa {0}. Tus archivos de modelos antiguos siguen en {1}; Strata no los borra.",+ "s8334": "Cambiar la carpeta de modelos forma parte de la aplicación Strata.",+ "s8335": "Hay un modelo en ejecución. Deténlo primero y después cambia la carpeta.",+ "s8336": "Elige una carpeta de modelos.",+ "s8337": "Elige qué hacer con tus modelos.",+ "s8338": "Esa opción no es posible aquí."}diff --git a/apps/host/src/locales/ja.json b/apps/host/src/locales/ja.jsonindex 8f5275942..3d3d0929a 100644--- a/apps/host/src/locales/ja.json+++ b/apps/host/src/locales/ja.json@@ -3346,5 +3346,83 @@"s8257": "{0}分ごと","s8258": "この Strata エンジンには、使おうとしたグラフィックスカード用のコードが含まれていません。","s8259": "「実行先」で別のカードを選ぶか、「詳細」を開いて、見つかったカードとエンジンの対応状況を確認してください。",- "s8260": "このスイッチはアプリでは何もしません。どのサイトのWebページも、「配信」に表示されるAPIをすでに呼び出せます。一部のサイトだけを許可したい場合や、エンジン自身のサーバー(ポート8080)を使う場合は、モデルの設定ファイルに \"cors_origins\": [\"https://your.site\"] を追加してください。"+ "s8260": "このスイッチはアプリでは何もしません。どのサイトのWebページも、「配信」に表示されるAPIをすでに呼び出せます。一部のサイトだけを許可したい場合や、エンジン自身のサーバー(ポート8080)を使う場合は、モデルの設定ファイルに \"cors_origins\": [\"https://your.site\"] を追加してください。",+ "s8261": "モデルフォルダ",+ "s8262": "Strata は大きなモデルファイルをここに保存します。",+ "s8263": "フォルダを変更",+ "s8264": "フォルダを待っています…",+ "s8265": "ディスクの使用量",+ "s8266": "空き {0}",+ "s8267": "(このドライブ)",+ "s8268": "モデルの使用量: {0}",+ "s8269": "フォルダを変更するには、ダウンロードを完了するか停止してください。",+ "s8270": "そのフォルダは見つかりません",+ "s8271": "そのフォルダは使えません",+ "s8272": "Strata は {0} にファイルを保存できません。",+ "s8273": "Strata は {0} を見つけられません。",+ "s8274": "現在のフォルダの外にあるフォルダを選んでください。",+ "s8275": "ご自分のフォルダ(ドキュメント内や別のドライブ上など)を選んでください。",+ "s8276": "ドライブが接続されているか確認してから、もう一度フォルダを選んでください。モデルには手を加えていません。",+ "s8277": "このフォルダをモデル用に使いますか?",+ "s8278": "新しいフォルダ",+ "s8279": "このドライブの空き: {0}",+ "s8280": "ドライブ全体 {0} を選びました。Strata は専用のフォルダにファイルを置くため、モデルは {1} に保存されます。",+ "s8281": "次に、手順 2 と同じ 3 つの選択肢が表示されます。",+ "s8282": "モデルを移動する",+ "s8283": "両方のフォルダを使う",+ "s8284": "空の状態で始める",+ "s8285": "モデルを移動しています",+ "s8286": "移動を停止",+ "s8287": "{0} / {1} GB",+ "s8288": "残り 1 分未満",+ "s8289": "残り約 1 分",+ "s8290": "残り約 {0} 分",+ "s8291": "残り約 {0} 時間",+ "s8292": "Strata を開いたままにしてください。ほかのアプリは使い続けられます。移動が終わるまでモデルは読み込めません。",+ "s8293": "コピー中: {0}、ファイル {1} / {2}",+ "s8294": "{0} から {1} へ",+ "s8295": "モデルをそこへ移動する",+ "s8296": "移動するモデルがありません。",+ "s8297": "Strata はモデル {0} を新しいフォルダへ移動します。同じドライブなので、すぐに終わります。",+ "s8298": "Strata はモデル {0} を新しいフォルダへコピーし、確認してから古いコピーを削除します。",+ "s8299": "追加の空き容量は不要です。",+ "s8300": "新しいフォルダに {0} の空きが必要です。現在の空き: {1}。",+ "s8301": "今の場所に残し、新しいフォルダも使う",+ "s8302": "コピーは行いません。今あるモデルはそのまま使え、新しいダウンロードは新しいフォルダに保存されます。",+ "s8303": "今は空き容量は不要です。新しいダウンロードは {1} に収まる必要があります。",+ "s8304": "今は空き容量は不要です。",+ "s8305": "今後は新しいフォルダを使い、今のモデルは一覧に表示しません。古いファイルは削除されません。",+ "s8306": "今は空き容量は不要です。あとでダウンロードするモデルごとに、その分の空きが必要です。",+ "s8307": "モデルには {0} が必要ですが、このドライブの空きは {1} です。",+ "s8308": "そこで約 {0} を空けるか、別のフォルダを選ぶか、ほかの 2 つの選択肢のどちらかを選んでください。",+ "s8309": "モデルをどう扱うか",+ "s8310": "実行中のモデルは先に停止されます。移動が終わったらもう一度読み込んでください。",+ "s8311": "移動対象: {0}。",+ "s8312": "空き容量は {0} があるドライブで測定しています。",+ "s8313": "元のフォルダ: {0}",+ "s8314": "Strata は 1 ファイルずつコピーし、サイズを確認してから古いファイルを削除します。",+ "s8315": "いつでも停止できます。移動済みのファイルはそのまま使えます。",+ "s8316": "ドライブの空き容量が足りなくなりました",+ "s8317": "移動が停止しました",+ "s8318": "{1} を移動したところで {0} がいっぱいになったため、移動を停止しました。",+ "s8319": "モデルを移動できませんでした。",+ "s8320": "失われたものはありません。移動済みのモデルは新しいフォルダにあり、残りは {0} にあります。途中までコピーされたファイルは削除しました。{1} の空きを増やすか別のフォルダを選んで、もう一度お試しください。",+ "s8321": "失われたものはありません。モデルはすべて {0} に残っており、途中までコピーされたファイルは削除しました。{1} の空きを増やすか別のフォルダを選んで、もう一度お試しください。",+ "s8322": "失われたものはありません。移動されなかったモデルは {0} に残っています。別のフォルダを選んで、もう一度お試しください。",+ "s8323": "移動を停止しました",+ "s8324": "失われたものはありません。",+ "s8325": "{0} は新しいフォルダにあります。",+ "s8326": "{0} は元のフォルダに残っています。",+ "s8327": "どちらも使えます。",+ "s8328": "どちらのフォルダのモデルも通常どおり一覧に表示されます。移動の続きは、あとで「フォルダを変更」から行えます。",+ "s8329": "モデルを移動しました",+ "s8330": "{0} が {1} に移動しました",+ "s8331": "古いコピーを削除し、{1} の空きが {0} 増えました。",+ "s8332": "Strata は {0} も使うようになりました。新しいダウンロードはそこに保存され、今のモデルはそのままの場所に残ります。",+ "s8333": "Strata は {0} を使うようになりました。古いモデルファイルは {1} に残っており、Strata が削除することはありません。",+ "s8334": "モデルフォルダの変更は Strata アプリの機能です。",+ "s8335": "モデルが実行中です。先に停止してから、フォルダを変更してください。",+ "s8336": "モデルフォルダを選んでください。",+ "s8337": "モデルをどうするか選んでください。",+ "s8338": "この選択肢はここでは使えません。"}diff --git a/apps/host/src/locales/ko.json b/apps/host/src/locales/ko.jsonindex 45f2b16ef..498dfb342 100644--- a/apps/host/src/locales/ko.json+++ b/apps/host/src/locales/ko.json@@ -3346,5 +3346,83 @@"s8257": "{0}분마다","s8258": "이 Strata 엔진에는 사용하려던 그래픽 카드용 코드가 없습니다.","s8259": "“실행 장치”에서 다른 카드를 고르거나, “세부 정보”에서 찾은 카드와 엔진이 지원하는 카드를 확인하세요.",- "s8260": "이 스위치는 앱에서는 아무 일도 하지 않습니다. 어느 사이트의 웹 페이지든 ‘API 서비스’에 표시된 API를 이미 호출할 수 있습니다. 일부 사이트만 허용하거나 엔진의 자체 서버(포트 8080)를 쓰려면 모델의 설정 파일에 \"cors_origins\": [\"https://your.site\"] 를 추가하세요."+ "s8260": "이 스위치는 앱에서는 아무 일도 하지 않습니다. 어느 사이트의 웹 페이지든 ‘API 서비스’에 표시된 API를 이미 호출할 수 있습니다. 일부 사이트만 허용하거나 엔진의 자체 서버(포트 8080)를 쓰려면 모델의 설정 파일에 \"cors_origins\": [\"https://your.site\"] 를 추가하세요.",+ "s8261": "모델 폴더",+ "s8262": "Strata는 큰 모델 파일을 여기에 저장합니다.",+ "s8263": "폴더 변경",+ "s8264": "폴더를 기다리는 중…",+ "s8265": "디스크 사용량",+ "s8266": "{0} 여유",+ "s8267": "(이 드라이브)",+ "s8268": "모델이 차지하는 공간: {0}",+ "s8269": "폴더를 바꾸려면 다운로드를 끝내거나 중지하세요.",+ "s8270": "해당 폴더가 없습니다",+ "s8271": "해당 폴더는 사용할 수 없습니다",+ "s8272": "Strata가 {0}에 파일을 저장할 수 없습니다.",+ "s8273": "Strata가 {0}을(를) 찾을 수 없습니다.",+ "s8274": "현재 폴더 밖에 있는 폴더를 선택하세요.",+ "s8275": "내 소유의 폴더(예: 문서 폴더나 다른 드라이브)를 선택하세요.",+ "s8276": "드라이브가 연결되어 있는지 확인한 뒤 폴더를 다시 선택하세요. 모델은 그대로입니다.",+ "s8277": "이 폴더를 모델용으로 사용할까요?",+ "s8278": "새 폴더",+ "s8279": "이 드라이브의 여유 공간: {0}",+ "s8280": "드라이브 전체 {0}을(를) 선택했습니다. Strata는 자체 폴더에 파일을 보관하므로 모델은 {1}에 저장됩니다.",+ "s8281": "다음으로 2단계와 같은 세 가지 선택지가 나옵니다.",+ "s8282": "내 모델 이동",+ "s8283": "두 폴더 모두 사용",+ "s8284": "빈 상태로 시작",+ "s8285": "모델을 이동하는 중",+ "s8286": "이동 중지",+ "s8287": "{0} / {1} GB",+ "s8288": "1분 미만 남음",+ "s8289": "약 1분 남음",+ "s8290": "약 {0}분 남음",+ "s8291": "약 {0}시간 남음",+ "s8292": "Strata를 열어 두세요. 다른 앱은 계속 사용할 수 있습니다. 이동이 끝날 때까지 모델을 불러올 수 없습니다.",+ "s8293": "복사 중: {0}, 파일 {1}/{2}",+ "s8294": "{0}에서 {1}(으)로",+ "s8295": "내 모델을 그쪽으로 이동",+ "s8296": "이동할 모델이 없습니다.",+ "s8297": "Strata가 모델 {0}을(를) 새 폴더로 옮깁니다. 같은 드라이브라 금방 끝납니다.",+ "s8298": "Strata가 모델 {0}을(를) 새 폴더로 복사하고 확인한 뒤 기존 사본을 삭제합니다.",+ "s8299": "추가 공간이 필요 없습니다.",+ "s8300": "새 폴더에 {0}의 여유 공간이 필요합니다. 현재 {1}.",+ "s8301": "지금 위치에 두고 새 폴더도 함께 사용",+ "s8302": "아무것도 복사하지 않습니다. 현재 모델은 그대로 동작하고, 새로 받는 모델은 새 폴더에 저장됩니다.",+ "s8303": "지금은 공간이 필요 없습니다. 새 다운로드는 {1} 안에 들어가야 합니다.",+ "s8304": "지금은 공간이 필요 없습니다.",+ "s8305": "앞으로 새 폴더를 사용하며 현재 모델은 목록에 표시하지 않습니다. 기존 파일은 삭제되지 않습니다.",+ "s8306": "지금은 공간이 필요 없습니다. 나중에 받는 모델마다 각자의 공간이 필요합니다.",+ "s8307": "모델에 {0}이(가) 필요한데 이 드라이브의 여유 공간은 {1}입니다.",+ "s8308": "그곳에서 약 {0}을(를) 비우거나, 다른 폴더를 선택하거나, 나머지 두 가지 중 하나를 고르세요.",+ "s8309": "모델을 어떻게 할까요",+ "s8310": "실행 중인 모델은 먼저 중지됩니다. 이동이 끝나면 다시 불러오세요.",+ "s8311": "{0}이(가) 이동됩니다.",+ "s8312": "여유 공간은 {0}이(가) 있는 드라이브를 기준으로 측정합니다.",+ "s8313": "기존 폴더: {0}",+ "s8314": "Strata는 파일을 하나씩 복사하고, 크기를 확인한 뒤에 기존 파일을 삭제합니다.",+ "s8315": "언제든 중지할 수 있으며, 이미 이동한 파일은 계속 사용할 수 있습니다.",+ "s8316": "드라이브의 공간이 부족합니다",+ "s8317": "이동이 중지되었습니다",+ "s8318": "{1}을(를) 옮긴 뒤 {0}이(가) 가득 차서 이동을 중지했습니다.",+ "s8319": "모델을 이동하지 못했습니다.",+ "s8320": "잃어버린 것은 없습니다. 이미 이동한 모델은 새 폴더에 있고 나머지는 {0}에 그대로 있으며, 반쯤 복사된 파일은 삭제했습니다. {1}의 공간을 확보하거나 다른 폴더를 선택한 뒤 다시 시도하세요.",+ "s8321": "잃어버린 것은 없습니다. 모든 모델이 {0}에 그대로 있으며, 반쯤 복사된 파일은 삭제했습니다. {1}의 공간을 확보하거나 다른 폴더를 선택한 뒤 다시 시도하세요.",+ "s8322": "잃어버린 것은 없습니다. 이동하지 못한 모델은 {0}에 그대로 있습니다. 다른 폴더를 선택해 다시 시도하세요.",+ "s8323": "이동 중지됨",+ "s8324": "잃어버린 것은 없습니다.",+ "s8325": "{0}은(는) 새 폴더에 있습니다.",+ "s8326": "{0}은(는) 아직 기존 폴더에 있습니다.",+ "s8327": "둘 다 사용할 수 있습니다.",+ "s8328": "두 폴더의 모델 모두 평소처럼 목록에 표시됩니다. 나머지 이동은 나중에 '폴더 변경'으로 마칠 수 있습니다.",+ "s8329": "모델 이동이 끝났습니다",+ "s8330": "{0}이(가) 이제 {1}에 있습니다",+ "s8331": "기존 사본을 삭제했으며 {1}에서 {0}이(가) 다시 확보되었습니다.",+ "s8332": "이제 Strata가 {0}도 사용합니다. 새 다운로드는 그곳에 저장되고 현재 모델은 그대로 있습니다.",+ "s8333": "이제 Strata가 {0}을(를) 사용합니다. 기존 모델 파일은 {1}에 그대로 있으며 Strata가 삭제하지 않습니다.",+ "s8334": "모델 폴더 변경은 Strata 앱의 기능입니다.",+ "s8335": "모델이 실행 중입니다. 먼저 중지한 뒤 폴더를 변경하세요.",+ "s8336": "모델 폴더를 선택하세요.",+ "s8337": "모델을 어떻게 할지 선택하세요.",+ "s8338": "여기서는 해당 선택지를 사용할 수 없습니다."}diff --git a/apps/host/src/locales/pt.json b/apps/host/src/locales/pt.jsonindex 3c4acce62..678d549f1 100644--- a/apps/host/src/locales/pt.json+++ b/apps/host/src/locales/pt.json@@ -3346,5 +3346,83 @@"s8257": "a cada {0} min","s8258": "Este motor do Strata não tem código para a placa de vídeo que tentou usar.","s8259": "Escolha outra placa em «Executar em» ou abra os detalhes para ver quais placas foram encontradas e para quais o motor foi compilado.",- "s8260": "Este botão não faz nada no app. Páginas web de qualquer site já podem chamar a API mostrada em API. Para permitir só alguns sites, ou para usar o servidor próprio do motor (porta 8080), adicione \"cors_origins\": [\"https://seu.site\"] ao arquivo de configuração do modelo."+ "s8260": "Este botão não faz nada no app. Páginas web de qualquer site já podem chamar a API mostrada em API. Para permitir só alguns sites, ou para usar o servidor próprio do motor (porta 8080), adicione \"cors_origins\": [\"https://seu.site\"] ao arquivo de configuração do modelo.",+ "s8261": "Pasta de modelos",+ "s8262": "O Strata guarda aqui os arquivos grandes dos modelos.",+ "s8263": "Alterar pasta",+ "s8264": "Aguardando a pasta…",+ "s8265": "Uso do disco",+ "s8266": "{0} livres",+ "s8267": "nesta unidade",+ "s8268": "Seus modelos ocupam {0}",+ "s8269": "Conclua ou pare o download para alterar a pasta.",+ "s8270": "Essa pasta não existe",+ "s8271": "Não é possível usar essa pasta",+ "s8272": "O Strata não consegue salvar arquivos em {0}.",+ "s8273": "O Strata não encontra {0}.",+ "s8274": "Escolha uma pasta fora da atual.",+ "s8275": "Escolha uma pasta sua, por exemplo em Documentos ou em outra unidade.",+ "s8276": "Verifique se a unidade está conectada e escolha a pasta de novo. Seus modelos não foram alterados.",+ "s8277": "Usar esta pasta para seus modelos?",+ "s8278": "Pasta nova",+ "s8279": "{0} livres nesta unidade",+ "s8280": "Você escolheu a unidade inteira {0}. O Strata guarda seus arquivos em uma pasta própria, então seus modelos ficam em {1}.",+ "s8281": "Em seguida vêm as três opções, como na etapa 2.",+ "s8282": "Mover meus modelos",+ "s8283": "Usar as duas pastas",+ "s8284": "Começar vazio",+ "s8285": "Movendo seus modelos",+ "s8286": "Parar a movimentação",+ "s8287": "{0} de {1} GB",+ "s8288": "Menos de um minuto restante",+ "s8289": "Cerca de um minuto restante",+ "s8290": "Cerca de {0} minutos restantes",+ "s8291": "Cerca de {0} horas restantes",+ "s8292": "Mantenha o Strata aberto. Você pode continuar usando outros aplicativos. Seus modelos só poderão ser carregados quando a movimentação terminar.",+ "s8293": "Copiando agora: {0}, arquivo {1} de {2}",+ "s8294": "De {0} para {1}",+ "s8295": "Mover meus modelos para lá",+ "s8296": "Você não tem modelos para mover.",+ "s8297": "O Strata move seus {0} de modelos para a pasta nova. É a mesma unidade, então leva só um instante.",+ "s8298": "O Strata copia seus {0} de modelos para a pasta nova, confere os arquivos e depois remove as cópias antigas.",+ "s8299": "Não precisa de espaço extra.",+ "s8300": "Precisa de {0} livres na pasta nova. Você tem {1}.",+ "s8301": "Mantê-los onde estão e usar também a pasta nova",+ "s8302": "Nada é copiado. Seus modelos atuais continuam funcionando e os novos downloads vão para a pasta nova.",+ "s8303": "Não precisa de espaço agora. Os novos downloads precisam caber em {1}.",+ "s8304": "Não precisa de espaço agora.",+ "s8305": "O Strata passa a usar a pasta nova e não lista seus modelos atuais. Seus arquivos antigos não são apagados.",+ "s8306": "Não precisa de espaço agora. Cada modelo baixado depois precisa do próprio espaço.",+ "s8307": "Seus modelos precisam de {0}, e esta unidade tem {1} livres.",+ "s8308": "Libere cerca de {0} lá, escolha outra pasta ou use uma das outras duas opções.",+ "s8309": "O que deve acontecer com seus modelos",+ "s8310": "Um modelo em execução é parado antes; carregue-o de novo quando a movimentação terminar.",+ "s8311": "{0} seriam movidos.",+ "s8312": "O espaço livre é medido na unidade que contém {0}.",+ "s8313": "Pasta antiga: {0}",+ "s8314": "O Strata copia um arquivo por vez e confere o tamanho antes de remover o antigo.",+ "s8315": "Você pode parar a qualquer momento; os arquivos já movidos continuam utilizáveis.",+ "s8316": "A unidade ficou sem espaço",+ "s8317": "A movimentação parou",+ "s8318": "{0} ficou cheia após {1}, então a movimentação parou.",+ "s8319": "Não foi possível mover os modelos.",+ "s8320": "Nada foi perdido. Os modelos já movidos estão na pasta nova, o restante continua em {0} e o arquivo copiado pela metade foi removido. Libere espaço em {1} ou escolha outra pasta e tente de novo.",+ "s8321": "Nada foi perdido. Todos os seus modelos continuam em {0} e o arquivo copiado pela metade foi removido. Libere espaço em {1} ou escolha outra pasta e tente de novo.",+ "s8322": "Nada foi perdido. Os modelos que não foram movidos continuam em {0}. Escolha outra pasta para tentar de novo.",+ "s8323": "Movimentação interrompida",+ "s8324": "Nada foi perdido.",+ "s8325": "{0} está na pasta nova.",+ "s8326": "{0} ainda está na pasta antiga.",+ "s8327": "Ambos funcionam.",+ "s8328": "Os modelos das duas pastas aparecem normalmente. Você pode concluir a movimentação depois, em “Alterar pasta”.",+ "s8329": "Seus modelos foram movidos",+ "s8330": "{0} agora estão em {1}",+ "s8331": "As cópias antigas foram removidas e {0} voltaram a ficar livres em {1}.",+ "s8332": "O Strata agora também usa {0}. Os novos downloads vão para lá, e seus modelos atuais ficam onde estão.",+ "s8333": "O Strata agora usa {0}. Seus arquivos de modelo antigos continuam em {1}; o Strata não os apaga.",+ "s8334": "Alterar a pasta de modelos faz parte do aplicativo Strata.",+ "s8335": "Há um modelo em execução. Pare-o primeiro e depois altere a pasta.",+ "s8336": "Escolha uma pasta de modelos.",+ "s8337": "Escolha o que fazer com seus modelos.",+ "s8338": "Essa opção não é possível aqui."}diff --git a/apps/host/src/locales/ru.json b/apps/host/src/locales/ru.jsonindex e19c5da58..da83fc83f 100644--- a/apps/host/src/locales/ru.json+++ b/apps/host/src/locales/ru.json@@ -3346,5 +3346,83 @@"s8257": "каждые {0} мин","s8258": "В этом движке Strata нет кода для видеокарты, которую он попытался использовать.","s8259": "Выберите другую карту в разделе «Запускать на» или откройте «Подробности»: там указано, какие карты найдены и для каких собран движок.",- "s8260": "Этот переключатель в приложении ничего не делает. Веб-страницы любого сайта уже могут обращаться к API, который показан в «API». Чтобы разрешить только некоторые сайты или использовать собственный сервер движка (порт 8080), добавьте \"cors_origins\": [\"https://your.site\"] в файл настроек модели."+ "s8260": "Этот переключатель в приложении ничего не делает. Веб-страницы любого сайта уже могут обращаться к API, который показан в «API». Чтобы разрешить только некоторые сайты или использовать собственный сервер движка (порт 8080), добавьте \"cors_origins\": [\"https://your.site\"] в файл настроек модели.",+ "s8261": "Папка моделей",+ "s8262": "Strata хранит здесь большие файлы моделей.",+ "s8263": "Сменить папку",+ "s8264": "Ждём выбор папки…",+ "s8265": "Занято на диске",+ "s8266": "свободно {0}",+ "s8267": "на этом диске",+ "s8268": "Ваши модели занимают {0}",+ "s8269": "Чтобы сменить папку, дождитесь конца загрузки или остановите её.",+ "s8270": "Такой папки нет",+ "s8271": "Эту папку использовать нельзя",+ "s8272": "Strata не может сохранять файлы в {0}.",+ "s8273": "Strata не находит {0}.",+ "s8274": "Выберите папку вне текущей.",+ "s8275": "Выберите свою папку, например в «Документах» или на другом диске.",+ "s8276": "Проверьте, что диск подключён, и выберите папку снова. Ваши модели не затронуты.",+ "s8277": "Использовать эту папку для моделей?",+ "s8278": "Новая папка",+ "s8279": "Свободно на этом диске: {0}",+ "s8280": "Вы выбрали весь диск {0}. Strata хранит свои файлы в отдельной папке, поэтому модели будут в {1}.",+ "s8281": "Дальше будут три варианта, как на шаге 2.",+ "s8282": "Переместить мои модели",+ "s8283": "Использовать обе папки",+ "s8284": "Начать с пустой",+ "s8285": "Перемещение моделей",+ "s8286": "Остановить перемещение",+ "s8287": "{0} из {1} ГБ",+ "s8288": "Осталось меньше минуты",+ "s8289": "Осталось около минуты",+ "s8290": "Осталось около {0} мин.",+ "s8291": "Осталось около {0} ч.",+ "s8292": "Не закрывайте Strata. Другими приложениями можно пользоваться. Пока перемещение не закончится, модели загрузить нельзя.",+ "s8293": "Сейчас копируется: {0}, файл {1} из {2}",+ "s8294": "Из {0} в {1}",+ "s8295": "Переместить мои модели туда",+ "s8296": "Нет моделей для перемещения.",+ "s8297": "Strata переместит ваши модели ({0}) в новую папку. Это тот же диск, поэтому это займёт мгновение.",+ "s8298": "Strata скопирует ваши модели ({0}) в новую папку, проверит их и удалит старые копии.",+ "s8299": "Дополнительное место не нужно.",+ "s8300": "В новой папке нужно {0} свободного места. Сейчас доступно {1}.",+ "s8301": "Оставить на месте и дополнительно использовать новую папку",+ "s8302": "Ничего не копируется. Текущие модели продолжают работать, а новые загрузки идут в новую папку.",+ "s8303": "Сейчас место не нужно. Новые загрузки должны поместиться в {1}.",+ "s8304": "Сейчас место не нужно.",+ "s8305": "Отныне Strata использует новую папку и не показывает текущие модели. Старые файлы не удаляются.",+ "s8306": "Сейчас место не нужно. Каждой модели, которую вы загрузите позже, понадобится своё место.",+ "s8307": "Вашим моделям нужно {0}, а на этом диске свободно {1}.",+ "s8308": "Освободите там около {0}, выберите другую папку или один из двух других вариантов.",+ "s8309": "Что сделать с вашими моделями",+ "s8310": "Работающая модель сначала останавливается; загрузите её снова после перемещения.",+ "s8311": "Будет перемещено: {0}.",+ "s8312": "Свободное место измеряется на диске, где находится {0}.",+ "s8313": "Старая папка: {0}",+ "s8314": "Strata копирует файлы по одному и проверяет размер, прежде чем удалить старый.",+ "s8315": "Остановить можно в любой момент; уже перемещённые файлы остаются пригодными.",+ "s8316": "На диске закончилось место",+ "s8317": "Перемещение остановлено",+ "s8318": "Диск {0} заполнился после {1}, поэтому перемещение остановлено.",+ "s8319": "Не удалось переместить модели.",+ "s8320": "Ничего не потеряно. Уже перемещённые модели в новой папке, остальные по-прежнему в {0}, а наполовину скопированный файл удалён. Освободите место на {1} или выберите другую папку и повторите попытку.",+ "s8321": "Ничего не потеряно. Все ваши модели по-прежнему в {0}, а наполовину скопированный файл удалён. Освободите место на {1} или выберите другую папку и повторите попытку.",+ "s8322": "Ничего не потеряно. Неперемещённые модели по-прежнему в {0}. Выберите другую папку и повторите попытку.",+ "s8323": "Перемещение остановлено",+ "s8324": "Ничего не потеряно.",+ "s8325": "{0}: в новой папке.",+ "s8326": "{0}: всё ещё в старой папке.",+ "s8327": "Работают оба.",+ "s8328": "Модели из обеих папок отображаются как обычно. Закончить перемещение можно позже через «Сменить папку».",+ "s8329": "Модели перемещены",+ "s8330": "{0} теперь находятся в {1}",+ "s8331": "Старые копии удалены, на {1} снова свободно {0}.",+ "s8332": "Теперь Strata использует и {0}. Новые загрузки идут туда, а текущие модели остаются на месте.",+ "s8333": "Теперь Strata использует {0}. Старые файлы моделей остаются в {1}; Strata их не удаляет.",+ "s8334": "Смена папки моделей доступна в приложении Strata.",+ "s8335": "Модель запущена. Сначала остановите её, затем смените папку.",+ "s8336": "Выберите папку моделей.",+ "s8337": "Выберите, что сделать с моделями.",+ "s8338": "Этот вариант здесь невозможен."}diff --git a/apps/host/src/locales/zh.json b/apps/host/src/locales/zh.jsonindex dfcd0e466..61e95aab2 100644--- a/apps/host/src/locales/zh.json+++ b/apps/host/src/locales/zh.json@@ -3346,5 +3346,83 @@"s8257": "每 {0} 分钟","s8258": "此 Strata 引擎没有适用于它尝试使用的显卡的代码。","s8259": "请在“运行于”中选择另一块显卡,或打开详情,查看找到了哪些显卡以及引擎支持哪些显卡。",- "s8260": "这个开关在应用中不起作用。任何网站的网页都已经可以调用“API 服务”页面显示的 API。如果只想允许部分网站,或要使用引擎自带的服务器(端口 8080),请在模型的配置文件中添加 \"cors_origins\": [\"https://your.site\"]。"+ "s8260": "这个开关在应用中不起作用。任何网站的网页都已经可以调用“API 服务”页面显示的 API。如果只想允许部分网站,或要使用引擎自带的服务器(端口 8080),请在模型的配置文件中添加 \"cors_origins\": [\"https://your.site\"]。",+ "s8261": "模型文件夹",+ "s8262": "Strata 会把体积较大的模型文件保存在这里。",+ "s8263": "更改文件夹",+ "s8264": "正在等待选择文件夹…",+ "s8265": "磁盘使用情况",+ "s8266": "可用 {0}",+ "s8267": "(此驱动器)",+ "s8268": "你的模型占用 {0}",+ "s8269": "请先完成或停止下载,再更改文件夹。",+ "s8270": "找不到该文件夹",+ "s8271": "无法使用该文件夹",+ "s8272": "Strata 无法在 {0} 中保存文件。",+ "s8273": "Strata 找不到 {0}。",+ "s8274": "请选择当前文件夹之外的文件夹。",+ "s8275": "请选择你自己的文件夹,例如“文档”中的文件夹或其他驱动器上的文件夹。",+ "s8276": "请检查驱动器是否已连接,然后重新选择文件夹。你的模型没有受到影响。",+ "s8277": "要用这个文件夹存放你的模型吗?",+ "s8278": "新文件夹",+ "s8279": "此驱动器可用 {0}",+ "s8280": "你选择了整个驱动器 {0}。Strata 会把文件放在自己的文件夹里,因此你的模型将存放在 {1}。",+ "s8281": "接下来会出现三个选项,与第 2 步相同。",+ "s8282": "移动我的模型",+ "s8283": "同时使用两个文件夹",+ "s8284": "从空文件夹开始",+ "s8285": "正在移动你的模型",+ "s8286": "停止移动",+ "s8287": "{0} / {1} GB",+ "s8288": "剩余不到 1 分钟",+ "s8289": "大约剩余 1 分钟",+ "s8290": "大约剩余 {0} 分钟",+ "s8291": "大约剩余 {0} 小时",+ "s8292": "请保持 Strata 打开。你可以继续使用其他应用。移动完成之前无法加载你的模型。",+ "s8293": "正在复制:{0},第 {1} 个文件,共 {2} 个",+ "s8294": "从 {0} 到 {1}",+ "s8295": "把我的模型移到那里",+ "s8296": "没有可移动的模型。",+ "s8297": "Strata 会把你的 {0} 模型移到新文件夹。因为是同一个驱动器,只需片刻。",+ "s8298": "Strata 会把你的 {0} 模型复制到新文件夹,检查无误后再删除旧副本。",+ "s8299": "不需要额外空间。",+ "s8300": "新文件夹需要 {0} 可用空间。你现有 {1}。",+ "s8301": "保留在原处,同时使用新文件夹",+ "s8302": "不会复制任何文件。现有模型继续可用,新下载的模型会保存到新文件夹。",+ "s8303": "目前不需要空间。新下载的模型必须能放进 {1}。",+ "s8304": "目前不需要空间。",+ "s8305": "从现在起 Strata 使用新文件夹,不再列出你现有的模型。旧文件不会被删除。",+ "s8306": "目前不需要空间。之后下载的每个模型都需要各自的空间。",+ "s8307": "你的模型需要 {0},此驱动器只有 {1} 可用。",+ "s8308": "请在那里腾出约 {0},或选择其他文件夹,或选用另外两个选项之一。",+ "s8309": "如何处理你的模型",+ "s8310": "正在运行的模型会先被停止;移动完成后请重新加载。",+ "s8311": "将移动:{0}。",+ "s8312": "可用空间是按 {0} 所在的驱动器计算的。",+ "s8313": "旧文件夹:{0}",+ "s8314": "Strata 一次复制一个文件,检查大小后才会删除旧文件。",+ "s8315": "你可以随时停止;已经移动的文件仍可使用。",+ "s8316": "驱动器空间已用完",+ "s8317": "移动已停止",+ "s8318": "移动 {1} 后 {0} 已满,因此移动已停止。",+ "s8319": "无法移动模型。",+ "s8320": "没有任何内容丢失。已移动的模型在新文件夹中,其余的仍在 {0},复制到一半的文件已被删除。请在 {1} 上腾出空间或选择其他文件夹,然后重试。",+ "s8321": "没有任何内容丢失。你的所有模型仍在 {0},复制到一半的文件已被删除。请在 {1} 上腾出空间或选择其他文件夹,然后重试。",+ "s8322": "没有任何内容丢失。未移动的模型仍在 {0}。请选择其他文件夹后重试。",+ "s8323": "移动已停止",+ "s8324": "没有任何内容丢失。",+ "s8325": "{0} 在新文件夹中。",+ "s8326": "{0} 仍在旧文件夹中。",+ "s8327": "两处都能使用。",+ "s8328": "两个文件夹中的模型都会照常显示。你可以稍后通过“更改文件夹”继续移动。",+ "s8329": "你的模型已移动",+ "s8330": "{0} 现已位于 {1}",+ "s8331": "旧副本已删除,{1} 上重新空出了 {0}。",+ "s8332": "Strata 现在也会使用 {0}。新下载的模型会保存到那里,你现有的模型仍留在原处。",+ "s8333": "Strata 现在使用 {0}。旧的模型文件仍在 {1},Strata 不会删除它们。",+ "s8334": "更改模型文件夹是 Strata 应用的功能。",+ "s8335": "有模型正在运行。请先停止它,再更改文件夹。",+ "s8336": "请选择模型文件夹。",+ "s8337": "请选择如何处理你的模型。",+ "s8338": "此处无法使用该选项。"}diff --git a/apps/host/src/styles/annotation-fixes.css b/apps/host/src/styles/annotation-fixes.cssindex 5eecaf9db..de133dc66 100644--- a/apps/host/src/styles/annotation-fixes.css+++ b/apps/host/src/styles/annotation-fixes.css@@ -746,3 +746,25 @@ html[data-motion='reduced'] .task-tree-row[data-leaving] { opacity: 0; }.native-cards__opt small { display:block; margin-top:4px; font-size:12px; line-height:1.55; color:var(--st-ink-muted); }.native-cards__opt small[data-warn="true"] { color:var(--st-ink-soft); }.native-cards__note { margin:2px 0 0; }++/* Settings > Storage > Models folder (0.2.2): free-space line, the three choices, notices, the result mark. */+.models-free { display:grid; gap:6px; margin-top:10px; }+.models-free__row { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }+.models-picked { display:grid; gap:4px; }+.models-picked .storage-directory__path { margin:0; }+.models-choices { display:grid; gap:10px; border:0; padding:0; margin:0; }+.models-choice { display:grid; grid-template-columns:auto 1fr; gap:4px 12px; padding:14px 16px; border:1px solid var(--st-line); border-radius:var(--st-r-md); background:var(--st-surface); cursor:pointer; }+.models-choice:has(input:checked) { border-color:var(--st-accent); background:var(--st-accent-tint); }+.models-choice:has(input:disabled) { opacity:.55; cursor:not-allowed; background:var(--st-surface-2); }+.models-choice input { margin:4px 0 0; accent-color:var(--st-accent); }+.models-choice strong { font-weight:700; }+.models-choice__need { grid-column:2; font-size:var(--st-fs-xs); color:var(--st-ink-muted); font-variant-numeric:tabular-nums; }+.models-choice__tag { font-size:var(--st-fs-xs); font-weight:700; color:var(--st-accent-text); margin-left:8px; }+.models-notice { display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border-radius:12px; font-size:var(--st-fs-sm); }+.models-notice--warn { background:var(--st-warn-tint); color:var(--st-warn-text); }+.models-notice--info { background:var(--st-info-tint); color:var(--st-info-text); }+.models-notice .st-icon { flex:none; }+.models-details summary { cursor:pointer; color:var(--st-accent-text); font-weight:700; font-size:var(--st-fs-sm); }+.models-details ul { margin:8px 0 0; padding-left:18px; color:var(--st-ink-soft); font-size:var(--st-fs-sm); }+.models-ok { display:flex; align-items:center; gap:12px; }+.models-ok__mark { display:grid; place-items:center; flex:none; width:44px; height:44px; border-radius:50%; background:var(--st-accent-tint); color:var(--st-accent-text); }diff --git a/apps/host/tests/models-folder.test.mjs b/apps/host/tests/models-folder.test.mjsnew file mode 100644index 000000000..cf950ec25--- /dev/null+++ b/apps/host/tests/models-folder.test.mjs@@ -0,0 +1,161 @@+import test from 'node:test';+import assert from 'node:assert/strict';+import { EventEmitter } from 'node:events';+import { existsSync, mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs';+import { join } from 'node:path';+import { tmpdir } from 'node:os';+import { createNativeControl } from '../server/native-control.mjs';+import { createControl } from '../server/control-runtime.mjs';++/** The host in the packaged app with a stand-in for Strata Control: the move itself is Control's (tests/terminal/test_models_move.py). */+function fixture(t, { plan = {}, move = null } = {}) {+ const root = realpathSync(mkdtempSync(join(tmpdir(), 'strata-mfolder-')));+ const install = join(root, 'install'), data = join(root, 'host'), oldFolder = join(root, 'old'), newFolder = join(root, 'new');+ for (const d of [install, data, oldFolder, newFolder]) mkdirSync(d, { recursive: true });+ const earlier = { install: process.env.STRATA_INSTALL_DIR, terminal: process.env.STRATA_TERMINAL_SETTINGS_FILE, settings: process.env.STRATA_SETTINGS_FILE, comp: process.env.STRATA_COMPONENTS_DIR };+ process.env.STRATA_INSTALL_DIR = install;+ process.env.STRATA_TERMINAL_SETTINGS_FILE = join(root, 'terminal-settings.json');+ process.env.STRATA_COMPONENTS_DIR = join(root, 'components');+ delete process.env.STRATA_SETTINGS_FILE;+ const calls = [];+ const control = {+ control: { dir: join(root, 'control'), python: join(root, 'control', 'python.exe'), cli: join(root, 'control', 'strata.py') }, version: '0.2.2',+ async installedModels() { return { install_dir: install, models: [] }; },+ async engine() { return { usable: true, engine: { version: '0.2.2', root: root } }; },+ async importPlan() { return {}; },+ async planModelsMove(from, to) {+ calls.push(['plan', from, to]);+ return { ok: true, issue: null, old: from, new: to, same_drive: false, free_bytes: 900e9, models_bytes: 74e9, needed_bytes: 77.7e9, models: [{ group: 'gyro-s', name: 'gyro-s', bytes: 58e9 }, { group: 'coder', name: 'coder', bytes: 16e9 }],+ choices: { move: { possible: true, reason: '' }, keep: { possible: true, reason: '' }, empty: { possible: true, reason: '' } }, ...plan };+ },+ async moveModels(from, to, options) {+ calls.push(['move', from, to, options.installDir]);+ if (move) return move(from, to, options);+ options.onEvent({ event: 'progress', done: 5e9, total: 74e9, file: 'models/gyro-s/a.gguf', group: 'gyro-s', index: 1, count: 3, seconds_left: 300, same_drive: false });+ return { ok: true, event: 'result', done: true, stopped: false, moved: ['gyro-s', 'coder'], remaining: [], bytes_moved: 74e9, total_bytes: 74e9, files_moved: 3, same_drive: false };+ },+ async stop() { return { ok: true }; },+ };+ const spawnProcess = () => { throw new Error('the host starts no process here'); };+ const native = createNativeControl({ control, directory: data, spawnProcess, fetcher: async () => Response.json({}), requests: () => [] });+ t.after(() => {+ for (const [key, name] of [['install', 'STRATA_INSTALL_DIR'], ['terminal', 'STRATA_TERMINAL_SETTINGS_FILE'], ['settings', 'STRATA_SETTINGS_FILE'], ['comp', 'STRATA_COMPONENTS_DIR']]) {+ if (earlier[key] === undefined) delete process.env[name]; else process.env[name] = earlier[key];+ }+ rmSync(root, { recursive: true, force: true });+ });+ native.setDownloadDirectory(oldFolder);+ return { native, control, calls, root, install, oldFolder, newFolder, terminalFile: process.env.STRATA_TERMINAL_SETTINGS_FILE };+}+const finish = async (native, id) => { for (let i = 0; i < 400; i++) { const job = native.state().jobs.find(j => j.id === id); if (job.state !== 'running') return job; await new Promise(r => setTimeout(r, 10)); } throw new Error('job did not finish'); };++test('the plan says what the picked folder means and keeps the person\'s spelling of it', async t => {+ const f = fixture(t);+ const plan = await f.native.planModelsFolder(f.newFolder);+ assert.equal(plan.current, f.oldFolder);+ assert.equal(plan.folder, f.newFolder);+ assert.equal(plan.wholeDrive, false);+ assert.equal(plan.shown, f.newFolder);+ assert.equal(plan.models.length, 2);+ assert.deepEqual(f.calls[0], ['plan', f.oldFolder, f.newFolder]);+});++test('a whole drive is planned as <drive>\\Strata, shown as <drive>\\Strata\\Models', async t => {+ const f = fixture(t);+ const root = f.root.slice(0, f.root.indexOf(process.platform === 'win32' ? '\\' : '/') + 1) || '/';+ const plan = await f.native.planModelsFolder(root);+ assert.equal(plan.wholeDrive, true);+ assert.equal(plan.folder, join(root, 'Strata'));+ assert.equal(plan.shown, join(root, 'Strata', 'Models'));+ rmSync(join(root, 'Strata'), { recursive: true, force: true });+});++test('the card is blocked while a model runs or a job runs: a running model must be stopped on purpose', async t => {+ const f = fixture(t);+ await assert.rejects(f.native.startModelsFolder({ folder: f.newFolder, choice: 'bogus' }), /Choose what to do/);+ const refused = fixture(t, { plan: { choices: { move: { possible: false, reason: 'Your models need 77 GB, this drive has 38 GB free.' }, keep: { possible: true, reason: '' }, empty: { possible: true, reason: '' } } } });+ await assert.rejects(refused.native.startModelsFolder({ folder: refused.newFolder, choice: 'move' }), /need 77 GB/);+ assert.equal(refused.calls.some(c => c[0] === 'move'), false);+});++test('Keep: the new folder is used for new downloads, nothing is moved, both settings files follow', async t => {+ const f = fixture(t);+ writeFileSync(f.terminalFile, JSON.stringify({ data_dir: f.oldFolder, data_dir_at: 1 })); // the Terminal had chosen the old folder+ const result = await f.native.startModelsFolder({ folder: f.newFolder, choice: 'keep' });+ assert.equal(result.done, true);+ assert.equal(f.native.state().downloadDirectory, f.newFolder);+ assert.equal(f.calls.some(c => c[0] === 'move'), false);+ assert.equal(JSON.parse(readFileSync(f.terminalFile, 'utf8')).data_dir, f.newFolder);+});++test('Start empty: the old models are no longer listed (their run configs are set aside, not deleted), the model files stay', async t => {+ const f = fixture(t);+ const oldFile = join(f.oldFolder, 'models', 'gyro-s', 'a.gguf');+ mkdirSync(join(f.oldFolder, 'models', 'gyro-s'), { recursive: true });+ writeFileSync(oldFile, 'x');+ writeFileSync(join(f.install, 'strata-gyro-s.json'), JSON.stringify({ args: ['--native', oldFile] }));+ writeFileSync(join(f.install, 'strata-other.json'), JSON.stringify({ args: ['--native', join(f.root, 'elsewhere', 'b.gguf')] }));+ const result = await f.native.startModelsFolder({ folder: f.newFolder, choice: 'empty' });+ assert.deepEqual(result.setAside, ['strata-gyro-s.json']);+ assert.equal(existsSync(join(f.install, 'strata-gyro-s.json')), false);+ assert.equal(existsSync(join(f.install, 'old-models', 'strata-gyro-s.json')), true);+ assert.equal(existsSync(join(f.install, 'strata-other.json')), true, 'a model elsewhere is not touched');+ assert.equal(existsSync(oldFile), true);+ assert.equal(f.native.state().downloadDirectory, f.newFolder);+});++test('Move: a job with progress; the folder changes only when everything moved', async t => {+ const f = fixture(t);+ const job = await f.native.startModelsFolder({ folder: f.newFolder, choice: 'move' });+ assert.equal(job.kind, 'models-move');+ const done = await finish(f.native, job.id);+ assert.equal(done.state, 'done');+ assert.equal(done.result.done, true);+ assert.equal(done.result.sameDrive, false);+ assert.equal(f.native.state().downloadDirectory, f.newFolder);+ assert.deepEqual(f.calls.find(c => c[0] === 'move').slice(1), [f.oldFolder, f.newFolder, f.install]);+});++test('Move stopped: the folder stays, what moved is reported', async t => {+ const f = fixture(t, { move: async () => ({ ok: true, event: 'result', done: false, stopped: true, moved: ['coder'], remaining: ['gyro-s'], bytes_moved: 16e9, total_bytes: 74e9, files_moved: 1, same_drive: false }) });+ const job = await f.native.startModelsFolder({ folder: f.newFolder, choice: 'move' });+ const done = await finish(f.native, job.id);+ assert.equal(done.result.stopped, true);+ assert.deepEqual(done.result.moved, ['coder']);+ assert.equal(f.native.state().downloadDirectory, f.oldFolder, 'a partial move never points the app at an incomplete folder');+});++test('Move failed (disk full): the folder stays and the job says what happened', async t => {+ const f = fixture(t, { move: async () => { throw Object.assign(new Error('The drive ran out of space.'), { code: 'disk_full', details: 'ENOSPC: no space left on device', output: { moved: ['coder'], remaining: ['gyro-s'], bytes_moved: 52e9, total_bytes: 74e9 } }); } });+ const job = await f.native.startModelsFolder({ folder: f.newFolder, choice: 'move' });+ const done = await finish(f.native, job.id);+ assert.equal(done.state, 'error');+ assert.equal(done.result.code, 'disk_full');+ assert.equal(done.result.bytes, 52e9);+ assert.match(done.details, /ENOSPC/);+ assert.equal(f.native.state().downloadDirectory, f.oldFolder);+});++test('Move: Stop writes the cancel file and the run ends by itself', async t => {+ let release;+ const f = fixture(t, { move: (from, to, options) => new Promise(resolve => { release = () => resolve({ ok: true, event: 'result', done: false, stopped: existsSync(options.cancelFile), moved: [], remaining: ['gyro-s', 'coder'], bytes_moved: 0, total_bytes: 74e9, files_moved: 0, same_drive: false }); }) });+ const job = await f.native.startModelsFolder({ folder: f.newFolder, choice: 'move' });+ await f.native.cancel(job.id);+ assert.equal(f.native.state().jobs.find(j => j.id === job.id).state, 'running', 'it ends when Control has cleaned up, not before');+ release();+ const done = await finish(f.native, job.id);+ assert.equal(done.result.stopped, true);+ assert.equal(f.native.state().downloadDirectory, f.oldFolder);+});++test('a move needs the app: the Control command line is built from the plan and the cancel file', async () => {+ const seen = [];+ const control = createControl({ control: { dir: '/c', python: '/c/py', cli: '/c/strata.py' }, run: async (args, options) => { seen.push([args, options]); return args.includes('--plan') ? { code: 0, json: { ok: true, plan: { ok: true } }, text: '', stderr: '' } : { code: 0, json: { ok: true, event: 'result', done: true }, text: '', stderr: '' }; } });+ assert.deepEqual(await control.planModelsMove('/old', '/new'), { ok: true });+ assert.deepEqual(seen[0][0], ['models', 'move', '/new', '--from', '/old', '--plan', '--output', 'json']);+ const result = await control.moveModels('/old', '/new', { installDir: '/i', cancelFile: '/c.cancel' });+ assert.equal(result.done, true);+ assert.deepEqual(seen[1][0], ['models', 'move', '/new', '--from', '/old', '--install-dir', '/i', '--cancel-file', '/c.cancel', '--output', 'jsonl']);+ const failing = createControl({ control: { dir: '/c', python: '/c/py', cli: '/c/strata.py' }, run: async () => ({ code: 5, json: { ok: false, error: { code: 'disk_full', message: 'The drive ran out of space.', details: 'ENOSPC' }, moved: [] }, text: '', stderr: '' }) });+ await assert.rejects(failing.moveModels('/o', '/n'), e => e.code === 'disk_full' && e.details === 'ENOSPC' && /ran out of space/.test(e.message));+});