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
This commit is contained in:
itsamejms
2026-06-28 22:36:30 +01:00
parent f30a92ddeb
commit 9675e05b07
13 changed files with 1358 additions and 56 deletions
+19 -29
View File
@@ -4,14 +4,15 @@ import {
Swords,
ScrollText,
Dice5,
Sparkles,
Timer,
GitBranch,
Volume2,
Calendar,
Sparkles,
} from "lucide-react";
import { BentoCard } from "./BentoCard";
import { Greet } from "./Greet";
import { NpcGenerator } from "./NpcGenerator";
import { DiceRoller } from "./DiceRoller";
import { SessionLogger } from "./SessionLogger";
export function Dashboard() {
return (
@@ -19,22 +20,22 @@ export function Dashboard() {
{/* World Map — 2×2 */}
<BentoCard title="World Map" icon={<Map size={16} />} span="col-span-2 row-span-2">
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Map canvas placeholder
<div className="text-center">
<Map size={48} className="mx-auto mb-2 opacity-30" />
<p>Map canvas coming soon</p>
<p className="text-xs mt-1">react-konva integration pending</p>
</div>
</div>
</BentoCard>
{/* NPC Sheet — 1×1 */}
<BentoCard title="NPC Sheet" icon={<User size={16} />} span="col-span-1 row-span-1">
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
NPC generator placeholder
</div>
<NpcGenerator />
</BentoCard>
{/* Dice Roller — 1×1 */}
<BentoCard title="Dice Roller" icon={<Dice5 size={16} />} span="col-span-1 row-span-1">
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Dice roller placeholder
</div>
<DiceRoller />
</BentoCard>
{/* Encounter Builder — 1×1 */}
@@ -44,7 +45,7 @@ export function Dashboard() {
span="col-span-1 row-span-1"
>
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Encounter builder placeholder
Encounter builder coming soon
</div>
</BentoCard>
@@ -54,26 +55,24 @@ export function Dashboard() {
icon={<ScrollText size={16} />}
span="col-span-2 row-span-1"
>
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Session log placeholder
</div>
<SessionLogger />
</BentoCard>
{/* Quest Designer — 2×1 */}
<BentoCard
title="Quest Designer"
icon={<GitBranch size={16} />}
icon={<Sparkles size={16} />}
span="col-span-2 row-span-1"
>
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Quest designer placeholder
Quest flowchart coming soon
</div>
</BentoCard>
{/* Initiative Tracker — 1×1 */}
<BentoCard title="Initiative" icon={<Timer size={16} />} span="col-span-1 row-span-1">
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Initiative tracker placeholder
Combat tracker coming soon
</div>
</BentoCard>
@@ -84,19 +83,10 @@ export function Dashboard() {
span="col-span-1 row-span-1"
>
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Random tables placeholder
Random tables coming soon
</div>
</BentoCard>
{/* Greeting / LLM Test — spans bottom area */}
<BentoCard
title="DM-Pal"
icon={<Volume2 size={16} />}
span="col-span-2 row-span-1"
>
<Greet />
</BentoCard>
{/* Calendar — 1×1 */}
<BentoCard
title="Calendar"
@@ -104,7 +94,7 @@ export function Dashboard() {
span="col-span-1 row-span-1"
>
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Calendar placeholder
Calendar coming soon
</div>
</BentoCard>
@@ -115,7 +105,7 @@ export function Dashboard() {
span="col-span-1 row-span-1"
>
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Soundboard placeholder
Soundboard coming soon
</div>
</BentoCard>
</div>