Commit Graph

21 Commits

Author SHA1 Message Date
itsamejms 160788d63b feat: condition durations — 'Hexed (3)' ticks down each turn, drops at 0
CI / frontend (push) Successful in 30s
CI / rust (push) Successful in 5m26s
Numbered conditions decrement when the combatant's turn starts and
expire at zero; plain conditions still toggle manually. The custom
condition input hints the syntax. Roadmap 1.8 — Phase 1 complete.
2026-09-07 10:28:30 +01:00
itsamejms 630a025e77 feat: dice macros — persisted named rolls (Grimjaw attack, fire damage…)
CI / frontend (push) Successful in 31s
CI / rust (push) Successful in 5m41s
Type a notation in the input, name it, '+ macro' saves it. Chips roll
with the template relabel path so history reads 'Attack (1d20+5) → 17';
× deletes. Roadmap 1.7.
2026-09-07 10:28:04 +01:00
itsamejms 00178e603d feat: first-run wizard pulls models with a real progress bar
CI / frontend (push) Successful in 33s
CI / rust (push) Successful in 5m48s
New pull_model command streams Ollama /api/pull NDJSON over a Channel
(status lines + completed/total bytes). The wizard's model step gains a
'type any tag to pull' input: uninstalled models download in-app with
a progress bar instead of the old 'run ollama pull yourself' dead end.
The NDJSON line-loop is factored out of the chat streaming path and
shared.
2026-09-07 10:27:41 +01:00
itsamejms 3c599553fc feat: session auto-capture + NPC→Initiative push + lore grounding everywhere
CI / frontend (push) Successful in 31s
CI / rust (push) Successful in 6m3s
- SessionLogger listens for a new LogEntry bus event; dice rolls,
  initiative turns/rounds, generated encounters and calendar day
  advances land in the active session as timestamped entries — the
  raw material the AI summary actually needs. Mute toggle in the
  toolbar (persisted, default on).
- NPC Generator: '⚔ to initiative' button pushes the generated stat
  block (HP) into the tracker via the existing AddCombatants bus event.
- ragQuery now set on Encounter, Quest and Session summary too
  (NPC/Item/World already had it) — every generator is world-grounded.
2026-09-07 10:25:38 +01:00
itsamejms 1e7301647d feat: explicit provider field replaces URL sniffing
CI / frontend (push) Successful in 30s
CI / rust (push) Successful in 5m42s
LlmConfig.provider ("ollama" | "openai", empty = sniff URL so legacy
configs keep working). Settings presets set it — a custom-port Ollama
no longer falls into the OpenAI branch and fails confusingly.

Also: test_connection now accepts an optional config override — the
wizard was passing one that Rust silently ignored, so it tested the
saved config instead of the URL the user just typed.
2026-09-06 23:27:20 +01:00
itsamejms a69d7caefb fix: RAG — UTF-8 chunk boundary, source dedupe, embed-model guard + reindex
- chunk(): byte splits that landed mid multibyte char silently dropped
  the whole chunk (accented/CJK lore). Back the boundary off to a char
  boundary; regression test included.
- add_document(): DELETE the source first — re-adding a file no longer
  doubles its chunks.
- chunks now record their embed_model (ALTER TABLE migration for old
  DBs); search skips chunks from a different model; rag_list reports it;
  new rag_reindex re-embeds everything, surfaced in the Lore panel as a
  mismatch banner with a one-click Reindex.
2026-09-06 23:25:22 +01:00
itsamejms f3e06d2bd3 updating to use stable-diffusion.cpp for the image generation as ollama has since removed it 2026-08-24 11:23:10 +01:00
itsamejms da443175c5 adding the first run wizard again 2026-08-16 13:53:22 +01:00
itsamejms 65aee44d6b working through a review 2026-08-09 13:49:54 +01:00
itsamejms b89a39ec9d building out the components, updating the UI in overview and adding a little sqlite viewer 2026-07-17 09:31:51 +01:00
itsamejms 82f2dcf3df adding initial world map frontend 2026-07-13 10:50:55 +01:00
itsamejms a6171a8158 minor UI fixes 2026-07-13 10:39:51 +01:00
itsamejms a24f3615e0 working through the plan + UI/ UX 2026-07-12 22:13:43 +01:00
itsamejms a9cdd10806 feat: soundboard, toast notifications, robust JSON parsing
Soundboard (Web Audio API):
- 8 ambient loops: rain, wind, fire, ocean, forest, tavern, thunder, cave
- 8 one-shot SFX: sword, bow, spell, door, coins, horn, dice, footsteps
- Brown noise generation for ambient textures
- Oscillator-based SFX with frequency sweeps
- Volume slider, active state indicators with pulsing dot
- Stop All button when ambients are playing
- Toast notifications on SFX trigger

Toast notification system:
- Zustand-based store with auto-dismiss (4s)
- 4 types: success, error, info, warning
- Slide-in animation from top-right
- Dismissible with × button
- Integrated into App shell

JSON parsing (all AI components):
- Shared lib/llm-parse.ts with extractJson, parseLlmJson, flattenValue, ensureArray
- Strips markdown code fences before parsing
- Handles nested objects where strings expected
- All 5 AI components use parseLlmJson instead of raw regex
- All prompts explicitly request raw JSON with no fences
- ItemForge shows raw response in <details> on parse failure

