Repository navigation
feat(models): choose the folder models are kept in, from Storage (2.21.1) - #45
Merged
Merged
Conversation
… the next start The installed app kept every model in the data folder, on the system drive on Windows (issue 43). The engine now takes the models folder from FORMCUT_MODELS_DIR, else from models-folder.json in the data folder, else the default; a chosen folder that cannot be reached at start falls back to the default for that run. With a chosen folder the Pocket TTS and Chatterbox downloads and a new speech runtime go there too; an existing runtime in the data folder keeps working. GET /api/storage reports the folder, where it comes from and what applies after a restart. PUT /api/storage/models-folder checks the path is absolute, outside the data folder and writable, and nests formcut-models in a folder that already holds other files. POST /api/storage/models-folder/copy copies what is already downloaded as a job, file by file through .part names, and removes nothing. Seen: driven against a scratch data folder across two engine starts. Not run: Windows, a real second drive.
…downloaded models The home screen's Storage view shows the models folder and the free space on its drive, and says when a change applies after a restart or when FORMCUT_MODELS_DIR fixes it. Three chips choose a folder with the system dialog, go back to the default, and copy the downloaded models with progress. The line and the chips are made once and patched in place. Strings in English, German and Spanish. Seen: tsc --noEmit, npm run build, and the view in headless Chromium at 4x CPU and a slow network with no layout shift. Not seen: the Tauri window or Windows' folder dialog.
The four locales that ship as files carry every English string; the eleven home.models strings of the Storage view are added to each. Seen: tests/test_runtime_locales.py.
The generated inventory in engine-map.md, as setup/skill_maps.py writes it. Seen: setup/skill_maps.py --check.
…t in, from Storage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(models): choose the folder models are kept in, from Storage (2.21.1)
Summary
For issue #43, its first part. The second part, a voice app on this computer through the OpenAI-compatible speech API, follows in its own pull request. Built on main at 2.21.0 (pull request #44).
%LOCALAPPDATA%\formcut\models).FORMCUT_MODELS_DIRcould move them, but only from the environment, which an installed app gives a person no way to set.formcut-modelsinside it. The copy writes each file through a.partname, keeps files already there at the same size, keeps links as links, checks the free space first, and removes nothing. A chosen folder that cannot be reached at start (a drive not plugged in) falls back to the default for that run.FORMCUT_MODELS_DIRstill wins when it is set, and the buttons are then off.GET /api/storagegainsmodels;PUT /api/storage/models-folder;POST /api/storage/models-folder/copy(a job).example.env, both HASHOUT logs and the skill's engine map are updated.Commits
Oldest first; the release commit is last; no merge commits. The short hashes change when the commits are signed.
Version
v2.21.1 (release commit is last). Bumped from 2.21.0, the same sites as 2.20.2: the README badge,
backend/app/main.pyAPP_VERSION,form-functions.json,frontend/package.json,frontend/package-lock.json(both fields),src-tauri/Cargo.toml,src-tauri/Cargo.lockandsrc-tauri/tauri.conf.json. The two new HASHOUT entries are stamped 2.21.1. The demo bundles are not rebuilt.Checks
Run on 30 November 2026, Linux, Python 3.12, Node 22, on this tree:
ruff checkandruff format --checkclean;setup/notices.py --checkpasses;setup/skill_maps.py --checkin step.npm audit0 vulnerabilities;tsc --noEmitclean;npm run buildbuilt; the locale key counts match.python -m pytest tests: 1,745 passed, 154 skipped, no failures. The window smoke tests infrontend/tests/window: 6 passed. No tests were added.formcut-models, a copy and a second copy that keeps every file, the chosen folder in use after the restart with the voice downloads following it, the default again, and the refusal whenFORMCUT_MODELS_DIRis set.Not run: Windows and macOS, the Windows folder dialog, a real second drive, a drive unplugged at start, a copy of tens of gigabytes, the golden frames and output checks (the renderer is not touched).
Merging
Merge with a merge commit so each commit and its signature stays. Do not squash.