okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221storage and version: one Downloaded models list from the real files, Check folder unloads nothing, app version shown as Strata31030b170

main
809 B13 linesraw
1/**
2 * What changing (or only checking) the model folder does to the models that are loaded.
3 *
4 * "Check folder" reads the SAME folder again, so nothing that is loaded may be touched: it used to unload every optimized model
5 * and the status went to "No model loaded" (QA 2026-10-18, O01). Only an actual change of folder unloads them, and only when
6 * the person agreed (the screen says so first and offers "Unload and change directory").
7 */
8export function nativeUnloadPlan({ changed, unload, instances }) {
9  const running = Array.isArray(instances) ? instances : [];
10  if (!running.length || !changed) return { refuse: null, ids: [] };
11  if (unload !== true) return { refuse: 'Unload native models before changing the model folder.', ids: [] };
12  return { refuse: null, ids: running.map(i => i.id) };
13}