Skip to content

feat(ai): add local model setup scaffolding - #107

Merged
McanKul merged 7 commits into
McanKul:epic/local-ai-runtimefrom
nonamexishere:feat/84-model-setup-ui
Oct 4, 2026
Merged

McanKul merged 7 commits into
McanKul:epic/local-ai-runtimefrom
nonamexishere:feat/84-model-setup-ui

Conversation

@nonamexishere

@nonamexishere nonamexishere commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

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

  • npm run build
  • npm test (268 passed)
  • cargo test --manifest-path src-tauri/Cargo.toml --lib (239 passed)

Privacy

Model files stay under local app data. No PDF or model content is uploaded, logged, or transmitted.

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 McanKul left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 McanKul changed the title feat(settings): add opt-in local model setup and lifecycle feat(ai): add local model setup scaffolding Oct 4, 2026

@McanKul McanKul left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@McanKul
McanKul merged commit 5a3c0c8 into McanKul:epic/local-ai-runtime Oct 4, 2026
2 checks passed
@McanKul

McanKul commented Oct 4, 2026

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants