Commit Graph

8 Commits

Author SHA1 Message Date
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 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 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