feat(ai): add local model setup scaffolding - #107
Conversation
Content-addressed blobs under an injected root. SHA-256 must match before a model is ready. Interrupted staging and truncated files stay unlistable. Duplicate imports reuse one blob. No HTTP, no auto-download, no Tauri commands.
Rename-over the dest manifest instead of deleting it first. The no-GGUF walk ignores gitignored bundle trees so local prepare scripts do not fail cargo test.
Settings can import a local file after a preview of size, license, location, and a hardware-check stub. Load, unload, cancel, and remove use the Fake backend and the McanKul#83 store. No HTTP, no auto-download, no chat. The file picker has no extension filter so any file can be chosen.
Use the preview DTO compatibility string once. After preview, choose a different file or Cancel to dismiss. A checksum mismatch drops the stale hash. Trim Fake-era comments on ai_cancel and ai_generate.
…ancel Settings Cancel no longer latches Fake cancel. open() removes leftover staging/install-* dirs. Dest manifests replace via a sibling tmp file. list_ready uses size only; import_file preflights disk space.
…hing Sweep only leftover install-* dirs from other pids. Remove reads recorded size from the dest manifest (or blob metadata), not a full SHA-256 get.
McanKul
left a comment
There was a problem hiding this comment.
Thanks for the work here. The setup UI should not present an imported file as a loaded, ready model while it is still backed by the Fake runtime and hardware compatibility is unavailable. Please keep the user-facing section hidden or clearly disabled until the real runtime and compatibility check are connected; the underlying lifecycle/store scaffolding can remain.
McanKul
left a comment
There was a problem hiding this comment.
Thanks again for the substantial groundwork here. I applied the final review fix by keeping the Settings entry hidden until the real runtime and hardware compatibility check are connected. The store, lifecycle, cancellation and removal scaffolding remains intact, and the full frontend/Rust suites pass.
|
Merged into the local-AI runtime branch. Thank you again for the careful store and lifecycle work — we kept your contribution intact and only held back the user-facing Settings entry until the real runtime and compatibility check are ready. |
Summary
Adds the offline local-model artifact store, lifecycle commands, cancellation/removal behavior, and the prepared Settings components for #84.
The Settings entry is intentionally not mounted yet. A Fake backend and unavailable hardware compatibility check must not be presented as a ready model. The UI can be enabled after the real runtime and #82 compatibility work are connected.
No HTTP, catalog, auto-download, chat, or Test button is added.
Refs #84.
Validation
Privacy
Model files stay under local app data. No PDF or model content is uploaded, logged, or transmitted.