Full production build passing
2026-06-28 23:08:15 +01:00
itsamejms b23ab61841 fix: robust LLM JSON parsing across all AI components
- Created shared lib/llm-parse.ts with extractJson(), parseLlmJson(),
  flattenValue(), and ensureArray() utilities
- Strips markdown code fences (\`\`\`json ... \`\`\`) before parsing
- Handles nested objects where strings were expected (flattens them)
- Handles arrays that come back as strings or objects
- Updated all AI prompts to explicitly request raw JSON with no fences
- All 5 AI components now use parseLlmJson() instead of raw regex
- ItemForge shows raw LLM response in expandable <details> when parsing fails
- Added 'IMPORTANT: Return ONLY raw JSON' instruction to all prompts
- Full production build passing
2026-06-28 23:03:10 +01:00
itsamejms 9b0483a2ab polish: responsive grid, radial gradient background, better bento card scaling
- Dashboard grid is now responsive: 1 col mobile, 2 cols tablet, 4 cols desktop
- BentoCard span classes converted to responsive variants
- Subtle radial gradient on main background for depth (as per design system §7.7)
- All production builds passing
2026-06-28 22:52:04 +01:00
itsamejms ea827ff20e feat: World Builder, Item Forge, Quest Designer + sidebar navigation
- World Builder: AI-generated worlds with regions, landmarks, conflicts, cultures
- Item Forge: AI magic item generator with rarity-colored headers, mechanical/lore sections
- Quest Designer: AI quest generator with step-through navigation, choices, twist, reward
- Sidebar now navigates to dedicated full-screen views for every tool
- Bento dashboard cards have 'Expand' buttons opening detail views
- Back arrow (←) in title bar returns to dashboard
- Dashboard grid expanded to 5 rows to accommodate Item Forge
- All three new tools also work in compact dashboard mode
- Full production build clean
2026-06-28 22:50:50 +01:00
itsamejms a44de0e4bb feat: sidebar navigation to dedicated detail views
- Sidebar icons now navigate to full-screen views for each tool
- Dashboard bento cards have 'Expand' buttons that open the detail view
- Back arrow (←) in title bar returns to dashboard
- Detail views wrapped in a glass-card with max-w-2xl layout
- Settings page gets its own full layout with heading
- World Map, Quest Designer, Soundboard show placeholder screens with icons
- All nav items in sidebar: World, NPCs, Encounter, Dice, Session, Sound,
  Initiative, Random Tables, Calendar, Settings
2026-06-28 22:43:08 +01:00
itsamejms 5ce2686ced v0.5.0-dm-tools: Initiative tracker, random tables, encounter builder, calendar
- Initiative Tracker: add/remove combatants, roll initiative, HP bars with
  color transitions (green→gold→red), condition badges, round counter,
  next-turn cycling, gold active-state border
- Random Tables: 4 built-in tables (Tavern Names, Weather, NPC Quirks,
  Treasure), dice notation parser, roll history, highlight matching result
- Encounter Builder: AI-generated encounters via LLM, party level/size,
  terrain selector, JSON response parsing, difficulty badge
- Calendar Widget: Faerûn calendar (Hammer–Nightal), event creation per
  day, event indicators, month navigation, year display
- All glass-card wrapped with framer-motion hover/tap animations
- Full production build clean: tsc, vite, cargo, tauri build
2026-06-28 22:40:11 +01:00
itsamejms 9675e05b07 v0.2.0-llm: LLM integration, core utilities, and persistence
- Rust backend: LLM abstraction with OpenAI-compatible + Ollama API clients
- Tauri commands: generate, generate_stream, get/set LLM config
- LLM config: api_url, api_key, model, temperature, max_tokens, top_p
- Works with Ollama (localhost:11434), LM Studio, any OpenAI-compatible API
- Streaming infrastructure via Tauri Channels (LlmEvent)
- tauri-plugin-store, tauri-plugin-fs added
- Frontend: NPC Generator with race/class/alignment selection + AI generation
- Frontend: Dice Roller with notation parsing (2d6+3), presets, history
- Frontend: Session Logger with note-taking + AI summarization
- Frontend: Settings panel for LLM configuration (URL, key, model, temperature)
- App shell: left rail nav with active states, settings toggle
- All glassmorphism cards with gold glow hover states
- Builds clean: tsc, vite build, cargo check, tauri build
2026-06-28 22:36:30 +01:00
itsamejms f30a92ddeb v0.1.0-skeleton: Tauri v2 + React + TS scaffold with design system
- Tauri v2 project with greet command (invoke round-trip verified)
- React + TypeScript + Vite front-end
- Tailwind CSS v4 with dark blue + gold design tokens
- Glassmorphism .glass-card component with backdrop-filter
- BentoCard component (framer-motion, lucide-react icons)
- App shell: left rail nav (56px) + title bar + bento grid dashboard
- Cinzel / Inter / JetBrains Mono font stack
- Dark-only design: #0a0e1a deep, #d4af37 gold accents
- All design tokens as CSS custom properties
- Rust backend: greet command, tauri-plugin-log
- Builds successfully: cargo check, tsc, vite build, tauri build (macOS .app + .dmg)
2026-06-28 22:30:28 +01:00