diff --git a/README.md b/README.md index d85e7b2..b6a9e29 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ into **Session** (live) and **World** (prep) tools: - **NPC Generator** — portraits, personality, goals, stat blocks - **Quest Designer** — multi-step quests with twists and reward breakdown - **Item Forge** — magic items with art and structured mechanics -- **Image Generator** — portraits, maps, scene art (macOS, via Ollama) +- **Image Generator** — portraits, maps, scene art (cross-platform, via stable-diffusion.cpp) - **Session Logger** — Markdown notes, multiple sessions, streaming AI summary - **Soundboard** — synthesized ambience/SFX with one-click scenes - **World Builder** — generated regions, landmarks, a draggable-pin map @@ -34,7 +34,7 @@ persistent state round it out — reload loses nothing. ### Prerequisites - **Rust** + **Cargo** — https://rustup.rs -- **Node.js** 20+ — https://nodejs.org +- **Node.js** 20+ (23.6+ to run the `npm run check` self-checks) — https://nodejs.org - **[Ollama](https://ollama.com)** running locally (default `http://localhost:11434`) ### Install & run @@ -66,7 +66,8 @@ All campaign data stays on disk under your OS app-data dir (default | File | Contents | |------|----------| -| `lore.db` | RAG chunks + embeddings (SQLite) | +| `dm-pal-prefs.json` | App prefs — data-dir setting + LLM config incl. API key (stored locally, one level above `dm-toolkit/`) | +| `lore/lore.db` | RAG chunks + embeddings (SQLite) | | `generations.db` | History of every generated NPC/encounter/item/quest/… | | `images/` | Cached generated PNGs, keyed by prompt hash | | `dm-pal-state.json` | UI state (initiative, dice history, calendar events, …) | diff --git a/docs/plan.md b/docs/plan.md index a3c78b0..9e871f3 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -351,6 +351,13 @@ pub async fn generate_image( - **macOS-only today** — Ollama image models only run on macOS (Apple Silicon via MLX). Gate the image-gen UI behind an OS check on first run; on other platforms fall back to a placeholder/emoji or the optional remote API. (This is an Ollama limitation, not ours.) - **Slow + heavy** — 4B is ~5.7GB, 9B is ~12GB, generation is multi-second. Always generate in the background with a progress bar (drive it from the NDJSON `step`/`total` lines), never block the UI thread. Cache results to disk by hash of the prompt. - **Model picker** — add `image_model` to `LlmConfig` (default `x/flux2-klein:4b`; `x/z-image-turbo` for fast/low-VRAM). Reuse the existing settings panel, don't build a second one. + +> **Superseded (2026-09):** image generation now targets a +> [stable-diffusion.cpp](https://github.com/leejet/stable-diffusion.cpp) +> `sd-server` via its AUTOMATIC1111-compatible API — cross-platform, no +> macOS gating, no per-request model field. See README and +> `src-tauri/src/commands/image_commands.rs`. Everything below (this section +> and §10's image-model rows) is kept as design history only. - **Prompt engineering is the lever** — FLUX.2 handles readable text and hex colors, so item/NPC name labels can be rendered *into* the image where it helps. Default to 1024×1024. --- @@ -759,7 +766,7 @@ Local LLMs are not "fire and forget." Plan for: | **Loading state** | Model load can take 5–30 s on HDD/CPU. Show progress bar and cancel button | | **GPU offloading** | Expose `n_gpu_layers` slider per model | | **Context length** | 2k/4k/8k selector with memory warning | -| **Image model** | Separate `image_model` field in `LlmConfig` (default `x/flux2-klein:4b`, `x/z-image-turbo` for speed). macOS-only — show a gated notice on Linux/Windows and disable the ✨ buttons. Drive the progress bar from NDJSON `step`/`total`. | +| **Image model** | Separate `image_model` field in `LlmConfig` (default `x/flux2-klein:4b`, `x/z-image-turbo` for speed). macOS-only — show a gated notice on Linux/Windows and disable the ✨ buttons. Drive the progress bar from NDJSON `step`/`total`. **Superseded 2026-09 — see the banner in §4.4.** | | **Generation controls** | Streaming toggle, temperature, top-p, repeat-penalty per tool | | **License acceptance** | First-run "model license + download" wizard; don't silently bundle 4 GB models | diff --git a/public/icons.svg b/public/icons.svg deleted file mode 100644 index e952219..0000000 --- a/public/icons.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripts/gitea-release.sh b/scripts/gitea-release.sh index a16fbc0..2c367be 100755 --- a/scripts/gitea-release.sh +++ b/scripts/gitea-release.sh @@ -43,9 +43,14 @@ node -e ' if(out===t)throw new Error("version not replaced in "+f); fs.writeFileSync(f,out); } + // Cargo.toml: first top-of-file `version = "x.y.z"` (not the deps below it). + {const f="src-tauri/Cargo.toml",t=fs.readFileSync(f,"utf8"); + const out=t.replace(/^version\s*=\s*"\d+\.\d+\.\d+"/m,`version = "${ver}"`); + if(out===t)throw new Error("version not replaced in "+f); + fs.writeFileSync(f,out);} ' "$VER" echo "release $TAG (version files synced)" -git add package.json src-tauri/tauri.conf.json +git add package.json src-tauri/tauri.conf.json src-tauri/Cargo.toml if ! git diff --cached --quiet; then git commit -m "chore: release $TAG" -q echo "committed version bump" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 3c60546..2661771 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dm-pal" -version = "0.1.0" +version = "0.1.3" description = "AI-Powered Dungeon Master Toolkit" authors = ["DM-Pal Team"] license = ""